text
stringlengths
2
1.04M
meta
dict
<?xml version="1.0" encoding="UTF-8"?> <data xmlns="ns:workflow" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="ns:workflow resource:WorkflowData"> <documentTypes xmlns="ns:workflow/DocumentType" xsi:schemaLocation="ns:workflow/DocumentType resource:DocumentType"> <documentType> <name>FinIntEntityStatusMaintenanceDocument</name> <description>Create a Financial Interest Entity Status</description> <label>Financial Interest Entity Status Maintenance Document</label> <parent>KcSharedMaintenanceDocument</parent> <helpDefinitionURL>default.htm?turl=Documents/entitystatus.htm</helpDefinitionURL> </documentType> </documentTypes> </data>
{ "content_hash": "5296ca0c58b85edab2547d32c7769eb4", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 135, "avg_line_length": 61.916666666666664, "alnum_prop": 0.730820995962315, "repo_name": "blackcathacker/kc.preclean", "id": "76fe650f70e0127a40cee4cdf2d0d19f3c104804", "size": "743", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "coeus-db/coeus-db-xml/src/main/resources/org/kuali/coeus/coeus-xml/4/FinIntEntityStatusMaintenanceDocument.xml", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "96034" }, { "name": "Java", "bytes": "27623677" }, { "name": "JavaScript", "bytes": "749782" }, { "name": "Perl", "bytes": "1278" }, { "name": "Scheme", "bytes": "8283377" }, { "name": "Shell", "bytes": "69314" }, { "name": "XSLT", "bytes": "20298494" } ], "symlink_target": "" }
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/tasks/v2beta3/cloudtasks.proto package com.google.cloud.tasks.v2beta3; public interface ResumeQueueRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta3.ResumeQueueRequest) com.google.protobuf.MessageOrBuilder { /** * * * <pre> * Required. * The queue name. For example: * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` * </pre> * * <code>string name = 1;</code> */ java.lang.String getName(); /** * * * <pre> * Required. * The queue name. For example: * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` * </pre> * * <code>string name = 1;</code> */ com.google.protobuf.ByteString getNameBytes(); }
{ "content_hash": "2e625b68fd91b8370917bb346f35f6c2", "timestamp": "", "source": "github", "line_count": 35, "max_line_length": 96, "avg_line_length": 23.771428571428572, "alnum_prop": 0.6574519230769231, "repo_name": "vam-google/google-cloud-java", "id": "e53d4631654f871278e91374de8b62afdb7b0dd9", "size": "832", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ResumeQueueRequestOrBuilder.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "128" }, { "name": "CSS", "bytes": "23036" }, { "name": "Dockerfile", "bytes": "127" }, { "name": "Go", "bytes": "9641" }, { "name": "HTML", "bytes": "16158" }, { "name": "Java", "bytes": "47356483" }, { "name": "JavaScript", "bytes": "989" }, { "name": "Python", "bytes": "110799" }, { "name": "Shell", "bytes": "9162" } ], "symlink_target": "" }
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>CMAKE_SHARED_LIBRARY_SUFFIX &mdash; CMake 3.7.1 Documentation</title> <link rel="stylesheet" href="../_static/cmake.css" type="text/css" /> <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../', VERSION: '3.7.1', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true }; </script> <script type="text/javascript" src="../_static/jquery.js"></script> <script type="text/javascript" src="../_static/underscore.js"></script> <script type="text/javascript" src="../_static/doctools.js"></script> <link rel="shortcut icon" href="../_static/cmake-favicon.ico"/> <link rel="top" title="CMake 3.7.1 Documentation" href="../index.html" /> <link rel="up" title="cmake-variables(7)" href="../manual/cmake-variables.7.html" /> <link rel="next" title="CMAKE_SHARED_MODULE_PREFIX" href="CMAKE_SHARED_MODULE_PREFIX.html" /> <link rel="prev" title="CMAKE_SHARED_LIBRARY_PREFIX" href="CMAKE_SHARED_LIBRARY_PREFIX.html" /> </head> <body role="document"> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > <a href="CMAKE_SHARED_MODULE_PREFIX.html" title="CMAKE_SHARED_MODULE_PREFIX" accesskey="N">next</a> |</li> <li class="right" > <a href="CMAKE_SHARED_LIBRARY_PREFIX.html" title="CMAKE_SHARED_LIBRARY_PREFIX" accesskey="P">previous</a> |</li> <li> <img src="../_static/cmake-logo-16.png" alt="" style="vertical-align: middle; margin-top: -2px" /> </li> <li> <a href="https://cmake.org/">CMake</a> &raquo; </li> <li> <a href="../index.html">3.7.1 Documentation</a> &raquo; </li> <li class="nav-item nav-item-1"><a href="../manual/cmake-variables.7.html" accesskey="U">cmake-variables(7)</a> &raquo;</li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body" role="main"> <div class="section" id="cmake-shared-library-suffix"> <span id="variable:CMAKE_SHARED_LIBRARY_SUFFIX"></span><h1>CMAKE_SHARED_LIBRARY_SUFFIX<a class="headerlink" href="#cmake-shared-library-suffix" title="Permalink to this headline">¶</a></h1> <p>The suffix for shared libraries that you link to.</p> <p>The suffix to use for the end of a shared library filename, <code class="docutils literal"><span class="pre">.dll</span></code> on Windows.</p> <p><code class="docutils literal"><span class="pre">CMAKE_SHARED_LIBRARY_SUFFIX_&lt;LANG&gt;</span></code> overrides this for language <code class="docutils literal"><span class="pre">&lt;LANG&gt;</span></code>.</p> </div> </div> </div> </div> <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> <div class="sphinxsidebarwrapper"> <h4>Previous topic</h4> <p class="topless"><a href="CMAKE_SHARED_LIBRARY_PREFIX.html" title="previous chapter">CMAKE_SHARED_LIBRARY_PREFIX</a></p> <h4>Next topic</h4> <p class="topless"><a href="CMAKE_SHARED_MODULE_PREFIX.html" title="next chapter">CMAKE_SHARED_MODULE_PREFIX</a></p> <div role="note" aria-label="source link"> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../_sources/variable/CMAKE_SHARED_LIBRARY_SUFFIX.txt" rel="nofollow">Show Source</a></li> </ul> </div> <div id="searchbox" style="display: none" role="search"> <h3>Quick search</h3> <form class="search" action="../search.html" method="get"> <input type="text" name="q" /> <input type="submit" value="Go" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> <p class="searchtip" style="font-size: 90%"> Enter search terms or a module, class or function name. </p> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <div class="clearer"></div> </div> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../genindex.html" title="General Index" >index</a></li> <li class="right" > <a href="CMAKE_SHARED_MODULE_PREFIX.html" title="CMAKE_SHARED_MODULE_PREFIX" >next</a> |</li> <li class="right" > <a href="CMAKE_SHARED_LIBRARY_PREFIX.html" title="CMAKE_SHARED_LIBRARY_PREFIX" >previous</a> |</li> <li> <img src="../_static/cmake-logo-16.png" alt="" style="vertical-align: middle; margin-top: -2px" /> </li> <li> <a href="https://cmake.org/">CMake</a> &raquo; </li> <li> <a href="../index.html">3.7.1 Documentation</a> &raquo; </li> <li class="nav-item nav-item-1"><a href="../manual/cmake-variables.7.html" >cmake-variables(7)</a> &raquo;</li> </ul> </div> <div class="footer" role="contentinfo"> &copy; Copyright 2000-2016 Kitware, Inc. and Contributors. Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4a0+. </div> </body> </html>
{ "content_hash": "64d3bb59f63201c61b4668fd018f66bf", "timestamp": "", "source": "github", "line_count": 141, "max_line_length": 215, "avg_line_length": 41.304964539007095, "alnum_prop": 0.601820054945055, "repo_name": "jomof/cmake-server-java-bindings", "id": "9051da0863163b8ac92eb24b869aeabbc2a27158", "size": "5825", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "prebuilts/cmake-3.7.1-Darwin-x86_64/CMake.app/Contents/doc/cmake/html/variable/CMAKE_SHARED_LIBRARY_SUFFIX.html", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "3348" }, { "name": "C", "bytes": "59827" }, { "name": "C++", "bytes": "3387" }, { "name": "CMake", "bytes": "10413149" }, { "name": "CSS", "bytes": "54063" }, { "name": "Emacs Lisp", "bytes": "58905" }, { "name": "Fortran", "bytes": "8420" }, { "name": "HTML", "bytes": "33810011" }, { "name": "Java", "bytes": "77460" }, { "name": "JavaScript", "bytes": "271941" }, { "name": "M4", "bytes": "6297" }, { "name": "Roff", "bytes": "4474740" }, { "name": "Shell", "bytes": "78735" }, { "name": "Vim script", "bytes": "148164" } ], "symlink_target": "" }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <link rel="stylesheet" type="text/css" href="logo.css"> <title>WebLogo 3 - Examples</title> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> <meta name="author" content="Gavin E. Crooks"> <meta name="author" content="Steven E. Brenner"> <meta name="ID" content="$ID:"> <!-- Latest compiled and minified Bootstrap CSS --> <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> <!-- Optional theme --> <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css"> <!-- Latest compiled and minified Bootstrap --> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> <!--jquery libraries--> <script src="//code.jquery.com/jquery-1.11.0.min.js"></script> <script src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script> </head> <body> <!--nav bar--> <div class="navbar navbar-default navbar-fixed-top" role="navigation"> <!--start nav bar--> <div class="container"> <!--start nav bar container--> <div class="navbar-header"> <!--start nav bar header--> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="#">WebLogo 3</a> </div> <!--close nav bar header--> <div class="collapse navbar-collapse"> <!--start nav-collapse --> <ul class="nav navbar-nav"> <li><a href="index.html">home</a></li> <li><a href="create.cgi">create</a></li> <li class="active"><a href="examples.html">examples</a></li> <li><a href="manual.html">manual</a></li> </ul> </div> <!--close .nav-collapse --> </div> <!--close nav bar container--> </div> <!--close nav bar--> <div class="container-fluid"> <!--outermost content container--> <!--off set top margin to keep content clear from nav bar--> <div class="row"> <!--outermost row container--> <div class="col-sm-1"></div> <!--outer column margin left--> <div class="col-sm-10"> <!--Central body col-sm-10 column--> <div class="row"> <!-- Gallery Intro Row Container--> <div class="col-sm-12"> <h1 id="Gallery-header">WebLogo 3 Gallery</h1> <!--start Gallery example links--> <div class="col-sm-6"> <!--start example links column left--> <ul> <li> <a href="#CAP">CAP HTH motif</a> </li> <li> <a href="#trans">Transcription Factor Binding Sites</a> </li> <li> <a href="#promoters"><i>E. coli</i> Promoters</a> </li> </ul> </div> <!--close example links column left--> <div class="col-sm-6"> <!-- example links column right--> <ul> <li> <a href="#globins">Globins</a> </li> <li> <a href="#HTH">HTH motif</a> </li> <li> <a href="#splice">Human Splice Sites</a> </li> </ul> </div> The <strong>Edit Logo</strong> buttons will transfer the relevant sequence data to the <a class="in" href="create.cgi">Logo creation form</a>. There you can examine the sequence data and recreate the logo for yourself. Additional examples can be found at the <a href="http://www.lecb.ncifcrf.gov/~toms/sequencelogo.html">Sequence Logo Gallery</a>. </div> <!--close gallery example links--> </div> <!--Close Gallery Intro Row Container --> <div class="row" id="padding-div"> <hr> </div> <div class="row"> <!-- Example Gallery Row Container--> <div class="col-sm-12"> <!--Example Gallery content column--> <div class="row"> <a name="CAP"></a> <a name="CAP_HTH"></a> <!--CAP row Container--> <!--how to center CAP title? --> <div class="col-sm-6" id="weblogo-examples"> <!--CAP column left container--> <h3>Catobolite Activator Protein (CAP)</h3> <div class="image-div"> <!--image container--> <a href="examples/cap_hth.png" data-fluidbox> <img src="examples/cap_hth.png" class="img-responsive" title="Catobolite Activator Protein " alt="Catobolite Activator Protein " id="fluidbox-1"></a> </div> <div class="text-div"> <!--CAP example text--> The helix-turn-helix motif from the CAP family of homodimeric DNA binding proteins. CAP (Catabolite Activator Protein, also known as CRP for cAMP Receptor Protein) is a transcription promoter that binds at more than 100 sites within the <i>E.&nbsp;coli</i> genome. Residues 1-7 form the first helix, 8-11 the turn and 12-20 the DNA recognition helix. The glycine at position 9 appears to be critical in forming the turn. Positions 4, 8, 10, 15 and 19 are partially or completely buried, and therefore tend to be populated by hydrophobic amino acids, which are colored black. Positions 11-14, 17 and 20 interact directly with bases in the major groove and are critical to the sequence specific binding of the protein. The data for this logo consists of 100 sequences from the full Pfam alignment of this family (Accession number PF00325). A few sequences with rare insertions were removed for convenience. </div> <!--CAP example text div end--> <!-- # Pfam 7.1 crp # Accession number: PF00325 # Bacterial regulatory proteins, crp family # # Description # Numerous bacterial transcription regulatory # proteins bind DNA via a helix-turn-helix (HTH) # motif. These proteins are very diverse, but # for convenience may be grouped into subfamilies on # the basis of sequence similarity. One such # family groups together a range of proteins, including # anr, crp, clp, cysR, fixK, flp, fnr, fnrN, hlyX and # ntcA [MEDLINE:91064083], [MEDLINE:93181282], # [MEDLINE:91008963]. Within this family, the HTH motif is situated # towards the C-terminus. # This is the full Pfam alignment, less a couple of inserts # 102 sequences. # # http://pfam.wustl.edu/cgi-bin/getdesc?name=crp # # Introduction to protein structure, 1st edition, contains # some more information. # First number is sequence number is -5 # First Helix: 1-7, Turn: 8-11, 2nd (DNA recognition) 12-20 # --> <div class="edit-logo-btn"> <!--Edit Logo button for DNA-binding helix-turn-helix motif of the CAP family--> <form method="post" action="create.cgi"> <button class="btn btn-default" type="submit" name="cmd_edit" value="Edit Logo">Edit Logo</button> DNA-binding helix-turn-helix motif of the CAP family <input type="hidden" name="logo_title" value="The DNA-binding helix-turn-helix motif of the CAP family"> <input type="hidden" name="first_index" value="-5"> <input type="hidden" name="logo_start" value="1"> <input type="hidden" name="logo_end" value="20"> <input type="hidden" name="show_xaxis" value="true"> <input type="hidden" name="show_yaxis" value="true"> <input type="hidden" name="show_errorbars" value="true"> <input type="hidden" name="show_fineprint" value="true"> <input type="hidden" name="scale_width" value="true"> <input type="hidden" name="stack_width" value="large"> <input type="hidden" name="sequences" value= ">Q9EXQ1/196-227 LTMT.-RGDIGNYLGLTVETISRLLGRFQKLGVL >Q46158/72-92 LTMT.-RGDIGNYLGLTVETISR----------- >Q46157/72-92 LTMT.-RGDIGNYLGLTVETISR----------- >Q46159/72-92 LTMT.-RGDIGNYLGLTVETISR----------- >Q47948/72-92 LTMT.-RGDIGNYLGLTVETISR----------- >FNR_HAEIN/196-227 LTMT.-RGDIGNYLGLTVETISRLLGRFQKLGVI >ETRA_SHEPU/193-224 LTMT.-RGDIGNYLGLTVETISRLLGRFQKSGLI >FNR_SALTY/193-224 LTMT.-RGDIGNYLGLTVETISRLLGRFQKSGML >Q9LA24/207-238 LTMT.-RGDIGNYLGLTVETISRLLGRFQKSGML >Q9AQ50/193-224 LTMT.-RGDIGNYLGLTVETISRLLGRFQKSGML >FNR_ECOLI/193-224 LTMT.-RGDIGNYLGLTVETISRLLGRFQKSGML >HLYX_ACTPL/192-223 LTMT.-RGDIGNYLGLTIETISRLLGRFQKSGMI >O31204/192-223 LTMT.-RGDIGNYLGLTIETISRLLGRFQKSGMI >Q9L801/192-223 LTMT.-RGDIGNYLGLTIETISRLLGRFQKSGMI >Q9KS27/193-224 LTMT.-RGDIGNYLGLTVETISRLLGRFQKSEIL >Q9CMY2/212-243 LTMT.-RGDIGNYLGLTVETISRLLGRLQKMGIL >Q44500/188-219 LAMS.-RNEIGNYLGLAVETVSRVFSRFQQNELI >ANR_PSEAE/188-219 LAMS.-RNEIGNYLGLAVETVSRVFTRFQQNGLI >O85222/188-219 LSMS.-RNEIGNYLGLAVETVSRVFTRFQQNELI >FNRA_PSEST/188-219 LPMS.-RNEIGNYLGLAVETVSRVFTRFQQNGLL >BTR_BORPE/186-217 VRMS.-REEIGNYLGLTLETVSRLFSRFGREGLI >Q9JQQ8/187-218 LRMS.-REEIGSYLGLKLETVSRTLSKFHQEGLI >O69245/180-211 LPMC.-RRDIGDYLGLTLETVSRALSQLHTQGIL >Q9AMR4/161-192 LPMS.-RRDIADYLGLTVETVSRAVSQLHTDGVL >FIXK_BRAJA/185-216 LPMS.-RQDIADYLGLTIETVSRTFTKLERHGAI >AADR_RHOPA/187-218 LPMG.-RQDIADFLGLTIETVSRTFTKLEREKLI >FIXK_RHIME/159-190 LPMS.-RQDIADYLGLTIETVSRVVTKLKERSLI >FIXK_AZOCA/196-227 LAMS.-RQDIADFLGLTIETVSRTLTYLEEQGTI >Q9AA54/164-195 VPMS.-RQDMADYLGLTIETVSRTLTSLQDEGLI >Q988V4/163-194 LPMS.-RMDIGDYLGLTIETVSRVFTRLKDKGVI >Q53170/175-206 LPMT.-RLDVADYLGMTIETVSRTITKLAGSGVI >Q989I4/189-220 LPLT.-RADISDFLGLTNETVSRQLTRLRADGVI >Q988R0/189-220 LPLT.-RADIADFLGLTIETVSRQLTRLRTDGLI >O06655/187-218 LPLS.-RAEIADFLGLTIETVSRKLTKLRKSGVI >O86069/185-216 LPLS.-RAEIADFLGLTIETVSRQLTRLRKEGVI >O86067/187-218 LPLS.-RAEIADFLGLTIETVSRQMTRLRKWGVI >Q52775/187-218 LPLS.-RAEIADFLGLTIETVSRQMTRLRKSGVI >FX24_RHILV/187-218 LPLS.-RAEIADFLGLTIETVSRQMTRLRKIGVI >FNRL_RHOSH/187-218 LPLT.-REEMADYLGLTLETVSRQVSALKRDGVI >Q51677/188-219 LPLT.-REAMADYLGLTLETVSRQMSALKREGVI >O33961/187-218 LPLT.-REAMADYLGLTLETVSRQMSALKRDGVI >O87372/155-185 -SIS.-RADMADFLGLTTETVSRLLSAFHREQLI >P95599/188-221 LRVSmNRQDIADHLGLTIETLAHTVTKLASRNIV >Q52823/185-216 VPMS.-RQDIADHLGLTIETVSRTLTKLASRNVV >Q9FDG3/192-223 VPMN.-RQDIADHLGLTIETVSRTITKLAARNIV >O84975/207-238 LRMS.-REDIASYLGLRLETVCRSVARLRAQDVV >Q53240/186-217 FPIT.-RQNISEMTGTTLHTVSRLLSAWEREGIV >O52578/162-191 --IS.-RQDIAEMTGTTLHTVSRILSAWEQLGFV >Q9KWP8/153-184 FPIT.-KQDIAEMTGTTLHTVSRILTGWEAQGFV >O66781/189-220 LPLT.-RQDIAEMTGTTVETTIRVMSKWKKQGII >Q982N1/28-58 -PIA.-RGEIASRVGLTVQTVSTIVRELEEQGYI >P96094/179-210 LPAK.-KAMIAARLGLTPETFSRVLKRLREEHLI >FLP_LACCA/168-199 VPMA.-WTQLADYLGTTPETVSRTLKRLAEEKLI >Q97IX9/173-206 INMElSITYLADMLGSKRETVSRQLKLLTEKNLV >Q9CE44/171-202 IPMK.-LKELANYIGTSPETISRKIKVFEENKII >Q9S392/178-209 IPMK.-MKDLATFIGTTPETISRKFKILEEKGFI >Q9S393/178-209 IPMT.-LKDLSAFIGTTPETISRKLRLLEEKGLV >Q98GX3/209-240 LPLS.-QAELADVLGLSVVHMNRVIGALRKVGVV >Q9XDD3/182-213 CPLT.-QGELADALGLTPIHINRMLRELREDNLL >NTCA_ANASP/172-203 LKLS.-HQAIAEAIGSTRVTVTRLLGDLREKKMI >NTCA_SYNP7/171-202 LKLS.-HQAIAEAIGSTRVTVTRLLGDLRESKLI >NTCA_SYNY3/174-205 LKLS.-HQAIAEAIGSTRVTVTRLLGDLREGNMI >P94611/175-206 LKLS.-HQAIAEAIGSTRVTVTRLLGDLRQEEMI >Q9L627/170-201 LKLS.-HQAIAEAIGSTRVTVTRLLGDLRQDEMI >Q9AG80/172-203 LKLS.-HQAIAEAIGSTRVTVTRLLGDLRQDKMI >O30778/173-204 LRLS.-HQAIAEAIGSTRVTITRLLGDLRNSGLV >Q9KI45/189-220 FPLT.-HAQIGSAIGSTRVTVTRLMGKLRQRGLI >CYSR_SYNP7/152-183 IPLT.-HQVIAELSGSTRVTTTRLLGEFRQAGRI >CYSR_SYNY3/160-191 VRLT.-HQMLANAIGTTRVTVTRLLGEFQTQGKV >Q55322/177-208 LRLT.-HQEMASALSTTRVTVTRVIGLLRDEGWL >Q9RTV7/201-231 -RIS.-HQDLAHSVGSTRETITKLLGDFRTRGLL >Q9TLZ6/157-188 IYIS.-QHDIASILSTTRSTITRLINQLRKDNII >FNR_BACSU/174-205 IVLT.-NQDLAKFCAAARESVNRMLGDLRKKGVI >O86128/173-204 IVLT.-NQDLAKFCAAARESINRMLSDLRKNGVI >Q9KG81/173-204 IVLT.-NQELANFCAAARESVNRMLGELRKLGVI >CRP_PASMU/165-196 IKIT.-RQEIGQMVGCSRETVGRILKMLEDQHLI >Q48301/170-201 IKIT.-RQEIGQMVGCSRETVGRILKMLEDQHLI >CRP_HAEIN/180-211 IKIT.-RQEIGQMVGCSRETVGRIIKMLEDQNLI >Q51859/180-211 IKIT.-RQEIGQMVGCSRETVGRIIKMLEDEGLI >Q9F435/166-197 IKIT.-RQEIGQIVGCSRETVGHILKMLEDQNLI >CRP_ECOLI/166-197 IKIT.-RQEIGQIVGCSRETVGRILKMLEDQNLI >CRP_SALTY/166-197 IKIT.-RQEIGQIVGCSRETVGRILKMLEDQNLI >O07097/166-197 IKIT.-RQEIGQIVGCSRETVGRILKMLEDQNLI >Q9ALY5/166-197 IKIT.-RQEIGQIVGCSRETVGRILKMLEEQNLI >O34015/166-197 IKIT.-RQEIGQIVGCSRETVGRILKMLEEQNLI >Q9KNW6/166-197 IKIT.-RQEIGQIVGCSRETVGRILKMLEEQNLI >CLP_XANCP/186-217 LRVS.-RQELARLVGCCAQMAGRVLKKLQADGLL >Q9PD39/185-216 LRVS.-RQELARLVGCSREMAGRVLKKLQADGLL >Q9S6B5/186-217 LRVS.-RQELARLVGCSREMAGRVLKKLQADGLL >P71977/33-62 --LS.-QAEIGERVGMARSTVSRILNALEDEGLV >O28174/36-67 VKIS.-SKELAEHIGQSLQTAARKLKELEDEGLI >Q9CB91/174-204 -DLT.-QEEIAQLVGASRETVNKALADFAHRGWI >O69644/174-204 -DLT.-QEEIAQLVGASRETVNKALADFAHRGWI >Q9XA42/174-204 -DLT.-QEELAQLVGASRETVNKALADFAQRGWL >Q97TL8/136-167 INCT.-HEDIGKAVGVSRVTVSRTLNKFSQYQWI >Q99YT6/175-206 FQLT.-TTDIAQISGTTRETVSHVLRDLKKQELI >Q9RRX0/176-209 LNLKlNQEDIARMVGATRETVSHSLSRLKKGGAI >Q9K5F3/178-209 CPIT.-AAEIAKISGTSRETVSAVLKKLRCEGVI >P73234/185-215 -NLP.-HRETAMLSGVTRETVTRTLGKLEKKGLI >P74171/182-212 -NLP.-HRELSSISGLARETVTRCLTKLEKRGLI >Q981X4/78-109 AKVT.-HDQIAAMVGSTRQWVTMMMKRFQKEGLV "> </form> </div> <!--close CAP edit logo button div--> </div> <!--close CAP col 6 left container--> <div class="col-sm-6" id="weblogo-examples"> <!--CAP column right container--> <div id="padding-div"></div> <!--start cap_dna img--> <div class="image-div"> <a href="examples/cap_dna.png" data-fluidbox><img src="examples/cap_dna.png" class="img-responsive" alt="CAP Binding Site Logo"></a> </div> <!--end cap_dna img--> <div class="text-div"> <!--start cap_dna text div--> The two DNA recognition helixes of the CAP homodimer insert themselves into consecutive turns of the major groove. Several consequences can be observed in this CAP binding site logo. The logo is approximately palindromic, which provides two very similar recognition sites, one for each subunit of the dimer. However, the binding site is not perfectly symmetric, possible due to the inherent asymmetry of the operon promoter region. <p>The displacement of the two parts is 11 base pairs, or approximately one full turn of the DNA helix. Additional interactions between the protein and the first and last two bases occur within the DNA minor groove, where it is difficult for the protein to distinguish A from T, or G from C.</p> <p>The data for this logo consists of 59 binding sites determined by DNA footprinting:</p> <cite><small><p> Robison, K., McGuire, A. M., Church, G. M. A comprehensive library of DNA-binding site matrices for 55 proteins applied to the complete <i>Escherichia coli</i> K12 genome. Journal of Molecular Biology (1998) 284, 241-254. </cite></small></p> </div> <!--close text div--> <div class="edit-logo-btn"> <!--Edit logo button for 58 CAP binding Sites container--> <form method="post" action="create.cgi"> <button class="btn btn-default" type="submit" id="edit-logo-btn" name="cmd_edit" value="Edit Logo">Edit Logo</button> 58 CAP Binding Sites <input type="hidden" name="first_index" value="-10"> <input type="hidden" name="show_xaxis" value="true"> <input type="hidden" name="show_yaxis" value="true"> <input type="hidden" name="show_errorbars" value="true"> <input type="hidden" name="show_fineprint" value="true"> <input type="hidden" name="scale_width" value="true"> <input type="hidden" name="logo_title" value="58 CAP Binding Sites"> <input type="hidden" name="stack_width" value="large"> <input type="hidden" name="sequences" value=" >aldB -18->4 attcgtgatagctgtcgtaaag >ansB 103->125 ttttgttacctgcctctaactt >araB1 109->131 aagtgtgacgccgtgcaaataa >araB2 147->169 tgccgtgattatagacactttt >cdd 1 107->129 atttgcgatgcgtcgcgcattt >cdd 2 57->79 taatgagattcagatcacatat >crp 1 115->137 taatgtgacgtcctttgcatac >crp 2 gaaggcgacctgggtcatgctg >cya 151->173 aggtgttaaattgatcacgttt >cytR 1 125->147 cgatgcgaggcggatcgaaaaa >cytR 2 106->128 aaattcaatattcatcacactt >dadAX 1 95->117 agatgtgagccagctcaccata >dadAX 2 32->54 agatgtgattagattattattc >deoP2 1 75->97 aattgtgatgtgtatcgaagtg >deoP2 2 128->150 ttatttgaaccagatcgcatta >fur 136->158 aaatgtaagctgtgccacgttt >gal 56->78 aagtgtgacatggaataaatta >glpACB (glpTQ) 1 54->76 ttgtttgatttcgcgcatattc >glpACB (glpTQ) 2 94->116 aaacgtgatttcatgcgtcatt >glpACB (glpTQ) 144->166 atgtgtgcggcaattcacattt >glpD (glpE) 95->117 taatgttatacatatcactcta >glpFK 1 120->142 ttttatgacgaggcacacacat >glpFK 2 95->117 aagttcgatatttctcgttttt >gut (srlA) 72->94 ttttgcgatcaaaataacactt >ilvB 87->109 aaacgtgatcaacccctcaatt >lac 1 (lacZ) 88->110 taatgtgagttagctcactcat >lac 2 (lacZ) 16->38 aattgtgagcggataacaattt >malEpKp1 110->132 ttgtgtgatctctgttacagaa >malEpKp2 139->161 TAAtgtggagatgcgcacaTAA >malEpKp3 173->195 TTTtgcaagcaacatcacgAAA >malEpKp4 205->227 GACctcggtttagttcacaGAA >malT 121->143 aattgtgacacagtgcaaattc >melR 52->74 aaccgtgctcccactcgcagtc >mtl 302->324 TCTTGTGATTCAGATCACAAAG >nag 156->178 ttttgtgagttttgtcaccaaa >nupG2 97->119 aaatgttatccacatcacaatt >nupG1 47->69 ttatttgccacaggtaacaaaa >ompA 166->188 atgcctgacggagttcacactt >ompR 161->183 taacgtgatcatatcaacagaa >ptsH A 316->338 Ttttgtggcctgcttcaaactt >ptsH B 188->210 ttttatgatttggttcaattct >rhaS (rhaB) 161->183 aattgtgaacatcatcacgttc >rot 1 (ppiA) 182->204 ttttgtgatctgtttaaatgtt >rot 2 (ppiA) 129->151 agaggtgattttgatcacggaa >tdcA 60->82 atttgtgagtggtcgcacatat >tnaL 73->95 gattgtgattcgattcacattt >tsx 2 146->168 gtgtgtaaacgtgaacgcaatc >tsx 1 107->129 aactgtgaaacgaaacatattt >uxuAB 165->187 TCTTGTGATGTGGTTAACCAAT "> </form> </div> <!--close Edit logo button for 58 CAP binding Sites container--> </div> <!-- close CAP column right container--> </div> <!--Close CAP row container--> <div id="padding-div"> <hr> </div> <div class="row"> <a name="trans"></a> <!--start E.Coli Transcription row container--> <!--why aren't div markers E.Coli Transcription row container matching up in linter????????!!!!--> <div class="col-sm-6" id="weblogo-examples"> <!--E.coli column col-sm-6 left container --> <a name="LexA"></a> <h3><i>E. coli</i> Transcription Factor Binding Sites</h3> <div class="image-div"> <a href="examples/lexA.png" data-fluidbox> <img src="examples/lexA.png" class="img-responsive" alt="LexA repressor"></a> </div> <div class="text-div"> <!--start LexA text div--> The following logos (along with the <a href="#CAP">CAP logo</a> above) display a selection of <i>E. coli</i> transcription factor binding sites determined by DNA footprinting. This data has been collated in the <a href="http://arep.med.harvard.edu/dpinteract/">DPInteract</a> database and has been used to <a href="http://arep.med.harvard.edu/ecoli_matrices/">search for additional binding sites</a> within the <i>E. coli</i> genome. <a name="footprinting"></a> <cite> Robison, K., McGuire, A. M., Church, G. M. A comprehensive library of DNA-binding site matrices for 55 proteins applied to the complete <i>Escherichia coli</i> K12 genome. Journal of Molecular Biology (1998) 284, 241-254. </cite> </div> <!--close LexA text-div--> <div class="edit-logo-btn"> <a name="LexA"> </a> <!--LexA button start--> <form method="post" action="create.cgi"> <div id="button"> <button class="btn btn-default" type="submit" name="cmd_edit">Edit Logo</button> <span class="btn-description">LexA repressor is closely related to CAP, and has similar DNA protein interactions.</span></div> <input type="hidden" name="logo_title" value="19 LexA Binding Sites"> <input type="hidden" name="stack_width" value="large"> <input type="hidden" name="first_index" value="-9"> <input type="hidden" name="show_xaxis" value="true"> <input type="hidden" name="show_yaxis" value="true"> <input type="hidden" name="show_errorbars" value="true"> <input type="hidden" name="show_fineprint" value="true"> <input type="hidden" name="scale_width" value="true"> <input type="hidden" name="sequences" value=" >dinD 32->52 aactgtatataaatacagtt >dinG 15->35 tattggctgtttatacagta >dinH 77->97 tcctgttaatccatacagca >dinI 19->39 acctgtataaataaccagta >lexA-1 28->48 tgctgtatatactcacagca >lexA-2 7->27 aactgtatatacacccaggg >polB(dinA) 53->73 gactgtataaaaccacagcc >recA 59->79 tactgtatgagcatacagta >recN-1 49->69 tactgtatataaaaccagtt >recN-2 27->47 tactgtacacaataacagta >recN-3 9-29 TCCTGTATGAAAAACCATTA >ruvAB 49->69 cgctggatatctatccagca >sosC 18->38 tactgatgatatatacaggt >sosD 14->34 cactggatagataaccagca >sulA 22->42 tactgtacatccatacagta >umuDC 20->40 tactgtatataaaaacagta >uvrA 83->103 tactgtatattcattcaggt >uvrB 75->95 aactgtttttttatccagta >uvrD 57->77 atctgtatatatacccagct"> </form> </div> <!--LexA button end--> <div class="edit-logo-btn"> <a name="hns"></a> <!--H-NS button section start--> <form method="post" action="create.cgi"> <button class="btn btn-default" type="submit" name="cmd_edit" value="Edit Logo">Edit Logo</button> H-NS: Histone like, nucleoid-associated DNA-binding protein. <!--<img alt ="" src="examples/hns.png" >--> <input type="hidden" name="logo_title" value="15 hns Binding Sites"> <input type="hidden" name="stack_width" value="large"> <input type="hidden" name="first_index" value="-1"> <input type="hidden" name="logo_start" value="1"> <input type="hidden" name="show_xaxis" value="true"> <input type="hidden" name="show_yaxis" value="true"> <input type="hidden" name="show_errorbars" value="true"> <input type="hidden" name="show_fineprint" value="true"> <input type="hidden" name="scale_width" value="true"> <input type="hidden" name="sequences" value=" >hns1 tAGGCTGATTT >hns2 gAAAATTATTT >hns3 gGGAGTTATTC >hns4 aCAAATTATTT >hns5 gCAACAGAGTA >hns6 aCGCCTGAATA >hns7 tCGAGAAAGTT >hns8 tCGCCGGAATT >hns9 tGGCATGAATA >hns10 aTAAAGGAATC >hns11 cTAATTTAATT >hns12 gCAATTAAATT >hns13 tGACATGAATC >hns14 cTGGCTAATTT >hns15 aCAACTGAATT"> </form> </div> <!--H-NS button section end--> <div class="edit-logo-btn"> <a name="dnaA"></a> <!--dnaA button section start--> <!--<img alt="" src="examples/dnaA.png" >--> <form method="post" action="create.cgi"> <button class="btn btn-default" type="submit" name="cmd_edit" value="Edit Logo">Edit Logo</button> DNA biosynthesis initiation binding protein. <input type="hidden" name="logo_title" value="8 dnaA Binding Sites"> <input type="hidden" name="stack_width" value="large"> <input type="hidden" name="logo_end" value="14"> <input type="hidden" name="show_xaxis" value="true"> <input type="hidden" name="show_yaxis" value="true"> <input type="hidden" name="show_errorbars" value="true"> <input type="hidden" name="show_fineprint" value="true"> <input type="hidden" name="scale_width" value="true"> <input type="hidden" name="sequences" value=" >dnaA_1 rpoH-1 aatttattcacaagc >dnaA_2 rpoH-2 attttatccacaagt >dnaA_3 nrd gagttatccacaaag >dnaA_4 oriC-R1 ttgttatccacaggg >dnaA_5 oriC-R2 ggggttatacacaac >dnaA_6 oriC-R3 ttctttggataacta >dnaA_7 oriC-R4 gagttatccacagta >dnaA_10 dnaA gatttatccacagga"> </form> </div> <!--dnaA button section end--> <div class="edit-logo-btn"> <a name="argR"></a> <!--argR button function start--> <!-- <img alt ="" src="examples/argR.png" > --> <form method="post" action="create.cgi"> <button class="btn btn-default" type="submit" name="cmd_edit" value="Edit Logo">Edit Logo</button> Arginine Repressor <input type="hidden" name="logo_title" value="17 ArgR Binding Sites"> <input type="hidden" name="stack_width" value="large"> <input type="hidden" name="first_index" value="-8"> <input type="hidden" name="show_xaxis" value="true"> <input type="hidden" name="show_yaxis" value="true"> <input type="hidden" name="show_errorbars" value="true"> <input type="hidden" name="show_fineprint" value="true"> <input type="hidden" name="scale_width" value="true"> <input type="hidden" name="sequences" value=" >argA-1 32->50 acagaataaaaatacact >argA-2 11->29 ttcgaataatcatgcaaa >argD-1 51->69 agtgattttttatgcata >argD-2 30->48 tgtggttataatttcaca >argECBH-1 26->44, argC 110->128 tatcaatattcatgcagt >argECBH-2 47->65, argC 89->107 tatgaataaaaatacact >argF-1 48->66 aatgaataattacacata >argF-2 27->45 agtgaattttaattcaat >argG-1 73->91 attaaatgaaaactcatt >argG-2 52->70 tttgcataaaaattcagt >argG-3 192->210 tgtgaatgaatatccagt >argI-1 46->64 aatgaataatcatccata >argI-2 25->43 attgaattttaattcatt >argR-1 45->63 tttgcataaaaattcatc >argR-2 24->42 tatgcacaataatgttgt >carAB-1 32->50 tgtgaattaatatgcaaa >carAB-2 11->29 agtgagtgaatattctct"> </form> </div> <!--argR button function end--> </div> <!--close Ecoli column col-sm-6 left container--> <div class="col-sm-6" id="weblogo-examples"> <a name="promoters"></a> <!--start E. Coli col-sm-6 right container--> <!--why aren't div markers E. Coli col-sm-6 right containermatching up in linter????????!!!!--> <h3><i>E. coli</i> Promoters (Transcription Start Signals)</h3> <div class="image-div"> <a href="examples/ecoli10.png" data-fluidbox><img src="examples/ecoli10.png" class="img-responsive" alt="E. coli Promotor logo"></a> </div> <div class="text-div"> <!--start E.coli Promotor text--> In prokaryotes the DNA sequence just upstream of the transcription start point contains two important conserved regions. The first such region is centered at around 35bp upstream and is involved in the initial recognition of the gene by RNA polymerase. <!--The consensus sequence is TTGACAT, but the logo indicates that a great deal of variation occurs. --> <p></p> The second region, sometimes referred to as the Pribnow box, is centered at about 10bp upstream. The typical separation between the -35 and -10 sites is 15-18 bp. <p></p> <a class="out" href="http://www.lecb.ncifcrf.gov/~toms/papers/baseflip/">baseflip: Strong Minor Groove Base Conservation in Sequence Logos implies DNA Distortion or Base Flipping during Replication and Transcription Initiation</a> for more information. This sequence data was kindly provided by Prof. Julia Brettschneider &lt;[email protected]&gt; </div> <!--close E.coli Promotor text--> <!--why aren't div markers .coli promoters button function matching up in linter????????!!!! doesn't see</form>?? doesn't see </div for promoters button?? doesn't --> <div class="edit-logo-btn" id="ecoli-promoters-btn"> <!--start E.coli promoters button function--> <form method="post" action="create.cgi"> <button class="btn btn-default" type="submit" name="cmd_edit" value="Edit Logo">Edit Logo </button> The -10 region of 350 E. coli promoters <input type="hidden" name="logo_title" value="-10 region of 3E. coli promoters"> <input type="hidden" name="stack_width" value="large"> <input type="hidden" name="first_index" value="-21"> <input type="hidden" name="logo_start" value="0"> <input type="hidden" name="logo_end" value="7"> <input type="hidden" name="show_xaxis" value="true"> <input type="hidden" name="show_yaxis" value="true"> <input type="hidden" name="show_errorbars" value="true"> <input type="hidden" name="show_fineprint" value="true"> <input type="hidden" name="scale_width" value="true"> <input type="hidden" name="sequences" value=" > The -10 hexamers of 350 E.coli promoters gatgacgtggtttacgaccccaTTTAGTagtcaaccgcagtgagtgagtc > ttgaaaccagacgtttcgccccTATTACagactcacaaccacatgatgac > ctggcggcgtagcgatgcgctgGTTACTctgaaaacggtctatgcaaatt > tgacttttagcgcccatatctcCAGAATgccgccgtttgccagaaattcg > gatttacgtcatcattgtgaatTAATATgcaaataaagtgagtgaatatt > agaatacagcttattgaataccCATTATgagttagccattaacgcgtcca > cgacgacggtttacgctttacgTATAGTggcgacaattttttttatcggg > ctgacgctttttatcgcaactcTCTACTgtttctccatacccgttttttt > atccgtttttgtatccagtaacTCTAAAagcatatcgcattcatctggag > ttttttattgaatgtagaatttTATTCTgaatgtgtgggctctctatttt > tattctgaatgtgtgggctctcTATTTTaggattaattaaaaaaatagag > tcttttcacctttcctcctgttTATTCTtattaccccgtgtttatgtctc > attgcttaagcaagatcggacgGTTAATgtgttttacacattttttccgt > gcgccacactaaggtaattcctTATGCTggcaatgtcgtgaccagtgata > tgcagcctgtgctcagcgcgtgTTTCATacgcaagtgcgtatcggcgcgc > tgcattcgctgccgcataccatTATTCTtgatctgacggaagtctttttg > ggacataaggtgaatactttgtTACTTTagcgtcacagacatgaaattgg > ttattgagctttccggcgagagTTCAATgggacaggttccagaaaactca > ttaaaaattgttaacaattttgTAAAATaccgacggatagaacgacccgg > taacacctcgtcaaaatcctgcTATTCTgcccgttgcggtactgggcatt > tctattttatattattccctgtTTTAATtaactctatcagggatggttta > gacagaggccctcaatccaaacGATAAAgggtgatgtgtttactgatatg > tgctatctcgctgacggacaggCAAATTgatgaccagcttttaaaccgac > tttgacatttcttttgcactggTAAACTaaatcacttttttttgtcccag > ttttctcgcgtccgcgatagcgTAAAATagcgccgtaacccccaggtcct > aatttctacctgtttaagcatcTCTGGTagacttcctgtaattgaatcga > tgcagtgctcatagcggtcattTATGTCagacttgtcgttttacagttcg > aacatatctcgcaagcctgtctTGTGTTgacaacattttctgctaaccct > ctctccctgacgcgggataaagTGGTATtctcaaacatatctcgcaagcc > tatatctttaacaatctcaggtTAAAAActttcctgttttcaacgggact > gttgcaaatgaataattacacaTATAAAgtgaattttaattcaataagtg > tgaacgtccaatcaataaccgcTTTAATagataaacaccgctgatgaatg > ttgctttttatcttcagatgaaTAGAATgcggcggattttttgggtttca > gtcataaggtaaaagtctcattTATGATgagttccattggatttacttat > ttaccttatgacaatcggcgagTAGTCTgcctctcattccagagacagac > tacactttatgcttccggctcgTATGTTgtgtggaattgtgagcggataa > cgcaaaacctttcgcggtatggCATGATagcgcccggaagagagtcaatt > taaagttgtcacggccgagactTATAGTcgctttgtttttattttttaat > ttcattcttgaatatttattggTATAGTaaggggtgtattgagattttca > atctcttggccttgctggtcgtTATCCTgcaagctatcactttattggct > taaatctgtcataaatctgacgCATAATgacgtcgcattaatgatcgcaa > tgcagggagagcgccccggcacTAGACTacccgcctcttattttagtctg > acatatttttgtgagcaatgatTTTTATaataggctcctctgtatacgaa > ttacagtaatgtaaccttcccgTAAAATgcccacacactttaaacgccac > tagcgtaacaacaaaagattgtTATGCTtgaaatatggtgatgccgtacc > tcccttgtccccatctctcccaCATCCTgtttttaaccttaaaatggcat > tgaggcaatcgcctgttggtggTATCGTttatcgctttttcaaaaaattc > gattgcagaaatatattgataaTATTATtgataactatttgcatttgcaa > aaatgcaaatagttatcaataaTATTATcaatatatttctgcaatcaatg > tgctggaaaattaatgtgctttTATAGTggcgcttattgttgtcaatatt > attatcactcccttttactggcTAAACCagaaaacttattttatcattca > tcacacactctgtagcagatgaTCTAACaatctgattacagaacatcggc > tgtcagcctgtcccgcttataaGATCATacgccgttatacgttgtttacg > tttcatttaggcgtggcaattcTATAATgatacgcattatctcaagagca > acagttattagtggtagacaagTTTAATaattcggattgctaagtacttg > acaaacattaccaggaaaagcaTATAATgcgtaaaagttatgaagtcggt > tgtaatgattttgtgaacagccTATACTgccgccaggtctccggaacacc > tgggcagcttcttcgtcaaattTATCATgtggggcatccttaccgctctg > ctttaaaaactgcccctgacacTAAGACagtttttaaaggttccttcgcg > ggaaatgggcatcaaaaagagaTAAATTgttctcgatcaaattggctgaa > ttacacattctgacggaagataTAGATTggaagtattgcattcactaaga > gtcacacttttcgcatctttgtTATGCTatggttatttcataccataagc > gtcacacttttcgcatctttgtTATGCTatggttatttcataccataagc > gttttttgttgttaattcggtgTAGACTtgtaaacctaaatcttttcaat > tgtaaaccaaattgaaaagattTAGGTTtacaagtctacaccgaattaac > caaaactggcacgattttttcaTATATGtgaatgtcacgcaggggatcgt > tttttcatcaggttttacgctaAATAATcactgtgttgagtgcacaattt > ttgacggctcgccctaattctcTAAATTgtatttctagagttggcgaggt > cgtgttacaaaaattcttttctTATGATgtagaacgtgcaacgcaattga > caaaaattcttttcttatgatgTAGAACgtgcaacgcaattgatgctcgc > gatggtgaacaagtacgcgaggGAGAATgagcatccattgctgtgtacgc > actcctcacttacacgtaatacTACTTTcgagtgaaaatctacctatctc > ggtggtggtttgttggttgggtTGACATactgggtcatttacctgcgtga > tatggtgctgccggtcgcgatgTTTGTTgccagcggttttgagcacagta > gcaaacctgatggtatgtctggCAGTATggatgagttattctggccgcag > tttctcatctataatgctttgtTAGTATctcgtcgccgacttaataaaga > tttctcatctataatgctttgtTAGTATctcgtcgccgacttaataaaga > tgataaaaccgatagccacaggAATAATgtattacctgtggtcgcaatcg > gagcaagtgattgaaaaagcgcTACAATacgcgcgccagaaattggctct > tggaattttgtaaatctcccgtTACCCTgatagcggacttcccttctgta > ttcaataaattgcgaaacaaggTATACTccagcagttcctgaagatgttt > acgcagcagtagcaaactaagcTATAAAttgcagcgcgaactggagcagc > tgttcagcgtacacgtgttagcTATCCTgcgtgcttcaataaaataaggc > ttgtaagttttcaactacgttgTAGACTttacatcgccaggggtgctcgg > ttcacacttgtaagttttcaacTACGTTgtagactttacatcgccagggg > gttgatctttgttgtcactggaTGTACTgtacatccatacagtaactcac > attagcatcgcatcaggcaatcAATAATgtcagatatgaaaagcggaaac > tggcatatgaaattttgaggatTACCCTacacttataggagttaccttac > acatggttgcacaaagttgcaaCATCATggatatttcacgataacgttaa > aaaatttaatgtaaatggtgtgTTAAATcgattgtgaataaccagcgctt > aaaatttaatgtaaatggtgtgTTAAATcgattgtgaataaccagcgctt > tgtgaataaccagcgcttccggCAGGATacggtcgccctggtaaaacata > aacggcaagtttcgacattgccGATAATaattttttggagactttagatg > catcactctgtcatctttccagTAGAAActaatgtcactgaaatggtgtt > gtcggaatggctggttatccatTAAAATagatcggatcgatataagcaca > tgcaaaggaaaacgtttccgctTATCCTttgtgtccggcaaaaacatccc > tgactctatgacgttacaaagtTAATATgcgcgccctatgcaaaaggtaa > tttcagagattatgaattgccgCATTATagcctaataacgcgcatctttc > ttcatgacggcaaacaatagggTAGTATtgacaagccaattacaaatcat > tgatctgctggcaagaacagacTACTGTatataaaaacagtataacttca > tgaataatattttcaactgagtTATCAAgatgtgattagattattattct > gatcatgcagctagtgcgatccTGAACTaaggttttctgatacttgaata > gatgcggtgctttcctggctgtTAGAATacgccccgtcgcgcctgactgg > agcgttaccgtccgctatcgtcTATGTTcaagttgtcttaattgccagaa > tttattgatcttacgcatcctgTATGATgcaagcagactaaccctatcaa > catcaaattgcctttagctacaGACACTaaggtggcagacatcgaaacga > gtttcagagcgttaccttgcccTTAAACattagcaatgtcgatttatcag > tgcacaactgaatttaaggctcTATTATtacctcaacaaaccaccccaat > taatgtagccaccaaatcatacTACAATttattaactgttagctataatg > tgctgaagaataattgaaatgaTATTATtaattccactgcctttggtaga > gaatatgattgctatttgcattTAAAATcgagacctggtttttctactga > cgtgacattttaacacgtttgtTACAAGgtaaaggcgacgccgcccatga > tgacaattaatcatcgaactagTTAACTagtacgcaagttcacgtaaaaa > ttgcgtatcggattttatcaggTACAGTgtgacgctttcgtcaatctggc > gacgctttcgtcaatctggcaaTAGATTtgcttgacattcgaccaaaatt > acattcgaccaaaattccgtcgTGCTATagcgcctgtaggccaagacctg > ggtgaaccccttctcgttatggCAAAATaagccaatacagaaccagcatt > gacagatttgtgccattccgtgAACGATcgacgcgtcgtgattaggtgaa > tttcaccagacttattcttagcTATTATagttatagagagcttacttccg > tcctgctatccaaatagtgtcaTATCATcatattaattgttcttttttca > gctgtgttattgacagttagcaTAAACTaggtgtgacgttaactatatgt > cgattccgtctctctgatgattGATGTTaattaacaatgtattcaccgaa > tgtccttgttcgataaacacaaTAAACTtgatcatgaaattgccagaaag > tatcctcgtgctgtttctcacgTAGTCTataatttcctttttaagcccac > tttgttaaaaaagtgtgtaggaTATTGTtactcgcttttaacagggcaac > ttacttcccgtaggattcttgcTTTAATagtgggattaatttccacatta > attacgcaacgataatagcgggTATAAGataaataaaaggtaaaacgttt > tttgtctcaccttttaatttgcTACCCTatccatacgcacaataaggcta > tccccttttcgtcaagatcggcCAAAATtccacgcttacactatttgcgt > attctcaacataaaaaactttgTGTAATacttgtaacgctacatggagat > ttcatccggttaaatatgcaaaGATAAAtgcgcagaaatgtgtttctcaa > gtgcattagcttatttttttgtTATCATgctaaccacccggcgaggtgtg > tgacttttatcgccgtagccttTTCAATaaaggtcttttgaagagtacca > ttaacgtttttaactttttaatTAGAATatagatacaggagagcacatat > taacggatgtatccgtttagtcTATGATatgtacagcacttttggcttcg > tcactttccgctgattcggtgcCAGACTgaaatcagcctataggaggaaa > gggcttgaaaaagcgcccaatgTATTCCaggcttatctaacacgctgata > cttaccgtcacattcttgatggTATAGTcgaaaactgcaaaagcacatga > accaactggcaaaattttgtccTAAACTtgatctcgacgaaatggctgca > catttttatcgtaattgcccttTAAAATtcggggcgccgaccccatgtgg > aaaattcggggcgccgaccccaTGTGGTctcaagcccaaaggaagagtga > ttgacgctgcgtaaggtttttgTAATTTtacaggcaaccttttattcact > ataaaataattttttcgatatcTAAAATaaatcgcgaaacgcaggggttt > ttgaaaatagtcgcgtaacccaTACGATgtgggtatcgcatattgcgttt > tttcgcaagctcgtaaaagcagTACAGTgcaccgtaagaaaattacaagt > tcttcatccttcgctggatatcTATCCAgcatttttttatcatacagcat > gacgagtacagttgcgtcgattTAGGAAaaatcttagataagtgtaaaga > cttcatgaccgtgaatagagtcCATCGTccctcctcaaaaaaagcctagc > tgacgaagcagccgttatgcctTAACCTgcgccgcagatatcactcataa > tgaaacattgatgtctctgtagCAACATaggggtaatcttactgacaaca > tgtctgaacgtgaattgcagatTATGCTgatgatcaccaagggccagaag > tcaaagttgcaataaaaaccgcTAATATacgaatgactaactatcagtag > gattaaaaaccctgcagaaacgGATAATcatgccgataactcatataacg > ctttgttgcgctcaagacgcagGATAATtagccgataagcagtagcgaca > tactttaagacaattccaggcaAATTATacaacactttacgggatagtaa > tttgtttcacatttctgtgacaTACTATcggatgtgcggtaattgtatgg > ttcacatttctgtgacatactaTCGGATgtgcggtaattgtatggaacag > ttcacatttctgtgacatactaTCGGATgtgcggtaattgtatggaacag > tgtgacatactatcggatgtgcGGTAATtgtatggaacaggagacacaca > tgtgacatactatcggatgtgcGGTAATtgtatggaacaggagacacaca > gctgattagcacggtgatatttGATACTctggcagacagcagaaataacg > taataaatagttaattaacgctCATCATtgtacaatgaactgtacaaaag > ttaaatctttgtgggatcagggCATTATcttacgtgatcagaataaacaa > ttatactttaataagtactttgTATACTtatttgcgaacattccaggccg > atataaagccacaacgggttcgTAAACTgttatcccattacatgattatg > gaagtcctgtattcagtgctgaCAAAATagccgccagcaagcagtcattt > tgataattgttatcgtttgcatTATCGTtacgccgcaatcaaaaaaggct > taacatttggattgataattgtTATCGTttgcattatcgttacgccgcaa > tggattattctgcatttttgggGAGAATggacttgccgactgattaatga > acctcaaactgcgcggctgtgtTATAATttgcgacctttgaatccgggat > tgcaagagggtcattttcacacTATCTTgcagtgaatcccaaacataccc > atttaatttatgaatgttttctTAACATcgcggcaactcaagaaacggca > aaatcacgtttcactttcgaatTATGAGcgaatatgcgcgaaatcaaaca > attagctgtataaaagaatttcTACAGTgattgtaaggttttttttattc > ccaaagtttcgggctgttatgtTTTAATgtgcaacattcatggtctgttg > acgagagttaaccggacaagtgTGCCATaatctcgcggccaggcatactt > tgttcggcgtacaagtgtacgcTATTGTgcattcgaaacttactctatgt > caacattccagctggtccgaccTATACTctcgccactggtctgatttcta > ggcgctacgctcaatgaaacatTTAAATactatacgacagcgacatttat > ttgaggaatcaggcgggagtgaTAGAATatcgcccacttaatttttccag > tgtcaacgaaaacaataatgcgTAAGGTagaaacccgaactacattgagg > tgcgcaatttgtcaacgaaaacAATAATgcgtaaggtagaaacccgaact > ttccgcatattctctgagcgggTATGCTacctgttgtatcccaatttcat > attcagcctgtcggaactggtaTTTAACcagactaattattttgatgcgc > attcagcctgtcggaactggtaTTTAACcagactaattattttgatgcgc > ggttcaattcttcctttagcggCATAATgtttaatgacgtacgaaacgtc > ttcttcctttagcggcataatgTTTAATgacgtacgaaacgtcagcggtc > tggcagttgaccgtggtaatgaTATGATttcacacctttaccagccaatg > gcttttaatgccataccaaacgTACCATtgagacacttgtttgcacagag > attgttgtatgcatgtttttttTATGCTttccttaagaacaactcacccc > cagaactcaatgcacaaggcagTATTAAcgtcgtcaattattcccaacat > ttgccgccttgaagaaaggaggTATAATccgtcgattttttttgtggctg > cgcaaacgtttgctttccctgtTAGAATtgcgccgaattttatttttcta > ccggaagctggttgcgtgaaatTAGAAAtttcgccgctgatccaaacctg > gggaagcgcctcgcttcccgtgTATGATtgaacccgcatggctcccgaaa > ttcccttcgccatttccttgagCAAACTttagctattcttatcaattatg > tgttatcgcacaatgattcggtTATACTgttcgccgttgtccaacaggac > ggaatgaattggcgttatgtgtTACGTTtagcagatcaaaagacaggcga > ggggcgcaaccggacagaatttTATAAActgctttcccgacacgagctgg > ttcgtcagcgcatcagattcttTATAATgacgcccgtttcccccccttgg > ttgtagtgtagaatgcggcgttTCTATTaatacagacgttaagctcagaa > gaataattgagggatgacctcaTTTAATctccagtagcaactttgatccg > gacagcgtgaaaacagtacgggTACTGTactaaagtcacttaaggaaaca > ttgaaaactttactttatgtgtTATCGTtacgtcatcctcgctgaggatc > ttgaaaccctgaaactgatcccCATAATaagcgaagttagcgagatgaat > ggaaatataataagtgatcgctTACACTacgcgacgaaatactttttttg > acgcaaataatttgtggtgatcTACACTgatactctgttgcattattcgc > tgcattattcgcctgaaaccacAATATTcaggcgttttttcgctatcttt > ttgcctcagattctcagtatgtTAGGGTagaaaaaagtgactatttccat > ttactttatttgtcactgtcgtTACTATatcggctgaaattaatgaggtc > taccttcccagtcaagaaaactTATCTTattcccacttttcagttaccag > ttgatactgtatgagcatacagTATAATtgcttcaacagaacatattgac > cttttaaatctttcaatctgatTAGATTaggttgccgtttggtaataaaa > gcggcagcgtggcggaaggttgTAAACTgcacctcgaagaacaagaggcc > tgcgtcgcaaccgacaattacgTATTCTgagtcttcgggtgaacagagtg > gttattttgccgcaggtcagcgTATCGTgaacatcttttccagtgttcag > tcattcgttctcttacgctcccTATAGTcgaaacatctgatggcaagaaa > taatccacaccgtttgccccgtTAACCTtaccttctcttctgttttatgg > tgtggcacaggtcatgttcgggTATACTgctttcccgtcttggttattcc > aaaacatttaccccaaaggggcTATTTTctcactcctgatttcaatagtg > tattacagagcgttttttatttGAAAATgaatccatgagttcatttcaga > ggtagaagctcaacggacaattTATAATggctcagattaaaaaaactaat > tgcgcaatctatccgcttacttTATGATgcgcaccagtcacggactgatg > acacctgcgtgagttgttcacgTATTTTttcactatgtcttactctctgc > tccttttattccacgtttcgctTATCCTagctgaagcgtttcagtcgatt > gttcgaggcaggtttgtacggtTATACTtatcttgaagatgagtaagtcc > aatttcccatacagagctaaggGATAATgcgtagcgttcacgtaactgga > tctccaaaatatattcacgttgTAAATTgtttaacgtcaaatttcccata > taacaaaaaaccagtccgcgaaGTTGATagaatcccatcatctcgcacgg > acaacagtaaaatcagagcgttTCTGCTtttactgatgtctggcggtcgg > ttacatcaacccgcattggtccTACACTgcgcggtaataaagcgaggtaa > cgcccctggagaaagcctcgtgTATACTcctcacccttataaaagtccct > tacaaagcagcagcaattgcagTAAAATtccgcaccattttgaaataagc > caccgggcaacttttagagcacTATCGTggtacaaataatgctgccaccc > aaaaactgtcgatgtgggacgaTATAGCagataagaatattgctgagcaa > gcacatatcctgttcatttcatTTTGATacacttcatgccgtcaatgagg > gtcttttgtactcgtgtactggTACAGTgcaatgcataacaacgcagtcg > tgcgataacaggtcgctacgagTAGAATactgccgcttaacgtcgcgtaa > tgcattttttacccaaaacgagTAGAATttgccacgtttcaggcgcgggg > tgacctgtatcagctttcccgaTAAGTTggaaatccgctggaagctttct > gtttctcaataacgaaatttgaTAAAATcccgctctttcataacattatt > ataaaaattcatctgtatgcacAATAATgttgtatcaaccaccatatcgg > tgattatcttccctgataagacCAGTATttagctgccaattgctacgaaa > acccatatccttgaagcggtgtTATAATgccgcgccctcgatatggggat > ttgcgttcggtggttaagtatgTATAATgcgcgggcttgtcgtagttgac > tgacaccttttcggcatcgcccTAAAATtcggcgtcctcatattgtgtga > agacacaaagcgaaagctatgcTAAAACagtcaggatgctacagtaatac > gccaaacccgctggagtattgaGATAATtttcagtctgactctcgcaata > tgacgcgcgcaggtatttagcaTACAAGgagtaccgatttgagagttggt > acacctaaaatgctatttctgcGATAATagcaaccgtttcgtgacaggaa > attgtatacttaagctgctgttTAATATgctttgtaacaatttaggctga > ggaaggtcaacatcgagcctggCAAACTagcgataacgttgtgttgaaaa > taacgccacgcttgaggtaacaGAGATTgttttacctgctggggagtggc > tttttctgtaattcgagcatgtCATGTTaccccgcgagcataaaacgcgt > tgtcatctttctgacaccttacTATCTTacaaatgtaacaaaaaagttat > ttttatgctgacaaaggcacttTTTTCTgtttatctatcaataaattcag > ttccaatatcataaaaatcgggTATGTTttagcagagtatgctgctaaag > ggtctgataaaacagtgaatgaTAACCTcgttgctcttaagctctggcac > gaacttgtggataaaatcacggTCTGATaaaacagtgaatgataacctcg > gaacttgtggataaaatcacggTCTGATaaaacagtgaatgataacctcg > cgcctgaataataaaagcgtgtTATACTctttccctgcaatgggttccgt > attgacggatcatccgggtcgcTATAAGgtaaggatggtcttaacactga > tgacttatccgcttcgaagagaGACACTacctgcaacaatcaggagcgca > tgacgttttcacattctgttgaCAGATTgtaggtcacgaggggcatttta > tgcatcacccgccaatgcgtggCTTAATgcacatcaacggtttgacgtac > gttttgtttggcttatcgctggCAAACTgtctgaaatcgcagcaataagg > ggacagttaaccgattcagtgcCAGATTtcgcagtatctacaaggtccgg > tgcggaaaaaacgcgcgcgaggCAGCATtgactttactaggtcgtgcacg > cgtcgcgacctataagtttgggTAATATgtgctggaatttgccctgtctg > atctcaggcctgatttgctgctGATTTTtacaatgcatgcctcacgcagg > ttgaaaagttcatttccagaccCATTTTtacatcgtagccgatgaggacg > agatgtttaccgtggaaaagggTAAAATaacggattaacccaagtataaa > gcatcaggacgttcgctattacTTAAATggtatgctgtttgaaaccgaag > tatgaaatttaccgtagaacgtGAGCATttattaaaaccgctacaacagg > tcagaagacggtggcggagtacTACAAGatcaaagtcgcggatctccttt > gcaggaaaaactggtcaccatcGACAATattcagaagacggtggcggagt > gcgttctttatcgccaagcgtcTACGATctaacgtacgtgagctggaagg > cccgcctcgcggcaggatcgttTACACTtagcgagttctggaaagtcctg > agacaaaaattggcttaatcgaTCTAATaaagatccaggacgatccttgc > ttgcgctttacccatcagcccgTATAATcctccacccggcgcgccatgct > tgactccggagtgtacaattatTACAATccggcctctttaatcacccatg > gttttttcaaggtgaagcggttTAAATTcgttctcaaattacagtcagga > gacaaaaggcgtgacgatggtcGAAAATggcgctttcgtcagcggggata > tggcagtctttctgcctaacgtTTTGTTtatgatatttgcctggcgtcac > ttgaaatcacgggggcgcaccgTATAATttgaccgctttttgatgcttga > gttttcccaactcagtcaggatTAAACTgtgggtcagcgaaacgtttcgc > ttatttttaaaaaacaacaattTATATTgaaattattaaacgcatcataa > ttgccagcccacggtcggtcgaCTTACTgtttagtcagttaaataaactg > ggaaatttattgcggaaattgaTATATTcacaacgtcacattgcaatttt > atatatcaatttccgcaataaaTTTCCTgtcatatagtgaattcaatctc > tcacattcaaatgcgattctgcTACAATcctccccccgttcgaagattga > ggacgcccggcgtgagtcatgcTAACTTagtgttgacttcgtattaaaca > ttacggtcaatcagcaaggtgtTAAATTgatcacgttttagaccattttt > ttggcatctctgacctcgctgaTATAATcagcaaatctgtatatataccc > gaaaaaatgttaaacccttcggTAAAGTgtctttttgcttcttctgacta > tgcatatttttaacacaaaataCACACTtcgactcatctggtacgaccag > gcgctttttatccgtaaaaagcTATAATgcactaaaatggtgcaacctgt > gcaccaacatggtgcttaatgtTTCCATtgaagcactatattggtgcaac > ggtaagaacctgacctcgtgatTACTATttcgccgtgttgacgacatcag > ttttcaatatcatttaattaacTATAATgaaccaactgcttacgcggcat > tctcgtttttgctcgttaacgaTAAGTTtacagcatgcctacaagcatcg > attgacgtccattaacacaatgTTTACTctggtgcctgacatttcaccga > tttcggttgacgcccttcggctTTTCCTtcatctttacatctggacgtct > gttgacacacctctggtcatgaTAGTATcaatattcatgcagtatttatg > tttattacgctcaacgttagtgTATTTTtattcataaatactgcatgaat > gcgctgaaacagtcaaagcggtTATGTTcatatgcggatggcgatttaca > gatagggataatcgttcattgcTATTCTacctatcgccatgaactatcgt > tggacatctgatgagcaatcccTACAATcgccgcgtactttaatttttca > gacagtaacttgttacaacctgTAGCATccacttgccggtcctgtgagtt > tgcatgaactcgcatgtctccaTAGAATgcgcgctacttgatgccgactt > gacgcaatgcgcactaaaagggCATCATttgatgccctttttgcacgctt > tgcacaaggcgtgagattggaaTACAATttcgcgccttttgtttttatgg > ttacgtgggcggtgattttgtcTACAATcttacccccacgtataatgctt > tttgactactgctgtgcctttcAATGCTtgtttctatcgacgacttaata > ttcgcgagcgttgcgcaaacgtTTTCGTtacaatgcgggcgaaaaataag > cgacattggcaaattttctggtTATCTTcagctatctggatgtctaaacg > ttgattttgcattttaaatgagTAGTCTtagttgtgctgaacgaaaagag > accacagatgcgtttatgccagTATGGTttgttgaatttttattaaatct > ttgacaaccgccccgctcacccTTTATTtataaatgtactacctgcgcta > tggaaagaggttgccgtataaaGAAACTagagtccgtttaggtgttttca > tttaagccatctcctgatgacgCATAGTcagcccatcatgaatgttgctg > tccaaaatcgccttttgctgtaTATACTcacagcataactgtatatacac > attcattcaggtcaatttgtgtCATAATtaaccgtttgtgatcgccggta > gaatgcattacccggagtgttgTGTAACaatgtctggccaggtttgtttc > ggtaatggtacaatcgcgcgttTACACTtattcagaacgatttttttcag > acctcaagttaacttgaggaatTATACTccccaacagatgaattaacgaa > ataaaatgtggcataaaagatgCATACTgtagtcgagagcgcgtatgcgt > tgatcacaaatttaaacactggTAGGGTaaaaaggtcattaactgcccaa > agtcatcctccctcactcctgcCATAATtctgatattccaggaaagagag > ctgtgatctattcagcaaaaatTTAAATaggattatcgcgagggttcaca > gtaagcgttagtttcgataagaTAAACTgagttactaatagtcgaggcag > ttgaggtaagcgttagtttcgaTAAGATaaactgagttactaatagtcga > ggattaatccttttttcgtgagTAATCTtatcgccagtttggtctggtca > cggtagaaatcctcaagcagcaTATGATctcgggtattcggtcgatgcag > ttgtcacgctgattggtgtcgtTACAATctaacgcatcgccaatgtaaat > gtcatgaatccatggcagtgacCATACTaatggtgactgccattgatgga > ttttcaaagcgtaaaattgtggCATTCTtcactgttctataagtaagacg > ggcattcacaaatgcgcaggggTAAAACgtttcctgtagcaccgtgagtt > tttcctgtagcaccgtgagttaTACTTTgtataacttaaggaggtgcaga > ttgcgccgcttctgacgatgagTATAATgccggacaatttgccgggagga > gccaccgctttcacagaagtggTAGACTtcgttccttatgaagattctct > taaggaaaataattcttatttcGATTGTcctttttacccttctcgttcga > tggaaacaattttatttccaatTGTAATgataaccattctcatattaata > ggcgtttgtatggcaacgttatTATAATtaacagttgctactccatttaa > gaacatcgatctcgtcttgtgtTAGAATtctaacatacggttgcaacaac > aagtgtgttgcggagtagatgtTAGAATactaacaaactcgcaaggtgaa > tcgccgtatcagcgaataacggTATACTgatctgatcatttaaatttgaa > ttgcttctggcaacattaagtcTCAAATtttcaaagggtggaagatggct > gccagaagcaatggatacaaggTAGCCTcatgcgttattttccctgcttc > ttactgatccgcacgtttatgaTATGCTatcgtactctttagcgagtaca "> </form> </div> <!--close E.coli promoters button--> </div> <!--close E.Col col-sm-6 right container--> </div> <!--close E.Coli Transcription row container--> <div id="padding-div"> <hr> </div> <div class="row" id="globins-hth"> <!--start Globins and HTH Proteins Row Container--> <div class="col-sm-6" id="weblogo-examples"> <!--start Globins Container Col sm 6 left--> <h3>Globins</h3> <a name="globins"></a> <div class="image-div"> <a href="examples/globins.png" data-fluidbox> <img src="examples/globins.png" class="img-responsive" alt="Responsive image"></a> </div> <div class="text-div"> The end of the B helix through the beginning of the D helix of 34 globins. This sequence data was taken from <a href="http://www.lecb.ncifcrf.gov/~toms/paper/logopaper/">Sequence Logos: A New Way to Display Consensus Sequences</a>. </div> <!--end text div--> <div id="spacing-row"> <p></p> </div> <div class="edit-logo-btn" id="globins"> <!--start globins button --> <form method="post" action="create.cgi"> <button class="btn btn-default" type="submit" name="cmd_edit" value="Edit Logo">Edit Logo</button> Globins <input type="hidden" name="logo_start" value="61"> <input type="hidden" name="logo_end" value="83"> <input type="hidden" name="show_xaxis" value="true"> <input type="hidden" name="show_yaxis" value="true"> <input type="hidden" name="show_errorbars" value="true"> <input type="hidden" name="show_fineprint" value="true"> <input type="hidden" name="scale_width" value="true"> <input type="hidden" name="sequences" value=" >Lamprey GLOBIN V - SEA LAMPREY PIVDTGSVA-P------------------LSAAEKTKIRSAWAPVYSTY---ETSGVDILVKFFTSTPAAQEFFPKFKGL TT-----ADQLKKSA---DVRWHA-ERIINAVNDAVASMDDTEKMS--MKL-RDLSGKH----AKSFQV-----DPQYFK VLAAVI-AD-TVAAGD--AGFEKLMSM------I---CILLR----S-----A-----Y------------ >Hagfish GLOBIN III - ATLANTIC HAGFISH PITDHGQPP-T------------------LSEGDKKAIRESWPQIYKNF---EQNSLAVLLEFLKKFPKAQDSFPKFSAK KS-------HLEQDP---AVKLQA-EVIINAVNHTIGLMDKEAAMK--KYL-KDLSTKH----STEFQV-----NPDMFK ELSAVF-VS-TMG-GK--AAYEKLFSI------I---ATLLR----S-----T-----YDA---------- >Frog HEMOGLOBIN BETA CHAIN - EDIBLE FROG ----------GS-----------------------DLVSGFWGKV--DA---HKIGGEALARLLVVYPWTQRYFTTFGNL GSADAIC-----HNA---KVLAHG-EKVLAAIGEGLKHPENLKAHY--AKL-SEYHSNK----LHVDPANFRLLGNVFIT VLARHF-QH-EFTPELQ-HALEAHFCA------V---GDALA----K-----A-----YH----------- >African Elephant HEMOGLOBIN BETA CHAIN - AFRICAN ELEPHANT ----------VN-----------------LTAAEKTQVTNLWGKV--NV---KELGGEALSRLLVVYPWTRRFFEHFGDL STAEAVL-----HNA---KVLAHG-EKVLTSFGEGLKHLDNLKGTF--ADL-SELHCDK----LHVDPENFRLLGNVLVI VLARHF-GK-EFTPDVQ-AAYEKVVAG------V---ANALA----H-----K-----YH----------- >Goat HEMOGLOBIN BETA-A CHAIN - GOAT ----------M------------------LTAEEKAAVTGFWGKV--KV---DEVGAEALGRLLVVYPWTQRFFEHFGDL SSADAVM-----NNA---KVKAHG-KKVLDSFSNGMKHLDDLKGTF--AQL-SELHCDK----LHVDPENFKLLGNVLVV VLARHH-GS-EFTPLLQ-AEFQKVVAG------V---ANALA----H-----R-----YH----------- >Primate HEMOGLOBIN BETA CHAIN - HUMAN, CHIMPANZEES, AND GORILLA ----------VH-----------------LTPEEKSAVTALWGKV--NV---DEVGGEALGRLLVVYPWTQRFFESFGDL STPDAVM-----GNP---KVKAHG-KKVLGAFSDGLAHLDNLKGTF--ATL-SELHCDK----LHVDPENFRLLGNVLVC VLAHHF-GK-EFTPPVQ-AAYQKVVAG------V---ANALA----H-----K-----YH----------- >Gibbon HEMOGLOBIN BETA CHAIN - COMMON GIBBON (TENTATIVE SEQUENCE) ----------VH-----------------LTPEEKSAVTALWGKV--NV---DEVGGEALGRLLVVYPWTQRFFESFGDL STPDAVM-----GNP---KVKAHG-KKVLGAFSDGLAHLDNLKGTF--AQL-SELHCDK----LHVDPENFRLLGNVLVC VLAHHF-GK-EFTPQVQ-AAYQKVVAG------V---ANALA----H-----K-----YH----------- >Dog HEMOGLOBIN BETA CHAIN - DOG AND COYOTE ----------VH-----------------LTAEEKSLVSGLWGKV--NV---DEVGGEALGRLLIVYPWTQRFFDSFGDL STPDAVM-----SNA---KVKAHG-KKVLNSFSDGLKNLDNLKGTF--AKL-SELHCDK----LHVDPENFKLLGNVLVC VLAHHF-GK-EFTPQVQ-AAYQKVVAG------V---ANALA----H-----K-----YH----------- >Horse HEMOGLOBIN BETA CHAIN - HORSE ----------VQ-----------------LSGEEKAAVLALWDKV--NE---EEVGGEALGRLLVVYPWTQRFFDSFGDL SNPGAVM-----GNP---KVKAHG-KKVLHSFGEGVHHLDNLKGTF--AAL-SELHCDK----LHVDPENFRLLGNVLVV VLARHF-GK-DFTPELQ-ASYQKVVAG------V---ANALA----H-----K-----YH----------- >Human, Chimp HEMOGLOBIN GAMMA CHAINS - HUMAN AND CHIMPANZEE ----------GH-----------------FTEEDKATITSLWGKV--NV---EDAGGETLGRLLVVYPWTQRFFDSFGNL SSASAIM-----GNP---KVKAHG-KKVLTSLGDAIKHLDDLKGTF--AQL-SELHCDK----LHVDPENFKLLGNVLVT VLAIHF-GK-EFTPEVQ-ASWQKMVTA------V---ASALS----S-----R-----YH----------- >Nile Crocodile HEMOGLOBIN BETA CHAIN - NILE CROCODILE ----------AS-----------------FDPHEKQLIGDLWHKV--DV---AHCGGEALSRMLIVYPWKRRYFENFGDI SNAQAIM-----HNE---KVQAHG-KKVLASFGEAVCHLDGIRAHF--ANL-SKLHCEK----LHVDPENFKLLGDIIII VLAAHY-PK-DFGLECH-AAYQKLVRQ------V---AAALA----A-----E-----YH----------- >Chicken HEMOGLOBIN BETA CHAIN - CHICKEN ----------VH-----------------WTAEEKQLITGLWGKV--NV---AECGAEALARLLIVYPWTQRFFASFGNL SSPTAIL-----GNP---MVRAHG-KKVLTSFGDAVKNLDNIKNTF--SQL-SELHCDK----LHVDPENFRLLGDILII VLAAHF-SK-DFTPECQ-AAWQKLVRV------V---AHALA----R-----K-----YH----------- >NA Opossum HEMOGLOBIN BETA CHAIN - NORTH AMERICAN OPOSSUM ----------VH-----------------LTSEEKNCITTIWSKV--QV---DQTGGEALGRMLVVYPWTTRFFGSFGDL SSPGAVM-----SNS---KVQAHG-AKVLTSFGEAVKHLDDLKGTY--AKL-SELHCDK----LHVDPENFKMLG-IIVI CLAEHF-GK-DFTPECV-A--WKLVAG------V---AHALA----H-----K-----YH----------- >Carp HEMOGLOBIN BETA CHAINS - CARP ----------VE-----------------WTDAERSAIIALWGKL--NP---DELGPEALARCLIVYPWTQRFFASYGNL SSPAAIM-----GNP---KVAAHG-RTVEGGLMRAIKDMDNIKATY--APL-SVMHSEK----LHVDPDNFRLLADCITV CAAMKFGPS-GFSPNVQ-EAWQKFLSV------V---VNALK----R-----Q-----YH----------- >Shark HEMOGLOBIN BETA CHAIN - PORT JACKSON SHARK ----------VH-----------------WSEVELHEITTTWKSI--DK---HSLGAKALARMFIVYPWTTRYFGNLKEF TA----------CSY---GVKEHA-KKVTGALGVAVTHLGDVKSQF--TDL-SKKHAEE----LHVDVESFKLLAKCFVV ELGILL-KD-KFAPQTQ-AIWEKYFGV------V---VDAIS----K-----E-----YH----------- >Shark HEMOGLOBIN ALPHA CHAIN - PORT JACKSON SHARK ----------S-TSTSTSD----------YSAADRAELAALSKVLAQNA---EAFGAEALARMFTVYAATKSYFKDYKDF TA----------AAP---SIKAHG-AKVVTALAKACDHLDDLKTHL--HKL-ATFHGSE----LKVDPANFQYLSYCLEV ALAVHL--T-EFSPETH-CALDKFLTN------V---CHELS----S-----R-----YR----------- >Carp HEMOGLOBIN ALPHA CHAIN - CARP ----------S------------------LSDKDKAAVKIAWAKISPKA---DDIGAEALGRMLTVYPQTKTYFAHWADL SP----------GSG---PVKHGK-KVIMGAVGDAVSKIDDLVGGL--ASL-SELHASK----LRVDPANFKILANHIVV GIMFYL-PG-DFPPEVH-MSVDKFFQN------L---ALALS----E-----K-----YR----------- >Bullfrog HEMOGLOBIN ALPHA CHAIN - BULLFROG TADPOLE ----------S------------------LSASEKAAVLSIVGKIGSQG---SALGSEALTRLFLSFPQTKTYFPHF-DL TP----------GSA---DLNTHG-GKIINALAGAANHLDDLAGNL--SSL-SDLHAYN----LRVDPGNFPLLAHIIQV VLATHF-PG-DFTAEVQ-AAWDKFLAL------V---SAVLT----S-----K-----YR----------- >Nile Crocodile HEMOGLOBIN ALPHA CHAIN - NILE CROCODILE ----------V------------------LSSDDKCNVKAVWSKVAGHL---EEYGAEALERMFCAYPQTKIYFPHF-DL SH----------GSA---QIRAHG-KKVFAALHEAVNHIDDLPGAL--CRL-SELHAHS----LRVDPVNFKFLAQCVLV VVAIHH-PG-SLTPEVH-ASLDKFLCA------V---SSVLT----S-----K-----YR----------- >Ostrich HEMOGLOBIN ALPHA CHAIN - OSTRICH ----------V------------------LSGTDKTNVKGIFSKISSHA---EEYGAETLERMFITYPQTKTYFPHF-DL HH----------GSA---QIKAHG-KKVANALIEAVNHIDDISGAL--SKL-SDLHAQK----LRVDPVNFKLLGQCFLV VVAIHH-PS-ALTPEVH-ASLDKFLCA------V---GAVLT----A-----K-----YR----------- >Kangaroo HEMOGLOBIN ALPHA CHAIN - EASTERN GRAY KANGAROO ----------V------------------LSAADKGHVKAIWGKVGGHA---GEYAAEGLERTFHSFPTTKTYFPHF-DL SH----------GSA---QIQAHG-KKIADALGQAVEHIDDLPGTL--SKL-SDLHAHK----LRVDPVNFKLLSHCLLV TFAAHL-GD-AFTPEVH-ASLDKFLAA------V---STVLT----S-----K-----YR----------- >Armadillo HEMOGLOBIN ALPHA CHAIN - NINE-BANDED ARMADILLO ----------V------------------LSAADKTHVKAFWGKVGGHA---AEFGAEALERMFASFPPTKTYFSHM-DL SH----------GSA---QVKAHG-KKVADALTLAVGHLDDLPGAL--STL-SDLHAHK----LRVDPVNFKFLSHCLLV TLACHL-PD-DFTPAVH-ASMDKFMAG------V---STVLV----S-----K-----YR----------- >Horse HEMOGLOBIN ALPHA CHAINS - HORSE ----------V------------------LSAADKTNVKAAWSKVGGHA---GEYGAEALERMFLGFPTTKTYFPHF-DL SH----------GSA---QVKAHG-KKVGDALTLAVGHLDDLPGAL--SNL-SDLHAHK----LRVDPVNFKLLSHCLLS TLAVHL-PN-DFTPAVH-ASLDKFLSS------V---STVLT----S-----K-----YR----------- >Primate HEMOGLOBIN ALPHA CHAIN - HUMAN AND CHIMPANZEES ----------V------------------LSPADKTNVKAAWGKVGAHA---GEYGAEALERMFLSFPTTKTYFPHF-DL SH----------GSA---QVKGHG-KKVADALTNAVAHVDDMPNAL--SAL-SDLHAHK----LRVDPVNFKLLSHCLLV TLAAHL-PA-EFTPAVH-ASLDKFLAS------V---STVLT----S-----K-----YR----------- >Macaque HEMOGLOBIN ALPHA CHAIN - RHESUS MACAQUE AND JAPANESE MACAQUE ----------V------------------LSPADKSNVKAAWGKVGGHA---GEYGAEALERMFLSFPTTKTYFPHF-DL SH----------GSA---QVKGHG-KKVADALTLAVGHVDDMPNAL--SAL-SDLHAHK----LRVDPVNFKLLSHCLLV TLAAHL-PA-EFTPAVH-ASLDKFLAS------V---STVLT----S-----K-----YR----------- >Badger HEMOGLOBIN ALPHA CHAIN - EURASIAN BADGER ----------V------------------LSPADKANIKATWDKIGGHA---GEYGGEALERTFASFPTTKTYFPHF-DL SH----------GSA---QVKGHG-KKVADALTNAVAHLDDLPGAL--SAL-SDLHAYK----LRVDPVNFKLLSHCLLV TLACHH-PA-EFTPAVH-ASLDKFLSS------V---STVLT----S-----K-----YR----------- >Ind Elephant HEMOGLOBIN ALPHA CHAIN - INDIAN ELEPHANT ----------V------------------LSDKDKTNVKATWSKVGDHA---SDYVAEALERMFFSFPTTKTYFPHF-DL SH----------GSG---QVKGHG-KKVGEALTQAVGHLDDLPSAL--SAL-SDLHAHK----LRVDPVNFKLLSHCLLV TLSSHQ-PT-EFTPEVH-ASLDKFLSN------V---STVLT----S-----K-----YR----------- >Hyrax HEMOGLOBIN ALPHA CHAIN - ABYSSINIAN HYRAX ----------V------------------LSAADKNNVKGAWEKVGTHA---GEYGAEALERMFLSFPTTKTYFPHF-DL TH----------GSA---QVKAHG-QKVGAALTKAVGHLDDLPNAL--SDL-SDLHAHK----LRVDPVNFKLLSHCLLV TLSRHL-PEQEFTPAVH-ASLDKFFSN------V---STVLT----S-----K-----YR----------- >Tuna MYOGLOBIN - YELLOWFIN TUNA ----------A----------------------DFDAVLKCWGPVEADY---TTMGGLVLTRLFKEHPETQKLFPKFAGI -A-----QADIAGNA---AISAHG-ATVLKKLGELLKAKGSHAAIL--KPL-ANSHATK----HKIPINNFKLISEVLVK VMHEK---A-GLDAGGQ-TALRNVMGI------I---IADLE----ANYKELG-----FSG---------- >Shark MYOGLOBIN - PORT JACKSON SHARK ----------T----------------------EWEHVNKVWAVVEPDI---PAVGLAILLRLFKEHKETKDLFPKFKEI -P-----VQQLGNNE---DLRKHG-VTVLRALGNILKQKGKHSTNV--KEL-ADTHINK----HKIPPKNFVLITNIAVK VLTEMY-PS-DMTGPMQ-ESFSKVFTV------I---CSDLE----TLYKEAN-----FQG---------- >Turtle MYOGLOBIN - MAP TURTLE ----------G------------------LSDDEWHHVLGIWAKVEPDL---SAHGQEVIIRLFQVHPETQERFAKFKNL KT-----IDELRSSE---EVKKHG-TTVLTALGRILKLKNNHEPEL--KPL-AESHATK----HKIPVKYLEFICEIIVK VIAEKH-PS-DFGADSQ-AAMRKALEL------F---RNDMA----SKYKEFG-----FQG---------- >Chicken MYOGLOBIN - CHICKEN ----------G------------------LSDQEWQQVLTIWGKVEADI---AGHGHEVLMRLFHDHPETLDRFDKFKGL KT-----EPDMKGSE---DLKKHG-QTVLTALGAQLKKKGHHEADL--KPL-AQTHATK----HKIPVKYLEFISEVIIK VIAEKH-AA-DFGADSQ-AAMKKALEL------F---RDDMA----SKYKEFG-----FQG---------- >Dog MYOGLOBIN - DOG, BAT-EARED FOX, AFRICAN HUNTING DOG, AND CAPE FOX ----------G------------------LSDGEWQIVLNIWGKVETDL---AGHGQEVLIRLFKNHPETLDKFDKFKHL KT-----EDEMKGSE---DLKKHG-NTVLTALGGILKKKGHHEAEL--KPL-AQSHATK----HKIPVKYLEFISDAIIQ VLQSKH-SG-DFHADTE-AAMKKALEL------F---RNDIA----AKYKELG-----FQG---------- >Badger MYOGLOBIN - EURASIAN BADGER ----------G------------------LSDGEWQLVLNVWGKVEADL---AGHGQEVLIRLFKGHPETLEKFDKFKHL KS-----EDEMKGSE---DLKKHG-NTVLTALGGILKKKGHQEAEL--KPL-AQSHATK----HKIPVKYLEFISDAIAQ VLQSKH-PG-NFAAEAQ-GAMKKALEL------F---RNDIA----AKYKELG-----FQG---------- >Dolphin MYOGLOBIN - SADDLEBACK DOLPHIN ----------G------------------LSDGEWQLVLNVWGKVEADV---AGHGQDILIRLFKGHPETLEKFDKFKHL KT-----EADMKASE---DLKKHG-DTVLTALGAILKKKGHHDAEL--KPL-AQSHATK----HKIPIKYLEFISEAIIH VLHSRH-PA-QFGADAQ-GAMNKALEL------F---RKDIA----AKYKELG-----FHG---------- >Horse, Zebra MYOGLOBIN - HORSE AND PLAINS ZEBRA ----------G------------------LSDGEWQQVLNVWGKVEADI---AGHGQEVLIRLFTGHPETLEKFDKFKHL KT-----EAEMKASE---DLKKHG-TVVLTALGGILKKKGHHEAEL--KPL-AQSHATK----HKIPIKYLEFISDAIIH VLHSKH-PG-NFGADAQ-GAMTKALEL------F---RNDIA----AKYKELG-----FQG---------- >African Elephant MYOGLOBIN - AFRICAN ELEPHANT ----------G------------------LSDGEWELVLKTWGKVEADI---PGHGEFVLVRLFTGHPETLEKFDKFKHL KT-----EGEMKASE---DLKKQG-VTVLTALGGILKKKGHHEAEI--QPL-AQSHATK----HKIPIKYLEFISDAIIH VLQSKH-PA-EFGADAQ-AAMKKALEL------F---RNDIA----AKYKELG-----FQG---------- >Aardvark MYOGLOBIN - AARDVARK ----------G------------------LSDAEWQLVLNVWGKVEADI---PGHGQDVLIRLFKGHPETLEKFDRFKHL KT-----EDEMKASE---DLKKHG-TTVLTALGGILKKKGQHEAEI--QPL-AQSHATK----HKIPVKYLEFISEAIIQ VIQSKH-SG-DFGADAQ-GAMSKALEL------F---RNDIA----AKYKELG-----FQG---------- >Human MYOGLOBIN - HUMAN ----------G------------------LSDGEWQLVLNVWGKVEADI---PGHGQEVLIRLFKGHPETLEKFDKFKHL KS-----EDEMKASE---DLKKHG-ATVLTALGGILKKKGHHEAEI--KPL-AQSHATK----HKIPVKYLEFISECIIQ VLQSKH-PG-DFGADAQ-GAMNKALEL------F---RKDMA----SNYKELG-----FQG---------- >Macaque MYOGLOBIN - CRAB-EATING MACAQUE (TENTATIVE SEQUENCE) ----------G------------------LSDGEWQLVLNVWGKVEADI---PSHGQEVLIRLFKGHPETLEKFDKFKHL KS-----EDEMKASE---DLKKHG-VTVLTALGGILKKKGHHEAEI--KPL-AQSHATK----HKIPVKYLELISESIIQ VLQSKH-PG-DFGADAQ-GAMNKALEL------F---RNDMA----AKYKELG-----FQG---------- >NA Opossum MYOGLOBIN - NORTH AMERICAN OPOSSUM ----------G------------------LSDGEWQLVLNAWGKVEADI---PGHGQEVLIRLFKGHPETLEKFDKFKHL KS-----EDEMKASE---DLKKHG-ATVLTALGNILKKKGNHEAEL--KPL-AQSHATK----HKISVQFLEFISEAIIQ VIQSKH-PG-DFGGDAQ-AAMGKALEL------F---RNDMA----AKYKELG-----FQG---------- >Earthworm GLOBIN AIII - COMMON EARTHWORM ---------KK------------------QCGVLEGLKVKSEWGRAYGS---GHDREAFSQAIWRATFAQVPESRSLFKR VH-----GDH-TSDP---AFIAHA-ERVLGGLDIAISTLDQPATLK--EEL-DHLQVQHEG--RKIPDNYFDAFKTAILH VVAAQL-GE-RCYSNN--EEIHDAIACDGFARVL---PQVLE----R-----G-----IKGHH-------- > SMALL CHAIN - TYLORRHYNCHUS HETEROCHAETUS ----------T------------------DCGILQRIKVKQQWAQVYSV---GESRTDFAIDVFNNFFRTNPD-RSLFNR VN-----GDN-VYSP---EFKAHM-VRVFAGFDILISVLDDKPVLD--QAL-AHYAAFH----KQFGTIPFKAFGQTMFQ TIAEHI--------HG--ADIGAWRAC------Y---AEQIV----T-----G-----ITA---------- >BloodwormGLOBIN, MAJOR MONOMERIC COMPONENT - BLOODWORM ----------G------------------LSAAQRQVIAATWKDIAGND---NGAGVGKDCLI--KHLSAHPQMAAVFGF SG-----ASD-PAVA---DLGAKV-LAIGVAVSHLGDGKMVAQMKA--VGV-RHKGYGN----KHIKGQYFEPLGASLLS AMEHRI-GG-KMNAAA-KDAWAAAYAD------I---SGALI----S-----G-----LQS---------- >Whelk GLOBIN - WHELK ----------G------------------LDGAQKTALKESWKVLGADGPTMMKNGSLLFGLLFKTYPDTKKHFKHFDDA TF-----AAM-DTTG---VGKAHG-VAVFSGLGSMICSIDDDDCV---GLA-KKLSRNH--LARGVSAADF-KLLEAVFK FLDEAT-QR-KATDAQ-KDADGALLTM------L---IKA------------H-----V------------ >Snail GLOBIN - WATER SNAIL ----------S------------------LQPASKSALASSWKTLAKDAATIQNNGATLFSLLFKQFPDTRNYFTHFGNM SD-----AEM-KTTG---VGKAHS-MAVFAGIGSMIDSMDDADCMN--GLA-LKLSRNH--IQRKIGASRFGEMRQVFPN FLDEAL-GG-GASGDV-KGAWDALLAY------LQDNKQA------------Q-----A----L------- >Clam GLOBIN I - BLOOD CLAM ----------P--------SVQGAAAQ--LTADVKKDLRDSWKVIGSDK---KGNGVALMTTLFADNQETIGYFKRLGNV SQ-----GM---AND---KLRGHS-ITLMYALQNFIDQLDNTDDLV--CVV-EKFAVNH--ITRKISAAEFGKINGP--- -IKKVL-AS-KNFGDK-YANAWAKLVA------V---VQA------------A-----L------------ >Midge larvaGLOBIN CTT-II BETA - MIDGE LARVA ----------A------------------PLSADEASLV---RGSWAQV---KHSEVDILYYIFKANPDIMAKFPQFAGK DL-----ETL-KGTGQFATHAGRI-VGFVSEIVALMGNSANMPAME--TLI-KDMAANH--KARGIPKAQFNEFRASLVS YLQSKV----SWNDSL-GAAWTQGLDN------V---FNMMF----S-----Y-----L------------ >Midge larva GLOBINS CTT-I AND CTT-IA - MIDGE LARVA ----------G------------------P-SGDQIAAA---KASWNTV---KNNQVDILYAVFKANPDIQTAFSQFAGK DL-----DSI-KGTPDFSKHAGRV-VGLFSEVMDLLGNDANTPTIL--AKA-KDFGKSH--KSRASP-AQLDNFRKSLVV YLKGAT----KWDSAV-ESSWAPVLDF------V---FSTLK----N-----E-----L------------ >Bacteria BACTERIAL HEMOGLOBIN - VITREOSCILLA SP -----------------------------MLDQQTINII---KATVPVL---KEHGVTITTTFYKNLFAKHPEVRPLFDM GR-----Q---ESLEQ-------P-KALAMTVLAAAQNIENLPAIL--PAV-KKIAVKH--CQAGVAAAHYPIVGQELLG AIKEVL-GD-AATDDI-LDAWGKAYGV------I---ADVFI----Q-----VEADLYA-----Q-AVE-- >P andersonii ONLEGUME HEMOGLOBIN I - PARASPONIA ANDERSONII ----------V----------------NKVFTEEQEALV---VKAWAVM---KKNSAELGLQFLK-IFEIAPSAKNLFSY LK-----DSP-VPLEQNPKLKPHA-TTFVMTTESAVQLRKAGKVTVK-ESDLKRIGAIH--FKTGVVNEHFEVTRFALLE TIKEAV-PE-MWSPEM-KNAWGVAYDQ------L---VAAIK----F-----E-----M-----KPSST-- >Yellow Lupin LEGHEMOGLOBIN I - YELLOW LUPIN ----------G------------------VLTDVQVALV---KSSFEEF---NANIPKNTHRFFTLVLEIAPGAKDLFSF LK-----GSS-EVPQNNPDLQAHAGKVFKLTYEAAIQLEVNGAVAS--DATLKSLGSVH--VSKGVVDAHFPVVKEAILK TIKEVV-GD-KWSEEL-NTAWTIAYDE------L---AIIIK----K-----E-----M-----K-DAA-- >Garden Pea LEGHEMOGLOBIN I - GARDEN PEA ----------G-------------------FTDKQEALV---NSSSE-F---KQNLPGYSILFYTIVLEKAPAAKGLFSF LK-----DTA-GVE-DSPKLQAHAEQVFGLVRDSAAQLRTKGEVVL-GNATL---GAIH--VQKGVTNPHFVVVKEALLQ TIKKAS-GN-NWSEEL-NTAWEVAYDG------L---ATAIKKAMKT---------------------A-- >Broad Bean LEGHEMOGLOBIN I - BROAD BEAN ----------G-------------------FTEKQEALV---NSSSQLF---KQNPSNYSVLFYTIILQKAPTAKAMFSF LK-----DSA-GVV-DSPKLGAHAEKVFGMVRDSAVQLRATGEVVL--DGKD---GSIH--IQKGVLDPHFVVVKEALLK TIKEAS-GD-KWSEEL-SAAWEVAYDG------L---ATAIK----A---------------------A-- >Soybean LEGHEMOGLOBIN C1 - SOYBEAN ----------G------------------AFTEKQEALV---SSSFEAF---KANIPQYSVVFYNSILEKAPAAKDLFSF LA-----NGV-DPT--NPKLTGHAEKLFALVRDSAGQLKTNGTVVA--DAAL---VSIH--AQKAVTDPQFVVVKEALLK TIKEAV-GG-NWSDEL-SSAWEVAYDE------L---AAAIK----K---------------------A-- >Kidney Bean LEGHEMOGLOBIN A - KIDNEY BEAN ----------G------------------AFTEKQEALV---NSSWEAF---KGNIPQYSVVFYTSILEKAPAAKNLFSF LA-----NGV-DPT--NPKLTAHAESLFGLVRDSAAQLRANGAVVA--DAAL---GSIH--SQKGVSNDQFLVVKEALLK TLKQAV-GD-KWTDQL-STALELAYDE------L---AAAIK----K---------------------AYA "> </form> </div> <!--close globins button--> </div> <!--close globin container col sm 6 left--> <div class="col-sm-6" id="weblogo-examples"> <a name="HTH"></a> <!--start globin-HTH column sm 6 right container --> <h3>HTH Proteins</h3> <div class="image-div"> <a href="examples/hth.png" data-fluidbox> <img src="examples/hth.png" class="img-responsive" alt="Responsive image"> </div> <div class="text-div"> <!--start text div--> Helix-Turn-Helix DNA binding motifs found by the Gibbs sampling system. Compared to the <a href="#CAP_HTH">CAP HTH logo</a> there is much less sequence conservation within the DNA binding helix (11-17), as might be expected for a diverse sample of proteins. </div> <!--close text div--> <div class="edit-logo-btn" id="hth"> <!--start HTH button section--> <form method="post" action="create.cgi"> <button class="btn btn-default" type="submit" name="cmd_edit" value="Edit Logo">Edit Logo</button> HTH Proteins <input type="hidden" name="logo_title" value="Helix-Turn-Helix Motifs"> <input type="hidden" name="stack_width" value="large"> <input type="hidden" name="first_index" value="-11"> <input type="hidden" name="logo_start" value="1"> <input type="hidden" name="logo_end" value="17"> <input type="hidden" name="yaxis_scale" value="2.0"> <input type="hidden" name="show_xaxis" value="true"> <input type="hidden" name="show_yaxis" value="true"> <input type="hidden" name="show_errorbars" value="true"> <input type="hidden" name="show_fineprint" value="true"> <input type="hidden" name="scale_width" value="true"> <input type="hidden" name="sequences" value=">A25944 DNA-directed RNA polymerase sigma-37 chain - Bacillu 223-240 iidltyiqnk SQKETGDILGISQMHVSR lqrkavkklr >A28627 spoIIIC protein - Bacillus subtilis 94-111 rfgldlkkek TQREIAKELGISRSYVSR iekralmkmf >A32837 *Transcriptional activator nahR - Pseudomonas putida 22-39 vvfnqllvdr RVSITAENLGLTQPAVSN alkrlrtslq >A23450 Antennapedia homeotic protein - Fruit fly (Drosophil 326-343 fhfnryltrr RRIEIAHALCLTERQIKI wfqnrrmkwk >B26499 Regulatory protein ntrC - Bradyrhizobium sp. 449-466 ltaalaatrg NQIRAADLLGLNRNTLRK kirdldiqvy >BVECDA dicA protein - Escherichia coli | 1551.0 1.0 1.0 1.0 22-39 iryrrknlkh TQRSLAKALKISHVSVSQ wergdseptg >C29010 Mercuric resistance operon regulatory merD protein - 5-22 ------mnay TVSRLALDAGVSVHIVRD yllrgllrpv >DNECFS DNA-binding protein fis - Escherichia coli | 928.0 1 73-90 ldmvmqytrg NQTRAALMMGINRGTLRK klkkygmn-- >JEBY1 Mating hormone a1 - Yeast (Saccharomyces cerevisiae) 99-116 frrkqslnsk EKEEVAKKCGITPLQVRV wfinkrmrsk >QCBP2L Regulatory protein cII - Phage lambda | 1559.0 2.0 1 25-42 sallnkiaml GTEKTAEAVGVDKSQISR wkrdwipkfs >QRECC cAMP receptor protein (CAP) - Escherichia coli | 1507 169-186 thpdgmqiki TRQEIGQIVGCSRETVGR ilkmledqnl >RCBPL Regulatory protein cro - Phage lambda | 1555.0 1.0 1. 15-32 itlkdyamrf GQTKTAKDLGVYQSAINK aihagrkifl >RGBP22 Regulatory protein cro - Phage P22 | 1556.0 1.0 1.0 12-29 ykkdvidhfg TQRAVAKALGISDAAVSQ wkevipekda >RGECA Arabinose operon regulatory protein - Escherichia col 196-213 isdhladsnf DIASVAQHVCLSPSRLSH lfrqqlgisv >RGECF Regulatory protein fnr - Escherichia coli | 1507.0 1. 196-213 fsprefrltm TRGDIGNYLGLTVETISR llgrfqksgm >RGECH Heat shock regulatory protein - Escherichia coli | 30 252-269 arwldednks TLQELADRYGVSAERVRQ leknamkklr >RGKBCP Nitrogen assimilation regulatory protein - Klebsiell 444-461 lttalrhtqg HKQEAARLLGWGRNTLTR klkelgme-- >RPECCT cyt repressor - Escherichia coli | 1291.0 3.0 1.0 1. 11-28 mkakkqetaa TMKDVALKAKVSTATVSR almnpdkvsq >RPECDO Deo operon repressor - Escherichia coli | 1536.0 1.0 23-40 lqelkrsdkl HLKDAAALLGVSEMTIRR dlnnhsapvv >RPECG gal repressor - Escherichia coli | 1291.0 4.0 1.0 1.0 3-20 --------ma TIKDVARLAGVSVATVSR vinnspkase >RPECL lac repressor - Escherichia coli | 1291.0 2.0 1.0 1.0 5-22 ------mkpv TLYDVAEYAGVSYQTVSR vvnqashvsa >RPECTN TetR repressor - Escherichia coli transposon Tn10 | 26-43 llnevgiegl TTRKLAQKLGVEQPTLYW hvknkralld >RPECW trp repressor - Escherichia coli | 1534.0 1.0 1.0 1.0 67-84 iveellrgem SQRELKNELGAGIATITR gsnslkaapv >S02513 Regulatory protein nifA - Klebsiella pneumoniae 495-512 liaalekagw VQAKAARLLGMTPRQVAY riqimditmp >S07337 *spoIIG protein - Bacillus subtilis 205-222 rfglvgeeek TQKDVADMMGISQSYISR lekriikrlr >S07958 *DNA-invertase - Escherichia coli 160-177 qagrliaagt PRQKVAIIYDVGVSTLYK tfpagdk--- >S08477 Regulatory protein purR - Escherichia coli 3-20 -------ma TIKDVAKRANVSTTTVSH vinktrfvae- >S09205 *ebgR protein - Escherichia coli 3-20 --------ma TLKDIAIEAGVSLATVSR vlnddptlnv >S11945 *lexA repressor - Escherichia coli 27-44 dhisqtgmpp TRAEIAQRLGFRSPNAAE ehlkalarkg >Z1BPC2 Regulatory protein cI - Phage P22 | 1559.0 1.0 1.0 1 25-42 ssilnriair GQRKVADALGINESQISR wkgdfipkmg "> </form> </div> <!--close HTH button function--> </div> <!--close globin-HTH column 6 right container--> </div> <!--close Globins and HTH Proteins Row Container--> <div id="padding-div"> <hr> </div> <div class="row" id="weblogo-examples"> <a name="splice"></a> <!--Human Splice Site Row Container--> <div class="col-sm-12"> <h3>Human Splice Sites</h3> <div class="text-div"> <!--start text div--> These logos show a small sample of Human intron-exon splice boundaries. Sequences of experimentally confirmed genes were extracted from EID: the Exon-Intron database. <p></p> Additional discussion of the features in this logo can be found in the paper <a href="http://www.lecb.ncifcrf.gov/~toms/paper/splice/"> Features of spliceosome evolution...</a> </div> <!--close text div--> <div class="row" id="padding-div"> <p></p> </div> </div> <!--close col-sm-12 container--> <div id="padding-div"> <hr> </div> <div class="col-sm-6"> <!--human splice site exon|intron column left--> <div class="image-div"> <a href="examples/exon-intron.png" data-fluidbox> <img src="examples/exon-intron.png" class="img-responsive" alt="exon-intron image"></a> </div> <div class="edit-logo-btn"> <!-- exon|intron button start--> <form method="post" action="create.cgi"> <button class="btn btn-default" type="submit" name="cmd_edit" value="Edit Logo">Edit Logo</button> Exon-Intron (Donor) Sites <input type="hidden" name="logo_title" value="exon | intron"> <input type="hidden" name="stack_width" value="large"> <input type="hidden" name="first_index" value="-11"> <input type="hidden" name="logo_start" value="-6"> <input type="hidden" name="logo_end" value="8"> <input type="hidden" name="show_xaxis" value="true"> <input type="hidden" name="show_yaxis" value="true"> <input type="hidden" name="show_errorbars" value="true"> <input type="hidden" name="show_fineprint" value="true"> <input type="hidden" name="scale_width" value="true"> <input type="hidden" name="sequences" value=" > 19082_AF115399 GGATCGACCCTgtaagtttt > 45328_AB000381 GCGCGCTCAGTgtaagtatc > 45328_AB000381 AATCTCCATTCgtaagtacc > 45330_AB001517 ACTGGACGCTGgtaaggact > 45331_AB001517 TCGCTTACCGGgtgagcgcg > 45331_AB001517 GACCTTAAAAAgtaagtatg > 45331_AB001517 CGTCGATGAAGgtacttgcc > 45331_AB001517 CCTGATGGCAGgtaaggggg > 45331_AB001517 GATGACTCCAGgtgcggcct > 45331_AB001517 ACAGCCTGGACgtatgtccc > 45331_AB001517 CGGCTGGCCAAgtaggtctc > 45331_AB001517 CACTCCCTGAGgtaagcctt > 45331_AB001517 TGGCTGTTCAGgtttgtccc > 45331_AB001517 ACGACGGCAAGgtaggctcc > 45331_AB001517 GACCTTCACAGgtgatgttt > 45331_AB001517 GGCTCCTTGATgtaagcacc > 45331_AB001517 GACCTCTGATGgtgagcacg > 45331_AB001517 GCCAAGGGGAAgtgagtgtc > 45331_AB001517 ACGCCATGGAGgtgagccgc > 45331_AB001517 CGTCAGGAAAGgtgagcaga > 45331_AB001517 CTCTCCCACTGgtgagcact > 45331_AB001517 CAGGGGCGAGAgtgagttgg > 45331_AB001517 CTGAAGTCCAGgtagagggt > 45331_AB001517 CTGTCGAAACTgtacgtgtg > 45332_AB001517 GGGTCGCGCTGgtgagtgga > 45332_AB001517 GAGGCCTCGGCgtaagtcct > 45332_AB001517 GGCGAGAGCAGgtgtggggg > 45332_AB001517 GCTAAAAACCTgtgcgtatt > 45332_AB001517 AAGCCCATCGGgtgtgtaca > 45333_AB001517 GGGTCGCGCTGgtgagtgga > 45333_AB001517 GAGGCCTCGGCgtaagtcct > 45333_AB001517 GGCGAGAGCAGgtgtggggg > 45333_AB001517 GCTAAAAACCTgtgcgtatt > 45334_AB001523 CATCGTCACCTgtgagtgcc > 45334_AB001523 GAATGGAGAAGgtatgagtt > 45334_AB001523 CAGAGTGCTGTgtgagtacc > 45334_AB001523 CAGAGTGACAGgtaagtgta > 45334_AB001523 TCATGGTTCAGgtacttgac > 45334_AB001523 CGGGGCCGGGGgtgagtagt > 45334_AB001523 AGCTCTTAGAAgtgagtcgg > 45334_AB001523 CCACAGAAAAGgtgcctacc > 45334_AB001523 ACCAGAAACAGgtacttttt > 45334_AB001523 AACACTACTTAgtaagtatt > 45334_AB001523 GAGTTTTACATgtaattgat > 45334_AB001523 CAAATTGAAAAgtatccttt > 45334_AB001523 AGACAGCCCAGgtaagacca > 45334_AB001523 TCAGGACTCAGgtatgcgtt > 45334_AB001523 GCCGCTGGCTGgtgagtggg > 45334_AB001523 CAACACGAGAGgtgaggtgc > 45334_AB001523 CAGACCACAAAgtgagtagg > 45334_AB001523 TCAGGAACACGgtaacggag > 45334_AB001523 AGTCCCAGCAGgtaaacatt > 45334_AB001523 AAAATTTTTTTgtaagtgat > 45334_AB001523 TATGTATGAAGgtaggtggt > 45334_AB001523 ACTGGACGCTGgtaaggact > 45335_AB001523 TCGCTTACCGGgtgagcgcg > 45337_AB00189S TGTGGTACCTGgtgagtagg > 45337_AB00189S CCCCAAATTATgtaagtcaa > 45337_AB00189S AATGAAAATAAgtacgtcac > 45338_AB00189S TGTGGTACCTGgtgagtagg > 45338_AB00189S CCCCAAATTATgtaagtcaa > 45338_AB00189S AATGAAAATAAgtacgtcac > 45338_AB00189S GGAGAAGCAAGgtcagtggc > 45339_AB00189S TGTGGTACCTGgtgagtagg > 45339_AB00189S CCCCAAATTATgtaagtcaa > 45339_AB00189S AATGAAAATAAgtacgtcac > 45339_AB00189S GGAGAAGCAAGgtcagtggc > 45340_AB00189S TGTGGTACCTGgtgagtagg > 45340_AB00189S CCCCAAATTATgtaagtcaa > 45340_AB00189S AATGAAAATAAgtacgtcac > 45341_AB00189S TGTGGTACCTGgtgagtagg > 45341_AB00189S CCCCAAATTATgtaagtcaa > 45341_AB00189S AATGAAAATAAgtacgtcac > 45341_AB00189S AAGACCAGCAGgtaatgcat > 45342_AB00189S TGTGGTACCTGgtgagtagg > 45342_AB00189S CCCCAAATTATgtaagtcaa > 45342_AB00189S AATGAAAATAAgtacgtcac > 45342_AB00189S AGATTACACAGgtaatgagc > 45342_AB00189S AAGACCAGCAGgtaatgcat > 45342_AB00189S GTGTGTCGAAGgtacggtcc > 45342_AB00189S GTGCAGCAACGgtgagcagc > 45343_AB00189S TGTGGTACCTGgtgagtagg > 45343_AB00189S CCCCAAATTATgtaagtcaa > 45343_AB00189S AATGAAAATAAgtacgtcac > 45343_AB00189S AAGACCAGCAGgtaatgcat > 45343_AB00189S GTGTGTCGAAGgtacggtcc > 45343_AB00189S GTGCAGCAACGgtgagcagc > 45344_AB00189S TGTGGTACCTGgtgagtagg > 45344_AB00189S CCCCAAATTATgtaagtcaa > 45344_AB00189S AATGAAAATAAgtacgtcac > 45344_AB00189S AGATTACACAGgtaatgagc > 45344_AB00189S AAGACCAGCAGgtaatgcat > 45345_AB002059 TATGTGGTAGGgtaagagag > 45345_AB002059 AGCCACCTCAGgtgggggcc > 45345_AB002059 GATGCCCAGAGgtgagttta > 45345_AB002059 ACACAGCCACGgtaactgtg > 45345_AB002059 GTTGTGCCCTCgtaagtgtc > 45345_AB002059 AACTTCTCTAAgtaagcaga > 45345_AB002059 TGGCGTTGCTGgtgggtccc"> </form> </div> <!--close exon|intron button--> </div> <!--close human splice site exon|intron column left--> <div class="col-sm-6"> <!--human splice site intron|exon column right--> <div class="image-div"> <a href="examples/intron-exon.png" data-fluidbox><img src="examples/intron-exon.png" class="img-responsive" alt="Responsive image"> </a> </div> <div id="padding-div"> <p></p> </div> <div class="edit-logo-btn"> <!--intron|exon button start--> <form method="post" action="create.cgi"> <button class="btn btn-default" type="submit" name="cmd_edit" action="create.cgi" method="post"> Edit Logo</button> Intron-Exon (Acceptor) Sites <input type="hidden" name="logo_title" value="intron | exon"> <input type="hidden" name="stack_width" value="large"> <input type="hidden" name="first_index" value="-21"> <input type="hidden" name="logo_start" value="-20"> <input type="hidden" name="logo_end" value="3"> <input type="hidden" name="show_xaxis" value="true"> <input type="hidden" name="show_yaxis" value="true"> <input type="hidden" name="show_errorbars" value="true"> <input type="hidden" name="show_fineprint" value="true"> <input type="hidden" name="scale_width" value="true"> <input type="hidden" name="sequences" value=" > 19082_AF115399 ttctctgaaatatgaatttagACTGGTACTTATCATGGAG > 45328_AB000381 gcctgctttctcccctctcagGGACTTACAGTTTGAGATG > 45328_AB000381 cattgctgcttctttttttagGCATAAATTCTCGTGAACT > 45330_AB001517 aacttcctgtgtgttttgcagACAGCTGGATAGAAAACGA > 45331_AB001517 acaattttgttttcttcacagTTTTCAAATTTGCTGGGTA > 45331_AB001517 tgtggtttttgtctttatcagCAACAAATCTGACACGCTG > 45331_AB001517 gtgacctctggcgtcctgcagGGGGCGATGCGCTGCTGGT > 45331_AB001517 atgtccgcgttccttccatagGAAGTTTGTTGTCACAAAG > 45331_AB001517 tgccatctccctcttttccagGTGCTTTGTGGTTGGGAGC > 45331_AB001517 accctgtgcttccccttgcagCTGTACTCACTCAGCCAGG > 45331_AB001517 tcttctctctcgtcaattcagGTACTTCTTCAATAAAGAA > 45331_AB001517 ttacaggcccgttctctgcagCATTTCAGATCAGAGCATC > 45331_AB001517 cagcttcccccgtgtgcacagGCCTGGGCCAGCTGCTGGT > 45331_AB001517 gcccctcctgtcctgcctcagGTCAAGGTGTGGAACACCC > 45331_AB001517 gaccttgcctcttctctgcagGTACCGAAACTTCCGCACC > 45331_AB001517 cgcctccttgctctacggtagGTTTTGTCTGGACACGAAG > 45331_AB001517 ttactttgcatctctgtttagCTCTGGCTGTGACTTTTCG > 45331_AB001517 ccatgtctcctctccacccagGGCCTTCACCGCCCTGTGC > 45331_AB001517 ccactgcttttgctgttctagGAATTTTTGAACCGAAGAA > 45331_AB001517 taacggttcttttttccccagGTGACATGAGTTCTCGGCA > 45331_AB001517 aagcactgcttaatttcccagGGCGCTGCTGGGCGGCCAC > 45331_AB001517 tgattttttctccttttgcagTTGAAGTGGTCACCTCCTC > 45331_AB001517 cttagggagtctccctttcagAGCCGGGACGCTGCTGCCT > 45331_AB001517 catcccctgtgtgattgacagCTGTAGCTGGAACCACTAT > 45332_AB001517 cagctcccgctcctctcgcagGTGCTGTCTGGATGCGGAG > 45332_AB001517 ctctggttttcccccgtgcagGATCCTGGTGCACCTGAGC > 45332_AB001517 ttgccctgtgctctttcccagGAATGTTTTGACCGAGTCT > 45332_AB001517 aggccttttgtctcccggtagGAGCACGTTTGCCGTGGAC > 45332_AB001517 cgtgttcttttcgcctttcagCTTGTGCTGCATTGCACCT > 45333_AB001517 cagctcccgctcctctcgcagGTGCTGTCTGGATGCGGAG > 45333_AB001517 ctctggttttcccccgtgcagGATCCTGGTGCACCTGAGC > 45333_AB001517 ttgccctgtgctctttcccagGAATGTTTTGACCGAGTCT > 45333_AB001517 cgtgttcttttcgcctttcagCTTGTGCTGCATTGCACCT > 45334_AB001523 atttctttcttcccttcatagGTGCTGGAGATCAGAATTT > 45334_AB001523 acttcaaacaattgtttacagGTCCTATGGCCGGGCTCCG > 45334_AB001523 cagtgacttgtttgtttttagGATACCGAAGTGTATAAAG > 45334_AB001523 agtctgttcatgtctttgcagGTGTGTTGTGCTCTCCGAC > 45334_AB001523 aaacgtatcttgggcgaatagGAGGAGCTTGCCTTTGTTT > 45334_AB001523 tcatgatgtgtgtttgtttagATGGTGCCAACTGGCTGAC > 45334_AB001523 ttcgcatttgcacccccacagGTCTCTGTCCCACCTGGTG > 45334_AB001523 attgtggatttatcttaacagTTAAAGTCCTTGGGCTATC > 45334_AB001523 tctcgtttctttctgtttaagCCAACACAGCTCAGAGTCC > 45334_AB001523 tgtgtttttacttccccacagGATTTGTCCCATGCCACCA > 45334_AB001523 actgtttgttgactttgcaagGAGGAAAAAGGCTCCACAA > 45334_AB001523 ctccttacctctccgctccagCTACCTGCAGACCAGCAGC > 45334_AB001523 tacgataatgtctatttacagGTCATAAGATAGTGCTACC > 45334_AB001523 tgcctgattctttgactctagGCCAAGGAACCTGGAACGT > 45334_AB001523 ccacgatctcttttcctttagATAGCCTTCTGGCAGGCAT > 45334_AB001523 gactttttctgtccttcgtagAACAGTCTTCTGAGGCCGC > 45334_AB001523 gtctttgtgcttcctcctcagGTGTCGATTGACTGCCCGT > 45334_AB001523 ctttttgtttttccactttagGAAATATGTTCAAGTTTGT > 45334_AB001523 gacccccaactctctttccagCCCATCTACAGCAAGCAGT > 45334_AB001523 ttctctccctttcctgcccagACATTATACAACGTGAAGG > 45334_AB001523 catcgcttcctctcgtttcagTTGTCGACAACAGTAGCAA > 45334_AB001523 aacttcctgtgtgttttgcagACAGCTGGATAGAAAACGA > 45335_AB001523 acaattttgttttcttcacagTTTTCAAATTTGCTGGGTA > 45337_AB00189S ttgtgtctttcgtgcttacagCATTGTGGCGACAAGAACA > 45337_AB00189S caccacgattccatttcttagGATTCCTACGCCAGCTACG > 45337_AB00189S tggttttttcctttgtttcagACACGGCACTCGTTGTGCG > 45338_AB00189S ttgtgtctttcgtgcttacagCATTGTGGCGACAAGAACA > 45338_AB00189S caccacgattccatttcttagGATTCCTACGCCAGCTACG > 45338_AB00189S tggttttttcctttgtttcagACACGGCACTCGTTGTGCG > 45338_AB00189S aatgcattctttacccattagGTGATCTTGAGACTCCTGT > 45339_AB00189S ttgtgtctttcgtgcttacagCATTGTGGCGACAAGAACA > 45339_AB00189S caccacgattccatttcttagGATTCCTACGCCAGCTACG > 45339_AB00189S tggttttttcctttgtttcagACACGGCACTCGTTGTGCG > 45339_AB00189S aatgcattctttacccattagGTGATCTTGAGACTCCTGT > 45340_AB00189S ttgtgtctttcgtgcttacagCATTGTGGCGACAAGAACA > 45340_AB00189S caccacgattccatttcttagGATTCCTACGCCAGCTACG > 45340_AB00189S tggttttttcctttgtttcagACACGGCACTCGTTGTGCG > 45341_AB00189S ttgtgtctttcgtgcttacagCATTGTGGCGACAAGAACA > 45341_AB00189S caccacgattccatttcttagGATTCCTACGCCAGCTACG > 45341_AB00189S tggttttttcctttgtttcagACACGGCACTCGTTGTGCG > 45341_AB00189S ctcctgcctttgctcctacagGAAGTGCGTGAGTGTGTGC > 45342_AB00189S ttgtgtctttcgtgcttacagCATTGTGGCGACAAGAACA > 45342_AB00189S caccacgattccatttcttagGATTCCTACGCCAGCTACG > 45342_AB00189S tggttttttcctttgtttcagACACGGCACTCGTTGTGCG > 45342_AB00189S -ggcaatttgcactcacacagCTCAATCCACCCCAGGCTC > 45342_AB00189S ctcctgcctttgctcctacagGAAGTGCGTGAGTGTGTGC > 45342_AB00189S aggaacggtatcttcccacagGTGTGACGAGAACTGCTTG > 45342_AB00189S tttcctgatgcggggccccagCTGACGAGACATTCTGCGA > 45343_AB00189S ttgtgtctttcgtgcttacagCATTGTGGCGACAAGAACA > 45343_AB00189S caccacgattccatttcttagGATTCCTACGCCAGCTACG > 45343_AB00189S tggttttttcctttgtttcagACACGGCACTCGTTGTGCG > 45343_AB00189S ctcctgcctttgctcctacagGAAGTGCGTGAGTGTGTGC > 45343_AB00189S aggaacggtatcttcccacagGTGTGACGAGAACTGCTTG > 45343_AB00189S tttcctgatgcggggccccagCTGACGAGACATTCTGCGA > 45344_AB00189S ttgtgtctttcgtgcttacagCATTGTGGCGACAAGAACA > 45344_AB00189S caccacgattccatttcttagGATTCCTACGCCAGCTACG > 45344_AB00189S tggttttttcctttgtttcagACACGGCACTCGTTGTGCG > 45344_AB00189S -ggcaatttgcactcacacagCTCAATCCACCCCAGGCTC > 45344_AB00189S ctcctgcctttgctcctacagGAAGTGCGTGAGTGTGTGC > 45345_AB002059 tgcccgacttctcctccccagGTGGGCGCTCCTCGCCAAA > 45345_AB002059 accttgagacttgcctcctagGGAGAGAACGTGTTCTTCT > 45345_AB002059 ctgctctctctcccacctcagCACCCGTCCGTCCCACTGG > 45345_AB002059 agttcatcttttgttttctagGTGTAAAAACAGGCCAGTG > 45345_AB002059 tcacctcccttccacctgcagGAGGCCCCTGCTGGCCCAG > 45345_AB002059 gacctttcccactcctcccagGTCCAATGCCTTGGAGACC > 45345_AB002059 aaagctatgtgctatgtgcagGGTGGCTCTGTAGGCATCA > 45345_AB002059 agccttctttcctgcccacagGACAGCCACTCACTGGTGG "> </form> </div> <!--close intron|exon button--> </div> <!--close human splice site intron|exon column right--> </div> <!--close human splice site row container--> <div class="row" id="spacing-row"> <hr> </div> <!--offset for bottom margin--> </div> <!--close Example Gallery col-sm-12 content column--> </div> <!--Example Gallery Row Container--> </div> <!--close Central Body col-sm-10 column--> <div class="col-sm-1"></div> <!--outer column margin right--> </div> <!--close outermost row container--> </div> <!--close outermost "container-fluid" content container--> <script type="text/javascript"> //fluidbox initialization function $(function() { $('a').fluidbox({ viewportFill: 0.99, debounceResize: false }); }); </script> <!--fluidbox cdn--> <script src="https://cdnjs.cloudflare.com/ajax/libs/fluidbox/1.4.3.1/css/fluidbox.css"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/fluidbox/1.4.3.1/jquery.fluidbox.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/fluidbox/1.4.3.1/jquery.fluidbox.min.js"></script> <!--fallback to server-hosted files in case CDNs fail--> <script> if (typeof jQuery == 'undefined') { //fallback for JQuery document.write(unescape("%3Cscript src='.../scripts/jquery-1.11.3/jquery-1.11.3.min.js' type='text/javascript'%3E%3C/script%3E")); //fallback for Fluidbox document.write(unescape("%3Cscript src='.../scripts/fluidbox/jjquery.fluidbox.js' type='text/javascript'%3E%3C/script%3E")); document.write(unescape("%3Cscript src='.../scripts/fluidbox/jjquery.fluidbox.min.js' type='text/javascript'%3E%3C/script%3E")); //fallback for Bootstrap document.write(unescape("%3Cscript src='.../scripts/bootstrap-3.3.5-dist/js/bootstrap.js' type='text/javascript'%3E%3C/script%3E")); document.write(unescape("%3Cscript src='.../scripts/bootstrap-3.3.5-dist/js/bootstrap.min.js' type='text/javascript'%3E%3C/script%3E")); document.write(unescape("%3Clink rel='stylesheet' src='.../scripts/bootstrap-3.3.5-dist/css/bootstrap.min.css' %3Clink")); document.write(unescape("%3Clink rel='stylesheet' src='.../scripts/bootstrap-3.3.5-dist/css/bootstrap-theme.min.css' %3Clink")); } </script> <!--google analytics--> <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> var pageTracker = _gat._getTracker("UA-5951066-1"); pageTracker._trackPageview(); </script> </body> </html>
{ "content_hash": "037714e7541fd1f0e26757f61c831248", "timestamp": "", "source": "github", "line_count": 2361, "max_line_length": 940, "avg_line_length": 41.389665396018636, "alnum_prop": 0.659540937976484, "repo_name": "go-bears/GSOC_2015", "id": "0760b72553a2717859549aefcbda3ac059f9bc45", "size": "97721", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "examples.html", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "4519" }, { "name": "HTML", "bytes": "263317" }, { "name": "Python", "bytes": "51333" } ], "symlink_target": "" }
require 'unit_spec_helper' describe Shoulda::Matchers::ActiveRecord::AssociationMatcher do context 'belong_to' do it 'accepts a good association with the default foreign key' do expect(belonging_to_parent).to belong_to(:parent) end it 'rejects a nonexistent association' do expect(define_model(:child).new).not_to belong_to(:parent) end it 'rejects an association of the wrong type' do define_model :parent, child_id: :integer expect(define_model(:child) { has_one :parent }.new).not_to belong_to(:parent) end it 'rejects an association that has a nonexistent foreign key' do define_model :parent expect(define_model(:child) { belongs_to :parent }.new).not_to belong_to(:parent) end it 'accepts an association with an existing custom foreign key' do define_model :parent define_model :child, guardian_id: :integer do belongs_to :parent, foreign_key: 'guardian_id' end expect(Child.new).to belong_to(:parent) end it 'accepts an association using an existing custom primary key' do define_model :parent define_model :child, parent_id: :integer, custom_primary_key: :integer do belongs_to :parent, primary_key: :custom_primary_key end expect(Child.new).to belong_to(:parent).with_primary_key(:custom_primary_key) end it 'rejects an association with a bad :primary_key option' do matcher = belong_to(:parent).with_primary_key(:custom_primary_key) expect(belonging_to_parent).not_to matcher expect(matcher.failure_message).to match(/Child does not have a custom_primary_key primary key/) end it 'accepts a polymorphic association' do define_model :child, parent_type: :string, parent_id: :integer do belongs_to :parent, polymorphic: true end expect(Child.new).to belong_to(:parent) end it 'accepts an association with a valid :dependent option' do expect(belonging_to_parent(dependent: :destroy)). to belong_to(:parent).dependent(:destroy) end it 'rejects an association with a bad :dependent option' do expect(belonging_to_parent).not_to belong_to(:parent).dependent(:destroy) end it 'accepts an association with a valid :counter_cache option' do expect(belonging_to_parent(counter_cache: :attribute_count)). to belong_to(:parent).counter_cache(:attribute_count) end it 'defaults :counter_cache to true' do expect(belonging_to_parent(counter_cache: true)). to belong_to(:parent).counter_cache end it 'rejects an association with a bad :counter_cache option' do expect(belonging_to_parent(counter_cache: :attribute_count)). not_to belong_to(:parent).counter_cache(true) end it 'rejects an association that has no :counter_cache option' do expect(belonging_to_parent).not_to belong_to(:parent).counter_cache end it 'accepts an association with a valid :inverse_of option' do expect(belonging_to_parent(inverse_of: :children)) .to belong_to(:parent).inverse_of(:children) end it 'rejects an association with a bad :inverse_of option' do expect(belonging_to_parent(inverse_of: :other_children)) .not_to belong_to(:parent).inverse_of(:children) end it 'rejects an association that has no :inverse_of option' do expect(belonging_to_parent) .not_to belong_to(:parent).inverse_of(:children) end it 'accepts an association with a valid :conditions option' do define_model :parent, adopter: :boolean define_model(:child, parent_id: :integer).tap do |model| define_association_with_conditions(model, :belongs_to, :parent, adopter: true) end expect(Child.new).to belong_to(:parent).conditions(adopter: true) end it 'rejects an association with a bad :conditions option' do define_model :parent, adopter: :boolean define_model :child, parent_id: :integer do belongs_to :parent end expect(Child.new).not_to belong_to(:parent).conditions(adopter: true) end it 'accepts an association without a :class_name option' do expect(belonging_to_parent).to belong_to(:parent).class_name('Parent') end it 'accepts an association with a valid :class_name option' do define_model :tree_parent define_model :child, parent_id: :integer do belongs_to :parent, class_name: 'TreeParent' end expect(Child.new).to belong_to(:parent).class_name('TreeParent') end it 'rejects an association with a bad :class_name option' do expect(belonging_to_parent).not_to belong_to(:parent).class_name('TreeChild') end it 'rejects an association with non-existent implicit class name' do expect(belonging_to_non_existent_class(:child, :parent)).not_to belong_to(:parent) end it 'rejects an association with non-existent explicit class name' do expect(belonging_to_non_existent_class(:child, :parent, class_name: 'Parent')).not_to belong_to(:parent) end it 'adds error message when rejecting an association with non-existent class' do message = 'Expected Child to have a belongs_to association called parent (Parent2 does not exist)' expect { expect(belonging_to_non_existent_class(:child, :parent, class_name: 'Parent2')).to belong_to(:parent) }.to fail_with_message(message) end it 'accepts an association with a namespaced class name' do define_module 'Models' define_model 'Models::Organization' user_model = define_model 'Models::User', organization_id: :integer do belongs_to :organization, class_name: 'Organization' end expect(user_model.new). to belong_to(:organization). class_name('Organization') end it 'resolves class_name within the context of the namespace before the global namespace' do define_module 'Models' define_model 'Organization' define_model 'Models::Organization' user_model = define_model 'Models::User', organization_id: :integer do belongs_to :organization, class_name: 'Organization' end expect(user_model.new). to belong_to(:organization). class_name('Organization') end it 'accepts an association with a matching :autosave option' do define_model :parent, adopter: :boolean define_model :child, parent_id: :integer do belongs_to :parent, autosave: true end expect(Child.new).to belong_to(:parent).autosave(true) end it 'rejects an association with a non-matching :autosave option with the correct message' do define_model :parent, adopter: :boolean define_model :child, parent_id: :integer do belongs_to :parent, autosave: false end message = 'Expected Child to have a belongs_to association called parent (parent should have autosave set to true)' expect { expect(Child.new).to belong_to(:parent).autosave(true) }.to fail_with_message(message) end context 'an association with a :validate option' do [false, true].each do |validate_value| context "when the model has validate: #{validate_value}" do it 'accepts a matching validate option' do expect(belonging_to_parent(validate: validate_value)). to belong_to(:parent).validate(validate_value) end it 'rejects a non-matching validate option' do expect(belonging_to_parent(validate: validate_value)). not_to belong_to(:parent).validate(!validate_value) end it 'defaults to validate(true)' do if validate_value expect(belonging_to_parent(validate: validate_value)). to belong_to(:parent).validate else expect(belonging_to_parent(validate: validate_value)). not_to belong_to(:parent).validate end end it 'will not break matcher when validate option is unspecified' do expect(belonging_to_parent(validate: validate_value)).to belong_to(:parent) end end end end context 'an association without a :validate option' do it 'accepts validate(false)' do expect(belonging_to_parent).to belong_to(:parent).validate(false) end it 'rejects validate(true)' do expect(belonging_to_parent).not_to belong_to(:parent).validate(true) end it 'rejects validate()' do expect(belonging_to_parent).not_to belong_to(:parent).validate end end context 'an association with a :touch option' do [false, true].each do |touch_value| context "when the model has touch: #{touch_value}" do it 'accepts a matching touch option' do expect(belonging_to_parent(touch: touch_value)). to belong_to(:parent).touch(touch_value) end it 'rejects a non-matching touch option' do expect(belonging_to_parent(touch: touch_value)). not_to belong_to(:parent).touch(!touch_value) end it 'defaults to touch(true)' do if touch_value expect(belonging_to_parent(touch: touch_value)). to belong_to(:parent).touch else expect(belonging_to_parent(touch: touch_value)). not_to belong_to(:parent).touch end end it 'will not break matcher when touch option is unspecified' do expect(belonging_to_parent(touch: touch_value)).to belong_to(:parent) end end end end context 'an association without a :touch option' do it 'accepts touch(false)' do expect(belonging_to_parent).to belong_to(:parent).touch(false) end it 'rejects touch(true)' do expect(belonging_to_parent).not_to belong_to(:parent).touch(true) end it 'rejects touch()' do expect(belonging_to_parent).not_to belong_to(:parent).touch end end def belonging_to_parent(options = {}) define_model :parent define_model :child, parent_id: :integer do belongs_to :parent, options end.new end def belonging_to_non_existent_class(model_name, assoc_name, options = {}) define_model model_name, "#{assoc_name}_id" => :integer do belongs_to assoc_name, options end.new end end context 'have_many' do it 'accepts a valid association without any options' do expect(having_many_children).to have_many(:children) end it 'accepts a valid association with a :through option' do define_model :child define_model :conception, child_id: :integer, parent_id: :integer do belongs_to :child end define_model :parent do has_many :conceptions has_many :children, through: :conceptions end expect(Parent.new).to have_many(:children) end it 'accepts a valid association with an :as option' do define_model :child, guardian_type: :string, guardian_id: :integer define_model :parent do has_many :children, as: :guardian end expect(Parent.new).to have_many(:children) end it 'rejects an association that has a nonexistent foreign key' do define_model :child define_model :parent do has_many :children end expect(Parent.new).not_to have_many(:children) end it 'accepts an association using an existing custom primary key' do define_model :child, parent_id: :integer define_model :parent, custom_primary_key: :integer do has_many :children, primary_key: :custom_primary_key end expect(Parent.new).to have_many(:children).with_primary_key(:custom_primary_key) end it 'rejects an association with a bad :primary_key option' do matcher = have_many(:children).with_primary_key(:custom_primary_key) expect(having_many_children).not_to matcher expect(matcher.failure_message).to match(/Parent does not have a custom_primary_key primary key/) end it 'rejects an association with a bad :as option' do define_model :child, caretaker_type: :string, caretaker_id: :integer define_model :parent do has_many :children, as: :guardian end expect(Parent.new).not_to have_many(:children) end it 'rejects an association that has a bad :through option' do matcher = have_many(:children).through(:conceptions) expect(matcher.matches?(having_many_children)).to eq false expect(matcher.failure_message).to match(/does not have any relationship to conceptions/) end it 'rejects an association that has the wrong :through option' do define_model :child define_model :conception, child_id: :integer, parent_id: :integer do belongs_to :child end define_model :parent do has_many :conceptions has_many :relationships has_many :children, through: :conceptions end matcher = have_many(:children).through(:relationships) expect(matcher.matches?(Parent.new)).to eq false expect(matcher.failure_message).to match(/through relationships, but got it through conceptions/) end it 'produces a failure message without exception when association is missing :through option' do define_model :child define_model :parent matcher = have_many(:children).through(:relationships).source(:child) failure_message = 'Expected Parent to have a has_many association called children (no association called children)' matcher.matches?(Parent.new) expect(matcher.failure_message).to eq failure_message end it 'accepts an association with a valid :dependent option' do expect(having_many_children(dependent: :destroy)). to have_many(:children).dependent(:destroy) end it 'rejects an association with a bad :dependent option' do matcher = have_many(:children).dependent(:destroy) expect(having_many_children).not_to matcher expect(matcher.failure_message).to match(/children should have destroy dependency/) end it 'accepts an association with a valid :source option' do expect(having_many_children(source: :user)). to have_many(:children).source(:user) end it 'rejects an association with a bad :source option' do matcher = have_many(:children).source(:user) expect(having_many_children).not_to matcher expect(matcher.failure_message).to match(/children should have user as source option/) end it 'accepts an association with a valid :order option' do expect(having_many_children(order: :id)). to have_many(:children).order(:id) end it 'rejects an association with a bad :order option' do matcher = have_many(:children).order(:id) expect(having_many_children).not_to matcher expect(matcher.failure_message).to match(/children should be ordered by id/) end it 'accepts an association with a valid :conditions option' do define_model :child, parent_id: :integer, adopted: :boolean define_model(:parent).tap do |model| define_association_with_conditions(model, :has_many, :children, adopted: true) end expect(Parent.new).to have_many(:children).conditions(adopted: true) end it 'rejects an association with a bad :conditions option' do define_model :child, parent_id: :integer, adopted: :boolean define_model :parent do has_many :children end expect(Parent.new).not_to have_many(:children).conditions(adopted: true) end it 'accepts an association without a :class_name option' do expect(having_many_children).to have_many(:children).class_name('Child') end it 'accepts an association with a valid :class_name option' do define_model :node, parent_id: :integer define_model :parent do has_many :children, class_name: 'Node' end expect(Parent.new).to have_many(:children).class_name('Node') end it 'rejects an association with a bad :class_name option' do expect(having_many_children).not_to have_many(:children).class_name('Node') end it 'rejects an association with non-existent implicit class name' do expect(having_many_non_existent_class(:parent, :children)).not_to have_many(:children) end it 'rejects an association with non-existent explicit class name' do expect(having_many_non_existent_class(:parent, :children, class_name: 'Child')).not_to have_many(:children) end it 'adds error message when rejecting an association with non-existent class' do message = 'Expected Parent to have a has_many association called children (Child2 does not exist)' expect { expect(having_many_non_existent_class(:parent, :children, class_name: 'Child2')).to have_many(:children) }.to fail_with_message(message) end it 'accepts an association with a namespaced class name' do define_module 'Models' define_model 'Models::Friend', user_id: :integer friend_model = define_model 'Models::User' do has_many :friends, class_name: 'Friend' end expect(friend_model.new). to have_many(:friends). class_name('Friend') end it 'resolves class_name within the context of the namespace before the global namespace' do define_module 'Models' define_model 'Friend' define_model 'Models::Friend', user_id: :integer friend_model = define_model 'Models::User' do has_many :friends, class_name: 'Friend' end expect(friend_model.new). to have_many(:friends). class_name('Friend') end it 'accepts an association with a matching :autosave option' do define_model :child, parent_id: :integer define_model :parent do has_many :children, autosave: true end expect(Parent.new).to have_many(:children).autosave(true) end it 'rejects an association with a non-matching :autosave option with the correct message' do define_model :child, parent_id: :integer define_model :parent do has_many :children, autosave: false end message = 'Expected Parent to have a has_many association called children (children should have autosave set to true)' expect { expect(Parent.new).to have_many(:children).autosave(true) }.to fail_with_message(message) end context 'validate' do it 'accepts when the :validate option matches' do expect(having_many_children(validate: false)).to have_many(:children).validate(false) end it 'rejects when the :validate option does not match' do expect(having_many_children(validate: true)).not_to have_many(:children).validate(false) end it 'assumes validate() means validate(true)' do expect(having_many_children(validate: false)).not_to have_many(:children).validate end it 'matches validate(false) to having no validate option specified' do expect(having_many_children).to have_many(:children).validate(false) end end it 'accepts an association with a nonstandard reverse foreign key, using :inverse_of' do define_model :child, ancestor_id: :integer do belongs_to :ancestor, inverse_of: :children, class_name: :Parent end define_model :parent do has_many :children, inverse_of: :ancestor end expect(Parent.new).to have_many(:children) end it 'rejects an association with a nonstandard reverse foreign key, if :inverse_of is not correct' do define_model :child, mother_id: :integer do belongs_to :mother, inverse_of: :children, class_name: :Parent end define_model :parent do has_many :children, inverse_of: :ancestor end expect(Parent.new).not_to have_many(:children) end def having_many_children(options = {}) define_model :child, parent_id: :integer define_model(:parent).tap do |model| if options.key?(:order) order = options.delete(:order) define_association_with_order(model, :has_many, :children, order, options) else model.has_many :children, options end end.new end def having_many_non_existent_class(model_name, assoc_name, options = {}) define_model model_name do has_many assoc_name, options end.new end end context 'have_one' do it 'accepts a valid association without any options' do expect(having_one_detail).to have_one(:detail) end it 'accepts a valid association with an :as option' do define_model :detail, detailable_id: :integer, detailable_type: :string define_model :person do has_one :detail, as: :detailable end expect(Person.new).to have_one(:detail) end it 'rejects an association that has a nonexistent foreign key' do define_model :detail define_model :person do has_one :detail end expect(Person.new).not_to have_one(:detail) end it 'accepts an association with an existing custom foreign key' do define_model :detail, detailed_person_id: :integer define_model :person do has_one :detail, foreign_key: :detailed_person_id end expect(Person.new).to have_one(:detail).with_foreign_key(:detailed_person_id) end it 'accepts an association using an existing custom primary key' do define_model :detail, person_id: :integer define_model :person, custom_primary_key: :integer do has_one :detail, primary_key: :custom_primary_key end expect(Person.new).to have_one(:detail).with_primary_key(:custom_primary_key) end it 'rejects an association with a bad :primary_key option' do matcher = have_one(:detail).with_primary_key(:custom_primary_key) expect(having_one_detail).not_to matcher expect(matcher.failure_message).to match(/Person does not have a custom_primary_key primary key/) end it 'rejects an association with a bad :as option' do define_model :detail, detailable_id: :integer, detailable_type: :string define_model :person do has_one :detail, as: :describable end expect(Person.new).not_to have_one(:detail) end it 'accepts an association with a valid :dependent option' do expect(having_one_detail(dependent: :destroy)). to have_one(:detail).dependent(:destroy) end it 'rejects an association with a bad :dependent option' do matcher = have_one(:detail).dependent(:destroy) expect(having_one_detail).not_to matcher expect(matcher.failure_message).to match(/detail should have destroy dependency/) end it 'accepts an association with a valid :order option' do expect(having_one_detail(order: :id)).to have_one(:detail).order(:id) end it 'rejects an association with a bad :order option' do matcher = have_one(:detail).order(:id) expect(having_one_detail).not_to matcher expect(matcher.failure_message).to match(/detail should be ordered by id/) end it 'accepts an association with a valid :conditions option' do define_model :detail, person_id: :integer, disabled: :boolean define_model(:person).tap do |model| define_association_with_conditions(model, :has_one, :detail, disabled: true) end expect(Person.new).to have_one(:detail).conditions(disabled: true) end it 'rejects an association with a bad :conditions option' do define_model :detail, person_id: :integer, disabled: :boolean define_model :person do has_one :detail end expect(Person.new).not_to have_one(:detail).conditions(disabled: true) end it 'accepts an association without a :class_name option' do expect(having_one_detail).to have_one(:detail).class_name('Detail') end it 'accepts an association with a valid :class_name option' do define_model :person_detail, person_id: :integer define_model :person do has_one :detail, class_name: 'PersonDetail' end expect(Person.new).to have_one(:detail).class_name('PersonDetail') end it 'rejects an association with a bad :class_name option' do expect(having_one_detail).not_to have_one(:detail).class_name('NotSet') end it 'rejects an association with non-existent implicit class name' do expect(having_one_non_existent(:pserson, :detail)).not_to have_one(:detail) end it 'rejects an association with non-existent explicit class name' do expect(having_one_non_existent(:person, :detail, class_name: 'Detail')).not_to have_one(:detail) end it 'adds error message when rejecting an association with non-existent class' do message = 'Expected Person to have a has_one association called detail (Detail2 does not exist)' expect { expect(having_one_non_existent(:person, :detail, class_name: 'Detail2')).to have_one(:detail) }.to fail_with_message(message) end it 'accepts an association with a namespaced class name' do define_module 'Models' define_model 'Models::Account', user_id: :integer user_model = define_model 'Models::User' do has_one :account, class_name: 'Account' end expect(user_model.new). to have_one(:account). class_name('Account') end it 'resolves class_name within the context of the namespace before the global namespace' do define_module 'Models' define_model 'Account' define_model 'Models::Account', user_id: :integer user_model = define_model 'Models::User' do has_one :account, class_name: 'Account' end expect(user_model.new). to have_one(:account). class_name('Account') end it 'accepts an association with a matching :autosave option' do define_model :detail, person_id: :integer, disabled: :boolean define_model :person do has_one :detail, autosave: true end expect(Person.new).to have_one(:detail).autosave(true) end it 'rejects an association with a non-matching :autosave option with the correct message' do define_model :detail, person_id: :integer, disabled: :boolean define_model :person do has_one :detail, autosave: false end message = 'Expected Person to have a has_one association called detail (detail should have autosave set to true)' expect { expect(Person.new).to have_one(:detail).autosave(true) }.to fail_with_message(message) end it 'accepts an association with a through' do define_model :detail define_model :account do has_one :detail end define_model :person do has_one :account has_one :detail, through: :account end expect(Person.new).to have_one(:detail).through(:account) end it 'rejects an association with a bad through' do expect(having_one_detail).not_to have_one(:detail).through(:account) end context 'validate' do it 'accepts when the :validate option matches' do expect(having_one_detail(validate: false)). to have_one(:detail).validate(false) end it 'rejects when the :validate option does not match' do expect(having_one_detail(validate: true)). not_to have_one(:detail).validate(false) end it 'assumes validate() means validate(true)' do expect(having_one_detail(validate: false)). not_to have_one(:detail).validate end it 'matches validate(false) to having no validate option specified' do expect(having_one_detail).to have_one(:detail).validate(false) end end def having_one_detail(options = {}) define_model :detail, person_id: :integer define_model(:person).tap do |model| if options.key?(:order) order = options.delete(:order) define_association_with_order(model, :has_one, :detail, order, options) else model.has_one :detail, options end end.new end def having_one_non_existent(model_name, assoc_name, options = {}) define_model model_name do has_one assoc_name, options end.new end end context 'have_and_belong_to_many' do it 'accepts a valid association' do expect(having_and_belonging_to_many_relatives). to have_and_belong_to_many(:relatives) end it 'rejects a nonexistent association' do define_model :relative define_model :person define_model :people_relative, id: false, person_id: :integer, relative_id: :integer expect(Person.new).not_to have_and_belong_to_many(:relatives) end it 'rejects an association with a nonexistent join table' do define_model :relative define_model :person do has_and_belongs_to_many :relatives end expected_failure_message = "join table people_relatives doesn't exist" expect do expect(Person.new).to have_and_belong_to_many(:relatives) end.to fail_with_message_including(expected_failure_message) end it 'rejects an association with a join table with incorrect columns' do define_model :relative define_model :person do has_and_belongs_to_many :relatives end define_model :people_relative, id: false, some_crazy_id: :integer expect do expect(Person.new).to have_and_belong_to_many(:relatives) end.to fail_with_message_including('missing columns: person_id, relative_id') end context 'using a custom foreign key' do it 'rejects an association with a join table with incorrect columns' do define_model :relative define_model :person do has_and_belongs_to_many :relatives, foreign_key: :custom_foreign_key_id end define_model :people_relative, id: false, custom_foreign_key_id: :integer, some_crazy_id: :integer expect do expect(Person.new).to have_and_belong_to_many(:relatives) end.to fail_with_message_including('missing column: relative_id') end end context 'using a custom association foreign key' do it 'rejects an association with a join table with incorrect columns' do define_model :relative define_model :person do has_and_belongs_to_many :relatives, association_foreign_key: :custom_association_foreign_key_id end define_model :people_relative, id: false, custom_association_foreign_key_id: :integer, some_crazy_id: :integer expect do expect(Person.new).to have_and_belong_to_many(:relatives) end.to fail_with_message_including('missing column: person_id') end it 'accepts foreign keys when they are symbols' do define_model :relative define_model :person do has_and_belongs_to_many :relatives, foreign_key: :some_foreign_key_id, association_foreign_key: :custom_association_foreign_key_id end define_model :people_relative, id: false, custom_association_foreign_key_id: :integer, some_foreign_key_id: :integer expect(Person.new).to have_and_belong_to_many(:relatives) end end it 'rejects an association of the wrong type' do define_model :relative, person_id: :integer define_model :person do has_many :relatives end expect(Person.new).not_to have_and_belong_to_many(:relatives) end it 'accepts an association with a valid :conditions option' do define_model :relative, adopted: :boolean define_model(:person).tap do |model| define_association_with_conditions(model, :has_and_belongs_to_many, :relatives, adopted: true) end define_model :people_relative, id: false, person_id: :integer, relative_id: :integer expect(Person.new).to have_and_belong_to_many(:relatives).conditions(adopted: true) end it 'rejects an association with a bad :conditions option' do define_model :relative, adopted: :boolean define_model :person do has_and_belongs_to_many :relatives end define_model :people_relative, id: false, person_id: :integer, relative_id: :integer expect(Person.new).not_to have_and_belong_to_many(:relatives).conditions(adopted: true) end it 'accepts an association without a :class_name option' do expect(having_and_belonging_to_many_relatives). to have_and_belong_to_many(:relatives).class_name('Relative') end it 'accepts an association with a valid :class_name option' do define_model :person_relative, adopted: :boolean define_model :person do has_and_belongs_to_many :relatives, class_name: 'PersonRelative' end define_model :people_person_relative, person_id: :integer, person_relative_id: :integer expect(Person.new).to have_and_belong_to_many(:relatives).class_name('PersonRelative') end it 'rejects an association with a bad :class_name option' do expect(having_and_belonging_to_many_relatives). not_to have_and_belong_to_many(:relatives).class_name('PersonRelatives') end it 'rejects an association with non-existent implicit class name' do expect(having_and_belonging_to_many_non_existent_class(:person, :relatives)). not_to have_and_belong_to_many(:relatives) end it 'rejects an association with non-existent explicit class name' do expect(having_and_belonging_to_many_non_existent_class(:person, :relatives, class_name: 'Relative')). not_to have_and_belong_to_many(:relatives) end it 'adds error message when rejecting an association with non-existent class' do message = 'Expected Person to have a has_and_belongs_to_many association called relatives (Relative2 does not exist)' expect { expect(having_and_belonging_to_many_non_existent_class(:person, :relatives, class_name: 'Relative2')). to have_and_belong_to_many(:relatives) }.to fail_with_message(message) end it 'accepts an association with a namespaced class name' do possible_join_table_names = [:groups_users, :models_groups_users, :groups_models_users] possible_join_table_names.each do |join_table_name| create_table join_table_name, id: false do |t| t.integer :group_id t.integer :user_id end end define_module 'Models' define_model 'Models::Group' user_model = define_model 'Models::User' do has_and_belongs_to_many :groups, class_name: 'Group' end expect(user_model.new). to have_and_belong_to_many(:groups). class_name('Group') end it 'resolves class_name within the context of the namespace before the global namespace' do possible_join_table_names = [:groups_users, :models_groups_users, :groups_models_users] possible_join_table_names.each do |join_table_name| create_table join_table_name, id: false do |t| t.integer :group_id t.integer :user_id end end define_module 'Models' define_model 'Group' define_model 'Models::Group' user_model = define_model 'Models::User' do has_and_belongs_to_many :groups, class_name: 'Group' end expect(user_model.new). to have_and_belong_to_many(:groups). class_name('Group') end it 'accepts an association with a matching :autosave option' do define_model :relatives, adopted: :boolean define_model :person do has_and_belongs_to_many :relatives, autosave: true end define_model :people_relative, person_id: :integer, relative_id: :integer expect(Person.new).to have_and_belong_to_many(:relatives).autosave(true) end it 'rejects an association with a non-matching :autosave option with the correct message' do define_model :relatives, adopted: :boolean define_model :person do has_and_belongs_to_many :relatives end define_model :people_relative, person_id: :integer, relative_id: :integer message = 'Expected Person to have a has_and_belongs_to_many association called relatives (relatives should have autosave set to true)' expect { expect(Person.new).to have_and_belong_to_many(:relatives).autosave(true) }.to fail_with_message(message) end context 'validate' do it 'accepts when the :validate option matches' do expect(having_and_belonging_to_many_relatives(validate: false)). to have_and_belong_to_many(:relatives).validate(false) end it 'rejects when the :validate option does not match' do expect(having_and_belonging_to_many_relatives(validate: true)). to have_and_belong_to_many(:relatives).validate(false) end it 'assumes validate() means validate(true)' do expect(having_and_belonging_to_many_relatives(validate: false)). not_to have_and_belong_to_many(:relatives).validate end it 'matches validate(false) to having no validate option specified' do expect(having_and_belonging_to_many_relatives). to have_and_belong_to_many(:relatives).validate(false) end end def having_and_belonging_to_many_relatives(options = {}) define_model :relative define_model :people_relative, id: false, person_id: :integer, relative_id: :integer define_model :person do has_and_belongs_to_many :relatives end.new end def having_and_belonging_to_many_non_existent_class(model_name, assoc_name, options = {}) define_model model_name do has_and_belongs_to_many assoc_name, options end.new end end def define_association_with_conditions(model, macro, name, conditions, other_options={}) args = [] options = {} if Shoulda::Matchers::RailsShim.active_record_major_version == 4 args << proc { where(conditions) } else options[:conditions] = conditions end args << options model.__send__(macro, name, *args) end def define_association_with_order(model, macro, name, order, other_options={}) args = [] options = {} if Shoulda::Matchers::RailsShim.active_record_major_version == 4 args << proc { order(order) } else options[:order] = order end args << options model.__send__(macro, name, *args) end end
{ "content_hash": "aa9cdd827cc5d2834876fcc885ea8bd8", "timestamp": "", "source": "github", "line_count": 1120, "max_line_length": 141, "avg_line_length": 34.91517857142857, "alnum_prop": 0.6564889400332439, "repo_name": "maurogeorge/shoulda-matchers", "id": "5d3440549885c3641eb494df0d34343087bd7e5f", "size": "39105", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "spec/unit/shoulda/matchers/active_record/association_matcher_spec.rb", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "9443" }, { "name": "JavaScript", "bytes": "15525" }, { "name": "Ruby", "bytes": "605403" }, { "name": "Shell", "bytes": "617" } ], "symlink_target": "" }
/** *********************************************************************************************************************** * @file palListImpl.h * @brief PAL utility collection List and ListIterator class implementations. *********************************************************************************************************************** */ #pragma once #include "palList.h" #include "palSysMemory.h" namespace Util { // ===================================================================================================================== // Obtains a pointer to the data stored in the node pointed to by the iterator. Returns null if the iterator is // pointing at the footer. template<typename T, typename Allocator> T* ListIterator<T, Allocator>::Get() const { // Assume that the iterator is pointing at either the header or the footer node, meaning the data in this node is // invalid. T* pRet = nullptr; // Shouldn't be able to walk off the end of the list... PAL_ASSERT(m_pCurrent != nullptr); // Shouldn't be able to point the iterator to the header node either. PAL_ASSERT(IsHeader() == false); if (IsFooter() == false) { // Valid node, return a pointer to the data. pRet = &m_pCurrent->data; } return pRet; } // ===================================================================================================================== // Advances the iterator to the next element in the list. template<typename T, typename Allocator> void ListIterator<T, Allocator>::Next() { // Prevent our iterator from walking off the end of the list. if (IsFooter() == false) { m_pCurrent = m_pCurrent->pNext; } } // ===================================================================================================================== // Advances the iterator to the previous element in the list. If the iterator currently points at the head, then the // iterator is not changed. template<typename T, typename Allocator> void ListIterator<T, Allocator>::Prev() { // Prevent our iterator from ever pointing to the permanent header node. This prevents an "InsertBefore" call ever // being made while the iterator is pointing at the header, which would be bad. if (m_pList->IsHeader(m_pCurrent->pPrev) == false) { m_pCurrent = m_pCurrent->pPrev; } } // ===================================================================================================================== // Inserts "pData" before the specified iterator. If the iterator has walked off the end of the list, this function // will insert the new node as the tail of the list. template<typename T, typename Allocator> Result List<T, Allocator>::InsertBefore( ListIterator<T, Allocator>* pIterator, const T& data) { // Iterators are only a container for what we really need for the "insert" operation -- namely, a node in the list. // So just call the real insert function using the iterators node. return InsertBefore(pIterator->m_pCurrent, data); } // ===================================================================================================================== // Private method used that inserts "pData" before the specified node. If "pNode" is null then this function will // assume it is adding to an empty list. template<typename T, typename Allocator> Result List<T, Allocator>::InsertBefore( ListNode<T>* pBeforeMe, const T& data) { // Assume this is going to work... Result result = Result::_Success; // There is a "fake" footer node, meaning there's always a node to "insert before". PAL_ASSERT(pBeforeMe != nullptr); // Can't insert before the fake header node. PAL_ASSERT(IsHeader(pBeforeMe) == false); ListNode<T>* pNewNode = PAL_NEW(ListNode<T>, m_pAllocator, AllocInternal); if (pNewNode != nullptr) { pNewNode->data = data; // Ok, there is an element in this list that we can insert before, so connect our new node into the list. pNewNode->pNext = pBeforeMe; pNewNode->pPrev = pBeforeMe->pPrev; // The only node with a NULL "prev" pointer should be the header which we can't insert before. PAL_ASSERT(pNewNode->pPrev != nullptr); // And now connect the list into our new node. pBeforeMe->pPrev = pNewNode; pNewNode->pPrev->pNext = pNewNode; m_numElements++; } else { // Couldn't allocate memory for a new node in the list. result = Result::ErrorOutOfMemory; } PAL_ALERT(result != Result::_Success); return result; } // ===================================================================================================================== // Public method used for removing the node pointed to be "pIterator" from the list. If the iterator has walked off // the end of the list, then nothing happens. template<typename T, typename Allocator> void List<T, Allocator>::Erase( ListIterator<T, Allocator>* pIterator) { // Should be impossible to get the iterator to point to the permanent header node. PAL_ASSERT(pIterator->IsHeader() == false); // Make sure we're not trying to destroy the permanent footer node. if (pIterator->IsFooter() == false) { ListNode<T>* pDestroyMe = pIterator->m_pCurrent; // Make sure this iterator hasn't walked off the end of the list... The "Next()" and "Prev()" functions should // make this impossible. PAL_ASSERT(pDestroyMe != nullptr); // We're about to destroy this iterators node. In order to keep the iterator valid, we need to advance it. // Don't advance to the dummy footer node unless there is no valid node available. if (IsFooter(pDestroyMe->pNext) == false) { // Ok, our next node is not the dummy footer, so advance to there. pIterator->m_pCurrent = pDestroyMe->pNext; } else { // Next node is the dummy footer. Move the iterator to the previous node instead. pIterator->m_pCurrent = pDestroyMe->pPrev; if (pIterator->IsHeader()) { // Ok, the iterator is now pointing to the permanent header node, which isn't good either as now the // iterator can't be used for "insert before" operations. Move to the header's "next", which should be // the footer. pIterator->m_pCurrent = pDestroyMe->pNext; PAL_ASSERT(pIterator->IsFooter()); } } // And go ahead and destroy the node. Erase(pDestroyMe); } } // ===================================================================================================================== // Private method that removes "pNode" from the list. pNode can not be null. template<typename T, typename Allocator> void List<T, Allocator>::Erase( ListNode<T>* pNode) { // Something bad has happened. We are trying to erase a node from an empty list? PAL_ASSERT(m_numElements != 0); // Can't erase a non-existant node! PAL_ASSERT(pNode != nullptr); // Make sure we're not trying to erase the permanent header or footer nodes. PAL_ASSERT((IsHeader(pNode) == false) && (IsFooter(pNode) == false)); // Connect our previous node around. pNode->pPrev->pNext = pNode->pNext; // And connect our successor around as well. pNode->pNext->pPrev = pNode->pPrev; m_numElements--; PAL_SAFE_DELETE(pNode, m_pAllocator); } } // Util
{ "content_hash": "5f2c1976b3d53b7b0c27db3c6551f8fc", "timestamp": "", "source": "github", "line_count": 199, "max_line_length": 120, "avg_line_length": 38.085427135678394, "alnum_prop": 0.5608919382504288, "repo_name": "googlestadia/pal", "id": "7c5d9223df71feba69e1cf2471751227f6ab3bf0", "size": "8997", "binary": false, "copies": "1", "ref": "refs/heads/dev", "path": "inc/util/palListImpl.h", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "837694" }, { "name": "C++", "bytes": "71724218" }, { "name": "CMake", "bytes": "144498" }, { "name": "Python", "bytes": "150479" } ], "symlink_target": "" }
package com.peterpotts.sun case object LeftBlind extends Blind( name = "Left", browUp = 95.0, browForward = 80.0, leftWallForward = 123.0, leftWallToRightWindow = 102.0, rightWallForward = 87.0, leftWindowToRightWall = 104.0)
{ "content_hash": "a648f3cdff38d972920ae8f24e7e47ab", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 36, "avg_line_length": 17.5, "alnum_prop": 0.7061224489795919, "repo_name": "peterpotts/sun", "id": "75a11ed805a18e57544f15444e29e6c6d64706e8", "size": "245", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/main/scala/com/peterpotts/sun/LeftBlind.scala", "mode": "33188", "license": "mit", "language": [ { "name": "Scala", "bytes": "18027" } ], "symlink_target": "" }
title: "Atata 1.11.1 is Released" description: "Atata 1.11.1 is released with bug fixes of NLogFileConsumer, AtataNavigator and LogManager." image: "atata-1.11.1-released.png" release_version: "1.11.1" --- [Atata {{page.release_version}}](https://www.nuget.org/packages/Atata/{{page.release_version}}) is released with bug fixes of NLogFileConsumer, AtataNavigator and LogManager. {:.lead} <!--more--> ## Changelog ### Fixes - {% include issue.md id=503 type='fx' %} `NLogFileConsumer` writes all logs to single log file - {% include issue.md id=504 type='fx' %} `AtataNavigator` doesn't set its context to `AtataContext.Current` on methods calls - {% include issue.md id=505 type='fx' %} `LogEventInfo` lacks `AtataContext` information when `AtataContext.Current` is `null` {% include download-package-link.html name="Atata" version=page.release_version %}
{ "content_hash": "8688508e59d0600d621b13916256cbc4", "timestamp": "", "source": "github", "line_count": 21, "max_line_length": 127, "avg_line_length": 41.095238095238095, "alnum_prop": 0.7334878331402086, "repo_name": "atata-framework/atata-framework.github.io", "id": "4a29afbd611e3fd4068bb55849a97077a42d50aa", "size": "867", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "_posts/2021-06-07-atata-1.11.1-released.md", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "59" }, { "name": "CSS", "bytes": "20556" }, { "name": "HTML", "bytes": "36682" }, { "name": "JavaScript", "bytes": "945" }, { "name": "Ruby", "bytes": "141" }, { "name": "SCSS", "bytes": "22338" } ], "symlink_target": "" }
using OkraConventionSample.Common; using Okra.Navigation; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.InteropServices.WindowsRuntime; using Windows.Foundation; using Windows.Foundation.Collections; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Controls.Primitives; using Windows.UI.Xaml.Data; using Windows.UI.Xaml.Input; using Windows.UI.Xaml.Media; using Windows.UI.Xaml.Navigation; // The Basic Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234237 namespace OkraConventionSample.Pages { /// <summary> /// A basic page that provides characteristics common to most applications. /// </summary> public sealed partial class BarPage : Page { public BarPage() { this.InitializeComponent(); } } }
{ "content_hash": "1497b18c49d33d67c1cf8cd9b5827a98", "timestamp": "", "source": "github", "line_count": 32, "max_line_length": 94, "avg_line_length": 27.40625, "alnum_prop": 0.7411630558722919, "repo_name": "OkraFramework/Okra-Samples", "id": "2c0f35c18d4f6109d833ec8f9246823923e1bb6b", "size": "879", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "OkraConventionSample/Pages/BarPage.xaml.cs", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C#", "bytes": "42003" } ], "symlink_target": "" }
/* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.flowable.engine.impl.bpmn.parser.handler; import org.flowable.bpmn.model.BaseElement; import org.flowable.bpmn.model.BoundaryEvent; import org.flowable.bpmn.model.Escalation; import org.flowable.bpmn.model.EscalationEventDefinition; import org.flowable.engine.impl.bpmn.parser.BpmnParse; /** * @author Tijs Rademakers */ public class EscalationEventDefinitionParseHandler extends AbstractBpmnParseHandler<EscalationEventDefinition> { @Override public Class<? extends BaseElement> getHandledType() { return EscalationEventDefinition.class; } @Override protected void executeParse(BpmnParse bpmnParse, EscalationEventDefinition eventDefinition) { if (bpmnParse.getCurrentFlowElement() instanceof BoundaryEvent) { BoundaryEvent boundaryEvent = (BoundaryEvent) bpmnParse.getCurrentFlowElement(); Escalation escalation = null; if (bpmnParse.getBpmnModel().containsEscalationRef(eventDefinition.getEscalationCode())) { escalation = bpmnParse.getBpmnModel().getEscalation(eventDefinition.getEscalationCode()); } boundaryEvent.setBehavior(bpmnParse.getActivityBehaviorFactory().createBoundaryEscalationEventActivityBehavior(boundaryEvent, eventDefinition, escalation, boundaryEvent.isCancelActivity())); } } }
{ "content_hash": "d6d7f80688519315372187dc5d9e4615", "timestamp": "", "source": "github", "line_count": 45, "max_line_length": 138, "avg_line_length": 43.666666666666664, "alnum_prop": 0.7343511450381679, "repo_name": "paulstapleton/flowable-engine", "id": "453dd3c526f836320728a4a9fff5775d9f563505", "size": "1965", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "modules/flowable-engine/src/main/java/org/flowable/engine/impl/bpmn/parser/handler/EscalationEventDefinitionParseHandler.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "166" }, { "name": "CSS", "bytes": "688913" }, { "name": "Dockerfile", "bytes": "6367" }, { "name": "Groovy", "bytes": "482" }, { "name": "HTML", "bytes": "1100650" }, { "name": "Java", "bytes": "33678803" }, { "name": "JavaScript", "bytes": "12395741" }, { "name": "PLSQL", "bytes": "109354" }, { "name": "PLpgSQL", "bytes": "11691" }, { "name": "SQLPL", "bytes": "1265" }, { "name": "Shell", "bytes": "19145" } ], "symlink_target": "" }
extern "C" { #endif #include <features.h> #define __NEED_dev_t #define __NEED_ino_t #define __NEED_mode_t #define __NEED_nlink_t #define __NEED_uid_t #define __NEED_gid_t #define __NEED_off_t #define __NEED_time_t #define __NEED_blksize_t #define __NEED_blkcnt_t #define __NEED_struct_timespec #include <bits/alltypes.h> #include <bits/stat.h> #define st_atime st_atim.tv_sec #define st_mtime st_mtim.tv_sec #define st_ctime st_ctim.tv_sec #define S_IFMT 0170000 #define S_IFDIR 0040000 #define S_IFCHR 0020000 #define S_IFBLK 0060000 #define S_IFREG 0100000 #define S_IFIFO 0010000 #define S_IFLNK 0120000 #define S_IFSOCK 0140000 #define S_TYPEISMQ(buf) 0 #define S_TYPEISSEM(buf) 0 #define S_TYPEISSHM(buf) 0 #define S_TYPEISTMO(buf) 0 #define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR) #define S_ISCHR(mode) (((mode) & S_IFMT) == S_IFCHR) #define S_ISBLK(mode) (((mode) & S_IFMT) == S_IFBLK) #define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG) #define S_ISFIFO(mode) (((mode) & S_IFMT) == S_IFIFO) #define S_ISLNK(mode) (((mode) & S_IFMT) == S_IFLNK) #define S_ISSOCK(mode) (((mode) & S_IFMT) == S_IFSOCK) #ifndef S_IRUSR #define S_ISUID 04000 #define S_ISGID 02000 #define S_ISVTX 01000 #define S_IRUSR 0400 #define S_IWUSR 0200 #define S_IXUSR 0100 #define S_IRWXU 0700 #define S_IRGRP 0040 #define S_IWGRP 0020 #define S_IXGRP 0010 #define S_IRWXG 0070 #define S_IROTH 0004 #define S_IWOTH 0002 #define S_IXOTH 0001 #define S_IRWXO 0007 #endif #define UTIME_NOW 0x3fffffff #define UTIME_OMIT 0x3ffffffe int stat(const char *__restrict, struct stat *__restrict); int fstat(int, struct stat *); int lstat(const char *__restrict, struct stat *__restrict); int fstatat(int, const char *__restrict, struct stat *__restrict, int); int chmod(const char *, mode_t); int fchmod(int, mode_t); int fchmodat(int, const char *, mode_t, int); mode_t umask(mode_t); int mkdir(const char *, mode_t); int mkfifo(const char *, mode_t); int mkdirat(int, const char *, mode_t); int mkfifoat(int, const char *, mode_t); #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) int mknod(const char *, mode_t, dev_t); int mknodat(int, const char *, mode_t, dev_t); #endif int futimens(int, const struct timespec [2]); int utimensat(int, const char *, const struct timespec [2], int); #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) int lchmod(const char *, mode_t); #define S_IREAD S_IRUSR #define S_IWRITE S_IWUSR #define S_IEXEC S_IXUSR #endif #if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE) #define stat64 stat #define fstat64 fstat #define lstat64 lstat #define fstatat64 fstatat #define blkcnt64_t blkcnt_t #define fsblkcnt64_t fsblkcnt_t #define fsfilcnt64_t fsfilcnt_t #define ino64_t ino_t #define off64_t off_t #endif #if _REDIR_TIME64 __REDIR(stat, __stat_time64); __REDIR(fstat, __fstat_time64); __REDIR(lstat, __lstat_time64); __REDIR(fstatat, __fstatat_time64); __REDIR(futimens, __futimens_time64); __REDIR(utimensat, __utimensat_time64); #endif #ifdef __cplusplus } #endif #endif
{ "content_hash": "cc063df0b8077cb91267885833780074", "timestamp": "", "source": "github", "line_count": 122, "max_line_length": 74, "avg_line_length": 24.885245901639344, "alnum_prop": 0.7035573122529645, "repo_name": "zig-lang/zig", "id": "e8a3753445ed321eb60580d2b0de97694a056be0", "size": "3095", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "lib/libc/include/generic-musl/sys/stat.h", "mode": "33188", "license": "mit", "language": [ { "name": "Batchfile", "bytes": "1667" }, { "name": "C", "bytes": "3162495" }, { "name": "C++", "bytes": "5842697" }, { "name": "CMake", "bytes": "35711" }, { "name": "Shell", "bytes": "1643" } ], "symlink_target": "" }
Adaptation and testing of the R-tree for use in Phase Change Memory
{ "content_hash": "671e5fa0575f07c923d899483921bdd0", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 68, "avg_line_length": 69, "alnum_prop": 0.7971014492753623, "repo_name": "vit-vel/PCM-R-tree", "id": "1f08c48e7457d073f3feafd1d4b8751020874499", "size": "82", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "README.md", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C++", "bytes": "61663" }, { "name": "CMake", "bytes": "184" }, { "name": "Makefile", "bytes": "134" }, { "name": "Python", "bytes": "745" }, { "name": "Shell", "bytes": "1511" } ], "symlink_target": "" }
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() DESCRIPTOR = _descriptor.FileDescriptor( name='tensorflow/contrib/tpu/proto/topology.proto', package='tensorflow.tpu', syntax='proto3', serialized_pb=_b('\n+tensorflow/contrib/tpu/proto/topology.proto\x12\x0etensorflow.tpu\"t\n\rTopologyProto\x12\x12\n\nmesh_shape\x18\x01 \x03(\x05\x12\x11\n\tnum_tasks\x18\x02 \x01(\x05\x12 \n\x18num_tpu_devices_per_task\x18\x03 \x01(\x05\x12\x1a\n\x12\x64\x65vice_coordinates\x18\x04 \x03(\x05\x42\x03\xf8\x01\x01\x62\x06proto3') ) _TOPOLOGYPROTO = _descriptor.Descriptor( name='TopologyProto', full_name='tensorflow.tpu.TopologyProto', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='mesh_shape', full_name='tensorflow.tpu.TopologyProto.mesh_shape', index=0, number=1, type=5, cpp_type=1, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='num_tasks', full_name='tensorflow.tpu.TopologyProto.num_tasks', index=1, number=2, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='num_tpu_devices_per_task', full_name='tensorflow.tpu.TopologyProto.num_tpu_devices_per_task', index=2, number=3, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='device_coordinates', full_name='tensorflow.tpu.TopologyProto.device_coordinates', index=3, number=4, type=5, cpp_type=1, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=63, serialized_end=179, ) DESCRIPTOR.message_types_by_name['TopologyProto'] = _TOPOLOGYPROTO _sym_db.RegisterFileDescriptor(DESCRIPTOR) TopologyProto = _reflection.GeneratedProtocolMessageType('TopologyProto', (_message.Message,), dict( DESCRIPTOR = _TOPOLOGYPROTO, __module__ = 'tensorflow.contrib.tpu.proto.topology_pb2' # @@protoc_insertion_point(class_scope:tensorflow.tpu.TopologyProto) )) _sym_db.RegisterMessage(TopologyProto) DESCRIPTOR.has_options = True DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\370\001\001')) # @@protoc_insertion_point(module_scope)
{ "content_hash": "f3dd64512963443be1c595df4d3324b0", "timestamp": "", "source": "github", "line_count": 89, "max_line_length": 332, "avg_line_length": 37.943820224719104, "alnum_prop": 0.7234231566479123, "repo_name": "ryfeus/lambda-packs", "id": "81c992016e087438c9e481dea6ee33d5c5963f7c", "size": "3491", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Keras_tensorflow_nightly/source2.7/tensorflow/contrib/tpu/proto/topology_pb2.py", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "9768343" }, { "name": "C++", "bytes": "76566960" }, { "name": "CMake", "bytes": "191097" }, { "name": "CSS", "bytes": "153538" }, { "name": "Cuda", "bytes": "61768" }, { "name": "Cython", "bytes": "3110222" }, { "name": "Fortran", "bytes": "110284" }, { "name": "HTML", "bytes": "248658" }, { "name": "JavaScript", "bytes": "62920" }, { "name": "MATLAB", "bytes": "17384" }, { "name": "Makefile", "bytes": "152150" }, { "name": "Python", "bytes": "549307737" }, { "name": "Roff", "bytes": "26398" }, { "name": "SWIG", "bytes": "142" }, { "name": "Shell", "bytes": "7790" }, { "name": "Smarty", "bytes": "4090" }, { "name": "TeX", "bytes": "152062" }, { "name": "XSLT", "bytes": "305540" } ], "symlink_target": "" }
package org.oliot.epcis.serde.mongodb; import java.util.ArrayList; import java.util.GregorianCalendar; import java.util.List; import org.oliot.model.epcis.BusinessLocationType; import org.oliot.model.epcis.BusinessTransactionListType; import org.oliot.model.epcis.BusinessTransactionType; import org.oliot.model.epcis.EPC; import org.oliot.model.epcis.EPCISEventExtensionType; import org.oliot.model.epcis.EPCListType; import org.oliot.model.epcis.ReadPointType; import org.oliot.model.epcis.TransactionEventExtensionType; import org.oliot.model.epcis.TransactionEventType; import org.springframework.core.convert.converter.Converter; import org.springframework.data.convert.WritingConverter; import org.springframework.stereotype.Component; import com.mongodb.BasicDBObject; import com.mongodb.DBObject; import static org.oliot.epcis.serde.mongodb.MongoWriterUtil.*; @Component @WritingConverter public class TransactionEventWriteConverter implements Converter<TransactionEventType, DBObject> { public DBObject convert(TransactionEventType transactionEventType) { DBObject dbo = new BasicDBObject(); // Base Extension if (transactionEventType.getBaseExtension() != null) { EPCISEventExtensionType baseExtensionType = transactionEventType .getBaseExtension(); DBObject baseExtension = getBaseExtensionObject(baseExtensionType); dbo.put("baseExtension", baseExtension); } // Event Time if (transactionEventType.getEventTime() != null) dbo.put("eventTime", transactionEventType.getEventTime() .toGregorianCalendar().getTimeInMillis()); // Event Time Zone if (transactionEventType.getEventTimeZoneOffset() != null) dbo.put("eventTimeZoneOffset", transactionEventType.getEventTimeZoneOffset()); // Record Time : according to M5 GregorianCalendar recordTime = new GregorianCalendar(); long recordTimeMilis = recordTime.getTimeInMillis(); dbo.put("recordTime", recordTimeMilis); // Parent ID if (transactionEventType.getParentID() != null) dbo.put("parentID", transactionEventType.getParentID()); // EPC List if (transactionEventType.getEpcList() != null) { EPCListType epcs = transactionEventType.getEpcList(); List<EPC> epcList = epcs.getEpc(); List<DBObject> epcDBList = new ArrayList<DBObject>(); for (int i = 0; i < epcList.size(); i++) { DBObject epcDB = new BasicDBObject(); epcDB.put("epc", epcList.get(i).getValue()); epcDBList.add(epcDB); } dbo.put("epcList", epcDBList); } // Action if (transactionEventType.getAction() != null) dbo.put("action", transactionEventType.getAction().name()); // BizStep if (transactionEventType.getBizStep() != null) dbo.put("bizStep", transactionEventType.getBizStep()); // Disposition if (transactionEventType.getDisposition() != null) dbo.put("disposition", transactionEventType.getDisposition()); if (transactionEventType.getReadPoint() != null) { ReadPointType readPointType = transactionEventType.getReadPoint(); DBObject readPoint = getReadPointObject(readPointType); dbo.put("readPoint", readPoint); } if (transactionEventType.getBizLocation() != null) { BusinessLocationType bizLocationType = transactionEventType .getBizLocation(); DBObject bizLocation = getBizLocationObject(bizLocationType); dbo.put("bizLocation", bizLocation); } if (transactionEventType.getBizTransactionList() != null) { BusinessTransactionListType bizListType = transactionEventType .getBizTransactionList(); List<BusinessTransactionType> bizList = bizListType .getBizTransaction(); List<DBObject> bizTranList = getBizTransactionObjectList(bizList); dbo.put("bizTransactionList", bizTranList); } // Extension if (transactionEventType.getExtension() != null) { TransactionEventExtensionType oee = transactionEventType .getExtension(); DBObject extension = getTransactionEventExtensionObject(oee); dbo.put("extension", extension); } return dbo; } }
{ "content_hash": "a65344c7574bacbefa63635d1098c6d9", "timestamp": "", "source": "github", "line_count": 107, "max_line_length": 70, "avg_line_length": 37.1588785046729, "alnum_prop": 0.7643360160965795, "repo_name": "kyle0311/oliot-epcis-1.1", "id": "d300986b5e2785c90bed4128eb0fddd201933eec", "size": "4509", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "epcis/src/main/java/org/oliot/epcis/serde/mongodb/TransactionEventWriteConverter.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "2661" }, { "name": "HTML", "bytes": "20266" }, { "name": "Java", "bytes": "1026931" } ], "symlink_target": "" }
from lib.common import helpers class Module: def __init__(self, mainMenu, params=[]): self.info = { 'Name': 'Get-WMIRegCachedRDPConnection', 'Author': ['@harmj0y'], 'Description': ('Uses remote registry functionality to query all entries for the ' 'Windows Remote Desktop Connection Client" on a machine. Part of PowerView.'), 'Background' : True, 'OutputExtension' : None, 'NeedsAdmin' : False, 'OpsecSafe' : True, 'Language' : 'powershell', 'MinLanguageVersion' : '2', 'Comments': [ 'https://github.com/PowerShellMafia/PowerSploit/blob/dev/Recon/' ] } # any options needed by the module, settable during runtime self.options = { # format: # value_name : {description, required, default_value} 'Agent' : { 'Description' : 'Agent to run module on.', 'Required' : True, 'Value' : '' }, 'ComputerName' : { 'Description' : 'The hostname or IP to query for local group users.', 'Required' : False, 'Value' : 'localhost' } } # save off a copy of the mainMenu object to access external functionality # like listeners/agent handlers/etc. self.mainMenu = mainMenu for param in params: # parameter format is [Name, Value] option, value = param if option in self.options: self.options[option]['Value'] = value def generate(self, obfuscate=False, obfuscationCommand=""): moduleName = self.info["Name"] # read in the common powerview.ps1 module source code moduleSource = self.mainMenu.installPath + "/data/module_source/situational_awareness/network/powerview.ps1" try: f = open(moduleSource, 'r') except: print helpers.color("[!] Could not read module source path at: " + str(moduleSource)) return "" moduleCode = f.read() f.close() # get just the code needed for the specified function script = helpers.strip_powershell_comments(moduleCode) script += "\n" + moduleName + " " for option,values in self.options.iteritems(): if option.lower() != "agent": if values['Value'] and values['Value'] != '': if values['Value'].lower() == "true": # if we're just adding a switch script += " -" + str(option) else: script += " -" + str(option) + " " + str(values['Value']) script += ' | Out-String | %{$_ + \"`n\"};"`n'+str(moduleName)+' completed!"' if obfuscate: script = helpers.obfuscate(self.mainMenu.installPath, psScript=script, obfuscationCommand=obfuscationCommand) return script
{ "content_hash": "55717764accad42b199d585de83a6a87", "timestamp": "", "source": "github", "line_count": 92, "max_line_length": 121, "avg_line_length": 34.43478260869565, "alnum_prop": 0.51010101010101, "repo_name": "EmpireProject/Empire", "id": "7342618da523efb15c195c7917417ce0414511b9", "size": "3168", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "lib/modules/powershell/situational_awareness/network/powerview/get_cached_rdpconnection.py", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "C", "bytes": "1966" }, { "name": "C#", "bytes": "1893" }, { "name": "Dockerfile", "bytes": "1870" }, { "name": "Java", "bytes": "496" }, { "name": "Objective-C", "bytes": "2664" }, { "name": "PHP", "bytes": "2198" }, { "name": "PowerShell", "bytes": "17009836" }, { "name": "Python", "bytes": "2965491" }, { "name": "Shell", "bytes": "10525" } ], "symlink_target": "" }
"use strict"; var JWS = { createSign: require("./sign").createSign, createVerify: require("./verify").createVerify }; module.exports = JWS;
{ "content_hash": "27c8274a4d3125a855110267b9ac64c1", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 48, "avg_line_length": 16.333333333333332, "alnum_prop": 0.673469387755102, "repo_name": "cisco/node-jose", "id": "adabcbcdb41ba6a1e5cf0431927ad37b82fa9df8", "size": "272", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "lib/jws/index.js", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "JavaScript", "bytes": "658890" }, { "name": "Shell", "bytes": "2004" } ], "symlink_target": "" }
foam.CLASS({ package: 'foam.box', name: 'RawWebSocketBox', implements: ['foam.box.Box'], requires: [ 'foam.box.ReplyBox' ], imports: [ { name: 'me', key: 'me', type: 'foam.box.Box' }, { key: 'registry', name: 'registry', type: 'foam.box.BoxRegistry', } ], properties: [ { class: 'Object', name: 'socket', javaType: 'foam.net.WebSocket' } ], classes: [ foam.core.InnerClass.create({ generateJava: false, model: { name: 'JSONOutputter', extends: 'foam.json.Outputter', requires: [ 'foam.box.ReturnBox' ], imports: [ 'me' ], methods: [ function output(o) { if ( o === this.me ) { return this.SUPER(this.ReturnBox.create()); } return this.SUPER(o); } ] } }) ], methods: [ { name: 'send', code: function send(msg) { var replyBox = msg.attributes.replyBox; var payload = this.JSONOutputter.create().copyFrom(foam.json.Network).stringify(msg); try { this.socket.send(payload); } catch(e) { replyBox && replyBox.send(foam.box.Message.create({ object: e })); } }, javaCode: ` foam.lib.json.Outputter outputter = new Outputter(getX()); outputter.setX(getX()); // TODO: Clone message or something when it clones safely. foam.box.Box replyBox = (foam.box.Box)msg.getAttributes().get("replyBox"); if ( replyBox != null ) { foam.box.SubBox export = (foam.box.SubBox)getRegistry().register(null, null, replyBox); replyBox = new foam.box.ReplyBox(getX(), export.getName(), replyBox); } String payload = outputter.stringify(msg); msg.getAttributes().put("replyBox", replyBox); try { getSocket().send(payload); } catch ( java.io.IOException e ) { foam.box.Message reply = new foam.box.Message(); reply.setObject(e); if ( replyBox != null ) replyBox.send(reply); } ` } ], axioms: [ { name: 'javaExtras', buildJavaClass: function(cls) { cls.extras.push(foam.java.Code.create({ data: ` protected class Outputter extends foam.lib.json.Outputter { public Outputter(foam.core.X x) { super(x); setPropertyPredicate(new foam.lib.AndPropertyPredicate(x, new foam.lib.PropertyPredicate[] {new foam.lib.NetworkPropertyPredicate(), new foam.lib.PermissionedPropertyPredicate()})); } protected void outputFObject(foam.core.FObject o) { if ( o == getMe() ) { o = getX().create(foam.box.ReturnBox.class); } super.outputFObject(o); } } `})); } } ] });
{ "content_hash": "cf3b163b3baac8baf4b53d8939c59360", "timestamp": "", "source": "github", "line_count": 119, "max_line_length": 185, "avg_line_length": 22.73949579831933, "alnum_prop": 0.5720620842572062, "repo_name": "foam-framework/foam2", "id": "3dd38eb2141f8dddb94f6514dffd33464045bb91", "size": "3340", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "src/foam/box/RawWebSocketBox.js", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "20356" }, { "name": "HTML", "bytes": "10220505" }, { "name": "Java", "bytes": "977816" }, { "name": "JavaScript", "bytes": "7065731" }, { "name": "Makefile", "bytes": "7676" }, { "name": "Shell", "bytes": "5963" }, { "name": "Swift", "bytes": "19039" } ], "symlink_target": "" }
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2009.10.28 at 02:32:58 PM MST // package info.fedora.foxml; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for stateType. * * <p>The following schema fragment specifies the expected content contained within this class. * <p> * <pre> * &lt;simpleType name="stateType"> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"> * &lt;enumeration value="A"/> * &lt;enumeration value="D"/> * &lt;enumeration value="I"/> * &lt;/restriction> * &lt;/simpleType> * </pre> * */ @XmlType(name = "stateType") @XmlEnum public enum StateType { A, D, I; public String value() { return name(); } public static StateType fromValue(String v) { return valueOf(v); } }
{ "content_hash": "29c24ac27658dd80b1055c84c1ce9b43", "timestamp": "", "source": "github", "line_count": 47, "max_line_length": 124, "avg_line_length": 23.76595744680851, "alnum_prop": 0.6553267681289168, "repo_name": "digital-antiquity/repo-metadata", "id": "4ac46ae0817e749b64f0b636d55df25a55e37000", "size": "1117", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/main/java/info/fedora/foxml/StateType.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "2028980" } ], "symlink_target": "" }
/****************************************************************************** gif_lib.h - service library for decoding and encoding GIF images *****************************************************************************/ #ifndef _GIF_LIB_H_ #define _GIF_LIB_H_ 1 #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #define GIFLIB_MAJOR 5 #define GIFLIB_MINOR 0 #define GIFLIB_RELEASE 5 #define GIF_ERROR 0 #define GIF_OK 1 #include <stddef.h> #include <stdbool.h> #define GIF_STAMP "GIFVER" /* First chars in file - GIF stamp. */ #define GIF_STAMP_LEN sizeof(GIF_STAMP) - 1 #define GIF_VERSION_POS 3 /* Version first character in stamp. */ #define GIF87_STAMP "GIF87a" /* First chars in file - GIF stamp. */ #define GIF89_STAMP "GIF89a" /* First chars in file - GIF stamp. */ typedef unsigned char GifPixelType; typedef unsigned char *GifRowType; typedef unsigned char GifByteType; typedef unsigned int GifPrefixType; typedef int GifWord; typedef struct GifColorType { GifByteType Red, Green, Blue; } GifColorType; typedef struct ColorMapObject { int ColorCount; int BitsPerPixel; bool SortFlag; GifColorType *Colors; /* on malloc(3) heap */ } ColorMapObject; typedef struct GifImageDesc { GifWord Left, Top, Width, Height; /* Current image dimensions. */ bool Interlace; /* Sequential/Interlaced lines. */ ColorMapObject *ColorMap; /* The local color map */ } GifImageDesc; typedef struct ExtensionBlock { int ByteCount; GifByteType *Bytes; /* on malloc(3) heap */ int Function; /* The block function code */ #define CONTINUE_EXT_FUNC_CODE 0x00 /* continuation subblock */ #define COMMENT_EXT_FUNC_CODE 0xfe /* comment */ #define GRAPHICS_EXT_FUNC_CODE 0xf9 /* graphics control (GIF89) */ #define PLAINTEXT_EXT_FUNC_CODE 0x01 /* plaintext */ #define APPLICATION_EXT_FUNC_CODE 0xff /* application block */ } ExtensionBlock; typedef struct SavedImage { GifImageDesc ImageDesc; GifByteType *RasterBits; /* on malloc(3) heap */ int ExtensionBlockCount; /* Count of extensions before image */ ExtensionBlock *ExtensionBlocks; /* Extensions before image */ } SavedImage; typedef struct GifFileType { GifWord SWidth, SHeight; /* Size of virtual canvas */ GifWord SColorResolution; /* How many colors can we generate? */ GifWord SBackGroundColor; /* Background color for virtual canvas */ GifByteType AspectByte; /* Used to compute pixel aspect ratio */ ColorMapObject *SColorMap; /* Global colormap, NULL if nonexistent. */ int ImageCount; /* Number of current image (both APIs) */ GifImageDesc Image; /* Current image (low-level API) */ SavedImage *SavedImages; /* Image sequence (high-level API) */ int ExtensionBlockCount; /* Count extensions past last image */ ExtensionBlock *ExtensionBlocks; /* Extensions past last image */ int Error; /* Last error condition reported */ void *UserData; /* hook to attach user data (TVT) */ void *Private; /* Don't mess with this! */ } GifFileType; #define GIF_ASPECT_RATIO(n) ((n)+15.0/64.0) typedef enum { UNDEFINED_RECORD_TYPE, SCREEN_DESC_RECORD_TYPE, IMAGE_DESC_RECORD_TYPE, /* Begin with ',' */ EXTENSION_RECORD_TYPE, /* Begin with '!' */ TERMINATE_RECORD_TYPE /* Begin with ';' */ } GifRecordType; /* func type to read gif data from arbitrary sources (TVT) */ typedef int (*InputFunc) (GifFileType *, GifByteType *, int); /* func type to write gif data to arbitrary targets. * Returns count of bytes written. (MRB) */ typedef int (*OutputFunc) (GifFileType *, const GifByteType *, int); /****************************************************************************** GIF89 structures ******************************************************************************/ typedef struct GraphicsControlBlock { int DisposalMode; #define DISPOSAL_UNSPECIFIED 0 /* No disposal specified. */ #define DISPOSE_DO_NOT 1 /* Leave image in place */ #define DISPOSE_BACKGROUND 2 /* Set area too background color */ #define DISPOSE_PREVIOUS 3 /* Restore to previous content */ bool UserInputFlag; /* User confirmation required before disposal */ int DelayTime; /* pre-display delay in 0.01sec units */ int TransparentColor; /* Palette index for transparency, -1 if none */ #define NO_TRANSPARENT_COLOR -1 } GraphicsControlBlock; /****************************************************************************** GIF encoding routines ******************************************************************************/ /* Main entry points */ GifFileType *EGifOpenFileName(const char *GifFileName, const bool GifTestExistence, int *Error); GifFileType *EGifOpenFileHandle(const int GifFileHandle, int *Error); GifFileType *EGifOpen(void *userPtr, OutputFunc writeFunc, int *Error); int EGifSpew(GifFileType * GifFile); char *EGifGetGifVersion(GifFileType *GifFile); /* new in 5.x */ int EGifCloseFile(GifFileType * GifFile); #define E_GIF_ERR_OPEN_FAILED 1 /* And EGif possible errors. */ #define E_GIF_ERR_WRITE_FAILED 2 #define E_GIF_ERR_HAS_SCRN_DSCR 3 #define E_GIF_ERR_HAS_IMAG_DSCR 4 #define E_GIF_ERR_NO_COLOR_MAP 5 #define E_GIF_ERR_DATA_TOO_BIG 6 #define E_GIF_ERR_NOT_ENOUGH_MEM 7 #define E_GIF_ERR_DISK_IS_FULL 8 #define E_GIF_ERR_CLOSE_FAILED 9 #define E_GIF_ERR_NOT_WRITEABLE 10 /* These are legacy. You probably do not want to call them directly */ int EGifPutScreenDesc(GifFileType *GifFile, const int GifWidth, const int GifHeight, const int GifColorRes, const int GifBackGround, const ColorMapObject *GifColorMap); int EGifPutImageDesc(GifFileType *GifFile, const int GifLeft, const int GifTop, const int GifWidth, const int GifHeight, const bool GifInterlace, const ColorMapObject *GifColorMap); void EGifSetGifVersion(GifFileType *GifFile, const bool gif89); int EGifPutLine(GifFileType *GifFile, GifPixelType *GifLine, int GifLineLen); int EGifPutPixel(GifFileType *GifFile, const GifPixelType GifPixel); int EGifPutComment(GifFileType *GifFile, const char *GifComment); int EGifPutExtensionLeader(GifFileType *GifFile, const int GifExtCode); int EGifPutExtensionBlock(GifFileType *GifFile, const int GifExtLen, const void *GifExtension); int EGifPutExtensionTrailer(GifFileType *GifFile); int EGifPutExtension(GifFileType *GifFile, const int GifExtCode, const int GifExtLen, const void *GifExtension); int EGifPutCode(GifFileType *GifFile, int GifCodeSize, const GifByteType *GifCodeBlock); int EGifPutCodeNext(GifFileType *GifFile, const GifByteType *GifCodeBlock); /****************************************************************************** GIF decoding routines ******************************************************************************/ /* Main entry points */ GifFileType *DGifOpenFileName(const char *GifFileName, int *Error); GifFileType *DGifOpenFileHandle(int GifFileHandle, int *Error); int DGifSlurp(GifFileType * GifFile); GifFileType *DGifOpen(void *userPtr, InputFunc readFunc, int *Error); /* new one (TVT) */ int DGifCloseFile(GifFileType * GifFile); #define D_GIF_ERR_OPEN_FAILED 101 /* And DGif possible errors. */ #define D_GIF_ERR_READ_FAILED 102 #define D_GIF_ERR_NOT_GIF_FILE 103 #define D_GIF_ERR_NO_SCRN_DSCR 104 #define D_GIF_ERR_NO_IMAG_DSCR 105 #define D_GIF_ERR_NO_COLOR_MAP 106 #define D_GIF_ERR_WRONG_RECORD 107 #define D_GIF_ERR_DATA_TOO_BIG 108 #define D_GIF_ERR_NOT_ENOUGH_MEM 109 #define D_GIF_ERR_CLOSE_FAILED 110 #define D_GIF_ERR_NOT_READABLE 111 #define D_GIF_ERR_IMAGE_DEFECT 112 #define D_GIF_ERR_EOF_TOO_SOON 113 /* These are legacy. You probably do not want to call them directly */ int DGifGetScreenDesc(GifFileType *GifFile); int DGifGetRecordType(GifFileType *GifFile, GifRecordType *GifType); int DGifGetImageDesc(GifFileType *GifFile, bool changeImageCount); int DGifGetLine(GifFileType *GifFile, GifPixelType *GifLine, int GifLineLen); int DGifGetPixel(GifFileType *GifFile, GifPixelType GifPixel); int DGifGetComment(GifFileType *GifFile, char *GifComment); int DGifGetExtension(GifFileType *GifFile, int *GifExtCode, GifByteType **GifExtension); int DGifGetExtensionNext(GifFileType *GifFile, GifByteType **GifExtension,int* ExtCode); int DGifGetCode(GifFileType *GifFile, int *GifCodeSize, GifByteType **GifCodeBlock); int DGifGetCodeNext(GifFileType *GifFile, GifByteType **GifCodeBlock); int DGifGetLZCodes(GifFileType *GifFile, int *GifCode); /****************************************************************************** Color table quantization (deprecated) ******************************************************************************/ int GifQuantizeBuffer(unsigned int Width, unsigned int Height, int *ColorMapSize, GifByteType * RedInput, GifByteType * GreenInput, GifByteType * BlueInput, GifByteType * OutputBuffer, GifColorType * OutputColorMap); /****************************************************************************** Error handling and reporting. ******************************************************************************/ extern char *GifErrorString(int ErrorCode); /* new in 2012 - ESR */ /***************************************************************************** Everything below this point is new after version 1.2, supporting `slurp mode' for doing I/O in two big belts with all the image-bashing in core. ******************************************************************************/ /****************************************************************************** Color map handling from gif_alloc.c ******************************************************************************/ extern ColorMapObject *GifMakeMapObject(int ColorCount, const GifColorType *ColorMap); extern void GifFreeMapObject(ColorMapObject *Object); extern ColorMapObject *GifUnionColorMap(const ColorMapObject *ColorIn1, const ColorMapObject *ColorIn2, GifPixelType ColorTransIn2[]); extern int GifBitSize(int n); /****************************************************************************** Support for the in-core structures allocation (slurp mode). ******************************************************************************/ extern void GifApplyTranslation(SavedImage *Image, GifPixelType Translation[]); extern int GifAddExtensionBlock(int *ExtensionBlock_Count, ExtensionBlock **ExtensionBlocks, int Function, unsigned int Len, unsigned char ExtData[]); extern void GifFreeExtensions(int *ExtensionBlock_Count, ExtensionBlock **ExtensionBlocks); extern SavedImage *GifMakeSavedImage(GifFileType *GifFile, const SavedImage *CopyFrom); extern void GifFreeSavedImages(GifFileType *GifFile); /****************************************************************************** 5.x functions for GIF89 graphics control blocks ******************************************************************************/ int DGifExtensionToGCB(const size_t GifExtensionLength, const GifByteType *GifExtension, GraphicsControlBlock *GCB); size_t EGifGCBToExtension(const GraphicsControlBlock *GCB, GifByteType *GifExtension); int DGifSavedExtensionToGCB(GifFileType *GifFile, int ImageIndex, GraphicsControlBlock *GCB); int EGifGCBToSavedExtension(const GraphicsControlBlock *GCB, GifFileType *GifFile, int ImageIndex); /****************************************************************************** The library's internal utility font ******************************************************************************/ #define GIF_FONT_WIDTH 8 #define GIF_FONT_HEIGHT 8 extern const unsigned char GifAsciiTable8x8[][GIF_FONT_WIDTH]; extern void GifDrawText8x8(SavedImage *Image, const int x, const int y, const char *legend, const int color); extern void GifDrawBox(SavedImage *Image, const int x, const int y, const int w, const int d, const int color); extern void GifDrawRectangle(SavedImage *Image, const int x, const int y, const int w, const int d, const int color); extern void GifDrawBoxedText8x8(SavedImage *Image, const int x, const int y, const char *legend, const int border, const int bg, const int fg); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* _GIF_LIB_H */ /* end */
{ "content_hash": "5f524ce32bdc2241e7cdd1d6764b59e9", "timestamp": "", "source": "github", "line_count": 307, "max_line_length": 92, "avg_line_length": 43.39087947882736, "alnum_prop": 0.5859920426394415, "repo_name": "justomiguel/CustomMessenger", "id": "b7aa9301d348bb021afa05d2fbf6711bce7a958a", "size": "13321", "binary": false, "copies": "160", "ref": "refs/heads/master", "path": "TMessagesProj/jni/giflib/gif_lib.h", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Assembly", "bytes": "64055" }, { "name": "C", "bytes": "8998101" }, { "name": "C++", "bytes": "2248129" }, { "name": "Java", "bytes": "3507243" }, { "name": "Makefile", "bytes": "7049719" }, { "name": "Objective-C", "bytes": "25463" }, { "name": "Perl", "bytes": "8945" } ], "symlink_target": "" }
@interface MainTableViewController : UITableViewController @end
{ "content_hash": "b92e8c0f0ca011f95c461f4eee11f9df", "timestamp": "", "source": "github", "line_count": 3, "max_line_length": 58, "avg_line_length": 21.666666666666668, "alnum_prop": 0.8615384615384616, "repo_name": "dennisxu1014/dennisxu-accumulation-ios", "id": "0f7ca705fe82aefe652f5bd4491ef61f86664e14", "size": "242", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "ProjectAccumulation/ProjectAccumulation/MainTableViewController.h", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C", "bytes": "30543" }, { "name": "Objective-C", "bytes": "884697" }, { "name": "Ruby", "bytes": "260" }, { "name": "Shell", "bytes": "4587" } ], "symlink_target": "" }
FROM balenalib/orbitty-tx2-debian:stretch-run RUN apt-get update \ && apt-get install -y --no-install-recommends \ ca-certificates \ curl \ \ # .NET Core dependencies libc6 \ libgcc1 \ libgssapi-krb5-2 \ libicu57 \ libssl1.1 \ libstdc++6 \ zlib1g \ && rm -rf /var/lib/apt/lists/* # Configure web servers to bind to port 80 when present ENV ASPNETCORE_URLS=http://+:80 \ # Enable detection of running in a container DOTNET_RUNNING_IN_CONTAINER=true # Install .NET Core SDK ENV DOTNET_SDK_VERSION 3.1.415 RUN curl -SL --output dotnet.tar.gz "https://dotnetcli.blob.core.windows.net/dotnet/Sdk/$DOTNET_SDK_VERSION/dotnet-sdk-$DOTNET_SDK_VERSION-linux-arm64.tar.gz" \ && dotnet_sha512='7a5b9922988bcbde63d39f97e283ca1d373d5521cca0ab8946e2f86deaef6e21f00244228a0d5d8c38c2b9634b38bc7338b61984f0e12dd8fdb8b2e6eed5dd34' \ && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ && mkdir -p /usr/share/dotnet \ && tar -zxf dotnet.tar.gz -C /usr/share/dotnet \ && rm dotnet.tar.gz \ && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet # Enable correct mode for dotnet watch (only mode supported in a container) ENV DOTNET_USE_POLLING_FILE_WATCHER=true \ # Skip extraction of XML docs - generally not useful within an image/container - helps performance NUGET_XMLDOC_MODE=skip \ DOTNET_NOLOGO=true # Trigger first run experience by running arbitrary cmd to populate local package cache RUN dotnet help CMD ["echo","'No CMD command was set in Dockerfile! Details about CMD command could be found in Dockerfile Guide section in our Docs. Here's the link: https://balena.io/docs"] RUN curl -SLO "https://raw.githubusercontent.com/balena-io-library/base-images/44e597e40f2010cdde15b3ba1e397aea3a5c5271/scripts/assets/tests/[email protected]" \ && echo "Running test-stack@dotnet" \ && chmod +x [email protected] \ && bash [email protected] \ && rm -rf [email protected] RUN [ ! -d /.balena/messages ] && mkdir -p /.balena/messages; echo 'Here are a few details about this Docker image (For more information please visit https://www.balena.io/docs/reference/base-images/base-images/): \nArchitecture: ARM v8 \nOS: Debian Stretch \nVariant: run variant \nDefault variable(s): UDEV=off \nThe following software stack is preinstalled: \ndotnet 3.1-sdk \nExtra features: \n- Easy way to install packages with `install_packages <package-name>` command \n- Run anywhere with cross-build feature (for ARM only) \n- Keep the container idling with `balena-idle` command \n- Show base image details with `balena-info` command' > /.balena/messages/image-info RUN echo '#!/bin/sh.real\nbalena-info\nrm -f /bin/sh\ncp /bin/sh.real /bin/sh\n/bin/sh "$@"' > /bin/sh-shim \ && chmod +x /bin/sh-shim \ && cp /bin/sh /bin/sh.real \ && mv /bin/sh-shim /bin/sh
{ "content_hash": "77eb8559df92bf391765900fcc287308", "timestamp": "", "source": "github", "line_count": 56, "max_line_length": 677, "avg_line_length": 51.660714285714285, "alnum_prop": 0.7103352920843415, "repo_name": "resin-io-library/base-images", "id": "9b8a8de9958d82897f21a2b9493e2a90d47f9291", "size": "2914", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "balena-base-images/dotnet/orbitty-tx2/debian/stretch/3.1-sdk/run/Dockerfile", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Dockerfile", "bytes": "71234697" }, { "name": "JavaScript", "bytes": "13096" }, { "name": "Shell", "bytes": "12051936" }, { "name": "Smarty", "bytes": "59789" } ], "symlink_target": "" }
<?xml version="1.0" encoding="UTF-8"?> <!-- JBoss, Home of Professional Open Source Copyright 2014, Red Hat, Inc. and/or its affiliates, and individual contributors by the @authors tag. See the copyright.txt in the distribution for a full listing of individual contributors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <faces-config version="2.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"> </faces-config>
{ "content_hash": "0c1f8740d3ebfa1e657d9075be8b886f", "timestamp": "", "source": "github", "line_count": 21, "max_line_length": 171, "avg_line_length": 55.04761904761905, "alnum_prop": 0.7318339100346021, "repo_name": "luiz158/jboss-wfk-quickstarts", "id": "7de6af006bd308aa8e3c075470acbf334a16fb28", "size": "1156", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "richfaces-validation/src/main/webapp/WEB-INF/faces-config.xml", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C#", "bytes": "60417" }, { "name": "C++", "bytes": "67689" }, { "name": "CSS", "bytes": "130156" }, { "name": "HTML", "bytes": "251710" }, { "name": "Java", "bytes": "1199331" }, { "name": "JavaScript", "bytes": "4132956" }, { "name": "Objective-C", "bytes": "184312" }, { "name": "QML", "bytes": "1246" }, { "name": "Ruby", "bytes": "5168" }, { "name": "Shell", "bytes": "10240" } ], "symlink_target": "" }
module RuboCop module Cop module Rails # This cop checks for the use of `Time.zone=` method. # # The `zone` attribute persists for the rest of the Ruby runtime, potentially causing # unexpected behavior at a later time. # Using `Time.use_zone` ensures the code passed in the block is the only place Time.zone is affected. # It eliminates the possibility of a `zone` sticking around longer than intended. # # @example # # bad # Time.zone = 'EST' # # # good # Time.use_zone('EST') do # end # class TimeZoneAssignment < Base MSG = 'Use `Time.use_zone` with block instead of `Time.zone=`.' RESTRICT_ON_SEND = %i[zone=].freeze def_node_matcher :time_zone_assignement?, <<~PATTERN (send (const nil? :Time) :zone= ...) PATTERN def on_send(node) return unless time_zone_assignement?(node) add_offense(node) end end end end end
{ "content_hash": "c486e00817f13895ff3ac6aad1afeb5c", "timestamp": "", "source": "github", "line_count": 35, "max_line_length": 107, "avg_line_length": 29.257142857142856, "alnum_prop": 0.5810546875, "repo_name": "EricFromCanada/brew", "id": "d279d4565ebbb166b58bb74c53d9633333c58aa5", "size": "1055", "binary": false, "copies": "2", "ref": "refs/heads/dependabot-begone", "path": "Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rails-2.12.4/lib/rubocop/cop/rails/time_zone_assignment.rb", "mode": "33188", "license": "bsd-2-clause", "language": [ { "name": "Dockerfile", "bytes": "1751" }, { "name": "HTML", "bytes": "29537" }, { "name": "PostScript", "bytes": "485" }, { "name": "Roff", "bytes": "101078" }, { "name": "Ruby", "bytes": "5517246" }, { "name": "Shell", "bytes": "251021" }, { "name": "Swift", "bytes": "1788" } ], "symlink_target": "" }
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#58000000" android:gravity="bottom"> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingBottom="20dp" android:layout_marginLeft="20dp" android:layout_marginRight="20dp" android:background="@color/color_white"> <ImageView android:id="@+id/piece_wash_popup_item_img" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_marginBottom="20dp" android:layout_marginLeft="15dp" android:layout_marginRight="15dp" android:layout_marginTop="15dp" android:background="@drawable/clothes_background" android:padding="5dp" android:paddingBottom="5dp" android:src="@drawable/daixis" /> <TextView android:id="@+id/piece_wash_popup_item_name" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignTop="@+id/piece_wash_popup_item_img" android:layout_marginBottom="5dp" android:layout_toRightOf="@+id/piece_wash_popup_item_img" android:paddingTop="0dp" android:text="袋洗" android:textSize="20sp" /> <TextView android:id="@+id/textView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/piece_wash_popup_item_name" android:layout_toRightOf="@+id/piece_wash_popup_item_img" android:text="¥" android:layout_marginRight="@dimen/DIMEN_10PX" android:textColor="@color/color_origin" android:textSize="20sp" /> <TextView android:id="@+id/piece_wash_popup_item_price" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@id/textView" android:layout_toRightOf="@id/textView" android:text="99" android:textColor="@color/color_origin" android:textSize="20sp" /> <TextView android:id="@+id/piece_wash_popup_item_descrise" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/textView" android:layout_marginBottom="5dp" android:layout_marginTop="15dp" android:layout_toRightOf="@+id/piece_wash_popup_item_img" android:text="@string/popup_describe01" android:textSize="12sp" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/piece_wash_popup_item_descrise" android:layout_marginBottom="10dp" android:layout_toRightOf="@+id/piece_wash_popup_item_img" android:lineSpacingExtra="2dp" android:lines="2" android:text="@string/popup_decrisbe02" android:textSize="12sp" /> <LinearLayout android:id="@+id/piece_wash_btn_select" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_below="@id/piece_wash_popup_item_img" android:layout_marginRight="20dp" android:gravity="center_vertical" android:orientation="horizontal"> <TextView android:id="@+id/packet_item_cut" android:layout_width="50dp" android:layout_height="40dp" android:background="@drawable/cut_sel" /> <TextView android:id="@+id/packet_item_count" android:layout_width="60dp" android:layout_height="40dp" android:background="@drawable/basket_list_item_img07" android:gravity="center" android:text="@string/num_1" android:textColor="@color/color_origin" android:textSize="20sp" /> <TextView android:id="@+id/packet_item_add" android:layout_width="50dp" android:layout_height="40dp" android:background="@drawable/add_sel"/> </LinearLayout> <Button android:id="@+id/packet_item_btn" android:layout_width="match_parent" android:layout_height="45dp" android:layout_below="@id/piece_wash_btn_select" android:layout_marginLeft="20dp" android:layout_marginRight="20dp" android:layout_marginTop="20dp" android:background="@color/color_blue" android:text="@string/put_in_package" android:textColor="@color/color_white" /> </RelativeLayout> </RelativeLayout>
{ "content_hash": "b016d33a2f443f7a45c844ca8a76f65c", "timestamp": "", "source": "github", "line_count": 134, "max_line_length": 70, "avg_line_length": 39.41044776119403, "alnum_prop": 0.5822760840749858, "repo_name": "huangjim/MyViewPager", "id": "9d280a290b26b7c6c9437f7034e1d21413aafd73", "size": "5286", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "app/src/main/res/layout/packetwashpopup.xml", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "275526" } ], "symlink_target": "" }
const models = require('../../models'); const adminMiddleware = require('../middlewares/adminMiddleware'); const setupGabCommands = (bot) => { setupSetGab(bot); setupGetGab(bot); }; const setupGetGab = (bot) => bot.command('get_gab', async (ctx) => { const chat = await models.Chat.getChat(ctx.message); return ctx.reply(chat.get('random_chance'), { reply_to_message_id: ctx.message.message_id }); }); const setupSetGab = (bot) => bot.hears(/^\/set_gab(?:@.+)? (\d+)/, adminMiddleware, async (ctx) => { const [_, gab] = ctx.match; const chat = await models.Chat.getChat(ctx.message); const chance = parseInt(gab); chat.set('random_chance', chance); chat.save(); ctx.reply(`Setting gab to ${chance}`, { reply_to_message_id: ctx.message.message_id }); }); module.exports = setupGabCommands;
{ "content_hash": "722810dd3469d8a7a4045f9f8133b872", "timestamp": "", "source": "github", "line_count": 26, "max_line_length": 101, "avg_line_length": 33.92307692307692, "alnum_prop": 0.6122448979591837, "repo_name": "vlakam/shizoid", "id": "2a493115681164eae173bd9f6b5cc1c381c38c5a", "size": "882", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "app/commands/gab.js", "mode": "33188", "license": "mit", "language": [ { "name": "Dockerfile", "bytes": "98" }, { "name": "JavaScript", "bytes": "17927" } ], "symlink_target": "" }
% VL_TEST_INIT Intialize test file % This is a VLFeat internal function used to initialize % a file containing tests. % % See also: VL_TEST(), VL_HELP(). % Author:: Andrea Vedaldi % Copyright (C) 2007-12 Andrea Vedaldi and Brian Fulkerson. % All rights reserved. % % This file is part of the VLFeat library and is made available under % the terms of the BSD license (see the COPYING file). % obtain path to caller m-file stack = dbstack(1) ; mfilePath = stack(1).file ; mfileName = stack(1).name ; fid = fopen(mfilePath, 'r') ; % Parse source code to get subfunction names. It could use % which('-subfun', stack(1).name) instead, but it is undocumented. setupFunc = [] ; teardownFunc = [] ; tests = {} ; l = 0 ; t = 0 ; while 1 tline = fgetl(fid) ; l = l + 1 ; if ~ischar(tline), break ; end mo = regexp(tline, '^\s*function\s+(\w\s*=\s*)?test_(?<name>[\w_]+)\s*\(.*\).*$', ... 'names') ; if length(mo) > 0 t = t + 1 ; tests{t}.name = mo(1).name ; tests{t}.func = str2func(['test_' mo(1).name]) ; tests{t}.lineNumber = l ; end mo = regexp(tline, '^\s*function\s+(\w+\s*=\s*)?(?<name>setup|teardown)\s*\(.*\).*$', ... 'names') ; if length(mo) > 0 switch mo(1).name case 'setup' if isempty(setupFunc) setupFunc = @setup ; else warning('%s:%d: ignoring redundant definition of the setup function', ... mfilePath) ; end case 'teardown' if isempty(teardownFunc) teardownFunc = @teardown ; else warning('%s:%d: ignoring redundant definition of the setup function', ... mfilePath) ; end otherwise assert(0) ; end end end if ~isempty(setupFunc), state = setupFunc() ; end if length(varargin) > 0 testFunc = str2func(sprintf('test_%s', varargin{1})) ; if exist('state','var') testFunc(state) ; else testFunc() ; end if ~isempty(teardownFunc), teardownFunc(state) ; end return ; end % Run all tests collecting the results. if length(tests) == 0 error('No tests found in ''%s''', mfileName) ; end for t = 1:length(tests) subTestName = sprintf('test_%s', tests{t}.name) ; results{t}.testName = sprintf('%s:%s', mfileName(9:end), tests{t}.name) ; results{t}.succeded = true ; results{t}.exception = [] ; try if exist('state', 'var') tests{t}.func(state) ; else tests{t}.func() ; end catch exception results{t}.succeded = false ; results{t}.exception = exception ; end end if ~isempty(teardownFunc), teardownFunc(state) ; end results = cat(2, results{:}) ;
{ "content_hash": "79e852612f5234ed33a7d2ff15b69153", "timestamp": "", "source": "github", "line_count": 104, "max_line_length": 91, "avg_line_length": 25.5, "alnum_prop": 0.5912518853695324, "repo_name": "dalek7/Algorithms", "id": "a76a32ef83eb593564218bad6e5bca5057606bd7", "size": "2652", "binary": false, "copies": "14", "ref": "refs/heads/master", "path": "CameraGeometry/reference/SFMedu2/matchSIFT/vlfeat/toolbox/xtest/vl_test_init.m", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "961619" }, { "name": "C++", "bytes": "412091" }, { "name": "CMake", "bytes": "12265" }, { "name": "CSS", "bytes": "75871" }, { "name": "Clean", "bytes": "7372" }, { "name": "HTML", "bytes": "3252373" }, { "name": "Java", "bytes": "222275" }, { "name": "Jupyter Notebook", "bytes": "193319" }, { "name": "M", "bytes": "265" }, { "name": "MATLAB", "bytes": "778538" }, { "name": "Makefile", "bytes": "65453" }, { "name": "Objective-C", "bytes": "24224" }, { "name": "Python", "bytes": "74052" }, { "name": "Roff", "bytes": "12088" }, { "name": "Shell", "bytes": "1828" }, { "name": "TeX", "bytes": "3209" } ], "symlink_target": "" }
<instance description="troop transport unit&#xA;Multiplayer Clone." template="ebps"> <list name="extensions"> <template_reference name="exts" value="ebpextensions\entity_blueprint_ext"> <string name="alternate_sua" value="" /> <bool name="always_revealed_in_fow" value="False" /> <file name="animator" value="armies\west_german\vehicles\halftrack_sdkfz_251_infrared\halftrack_sdkfz_251_infrared" /> <bool name="is_visible_in_game" value="True" /> <float name="precise_size" value="1.5" /> </template_reference> <template_reference name="exts" value="ebpextensions\sim_entity_ext"> <bool name="is_in_spatial_bucket" value="True" /> <float name="rotate_snap" value="360" /> <float name="transferable" value="0" /> <bool name="kill_paradrop" value="False" /> </template_reference> <template_reference name="exts" value="ebpextensions\ability_ext"> <list name="abilities"> <instance_reference name="ability" value="abilities\global\cold\blizzard_effect_vehicle" /> </list> </template_reference> <template_reference name="exts" value="ebpextensions\action_apply_ext"> <list name="actions"> <template_reference name="action" value="action\animator_set_state"> <bool name="apply_to_leader_only" value="False" /> <string name="do_action_state_name" value="green" /> <bool name="retrigger" value="False" /> <string name="state_machine_name" value="criticals_engine" /> <string name="undo_action_state_name" value="" /> <uniqueid name="id" value="1073742152" /> </template_reference> </list> </template_reference> <template_reference name="exts" value="ebpextensions\cost_ext"> <group name="time_cost"> <group name="cost"> <float name="action" value="0" /> <float name="command" value="0" /> <float name="fuel" value="20" /> <float name="manpower" value="200" /> <float name="munition" value="0" /> <float name="popcap" value="0" /> </group> <float name="time_seconds" value="30" /> </group> </template_reference> <template_reference name="exts" value="ebpextensions\health_ext"> <bool name="can_repair" value="True" /> <bool name="cuttable" value="False" /> <string name="death_event_name" value="Death" /> <float name="death_seconds" value="1.8" /> <bool name="delete_when_dead" value="False" /> <bool name="force_attacker_memory" value="False" /> <float name="hitpoints" value="320" /> <bool name="is_invincible" value="False" /> <bool name="is_salvagable_wreck" value="False" /> <bool name="keep_wreck_ownership" value="False" /> <bool name="rear_damage_enabled" value="True" /> <instance_reference name="rebuilt_entity" value="" /> <instance_reference name="rebuilt_squad" value="" /> <bool name="rebuilt_use_wreck_owner" value="False" /> <bool name="receive_weapon_cover_modifiers" value="False" /> <float name="regeneration" value="0" /> <bool name="regeneration_disabled" value="False" /> <bool name="remove_from_pathfinding_on_death" value="True" /> <bool name="reveal_to_all_on_death" value="False" /> <bool name="ui_can_scuttle" value="False" /> <instance_reference name="wreck_entity" value="ebps\environment\art_ambient\objects\vehicles\wrecked_vehicles\wrecked_halftrack_sdkfz_251_infrared" /> <list name="death_actions"> </list> <float name="armor" value="14" /> <float name="rear_armor" value="14" /> <float name="target_size" value="20" /> <bool name="dies_from_broken_ice" value="True" /> <list name="criticals"> <group name="critical_group"> <float name="max_health_percentage" value="1" /> <list name="critical_info"> <group name="info"> <float name="weight" value="80" /> <enum_table name="applicable_weapons"> <bool name="small_arms" value="False" /> <bool name="flame" value="False" /> <bool name="ballistic" value="True" /> <bool name="explosive" value="True" /> </enum_table> <instance_reference name="critical" value="critical\_no_critical" /> <enum_table name="applicable_hit_direction"> <bool name="front" value="True" /> <bool name="rear" value="False" /> </enum_table> </group> <group name="info"> <float name="weight" value="80" /> <enum_table name="applicable_weapons"> <bool name="small_arms" value="False" /> <bool name="flame" value="False" /> <bool name="ballistic" value="True" /> <bool name="explosive" value="True" /> </enum_table> <instance_reference name="critical" value="critical\_no_critical_rear" /> <enum_table name="applicable_hit_direction"> <bool name="front" value="False" /> <bool name="rear" value="True" /> </enum_table> </group> <group name="info"> <float name="weight" value="20" /> <enum_table name="applicable_weapons"> <bool name="small_arms" value="False" /> <bool name="flame" value="False" /> <bool name="ballistic" value="True" /> <bool name="explosive" value="True" /> </enum_table> <instance_reference name="critical" value="critical\vehicle_destroy_searchlight_ir_halftrack" /> <enum_table name="applicable_hit_direction"> <bool name="front" value="True" /> <bool name="rear" value="True" /> </enum_table> </group> </list> </group> <group name="critical_group"> <float name="max_health_percentage" value="0.5" /> <list name="critical_info"> <group name="info"> <float name="weight" value="78" /> <enum_table name="applicable_weapons"> <bool name="small_arms" value="False" /> <bool name="flame" value="False" /> <bool name="ballistic" value="True" /> <bool name="explosive" value="True" /> </enum_table> <instance_reference name="critical" value="critical\_no_critical" /> <enum_table name="applicable_hit_direction"> <bool name="front" value="True" /> <bool name="rear" value="False" /> </enum_table> </group> <group name="info"> <float name="weight" value="78" /> <enum_table name="applicable_weapons"> <bool name="small_arms" value="False" /> <bool name="flame" value="False" /> <bool name="ballistic" value="True" /> <bool name="explosive" value="True" /> </enum_table> <instance_reference name="critical" value="critical\_no_critical_rear" /> <enum_table name="applicable_hit_direction"> <bool name="front" value="False" /> <bool name="rear" value="True" /> </enum_table> </group> <group name="info"> <float name="weight" value="2" /> <enum_table name="applicable_weapons"> <bool name="small_arms" value="False" /> <bool name="flame" value="False" /> <bool name="ballistic" value="True" /> <bool name="explosive" value="True" /> </enum_table> <instance_reference name="critical" value="critical\vehicle_damage_engine" /> <enum_table name="applicable_hit_direction"> <bool name="front" value="False" /> <bool name="rear" value="True" /> </enum_table> </group> <group name="info"> <float name="weight" value="20" /> <enum_table name="applicable_weapons"> <bool name="small_arms" value="False" /> <bool name="flame" value="False" /> <bool name="ballistic" value="True" /> <bool name="explosive" value="True" /> </enum_table> <instance_reference name="critical" value="critical\vehicle_destroy_searchlight_ir_halftrack" /> <enum_table name="applicable_hit_direction"> <bool name="front" value="True" /> <bool name="rear" value="True" /> </enum_table> </group> <group name="info"> <float name="weight" value="98" /> <enum_table name="applicable_weapons"> <bool name="small_arms" value="True" /> <bool name="flame" value="False" /> <bool name="ballistic" value="False" /> <bool name="explosive" value="False" /> </enum_table> <instance_reference name="critical" value="critical\_no_critical" /> <enum_table name="applicable_hit_direction"> <bool name="front" value="True" /> <bool name="rear" value="True" /> </enum_table> </group> <group name="info"> <float name="weight" value="2" /> <enum_table name="applicable_weapons"> <bool name="small_arms" value="True" /> <bool name="flame" value="False" /> <bool name="ballistic" value="False" /> <bool name="explosive" value="False" /> </enum_table> <instance_reference name="critical" value="critical\vehicle_destroy_searchlight_ir_halftrack" /> <enum_table name="applicable_hit_direction"> <bool name="front" value="True" /> <bool name="rear" value="True" /> </enum_table> </group> </list> </group> <group name="critical_group"> <float name="max_health_percentage" value="0" /> <list name="critical_info"> <group name="info"> <float name="weight" value="55" /> <enum_table name="applicable_weapons"> <bool name="small_arms" value="True" /> <bool name="flame" value="True" /> <bool name="ballistic" value="True" /> <bool name="explosive" value="True" /> </enum_table> <instance_reference name="critical" value="critical\vehicle_destroy" /> <enum_table name="applicable_hit_direction"> <bool name="front" value="True" /> <bool name="rear" value="True" /> </enum_table> </group> <group name="info"> <float name="weight" value="20" /> <enum_table name="applicable_weapons"> <bool name="small_arms" value="True" /> <bool name="flame" value="True" /> <bool name="ballistic" value="True" /> <bool name="explosive" value="True" /> </enum_table> <instance_reference name="critical" value="critical\vehicle_out_of_control_fast" /> <enum_table name="applicable_hit_direction"> <bool name="front" value="True" /> <bool name="rear" value="True" /> </enum_table> </group> <group name="info"> <float name="weight" value="10" /> <enum_table name="applicable_weapons"> <bool name="small_arms" value="True" /> <bool name="flame" value="True" /> <bool name="ballistic" value="True" /> <bool name="explosive" value="True" /> </enum_table> <instance_reference name="critical" value="critical\vehicle_destroy_searchlight_ir_halftrack" /> <enum_table name="applicable_hit_direction"> <bool name="front" value="True" /> <bool name="rear" value="True" /> </enum_table> </group> <group name="info"> <float name="weight" value="10" /> <enum_table name="applicable_weapons"> <bool name="small_arms" value="True" /> <bool name="flame" value="True" /> <bool name="ballistic" value="True" /> <bool name="explosive" value="True" /> </enum_table> <instance_reference name="critical" value="critical\vehicle_light_destroy_engine" /> <enum_table name="applicable_hit_direction"> <bool name="front" value="False" /> <bool name="rear" value="True" /> </enum_table> </group> </list> </group> </list> <float name="weapon_priority" value="0" /> <template_reference name="wreck_entity_option" value="options\none"> </template_reference> </template_reference> <template_reference name="exts" value="ebpextensions\hit_object_ext"> <instance_reference name="hit_material" value="hit_material\armour" /> <bool name="hit_non_neutral" value="True" /> <float name="hit_percentage" value="1" /> <bool name="pass_through" value="False" /> <group name="projectile_pass_through"> <bool name="tp_artillery" value="False" /> <bool name="tp_artillery_inf" value="False" /> <bool name="tp_artillery_overwatch" value="False" /> <bool name="tp_homing" value="False" /> <bool name="tp_homing_inf" value="False" /> <bool name="tp_sticky" value="False" /> <bool name="tp_throw" value="True" /> </group> </template_reference> <template_reference name="exts" value="ebpextensions\line_of_sight_ext"> <group name="blocking_box"> <float name="x" value="0.01" /> <float name="y" value="0.01" /> <float name="z" value="0.01" /> </group> <bool name="is_shot_blocking" value="False" /> <bool name="use_blocking_box" value="False" /> <enum name="does_block_line_of_sight" value="Never" /> </template_reference> <template_reference name="exts" value="ebpextensions\modifier_ext"> </template_reference> <template_reference name="exts" value="ebpextensions\population_ext"> <float name="medic_pop" value="0" /> <float name="personnel_pop" value="5" /> <float name="vehicle_pop" value="0" /> </template_reference> <template_reference name="exts" value="ebpextensions\sight_ext"> <group name="detect_camouflage"> <float name="tp_global" value="10" /> <float name="tp_mine" value="0" /> </group> <bool name="extended_sight" value="True" /> <float name="extended_sight_radius" value="70" /> <float name="reveal_area_on_death_time" value="6" /> <group name="sight_package"> <float name="inner_height" value="2.5" /> <float name="inner_radius" value="1" /> <float name="outer_height" value="-3" /> <float name="outer_radius" value="35" /> <float name="cone_angle" value="360" /> <float name="cone_start_radius" value="0" /> </group> <group name="extended_sight_target_info"> <template_reference name="extended_sight_target_info" value="type_ability_target_type\has_all_in_list"> <list name="target_infos"> <template_reference name="info" value="type_ability_target_type\enemy"> </template_reference> <template_reference name="info" value="type_ability_target_type\has_unit_type"> <enum name="unit_type" value="infantry" /> </template_reference> </list> </template_reference> </group> </template_reference> <template_reference name="exts" value="ebpextensions\type_ext"> <group name="unit_type_list"> <enum name="unit_type00" value="vehicle" /> <enum name="unit_type01" value="vehicle_self_propelled" /> <enum name="unit_type02" value="halftrack" /> <enum name="unit_type03" value="tank_awareness_ally" /> <enum name="unit_type04" value="light_vehicle" /> <enum name="unit_type05" value="west_german_vehicle" /> <enum name="unit_type06" value="251_halftrack" /> <enum name="unit_type07" value="top_gunner" /> <enum name="unit_type08" value="infrared" /> <enum name="unit_type09" value="" /> <enum name="unit_type10" value="" /> <enum name="unit_type11" value="salvageable_object" /> <enum name="unit_type12" value="" /> <enum name="unit_type13" value="" /> <enum name="unit_type14" value="" /> <enum name="unit_type15" value="" /> </group> <enum name="weapon_targeting" value="automatic" /> </template_reference> <template_reference name="exts" value="ebpextensions\ui_ext"> <bool name="ap_killed_kicker" value="True" /> <bool name="ap_loss_kicker" value="True" /> <bool name="cullsphere_selectable" value="False" /> <float name="decorator_offset" value="0" /> <string name="extra_text_deprecated" value="" /> <bool name="ghost_enable" value="False" /> <bool name="has_speech_code" value="True" /> <locstring name="help_text" value="11071669" /> <string name="hotkey_name" value="" /> <icon name="icon_name" value="Icons_vehicles_vehicle_west_german_halftrack_251_infrared" /> <enum name="kill_type" value="light_armour" /> <float name="minimap_color_a" value="255" /> <float name="minimap_color_b" value="255" /> <float name="minimap_color_g" value="255" /> <float name="minimap_color_r" value="255" /> <bool name="minimap_enable" value="True" /> <bool name="minimap_team_only" value="False" /> <bool name="minimap_teamcolor" value="False" /> <bool name="obb_selectable" value="False" /> <string name="overlay_name" value="" /> <bool name="reveal_for_decryption" value="False" /> <locstring name="screen_name" value="11071618" /> <enum name="selection_name" value="vehicle" /> <float name="selection_scale" value="1" /> <enum name="selection_type" value="squad_select" /> <bool name="sloppy_selectable" value="False" /> <group name="speaker"> <string name="code_1" value="lv" /> <string name="code_2" value="" /> <string name="code_3" value="" /> </group> <group name="speech_code_2"> <string name="code_1" value="ht" /> <string name="code_2" value="" /> <string name="code_3" value="" /> </group> <group name="speech_code_3"> <string name="code_1" value="hft" /> <string name="code_2" value="uhu" /> <string name="code_3" value="" /> </group> <group name="speech_code_cover"> <string name="code_1" value="" /> <string name="code_2" value="" /> <string name="code_3" value="" /> </group> <bool name="tacmap_team_only" value="False" /> <locstring name="tooltip_txt" value="11071557" /> <int name="ui_priority" value="0" /> <icon name="minimap_icon" value="" /> <icon name="portrait_icon_winter" value="Icons_portraits_vehicle_west_german_halftrack_251_infrared_w_portrait" /> <group name="speaker_alt"> <string name="code_1" value="" /> <string name="code_2" value="" /> <string name="code_3" value="" /> </group> <float name="minimap_icon_scale" value="1" /> <icon name="portrait_icon_summer" value="Icons_portraits_vehicle_west_german_halftrack_251_infrared_s_portrait" /> <locstring name="brief_text" value="0" /> <locstring name="extra_text" value="11071531" /> <locstring name="screen_name_short" value="0" /> <bool name="show_in_build_log" value="True" /> <bool name="show_entity_appearance" value="True" /> <locstring name="screen_name_world" value="11071720" /> <locstring name="help_text_world" value="0" /> <locstring name="extra_text_world" value="11071642" /> <enum name="map_rotation_type_override" value="no_override" /> <enum name="occlusion_state" value="can_be_occluded" /> <icon name="symbol_icon_name" value="Icons_symbols_vehicle_west_german_halftrack_251_infrared_symbol" /> <enum name="decorator_visibility" value="default" /> <string name="decorator_marker_name" value="fx_ui" /> <bool name="skin_pack_override" value="False" /> <string name="skin_summer" value="" /> <string name="skin_winter" value="" /> </template_reference> <template_reference name="exts" value="ebpextensions\attention_gen_ext"> <string name="animation_event_name" value="" /> <enum name="attention_mode" value="positional_toward" /> <enum name="attention_type" value="" /> <float name="attention_weight" value="50" /> <float name="chance_to_use" value="0.1" /> <float name="directional_angle" value="0" /> <bool name="ignore_in_combat" value="True" /> <bool name="ignore_while_calm" value="False" /> <bool name="ignore_while_moving" value="False" /> <bool name="ignore_while_stationary" value="False" /> <bool name="ignore_while_tense" value="False" /> <float name="initial_delay" value="-1" /> <float name="max_range" value="10" /> <float name="time_limit" value="3" /> <bool name="generates_spotted_events" value="False" /> </template_reference> <template_reference name="exts" value="ebpextensions\combat_ext"> <bool name="reject_attack_command" value="True" /> <list name="hardpoints"> <group name="hardpoint"> <float name="parent_hardpoint" value="-1" /> <list name="weapon_table"> <group name="weapon"> <group name="heading"> <float name="x" value="0" /> <float name="y" value="0" /> <float name="z" value="1" /> </group> <float name="length" value="0" /> <group name="origin"> <float name="x" value="0" /> <float name="y" value="0.5" /> <float name="z" value="0" /> </group> <enum name="type" value="default" /> <instance_reference name="weapon" value="weapon\west_german\ballistic_weapon\tank_gun\infrared_searchlight_mp" /> </group> </list> <bool name="receives_attack_commands" value="True" /> </group> </list> <int name="sight_hardpoint" value="-1" /> <list name="kill_actions"> </list> </template_reference> <template_reference name="exts" value="ebpextensions\cover_ext"> <group name="tp_defcover"> <group name="posture"> <bool name="prevent_prone" value="False" /> <bool name="prevent_standing" value="False" /> </group> <float name="safety_value" value="0" /> <float name="speed_multiplier" value="1" /> <list name="actions"> </list> </group> <group name="tp_defcover_narrow"> <group name="posture"> <bool name="prevent_prone" value="False" /> <bool name="prevent_standing" value="False" /> </group> <float name="safety_value" value="0" /> <float name="speed_multiplier" value="1" /> <list name="actions"> </list> </group> <group name="tp_garrison_cover"> <group name="posture"> <bool name="prevent_prone" value="False" /> <bool name="prevent_standing" value="False" /> </group> <float name="safety_value" value="0" /> <float name="speed_multiplier" value="1" /> <list name="actions"> </list> </group> <group name="tp_garrison_halftrack"> <group name="posture"> <bool name="prevent_prone" value="False" /> <bool name="prevent_standing" value="False" /> </group> <float name="safety_value" value="0" /> <float name="speed_multiplier" value="1" /> <list name="actions"> </list> </group> <group name="tp_heavy"> <group name="posture"> <bool name="prevent_prone" value="False" /> <bool name="prevent_standing" value="False" /> </group> <float name="safety_value" value="0" /> <float name="speed_multiplier" value="0.75" /> <list name="actions"> </list> </group> <group name="tp_light"> <group name="posture"> <bool name="prevent_prone" value="False" /> <bool name="prevent_standing" value="False" /> </group> <float name="safety_value" value="0" /> <float name="speed_multiplier" value="0.85" /> <list name="actions"> </list> </group> <group name="tp_negative"> <group name="posture"> <bool name="prevent_prone" value="False" /> <bool name="prevent_standing" value="False" /> </group> <float name="safety_value" value="0" /> <float name="speed_multiplier" value="1.5" /> <list name="actions"> </list> </group> <group name="tp_open"> <group name="posture"> <bool name="prevent_prone" value="False" /> <bool name="prevent_standing" value="False" /> </group> <float name="safety_value" value="0" /> <float name="speed_multiplier" value="1" /> <list name="actions"> </list> </group> <group name="tp_smoke"> <group name="posture"> <bool name="prevent_prone" value="False" /> <bool name="prevent_standing" value="False" /> </group> <float name="safety_value" value="0" /> <float name="speed_multiplier" value="0.3" /> <list name="actions"> </list> </group> <group name="tp_trench"> <group name="posture"> <bool name="prevent_prone" value="False" /> <bool name="prevent_standing" value="False" /> </group> <float name="safety_value" value="0" /> <float name="speed_multiplier" value="1" /> <list name="actions"> </list> </group> <group name="tp_water"> <group name="posture"> <bool name="prevent_prone" value="True" /> <bool name="prevent_standing" value="False" /> </group> <float name="safety_value" value="0" /> <float name="speed_multiplier" value="1" /> <list name="actions"> </list> </group> <group name="tp_z_bunker"> <group name="posture"> <bool name="prevent_prone" value="False" /> <bool name="prevent_standing" value="False" /> </group> <float name="safety_value" value="0" /> <float name="speed_multiplier" value="1" /> <list name="actions"> </list> </group> <group name="tp_z_emplacement"> <group name="posture"> <bool name="prevent_prone" value="False" /> <bool name="prevent_standing" value="False" /> </group> <float name="safety_value" value="0" /> <float name="speed_multiplier" value="1" /> <list name="actions"> </list> </group> <group name="tp_z_ice"> <list name="actions"> </list> <group name="posture"> <bool name="prevent_prone" value="False" /> <bool name="prevent_standing" value="False" /> </group> <float name="safety_value" value="0" /> <float name="speed_multiplier" value="1" /> </group> <group name="tp_z_snow"> <list name="actions"> </list> <group name="posture"> <bool name="prevent_prone" value="True" /> <bool name="prevent_standing" value="False" /> </group> <float name="safety_value" value="0" /> <float name="speed_multiplier" value="0.9" /> </group> <group name="tp_zz_deep_snow"> <list name="actions"> </list> <group name="posture"> <bool name="prevent_prone" value="False" /> <bool name="prevent_standing" value="False" /> </group> <float name="safety_value" value="0" /> <float name="speed_multiplier" value="0.75" /> </group> <group name="tp_zz_mud"> <list name="actions"> </list> <group name="posture"> <bool name="prevent_prone" value="False" /> <bool name="prevent_standing" value="False" /> </group> <float name="safety_value" value="0" /> <float name="speed_multiplier" value="0.65" /> <enum name="override_path_weight" value="tp_defcover" /> </group> <group name="tp_zz_team_weapon_heavy"> <list name="actions"> </list> <group name="posture"> <bool name="prevent_prone" value="False" /> <bool name="prevent_standing" value="False" /> </group> <float name="safety_value" value="0" /> <float name="speed_multiplier" value="1" /> </group> </template_reference> <template_reference name="exts" value="ebpextensions\modifier_apply_ext"> <list name="modifiers"> </list> </template_reference> <template_reference name="exts" value="ebpextensions\camouflage_ext"> <float name="attack_priority" value="80" /> <enum name="camouflage_type" value="tp_global" /> <bool name="chain_revealer" value="False" /> <float name="detection_radius" value="10" /> <bool name="must_be_fully_constructed" value="False" /> <bool name="permanently_activated" value="False" /> <float name="revert_max" value="10" /> <float name="revert_multiplier" value="2" /> <float name="revert_time" value="1.5" /> <float name="revert_time_on_detection" value="1" /> <list name="first_strike_actions"> <template_reference name="action" value="action\apply_modifiers_action"> <float name="duration" value="0" /> <bool name="permanent" value="False" /> <list name="modifiers"> <template_reference name="modifier" value="modifiers\damage_weapon_modifier"> <enum name="application_type" value="apply_to_weapon" /> <bool name="exclusive" value="False" /> <string name="modifier_id" value="" /> <string name="target_type_name" value="hardpoint_01" /> <enum name="usage_type" value="multiply_add" /> <float name="value" value="1.5" /> <instance_reference name="tooltip" value="modifier_tooltip\damage_weapon_modifier" /> </template_reference> <template_reference name="modifier" value="modifiers\accuracy_weapon_modifier"> <enum name="application_type" value="apply_to_weapon" /> <bool name="exclusive" value="False" /> <string name="modifier_id" value="" /> <string name="target_type_name" value="hardpoint_01" /> <enum name="usage_type" value="multiply_add" /> <float name="value" value="1.5" /> <instance_reference name="tooltip" value="modifier_tooltip\accuracy_weapon_modifier" /> </template_reference> <template_reference name="modifier" value="modifiers\weapon_penetration_modifier"> <enum name="application_type" value="apply_to_weapon" /> <bool name="exclusive" value="False" /> <string name="modifier_id" value="" /> <string name="target_type_name" value="hardpoint_01" /> <enum name="usage_type" value="multiply_add" /> <float name="value" value="1.5" /> <instance_reference name="tooltip" value="modifier_tooltip\weapon_penetration_modifier" /> </template_reference> </list> <uniqueid name="id" value="1073742153" /> </template_reference> </list> <float name="combat_reset_time" value="5" /> <float name="first_strike_shots" value="1" /> <list name="camouflage_actions"> <template_reference name="action" value="action\requirement_action"> <bool name="check_self" value="False" /> <bool name="global_fire_and_forget_on_success" value="False" /> <bool name="instant_requirement_check" value="False" /> <bool name="kill_action_on_failed_requirements" value="False" /> <bool name="no_retrigger" value="False" /> <bool name="validate_all_sub_actions" value="True" /> <list name="requirement_table"> <template_reference name="required" value="requirements\required_entity_upgrade"> <enum name="reason" value="usage" /> <locstring name="ui_name" value="0" /> <bool name="is_present" value="True" /> <instance_reference name="upgrade_name" value="upgrade\german\commander\ability\camouflage_net_activated" /> <bool name="include_queued" value="False" /> </template_reference> <template_reference name="required" value="requirements\required_not"> <enum name="reason" value="usage" /> <locstring name="ui_name" value="0" /> <list name="requirement_table"> <template_reference name="required" value="requirements\required_in_state"> <enum name="reason" value="usage" /> <locstring name="ui_name" value="0" /> <bool name="garrisoned" value="False" /> <bool name="healed" value="False" /> <float name="in_combat_since" value="-1" /> <bool name="injured" value="False" /> <bool name="leader" value="False" /> <bool name="not_moving" value="True" /> <bool name="not_retreating" value="False" /> <bool name="pinned" value="False" /> <bool name="suppressed" value="False" /> </template_reference> </list> </template_reference> </list> <list name="action_table"> <template_reference name="action" value="action\upgrade_remove"> <bool name="apply_to_entities_in_squad" value="True" /> <instance_reference name="upgrade" value="upgrade\german\commander\ability\camouflage_net_activated" /> <uniqueid name="id" value="1073742154" /> </template_reference> </list> <uniqueid name="id" value="1073742155" /> <bool name="fire_and_forget_non_global" value="False" /> <template_reference name="ui_help_text" value="tables\help_text_phrase"> <int name="phrase_order" value="0" /> <locstring name="phrase" value="0" /> </template_reference> </template_reference> </list> </template_reference> <template_reference name="exts" value="ebpextensions\crew_ext"> <list name="race_list"> <group name="race_data"> <instance_reference name="ext_key" value="racebps\german" /> <group name="info"> <string name="sync_target_name" value="Vehicle_Target" /> <list name="role_list"> <group name="role"> <string name="animator_bp" value="armies\german\soldiers\vehicle_crew\vehicle_crew" /> <string name="death_event_name" value="Death_crew" /> <string name="desync_action_name" value="Detach_Skeleton" /> <string name="role_name" value="Driver" /> <string name="sync_action_name" value="Attach_Driver" /> <bool name="sync_on_create" value="True" /> <string name="abandon_event_name" value="" /> <string name="animator_bp_female" value="" /> </group> <group name="role"> <string name="animator_bp" value="armies\german\soldiers\vehicle_crew\vehicle_crew" /> <string name="death_event_name" value="Death_crew" /> <string name="desync_action_name" value="Detach_Skeleton" /> <string name="role_name" value="gunner_sdkfz_251_infrared" /> <string name="sync_action_name" value="attach_gunner_sdkfz_251_infrared" /> <bool name="sync_on_create" value="True" /> <string name="abandon_event_name" value="abandon_sdkfz_251_infrared" /> <string name="animator_bp_female" value="" /> </group> </list> </group> </group> <group name="race_data"> <instance_reference name="ext_key" value="racebps\soviet" /> <group name="info"> <string name="sync_target_name" value="Vehicle_Target" /> <list name="role_list"> <group name="role"> <string name="animator_bp" value="armies/soviet/soldiers/tank_crew_1/tank_crew_1" /> <string name="death_event_name" value="Death_crew" /> <string name="desync_action_name" value="Detach_Skeleton" /> <string name="role_name" value="Driver" /> <string name="sync_action_name" value="Attach_Driver" /> <bool name="sync_on_create" value="True" /> <string name="abandon_event_name" value="" /> <string name="animator_bp_female" value="" /> </group> <group name="role"> <string name="animator_bp" value="armies/soviet/soldiers/tank_crew_1/tank_crew_1" /> <string name="death_event_name" value="Death_crew" /> <string name="desync_action_name" value="Detach_Skeleton" /> <string name="role_name" value="gunner_sdkfz_251_infrared" /> <string name="sync_action_name" value="attach_gunner_sdkfz_251_infrared" /> <bool name="sync_on_create" value="True" /> <string name="abandon_event_name" value="abandon_sdkfz_251_infrared" /> <string name="animator_bp_female" value="" /> </group> </list> </group> </group> <group name="race_data"> <instance_reference name="ext_key" value="racebps\west_german" /> <group name="info"> <string name="sync_target_name" value="Vehicle_Target" /> <list name="role_list"> <group name="role"> <string name="animator_bp" value="armies\german\soldiers\vehicle_crew\vehicle_crew" /> <string name="death_event_name" value="Death_crew" /> <string name="desync_action_name" value="Detach_Skeleton" /> <string name="role_name" value="Driver" /> <string name="sync_action_name" value="Attach_Driver" /> <bool name="sync_on_create" value="True" /> <string name="abandon_event_name" value="" /> <string name="animator_bp_female" value="" /> </group> <group name="role"> <string name="animator_bp" value="armies\german\soldiers\vehicle_crew\vehicle_crew" /> <string name="death_event_name" value="Death_crew" /> <string name="desync_action_name" value="Detach_Skeleton" /> <string name="role_name" value="gunner_sdkfz_251_infrared" /> <string name="sync_action_name" value="attach_gunner_sdkfz_251_infrared" /> <bool name="sync_on_create" value="True" /> <string name="abandon_event_name" value="abandon_sdkfz_251_infrared" /> <string name="animator_bp_female" value="" /> </group> </list> </group> </group> <group name="race_data"> <instance_reference name="ext_key" value="racebps\aef" /> <group name="info"> <string name="sync_target_name" value="Vehicle_Target" /> <list name="role_list"> <group name="role"> <string name="animator_bp" value="armies\aef\soldiers\vehicle_crew\vehicle_crew" /> <string name="death_event_name" value="Death_crew" /> <string name="desync_action_name" value="Detach_Skeleton" /> <string name="role_name" value="Driver" /> <string name="sync_action_name" value="Attach_Driver" /> <bool name="sync_on_create" value="True" /> <string name="abandon_event_name" value="" /> <string name="animator_bp_female" value="" /> </group> <group name="role"> <string name="animator_bp" value="armies\aef\soldiers\vehicle_crew\vehicle_crew" /> <string name="death_event_name" value="Death_crew" /> <string name="desync_action_name" value="Detach_Skeleton" /> <string name="role_name" value="gunner_sdkfz_251_infrared" /> <string name="sync_action_name" value="attach_gunner_sdkfz_251_infrared" /> <bool name="sync_on_create" value="True" /> <string name="abandon_event_name" value="abandon_sdkfz_251_infrared" /> <string name="animator_bp_female" value="" /> </group> </list> </group> </group> <group name="race_data"> <instance_reference name="ext_key" value="" /> <group name="info"> <string name="sync_target_name" value="Vehicle_Target" /> <list name="role_list"> <group name="role"> <string name="animator_bp" value="armies\german\soldiers\vehicle_crew\vehicle_crew" /> <string name="death_event_name" value="Death_crew" /> <string name="desync_action_name" value="Detach_Skeleton" /> <string name="role_name" value="Driver" /> <string name="sync_action_name" value="Attach_Driver" /> <bool name="sync_on_create" value="True" /> <string name="abandon_event_name" value="" /> <string name="animator_bp_female" value="" /> </group> <group name="role"> <string name="animator_bp" value="armies\german\soldiers\vehicle_crew\vehicle_crew" /> <string name="death_event_name" value="Death_crew" /> <string name="desync_action_name" value="Detach_Skeleton" /> <string name="role_name" value="gunner_sdkfz_251_infrared" /> <string name="sync_action_name" value="attach_gunner_sdkfz_251_infrared" /> <bool name="sync_on_create" value="True" /> <string name="abandon_event_name" value="abandon_sdkfz_251_infrared" /> <string name="animator_bp_female" value="" /> </group> </list> </group> </group> </list> </template_reference> <template_reference name="exts" value="ebpextensions\crush_ext"> <bool name="crushes_humans" value="False" /> <enum name="default_crush_mode" value="crush_light" /> <list name="crush_mode_actions_heavy"> </list> <list name="crush_mode_actions_light"> </list> <list name="crush_mode_actions_medium"> </list> <list name="crush_mode_actions_off"> </list> <list name="crush_target_actions"> </list> <float name="ice_damage" value="55" /> <bool name="crushes_buildings" value="True" /> </template_reference> <template_reference name="exts" value="ebpextensions\marker_ext"> </template_reference> <template_reference name="exts" value="ebpextensions\moving_ext"> <float name="acceleration" value="3.75" /> <float name="deceleration" value="5.3" /> <float name="high_path_look_ahead_max_dist" value="25" /> <bool name="orient_to_terrain" value="True" /> <instance_reference name="pass_type" value="pass_types\light_crusher" /> <float name="rotation_rate" value="40" /> <float name="rotation_rate_crouch" value="870" /> <float name="rotation_rate_prone" value="225" /> <float name="rotation_rate_stand" value="870" /> <bool name="smooth_path" value="True" /> <float name="speed_max" value="6" /> <instance_reference name="turn_plan" value="turn_plan\halftrack_i" /> <float name="on_ice_accel_decel_multiplier" value="0.6" /> <float name="on_land_overturn_scale" value="0.3" /> <float name="on_ice_overturn_scale" value="1.3" /> </template_reference> <template_reference name="exts" value="ebpextensions\obj_cover_ext"> <enum name="cover_type" value="tp_garrison_halftrack" /> <bool name="is_cover_directional" value="False" /> <bool name="is_shoot_through" value="False" /> <bool name="lengthwise_spots" value="False" /> <float name="offset_x" value="0" /> <float name="offset_y" value="0" /> <float name="offset_z" value="0" /> <bool name="prevent_prone" value="False" /> <float name="range_x" value="0" /> <float name="range_y" value="0" /> <float name="range_z" value="0" /> <bool name="require_standing" value="True" /> <bool name="use_simbox_range" value="True" /> <bool name="use_simbox_range_plus_spots" value="True" /> </template_reference> <template_reference name="exts" value="ebpextensions\recrewable_ext"> <list name="race_list"> <group name="race_data"> <instance_reference name="ext_key" value="" /> <group name="info"> <instance_reference name="capture_squad_blueprint" value="sbps\races\west_german\vehicles\halftrack_squads\sdkfz_251_20_ir_searchlight_halftrack_squad_mp" mod="95f9ec3171c849d792717e865bd5e612" /> <float name="max_capture_crew_size" value="2" /> <float name="min_capture_crew_size" value="2" /> <list name="recrew_penalties_list"> </list> <float name="abandon_animation_seconds" value="1.5" /> <int name="recrew_max_squad_size" value="1" /> <bool name="abandoned_allows_pass_through" value="False" /> <list name="apply_to_driver_action"> </list> <float name="driver_death_chance_on_entity_death" value="1" /> <instance_reference name="driver_squad_blueprint" value="" /> </group> </group> </list> </template_reference> <template_reference name="exts" value="ebpextensions\upgrade_ext"> <bool name="must_be_in_supply" value="False" /> <float name="number_of_standard_slots" value="-1" /> <list name="standard_upgrades"> </list> </template_reference> </list> <uniqueid name="pbgid" value="2608" /> </instance>
{ "content_hash": "d6582b94a395a9083ee5fbc726e64844", "timestamp": "", "source": "github", "line_count": 992, "max_line_length": 202, "avg_line_length": 43.011088709677416, "alnum_prop": 0.6170576792368809, "repo_name": "Ruhrpottpatriot/LastCrusade", "id": "1446fbd89d7a99080d906421b5ffa920105db76e", "size": "42667", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "src/instances/ebps/races/west_german/vehicles/halftrack_sdkfz_251/halftrack_sdkfz_251_20_ir_searchlight_mp.xml", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "AMPL", "bytes": "5218" }, { "name": "CSS", "bytes": "2640" }, { "name": "HTML", "bytes": "117223" }, { "name": "Lua", "bytes": "87140" } ], "symlink_target": "" }
package mah.plugin.support.translation; import mah.common.util.IoUtils; import mah.common.util.StringUtils; import mah.common.util.XmlUtils; import mah.plugin.PluginException; import mah.plugin.command.PluginCommandSupport; import mah.plugin.config.XmlConfigurable; import mah.plugin.support.translation.parser.WordParser; import mah.plugin.support.translation.parser.YoudaoParser; import mah.plugin.support.translation.repo.JsonUtils; import mah.plugin.support.translation.repo.WordRepository; import mah.ui.icon.Icon; import mah.ui.layout.ClassicItemListLayout; import mah.ui.pane.item.FullItemImpl; import mah.ui.pane.item.TextItemImpl; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.w3c.dom.Node; import java.io.FileNotFoundException; import java.io.InputStream; import java.io.UnsupportedEncodingException; import java.net.HttpURLConnection; import java.net.URL; import java.net.URLEncoder; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * Created by zgq on 16-12-24. */ public class TranslationCommand extends PluginCommandSupport implements XmlConfigurable { private ClassicItemListLayout layout; private String keyfrom ; private String apiKey; private static final Logger LOGGER = LoggerFactory.getLogger(TranslationCommand.class); private volatile WordRepository repository; private final WordParser parser = new YoudaoParser(JsonUtils.getJsonFactory()); private String lastWord; public TranslationCommand() { init(); } private void init() { addInitializeEventHandler(event -> { layout = getLayoutFactory().createClassicItemListLayout(); localWordReader(); }); addCommonFilterEventHandler(event -> { filterHook(event.getContent()); }); addTriggerEventHandler(event -> { triggerHook(); }); } private void localWordReader() { String pluginDataFile = ""; try { pluginDataFile = getPluginDataDir("local_words.json"); repository = new WordRepository(pluginDataFile); repository.init(); } catch (Exception e) { if (e.getCause() instanceof FileNotFoundException) { try { IoUtils.createFileIfNotExists(pluginDataFile); } catch (Exception e2) { LOGGER.error("Fail to create new file " + pluginDataFile, e2); } } else { LOGGER.error("Fail to initialize repository", e); } } } private FullItemImpl createTranslationResult(String name, String description) { FullItemImpl fullItem = new FullItemImpl.Builder(name) .description(description) .icon(Icon.valueOf("translation/translate.png")) .build(); return fullItem; } private FullItemImpl createTriggerResult() { return createTranslationResult("英汉互译", "Thanks to youdao api"); } private void showConfigError() { TextItemImpl tip = new TextItemImpl.Builder("To use translation command," + "you are expected to provide own keyfrom and apikey " ).build(); TextItemImpl tips2 = new TextItemImpl .Builder("You can go to http://fanyi.youdao.com/openapi.do to apply for them") .build(); layout.updateItems(tip,tips2); } private boolean checkConfig() { if (StringUtils.isEmpty(this.apiKey) || StringUtils.isEmpty(this.keyfrom)) { showConfigError(); return false; } return true; } public void triggerHook() throws Exception { if (checkConfig()) { layout.updateItems(createTriggerResult()); } } @Override public String getName() { return "Translation"; } public void filterHook(String content) throws Exception { if (checkConfig()) { if (content.equals(" ")) { triggerHook(); } String word = content; if (word.equals(this.lastWord)) { return; } this.lastWord = word; submit(new Queryer(keyfrom, apiKey, word)); } } private Word parseWord(String content) { return parser.parseWord(content); } private String getLastWord() { return lastWord; } private void update(Word word) { List<String> translations = word.getTranslations(); if (translations == null) { layout.updateItems(createTranslationResult("查询出错", "找不到这个词")); return; } List<String> explains = word.getExplains(); String description = ""; if (explains != null) { StringBuilder explainStr = new StringBuilder(); for (Object explain : explains) { String expl = ((String) explain); explainStr.append(expl + ","); } explainStr.deleteCharAt(explainStr.length() - 1); description = explainStr.toString(); } List<FullItemImpl> items = new ArrayList<>(); items.add(createTranslationResult(buildDescription(translations), description)); List<Word.MeaningPair> meaningPairs = word.getMeaningPairs(); if (meaningPairs != null) { for (Word.MeaningPair meaningPair : meaningPairs) { items.add(createTranslationResult(meaningPair.getKey(), buildDescription(meaningPair.getValue()))); } } layout.updateItems(items); } private String buildDescription(List<String> items) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < items.size(); i++) { sb.append(items.get(i)); if (i != items.size() - 1) { sb.append(","); } } return sb.toString(); } private Word getWord(String word) { return repository.findWord(word); } @Override public void configure(Node node) throws Exception { if (node == null) { return; } String keyfrom = XmlUtils.getChildNodeText(node, "keyfrom"); String apikey = XmlUtils.getChildNodeText(node, "apikey"); this.keyfrom = keyfrom; this.apiKey = apikey; } public ClassicItemListLayout getLayout() { return layout; } class Queryer implements Runnable { private final String keyfrom; private final String apiKey; private final String word; public Queryer(String keyfrom, String apiKey, String word) { this.keyfrom = keyfrom; this.apiKey = apiKey; this.word = word; } private boolean currentWord() { return getLastWord().equals(word); } private void updateUi(Word word) { if (currentWord()) { update(word); } } private boolean qualifySaveWord() { try { Thread.sleep(2000); } catch (InterruptedException e) { throw new PluginException(e); } return currentWord(); } private void delayToUpdateWord(Word word) { if (!qualifySaveWord()) { return; } LOGGER.info("save word {}", word); word.incrementQueryCount(); word.updateQueryTime(); repository.save(); LOGGER.info("saved word", word); } @Override public void run() { try { if (StringUtils.isEmpty(word)) { layout.clear(); return; } Word wordObj = getWord(word); if (wordObj != null) { updateUi(wordObj); delayToUpdateWord(wordObj); return; } layout.showFirstItem(createTranslationResult(word,"正在查询中...")); Thread.sleep(300); if (!currentWord()) { return; } String apiUrl = "http://fanyi.youdao.com/openapi.do"; Map<String, String> params = new HashMap<>(); params.put("keyfrom", keyfrom); params.put("key", apiKey); params.put("type", "data"); params.put("doctype", "json"); params.put("version", "1.1"); params.put("q", this.word); StringBuilder paramsStr = new StringBuilder(); params.forEach((s, s2) -> { try { paramsStr.append(s + "=" + URLEncoder.encode(s2, "UTF-8") + "&"); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } }); paramsStr.deleteCharAt(paramsStr.length() - 1); HttpURLConnection urlConnection = null; URL url = new URL(apiUrl + "?" + paramsStr.toString()); LOGGER.debug("fetch " + url); urlConnection = (HttpURLConnection) url.openConnection(); urlConnection.setDoOutput(true); urlConnection.setDoInput(true); urlConnection.connect(); InputStream inputStream = urlConnection.getInputStream(); String content = IoUtils.toString(inputStream); wordObj = parseWord(content); updateUi(wordObj); if (urlConnection != null) { urlConnection.disconnect(); } if (qualifySaveWord()) { if (wordObj.getExplains() != null) { repository.addWord(wordObj); } } } catch (Exception e) { showFailure(); LOGGER.error("query fail", e); } } private void showFailure() { layout.updateItems(new FullItemImpl.Builder("查询失败,请检查网络是否连接").build()); } } }
{ "content_hash": "39a046a49e64ea915feaa6ec80d9358b", "timestamp": "", "source": "github", "line_count": 320, "max_line_length": 115, "avg_line_length": 32.21875, "alnum_prop": 0.5580989330746847, "repo_name": "zgqq/mah", "id": "902585f5a8a14e622c47052269787ee6ef1aaed5", "size": "11503", "binary": false, "copies": "1", "ref": "refs/heads/dev", "path": "mah-plugin/src/main/java/mah/plugin/support/translation/TranslationCommand.java", "mode": "33188", "license": "mit", "language": [ { "name": "Java", "bytes": "720080" }, { "name": "Kotlin", "bytes": "2391" }, { "name": "Shell", "bytes": "81" } ], "symlink_target": "" }
"use strict"; var Badge = (function () { function Badge(course_id, badge_id, name, image, xp, id, selected) { this.course_id = course_id; this.badge_id = badge_id; this.name = name; this.image = image; this.xp = xp; this.id = id; this.selected = selected; } return Badge; }()); exports.Badge = Badge;
{ "content_hash": "372a8be785d726f4646a4c4f6d161c57", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 72, "avg_line_length": 26.357142857142858, "alnum_prop": 0.5474254742547425, "repo_name": "cfcfon/lms-frontend", "id": "e2b0fce2af1a42bd4c03201b42d3b61ccc619923", "size": "369", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "dist/tmp_client/app/models/badge.js", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "29757" }, { "name": "HTML", "bytes": "137479" }, { "name": "JavaScript", "bytes": "29989" }, { "name": "TypeScript", "bytes": "200753" } ], "symlink_target": "" }
/*! * Start Bootstrap - The Big Picture HTML Template (http://startbootstrap.com) * Code licensed under the Apache License v2.0. * For details, see http://www.apache.org/licenses/LICENSE-2.0. */ body { margin-top: 50px; margin-bottom: 50px; background: rgba(0, 0, 0, 0.2); border-bottom: 7px dotted #0990000; box-shadow: inset 0 -3px 0 0 #990000, 0 3px 0 0 #990000; border-top: 7px dotted #990000; box-shadow: inset 0 3px 0 0 #990000, 0 -3px 0 0 #990000; background: rgba(0, 0, 0, 0.5); padding: 20px; } .full { background: url(http://coolinterestingstuff.com/wp-content/uploads/2014/02/20140213-192542.jpg) no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; } .meghedit { font-family: "Goudy Old Style"; font-weight: bold; color: white; text-shadow: 4px 4px #990000; } .megpedit { color: black; border: 3px solid white; outline: 3px solid #990000; background: rgba(255, 229, 153, .7); text-shadow: none; font-weight: normal; font-size: large; padding: 10px; } .bibliography { text-align: left; text-indent: -20px; padding-left: 30px; word-wrap: normal; word-break: normal; white-space: pre-wrap; }
{ "content_hash": "4e848586e9c8028a13e1e5ccbeb3a75d", "timestamp": "", "source": "github", "line_count": 53, "max_line_length": 129, "avg_line_length": 23.735849056603772, "alnum_prop": 0.6828298887122417, "repo_name": "bsapozhnikov/ANE103-WebsiteDesign", "id": "fc3dcbac8af91c778afbe5b2d0ebd3b3218dd467", "size": "1258", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "css/presentationTemplate.css", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "10823" }, { "name": "HTML", "bytes": "303749" }, { "name": "JavaScript", "bytes": "21779" } ], "symlink_target": "" }
package com.tremolosecurity.scalejs.token.password; import java.io.IOException; import java.util.HashMap; import javax.servlet.ServletContext; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.apache.log4j.Logger; import com.tremolosecurity.config.util.UrlHolder; import com.tremolosecurity.config.xml.AuthChainType; import com.tremolosecurity.config.xml.AuthMechType; import com.tremolosecurity.proxy.auth.AuthController; import com.tremolosecurity.proxy.auth.AuthInfo; import com.tremolosecurity.proxy.auth.AuthMechanism; import com.tremolosecurity.proxy.auth.RequestHolder; import com.tremolosecurity.proxy.auth.util.AuthStep; import com.tremolosecurity.proxy.filter.HttpFilterConfig; import com.tremolosecurity.proxy.logout.LogoutUtil; import com.tremolosecurity.proxy.util.ProxyConstants; import com.tremolosecurity.saml.Attribute; public class RegisterPasswordResetAuth implements AuthMechanism { static Logger logger = Logger.getLogger(RegisterPasswordResetAuth.class.getName()); String workflowName; String uidAttribute; private String loadAttributeValue(String name,String label,HashMap<String, Attribute> config) throws Exception { Attribute attr = config.get(name); if (attr == null) { throw new Exception(label + " not found"); } String val = attr.getValues().get(0); logger.info(label + ": '" + val + "'"); return val; } @Override public void init(ServletContext ctx, HashMap<String, Attribute> init) { try { this.workflowName = this.loadAttributeValue("workflowName", "Workflow Name", init); this.uidAttribute = this.loadAttributeValue("uidAttributeName", "UID Attribute Name", init); } catch (Exception e) { logger.error("Could not load auth mech",e); } } @Override public String getFinalURL(HttpServletRequest request, HttpServletResponse response) { return null; } @Override public void doGet(HttpServletRequest request, HttpServletResponse response, AuthStep as) throws IOException, ServletException { HttpSession session = ((HttpServletRequest) request).getSession(); HashMap<String,Attribute> authParams = (HashMap<String,Attribute>) session.getAttribute(ProxyConstants.AUTH_MECH_PARAMS); UrlHolder holder = (UrlHolder) request.getAttribute(ProxyConstants.AUTOIDM_CFG); RequestHolder reqHolder = ((AuthController) request.getSession().getAttribute(ProxyConstants.AUTH_CTL)).getHolder(); String urlChain = holder.getUrl().getAuthChain(); AuthChainType act = holder.getConfig().getAuthChains().get(reqHolder.getAuthChainName()); AuthMechType amt = act.getAuthMech().get(as.getId()); AuthController ac = ((AuthController) request.getSession().getAttribute(ProxyConstants.AUTH_CTL)); AuthInfo au = ac.getAuthInfo(); Attribute uid = au.getAttribs().get(this.uidAttribute); if (uid == null) { logger.warn("Attribute : '" + this.uidAttribute + "' does not exist"); as.setSuccess(false); } else { ResetUserPasswordOnLogout logoutHandler = new ResetUserPasswordOnLogout(this.workflowName,this.uidAttribute,uid.getValues().get(0)); LogoutUtil.insertFirstLogoutHandler(request, logoutHandler); as.setSuccess(true); } holder.getConfig().getAuthManager().nextAuth(request, response,session,false); } @Override public void doPost(HttpServletRequest request, HttpServletResponse response, AuthStep as) throws IOException, ServletException { this.doGet(request, response, as); } @Override public void doPut(HttpServletRequest request, HttpServletResponse response, AuthStep as) throws IOException, ServletException { this.doGet(request, response, as); } @Override public void doHead(HttpServletRequest request, HttpServletResponse response, AuthStep as) throws IOException, ServletException { this.doGet(request, response, as); } @Override public void doOptions(HttpServletRequest request, HttpServletResponse response, AuthStep as) throws IOException, ServletException { this.doGet(request, response, as); } @Override public void doDelete(HttpServletRequest request, HttpServletResponse response, AuthStep as) throws IOException, ServletException { this.doGet(request, response, as); } }
{ "content_hash": "5b9867194a2a5762aa2f81ce93942fcf", "timestamp": "", "source": "github", "line_count": 133, "max_line_length": 135, "avg_line_length": 32.48872180451128, "alnum_prop": 0.7738949317287664, "repo_name": "mlbiam/ScaleJS", "id": "8e7f4294775dd6a3015fb827a24f5ada5bf57ad7", "size": "5082", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "unison-scalejs-token/src/main/java/com/tremolosecurity/scalejs/token/password/RegisterPasswordResetAuth.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "150339" }, { "name": "HTML", "bytes": "27880" }, { "name": "Java", "bytes": "55870" }, { "name": "JavaScript", "bytes": "29637" } ], "symlink_target": "" }
from __future__ import division import json import os import os.path # third party imports import wx # pyspend imports import db import gui CONFIG = 'config.json' OPEN = 0 SAVE = 1 def run(): spend = PySpend(redirect=False) spend.MainLoop() class PySpend(wx.App): def OnInit(self): self.config = self._read_config() self.frame = PySpendController(config=self.config, parent=None) self.frame.Show() self.SetTopWindow(self.frame) return True def OnExit(self): self._write_config() def _read_config(self): '''Read the config file.''' config = json.load(open(self._config_path(), 'r')) return config def _write_config(self): '''Write changes to the config file on exit.''' with open(self._config_path(), 'w') as f: json.dump(self.config, f, indent=4) def _config_path(self): path = os.path.dirname(__file__) return os.path.join(path, CONFIG) class PySpendController(gui.PySpendGUI): def __init__(self, config, *args, **kwargs): super(PySpendController, self).__init__(*args, **kwargs) # check database self.config = config self.db_path = config['DB'] self.check_db() self.db = db.connect(self.db_path) self._bind_events() # initialise some widgets self.config_cat_list() self.refresh_cat_list() self.refresh_category() self.config_item_list() self.refresh_item_list() def _bind_events(self): self.date_picker.Bind(wx.EVT_DATE_CHANGED, self.pick_date) self.date_spin.Bind(wx.EVT_SPIN_UP, self.date_next) self.date_spin.Bind(wx.EVT_SPIN_DOWN, self.date_prev) self.add_item.Bind(wx.EVT_BUTTON, self.new_item) self.add_cat.Bind(wx.EVT_BUTTON, self.new_cat) self.cost.Bind(wx.EVT_KILL_FOCUS, self.validate_cost) self.Bind(wx.EVT_LIST_ITEM_RIGHT_CLICK, self.delete_popup) self.menu_delete.Bind(wx.EVT_MENU, self.delete_item) ############################################################################ # open and save database files def check_db(self): '''Check that the db path is an sqlite file.''' if not self.db_path or not os.path.exists(self.db_path): msg = 'No database file. Please open an existing file, or create a new one.' caption = 'No Database' choices = ['Open', 'Create'] dlg = wx.SingleChoiceDialog(self, msg, caption, choices) if dlg.ShowModal() == wx.ID_OK: action = dlg.GetStringSelection() if action == 'Open': self.db_path = self.open_db() else: self.db_path = self.save_db() self.config['DB'] = self.db_path dlg.Destroy() if not self.db_path: self.quit_no_database() self.Destroy() self.config['DB'] = self.db_path def open_db(self): '''Open a database file.''' return self._file_dialog(OPEN) def save_db(self): '''Save a database file to a new location or create a new file when the file doesn't exist.''' return self._file_dialog(SAVE) def quit_no_database(self): '''Inform the user that no database was selected, then quit app.''' msg = 'Quitting application because no database was selected.' caption = 'Exit, no database' style = wx.OK | wx.ICON_EXCLAMATION dlg = wx.MessageDialog(self, msg, caption, style) dlg.ShowModal() dlg.Destroy() def _file_dialog(self, type_): if type_ == OPEN: style = wx.FD_OPEN | wx.FD_FILE_MUST_EXIST msg = "Open a database" else: style = wx.FD_SAVE | wx.FD_OVERWRITE_PROMPT msg = "Save or create a database" wildcard = "Database Files (*.sqlite)|*.sqlite" dlg = wx.FileDialog(self, message=msg, wildcard=wildcard, style=style) dlg.ShowModal() new_path = dlg.GetPath() dlg.Destroy() return new_path ############################################################################ # event handlers def pick_date(self, event): self.refresh_item_list() def date_next(self, event): self.day_inc(1) def date_prev(self, event): self.day_inc(-1) def day_inc(self, inc): day = self.date_picker.GetValue() new_day = day + wx.DateSpan(0, 0, 0, inc) self.date_picker.SetValue(new_day) self.refresh_item_list() def new_item(self, event): cat = self.category.GetValue() item = self.name.GetValue().strip() if not item or not cat: return amount = int(self.cost.GetValue()) if amount == 0: return cat_id = self.db.get_catid(cat) date = self.date_picker.GetValue().FormatISODate() #print(cat_id, cat, item, amount, date) self.db.new_item(cat_id, item, amount, date) self.refresh_item_list() # set the focus back to the item text box self.name.SetFocus() self.name.SetSelection(-1, -1) def delete_popup(self, event): '''Show the delete pop-up menu on right click on a list control.''' self.delete_list = event.GetEventObject() selected_item = self.delete_list.GetFirstSelected() item_id = self.delete_list.GetItem(selected_item, 0).GetText() self.delete_item_id = int(item_id) self.PopupMenu(self.menu_delete) def delete_item(self, event): if self.delete_list is self.cat_list: # try to delete category if not self.db.category_used(self.delete_item_id): self.db.delete_category(self.delete_item_id) self.refresh_cat_list() self.refresh_category() else: # delete outgoings item self.db.delete_item(self.delete_item_id) self.refresh_item_list() def validate_cost(self, event): '''Cost should be an integer.''' try: int(self.cost.GetValue()) except ValueError: self.cost.SetBackgroundColour('pink') self.cost.SetValue('') self.cost.SetFocus() self.cost.Refresh() else: bg_colour = wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOW) self.cost.SetBackgroundColour(bg_colour) self.cost.Refresh() def new_cat(self, event): category = self.cat_text.GetValue().strip() if not category: # blank cat name return if self.db.category_exists(category): print('category already exists') else: self.db.new_category(category) self.refresh_cat_list() self.refresh_category() ############################################################################ # category tab def config_cat_list(self): '''Initial configuration''' self.cat_list.InsertColumn(0, 'cat_id', width=0) self.cat_list.InsertColumn(1, 'Category', width=450) def refresh_cat_list(self): '''Refresh the cat list whenever change is made to categories.''' self.cat_list.DeleteAllItems() for row in self.db.categories(): self.cat_list.Append(row) ############################################################################ # item tab def config_item_list(self): '''Initial configuration of item list.''' l = wx.LIST_FORMAT_LEFT r = wx.LIST_FORMAT_RIGHT columns = [('itemid', 0, l), ('Category', 130, l), ('Item', 340, l), (u'Cost (£)', 70, r)] for i, (col, width, format) in enumerate(columns): self.item_list.InsertColumn(i, col, format=format, width=width) def refresh_item_list(self): date_iso = self.date_picker.GetValue().FormatISODate() self.item_list.DeleteAllItems() total_cost = 0 fmt = u'£{:0.2f}'.format for row in self.db.day_items(date_iso): row = list(row) cost = row[-1] total_cost += cost cost /= 100 row[-1] = fmt(cost) self.item_list.Append(row) # update total in footer self.total_cost.SetLabel(fmt(total_cost/100)) def refresh_category(self): '''The category combo box needs refreshing.''' cats = [c for _, c in self.db.categories()] self.category.Clear() self.category.AppendItems(cats)
{ "content_hash": "e6dcfba12d27bb772f651ec4925bbe8e", "timestamp": "", "source": "github", "line_count": 264, "max_line_length": 88, "avg_line_length": 32.89393939393939, "alnum_prop": 0.5513588208198986, "repo_name": "PreludeAndFugue/PySpend", "id": "08e098ec28a497a6dd79e4f6cd027d4a5eea21bb", "size": "8758", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "pyspend/controller.py", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "Python", "bytes": "24386" } ], "symlink_target": "" }
BASEDIR=$(dirname $0) BASEDIR=$(readlink -f "$BASEDIR/..") ROOTDIR=$(readlink -f "$BASEDIR/..") DOCROOT="$ROOTDIR" if [ "$1" ] then DOCROOT="$1" fi echo "---> Generating $(tput bold ; tput setaf 2)locales$(tput sgr0)" sudo locale-gen sudo locale-gen en_US.UTF-8 sudo locale-gen fr_FR.UTF-8 sudo update-locale sudo dpkg-reconfigure locales echo "---> Translating $(tput bold ; tput setaf 3)$DOCROOT/i18n/fr_FR.UTF-8/LC_MESSAGES/messages.po$(tput sgr0)" msgfmt -o $DOCROOT/i18n/fr_FR.UTF-8/LC_MESSAGES/messages.mo $DOCROOT/i18n/fr_FR.UTF-8/LC_MESSAGES/messages.po
{ "content_hash": "af747b9e18313e3e855b4e195ecc1bc0", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 112, "avg_line_length": 29.894736842105264, "alnum_prop": 0.7059859154929577, "repo_name": "dshorthouse/SimpleMappr", "id": "8623b7f2e7dcc41b577107d51bda088e4dc3e567", "size": "579", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": ".travis/scripts/locales.sh", "mode": "33261", "license": "mit", "language": [ { "name": "CSS", "bytes": "53128" }, { "name": "HTML", "bytes": "68788" }, { "name": "JavaScript", "bytes": "315513" }, { "name": "PHP", "bytes": "523935" }, { "name": "Ruby", "bytes": "3375" }, { "name": "Shell", "bytes": "6185" } ], "symlink_target": "" }
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("03.MaximumElement")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("03.MaximumElement")] [assembly: AssemblyCopyright("Copyright © 2017")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("718a6856-151e-484b-88a8-3c66838ba3e5")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]
{ "content_hash": "571864acd7d6356d37416c6988cbb24d", "timestamp": "", "source": "github", "line_count": 36, "max_line_length": 84, "avg_line_length": 38.94444444444444, "alnum_prop": 0.7482168330955777, "repo_name": "Plotso/SoftUni", "id": "63e31dbccd0bfeb46c8fe50d8283c1dbb5375542", "size": "1405", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "CSharpAdvanced/01.StackAndQueues-Exercises/03.MaximumElement/Properties/AssemblyInfo.cs", "mode": "33188", "license": "mit", "language": [ { "name": "C#", "bytes": "598508" } ], "symlink_target": "" }
<?php namespace AppBundle\Entity; use Doctrine\ORM\Mapping as ORM; use Doctrine\Common\Collections\ArrayCollection; use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; use Symfony\Component\Validator\Constraints as Assert; use Doctrine\Common\Collections\Criteria; /** * Label * * @ORM\Table(name="f_label", indexes={@ORM\Index(name="libelle", columns={"libelle"})}) * @UniqueEntity(fields="libelle", message=" Ce label existe déjà...") * @ORM\Entity */ class Label { /** * @var integer * * @ORM\Column(name="label", type="integer", nullable=false) * @ORM\Id * @ORM\GeneratedValue(strategy="IDENTITY") */ private $label; /** * @ORM\OneToMany(targetEntity="Cd", mappedBy="label") * @ORM\JoinColumn(name="label", referencedColumnName="label") */ private $disques = null; /** * @var string * @Assert\NotBlank(message="Le nom du label ne peut pas être vide") * @Assert\Length( * min="1", * max = "45", * minMessage=" Le label doit disposer d'un nom assez long : {{ limit }} caractère minimum.", * maxMessage=" Le nom du label est trop long : {{ limit }} caractères maximum." * ) * @ORM\Column(name="libelle", type="string", length=45, nullable=false) */ private $libelle = ''; /** * @var string * @Assert\Length( * min="4", * max = "45", * minMessage=" {{ limit }} caractères minimum.", * maxMessage=" {{ limit }} caractères maximum." * ) * @Assert\Email( * message = "'{{ value }}' n'est pas un email valide, cela doit-être une adresse mail.", * checkMX = true * ) * @ORM\Column(name="email", type="string", length=45, nullable=false) */ private $email = ''; /** * @var string * @Assert\Length( * max = "45", * maxMessage=" {{ limit }} caractères maximum." * ) * @ORM\Column(name="telephone", type="string", length=45, nullable=false) */ private $telephone = ''; /** * @var string * @Assert\Length( * max = "45", * maxMessage=" {{ limit }} caractères maximum." * ) * @ORM\Column(name="adresse", type="string", length=45, nullable=false) */ private $adresse = ''; /** * @var string * @Assert\Length( * max = "45", * maxMessage=" {{ limit }} caractères maximum." * ) * @ORM\Column(name="adresse2", type="string", length=45, nullable=false) */ private $adresse2 = ''; /** * @var string * @Assert\Length( * max = "45", * maxMessage=" {{ limit }} caractères maximum." * ) * @ORM\Column(name="cp", type="string", length=45, nullable=false) */ private $cp = ''; /** * @var string * @Assert\Length( * max = "45", * maxMessage=" {{ limit }} caractères maximum." * ) * @ORM\Column(name="ville", type="string", length=45, nullable=false) */ private $ville = ''; /** * @var string * @Assert\Length( * min="4", * max = "250", * minMessage=" {{ limit }} caractères minimum.", * maxMessage=" {{ limit }} caractères maximum." * ) * @Assert\Email( * message = "'{{ value }}' n'est pas un email valide, cela doit-être une adresse mail.", * checkMX = true * ) * @ORM\Column(name="mail_progra", type="string", length=250) */ private $mailProgra = null; /** * @var string * @Assert\Length( * max = "150", * maxMessage=" {{ limit }} caractères maximum." * ) * @ORM\Column(name="contact1", type="string", length=150, nullable=false) */ private $contact1 = ''; /** * @var string * @Assert\Length( * max = "150", * maxMessage=" {{ limit }} caractères maximum." * ) * @ORM\Column(name="siteweb", type="string", length=150, nullable=false) */ private $siteweb = ''; /** * @var boolean * * @ORM\Column(name="suppr", type="boolean", nullable=false) */ private $suppr = false; /** * @var string * * @ORM\Column(name="info", type="text", nullable=false) */ private $info = ''; public function __construct() { $this->disques = new ArrayCollection(); } /** * Set libelle * * @param string $libelle * @return Label */ public function setLibelle($libelle) { $this->libelle = strtoupper($libelle); return $this; } /** * Get libelle * * @return string */ public function getLibelle() { return $this->libelle; } /** * Set disques * * @param ArrayCollection $disques * @return Label */ public function setDisques($disques) { $this->disques = $disques; return $this; } /** * Get disques * * @return ArrayCollection */ public function getDisques() { $criteria = Criteria::create(); $criteria->where(Criteria::expr()->eq('suppr', false)); return $this->disques->matching($criteria); } /** * Set email * * @param string $email * @return Label */ public function setEmail($email) { if(!$email) { $email = ""; } $this->email = $email; return $this; } /** * Get email * * @return string */ public function getEmail() { return $this->email; } /** * Set telephone * * @param string $telephone * @return Label */ public function setTelephone($telephone) { if(!$telephone) { $telephone = ""; } $this->telephone = $telephone; return $this; } /** * Get telephone * * @return string */ public function getTelephone() { return $this->telephone; } /** * Set adresse * * @param string $adresse * @return Label */ public function setAdresse($adresse) { if(!$adresse) { $adresse = ""; } $this->adresse = $adresse; return $this; } /** * Get adresse * * @return string */ public function getAdresse() { return $this->adresse; } /** * Set adresse2 * * @param string $adresse2 * @return Label */ public function setAdresse2($adresse2) { if(!$adresse2) { $adresse2 = ""; } $this->adresse2 = $adresse2; return $this; } /** * Get adresse2 * * @return string */ public function getAdresse2() { return $this->adresse2; } /** * Set cp * * @param string $cp * @return Label */ public function setCp($cp) { if(!$cp) { $cp = ""; } $this->cp = $cp; return $this; } /** * Get cp * * @return string */ public function getCp() { return $this->cp; } /** * Set ville * * @param string $ville * @return Label */ public function setVille($ville) { if(!$ville) { $ville = ""; } $this->ville = $ville; return $this; } /** * Get ville * * @return string */ public function getVille() { return $this->ville; } /** * Set mailProgra * * @param string $mailProgra * @return Label */ public function setMailProgra($mailProgra) { if(!$mailProgra) { $mailProgra = ""; } $this->mailProgra = $mailProgra; return $this; } /** * Get mailProgra * * @return string */ public function getMailProgra() { return $this->mailProgra; } /** * Set contact1 * * @param string $contact1 * @return Label */ public function setContact1($contact1) { if(!$contact1) { $contact1 = ""; } $this->contact1 = $contact1; return $this; } /** * Get contact1 * * @return string */ public function getContact1() { return $this->contact1; } /** * Set siteweb * * @param string $siteweb * @return Label */ public function setSiteweb($siteweb) { if(!$siteweb) { $siteweb = ""; } $this->siteweb = $siteweb; return $this; } /** * Get siteweb * * @return string */ public function getSiteweb() { return $this->siteweb; } /** * Set suppr * * @param boolean $suppr * @return Label */ public function setSuppr($suppr) { $this->suppr = $suppr; return $this; } /** * Get suppr * * @return boolean */ public function getSuppr() { return $this->suppr; } /** * Set info * * @param string $info * @return Label */ public function setInfo($info) { if(!$info) { $info = ""; } $this->info = $info; return $this; } /** * Get info * * @return string */ public function getInfo() { return $this->info; } /** * Get label * * @return integer */ public function getLabel() { return $this->label; } }
{ "content_hash": "e1cea2d4f3b032109ec625472702495c", "timestamp": "", "source": "github", "line_count": 495, "max_line_length": 102, "avg_line_length": 19.33939393939394, "alnum_prop": 0.4900240259061945, "repo_name": "RadioCampusFrance/disco", "id": "81534ff24523ea4de0e2fe57ba8348ed9aa99ace", "size": "9591", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "src/AppBundle/Entity/Label.php", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "3834" }, { "name": "HTML", "bytes": "137782" }, { "name": "JavaScript", "bytes": "18323" }, { "name": "PHP", "bytes": "228234" } ], "symlink_target": "" }
namespace sync_sessions { static const char* kClientName = "name"; static const char* kAppId = "app_id"; static const char* kVirtualUrl = "http://foo/1"; static const char* kReferrer = "referrer"; static const char* kTitle = "title"; // static void SessionSyncTestHelper::BuildSessionSpecifics( const std::string& tag, sync_pb::SessionSpecifics* meta) { meta->set_session_tag(tag); sync_pb::SessionHeader* header = meta->mutable_header(); header->set_device_type(sync_pb::SyncEnums_DeviceType_TYPE_LINUX); header->set_client_name(kClientName); } // static void SessionSyncTestHelper::AddWindowSpecifics( SessionID window_id, const std::vector<SessionID>& tab_list, sync_pb::SessionSpecifics* meta) { sync_pb::SessionHeader* header = meta->mutable_header(); sync_pb::SessionWindow* window = header->add_window(); window->set_window_id(window_id.id()); window->set_selected_tab_index(0); window->set_browser_type(sync_pb::SessionWindow_BrowserType_TYPE_TABBED); for (const SessionID& tab_id : tab_list) { window->add_tab(tab_id.id()); } } // static void SessionSyncTestHelper::VerifySyncedSession( const std::string& tag, const std::vector<std::vector<SessionID>>& windows, const SyncedSession& session) { ASSERT_EQ(tag, session.session_tag); ASSERT_EQ(sync_pb::SyncEnums_DeviceType_TYPE_LINUX, session.device_type); ASSERT_EQ(kClientName, session.session_name); ASSERT_EQ(windows.size(), session.windows.size()); // We assume the window id's are in increasing order. int i = 1; for (auto win_iter = windows.begin(); win_iter != windows.end(); ++win_iter, ++i) { sessions::SessionWindow* win_ptr; auto map_iter = session.windows.find(SessionID::FromSerializedValue(i)); if (map_iter != session.windows.end()) win_ptr = &map_iter->second->wrapped_window; else FAIL(); ASSERT_EQ(win_iter->size(), win_ptr->tabs.size()); ASSERT_EQ(0, win_ptr->selected_tab_index); ASSERT_EQ(sessions::SessionWindow::TYPE_NORMAL, win_ptr->type); int j = 0; for (auto tab_iter = (*win_iter).begin(); tab_iter != (*win_iter).end(); ++tab_iter, ++j) { sessions::SessionTab* tab = win_ptr->tabs[j].get(); ASSERT_EQ(*tab_iter, tab->tab_id); ASSERT_EQ(1U, tab->navigations.size()); ASSERT_EQ(1, tab->tab_visual_index); ASSERT_EQ(0, tab->current_navigation_index); ASSERT_TRUE(tab->pinned); ASSERT_EQ(kAppId, tab->extension_app_id); ASSERT_EQ(1U, tab->navigations.size()); ASSERT_EQ(tab->navigations[0].virtual_url(), GURL(kVirtualUrl)); ASSERT_EQ(tab->navigations[0].referrer_url(), GURL(kReferrer)); ASSERT_EQ(tab->navigations[0].title(), base::ASCIIToUTF16(kTitle)); ASSERT_TRUE(ui::PageTransitionTypeIncludingQualifiersIs( tab->navigations[0].transition_type(), ui::PAGE_TRANSITION_TYPED)); } } } sync_pb::SessionSpecifics SessionSyncTestHelper::BuildTabSpecifics( const std::string& tag, SessionID window_id, SessionID tab_id) { return BuildTabSpecifics(tag, window_id, tab_id, ++max_tab_node_id_); } sync_pb::SessionSpecifics SessionSyncTestHelper::BuildTabSpecifics( const std::string& tag, SessionID window_id, SessionID tab_id, int tab_node_id) { sync_pb::SessionSpecifics specifics; specifics.set_session_tag(tag); specifics.set_tab_node_id(tab_node_id); sync_pb::SessionTab* tab = specifics.mutable_tab(); tab->set_tab_id(tab_id.id()); tab->set_tab_visual_index(1); tab->set_current_navigation_index(0); tab->set_pinned(true); tab->set_extension_app_id(kAppId); sync_pb::TabNavigation* navigation = tab->add_navigation(); navigation->set_virtual_url(kVirtualUrl); navigation->set_referrer(kReferrer); navigation->set_title(kTitle); navigation->set_page_transition(sync_pb::SyncEnums_PageTransition_TYPED); return specifics; } void SessionSyncTestHelper::Reset() { max_tab_node_id_ = 0; } sync_pb::SessionSpecifics SessionSyncTestHelper::BuildForeignSession( const std::string& tag, const std::vector<SessionID>& tab_list, std::vector<sync_pb::SessionSpecifics>* tabs) { const SessionID window_id = SessionID::FromSerializedValue(1); sync_pb::SessionSpecifics header; BuildSessionSpecifics(tag, &header); AddWindowSpecifics(window_id, tab_list, &header); if (tabs) { tabs->clear(); for (SessionID tab_id : tab_list) { tabs->push_back(BuildTabSpecifics(tag, window_id, tab_id)); } } return header; } } // namespace sync_sessions
{ "content_hash": "9f3a79fc040de31b3e6babcb410d3f69", "timestamp": "", "source": "github", "line_count": 129, "max_line_length": 77, "avg_line_length": 35.27906976744186, "alnum_prop": 0.6868820039551747, "repo_name": "ric2b/Vivaldi-browser", "id": "f43f620f1c0d2fcf6e5fe9e9b3b9563f13c97c28", "size": "5063", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "chromium/components/sync_sessions/session_sync_test_helper.cc", "mode": "33188", "license": "bsd-3-clause", "language": [], "symlink_target": "" }
<?php namespace SOA\CatalogBundle\Form\Type; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolverInterface; class VariantType extends AbstractType { /** * @var string */ protected $class; /** * @param string $class */ public function __construct($class) { $this->class = $class; } /** * @param FormBuilderInterface $builder * @param array $options */ public function buildForm(FormBuilderInterface $builder, array $options) { } /** * @param OptionsResolverInterface $resolver */ public function setDefaultOptions(OptionsResolverInterface $resolver) { parent::setDefaultOptions($resolver); $resolver->setDefaults(array( 'data_class' => $this->class, 'csrf_protection' => false, //'csrf_field_name' => '_token', //'intention' => 'product', )); } /** * Returns the name of this type. * * @return string The name of this type */ public function getName() { return 'variant'; } }
{ "content_hash": "7b6dceb93893f5ab2b6f55693abdca15", "timestamp": "", "source": "github", "line_count": 56, "max_line_length": 76, "avg_line_length": 22.017857142857142, "alnum_prop": 0.5774533657745337, "repo_name": "daviddel/soa-catalog", "id": "1deba4e3bf882fce1000e0eca25122dd2ea83408", "size": "1233", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/SOA/CatalogBundle/Form/Type/VariantType.php", "mode": "33188", "license": "mit", "language": [ { "name": "PHP", "bytes": "91971" }, { "name": "Shell", "bytes": "1048" } ], "symlink_target": "" }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>matrices: Not compatible</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.10.0 / matrices - 8.8.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> matrices <small> 8.8.0 <span class="label label-info">Not compatible</span> </small> </h1> <p><em><script>document.write(moment("2020-09-25 05:58:45 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2020-09-25 05:58:45 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base conf-findutils 1 Virtual package relying on findutils conf-m4 1 Virtual package relying on m4 coq 8.10.0 Formal proof management system num 1.3 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.07.1 The OCaml compiler (virtual package) ocaml-base-compiler 4.07.1 Official release 4.07.1 ocaml-config 1 OCaml Switch Configuration ocamlfind 1.8.1 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;[email protected]&quot; homepage: &quot;https://github.com/coq-contribs/matrices&quot; license: &quot;LGPL 2.1&quot; build: [make &quot;-j%{jobs}%&quot;] install: [make &quot;install&quot;] remove: [&quot;rm&quot; &quot;-R&quot; &quot;%{lib}%/coq/user-contrib/Matrices&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.8&quot; &amp; &lt; &quot;8.9~&quot;} ] tags: [ &quot;keyword: matrices&quot; &quot;keyword: vectors&quot; &quot;keyword: linear algebra&quot; &quot;keyword: Coq modules&quot; &quot;category: Mathematics/Algebra&quot; &quot;date: 2003-03&quot; ] authors: [ &quot;Nicolas Magaud&quot; ] bug-reports: &quot;https://github.com/coq-contribs/matrices/issues&quot; dev-repo: &quot;git+https://github.com/coq-contribs/matrices.git&quot; synopsis: &quot;Ring properties for square matrices&quot; description: &quot;&quot;&quot; This contribution contains an operational formalization of square matrices. (m,n)-Matrices are represented as vectors of length n. Each vector (a row) is itself a vector whose length is m. Vectors are actually implemented as dependent lists. We define basic operations for this datatype (addition, product, neutral elements O_n and I_n). We then prove the ring properties for these operations. The development uses Coq modules to specify the interface (the ring structure properties) as a signature. This development deals with dependent types and partial functions. Most of the functions are defined by dependent case analysis and some functions such as getting a column require the use of preconditions (to check whether we are within the bounds of the matrix).&quot;&quot;&quot; flags: light-uninstall url { src: &quot;https://github.com/coq-contribs/matrices/archive/v8.8.0.tar.gz&quot; checksum: &quot;md5=e1966ab1027086001a3f4b27f37978dc&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install</h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-matrices.8.8.0 coq.8.10.0</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.10.0). The following dependencies couldn&#39;t be met: - coq-matrices -&gt; coq &lt; 8.9~ -&gt; ocaml &lt; 4.06.0 base of this switch (use `--unlock-base&#39; to force) Your request can&#39;t be satisfied: - No available version of coq satisfies the constraints No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-matrices.8.8.0</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> <small>Sources are on <a href="https://github.com/coq-bench">GitHub</a>. © Guillaume Claret.</small> </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
{ "content_hash": "bf7803de323734530d25e0aa88373551", "timestamp": "", "source": "github", "line_count": 176, "max_line_length": 205, "avg_line_length": 42.9375, "alnum_prop": 0.5666269683736933, "repo_name": "coq-bench/coq-bench.github.io", "id": "a44bec937dd517b207051cb7a81e477b922c7b56", "size": "7559", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "clean/Linux-x86_64-4.07.1-2.0.1/released/8.10.0/matrices/8.8.0.html", "mode": "33188", "license": "mit", "language": [], "symlink_target": "" }
<?xml version="1.0" ?><!DOCTYPE TS><TS language="ja" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Laughingmancoin</source> <translation>Laughingmancoinについて</translation> </message> <message> <location line="+39"/> <source>&lt;b&gt;Laughingmancoin&lt;/b&gt; version</source> <translation>&lt;b&gt;Laughingmancoin&lt;/b&gt; バージョン</translation> </message> <message> <location line="+57"/> <source> This is experimental software. Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young ([email protected]) and UPnP software written by Thomas Bernard.</source> <translation type="unfinished"/> </message> <message> <location filename="../aboutdialog.cpp" line="+14"/> <source>Copyright</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>The Laughingmancoin developers</source> <translation type="unfinished"/> </message> </context> <context> <name>AddressBookPage</name> <message> <location filename="../forms/addressbookpage.ui" line="+14"/> <source>Address Book</source> <translation>アドレス帳</translation> </message> <message> <location line="+19"/> <source>Double-click to edit address or label</source> <translation>アドレスまたはラベルを編集するにはダブルクリック</translation> </message> <message> <location line="+27"/> <source>Create a new address</source> <translation>新規アドレスの作成</translation> </message> <message> <location line="+14"/> <source>Copy the currently selected address to the system clipboard</source> <translation>現在選択されているアドレスをシステムのクリップボードにコピーする</translation> </message> <message> <location line="-11"/> <source>&amp;New Address</source> <translation type="unfinished"/> </message> <message> <location filename="../addressbookpage.cpp" line="+63"/> <source>These are your Laughingmancoin addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you.</source> <translation type="unfinished"/> </message> <message> <location filename="../forms/addressbookpage.ui" line="+14"/> <source>&amp;Copy Address</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Show &amp;QR Code</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Sign a message to prove you own a Laughingmancoin address</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Sign &amp;Message</source> <translation type="unfinished"/> </message> <message> <location line="+25"/> <source>Delete the currently selected address from the list</source> <translation type="unfinished"/> </message> <message> <location line="+27"/> <source>Export the data in the current tab to a file</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Export</source> <translation type="unfinished"/> </message> <message> <location line="-44"/> <source>Verify a message to ensure it was signed with a specified Laughingmancoin address</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Verify Message</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>&amp;Delete</source> <translation>削除(&amp;D)</translation> </message> <message> <location filename="../addressbookpage.cpp" line="-5"/> <source>These are your Laughingmancoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>Copy &amp;Label</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>&amp;Edit</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Send &amp;Coins</source> <translation type="unfinished"/> </message> <message> <location line="+260"/> <source>Export Address Book Data</source> <translation>アドレス帳データをエクスポートする</translation> </message> <message> <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation>CSVファイル (*.csv)</translation> </message> <message> <location line="+13"/> <source>Error exporting</source> <translation>エクスポートエラー</translation> </message> <message> <location line="+0"/> <source>Could not write to file %1.</source> <translation>%1のファイルに書き込めませんでした。</translation> </message> </context> <context> <name>AddressTableModel</name> <message> <location filename="../addresstablemodel.cpp" line="+144"/> <source>Label</source> <translation>ラベル</translation> </message> <message> <location line="+0"/> <source>Address</source> <translation>アドレス</translation> </message> <message> <location line="+36"/> <source>(no label)</source> <translation>(ラベル無し)</translation> </message> </context> <context> <name>AskPassphraseDialog</name> <message> <location filename="../forms/askpassphrasedialog.ui" line="+26"/> <source>Passphrase Dialog</source> <translation type="unfinished"/> </message> <message> <location line="+21"/> <source>Enter passphrase</source> <translation>パスフレーズを入力</translation> </message> <message> <location line="+14"/> <source>New passphrase</source> <translation>新しいパスフレーズ</translation> </message> <message> <location line="+14"/> <source>Repeat new passphrase</source> <translation>新しいパスフレーズをもう一度</translation> </message> <message> <location filename="../askpassphrasedialog.cpp" line="+33"/> <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source> <translation>ウォレットの新しいパスフレーズを入力してください。&lt;br/&gt;&lt;b&gt;8個以上の単語か10個以上のランダムな文字&lt;/b&gt;を使ってください。</translation> </message> <message> <location line="+1"/> <source>Encrypt wallet</source> <translation>ウォレットを暗号化する</translation> </message> <message> <location line="+3"/> <source>This operation needs your wallet passphrase to unlock the wallet.</source> <translation>この操作はウォレットをアンロックするためにパスフレーズが必要です。</translation> </message> <message> <location line="+5"/> <source>Unlock wallet</source> <translation>ウォレットをアンロックする</translation> </message> <message> <location line="+3"/> <source>This operation needs your wallet passphrase to decrypt the wallet.</source> <translation>この操作はウォレットの暗号化解除のためにパスフレーズが必要です。</translation> </message> <message> <location line="+5"/> <source>Decrypt wallet</source> <translation>ウォレットの暗号化を解除する</translation> </message> <message> <location line="+3"/> <source>Change passphrase</source> <translation>パスフレーズの変更</translation> </message> <message> <location line="+1"/> <source>Enter the old and new passphrase to the wallet.</source> <translation>新旧両方のパスフレーズを入力してください。</translation> </message> <message> <location line="+46"/> <source>Confirm wallet encryption</source> <translation>ウォレットの暗号化を確認する</translation> </message> <message> <location line="+1"/> <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Are you sure you wish to encrypt your wallet?</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet.</source> <translation type="unfinished"/> </message> <message> <location line="+100"/> <location line="+24"/> <source>Warning: The Caps Lock key is on!</source> <translation type="unfinished"/> </message> <message> <location line="-130"/> <location line="+58"/> <source>Wallet encrypted</source> <translation>ウォレットは暗号化されました</translation> </message> <message> <location line="-56"/> <source>Laughingmancoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your laughingmancoins from being stolen by malware infecting your computer.</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <location line="+7"/> <location line="+42"/> <location line="+6"/> <source>Wallet encryption failed</source> <translation>ウォレットの暗号化に失敗しました</translation> </message> <message> <location line="-54"/> <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source> <translation>内部エラーによりウォレットの暗号化が失敗しました。ウォレットは暗号化されませんでした。</translation> </message> <message> <location line="+7"/> <location line="+48"/> <source>The supplied passphrases do not match.</source> <translation>パスフレーズが同じではありません。</translation> </message> <message> <location line="-37"/> <source>Wallet unlock failed</source> <translation>ウォレットのアンロックに失敗しました</translation> </message> <message> <location line="+1"/> <location line="+11"/> <location line="+19"/> <source>The passphrase entered for the wallet decryption was incorrect.</source> <translation>ウォレットの暗号化解除のパスフレーズが正しくありません。</translation> </message> <message> <location line="-20"/> <source>Wallet decryption failed</source> <translation>ウォレットの暗号化解除に失敗しました</translation> </message> <message> <location line="+14"/> <source>Wallet passphrase was successfully changed.</source> <translation type="unfinished"/> </message> </context> <context> <name>LaughingmancoinGUI</name> <message> <location filename="../laughingmancoingui.cpp" line="+233"/> <source>Sign &amp;message...</source> <translation type="unfinished"/> </message> <message> <location line="+280"/> <source>Synchronizing with network...</source> <translation>ネットワークに同期中……</translation> </message> <message> <location line="-349"/> <source>&amp;Overview</source> <translation>概要(&amp;O)</translation> </message> <message> <location line="+1"/> <source>Show general overview of wallet</source> <translation>ウォレットの概要を見る</translation> </message> <message> <location line="+20"/> <source>&amp;Transactions</source> <translation>取引(&amp;T)</translation> </message> <message> <location line="+1"/> <source>Browse transaction history</source> <translation>取引履歴を閲覧</translation> </message> <message> <location line="+7"/> <source>Edit the list of stored addresses and labels</source> <translation>保存されたアドレスとラベルのリストを編集</translation> </message> <message> <location line="-14"/> <source>Show the list of addresses for receiving payments</source> <translation>支払い受け取り用アドレスのリストを見る</translation> </message> <message> <location line="+31"/> <source>E&amp;xit</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Quit application</source> <translation>アプリケーションを終了</translation> </message> <message> <location line="+4"/> <source>Show information about Laughingmancoin</source> <translation>Laughingmancoinに関する情報を見る</translation> </message> <message> <location line="+2"/> <source>About &amp;Qt</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Show information about Qt</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>&amp;Options...</source> <translation>オプション(&amp;O)</translation> </message> <message> <location line="+6"/> <source>&amp;Encrypt Wallet...</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Backup Wallet...</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>&amp;Change Passphrase...</source> <translation type="unfinished"/> </message> <message> <location line="+285"/> <source>Importing blocks from disk...</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Reindexing blocks on disk...</source> <translation type="unfinished"/> </message> <message> <location line="-347"/> <source>Send coins to a Laughingmancoin address</source> <translation type="unfinished"/> </message> <message> <location line="+49"/> <source>Modify configuration options for Laughingmancoin</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>Backup wallet to another location</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Change the passphrase used for wallet encryption</source> <translation>ウォレット暗号化用パスフレーズの変更</translation> </message> <message> <location line="+6"/> <source>&amp;Debug window</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Open debugging and diagnostic console</source> <translation type="unfinished"/> </message> <message> <location line="-4"/> <source>&amp;Verify message...</source> <translation type="unfinished"/> </message> <message> <location line="-165"/> <location line="+530"/> <source>Laughingmancoin</source> <translation type="unfinished"/> </message> <message> <location line="-530"/> <source>Wallet</source> <translation type="unfinished"/> </message> <message> <location line="+101"/> <source>&amp;Send</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>&amp;Receive</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>&amp;Addresses</source> <translation type="unfinished"/> </message> <message> <location line="+22"/> <source>&amp;About Laughingmancoin</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>&amp;Show / Hide</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Show or hide the main Window</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Encrypt the private keys that belong to your wallet</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Sign messages with your Laughingmancoin addresses to prove you own them</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Verify messages to ensure they were signed with specified Laughingmancoin addresses</source> <translation type="unfinished"/> </message> <message> <location line="+28"/> <source>&amp;File</source> <translation>ファイル(&amp;F)</translation> </message> <message> <location line="+7"/> <source>&amp;Settings</source> <translation>設定(&amp;S)</translation> </message> <message> <location line="+6"/> <source>&amp;Help</source> <translation>ヘルプ(&amp;H)</translation> </message> <message> <location line="+9"/> <source>Tabs toolbar</source> <translation>タブツールバー</translation> </message> <message> <location line="+17"/> <location line="+10"/> <source>[testnet]</source> <translation>[testnet]</translation> </message> <message> <location line="+47"/> <source>Laughingmancoin client</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+141"/> <source>%n active connection(s) to Laughingmancoin network</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message> <location line="+22"/> <source>No block source available...</source> <translation type="unfinished"/> </message> <message> <location line="+12"/> <source>Processed %1 of %2 (estimated) blocks of transaction history.</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Processed %1 blocks of transaction history.</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+20"/> <source>%n hour(s)</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n day(s)</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n week(s)</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message> <location line="+4"/> <source>%1 behind</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Last received block was generated %1 ago.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Transactions after this will not yet be visible.</source> <translation type="unfinished"/> </message> <message> <location line="+22"/> <source>Error</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Warning</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Information</source> <translation type="unfinished"/> </message> <message> <location line="+70"/> <source>This transaction is over the size limit. You can still send it for a fee of %1, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?</source> <translation type="unfinished"/> </message> <message> <location line="-140"/> <source>Up to date</source> <translation>バージョンは最新です</translation> </message> <message> <location line="+31"/> <source>Catching up...</source> <translation type="unfinished"/> </message> <message> <location line="+113"/> <source>Confirm transaction fee</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Sent transaction</source> <translation>送金取引</translation> </message> <message> <location line="+0"/> <source>Incoming transaction</source> <translation>着金取引</translation> </message> <message> <location line="+1"/> <source>Date: %1 Amount: %2 Type: %3 Address: %4 </source> <translation type="unfinished"/> </message> <message> <location line="+33"/> <location line="+23"/> <source>URI handling</source> <translation type="unfinished"/> </message> <message> <location line="-23"/> <location line="+23"/> <source>URI can not be parsed! This can be caused by an invalid Laughingmancoin address or malformed URI parameters.</source> <translation type="unfinished"/> </message> <message> <location line="+17"/> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source> <translation>ウォレットは&lt;b&gt;暗号化され、アンロックされています&lt;/b&gt;</translation> </message> <message> <location line="+8"/> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source> <translation>ウォレットは&lt;b&gt;暗号化され、ロックされています&lt;/b&gt;</translation> </message> <message> <location filename="../laughingmancoin.cpp" line="+111"/> <source>A fatal error occurred. Laughingmancoin can no longer continue safely and will quit.</source> <translation type="unfinished"/> </message> </context> <context> <name>ClientModel</name> <message> <location filename="../clientmodel.cpp" line="+104"/> <source>Network Alert</source> <translation type="unfinished"/> </message> </context> <context> <name>EditAddressDialog</name> <message> <location filename="../forms/editaddressdialog.ui" line="+14"/> <source>Edit Address</source> <translation>アドレスの編集</translation> </message> <message> <location line="+11"/> <source>&amp;Label</source> <translation>ラベル(&amp;L)</translation> </message> <message> <location line="+10"/> <source>The label associated with this address book entry</source> <translation>このアドレス帳の入った事と関係のレーベル</translation> </message> <message> <location line="+7"/> <source>&amp;Address</source> <translation>&amp;アドレス</translation> </message> <message> <location line="+10"/> <source>The address associated with this address book entry. This can only be modified for sending addresses.</source> <translation>アドレス帳の入った事の関係のアドレスです。これは遅れるのアドレスのためだけに編集出来ます。</translation> </message> <message> <location filename="../editaddressdialog.cpp" line="+21"/> <source>New receiving address</source> <translation>新しいの受け入れのアドレス</translation> </message> <message> <location line="+4"/> <source>New sending address</source> <translation>新しいの送るのアドレス</translation> </message> <message> <location line="+3"/> <source>Edit receiving address</source> <translation>受け入れのアドレスを編集する</translation> </message> <message> <location line="+4"/> <source>Edit sending address</source> <translation>送るのアドレスを編集する</translation> </message> <message> <location line="+76"/> <source>The entered address &quot;%1&quot; is already in the address book.</source> <translation>入ったのアドレス「%1」はもうアドレス帳にあります。</translation> </message> <message> <location line="-5"/> <source>The entered address &quot;%1&quot; is not a valid Laughingmancoin address.</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Could not unlock wallet.</source> <translation>財布をアンロックするのは出来ませんでした。</translation> </message> <message> <location line="+5"/> <source>New key generation failed.</source> <translation>新しいのキーの生成は失敗しました。</translation> </message> </context> <context> <name>GUIUtil::HelpMessageBox</name> <message> <location filename="../guiutil.cpp" line="+424"/> <location line="+12"/> <source>Laughingmancoin-Qt</source> <translation type="unfinished"/> </message> <message> <location line="-12"/> <source>version</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Usage:</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>command-line options</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>UI options</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Start minimized</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Show splash screen on startup (default: 1)</source> <translation type="unfinished"/> </message> </context> <context> <name>OptionsDialog</name> <message> <location filename="../forms/optionsdialog.ui" line="+14"/> <source>Options</source> <translation>オプションズ</translation> </message> <message> <location line="+16"/> <source>&amp;Main</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>Pay transaction &amp;fee</source> <translation type="unfinished"/> </message> <message> <location line="+31"/> <source>Automatically start Laughingmancoin after logging in to the system.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Start Laughingmancoin on system login</source> <translation type="unfinished"/> </message> <message> <location line="+35"/> <source>Reset all client options to default.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Reset Options</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>&amp;Network</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Automatically open the Laughingmancoin client port on the router. This only works when your router supports UPnP and it is enabled.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Map port using &amp;UPnP</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Connect to the Laughingmancoin network through a SOCKS proxy (e.g. when connecting through Tor).</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Connect through SOCKS proxy:</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>Proxy &amp;IP:</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>IP address of the proxy (e.g. 127.0.0.1)</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>&amp;Port:</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>Port of the proxy (e.g. 9050)</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>SOCKS &amp;Version:</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>SOCKS version of the proxy (e.g. 5)</source> <translation type="unfinished"/> </message> <message> <location line="+36"/> <source>&amp;Window</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Show only a tray icon after minimizing the window.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Minimize to the tray instead of the taskbar</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>M&amp;inimize on close</source> <translation type="unfinished"/> </message> <message> <location line="+21"/> <source>&amp;Display</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>User Interface &amp;language:</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>The user interface language can be set here. This setting will take effect after restarting Laughingmancoin.</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>&amp;Unit to show amounts in:</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>Choose the default subdivision unit to show in the interface and when sending coins.</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>Whether to show Laughingmancoin addresses in the transaction list or not.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Display addresses in transaction list</source> <translation type="unfinished"/> </message> <message> <location line="+71"/> <source>&amp;OK</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>&amp;Cancel</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>&amp;Apply</source> <translation type="unfinished"/> </message> <message> <location filename="../optionsdialog.cpp" line="+53"/> <source>default</source> <translation type="unfinished"/> </message> <message> <location line="+130"/> <source>Confirm options reset</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Some settings may require a client restart to take effect.</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Do you want to proceed?</source> <translation type="unfinished"/> </message> <message> <location line="+42"/> <location line="+9"/> <source>Warning</source> <translation type="unfinished"/> </message> <message> <location line="-9"/> <location line="+9"/> <source>This setting will take effect after restarting Laughingmancoin.</source> <translation type="unfinished"/> </message> <message> <location line="+29"/> <source>The supplied proxy address is invalid.</source> <translation type="unfinished"/> </message> </context> <context> <name>OverviewPage</name> <message> <location filename="../forms/overviewpage.ui" line="+14"/> <source>Form</source> <translation>フォーム</translation> </message> <message> <location line="+50"/> <location line="+166"/> <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Laughingmancoin network after a connection is established, but this process has not completed yet.</source> <translation type="unfinished"/> </message> <message> <location line="-124"/> <source>Balance:</source> <translation>残高:</translation> </message> <message> <location line="+29"/> <source>Unconfirmed:</source> <translation>未確認:</translation> </message> <message> <location line="-78"/> <source>Wallet</source> <translation type="unfinished"/> </message> <message> <location line="+107"/> <source>Immature:</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>Mined balance that has not yet matured</source> <translation type="unfinished"/> </message> <message> <location line="+46"/> <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source> <translation>&lt;b&gt;最近の取引&lt;/b&gt;</translation> </message> <message> <location line="-101"/> <source>Your current balance</source> <translation>今の残高</translation> </message> <message> <location line="+29"/> <source>Total of transactions that have yet to be confirmed, and do not yet count toward the current balance</source> <translation type="unfinished"/> </message> <message> <location filename="../overviewpage.cpp" line="+116"/> <location line="+1"/> <source>out of sync</source> <translation type="unfinished"/> </message> </context> <context> <name>PaymentServer</name> <message> <location filename="../paymentserver.cpp" line="+107"/> <source>Cannot start laughingmancoin: click-to-pay handler</source> <translation type="unfinished"/> </message> </context> <context> <name>QRCodeDialog</name> <message> <location filename="../forms/qrcodedialog.ui" line="+14"/> <source>QR Code Dialog</source> <translation type="unfinished"/> </message> <message> <location line="+59"/> <source>Request Payment</source> <translation type="unfinished"/> </message> <message> <location line="+56"/> <source>Amount:</source> <translation type="unfinished"/> </message> <message> <location line="-44"/> <source>Label:</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>Message:</source> <translation type="unfinished"/> </message> <message> <location line="+71"/> <source>&amp;Save As...</source> <translation type="unfinished"/> </message> <message> <location filename="../qrcodedialog.cpp" line="+62"/> <source>Error encoding URI into QR Code.</source> <translation type="unfinished"/> </message> <message> <location line="+40"/> <source>The entered amount is invalid, please check.</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>Resulting URI too long, try to reduce the text for label / message.</source> <translation type="unfinished"/> </message> <message> <location line="+25"/> <source>Save QR Code</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>PNG Images (*.png)</source> <translation type="unfinished"/> </message> </context> <context> <name>RPCConsole</name> <message> <location filename="../forms/rpcconsole.ui" line="+46"/> <source>Client name</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <location line="+23"/> <location line="+26"/> <location line="+23"/> <location line="+23"/> <location line="+36"/> <location line="+53"/> <location line="+23"/> <location line="+23"/> <location filename="../rpcconsole.cpp" line="+339"/> <source>N/A</source> <translation type="unfinished"/> </message> <message> <location line="-217"/> <source>Client version</source> <translation type="unfinished"/> </message> <message> <location line="-45"/> <source>&amp;Information</source> <translation type="unfinished"/> </message> <message> <location line="+68"/> <source>Using OpenSSL version</source> <translation type="unfinished"/> </message> <message> <location line="+49"/> <source>Startup time</source> <translation type="unfinished"/> </message> <message> <location line="+29"/> <source>Network</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Number of connections</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>On testnet</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>Block chain</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Current number of blocks</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>Estimated total blocks</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>Last block time</source> <translation type="unfinished"/> </message> <message> <location line="+52"/> <source>&amp;Open</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Command-line options</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Show the Laughingmancoin-Qt help message to get a list with possible Laughingmancoin command-line options.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Show</source> <translation type="unfinished"/> </message> <message> <location line="+24"/> <source>&amp;Console</source> <translation type="unfinished"/> </message> <message> <location line="-260"/> <source>Build date</source> <translation type="unfinished"/> </message> <message> <location line="-104"/> <source>Laughingmancoin - Debug window</source> <translation type="unfinished"/> </message> <message> <location line="+25"/> <source>Laughingmancoin Core</source> <translation type="unfinished"/> </message> <message> <location line="+279"/> <source>Debug log file</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Open the Laughingmancoin debug log file from the current data directory. This can take a few seconds for large log files.</source> <translation type="unfinished"/> </message> <message> <location line="+102"/> <source>Clear console</source> <translation type="unfinished"/> </message> <message> <location filename="../rpcconsole.cpp" line="-30"/> <source>Welcome to the Laughingmancoin RPC console.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source> <translation type="unfinished"/> </message> </context> <context> <name>SendCoinsDialog</name> <message> <location filename="../forms/sendcoinsdialog.ui" line="+14"/> <location filename="../sendcoinsdialog.cpp" line="+124"/> <location line="+5"/> <location line="+5"/> <location line="+5"/> <location line="+6"/> <location line="+5"/> <location line="+5"/> <source>Send Coins</source> <translation>コインを送る</translation> </message> <message> <location line="+50"/> <source>Send to multiple recipients at once</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Add &amp;Recipient</source> <translation type="unfinished"/> </message> <message> <location line="+20"/> <source>Remove all transaction fields</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Clear &amp;All</source> <translation type="unfinished"/> </message> <message> <location line="+22"/> <source>Balance:</source> <translation>残高:</translation> </message> <message> <location line="+10"/> <source>123.456 LMC</source> <translation type="unfinished"/> </message> <message> <location line="+31"/> <source>Confirm the send action</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>S&amp;end</source> <translation type="unfinished"/> </message> <message> <location filename="../sendcoinsdialog.cpp" line="-59"/> <source>&lt;b&gt;%1&lt;/b&gt; to %2 (%3)</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Confirm send coins</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Are you sure you want to send %1?</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source> and </source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>The recipient address is not valid, please recheck.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>The amount to pay must be larger than 0.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>The amount exceeds your balance.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>The total exceeds your balance when the %1 transaction fee is included.</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Duplicate address found, can only send to each address once per send operation.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Error: Transaction creation failed!</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source> <translation type="unfinished"/> </message> </context> <context> <name>SendCoinsEntry</name> <message> <location filename="../forms/sendcoinsentry.ui" line="+14"/> <source>Form</source> <translation>フォーム</translation> </message> <message> <location line="+15"/> <source>A&amp;mount:</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>Pay &amp;To:</source> <translation type="unfinished"/> </message> <message> <location line="+34"/> <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source> <translation type="unfinished"/> </message> <message> <location line="+60"/> <location filename="../sendcoinsentry.cpp" line="+26"/> <source>Enter a label for this address to add it to your address book</source> <translation type="unfinished"/> </message> <message> <location line="-78"/> <source>&amp;Label:</source> <translation type="unfinished"/> </message> <message> <location line="+28"/> <source>Choose address from address book</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Alt+A</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Paste address from clipboard</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Alt+P</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Remove this recipient</source> <translation type="unfinished"/> </message> <message> <location filename="../sendcoinsentry.cpp" line="+1"/> <source>Enter a Laughingmancoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source> <translation type="unfinished"/> </message> </context> <context> <name>SignVerifyMessageDialog</name> <message> <location filename="../forms/signverifymessagedialog.ui" line="+14"/> <source>Signatures - Sign / Verify a Message</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>&amp;Sign Message</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source> <translation type="unfinished"/> </message> <message> <location line="+18"/> <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <location line="+213"/> <source>Choose an address from the address book</source> <translation type="unfinished"/> </message> <message> <location line="-203"/> <location line="+213"/> <source>Alt+A</source> <translation type="unfinished"/> </message> <message> <location line="-203"/> <source>Paste address from clipboard</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Alt+P</source> <translation type="unfinished"/> </message> <message> <location line="+12"/> <source>Enter the message you want to sign here</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Signature</source> <translation type="unfinished"/> </message> <message> <location line="+27"/> <source>Copy the current signature to the system clipboard</source> <translation type="unfinished"/> </message> <message> <location line="+21"/> <source>Sign the message to prove you own this Laughingmancoin address</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Sign &amp;Message</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Reset all sign message fields</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <location line="+146"/> <source>Clear &amp;All</source> <translation type="unfinished"/> </message> <message> <location line="-87"/> <source>&amp;Verify Message</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Enter the signing address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack.</source> <translation type="unfinished"/> </message> <message> <location line="+21"/> <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source> <translation type="unfinished"/> </message> <message> <location line="+40"/> <source>Verify the message to ensure it was signed with the specified Laughingmancoin address</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Verify &amp;Message</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Reset all verify message fields</source> <translation type="unfinished"/> </message> <message> <location filename="../signverifymessagedialog.cpp" line="+27"/> <location line="+3"/> <source>Enter a Laughingmancoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source> <translation type="unfinished"/> </message> <message> <location line="-2"/> <source>Click &quot;Sign Message&quot; to generate signature</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Enter Laughingmancoin signature</source> <translation type="unfinished"/> </message> <message> <location line="+82"/> <location line="+81"/> <source>The entered address is invalid.</source> <translation type="unfinished"/> </message> <message> <location line="-81"/> <location line="+8"/> <location line="+73"/> <location line="+8"/> <source>Please check the address and try again.</source> <translation type="unfinished"/> </message> <message> <location line="-81"/> <location line="+81"/> <source>The entered address does not refer to a key.</source> <translation type="unfinished"/> </message> <message> <location line="-73"/> <source>Wallet unlock was cancelled.</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Private key for the entered address is not available.</source> <translation type="unfinished"/> </message> <message> <location line="+12"/> <source>Message signing failed.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Message signed.</source> <translation type="unfinished"/> </message> <message> <location line="+59"/> <source>The signature could not be decoded.</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <location line="+13"/> <source>Please check the signature and try again.</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>The signature did not match the message digest.</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Message verification failed.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Message verified.</source> <translation type="unfinished"/> </message> </context> <context> <name>SplashScreen</name> <message> <location filename="../splashscreen.cpp" line="+22"/> <source>The Laughingmancoin developers</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>[testnet]</source> <translation>[testnet]</translation> </message> </context> <context> <name>TransactionDesc</name> <message> <location filename="../transactiondesc.cpp" line="+20"/> <source>Open until %1</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>%1/offline</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>%1/unconfirmed</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>%1 confirmations</source> <translation type="unfinished"/> </message> <message> <location line="+18"/> <source>Status</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+7"/> <source>, broadcast through %n node(s)</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message> <location line="+4"/> <source>Date</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Source</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Generated</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <location line="+17"/> <source>From</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <location line="+22"/> <location line="+58"/> <source>To</source> <translation type="unfinished"/> </message> <message> <location line="-77"/> <location line="+2"/> <source>own address</source> <translation type="unfinished"/> </message> <message> <location line="-2"/> <source>label</source> <translation type="unfinished"/> </message> <message> <location line="+37"/> <location line="+12"/> <location line="+45"/> <location line="+17"/> <location line="+30"/> <source>Credit</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="-102"/> <source>matures in %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message> <location line="+2"/> <source>not accepted</source> <translation type="unfinished"/> </message> <message> <location line="+44"/> <location line="+8"/> <location line="+15"/> <location line="+30"/> <source>Debit</source> <translation type="unfinished"/> </message> <message> <location line="-39"/> <source>Transaction fee</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Net amount</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Message</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Comment</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Transaction ID</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Debug information</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Transaction</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Inputs</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>Amount</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>true</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>false</source> <translation type="unfinished"/> </message> <message> <location line="-209"/> <source>, has not been successfully broadcast yet</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="-35"/> <source>Open for %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message> <location line="+70"/> <source>unknown</source> <translation type="unfinished"/> </message> </context> <context> <name>TransactionDescDialog</name> <message> <location filename="../forms/transactiondescdialog.ui" line="+14"/> <source>Transaction details</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>This pane shows a detailed description of the transaction</source> <translation type="unfinished"/> </message> </context> <context> <name>TransactionTableModel</name> <message> <location filename="../transactiontablemodel.cpp" line="+225"/> <source>Date</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Type</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Address</source> <translation>Helbidea</translation> </message> <message> <location line="+0"/> <source>Amount</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+57"/> <source>Open for %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message> <location line="+3"/> <source>Open until %1</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Offline (%1 confirmations)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Unconfirmed (%1 of %2 confirmations)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Confirmed (%1 confirmations)</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+8"/> <source>Mined balance will be available when it matures in %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message> <location line="+5"/> <source>This block was not received by any other nodes and will probably not be accepted!</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Generated but not accepted</source> <translation type="unfinished"/> </message> <message> <location line="+43"/> <source>Received with</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Received from</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Sent to</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Payment to yourself</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Mined</source> <translation type="unfinished"/> </message> <message> <location line="+38"/> <source>(n/a)</source> <translation type="unfinished"/> </message> <message> <location line="+199"/> <source>Transaction status. Hover over this field to show number of confirmations.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Date and time that the transaction was received.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Type of transaction.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Destination address of transaction.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Amount removed from or added to balance.</source> <translation type="unfinished"/> </message> </context> <context> <name>TransactionView</name> <message> <location filename="../transactionview.cpp" line="+52"/> <location line="+16"/> <source>All</source> <translation type="unfinished"/> </message> <message> <location line="-15"/> <source>Today</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>This week</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>This month</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Last month</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>This year</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Range...</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Received with</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Sent to</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>To yourself</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Mined</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Other</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Enter address or label to search</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Min amount</source> <translation type="unfinished"/> </message> <message> <location line="+34"/> <source>Copy address</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy label</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy amount</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy transaction ID</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Edit label</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Show transaction details</source> <translation type="unfinished"/> </message> <message> <location line="+139"/> <source>Export Transaction Data</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation>テキスト CSV (*.csv)</translation> </message> <message> <location line="+8"/> <source>Confirmed</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Date</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Type</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Label</source> <translation>レーベル</translation> </message> <message> <location line="+1"/> <source>Address</source> <translation>Helbidea</translation> </message> <message> <location line="+1"/> <source>Amount</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>ID</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Error exporting</source> <translation>エラー輸出</translation> </message> <message> <location line="+0"/> <source>Could not write to file %1.</source> <translation>%1のファイルに書き込めませんでした。</translation> </message> <message> <location line="+100"/> <source>Range:</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>to</source> <translation type="unfinished"/> </message> </context> <context> <name>WalletModel</name> <message> <location filename="../walletmodel.cpp" line="+193"/> <source>Send Coins</source> <translation type="unfinished"/> </message> </context> <context> <name>WalletView</name> <message> <location filename="../walletview.cpp" line="+42"/> <source>&amp;Export</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Export the data in the current tab to a file</source> <translation type="unfinished"/> </message> <message> <location line="+193"/> <source>Backup Wallet</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Wallet Data (*.dat)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Backup Failed</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>There was an error trying to save the wallet data to the new location.</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Backup Successful</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>The wallet data was successfully saved to the new location.</source> <translation type="unfinished"/> </message> </context> <context> <name>laughingmancoin-core</name> <message> <location filename="../laughingmancoinstrings.cpp" line="+94"/> <source>Laughingmancoin version</source> <translation>Laughingmancoin Bertsio</translation> </message> <message> <location line="+102"/> <source>Usage:</source> <translation type="unfinished"/> </message> <message> <location line="-29"/> <source>Send command to -server or laughingmancoind</source> <translation type="unfinished"/> </message> <message> <location line="-23"/> <source>List commands</source> <translation type="unfinished"/> </message> <message> <location line="-12"/> <source>Get help for a command</source> <translation type="unfinished"/> </message> <message> <location line="+24"/> <source>Options:</source> <translation type="unfinished"/> </message> <message> <location line="+24"/> <source>Specify configuration file (default: laughingmancoin.conf)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Specify pid file (default: laughingmancoind.pid)</source> <translation type="unfinished"/> </message> <message> <location line="-1"/> <source>Specify data directory</source> <translation type="unfinished"/> </message> <message> <location line="-9"/> <source>Set database cache size in megabytes (default: 25)</source> <translation type="unfinished"/> </message> <message> <location line="-28"/> <source>Listen for connections on &lt;port&gt; (default: 9336 or testnet: 19336)</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source> <translation type="unfinished"/> </message> <message> <location line="-48"/> <source>Connect to a node to retrieve peer addresses, and disconnect</source> <translation type="unfinished"/> </message> <message> <location line="+82"/> <source>Specify your own public address</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Threshold for disconnecting misbehaving peers (default: 100)</source> <translation type="unfinished"/> </message> <message> <location line="-134"/> <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source> <translation type="unfinished"/> </message> <message> <location line="-29"/> <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source> <translation type="unfinished"/> </message> <message> <location line="+27"/> <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 9335 or testnet: 19335)</source> <translation type="unfinished"/> </message> <message> <location line="+37"/> <source>Accept command line and JSON-RPC commands</source> <translation type="unfinished"/> </message> <message> <location line="+76"/> <source>Run in the background as a daemon and accept commands</source> <translation type="unfinished"/> </message> <message> <location line="+37"/> <source>Use the test network</source> <translation type="unfinished"/> </message> <message> <location line="-112"/> <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source> <translation type="unfinished"/> </message> <message> <location line="-80"/> <source>%s, you must set a rpcpassword in the configuration file: %s It is recommended you use the following random password: rpcuser=laughingmancoinrpc rpcpassword=%s (you do not need to remember this password) The username and password MUST NOT be the same. If the file does not exist, create it with owner-readable-only file permissions. It is also recommended to set alertnotify so you are notified of problems; for example: alertnotify=echo %%s | mail -s &quot;Laughingmancoin Alert&quot; [email protected] </source> <translation type="unfinished"/> </message> <message> <location line="+17"/> <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Cannot obtain a lock on data directory %s. Laughingmancoin is probably already running.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Execute command when a relevant alert is received (%s in cmd is replaced by message)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Laughingmancoin will not work properly.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Attempt to recover private keys from a corrupt wallet.dat</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Block creation options:</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Connect only to the specified node(s)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Corrupted block database detected</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Discover own IP address (default: 1 when listening and no -externalip)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Do you want to rebuild the block database now?</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Error initializing block database</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error initializing wallet database environment %s!</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error loading block database</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Error opening block database</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Error: Disk space is low!</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error: Wallet locked, unable to create transaction!</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error: system error: </source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to listen on any port. Use -listen=0 if you want this.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to read block info</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to read block</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to sync block index</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write block index</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write block info</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write block</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write file info</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write to coin database</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write transaction index</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write undo data</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Find peers using DNS lookup (default: 1 unless -connect)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Generate coins (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>How many blocks to check at startup (default: 288, 0 = all)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>How thorough the block verification is (0-4, default: 3)</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>Not enough file descriptors available.</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Rebuild block chain index from current blk000??.dat files</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Set the number of threads to service RPC calls (default: 4)</source> <translation type="unfinished"/> </message> <message> <location line="+26"/> <source>Verifying blocks...</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Verifying wallet...</source> <translation type="unfinished"/> </message> <message> <location line="-69"/> <source>Imports blocks from external blk000??.dat file</source> <translation type="unfinished"/> </message> <message> <location line="-76"/> <source>Set the number of script verification threads (up to 16, 0 = auto, &lt;0 = leave that many cores free, default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+77"/> <source>Information</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Invalid -tor address: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Maintain a full transaction index (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Only accept block chain matching built-in checkpoints (default: 1)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Output extra debugging information. Implies all other -debug* options</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Output extra network debugging information</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Prepend debug output with timestamp</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>SSL options: (see the Laughingmancoin Wiki for SSL setup instructions)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Select the version of socks proxy to use (4-5, default: 5)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Send trace/debug info to console instead of debug.log file</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Send trace/debug info to debugger</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Set maximum block size in bytes (default: 250000)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Set minimum block size in bytes (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Signing transaction failed</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Specify connection timeout in milliseconds (default: 5000)</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>System error: </source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Transaction amount too small</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Transaction amounts must be positive</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Transaction too large</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Use UPnP to map the listening port (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Use UPnP to map the listening port (default: 1 when listening)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Use proxy to reach tor hidden services (default: same as -proxy)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Username for JSON-RPC connections</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Warning</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Warning: This version is obsolete, upgrade required!</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>You need to rebuild the databases using -reindex to change -txindex</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>wallet.dat corrupt, salvage failed</source> <translation type="unfinished"/> </message> <message> <location line="-50"/> <source>Password for JSON-RPC connections</source> <translation type="unfinished"/> </message> <message> <location line="-67"/> <source>Allow JSON-RPC connections from specified IP address</source> <translation type="unfinished"/> </message> <message> <location line="+76"/> <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source> <translation type="unfinished"/> </message> <message> <location line="-120"/> <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source> <translation type="unfinished"/> </message> <message> <location line="+147"/> <source>Upgrade wallet to latest format</source> <translation type="unfinished"/> </message> <message> <location line="-21"/> <source>Set key pool size to &lt;n&gt; (default: 100)</source> <translation type="unfinished"/> </message> <message> <location line="-12"/> <source>Rescan the block chain for missing wallet transactions</source> <translation type="unfinished"/> </message> <message> <location line="+35"/> <source>Use OpenSSL (https) for JSON-RPC connections</source> <translation type="unfinished"/> </message> <message> <location line="-26"/> <source>Server certificate file (default: server.cert)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Server private key (default: server.pem)</source> <translation type="unfinished"/> </message> <message> <location line="-151"/> <source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source> <translation type="unfinished"/> </message> <message> <location line="+165"/> <source>This help message</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source> <translation type="unfinished"/> </message> <message> <location line="-91"/> <source>Connect through socks proxy</source> <translation type="unfinished"/> </message> <message> <location line="-10"/> <source>Allow DNS lookups for -addnode, -seednode and -connect</source> <translation type="unfinished"/> </message> <message> <location line="+55"/> <source>Loading addresses...</source> <translation type="unfinished"/> </message> <message> <location line="-35"/> <source>Error loading wallet.dat: Wallet corrupted</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error loading wallet.dat: Wallet requires newer version of Laughingmancoin</source> <translation type="unfinished"/> </message> <message> <location line="+93"/> <source>Wallet needed to be rewritten: restart Laughingmancoin to complete</source> <translation type="unfinished"/> </message> <message> <location line="-95"/> <source>Error loading wallet.dat</source> <translation type="unfinished"/> </message> <message> <location line="+28"/> <source>Invalid -proxy address: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+56"/> <source>Unknown network specified in -onlynet: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="-1"/> <source>Unknown -socks proxy version requested: %i</source> <translation type="unfinished"/> </message> <message> <location line="-96"/> <source>Cannot resolve -bind address: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Cannot resolve -externalip address: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+44"/> <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Invalid amount</source> <translation type="unfinished"/> </message> <message> <location line="-6"/> <source>Insufficient funds</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Loading block index...</source> <translation type="unfinished"/> </message> <message> <location line="-57"/> <source>Add a node to connect to and attempt to keep the connection open</source> <translation type="unfinished"/> </message> <message> <location line="-25"/> <source>Unable to bind to %s on this computer. Laughingmancoin is probably already running.</source> <translation type="unfinished"/> </message> <message> <location line="+64"/> <source>Fee per KB to add to transactions you send</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>Loading wallet...</source> <translation type="unfinished"/> </message> <message> <location line="-52"/> <source>Cannot downgrade wallet</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Cannot write default address</source> <translation type="unfinished"/> </message> <message> <location line="+64"/> <source>Rescanning...</source> <translation type="unfinished"/> </message> <message> <location line="-57"/> <source>Done loading</source> <translation type="unfinished"/> </message> <message> <location line="+82"/> <source>To use the %s option</source> <translation type="unfinished"/> </message> <message> <location line="-74"/> <source>Error</source> <translation type="unfinished"/> </message> <message> <location line="-31"/> <source>You must set rpcpassword=&lt;password&gt; in the configuration file: %s If the file does not exist, create it with owner-readable-only file permissions.</source> <translation type="unfinished"/> </message> </context> </TS>
{ "content_hash": "fd9a0da7d81c66ee08df1cf8fd0c5e70", "timestamp": "", "source": "github", "line_count": 2917, "max_line_length": 395, "avg_line_length": 33.42920809050394, "alnum_prop": 0.5904033308379396, "repo_name": "osuyuushi/laughingmancoin", "id": "5c17f234202445f4e652499032ae564f5356ece3", "size": "99475", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/qt/locale/bitcoin_ja.ts", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "101891" }, { "name": "C++", "bytes": "2423999" }, { "name": "CSS", "bytes": "1127" }, { "name": "IDL", "bytes": "13808" }, { "name": "Objective-C", "bytes": "2734" }, { "name": "Python", "bytes": "37527" }, { "name": "Shell", "bytes": "2591" }, { "name": "TypeScript", "bytes": "5267041" } ], "symlink_target": "" }
SYNONYM #### According to The Catalogue of Life, 3rd January 2011 #### Published in null #### Original name null ### Remarks null
{ "content_hash": "3a39e74ae042590a0e043f75d3758c9a", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 39, "avg_line_length": 10.23076923076923, "alnum_prop": 0.6917293233082706, "repo_name": "mdoering/backbone", "id": "97f6083d04c99e2686b63b1e61e2bb10e17869d4", "size": "192", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "life/Plantae/Magnoliophyta/Magnoliopsida/Malpighiales/Phyllanthaceae/Phyllanthus/Phyllanthus virgatus/ Syn. Phyllanthus simplex filicaulis/README.md", "mode": "33188", "license": "apache-2.0", "language": [], "symlink_target": "" }
/** * @venus-library jasmine * @venus-include ../../../src/functions.js * @venus-include ../../../src/functions.js * @venus-include ../../../src/PropertyAccessor.js * @venus-include ../../../src/ServiceContainer/Core.js * @venus-include ../../../src/ServiceContainer/Definition.js * @venus-include ../../../src/ServiceContainer/Reference.js * @venus-include ../../../src/ServiceContainer/CompilerPassInterface.js * @venus-code ../../../src/ViewBundle/CompilerPass/RegisterLayoutWrapperPass.js */ describe('register layout wrapper', function () { var sc, pass; beforeEach(function () { sc = new Sy.ServiceContainer.Core(); pass = new Sy.ViewBundle.CompilerPass.RegisterLayoutWrapperPass(); sc.set({ 'sy::core::view::factory::layout': {}, 'layout': { tags: [ {name: 'view.layout', alias: 'l', viewscreen: 'vs'}, {name: 'view.layout', alias: 'l2'}, {name: 'view.layout'} ] }, }); }); it('should register two layouts to the factory', function () { pass.process(sc); expect( sc .getDefinition('sy::core::view::factory::layout') .getCalls() .length ).toEqual(1); }); });
{ "content_hash": "f5f603686d3e9873c157568679dddaaa", "timestamp": "", "source": "github", "line_count": 45, "max_line_length": 80, "avg_line_length": 30.08888888888889, "alnum_prop": 0.5302806499261448, "repo_name": "Baptouuuu/Sy", "id": "8f95c5bf941df856089fce7d0b750affe1dd0051", "size": "1354", "binary": false, "copies": "1", "ref": "refs/heads/develop", "path": "tests/viewbundle/compilerpass/registerlayoutwrapperpass.js", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "897" }, { "name": "HTML", "bytes": "14953" }, { "name": "JavaScript", "bytes": "1801695" } ], "symlink_target": "" }
'use strict'; goog.provide('Blockly.Msg.diq'); goog.require('Blockly.Msg'); Blockly.Msg.ADD_COMMENT = "Tefsir cı ke"; Blockly.Msg.CHANGE_VALUE_TITLE = "Erci bıvırne:"; Blockly.Msg.CLEAN_UP = "Çengan pak ke"; Blockly.Msg.COLLAPSE_ALL = "Çengi teng ke"; Blockly.Msg.COLLAPSE_BLOCK = "Çengi teng ke"; Blockly.Msg.COLOUR_BLEND_COLOUR1 = "reng 1"; Blockly.Msg.COLOUR_BLEND_COLOUR2 = "reng 2"; Blockly.Msg.COLOUR_BLEND_HELPURL = "http://meyerweb.com/eric/tools/color-blend/"; // untranslated Blockly.Msg.COLOUR_BLEND_RATIO = "nisbet"; Blockly.Msg.COLOUR_BLEND_TITLE = "tewde"; Blockly.Msg.COLOUR_BLEND_TOOLTIP = "Blends two colours together with a given ratio (0.0 - 1.0)."; // untranslated Blockly.Msg.COLOUR_PICKER_HELPURL = "https://diq.wikipedia.org/wiki/Reng"; Blockly.Msg.COLOUR_PICKER_TOOLTIP = "Choose a colour from the palette."; // untranslated Blockly.Msg.COLOUR_RANDOM_HELPURL = "http://randomcolour.com"; // untranslated Blockly.Msg.COLOUR_RANDOM_TITLE = "rengo rastameye"; Blockly.Msg.COLOUR_RANDOM_TOOLTIP = "Tesadufi yu ren bıweçin"; Blockly.Msg.COLOUR_RGB_BLUE = "mawi"; Blockly.Msg.COLOUR_RGB_GREEN = "kıho"; Blockly.Msg.COLOUR_RGB_HELPURL = "http://www.december.com/html/spec/colorper.html"; // untranslated Blockly.Msg.COLOUR_RGB_RED = "sur"; Blockly.Msg.COLOUR_RGB_TITLE = "komponentên rengan"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "Create a colour with the specified amount of red, green, and blue. All values must be between 0 and 100."; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "Çerxen ra vec"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "Gama bin da çerxeni ra dewam ke"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Öujtewada çerxeni ra bıvıci"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Skip the rest of this loop, and continue with the next iteration."; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Warning: This block may only be used within a loop."; // untranslated Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "for each item %1 in list %2"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "For each item in a list, set the variable '%1' to the item, and then do some statements."; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "count with %1 from %2 to %3 by %4"; // untranslated Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Have the variable '%1' take on the values from the start number to the end number, counting by the specified interval, and do the specified blocks."; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Bloq da if'i rê yu şert dekerê de."; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Add a final, catch-all condition to the if block."; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Add, remove, or reorder sections to reconfigure this if block."; // untranslated Blockly.Msg.CONTROLS_IF_MSG_ELSE = "çıniyose"; Blockly.Msg.CONTROLS_IF_MSG_ELSEIF = "niyose"; Blockly.Msg.CONTROLS_IF_MSG_IF = "se"; Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "If a value is true, then do some statements."; // untranslated Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "If a value is true, then do the first block of statements. Otherwise, do the second block of statements."; // untranslated Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "If the first value is true, then do the first block of statements. Otherwise, if the second value is true, do the second block of statements."; // untranslated Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "If the first value is true, then do the first block of statements. Otherwise, if the second value is true, do the second block of statements. If none of the values are true, do the last block of statements."; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://en.wikipedia.org/wiki/For_loop"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "bık"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "%1 fıni tekrar ke"; Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Do some statements several times."; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "hend tekrar ke"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "Tekrar kerdış de"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "Yew erc xırabo se tay beyanati bıd"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "Yew erc raşto se yu beyanat bıd."; Blockly.Msg.DELETE_ALL_BLOCKS = "Wa %1 çengey heme besteri yè?"; Blockly.Msg.DELETE_BLOCK = "Bloki bestere"; Blockly.Msg.DELETE_VARIABLE = "Delete the '%1' variable"; // untranslated Blockly.Msg.DELETE_VARIABLE_CONFIRMATION = "Delete %1 uses of the '%2' variable?"; // untranslated Blockly.Msg.DELETE_X_BLOCKS = "%1 çengan bestern"; Blockly.Msg.DISABLE_BLOCK = "Çengi devre ra vec"; Blockly.Msg.DUPLICATE_BLOCK = "Zewnc"; Blockly.Msg.ENABLE_BLOCK = "Çengi aktiv ke"; Blockly.Msg.EXPAND_ALL = "Çengan hera ke"; Blockly.Msg.EXPAND_BLOCK = "Çengi hera ke"; Blockly.Msg.EXTERNAL_INPUTS = "Cıkewtışê xarıciy"; Blockly.Msg.HELP = "Peşti"; Blockly.Msg.INLINE_INPUTS = "Cıkerdışê xomiyani"; Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "lista venge vıraze"; Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Returns a list, of length 0, containing no data records"; // untranslated Blockly.Msg.LISTS_CREATE_WITH_CONTAINER_TITLE_ADD = "liste"; Blockly.Msg.LISTS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this list block."; // untranslated Blockly.Msg.LISTS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-list-with"; // untranslated Blockly.Msg.LISTS_CREATE_WITH_INPUT_WITH = "create list with"; // untranslated Blockly.Msg.LISTS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the list."; // untranslated Blockly.Msg.LISTS_CREATE_WITH_TOOLTIP = "Create a list with any number of items."; // untranslated Blockly.Msg.LISTS_GET_INDEX_FIRST = "verên"; Blockly.Msg.LISTS_GET_INDEX_FROM_END = "# peynira"; Blockly.Msg.LISTS_GET_INDEX_FROM_START = "#"; // untranslated Blockly.Msg.LISTS_GET_INDEX_GET = "bıgê"; Blockly.Msg.LISTS_GET_INDEX_GET_REMOVE = "Bıgi u wedarne"; Blockly.Msg.LISTS_GET_INDEX_LAST = "peyên"; Blockly.Msg.LISTS_GET_INDEX_RANDOM = "raştameye"; Blockly.Msg.LISTS_GET_INDEX_REMOVE = "wedare"; Blockly.Msg.LISTS_GET_INDEX_TAIL = ""; // untranslated Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FIRST = "Returns the first item in a list."; // untranslated Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM = "Returns the item at the specified position in a list."; // untranslated Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_LAST = "Returns the last item in a list."; // untranslated Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM = "Returns a random item in a list."; // untranslated Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FIRST = "Removes and returns the first item in a list."; // untranslated Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM = "Removes and returns the item at the specified position in a list."; // untranslated Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_LAST = "Removes and returns the last item in a list."; // untranslated Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM = "Removes and returns a random item in a list."; // untranslated Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FIRST = "Removes the first item in a list."; // untranslated Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM = "Removes the item at the specified position in a list."; // untranslated Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_LAST = "Removes the last item in a list."; // untranslated Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_RANDOM = "Removes a random item in a list."; // untranslated Blockly.Msg.LISTS_GET_SUBLIST_END_FROM_END = "Peyni # ra hetana"; Blockly.Msg.LISTS_GET_SUBLIST_END_FROM_START = "#'ya"; Blockly.Msg.LISTS_GET_SUBLIST_END_LAST = "Hetana pey"; Blockly.Msg.LISTS_GET_SUBLIST_HELPURL = "https://github.com/google/blockly/wiki/Lists#getting-a-sublist"; // untranslated Blockly.Msg.LISTS_GET_SUBLIST_START_FIRST = "get sub-list from first"; // untranslated Blockly.Msg.LISTS_GET_SUBLIST_START_FROM_END = "get sub-list from # from end"; // untranslated Blockly.Msg.LISTS_GET_SUBLIST_START_FROM_START = "get sub-list from #"; // untranslated Blockly.Msg.LISTS_GET_SUBLIST_TAIL = ""; // untranslated Blockly.Msg.LISTS_GET_SUBLIST_TOOLTIP = "Creates a copy of the specified portion of a list."; // untranslated Blockly.Msg.LISTS_INDEX_FROM_END_TOOLTIP = "%1 objeyo peyên o"; Blockly.Msg.LISTS_INDEX_FROM_START_TOOLTIP = "%1 objeyo sıfteyên o"; Blockly.Msg.LISTS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated Blockly.Msg.LISTS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Lists#getting-items-from-a-list"; // untranslated Blockly.Msg.LISTS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated Blockly.Msg.LISTS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the list. Returns %1 if item is not found."; // untranslated Blockly.Msg.LISTS_INLIST = "lista de"; Blockly.Msg.LISTS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#is-empty"; // untranslated Blockly.Msg.LISTS_ISEMPTY_TITLE = "%1 vengo"; Blockly.Msg.LISTS_ISEMPTY_TOOLTIP = "Returns true if the list is empty."; // untranslated Blockly.Msg.LISTS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Lists#length-of"; // untranslated Blockly.Msg.LISTS_LENGTH_TITLE = "length of %1"; // untranslated Blockly.Msg.LISTS_LENGTH_TOOLTIP = "Returns the length of a list."; // untranslated Blockly.Msg.LISTS_REPEAT_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-list-with"; // untranslated Blockly.Msg.LISTS_REPEAT_TITLE = "create list with item %1 repeated %2 times"; // untranslated Blockly.Msg.LISTS_REPEAT_TOOLTIP = "Creates a list consisting of the given value repeated the specified number of times."; // untranslated Blockly.Msg.LISTS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Lists#in-list--set"; // untranslated Blockly.Msg.LISTS_SET_INDEX_INPUT_TO = "zey"; Blockly.Msg.LISTS_SET_INDEX_INSERT = "insert at"; // untranslated Blockly.Msg.LISTS_SET_INDEX_SET = "ca ke"; Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FIRST = "Inserts the item at the start of a list."; // untranslated Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FROM = "Inserts the item at the specified position in a list."; // untranslated Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_LAST = "Append the item to the end of a list."; // untranslated Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_RANDOM = "Inserts the item randomly in a list."; // untranslated Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FIRST = "Sets the first item in a list."; // untranslated Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM = "Sets the item at the specified position in a list."; // untranslated Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Sets the last item in a list."; // untranslated Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Sets a random item in a list."; // untranslated Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "zeydıyen"; Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "Kemeyen"; Blockly.Msg.LISTS_SORT_TITLE = "Kılm %1 %2 %3"; Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "Amoriyal"; Blockly.Msg.LISTS_SORT_TYPE_TEXT = "Alfabetik"; Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "make list from text"; // untranslated Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "make text from list"; // untranslated Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Join a list of texts into one text, separated by a delimiter."; // untranslated Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Split text into a list of texts, breaking at each delimiter."; // untranslated Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "with delimiter"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_FALSE = "ğelet"; Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Raşt yana çep erc dano"; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "raşt"; Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://en.wikipedia.org/wiki/Inequality_(mathematics)"; // untranslated Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Return true if both inputs equal each other."; // untranslated Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Return true if the first input is greater than the second input."; // untranslated Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Return true if the first input is greater than or equal to the second input."; // untranslated Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Return true if the first input is smaller than the second input."; // untranslated Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Return true if the first input is smaller than or equal to the second input."; // untranslated Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Return true if both inputs are not equal to each other."; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "%1 niyo"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Returns true if the input is false. Returns false if the input is true."; // untranslated Blockly.Msg.LOGIC_NULL = "veng"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated Blockly.Msg.LOGIC_NULL_TOOLTIP = "Veng çarneno ra."; Blockly.Msg.LOGIC_OPERATION_AND = "û"; Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "ya zi"; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Return true if both inputs are true."; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Return true if at least one of the inputs is true."; // untranslated Blockly.Msg.LOGIC_TERNARY_CONDITION = "test"; Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; // untranslated Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "eke ğeleto"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "eke raşto"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Şerta'test'i test keno. Eger ke şert raşta se erca 'raşt'i çarneno, çepo se erca 'çep' çarneno."; Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://en.wikipedia.org/wiki/Aritmetik"; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Return the sum of the two numbers."; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Return the quotient of the two numbers."; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Return the difference of the two numbers."; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY = "Return the product of the two numbers."; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Return the first number raised to the power of the second number."; // untranslated Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter"; Blockly.Msg.MATH_CHANGE_TITLE = "%2, keno %1 vurneno"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "Add a number to variable '%1'."; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://en.wikipedia.org/wiki/Mathematical_constant"; Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Heryen sabitan ra yewi çerx ke:π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), or ∞ (bêsonp)."; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "constrain %1 low %2 high %3"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Constrain a number to be between the specified limits (inclusive)."; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "Leteyêno"; Blockly.Msg.MATH_IS_EVEN = "zewnco"; Blockly.Msg.MATH_IS_NEGATIVE = "negatifo"; Blockly.Msg.MATH_IS_ODD = "kıto"; Blockly.Msg.MATH_IS_POSITIVE = "pozitifo"; Blockly.Msg.MATH_IS_PRIME = "bıngehên"; Blockly.Msg.MATH_IS_TOOLTIP = "Check if a number is an even, odd, prime, whole, positive, negative, or if it is divisible by certain number. Returns true or false."; // untranslated Blockly.Msg.MATH_IS_WHOLE = "tamo"; Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation"; Blockly.Msg.MATH_MODULO_TITLE = "%1 ÷ %2 ra menden"; Blockly.Msg.MATH_MODULO_TOOLTIP = "Dı amoran ra amora menden çerx ke"; Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; // untranslated Blockly.Msg.MATH_NUMBER_HELPURL = "https://diq.wikipedia.org/wiki/Numre"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "Yew numre."; Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "Averacê lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "Tewr gırdê lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "Wertey lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_MIN = "Tewr qıcê lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "listey modi"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "Raştamaye objeya lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "standard deviation of list"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "koma liste"; Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Return the average (arithmetic mean) of the numeric values in the list."; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Return the largest number in the list."; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Return the median number in the list."; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_MIN = "Return the smallest number in the list."; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_MODE = "Return a list of the most common item(s) in the list."; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_RANDOM = "Liste ra raştamaye yew elementi çerx ke"; Blockly.Msg.MATH_ONLIST_TOOLTIP_STD_DEV = "Return the standard deviation of the list."; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_SUM = "Return the sum of all the numbers in the list."; // untranslated Blockly.Msg.MATH_POWER_SYMBOL = "^"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "Raştamaye nimande amor"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Return a random fraction between 0.0 (inclusive) and 1.0 (exclusive)."; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_INT_TITLE = "random integer from %1 to %2"; // untranslated Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Return a random integer between the two specified limits, inclusive."; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://en.wikipedia.org/wiki/Rounding"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "gılor ke"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "Loğê cêri ke"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "Loğê cori ke"; Blockly.Msg.MATH_ROUND_TOOLTIP = "Yu amorer loğê cêri yana cori ke"; Blockly.Msg.MATH_SINGLE_HELPURL = "https://en.wikipedia.org/wiki/Square_root"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "mutlaq"; Blockly.Msg.MATH_SINGLE_OP_ROOT = "karekok"; Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Return the absolute value of a number."; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Return e to the power of a number."; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Return the natural logarithm of a number."; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_LOG10 = "Return the base 10 logarithm of a number."; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_NEG = "Ena amorer nêravêrde deyne çerx ke."; Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Return 10 to the power of a number."; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Return the square root of a number."; // untranslated Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; // untranslated Blockly.Msg.MATH_TRIG_ACOS = "acos"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://en.wikipedia.org/wiki/Trigonometric_functions"; // untranslated Blockly.Msg.MATH_TRIG_SIN = "sin"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Return the arccosine of a number."; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Return the arcsine of a number."; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Return the arctangent of a number."; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_COS = "Return the cosine of a degree (not radian)."; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_SIN = "Return the sine of a degree (not radian)."; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_TAN = "Return the tangent of a degree (not radian)."; // untranslated Blockly.Msg.NEW_VARIABLE = "Vuriyayeyo newe..."; Blockly.Msg.NEW_VARIABLE_TITLE = "Namey vuriyayeyê newi:"; Blockly.Msg.ORDINAL_NUMBER_SUFFIX = ""; // untranslated Blockly.Msg.PROCEDURES_ALLOW_STATEMENTS = "Çıyan rê mısafe bıd"; Blockly.Msg.PROCEDURES_BEFORE_PARAMS = "ebe:"; Blockly.Msg.PROCEDURES_CALLNORETURN_HELPURL = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29"; // untranslated Blockly.Msg.PROCEDURES_CALLNORETURN_TOOLTIP = "Run the user-defined function '%1'."; // untranslated Blockly.Msg.PROCEDURES_CALLRETURN_HELPURL = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29"; // untranslated Blockly.Msg.PROCEDURES_CALLRETURN_TOOLTIP = "Run the user-defined function '%1' and use its output."; // untranslated Blockly.Msg.PROCEDURES_CALL_BEFORE_PARAMS = "ebe:"; Blockly.Msg.PROCEDURES_CREATE_DO = "'%1' vıraze"; Blockly.Msg.PROCEDURES_DEFNORETURN_COMMENT = "Nê fonksiyoni beyan ke..."; Blockly.Msg.PROCEDURES_DEFNORETURN_DO = ""; // untranslated Blockly.Msg.PROCEDURES_DEFNORETURN_HELPURL = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29"; // untranslated Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE = "Çıyê bık"; Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE = "rê"; Blockly.Msg.PROCEDURES_DEFNORETURN_TOOLTIP = "Yew fonksiyono çap nêdate vırazeno"; Blockly.Msg.PROCEDURES_DEFRETURN_HELPURL = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29"; // untranslated Blockly.Msg.PROCEDURES_DEFRETURN_RETURN = "peyser biya"; Blockly.Msg.PROCEDURES_DEFRETURN_TOOLTIP = "Yew fonksiyono çap daye vırazeno"; Blockly.Msg.PROCEDURES_DEF_DUPLICATE_WARNING = "Warning: This function has duplicate parameters."; // untranslated Blockly.Msg.PROCEDURES_HIGHLIGHT_DEF = "Highlight function definition"; // untranslated Blockly.Msg.PROCEDURES_IFRETURN_HELPURL = "http://c2.com/cgi/wiki?GuardClause"; // untranslated Blockly.Msg.PROCEDURES_IFRETURN_TOOLTIP = "If a value is true, then return a second value."; // untranslated Blockly.Msg.PROCEDURES_IFRETURN_WARNING = "Warning: This block may be used only within a function definition."; // untranslated Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "nameyê cıkewtışi:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Add an input to the function."; // untranslated Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "cıkewtışi"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Add, remove, or reorder inputs to this function."; // untranslated Blockly.Msg.REDO = "Anewe ke"; Blockly.Msg.REMOVE_COMMENT = "Tefsiri Wedare"; Blockly.Msg.RENAME_VARIABLE = "Vuriyayey fına name ke..."; Blockly.Msg.RENAME_VARIABLE_TITLE = "Rename all '%1' variables to:"; // untranslated Blockly.Msg.TEXT_APPEND_APPENDTEXT = "Metin dek"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "rê"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "Append some text to variable '%1'."; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "Herfanê werdiyana"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "Ser herf gırd"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "HERFANÊ GIRDANA"; Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Return a copy of the text in a different case."; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "Herfa sıfti bıgi"; Blockly.Msg.TEXT_CHARAT_FROM_END = "# ra tepya herfan bıgi"; Blockly.Msg.TEXT_CHARAT_FROM_START = "Herfa # bıgi"; Blockly.Msg.TEXT_CHARAT_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-text"; // untranslated Blockly.Msg.TEXT_CHARAT_INPUT_INTEXT = "metın de"; Blockly.Msg.TEXT_CHARAT_LAST = "Herfa peyên bıgi"; Blockly.Msg.TEXT_CHARAT_RANDOM = "Raştamaye yu herf bıgi"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Şınasnaye pozisyon de yu herfer çerğ keno"; Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Add an item to the text."; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "gıre de"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Add, remove, or reorder sections to reconfigure this text block."; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "to letter # from end"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "to letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "to last letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "metın de"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "get substring from first letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "get substring from letter # from end"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "# ra substring gêno"; Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Tay letey metini çerğ keno"; Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "metın de"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "find first occurrence of text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "find last occurrence of text"; // untranslated Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Returns the index of the first/last occurrence of the first text in the second text. Returns %1 if text is not found."; // untranslated Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 vengo"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Returns true if the provided text is empty."; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "ya metin vıraz"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "Create a piece of text by joining together any number of items."; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "length of %1"; // untranslated Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Returns the number of letters (including spaces) in the provided text."; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "print %1"; // untranslated Blockly.Msg.TEXT_PRINT_TOOLTIP = "Print the specified text, number or other value."; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Prompt for user for a number."; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Prompt for user for some text."; // untranslated Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "prompt for number with message"; // untranslated Blockly.Msg.TEXT_PROMPT_TYPE_TEXT = "prompt for text with message"; // untranslated Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_science)"; Blockly.Msg.TEXT_TEXT_TOOLTIP = "Yu herfa, satır yana çekuya metini"; Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "trim spaces from both sides of"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "trim spaces from left side of"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "trim spaces from right side of"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "Return a copy of the text with spaces removed from one or both ends."; // untranslated Blockly.Msg.TODAY = "Ewro"; Blockly.Msg.UNDO = "Peyser biya"; Blockly.Msg.VARIABLES_DEFAULT_NAME = "unsur"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "Create 'set %1'"; // untranslated Blockly.Msg.VARIABLES_GET_HELPURL = "https://github.com/google/blockly/wiki/Variables#get"; // untranslated Blockly.Msg.VARIABLES_GET_TOOLTIP = "Returns the value of this variable."; // untranslated Blockly.Msg.VARIABLES_SET = "set %1 to %2"; // untranslated Blockly.Msg.VARIABLES_SET_CREATE_GET = "'get %1' vıraz"; Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "Sets this variable to be equal to the input."; // untranslated Blockly.Msg.VARIABLE_ALREADY_EXISTS = "A variable named '%1' already exists."; // untranslated Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_DEFRETURN_COMMENT = Blockly.Msg.PROCEDURES_DEFNORETURN_COMMENT;
{ "content_hash": "43bc36c61b7776a144ccabfcf02dc1cf", "timestamp": "", "source": "github", "line_count": 389, "max_line_length": 262, "avg_line_length": 82.25706940874036, "alnum_prop": 0.7553909619351209, "repo_name": "ddazal/pickly", "id": "3daa32b6a0a1475ebecb0725477e023e808998ca", "size": "32231", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "public/google-blockly/msg/js/diq.js", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "9494" }, { "name": "HTML", "bytes": "47918" }, { "name": "JavaScript", "bytes": "3460396" }, { "name": "Python", "bytes": "56065" } ], "symlink_target": "" }
require 'rails_helper' # Specs in this file have access to a helper object that includes # the Admin::SessionsHelper. For example: # # describe Admin::SessionsHelper do # describe "string concat" do # it "concats two strings with spaces" do # expect(helper.concat_strings("this","that")).to eq("this that") # end # end # end RSpec.describe Admin::SessionsHelper, type: :helper do pending "add some examples to (or delete) #{__FILE__}" end
{ "content_hash": "e136f4fb56f39ca08092b850155759dd", "timestamp": "", "source": "github", "line_count": 15, "max_line_length": 71, "avg_line_length": 30.666666666666668, "alnum_prop": 0.6978260869565217, "repo_name": "koudaiii/baukis-on-rails-4-2", "id": "2bde3f2fa958a5fae9b8b01a5a8c7d821418c884", "size": "460", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "spec/helpers/admin/sessions_helper_spec.rb", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "10797" }, { "name": "CoffeeScript", "bytes": "1477" }, { "name": "HTML", "bytes": "10600" }, { "name": "JavaScript", "bytes": "638" }, { "name": "Ruby", "bytes": "58851" }, { "name": "Shell", "bytes": "113" } ], "symlink_target": "" }
package com.lennonjesus.experiments.authentication.controller; import com.lennonjesus.experiments.authentication.form.UserCreateForm; import com.lennonjesus.experiments.authentication.form.validator.UserCreateFormValidator; import com.lennonjesus.experiments.authentication.service.UserService; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.servlet.ModelAndView; import java.util.NoSuchElementException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.dao.DataIntegrityViolationException; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.stereotype.Controller; import org.springframework.validation.BindingResult; import org.springframework.web.bind.WebDataBinder; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.ModelAndView; import javax.validation.Valid; /** * Created by lennonjesus on 04/09/15. */ @Controller public class UserController { private static final Logger LOGGER = LoggerFactory.getLogger(UserController.class); private final UserService userService; private final UserCreateFormValidator userCreateFormValidator; @Autowired public UserController(UserService userService, UserCreateFormValidator userCreateFormValidator) { this.userService = userService; this.userCreateFormValidator = userCreateFormValidator; } @InitBinder("form") public void initBinder(WebDataBinder binder) { binder.addValidators(userCreateFormValidator); } @PreAuthorize("@currentUserServiceImpl.canAccessUser(principal, #id)") @RequestMapping("/user/{id}") public ModelAndView getUserPage(@PathVariable Long id) { LOGGER.debug("Getting user page for user={}", id); return new ModelAndView("user", "user", userService.getUserById(id) .orElseThrow(() -> new NoSuchElementException(String.format("User=%s not found", id)))); } @PreAuthorize("hasAuthority('ADMIN')") @RequestMapping(value = "/user/create", method = RequestMethod.GET) public ModelAndView getUserCreatePage() { LOGGER.debug("Getting user create form"); return new ModelAndView("user_create", "form", new UserCreateForm()); } @PreAuthorize("hasAuthority('ADMIN')") @RequestMapping(value = "/user/create", method = RequestMethod.POST) public String handleUserCreateForm(@Valid @ModelAttribute("form") UserCreateForm form, BindingResult bindingResult) { LOGGER.debug("Processing user create form={}, bindingResult={}", form, bindingResult); if (bindingResult.hasErrors()) { // failed validation return "user_create"; } try { userService.create(form); } catch (DataIntegrityViolationException e) { // probably email already exists - very rare case when multiple admins are adding same user // at the same time and form validation has passed for more than one of them. LOGGER.warn("Exception occurred when trying to save the user, assuming duplicate email", e); bindingResult.reject("email.exists", "Email already exists"); return "user_create"; } // ok, redirect return "redirect:/users"; } }
{ "content_hash": "65fdc32f6b4aa51f025c38e80038602b", "timestamp": "", "source": "github", "line_count": 84, "max_line_length": 121, "avg_line_length": 42.20238095238095, "alnum_prop": 0.7385049365303245, "repo_name": "lennonjesus/my-spring-boot-experiments", "id": "22b2518fc9cc7caedd3b93aae6dc7752e4d87572", "size": "3545", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "authentication/src/main/java/com/lennonjesus/experiments/authentication/controller/UserController.java", "mode": "33188", "license": "mit", "language": [ { "name": "HTML", "bytes": "4240" }, { "name": "Java", "bytes": "21469" } ], "symlink_target": "" }
// Generated from /POI/java/org/apache/poi/hpsf/Thumbnail.java #pragma once #include <fwd-POI.hpp> #include <org/apache/poi/hpsf/fwd-POI.hpp> #include <java/lang/Object.hpp> struct default_init_tag; class poi::hpsf::Thumbnail final : public ::java::lang::Object { public: typedef ::java::lang::Object super; static constexpr int32_t OFFSET_CFTAG { int32_t(4) }; static constexpr int32_t OFFSET_CF { int32_t(8) }; static constexpr int32_t OFFSET_WMFDATA { int32_t(20) }; static constexpr int32_t CFTAG_WINDOWS { int32_t(-1) }; static constexpr int32_t CFTAG_MACINTOSH { int32_t(-2) }; static constexpr int32_t CFTAG_FMTID { int32_t(-3) }; static constexpr int32_t CFTAG_NODATA { int32_t(0) }; static constexpr int32_t CF_METAFILEPICT { int32_t(3) }; static constexpr int32_t CF_DIB { int32_t(8) }; static constexpr int32_t CF_ENHMETAFILE { int32_t(14) }; static constexpr int32_t CF_BITMAP { int32_t(2) }; private: ::int8_tArray* _thumbnailData { }; protected: void ctor(); void ctor(::int8_tArray* thumbnailData); public: ::int8_tArray* getThumbnail(); void setThumbnail(::int8_tArray* thumbnail); int64_t getClipboardFormatTag(); int64_t getClipboardFormat() /* throws(HPSFException) */; ::int8_tArray* getThumbnailAsWMF() /* throws(HPSFException) */; // Generated Thumbnail(); Thumbnail(::int8_tArray* thumbnailData); protected: Thumbnail(const ::default_init_tag&); public: static ::java::lang::Class *class_(); private: void init(); virtual ::java::lang::Class* getClass0(); };
{ "content_hash": "7a8b7b665631a681e6b0e2e977714360", "timestamp": "", "source": "github", "line_count": 55, "max_line_length": 67, "avg_line_length": 29.2, "alnum_prop": 0.6699875466998755, "repo_name": "pebble2015/cpoi", "id": "75f7abfdaed416aaa882e70db91074a1bc512ac6", "size": "1606", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/org/apache/poi/hpsf/Thumbnail.hpp", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C++", "bytes": "15964112" }, { "name": "Makefile", "bytes": "138107" } ], "symlink_target": "" }
package backupservice import ( "bytes" "fmt" "os" "io/ioutil" "log" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/glacier" "github.com/mleonard87/frosty/config" ) const () type AmazonGlacierBackupService struct { AccessKeyId string SecretAccessKey string Region string AccountId string VaultName string GlacierService *glacier.Glacier } // Return the backup service type this must match the string as used as the JSON property in the frosty backup config. func (agss *AmazonGlacierBackupService) Name() string { return config.BACKUP_SERVICE_AMAZON_GLACIER } // Initialise any variable needed for backups. func (agss *AmazonGlacierBackupService) SetConfig(backupConfig *config.BackupConfig) { agss.AccessKeyId = backupConfig.BackupConfig["accessKeyId"].(string) agss.SecretAccessKey = backupConfig.BackupConfig["secretAccessKey"].(string) agss.Region = backupConfig.BackupConfig["region"].(string) agss.AccountId = backupConfig.BackupConfig["accountId"].(string) agss.VaultName = agss.getVaultName() } // Initialise anything in the backup service that needs to be created prior to uploading files. In this instance we need // to create a vault for the backup to hold any archives. func (agss *AmazonGlacierBackupService) Init() error { agss.setEnvvars() agss.GlacierService = glacier.New(session.New(), &aws.Config{}) err := agss.createVault(agss.VaultName) if err != nil { return err } return nil } // Store the file in pathToFile in Amazon Glacier. func (agss *AmazonGlacierBackupService) StoreFile(pathToFile string) error { fileContents, err := ioutil.ReadFile(pathToFile) if err != nil { return err } params := &glacier.UploadArchiveInput{ AccountId: aws.String(agss.AccountId), VaultName: aws.String(agss.VaultName), Body: bytes.NewReader(fileContents), } _, err = agss.GlacierService.UploadArchive(params) if err != nil { return err } return nil } // Get the name to be used for the .zip archive without the .zip extension. func (agss *AmazonGlacierBackupService) ArtifactFilename(jobName string) string { return jobName } // Get a friendly name for the email template of where this backup was stored. In this case, the name of the Glacier // vault. func (agss *AmazonGlacierBackupService) BackupLocation() string { return fmt.Sprintf("Glacier Vault: %s", agss.getVaultName()) } // Create the Glacier Vault. func (agss *AmazonGlacierBackupService) createVault(vaultName string) error { agss.setEnvvars() params := &glacier.CreateVaultInput{ AccountId: aws.String(agss.AccountId), VaultName: aws.String(agss.VaultName), } _, err := agss.GlacierService.CreateVault(params) if err != nil { return err } return nil } // Set the required AWS environment variables. func (agss *AmazonGlacierBackupService) setEnvvars() { os.Setenv(ENVVAR_AWS_ACCESS_KEY_ID, agss.AccessKeyId) os.Setenv(ENVVAR_AWS_SECRET_ACCESS_KEY, agss.SecretAccessKey) os.Setenv(ENVVAR_AWS_REGION, agss.Region) } // Get the name to use for for the Glacier Vault. func (agss *AmazonGlacierBackupService) getVaultName() string { if agss.VaultName == "" { hostname, err := os.Hostname() if err != nil { log.Fatal("Could not determine hostname.", err) } agss.VaultName = BACKUP_NAME_PREFIX + time.Now().Format("20060102") + "_" + hostname } return agss.VaultName }
{ "content_hash": "746da5074a92451df34e8cd52578a1b1", "timestamp": "", "source": "github", "line_count": 124, "max_line_length": 120, "avg_line_length": 27.677419354838708, "alnum_prop": 0.7400932400932401, "repo_name": "mleonard87/frosty", "id": "5eb8c128e6af069332cc6b70cd13cc0c64a8875a", "size": "3432", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "backup/amazonglacier.go", "mode": "33188", "license": "mit", "language": [ { "name": "Go", "bytes": "31934" }, { "name": "HTML", "bytes": "5981" }, { "name": "Makefile", "bytes": "993" } ], "symlink_target": "" }
using System.Diagnostics; namespace System.Reflection.Metadata { public struct PropertyDefinition { private readonly MetadataReader _reader; // Workaround: JIT doesn't generate good code for nested structures, so use RowId. private readonly uint _rowId; internal PropertyDefinition(MetadataReader reader, PropertyDefinitionHandle handle) { Debug.Assert(reader != null); Debug.Assert(!handle.IsNil); _reader = reader; _rowId = handle.RowId; } private PropertyDefinitionHandle Handle { get { return PropertyDefinitionHandle.FromRowId(_rowId); } } public StringHandle Name { get { return _reader.PropertyTable.GetName(Handle); } } public PropertyAttributes Attributes { get { return _reader.PropertyTable.GetFlags(Handle); } } public BlobHandle Signature { get { return _reader.PropertyTable.GetSignature(Handle); } } public ConstantHandle GetDefaultValue() { return _reader.ConstantTable.FindConstant(Handle); } public CustomAttributeHandleCollection GetCustomAttributes() { return new CustomAttributeHandleCollection(_reader, Handle); } public PropertyAccessors GetAccessors() { uint getter = 0; uint setter = 0; ushort methodCount; var firstRowId = _reader.MethodSemanticsTable.FindSemanticMethodsForProperty(Handle, out methodCount); for (ushort i = 0; i < methodCount; i++) { uint rowId = firstRowId + i; switch (_reader.MethodSemanticsTable.GetSemantics(rowId)) { case MethodSemanticsAttributes.Getter: getter = _reader.MethodSemanticsTable.GetMethod(rowId).RowId; break; case MethodSemanticsAttributes.Setter: setter = _reader.MethodSemanticsTable.GetMethod(rowId).RowId; break; // TODO: expose 'Other' collection on PropertyAccessors for completeness. } } return new PropertyAccessors(getter, setter); } } }
{ "content_hash": "127472dadfd30d999e54cbe4fca1f699", "timestamp": "", "source": "github", "line_count": 86, "max_line_length": 114, "avg_line_length": 29.232558139534884, "alnum_prop": 0.5449482895783612, "repo_name": "FiveTimesTheFun/corefx", "id": "b3dc905d2f3e2799711623e697cd1b0e75169109", "size": "2666", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "src/System.Reflection.Metadata/src/System/Reflection/Metadata/PropertyDefinition.cs", "mode": "33188", "license": "mit", "language": [ { "name": "C#", "bytes": "32914517" }, { "name": "C++", "bytes": "16582" }, { "name": "Shell", "bytes": "1428" }, { "name": "Smalltalk", "bytes": "20225336" }, { "name": "Visual Basic", "bytes": "1609" } ], "symlink_target": "" }
namespace leveldb { using namespace port; namespace { static char global_read_only_buf[0x8000]; class PosixSequentialFile : public SequentialFile { private: std::string filename_; FILE* file_; public: PosixSequentialFile(const std::string& fname, FILE* f) : filename_(fname), file_(f) { } virtual ~PosixSequentialFile() { fclose(file_); } virtual Status Read(size_t n, Slice* result, char* scratch) { Status s; #ifdef BSD // fread_unlocked doesn't exist on FreeBSD size_t r = fread(scratch, 1, n, file_); #else size_t r = fread_unlocked(scratch, 1, n, file_); #endif *result = Slice(scratch, r); if (r < n) { if (feof(file_)) { // We leave status as ok if we hit the end of the file } else { // A partial read with an error: return a non-ok status s = Status::IOError(filename_, strerror(errno)); } } return s; } virtual Status Skip(uint64_t n) { if (fseek(file_, n, SEEK_CUR)) { return Status::IOError(filename_, strerror(errno)); } return Status::OK(); } }; class PosixRandomAccessFile : public RandomAccessFile { private: std::string filename_; int fd_; mutable CRITICAL_SECTION cs; public: PosixRandomAccessFile(const std::string& fname, int fd) : filename_(fname), fd_(fd) { InitializeCriticalSectionEx(&cs, 1, 0); } virtual ~PosixRandomAccessFile() { close(fd_); DeleteCriticalSection(&cs); } virtual Status Read(uint64_t offset, size_t n, Slice* result, char* scratch) const { Status s; #ifdef WIN32 // no pread on Windows so we emulate it with a mutex EnterCriticalSection(&cs); if (::_lseeki64(fd_, offset, SEEK_SET) == -1L) { return Status::IOError(filename_, strerror(errno)); } int r = ::_read(fd_, scratch, n); *result = Slice(scratch, (r < 0) ? 0 : r); LeaveCriticalSection(&cs); #else ssize_t r = pread(fd_, scratch, n, static_cast<off_t>(offset)); *result = Slice(scratch, (r < 0) ? 0 : r); #endif if (r < 0) { // An error: return a non-ok status s = Status::IOError(filename_, strerror(errno)); } return s; } }; // We preallocate up to an extra megabyte and use memcpy to append new // data to the file. This is safe since we either properly close the // file before reading from it, or for log files, the reading code // knows enough to skip zero suffixes. class BoostFile : public WritableFile { public: explicit BoostFile(std::string path) : path_(path), written_(0) { Open(); } virtual ~BoostFile() { Close(); } private: void Open() { // we truncate the file as implemented in env_posix file_.open(path_, std::ios_base::trunc | std::ios_base::out | std::ios_base::binary); written_ = 0; } public: virtual Status Append(const Slice& data) { Status result; file_.write(data.data(), data.size()); if (!file_.good()) { result = Status::IOError( path_ + " Append", "cannot write"); } return result; } virtual Status Close() { Status result; try { if (file_.is_open()) { Sync(); file_.close(); } } catch (const std::exception & e) { result = Status::IOError(path_ + " close", e.what()); } return result; } virtual Status Flush() { file_.flush(); return Status::OK(); } virtual Status Sync() { Status result; try { Flush(); } catch (const std::exception & e) { result = Status::IOError(path_ + " sync", e.what()); } return result; } private: std::string path_; uint64_t written_; std::ofstream file_; }; class BoostFileLock : public FileLock { private: HANDLE mutex; public: BoostFileLock(const std::string& fname) { char lpName[MAX_PATH]; wchar_t wcName[MAX_PATH]; strcpy_s(lpName, fname.c_str()); for (char* p = lpName; *p != 0; p++) if (*p == '\\') *p = '_'; else if (*p >= 'A' && *p <= 'Z') *p += 0x20; strcat_s(lpName, ":FileLock"); std::mbstowcs(wcName, lpName, MAX_PATH); mutex = CreateMutexEx(NULL, wcName, 0, STANDARD_RIGHTS_ALL); WaitForSingleObjectEx(mutex, INFINITE, FALSE); } ~BoostFileLock() { if (mutex != NULL) { ReleaseMutex(mutex); CloseHandle(mutex); } } }; class PosixEnv : public Env { public: PosixEnv(); virtual ~PosixEnv() { } virtual Status NewSequentialFile(const std::string& fname, SequentialFile** result) { FILE* f = fopen(fname.c_str(), "rb"); if (f == NULL) { *result = NULL; return Status::IOError(fname, strerror(errno)); } else { *result = new PosixSequentialFile(fname, f); return Status::OK(); } } virtual Status NewRandomAccessFile(const std::string& fname, RandomAccessFile** result) { #ifdef WIN32 int fd = _open(fname.c_str(), _O_RDONLY | _O_RANDOM | _O_BINARY); #else int fd = open(fname.c_str(), O_RDONLY); #endif if (fd < 0) { *result = NULL; return Status::IOError(fname, strerror(errno)); } *result = new PosixRandomAccessFile(fname, fd); return Status::OK(); } virtual Status NewWritableFile(const std::string& fname, WritableFile** result) { Status s; try { // will create a new empty file to write to *result = new BoostFile(fname); } catch (const std::exception & e) { s = Status::IOError(fname, e.what()); } return s; } virtual bool FileExists(const std::string& fname) { struct stat buf; return stat(fname.c_str(), &buf) != -1; } virtual Status GetChildren(const std::string& directory, std::vector<std::string>* result) { result->clear(); HANDLE dir; WIN32_FIND_DATA file_data; std::string p(directory + "\\*"); if ((dir = ::FindFirstFileEx(s2ws(p).c_str(), FindExInfoStandard, &file_data, FindExSearchNameMatch, NULL, FIND_FIRST_EX_CASE_SENSITIVE)) == INVALID_HANDLE_VALUE) { return Status::IOError("Unable to open directory " + directory); } do { std::wstring ws(file_data.cFileName); std::string file_name = ws2s(ws); if (file_name[0] == '.') continue; const std::string full_file_name = directory + "/" + file_name; const bool is_directory = (file_data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0; if (is_directory) continue; result->push_back(file_name); } while (::FindNextFile(dir, &file_data)); ::FindClose(dir); return Status::OK(); } virtual Status DeleteFile(const std::string& fname) { if (::DeleteFile(s2ws(fname).c_str())) { return Status::OK(); } return Status::IOError("Unable to remove file" + fname); } virtual Status CreateDir(const std::string& name) { if (::CreateDirectory(s2ws(name).c_str(), NULL) != 0) { return Status::OK(); } auto lastError = GetLastError(); if (lastError == ERROR_ALREADY_EXISTS) { return Status::OK(); } return Status::IOError("Unable to create folder " + name); } virtual Status DeleteDir(const std::string& name) { if (::RemoveDirectory(s2ws(name).c_str())) { return Status::OK(); } return Status::IOError("Unable to remove folde " + name); } virtual Status GetFileSize(const std::string& fname, uint64_t* size) { struct stat st; stat(fname.c_str(), &st); *size = st.st_size; return Status::OK(); } virtual Status RenameFile(const std::string& src, const std::string& target) { auto movres = ::MoveFileEx( s2ws(src).c_str(), s2ws(target).c_str(), MOVEFILE_COPY_ALLOWED | MOVEFILE_REPLACE_EXISTING | MOVEFILE_WRITE_THROUGH); if (movres != 0) { return Status::OK(); } return Status::IOError("Unable to move file"); } virtual Status LockFile(const std::string& fname, FileLock** lock) { *lock = NULL; if (this->FileExists(fname)) { return Status::IOError("File not found " + fname); } BoostFileLock * my_lock = new BoostFileLock(fname); *lock = my_lock; return Status::OK(); } virtual Status UnlockFile(FileLock* lock) { Status result; try { delete lock; } catch (const std::exception & e) { result = Status::IOError("unlock", e.what()); } return result; } virtual void Schedule(void(*function)(void*), void* arg) { EnterCriticalSection(&cs); // Start background thread if necessary if (bgthread_ == NULL) { bgthread_ = CreateThread(NULL, 0, &PosixEnv::BGThreadWrapper, this, 0, NULL); } // Add to priority queue queue_.push_back(BGItem()); queue_.back().function = function; queue_.back().arg = arg; LeaveCriticalSection(&cs); WakeConditionVariable(&cv); } virtual void StartThread(void(*function)(void* arg), void* arg) { CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)function, arg, 0, NULL); } virtual Status GetTestDirectory(std::string* path) { try { *path = leveldb::port::os_env_temp_path(); } catch (...) { return Status::IOError("Unable to get temp folder"); } return Status::OK(); } #ifndef WIN32 static uint64_t gettid() { pthread_t tid = pthread_self(); uint64_t thread_id = 0; memcpy(&thread_id, &tid, std::min(sizeof(thread_id), sizeof(tid))); return thread_id; } #endif virtual Status NewLogger(const std::string& fname, Logger** result) { FILE* f = fopen(fname.c_str(), "wt"); if (f == NULL) { *result = NULL; return Status::IOError(fname, strerror(errno)); } else { #ifdef WIN32 *result = new WinLogger(f); #else *result = new PosixLogger(f, &PosixEnv::gettid); #endif return Status::OK(); } } virtual uint64_t NowMicros() { union { uint64_t ns100; FILETIME ft; } now; GetSystemTimeAsFileTime(&now.ft); return now.ns100 / 10 % 86400000000; } virtual void SleepForMicroseconds(int micros) { Sleep(micros / 1000); } private: void PthreadCall(const char* label, int result) { if (result != 0) { fprintf(stderr, "pthread %s: %s\n", label, strerror(result)); exit(1); } } // BGThread() is the body of the background thread void BGThread(); static DWORD WINAPI BGThreadWrapper(void* arg) { reinterpret_cast<PosixEnv*>(arg)->BGThread(); return NULL; } CRITICAL_SECTION cs; CONDITION_VARIABLE cv; HANDLE bgthread_; // Entry per Schedule() call struct BGItem { void* arg; void(*function)(void*); }; typedef std::deque<BGItem> BGQueue; BGQueue queue_; }; PosixEnv::PosixEnv() { InitializeCriticalSectionEx(&cs, 1, 0); InitializeConditionVariable(&cv); bgthread_ = NULL; } void PosixEnv::BGThread() { while (true) { // Wait until there is an item that is ready to run EnterCriticalSection(&cs); while (queue_.empty()) { SleepConditionVariableCS(&cv, &cs, INFINITE); } void(*function)(void*) = queue_.front().function; void* arg = queue_.front().arg; queue_.pop_front(); LeaveCriticalSection(&cs); (*function)(arg); } } } static unsigned int once = 0; static Env* default_env = NULL; Env* Env::Default() { if (InterlockedIncrement(&once) == 1) { ::memset(global_read_only_buf, 0, sizeof(global_read_only_buf)); default_env = new PosixEnv; } while (default_env == NULL); return default_env; } }
{ "content_hash": "bb9f3357a4f30726ced8b976e9c46217", "timestamp": "", "source": "github", "line_count": 495, "max_line_length": 166, "avg_line_length": 23.56767676767677, "alnum_prop": 0.5960912052117264, "repo_name": "maxpert/LevelDBWinRT", "id": "8ecf939c1e71fa90f6ab5d90d2b700b3af2590e6", "size": "12187", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "LevelDBWinRT.Shared/util/env_windows.cc", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "C", "bytes": "29958" }, { "name": "C#", "bytes": "12429" }, { "name": "C++", "bytes": "860238" }, { "name": "CSS", "bytes": "1127" }, { "name": "HTML", "bytes": "50621" }, { "name": "PowerShell", "bytes": "843" } ], "symlink_target": "" }
@interface NSUserDefaults (Extension) @end
{ "content_hash": "362f14d1873237efd4348fb9aa67fe88", "timestamp": "", "source": "github", "line_count": 3, "max_line_length": 37, "avg_line_length": 14.666666666666666, "alnum_prop": 0.7954545454545454, "repo_name": "sky15179/Debug", "id": "a7530a5dd3d94e4c63ff607b8b338d5cbd9d198e", "size": "237", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "TestTabelController/TestTabelController/DeubgView/Extension/NSUserDefaults+Extension.h", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C", "bytes": "1264019" }, { "name": "C++", "bytes": "372476" }, { "name": "DTrace", "bytes": "412" }, { "name": "Objective-C", "bytes": "6915265" }, { "name": "Objective-C++", "bytes": "172568" }, { "name": "Ruby", "bytes": "27537" }, { "name": "Shell", "bytes": "9017" }, { "name": "Swift", "bytes": "227386" } ], "symlink_target": "" }
"""Device and network emulation utilities via devtools.""" import json # Copied from # WebKit/Source/devtools/front_end/network/NetworkConditionsSelector.js # Units: # download/upload: byte/s # latency: ms NETWORK_CONDITIONS = { 'GPRS': { 'download': 50 * 1024 / 8, 'upload': 20 * 1024 / 8, 'latency': 500}, 'Regular2G': { 'download': 250 * 1024 / 8, 'upload': 50 * 1024 / 8, 'latency': 300}, 'Good2G': { 'download': 450 * 1024 / 8, 'upload': 150 * 1024 / 8, 'latency': 150}, 'Regular3G': { 'download': 750 * 1024 / 8, 'upload': 250 * 1024 / 8, 'latency': 100}, 'Good3G': { 'download': 1.5 * 1024 * 1024 / 8, 'upload': 750 * 1024 / 8, 'latency': 40}, 'Regular4G': { 'download': 4 * 1024 * 1024 / 8, 'upload': 3 * 1024 * 1024 / 8, 'latency': 20}, 'DSL': { 'download': 2 * 1024 * 1024 / 8, 'upload': 1 * 1024 * 1024 / 8, 'latency': 5}, 'WiFi': { 'download': 30 * 1024 * 1024 / 8, 'upload': 15 * 1024 * 1024 / 8, 'latency': 2} } def LoadEmulatedDevices(registry): """Loads a list of emulated devices from the DevTools JSON registry. See, for example, third_party/WebKit/Source/devtools/front_end /emulated_devices/module.json. Args: registry: A file-like object for the device registry (should be JSON). Returns: {'device_name': device} """ json_dict = json.load(registry) devices = {} for device in json_dict['extensions']: device = device['device'] devices[device['title']] = device return devices def SetUpDeviceEmulationAndReturnMetadata(connection, device): """Configures an instance of Chrome for device emulation. Args: connection: (DevToolsConnection) device: (dict) An entry from LoadEmulatedDevices(). Returns: A dict containing the device emulation metadata. """ res = connection.SyncRequest('Emulation.canEmulate') assert res['result'], 'Cannot set device emulation.' data = _GetDeviceEmulationMetadata(device) connection.SyncRequestNoResponse( 'Emulation.setDeviceMetricsOverride', {'width': data['width'], 'height': data['height'], 'deviceScaleFactor': data['deviceScaleFactor'], 'mobile': data['mobile'], 'fitWindow': True}) connection.SyncRequestNoResponse('Network.setUserAgentOverride', {'userAgent': data['userAgent']}) return data def SetUpNetworkEmulation(connection, latency, download, upload): """Configures an instance of Chrome for network emulation. See NETWORK_CONDITIONS for example (or valid?) emulation options. Args: connection: (DevToolsConnection) latency: (float) Latency in ms. download: (float) Download speed (Bytes / s). upload: (float) Upload speed (Bytes / s). """ res = connection.SyncRequest('Network.canEmulateNetworkConditions') assert res['result'], 'Cannot set network emulation.' connection.SyncRequestNoResponse( 'Network.emulateNetworkConditions', {'offline': False, 'latency': latency, 'downloadThroughput': download, 'uploadThroughput': upload}) def BandwidthToString(bandwidth): """Converts a bandwidth to string. Args: bandwidth: The bandwidth to convert in byte/s. Must be a multiple of 1024/8. Returns: A string compatible with wpr --{up,down} command line flags. """ assert bandwidth % (1024/8) == 0 bandwidth_kbps = (int(bandwidth) * 8) / 1024 if bandwidth_kbps % 1024: return '{}Kbit/s'.format(bandwidth_kbps) return '{}Mbit/s'.format(bandwidth_kbps / 1024) def _GetDeviceEmulationMetadata(device): """Returns the metadata associated with a given device.""" return {'width': device['screen']['vertical']['width'], 'height': device['screen']['vertical']['height'], 'deviceScaleFactor': device['screen']['device-pixel-ratio'], 'mobile': 'mobile' in device['capabilities'], 'userAgent': device['user-agent']}
{ "content_hash": "745e5bd362ad4fd909a7d7194fae1f19", "timestamp": "", "source": "github", "line_count": 120, "max_line_length": 80, "avg_line_length": 33.15, "alnum_prop": 0.6435394670688789, "repo_name": "junhuac/MQUIC", "id": "d7f05c6284b8234f4230449a62851695786b5264", "size": "4141", "binary": false, "copies": "12", "ref": "refs/heads/master", "path": "src/tools/android/loading/emulation.py", "mode": "33188", "license": "mit", "language": [ { "name": "ApacheConf", "bytes": "25707" }, { "name": "Assembly", "bytes": "5386" }, { "name": "Batchfile", "bytes": "42909" }, { "name": "C", "bytes": "1168925" }, { "name": "C#", "bytes": "81308" }, { "name": "C++", "bytes": "43919800" }, { "name": "CMake", "bytes": "46379" }, { "name": "CSS", "bytes": "19668" }, { "name": "Emacs Lisp", "bytes": "32613" }, { "name": "Go", "bytes": "7247" }, { "name": "Groff", "bytes": "127224" }, { "name": "HTML", "bytes": "2548385" }, { "name": "Java", "bytes": "1332462" }, { "name": "JavaScript", "bytes": "851006" }, { "name": "M4", "bytes": "29823" }, { "name": "Makefile", "bytes": "459525" }, { "name": "Objective-C", "bytes": "120158" }, { "name": "Objective-C++", "bytes": "330017" }, { "name": "PHP", "bytes": "11283" }, { "name": "Protocol Buffer", "bytes": "2991" }, { "name": "Python", "bytes": "16872234" }, { "name": "R", "bytes": "1842" }, { "name": "Ruby", "bytes": "937" }, { "name": "Shell", "bytes": "764509" }, { "name": "Swift", "bytes": "116" }, { "name": "VimL", "bytes": "12288" }, { "name": "nesC", "bytes": "14779" } ], "symlink_target": "" }
package org.kie.workbench.common.dmn.backend.definition.v1_1; import org.kie.workbench.common.dmn.api.definition.model.DMNElementReference; public class DMNElementReferenceConverter { public static DMNElementReference wbFromDMN(final org.kie.dmn.model.api.DMNElementReference dmn) { final DMNElementReference result = new DMNElementReference(); result.setHref(dmn.getHref()); return result; } public static org.kie.dmn.model.api.DMNElementReference dmnFromWB(final DMNElementReference wb) { final org.kie.dmn.model.api.DMNElementReference result = new org.kie.dmn.model.v1_2.TDMNElementReference(); result.setHref(wb.getHref()); return result; } }
{ "content_hash": "f93c183015e05610d072437dbd5ccdc0", "timestamp": "", "source": "github", "line_count": 21, "max_line_length": 115, "avg_line_length": 34.23809523809524, "alnum_prop": 0.7399165507649513, "repo_name": "porcelli-forks/kie-wb-common", "id": "5e1befab05963a5067341a380f31ac0617407e52", "size": "1338", "binary": false, "copies": "9", "ref": "refs/heads/master", "path": "kie-wb-common-dmn/kie-wb-common-dmn-backend/src/main/java/org/kie/workbench/common/dmn/backend/definition/v1_1/DMNElementReferenceConverter.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "2591" }, { "name": "CSS", "bytes": "89726" }, { "name": "Dockerfile", "bytes": "210" }, { "name": "FreeMarker", "bytes": "36613" }, { "name": "GAP", "bytes": "86275" }, { "name": "HTML", "bytes": "298373" }, { "name": "Java", "bytes": "33954524" }, { "name": "JavaScript", "bytes": "20277" }, { "name": "Shell", "bytes": "905" }, { "name": "Visual Basic", "bytes": "84832" } ], "symlink_target": "" }
package hex.genmodel.algos.svm; import hex.genmodel.ModelMojoReader; import java.io.IOException; public class SvmMojoReader extends ModelMojoReader<SvmMojoModel> { @Override public String getModelName() { return "SVM"; } @Override protected void readModelData() throws IOException { _model.meanImputation = readkv("meanImputation"); if(_model.meanImputation) { _model.means = readkv("means"); } _model.weights = readkv("weights"); _model.interceptor = readkv("interceptor"); _model.defaultThreshold = readkv("defaultThreshold"); _model.threshold = readkv("threshold"); } @Override protected SvmMojoModel makeModel(String[] columns, String[][] domains) { return new SvmMojoModel(columns, domains); } }
{ "content_hash": "84712f428cb7ea2161e7763df9a33777", "timestamp": "", "source": "github", "line_count": 33, "max_line_length": 76, "avg_line_length": 25.151515151515152, "alnum_prop": 0.6518072289156627, "repo_name": "mathemage/h2o-3", "id": "cd91f844b92a1bdda3a9e1ebf24cdfa2a7fc0aca", "size": "830", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "h2o-genmodel/src/main/java/hex/genmodel/algos/svm/SvmMojoReader.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "12629" }, { "name": "CSS", "bytes": "250318" }, { "name": "CoffeeScript", "bytes": "273112" }, { "name": "Emacs Lisp", "bytes": "7110" }, { "name": "Groovy", "bytes": "6135" }, { "name": "HTML", "bytes": "304179" }, { "name": "Java", "bytes": "8997305" }, { "name": "JavaScript", "bytes": "85961" }, { "name": "Jupyter Notebook", "bytes": "6164963" }, { "name": "Makefile", "bytes": "42233" }, { "name": "Protocol Buffer", "bytes": "4599" }, { "name": "Python", "bytes": "4661731" }, { "name": "R", "bytes": "2476300" }, { "name": "Ruby", "bytes": "3506" }, { "name": "Scala", "bytes": "32768" }, { "name": "Shell", "bytes": "137821" }, { "name": "TeX", "bytes": "621902" } ], "symlink_target": "" }
package org.olat.data.filebrowser; import org.olat.connectors.webdav.WebDAVProvider; import org.olat.data.basesecurity.Identity; import org.olat.data.commons.vfs.FolderConfig; import org.olat.data.commons.vfs.MergeSource; import org.olat.data.commons.vfs.Quota; import org.olat.data.commons.vfs.QuotaManager; import org.olat.data.commons.vfs.VFSContainer; import org.olat.data.commons.vfs.callbacks.VFSSecurityCallback; import org.olat.data.commons.vfs.olatimpl.OlatNamedContainerImpl; import org.olat.data.commons.vfs.olatimpl.OlatRootFolderImpl; import org.olat.system.commons.manager.BasicManager; /** * */ public class FolderWebDAVProvider extends BasicManager implements WebDAVProvider { private static final String MOUNTPOINT = "home"; @Override public String getMountPoint() { return MOUNTPOINT; } /** */ @Override public VFSContainer getContainer(Identity identity) { // merge /public and /private MergeSource homeMergeSource = new MergeSource(null, identity.getName()); // mount /public OlatRootFolderImpl vfsPublic = new OlatRootFolderImpl(getRootPathFor(identity) + "/public", homeMergeSource); vfsPublic.getBasefile().mkdirs(); // lazy initialize folders // we do a little trick here and wrap it again in a NamedContainerImpl so // it doesn't show up as a OlatRootFolderImpl to prevent it from editing its MetaData OlatNamedContainerImpl vfsNamedPublic = new OlatNamedContainerImpl("public", vfsPublic); // mount /private OlatRootFolderImpl vfsPrivate = new OlatRootFolderImpl(getRootPathFor(identity) + "/private", homeMergeSource); vfsPrivate.getBasefile().mkdirs(); // lazy initialize folders // we do a little trick here and wrap it again in a NamedContainerImpl so // it doesn't show up as a OlatRootFolderImpl to prevent it from editing its MetaData OlatNamedContainerImpl vfsNamedPrivate = new OlatNamedContainerImpl("private", vfsPrivate); // set quota for this merge source QuotaManager qm = QuotaManager.getInstance(); Quota quota = qm.getCustomQuotaOrDefaultDependingOnRole(identity, getRootPathFor(identity)); VFSSecurityCallback securityCallback = new FullAccessSecurityCallback(); securityCallback.setQuota(quota); homeMergeSource.setLocalSecurityCallback(securityCallback); homeMergeSource.addContainer(vfsNamedPublic); homeMergeSource.addContainer(vfsNamedPrivate); return homeMergeSource; } protected String getRootPathFor(Identity identity) { return FolderConfig.getUserHomes() + "/" + identity.getName(); } // local impl because of layering and having sec. callbacks in lms level. Review with security refactoring private class FullAccessSecurityCallback implements VFSSecurityCallback { private Quota quota; @Override public boolean canRead() { return true; } @Override public boolean canWrite() { return true; } @Override public boolean canDelete() { return true; } @Override public boolean canList() { return true; } @Override public boolean canCopy() { return true; } @Override public boolean canDeleteRevisionsPermanently() { return true; } @Override public Quota getQuota() { return quota; } @Override public void setQuota(Quota quota) { this.quota = quota; } } }
{ "content_hash": "9af08ff04c237475fa9832349ef8b9c6", "timestamp": "", "source": "github", "line_count": 115, "max_line_length": 119, "avg_line_length": 32, "alnum_prop": 0.6804347826086956, "repo_name": "huihoo/olat", "id": "65d16a51c12359ea849a85dbedc8020540b20139", "size": "4475", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "olat7.8/src/main/java/org/olat/data/filebrowser/FolderWebDAVProvider.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "AMPL", "bytes": "24445" }, { "name": "AspectJ", "bytes": "36132" }, { "name": "CSS", "bytes": "2135670" }, { "name": "HTML", "bytes": "2950677" }, { "name": "Java", "bytes": "50804277" }, { "name": "JavaScript", "bytes": "31237972" }, { "name": "PLSQL", "bytes": "64492" }, { "name": "Perl", "bytes": "10717" }, { "name": "Shell", "bytes": "79994" }, { "name": "XSLT", "bytes": "186520" } ], "symlink_target": "" }
package org.pipservices.commons.count; import java.util.*; import org.pipservices.commons.convert.*; import org.pipservices.commons.log.*; import org.pipservices.commons.refer.*; /** * Performance counters component that periodically dumps counters * to log as message: 'Counter <name> {"type": <type>, "last": <last>, ...} */ public class LogCounters extends CachedCounters implements IReferenceable { private CompositeLogger _logger = new CompositeLogger(); /** * Creates instance of log counters component. */ public LogCounters() {} public void setReferences(IReferences references) throws ReferenceException { _logger.setReferences(references); } /** * Formats counter string representation. * @param counter a counter object to generate a string for. * @return a formatted string representation of the counter. */ private String counterToString(Counter counter) { String result = "Counter " + counter.getName() + " { "; result += "\"type\": " + counter.getType(); if (counter.getLast() != null) result += ", \"last\": " + StringConverter.toString(counter.getLast()); if (counter.getCount() != null) result += ", \"count\": " + StringConverter.toString(counter.getCount()); if (counter.getMin() != null) result += ", \"min\": " + StringConverter.toString(counter.getMin()); if (counter.getMax() != null) result += ", \"max\": " + StringConverter.toString(counter.getMax()); if (counter.getAverage() != null) result += ", \"avg\": " + StringConverter.toString(counter.getAverage()); if (counter.getTime() != null) result += ", \"time\": " + StringConverter.toString(counter.getTime()); result += " }"; return result; } /** * Outputs a list of counter values to log. * @param counter a list of counters to be dump to log. */ @Override protected void save(List<Counter> counters) { if (_logger == null) return; if (counters.size() == 0) return; Collections.sort( counters, (c1, c2) -> c1.getName().compareTo(c2.getName()) ); for (Counter counter : counters) { _logger.info("counters", counterToString(counter)); } } }
{ "content_hash": "38e0e0b83f19dca270c88210807a414e", "timestamp": "", "source": "github", "line_count": 67, "max_line_length": 85, "avg_line_length": 35.46268656716418, "alnum_prop": 0.601010101010101, "repo_name": "pip-services/pip-services-commons-java", "id": "40cad1e21432ecb50df14ce995e082e331838792", "size": "2376", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/org/pipservices/commons/count/LogCounters.java", "mode": "33188", "license": "mit", "language": [ { "name": "Java", "bytes": "426011" }, { "name": "PowerShell", "bytes": "101" } ], "symlink_target": "" }
//Copyright (c) 2013, Nikita Batov //All rights reserved. //Loader firmware to MSP430 #include <string> #include <stdio.h> #include <iostream> #include <unistd.h> #include <sys/stat.h> #include <sys/types.h> #include <fstream> #include "MSPBSL_Connection5xxUSB.h" #include "MSPBSL_PhysicalInterfaceUSB.h" #include "MSPBSL_PacketHandler5xxUSB.h" #define DefaultAddr 0x0220 #define SleepTime globalArgs.Reset #define EXIT_SUCCESS 0 #define EXIT_WITH_ERROR -1 #define False 0 #define True 1 #define LastOption -1 MSPBSL_PhysicalInterfaceUSB* Interface; MSPBSL_PacketHandler5xxUSB* PacketHandler; static const char *optString = "r:vmo:ebh"; struct globalArgs_t { int Version; std::string inFile; int MassErase; int NewBsl; int Reset; int Run; int Help; } globalArgs; int CheckPassword(MSPBSL_Connection5xxUSB* theBSLConnection) { uint8_t databuf[0x20000]; for (unsigned i = 0; i < 0x20000; i++) databuf[i] = 0x00FF; int i = (theBSLConnection)->RX_Password(databuf); printf("%s: %s \n", __func__, (i == EXIT_SUCCESS ? "OK" : "FAILED")); return i; } int LoadBSL(MSPBSL_Connection5xxUSB* theBSLConnection) { int i = theBSLConnection->loadRAM_BSL(); printf("%s: %s \n", __func__, (i == EXIT_SUCCESS ? "OK" : "FAILED")); return i; } int PrintBSLVersion(MSPBSL_Connection5xxUSB* theBSLConnection) { std::string returnstring; int i = theBSLConnection->TX_BSL_Version(returnstring); printf("%s: %s value %s \n", __func__, (i == EXIT_SUCCESS ? "OK" : "FAILED"), returnstring.c_str()); return i; } int MassErase(MSPBSL_Connection5xxUSB *theBSLConnection) { int i = theBSLConnection->massErase(); printf("%s: %s \n", __func__, (i == EXIT_SUCCESS ? "OK" : "FAILED")); return i; } MSPBSL_Connection5xxUSB* OpenConnection() { MSPBSL_Connection5xxUSB *theBSLConnection = new MSPBSL_Connection5xxUSB(""); Interface = new MSPBSL_PhysicalInterfaceUSB(""); PacketHandler = new MSPBSL_PacketHandler5xxUSB(""); PacketHandler->setPhysicalInterface(Interface); theBSLConnection->setPacketHandler(PacketHandler); ((theBSLConnection->getPacketHandler())->getPhysicalInterface())->invokeBSL(); return theBSLConnection; } void CloseConnetion(MSPBSL_Connection5xxUSB *theBSLConnection) { delete PacketHandler; delete Interface; delete theBSLConnection; } int LoadFirmware(MSPBSL_Connection5xxUSB *theBSLConnection, std::string Firmware) { struct stat s; if (stat(Firmware.c_str(), &s)) { printf("%s\n", "FIRMWARE NOT FOUND!!!"); return EXIT_WITH_ERROR; } if (!globalArgs.NewBsl) LoadBSL(theBSLConnection); if (!globalArgs.MassErase) MassErase(theBSLConnection); int i = theBSLConnection->loadFile(Firmware); printf("%s: %s \n", __func__, (i == EXIT_SUCCESS ? "OK" : "FAILED")); return i; } int Run(MSPBSL_Connection5xxUSB *theBSLConnection, uint32_t addr) { int i = theBSLConnection->setPC(addr); printf("%s: %s \n", __func__, (i == EXIT_SUCCESS ? "OK" : "FAILED")); return i; } void Reset(int time) { //system("reset_msp.sh"); printf("%s\n", "Reseting..."); FILE* file = fopen("/sys/class/gpio/gpio93/value", "w"); if (file != NULL) { char buf1[] = "1\n"; char buf0[] = "0\n"; fwrite(buf0, sizeof(buf1), 1, file); fflush(file); sleep(time); fwrite(buf1, sizeof(buf1), 1, file); fflush(file); sleep(time); fclose(file); } else printf("%s\n", "???"); } void SetCommandLineOptions(int argc, char* argv[]) { int opt = 0; globalArgs.Version = 0; globalArgs.Run = False; globalArgs.Reset = 0; globalArgs.MassErase = False; globalArgs.inFile = ""; globalArgs.NewBsl = False; globalArgs.Help = False; opt = getopt(argc, argv, optString); while (opt != LastOption) { switch (opt) { case 'v': globalArgs.Version = True; break; case 'm': globalArgs.MassErase = True; break; case 'b': globalArgs.NewBsl = True; break; case 'o': globalArgs.inFile = optarg; break; case 'r': globalArgs.Reset = atoi(optarg); break; case 'e': globalArgs.Run = True; break; case 'h': globalArgs.Help = True; break; default: break; } opt = getopt(argc, argv, optString); } } int main(int argc, char* argv[]) { SetCommandLineOptions(argc, argv); if (globalArgs.Reset) { Reset(SleepTime); return EXIT_SUCCESS; } if (globalArgs.Help) { printf("%s\n", "-m MassErase"); printf("%s\n", "-r [time] Reset"); printf("%s\n", "-e Run"); printf("%s\n", "-o [file] MassErase & LoadFirmware"); printf("%s\n", "-b LoadBSL"); printf("%s\n", "-v VersionBSL"); return EXIT_SUCCESS; } MSPBSL_Connection5xxUSB *theBSLConnection = OpenConnection(); CheckPassword(theBSLConnection); //--- if (globalArgs.NewBsl) LoadBSL(theBSLConnection); if (globalArgs.MassErase) MassErase(theBSLConnection); if (globalArgs.Version) PrintBSLVersion(theBSLConnection); if (!(globalArgs.inFile == "")) LoadFirmware(theBSLConnection, globalArgs.inFile); if (globalArgs.Run) Run(theBSLConnection, DefaultAddr); //--- CloseConnetion(theBSLConnection); return EXIT_SUCCESS; }
{ "content_hash": "7447999cea5188cc402aef1e12cad7fa", "timestamp": "", "source": "github", "line_count": 230, "max_line_length": 79, "avg_line_length": 21.8, "alnum_prop": 0.6818907060231352, "repo_name": "Batov/Burner-for-MSP430", "id": "be2a625c01aca5ed264dcddff6d4e299c95e38e8", "size": "6462", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "burner.cpp", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "C++", "bytes": "6462" } ], "symlink_target": "" }
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // This file defines utility functions for X11 (Linux only). This code has been // ported from XCB since we can't use XCB on Ubuntu while its 32-bit support // remains woefully incomplete. #include "ui/base/x/x11_util.h" #include <sys/ipc.h> #include <sys/shm.h> #include <list> #include <map> #include <vector> #include "base/bind.h" #include "base/command_line.h" #include "base/logging.h" #include "base/memory/scoped_ptr.h" #include "base/memory/singleton.h" #include "base/message_loop.h" #include "base/string_number_conversions.h" #include "base/string_util.h" #include "base/stringprintf.h" #include "base/threading/thread.h" #include "ui/base/keycodes/keyboard_code_conversion_x.h" #include "ui/base/x/x11_util_internal.h" #include "ui/gfx/rect.h" #include "ui/gfx/size.h" #if defined(OS_FREEBSD) #include <sys/sysctl.h> #include <sys/types.h> #endif #if defined(USE_AURA) #include <X11/Xcursor/Xcursor.h> #include "third_party/skia/include/core/SkBitmap.h" #include "ui/gfx/skia_util.h" #endif #if defined(TOOLKIT_GTK) #include <gdk/gdk.h> #include <gdk/gdkx.h> #include <gtk/gtk.h> #include "ui/base/gtk/gdk_x_compat.h" #include "ui/base/gtk/gtk_compat.h" #else // TODO(sad): Use the new way of handling X errors when // http://codereview.chromium.org/7889040/ lands. #define gdk_error_trap_push() #define gdk_error_trap_pop() false #define gdk_flush() #endif namespace ui { namespace { // Used to cache the XRenderPictFormat for a visual/display pair. struct CachedPictFormat { bool equals(Display* display, Visual* visual) const { return display == this->display && visual == this->visual; } Display* display; Visual* visual; XRenderPictFormat* format; }; typedef std::list<CachedPictFormat> CachedPictFormats; // Returns the cache of pict formats. CachedPictFormats* get_cached_pict_formats() { static CachedPictFormats* formats = NULL; if (!formats) formats = new CachedPictFormats(); return formats; } // Maximum number of CachedPictFormats we keep around. const size_t kMaxCacheSize = 5; int DefaultX11ErrorHandler(Display* d, XErrorEvent* e) { if (MessageLoop::current()) { MessageLoop::current()->PostTask( FROM_HERE, base::Bind(&LogErrorEventDescription, d, *e)); } else { LOG(ERROR) << "X Error detected: " << "serial " << e->serial << ", " << "error_code " << static_cast<int>(e->error_code) << ", " << "request_code " << static_cast<int>(e->request_code) << ", " << "minor_code " << static_cast<int>(e->minor_code); } return 0; } int DefaultX11IOErrorHandler(Display* d) { // If there's an IO error it likely means the X server has gone away LOG(ERROR) << "X IO Error detected"; _exit(1); } // Note: The caller should free the resulting value data. bool GetProperty(XID window, const std::string& property_name, long max_length, Atom* type, int* format, unsigned long* num_items, unsigned char** property) { Atom property_atom = GetAtom(property_name.c_str()); unsigned long remaining_bytes = 0; return XGetWindowProperty(GetXDisplay(), window, property_atom, 0, // offset into property data to read max_length, // max length to get False, // deleted AnyPropertyType, type, format, num_items, &remaining_bytes, property); } // Converts ui::EventType to XKeyEvent state. unsigned int XKeyEventState(int flags) { return ((flags & ui::EF_SHIFT_DOWN) ? ShiftMask : 0) | ((flags & ui::EF_CONTROL_DOWN) ? ControlMask : 0) | ((flags & ui::EF_ALT_DOWN) ? Mod1Mask : 0) | ((flags & ui::EF_CAPS_LOCK_DOWN) ? LockMask : 0); } // Converts EventType to XKeyEvent type. int XKeyEventType(ui::EventType type) { switch (type) { case ui::ET_KEY_PRESSED: return KeyPress; case ui::ET_KEY_RELEASED: return KeyRelease; default: return 0; } } // Converts KeyboardCode to XKeyEvent keycode. unsigned int XKeyEventKeyCode(ui::KeyboardCode key_code, int flags, Display* display) { const int keysym = XKeysymForWindowsKeyCode(key_code, flags & ui::EF_SHIFT_DOWN); // Tests assume the keycode for XK_less is equal to the one of XK_comma, // but XKeysymToKeycode returns 94 for XK_less while it returns 59 for // XK_comma. Here we convert the value for XK_less to the value for XK_comma. return (keysym == XK_less) ? 59 : XKeysymToKeycode(display, keysym); } // A process wide singleton that manages the usage of X cursors. class XCursorCache { public: XCursorCache() {} ~XCursorCache() { Clear(); } ::Cursor GetCursor(int cursor_shape) { // Lookup cursor by attempting to insert a null value, which avoids // a second pass through the map after a cache miss. std::pair<std::map<int, ::Cursor>::iterator, bool> it = cache_.insert( std::make_pair(cursor_shape, 0)); if (it.second) { Display* display = base::MessagePumpForUI::GetDefaultXDisplay(); it.first->second = XCreateFontCursor(display, cursor_shape); } return it.first->second; } void Clear() { Display* display = base::MessagePumpForUI::GetDefaultXDisplay(); for (std::map<int, ::Cursor>::iterator it = cache_.begin(); it != cache_.end(); ++it) { XFreeCursor(display, it->second); } cache_.clear(); } private: // Maps X11 font cursor shapes to Cursor IDs. std::map<int, ::Cursor> cache_; DISALLOW_COPY_AND_ASSIGN(XCursorCache); }; #if defined(USE_AURA) // A process wide singleton cache for custom X cursors. class XCustomCursorCache { public: static XCustomCursorCache* GetInstance() { return Singleton<XCustomCursorCache>::get(); } ::Cursor InstallCustomCursor(XcursorImage* image) { XCustomCursor* custom_cursor = new XCustomCursor(image); ::Cursor xcursor = custom_cursor->cursor(); cache_[xcursor] = custom_cursor; return xcursor; } void Ref(::Cursor cursor) { cache_[cursor]->Ref(); } void Unref(::Cursor cursor) { if (cache_[cursor]->Unref()) cache_.erase(cursor); } void Clear() { cache_.clear(); } private: friend struct DefaultSingletonTraits<XCustomCursorCache>; class XCustomCursor { public: // This takes ownership of the image. XCustomCursor(XcursorImage* image) : image_(image), ref_(1) { cursor_ = XcursorImageLoadCursor(GetXDisplay(), image); } ~XCustomCursor() { XcursorImageDestroy(image_); XFreeCursor(GetXDisplay(), cursor_); } ::Cursor cursor() const { return cursor_; } void Ref() { ++ref_; } // Returns true if the cursor was destroyed because of the unref. bool Unref() { if (--ref_ == 0) { delete this; return true; } return false; } private: XcursorImage* image_; int ref_; ::Cursor cursor_; DISALLOW_COPY_AND_ASSIGN(XCustomCursor); }; XCustomCursorCache() {} ~XCustomCursorCache() { Clear(); } std::map< ::Cursor, XCustomCursor*> cache_; DISALLOW_COPY_AND_ASSIGN(XCustomCursorCache); }; #endif // defined(USE_AURA) // A singleton object that remembers remappings of mouse buttons. class XButtonMap { public: static XButtonMap* GetInstance() { return Singleton<XButtonMap>::get(); } void UpdateMapping() { count_ = XGetPointerMapping(ui::GetXDisplay(), map_, arraysize(map_)); } int GetMappedButton(int button) { return button > 0 && button <= count_ ? map_[button - 1] : button; } private: friend struct DefaultSingletonTraits<XButtonMap>; XButtonMap() { UpdateMapping(); } ~XButtonMap() {} unsigned char map_[256]; int count_; DISALLOW_COPY_AND_ASSIGN(XButtonMap); }; } // namespace bool XDisplayExists() { return (GetXDisplay() != NULL); } Display* GetXDisplay() { return base::MessagePumpForUI::GetDefaultXDisplay(); } static SharedMemorySupport DoQuerySharedMemorySupport(Display* dpy) { int dummy; Bool pixmaps_supported; // Query the server's support for XSHM. if (!XShmQueryVersion(dpy, &dummy, &dummy, &pixmaps_supported)) return SHARED_MEMORY_NONE; #if defined(OS_FREEBSD) // On FreeBSD we can't access the shared memory after it was marked for // deletion, unless this behaviour is explicitly enabled by the user. // In case it's not enabled disable shared memory support. int allow_removed; size_t length = sizeof(allow_removed); if ((sysctlbyname("kern.ipc.shm_allow_removed", &allow_removed, &length, NULL, 0) < 0) || allow_removed < 1) { return SHARED_MEMORY_NONE; } #endif // Next we probe to see if shared memory will really work int shmkey = shmget(IPC_PRIVATE, 1, 0666); if (shmkey == -1) return SHARED_MEMORY_NONE; void* address = shmat(shmkey, NULL, 0); // Mark the shared memory region for deletion shmctl(shmkey, IPC_RMID, NULL); XShmSegmentInfo shminfo; memset(&shminfo, 0, sizeof(shminfo)); shminfo.shmid = shmkey; gdk_error_trap_push(); bool result = XShmAttach(dpy, &shminfo); XSync(dpy, False); if (gdk_error_trap_pop()) result = false; shmdt(address); if (!result) return SHARED_MEMORY_NONE; XShmDetach(dpy, &shminfo); return pixmaps_supported ? SHARED_MEMORY_PIXMAP : SHARED_MEMORY_PUTIMAGE; } SharedMemorySupport QuerySharedMemorySupport(Display* dpy) { static SharedMemorySupport shared_memory_support = SHARED_MEMORY_NONE; static bool shared_memory_support_cached = false; if (shared_memory_support_cached) return shared_memory_support; shared_memory_support = DoQuerySharedMemorySupport(dpy); shared_memory_support_cached = true; return shared_memory_support; } bool QueryRenderSupport(Display* dpy) { static bool render_supported = false; static bool render_supported_cached = false; if (render_supported_cached) return render_supported; // We don't care about the version of Xrender since all the features which // we use are included in every version. int dummy; render_supported = XRenderQueryExtension(dpy, &dummy, &dummy); render_supported_cached = true; return render_supported; } int GetDefaultScreen(Display* display) { return XDefaultScreen(display); } ::Cursor GetXCursor(int cursor_shape) { CR_DEFINE_STATIC_LOCAL(XCursorCache, cache, ()); if (cursor_shape == kCursorClearXCursorCache) { cache.Clear(); return 0; } return cache.GetCursor(cursor_shape); } #if defined(USE_AURA) ::Cursor CreateReffedCustomXCursor(XcursorImage* image) { return XCustomCursorCache::GetInstance()->InstallCustomCursor(image); } void RefCustomXCursor(::Cursor cursor) { XCustomCursorCache::GetInstance()->Ref(cursor); } void UnrefCustomXCursor(::Cursor cursor) { XCustomCursorCache::GetInstance()->Unref(cursor); } XcursorImage* SkBitmapToXcursorImage(const SkBitmap* bitmap, const gfx::Point& hotspot) { DCHECK(bitmap->config() == SkBitmap::kARGB_8888_Config); XcursorImage* image = XcursorImageCreate(bitmap->width(), bitmap->height()); image->xhot = hotspot.x(); image->yhot = hotspot.y(); if (bitmap->width() && bitmap->height()) { bitmap->lockPixels(); gfx::ConvertSkiaToRGBA( static_cast<const unsigned char*>(bitmap->getPixels()), bitmap->width() * bitmap->height(), reinterpret_cast<unsigned char*>(image->pixels)); bitmap->unlockPixels(); } return image; } #endif XID GetX11RootWindow() { return DefaultRootWindow(GetXDisplay()); } bool GetCurrentDesktop(int* desktop) { return GetIntProperty(GetX11RootWindow(), "_NET_CURRENT_DESKTOP", desktop); } #if defined(TOOLKIT_GTK) XID GetX11WindowFromGtkWidget(GtkWidget* widget) { return GDK_WINDOW_XID(gtk_widget_get_window(widget)); } XID GetX11WindowFromGdkWindow(GdkWindow* window) { return GDK_WINDOW_XID(window); } GtkWindow* GetGtkWindowFromX11Window(XID xid) { GdkWindow* gdk_window = gdk_x11_window_lookup_for_display(gdk_display_get_default(), xid); if (!gdk_window) return NULL; GtkWindow* gtk_window = NULL; gdk_window_get_user_data(gdk_window, reinterpret_cast<gpointer*>(&gtk_window)); if (!gtk_window) return NULL; return gtk_window; } void* GetVisualFromGtkWidget(GtkWidget* widget) { return GDK_VISUAL_XVISUAL(gtk_widget_get_visual(widget)); } #endif // defined(TOOLKIT_GTK) int BitsPerPixelForPixmapDepth(Display* dpy, int depth) { int count; XPixmapFormatValues* formats = XListPixmapFormats(dpy, &count); if (!formats) return -1; int bits_per_pixel = -1; for (int i = 0; i < count; ++i) { if (formats[i].depth == depth) { bits_per_pixel = formats[i].bits_per_pixel; break; } } XFree(formats); return bits_per_pixel; } bool IsWindowVisible(XID window) { XWindowAttributes win_attributes; if (!XGetWindowAttributes(GetXDisplay(), window, &win_attributes)) return false; if (win_attributes.map_state != IsViewable) return false; // Some compositing window managers (notably kwin) do not actually unmap // windows on desktop switch, so we also must check the current desktop. int window_desktop, current_desktop; return (!GetWindowDesktop(window, &window_desktop) || !GetCurrentDesktop(&current_desktop) || window_desktop == kAllDesktops || window_desktop == current_desktop); } bool GetWindowRect(XID window, gfx::Rect* rect) { Window root, child; int x, y; unsigned int width, height; unsigned int border_width, depth; if (!XGetGeometry(GetXDisplay(), window, &root, &x, &y, &width, &height, &border_width, &depth)) return false; if (!XTranslateCoordinates(GetXDisplay(), window, root, 0, 0, &x, &y, &child)) return false; *rect = gfx::Rect(x, y, width, height); return true; } bool PropertyExists(XID window, const std::string& property_name) { Atom type = None; int format = 0; // size in bits of each item in 'property' unsigned long num_items = 0; unsigned char* property = NULL; int result = GetProperty(window, property_name, 1, &type, &format, &num_items, &property); if (result != Success) return false; XFree(property); return num_items > 0; } bool GetIntProperty(XID window, const std::string& property_name, int* value) { Atom type = None; int format = 0; // size in bits of each item in 'property' unsigned long num_items = 0; unsigned char* property = NULL; int result = GetProperty(window, property_name, 1, &type, &format, &num_items, &property); if (result != Success) return false; if (format != 32 || num_items != 1) { XFree(property); return false; } *value = static_cast<int>(*(reinterpret_cast<long*>(property))); XFree(property); return true; } bool GetIntArrayProperty(XID window, const std::string& property_name, std::vector<int>* value) { Atom type = None; int format = 0; // size in bits of each item in 'property' unsigned long num_items = 0; unsigned char* properties = NULL; int result = GetProperty(window, property_name, (~0L), // (all of them) &type, &format, &num_items, &properties); if (result != Success) return false; if (format != 32) { XFree(properties); return false; } long* int_properties = reinterpret_cast<long*>(properties); value->clear(); for (unsigned long i = 0; i < num_items; ++i) { value->push_back(static_cast<int>(int_properties[i])); } XFree(properties); return true; } bool GetAtomArrayProperty(XID window, const std::string& property_name, std::vector<Atom>* value) { Atom type = None; int format = 0; // size in bits of each item in 'property' unsigned long num_items = 0; unsigned char* properties = NULL; int result = GetProperty(window, property_name, (~0L), // (all of them) &type, &format, &num_items, &properties); if (result != Success) return false; if (type != XA_ATOM) { XFree(properties); return false; } Atom* atom_properties = reinterpret_cast<Atom*>(properties); value->clear(); value->insert(value->begin(), atom_properties, atom_properties + num_items); XFree(properties); return true; } bool GetStringProperty( XID window, const std::string& property_name, std::string* value) { Atom type = None; int format = 0; // size in bits of each item in 'property' unsigned long num_items = 0; unsigned char* property = NULL; int result = GetProperty(window, property_name, 1024, &type, &format, &num_items, &property); if (result != Success) return false; if (format != 8) { XFree(property); return false; } value->assign(reinterpret_cast<char*>(property), num_items); XFree(property); return true; } bool SetIntProperty(XID window, const std::string& name, const std::string& type, int value) { std::vector<int> values(1, value); return SetIntArrayProperty(window, name, type, values); } bool SetIntArrayProperty(XID window, const std::string& name, const std::string& type, const std::vector<int>& value) { DCHECK(!value.empty()); Atom name_atom = GetAtom(name.c_str()); Atom type_atom = GetAtom(type.c_str()); // XChangeProperty() expects values of type 32 to be longs. scoped_array<long> data(new long[value.size()]); for (size_t i = 0; i < value.size(); ++i) data[i] = value[i]; gdk_error_trap_push(); XChangeProperty(ui::GetXDisplay(), window, name_atom, type_atom, 32, // size in bits of items in 'value' PropModeReplace, reinterpret_cast<const unsigned char*>(data.get()), value.size()); // num items XSync(ui::GetXDisplay(), False); return gdk_error_trap_pop() == 0; } Atom GetAtom(const char* name) { #if defined(TOOLKIT_GTK) return gdk_x11_get_xatom_by_name_for_display( gdk_display_get_default(), name); #else // TODO(derat): Cache atoms to avoid round-trips to the server. return XInternAtom(GetXDisplay(), name, false); #endif } XID GetParentWindow(XID window) { XID root = None; XID parent = None; XID* children = NULL; unsigned int num_children = 0; XQueryTree(GetXDisplay(), window, &root, &parent, &children, &num_children); if (children) XFree(children); return parent; } XID GetHighestAncestorWindow(XID window, XID root) { while (true) { XID parent = GetParentWindow(window); if (parent == None) return None; if (parent == root) return window; window = parent; } } bool GetWindowDesktop(XID window, int* desktop) { return GetIntProperty(window, "_NET_WM_DESKTOP", desktop); } // Returns true if |window| is a named window. bool IsWindowNamed(XID window) { XTextProperty prop; if (!XGetWMName(GetXDisplay(), window, &prop) || !prop.value) return false; XFree(prop.value); return true; } bool EnumerateChildren(EnumerateWindowsDelegate* delegate, XID window, const int max_depth, int depth) { if (depth > max_depth) return false; XID root, parent, *children; unsigned int num_children; int status = XQueryTree(GetXDisplay(), window, &root, &parent, &children, &num_children); if (status == 0) return false; std::vector<XID> windows; for (int i = static_cast<int>(num_children) - 1; i >= 0; i--) windows.push_back(children[i]); XFree(children); // XQueryTree returns the children of |window| in bottom-to-top order, so // reverse-iterate the list to check the windows from top-to-bottom. std::vector<XID>::iterator iter; for (iter = windows.begin(); iter != windows.end(); iter++) { if (IsWindowNamed(*iter) && delegate->ShouldStopIterating(*iter)) return true; } // If we're at this point, we didn't find the window we're looking for at the // current level, so we need to recurse to the next level. We use a second // loop because the recursion and call to XQueryTree are expensive and is only // needed for a small number of cases. if (++depth <= max_depth) { for (iter = windows.begin(); iter != windows.end(); iter++) { if (EnumerateChildren(delegate, *iter, max_depth, depth)) return true; } } return false; } bool EnumerateAllWindows(EnumerateWindowsDelegate* delegate, int max_depth) { XID root = GetX11RootWindow(); return EnumerateChildren(delegate, root, max_depth, 0); } bool GetXWindowStack(Window window, std::vector<XID>* windows) { windows->clear(); Atom type; int format; unsigned long count; unsigned char *data = NULL; if (GetProperty(window, "_NET_CLIENT_LIST_STACKING", ~0L, &type, &format, &count, &data) != Success) { return false; } bool result = false; if (type == XA_WINDOW && format == 32 && data && count > 0) { result = true; XID* stack = reinterpret_cast<XID*>(data); for (long i = static_cast<long>(count) - 1; i >= 0; i--) windows->push_back(stack[i]); } if (data) XFree(data); return result; } void RestackWindow(XID window, XID sibling, bool above) { XWindowChanges changes; changes.sibling = sibling; changes.stack_mode = above ? Above : Below; XConfigureWindow(GetXDisplay(), window, CWSibling | CWStackMode, &changes); } XSharedMemoryId AttachSharedMemory(Display* display, int shared_memory_key) { DCHECK(QuerySharedMemorySupport(display)); XShmSegmentInfo shminfo; memset(&shminfo, 0, sizeof(shminfo)); shminfo.shmid = shared_memory_key; // This function is only called if QuerySharedMemorySupport returned true. In // which case we've already succeeded in having the X server attach to one of // our shared memory segments. if (!XShmAttach(display, &shminfo)) NOTREACHED(); return shminfo.shmseg; } void DetachSharedMemory(Display* display, XSharedMemoryId shmseg) { DCHECK(QuerySharedMemorySupport(display)); XShmSegmentInfo shminfo; memset(&shminfo, 0, sizeof(shminfo)); shminfo.shmseg = shmseg; if (!XShmDetach(display, &shminfo)) NOTREACHED(); } XID CreatePictureFromSkiaPixmap(Display* display, XID pixmap) { XID picture = XRenderCreatePicture( display, pixmap, GetRenderARGB32Format(display), 0, NULL); return picture; } void PutARGBImage(Display* display, void* visual, int depth, XID pixmap, void* pixmap_gc, const uint8* data, int width, int height) { PutARGBImage(display, visual, depth, pixmap, pixmap_gc, data, width, height, 0, 0, // src_x, src_y 0, 0, // dst_x, dst_y width, height); } void PutARGBImage(Display* display, void* visual, int depth, XID pixmap, void* pixmap_gc, const uint8* data, int data_width, int data_height, int src_x, int src_y, int dst_x, int dst_y, int copy_width, int copy_height) { // TODO(scherkus): potential performance impact... consider passing in as a // parameter. int pixmap_bpp = BitsPerPixelForPixmapDepth(display, depth); XImage image; memset(&image, 0, sizeof(image)); image.width = data_width; image.height = data_height; image.format = ZPixmap; image.byte_order = LSBFirst; image.bitmap_unit = 8; image.bitmap_bit_order = LSBFirst; image.depth = depth; image.bits_per_pixel = pixmap_bpp; image.bytes_per_line = data_width * pixmap_bpp / 8; if (pixmap_bpp == 32) { image.red_mask = 0xff0000; image.green_mask = 0xff00; image.blue_mask = 0xff; // If the X server depth is already 32-bits and the color masks match, // then our job is easy. Visual* vis = static_cast<Visual*>(visual); if (image.red_mask == vis->red_mask && image.green_mask == vis->green_mask && image.blue_mask == vis->blue_mask) { image.data = const_cast<char*>(reinterpret_cast<const char*>(data)); XPutImage(display, pixmap, static_cast<GC>(pixmap_gc), &image, src_x, src_y, dst_x, dst_y, copy_width, copy_height); } else { // Otherwise, we need to shuffle the colors around. Assume red and blue // need to be swapped. // // It's possible to use some fancy SSE tricks here, but since this is the // slow path anyway, we do it slowly. uint8_t* bitmap32 = static_cast<uint8_t*>(malloc(4 * data_width * data_height)); if (!bitmap32) return; uint8_t* const orig_bitmap32 = bitmap32; const uint32_t* bitmap_in = reinterpret_cast<const uint32_t*>(data); for (int y = 0; y < data_height; ++y) { for (int x = 0; x < data_width; ++x) { const uint32_t pixel = *(bitmap_in++); bitmap32[0] = (pixel >> 16) & 0xff; // Red bitmap32[1] = (pixel >> 8) & 0xff; // Green bitmap32[2] = pixel & 0xff; // Blue bitmap32[3] = (pixel >> 24) & 0xff; // Alpha bitmap32 += 4; } } image.data = reinterpret_cast<char*>(orig_bitmap32); XPutImage(display, pixmap, static_cast<GC>(pixmap_gc), &image, src_x, src_y, dst_x, dst_y, copy_width, copy_height); free(orig_bitmap32); } } else if (pixmap_bpp == 16) { // Some folks have VNC setups which still use 16-bit visuals and VNC // doesn't include Xrender. uint16_t* bitmap16 = static_cast<uint16_t*>(malloc(2 * data_width * data_height)); if (!bitmap16) return; uint16_t* const orig_bitmap16 = bitmap16; const uint32_t* bitmap_in = reinterpret_cast<const uint32_t*>(data); for (int y = 0; y < data_height; ++y) { for (int x = 0; x < data_width; ++x) { const uint32_t pixel = *(bitmap_in++); uint16_t out_pixel = ((pixel >> 8) & 0xf800) | ((pixel >> 5) & 0x07e0) | ((pixel >> 3) & 0x001f); *(bitmap16++) = out_pixel; } } image.data = reinterpret_cast<char*>(orig_bitmap16); image.red_mask = 0xf800; image.green_mask = 0x07e0; image.blue_mask = 0x001f; XPutImage(display, pixmap, static_cast<GC>(pixmap_gc), &image, src_x, src_y, dst_x, dst_y, copy_width, copy_height); free(orig_bitmap16); } else { LOG(FATAL) << "Sorry, we don't support your visual depth without " "Xrender support (depth:" << depth << " bpp:" << pixmap_bpp << ")"; } } void FreePicture(Display* display, XID picture) { XRenderFreePicture(display, picture); } void FreePixmap(Display* display, XID pixmap) { XFreePixmap(display, pixmap); } bool GetWindowManagerName(std::string* wm_name) { DCHECK(wm_name); int wm_window = 0; if (!GetIntProperty(GetX11RootWindow(), "_NET_SUPPORTING_WM_CHECK", &wm_window)) { return false; } // It's possible that a window manager started earlier in this X session left // a stale _NET_SUPPORTING_WM_CHECK property when it was replaced by a // non-EWMH window manager, so we trap errors in the following requests to // avoid crashes (issue 23860). // EWMH requires the supporting-WM window to also have a // _NET_SUPPORTING_WM_CHECK property pointing to itself (to avoid a stale // property referencing an ID that's been recycled for another window), so we // check that too. gdk_error_trap_push(); int wm_window_property = 0; bool result = GetIntProperty( wm_window, "_NET_SUPPORTING_WM_CHECK", &wm_window_property); gdk_flush(); bool got_error = gdk_error_trap_pop(); if (got_error || !result || wm_window_property != wm_window) return false; gdk_error_trap_push(); result = GetStringProperty( static_cast<XID>(wm_window), "_NET_WM_NAME", wm_name); gdk_flush(); got_error = gdk_error_trap_pop(); return !got_error && result; } WindowManagerName GuessWindowManager() { std::string name; if (GetWindowManagerName(&name)) { // These names are taken from the WMs' source code. if (name == "Compiz" || name == "compiz") return WM_COMPIZ; if (name == "KWin") return WM_KWIN; if (name == "Metacity") return WM_METACITY; if (name == "Mutter") return WM_MUTTER; if (name == "Xfwm4") return WM_XFWM4; if (name == "chromeos-wm") return WM_CHROME_OS; if (name == "Blackbox") return WM_BLACKBOX; if (name == "e16") return WM_ENLIGHTENMENT; if (StartsWithASCII(name, "IceWM", true)) return WM_ICE_WM; if (name == "Openbox") return WM_OPENBOX; } return WM_UNKNOWN; } bool ChangeWindowDesktop(XID window, XID destination) { int desktop; if (!GetWindowDesktop(destination, &desktop)) return false; // If |window| is sticky, use the current desktop. if (desktop == kAllDesktops && !GetCurrentDesktop(&desktop)) return false; XEvent event; event.xclient.type = ClientMessage; event.xclient.window = window; event.xclient.message_type = GetAtom("_NET_WM_DESKTOP"); event.xclient.format = 32; event.xclient.data.l[0] = desktop; event.xclient.data.l[1] = 1; // source indication int result = XSendEvent(GetXDisplay(), GetX11RootWindow(), False, SubstructureNotifyMask, &event); return result == Success; } void SetDefaultX11ErrorHandlers() { SetX11ErrorHandlers(NULL, NULL); } bool IsX11WindowFullScreen(XID window) { // First check if _NET_WM_STATE property contains _NET_WM_STATE_FULLSCREEN. static Atom atom = GetAtom("_NET_WM_STATE_FULLSCREEN"); std::vector<Atom> atom_properties; if (GetAtomArrayProperty(window, "_NET_WM_STATE", &atom_properties) && std::find(atom_properties.begin(), atom_properties.end(), atom) != atom_properties.end()) return true; #if defined(TOOLKIT_GTK) // As the last resort, check if the window size is as large as the main // screen. GdkRectangle monitor_rect; gdk_screen_get_monitor_geometry(gdk_screen_get_default(), 0, &monitor_rect); gfx::Rect window_rect; if (!ui::GetWindowRect(window, &window_rect)) return false; return monitor_rect.x == window_rect.x() && monitor_rect.y == window_rect.y() && monitor_rect.width == window_rect.width() && monitor_rect.height == window_rect.height(); #else NOTIMPLEMENTED(); return false; #endif } bool IsMotionEvent(XEvent* event) { int type = event->type; if (type == GenericEvent) type = event->xgeneric.evtype; return type == MotionNotify; } int GetMappedButton(int button) { return XButtonMap::GetInstance()->GetMappedButton(button); } void UpdateButtonMap() { XButtonMap::GetInstance()->UpdateMapping(); } void InitXKeyEventForTesting(EventType type, KeyboardCode key_code, int flags, XEvent* event) { CHECK(event); Display* display = GetXDisplay(); XKeyEvent key_event; key_event.type = XKeyEventType(type); CHECK_NE(0, key_event.type); key_event.serial = 0; key_event.send_event = 0; key_event.display = display; key_event.time = 0; key_event.window = 0; key_event.root = 0; key_event.subwindow = 0; key_event.x = 0; key_event.y = 0; key_event.x_root = 0; key_event.y_root = 0; key_event.state = XKeyEventState(flags); key_event.keycode = XKeyEventKeyCode(key_code, flags, display); key_event.same_screen = 1; event->type = key_event.type; event->xkey = key_event; } XScopedString::~XScopedString() { XFree(string_); } // ---------------------------------------------------------------------------- // These functions are declared in x11_util_internal.h because they require // XLib.h to be included, and it conflicts with many other headers. XRenderPictFormat* GetRenderARGB32Format(Display* dpy) { static XRenderPictFormat* pictformat = NULL; if (pictformat) return pictformat; // First look for a 32-bit format which ignores the alpha value XRenderPictFormat templ; templ.depth = 32; templ.type = PictTypeDirect; templ.direct.red = 16; templ.direct.green = 8; templ.direct.blue = 0; templ.direct.redMask = 0xff; templ.direct.greenMask = 0xff; templ.direct.blueMask = 0xff; templ.direct.alphaMask = 0; static const unsigned long kMask = PictFormatType | PictFormatDepth | PictFormatRed | PictFormatRedMask | PictFormatGreen | PictFormatGreenMask | PictFormatBlue | PictFormatBlueMask | PictFormatAlphaMask; pictformat = XRenderFindFormat(dpy, kMask, &templ, 0 /* first result */); if (!pictformat) { // Not all X servers support xRGB32 formats. However, the XRENDER spec says // that they must support an ARGB32 format, so we can always return that. pictformat = XRenderFindStandardFormat(dpy, PictStandardARGB32); CHECK(pictformat) << "XRENDER ARGB32 not supported."; } return pictformat; } XRenderPictFormat* GetRenderVisualFormat(Display* dpy, Visual* visual) { DCHECK(QueryRenderSupport(dpy)); CachedPictFormats* formats = get_cached_pict_formats(); for (CachedPictFormats::const_iterator i = formats->begin(); i != formats->end(); ++i) { if (i->equals(dpy, visual)) return i->format; } // Not cached, look up the value. XRenderPictFormat* pictformat = XRenderFindVisualFormat(dpy, visual); CHECK(pictformat) << "XRENDER does not support default visual"; // And store it in the cache. CachedPictFormat cached_value; cached_value.visual = visual; cached_value.display = dpy; cached_value.format = pictformat; formats->push_front(cached_value); if (formats->size() == kMaxCacheSize) { formats->pop_back(); // We should really only have at most 2 display/visual combinations: // one for normal browser windows, and possibly another for an argb window // created to display a menu. // // If we get here it's not fatal, we just need to make sure we aren't // always blowing away the cache. If we are, then we should figure out why // and make it bigger. NOTREACHED(); } return pictformat; } void SetX11ErrorHandlers(XErrorHandler error_handler, XIOErrorHandler io_error_handler) { XSetErrorHandler(error_handler ? error_handler : DefaultX11ErrorHandler); XSetIOErrorHandler( io_error_handler ? io_error_handler : DefaultX11IOErrorHandler); } void LogErrorEventDescription(Display* dpy, const XErrorEvent& error_event) { char error_str[256]; char request_str[256]; XGetErrorText(dpy, error_event.error_code, error_str, sizeof(error_str)); strncpy(request_str, "Unknown", sizeof(request_str)); if (error_event.request_code < 128) { std::string num = base::UintToString(error_event.request_code); XGetErrorDatabaseText( dpy, "XRequest", num.c_str(), "Unknown", request_str, sizeof(request_str)); } else { int num_ext; char** ext_list = XListExtensions(dpy, &num_ext); for (int i = 0; i < num_ext; i++) { int ext_code, first_event, first_error; XQueryExtension(dpy, ext_list[i], &ext_code, &first_event, &first_error); if (error_event.request_code == ext_code) { std::string msg = StringPrintf( "%s.%d", ext_list[i], error_event.minor_code); XGetErrorDatabaseText( dpy, "XRequest", msg.c_str(), "Unknown", request_str, sizeof(request_str)); break; } } XFreeExtensionList(ext_list); } LOG(ERROR) << "X Error detected: " << "serial " << error_event.serial << ", " << "error_code " << static_cast<int>(error_event.error_code) << " (" << error_str << "), " << "request_code " << static_cast<int>(error_event.request_code) << ", " << "minor_code " << static_cast<int>(error_event.minor_code) << " (" << request_str << ")"; } // ---------------------------------------------------------------------------- // End of x11_util_internal.h } // namespace ui
{ "content_hash": "85d077241df218683ea3986ba6def3ae", "timestamp": "", "source": "github", "line_count": 1256, "max_line_length": 80, "avg_line_length": 29.645700636942674, "alnum_prop": 0.6324425943332885, "repo_name": "robclark/chromium", "id": "a7b1bc3ad03f90df43e283ef900142c6d04f0512", "size": "37235", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "ui/base/x/x11_util.cc", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "Assembly", "bytes": "1178292" }, { "name": "C", "bytes": "74631766" }, { "name": "C++", "bytes": "120828826" }, { "name": "F#", "bytes": "381" }, { "name": "Go", "bytes": "18556" }, { "name": "Java", "bytes": "120805" }, { "name": "JavaScript", "bytes": "16170722" }, { "name": "Objective-C", "bytes": "5449644" }, { "name": "PHP", "bytes": "97796" }, { "name": "Perl", "bytes": "918516" }, { "name": "Python", "bytes": "5989396" }, { "name": "R", "bytes": "524" }, { "name": "Shell", "bytes": "4169796" }, { "name": "Tcl", "bytes": "277077" } ], "symlink_target": "" }
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.11"/> <title>V8 API Reference Guide for node.js v7.8.0: v8::Exception Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/searchdata.js"></script> <script type="text/javascript" src="search/search.js"></script> <script type="text/javascript"> $(document).ready(function() { init_search(); }); </script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">V8 API Reference Guide for node.js v7.8.0 </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.11 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main&#160;Page</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li><a href="examples.html"><span>Examples</span></a></li> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <img id="MSearchSelect" src="search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </span> </div> </li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Class&#160;List</span></a></li> <li><a href="classes.html"><span>Class&#160;Index</span></a></li> <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li> <li><a href="functions.html"><span>Class&#160;Members</span></a></li> </ul> </div> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> </div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="namespacev8.html">v8</a></li><li class="navelem"><a class="el" href="classv8_1_1Exception.html">Exception</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> &#124; <a href="#pub-static-methods">Static Public Member Functions</a> &#124; <a href="classv8_1_1Exception-members.html">List of all members</a> </div> <div class="headertitle"> <div class="title">v8::Exception Class Reference</div> </div> </div><!--header--> <div class="contents"> <p><code>#include &lt;<a class="el" href="v8_8h_source.html">v8.h</a>&gt;</code></p> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr class="memitem:ae66baf48c3f461b919e66c3bb9094e64"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae66baf48c3f461b919e66c3bb9094e64"></a> &#160;</td><td class="memItemRight" valign="bottom"><b>V8_DEPRECATED</b> (&quot;Use version with an <a class="el" href="classv8_1_1Isolate.html">Isolate</a>*&quot;, static <a class="el" href="classv8_1_1Local.html">Local</a>&lt; <a class="el" href="classv8_1_1Message.html">Message</a> &gt; <a class="el" href="classv8_1_1Exception.html#a8d575a721cf0fd5b325afb8b586c0d1e">CreateMessage</a>(<a class="el" href="classv8_1_1Local.html">Local</a>&lt; <a class="el" href="classv8_1_1Value.html">Value</a> &gt; exception))</td></tr> <tr class="separator:ae66baf48c3f461b919e66c3bb9094e64"><td class="memSeparator" colspan="2">&#160;</td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a> Static Public Member Functions</h2></td></tr> <tr class="memitem:a7fff335c54b4a267b5edab00ca049294"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7fff335c54b4a267b5edab00ca049294"></a> static <a class="el" href="classv8_1_1Local.html">Local</a>&lt; <a class="el" href="classv8_1_1Value.html">Value</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>RangeError</b> (<a class="el" href="classv8_1_1Local.html">Local</a>&lt; <a class="el" href="classv8_1_1String.html">String</a> &gt; message)</td></tr> <tr class="separator:a7fff335c54b4a267b5edab00ca049294"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:aa9a1b1806c6ec13e0e8852a05e83f8ef"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa9a1b1806c6ec13e0e8852a05e83f8ef"></a> static <a class="el" href="classv8_1_1Local.html">Local</a>&lt; <a class="el" href="classv8_1_1Value.html">Value</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>ReferenceError</b> (<a class="el" href="classv8_1_1Local.html">Local</a>&lt; <a class="el" href="classv8_1_1String.html">String</a> &gt; message)</td></tr> <tr class="separator:aa9a1b1806c6ec13e0e8852a05e83f8ef"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ae9efc01a15b3ea6ed0761ce4b2cfa4ab"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae9efc01a15b3ea6ed0761ce4b2cfa4ab"></a> static <a class="el" href="classv8_1_1Local.html">Local</a>&lt; <a class="el" href="classv8_1_1Value.html">Value</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>SyntaxError</b> (<a class="el" href="classv8_1_1Local.html">Local</a>&lt; <a class="el" href="classv8_1_1String.html">String</a> &gt; message)</td></tr> <tr class="separator:ae9efc01a15b3ea6ed0761ce4b2cfa4ab"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ad06cda3370edb5b39a5c671bba28754d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad06cda3370edb5b39a5c671bba28754d"></a> static <a class="el" href="classv8_1_1Local.html">Local</a>&lt; <a class="el" href="classv8_1_1Value.html">Value</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>TypeError</b> (<a class="el" href="classv8_1_1Local.html">Local</a>&lt; <a class="el" href="classv8_1_1String.html">String</a> &gt; message)</td></tr> <tr class="separator:ad06cda3370edb5b39a5c671bba28754d"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a77c6ab659f67df0cb0aa0f7c6698f019"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a77c6ab659f67df0cb0aa0f7c6698f019"></a> static <a class="el" href="classv8_1_1Local.html">Local</a>&lt; <a class="el" href="classv8_1_1Value.html">Value</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>Error</b> (<a class="el" href="classv8_1_1Local.html">Local</a>&lt; <a class="el" href="classv8_1_1String.html">String</a> &gt; message)</td></tr> <tr class="separator:a77c6ab659f67df0cb0aa0f7c6698f019"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a8d575a721cf0fd5b325afb8b586c0d1e"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classv8_1_1Local.html">Local</a>&lt; <a class="el" href="classv8_1_1Message.html">Message</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Exception.html#a8d575a721cf0fd5b325afb8b586c0d1e">CreateMessage</a> (<a class="el" href="classv8_1_1Isolate.html">Isolate</a> *isolate, <a class="el" href="classv8_1_1Local.html">Local</a>&lt; <a class="el" href="classv8_1_1Value.html">Value</a> &gt; exception)</td></tr> <tr class="separator:a8d575a721cf0fd5b325afb8b586c0d1e"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a81d1fd3c8d729e9a8d830bc2830bfe77"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classv8_1_1Local.html">Local</a>&lt; <a class="el" href="classv8_1_1StackTrace.html">StackTrace</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Exception.html#a81d1fd3c8d729e9a8d830bc2830bfe77">GetStackTrace</a> (<a class="el" href="classv8_1_1Local.html">Local</a>&lt; <a class="el" href="classv8_1_1Value.html">Value</a> &gt; exception)</td></tr> <tr class="separator:a81d1fd3c8d729e9a8d830bc2830bfe77"><td class="memSeparator" colspan="2">&#160;</td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <div class="textblock"><p>Create new error objects by calling the corresponding error object constructor with the message. </p> </div><h2 class="groupheader">Member Function Documentation</h2> <a class="anchor" id="a8d575a721cf0fd5b325afb8b586c0d1e"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">static <a class="el" href="classv8_1_1Local.html">Local</a>&lt;<a class="el" href="classv8_1_1Message.html">Message</a>&gt; v8::Exception::CreateMessage </td> <td>(</td> <td class="paramtype"><a class="el" href="classv8_1_1Isolate.html">Isolate</a> *&#160;</td> <td class="paramname"><em>isolate</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classv8_1_1Local.html">Local</a>&lt; <a class="el" href="classv8_1_1Value.html">Value</a> &gt;&#160;</td> <td class="paramname"><em>exception</em>&#160;</td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">static</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Creates an error message for the given exception. Will try to reconstruct the original stack trace from the exception value, or capture the current stack trace if not available. </p> </div> </div> <a class="anchor" id="a81d1fd3c8d729e9a8d830bc2830bfe77"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">static <a class="el" href="classv8_1_1Local.html">Local</a>&lt;<a class="el" href="classv8_1_1StackTrace.html">StackTrace</a>&gt; v8::Exception::GetStackTrace </td> <td>(</td> <td class="paramtype"><a class="el" href="classv8_1_1Local.html">Local</a>&lt; <a class="el" href="classv8_1_1Value.html">Value</a> &gt;&#160;</td> <td class="paramname"><em>exception</em></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">static</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Returns the original stack trace that was captured at the creation time of a given exception, or an empty handle if not available. </p> </div> </div> <hr/>The documentation for this class was generated from the following file:<ul> <li>deps/v8/include/<a class="el" href="v8_8h_source.html">v8.h</a></li> </ul> </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated by &#160;<a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.11 </small></address> </body> </html>
{ "content_hash": "83b267854e9a59d44a3763600510c83f", "timestamp": "", "source": "github", "line_count": 204, "max_line_length": 584, "avg_line_length": 62.92156862745098, "alnum_prop": 0.6704580866313493, "repo_name": "v8-dox/v8-dox.github.io", "id": "4935e89299a4c71791a6186745652eb45884199c", "size": "12836", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "d22346d/html/classv8_1_1Exception.html", "mode": "33188", "license": "mit", "language": [], "symlink_target": "" }
package org.apache.cassandra; import java.io.File; import java.io.IOException; import org.junit.BeforeClass; import org.apache.cassandra.config.DatabaseDescriptor; import org.apache.cassandra.io.util.FileUtils; import org.apache.log4j.Logger; public class CleanupHelper { private static Logger logger = Logger.getLogger(CleanupHelper.class); @BeforeClass public static void cleanupAndLeaveDirs() throws IOException { mkdirs(); cleanup(); mkdirs(); } public static void cleanup() throws IOException { // clean up commitlog String[] directoryNames = { DatabaseDescriptor.getLogFileLocation(), }; for (String dirName : directoryNames) { File dir = new File(dirName); if (!dir.exists()) { throw new RuntimeException("No such directory: " + dir.getAbsolutePath()); } for (File f : dir.listFiles()) { FileUtils.deleteWithConfirm(f); } FileUtils.deleteWithConfirm(dir); } // clean up data directory which are stored as data directory/table/data files for (String dirName : DatabaseDescriptor.getAllDataFileLocations()) { File dir = new File(dirName); if (!dir.exists()) { throw new RuntimeException("No such directory: " + dir.getAbsolutePath()); } for (File tableFile : dir.listFiles()) { // table directory if (tableFile.isDirectory()) { for (File dataFile : tableFile.listFiles()) { FileUtils.deleteWithConfirm(dataFile); } } FileUtils.deleteWithConfirm(tableFile); } FileUtils.deleteWithConfirm(dir); } } public static void mkdirs() { try { DatabaseDescriptor.createAllDirectories(); } catch (IOException e) { throw new RuntimeException(e); } } }
{ "content_hash": "1be6ef34193c71274b2d3254c2665ce1", "timestamp": "", "source": "github", "line_count": 81, "max_line_length": 90, "avg_line_length": 27.08641975308642, "alnum_prop": 0.5387420237010028, "repo_name": "ucare-uchicago/cass-fate-system", "id": "df835de223b5e1b093647c92630aaca506a33ad8", "size": "2985", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "test/unit/org/apache/cassandra/CleanupHelper.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "AspectJ", "bytes": "90833" }, { "name": "Batchfile", "bytes": "10766" }, { "name": "CSS", "bytes": "6740" }, { "name": "GAP", "bytes": "4837" }, { "name": "HTML", "bytes": "6052054" }, { "name": "Java", "bytes": "2869774" }, { "name": "Makefile", "bytes": "262" }, { "name": "PigLatin", "bytes": "333" }, { "name": "Python", "bytes": "316071" }, { "name": "Shell", "bytes": "51520" }, { "name": "Thrift", "bytes": "21513" } ], "symlink_target": "" }
#pragma once #include <folly/io/async/DelayedDestruction.h> #include <folly/io/async/EventHandler.h> #include <folly/io/async/EventBase.h> #include <folly/io/async/NotificationQueue.h> #include <folly/io/async/AsyncTimeout.h> #include <folly/io/ShutdownSocketSet.h> #include <folly/SocketAddress.h> #include <memory> #include <exception> #include <vector> #include <limits.h> #include <stddef.h> #include <sys/socket.h> namespace folly { /** * A listening socket that asynchronously informs a callback whenever a new * connection has been accepted. * * Unlike most async interfaces that always invoke their callback in the same * EventBase thread, AsyncServerSocket is unusual in that it can distribute * the callbacks across multiple EventBase threads. * * This supports a common use case for network servers to distribute incoming * connections across a number of EventBase threads. (Servers typically run * with one EventBase thread per CPU.) * * Despite being able to invoke callbacks in multiple EventBase threads, * AsyncServerSocket still has one "primary" EventBase. Operations that * modify the AsyncServerSocket state may only be performed from the primary * EventBase thread. */ class AsyncServerSocket : public DelayedDestruction { public: typedef std::unique_ptr<AsyncServerSocket, Destructor> UniquePtr; class AcceptCallback { public: virtual ~AcceptCallback() {} /** * connectionAccepted() is called whenever a new client connection is * received. * * The AcceptCallback will remain installed after connectionAccepted() * returns. * * @param fd The newly accepted client socket. The AcceptCallback * assumes ownership of this socket, and is responsible * for closing it when done. The newly accepted file * descriptor will have already been put into * non-blocking mode. * @param clientAddr A reference to a TSocketAddress struct containing the * client's address. This struct is only guaranteed to * remain valid until connectionAccepted() returns. */ virtual void connectionAccepted(int fd, const SocketAddress& clientAddr) noexcept = 0; /** * acceptError() is called if an error occurs while accepting. * * The AcceptCallback will remain installed even after an accept error, * as the errors are typically somewhat transient, such as being out of * file descriptors. The server socket must be explicitly stopped if you * wish to stop accepting after an error. * * @param ex An exception representing the error. */ virtual void acceptError(const std::exception& ex) noexcept = 0; /** * acceptStarted() will be called in the callback's EventBase thread * after this callback has been added to the AsyncServerSocket. * * acceptStarted() will be called before any calls to connectionAccepted() * or acceptError() are made on this callback. * * acceptStarted() makes it easier for callbacks to perform initialization * inside the callback thread. (The call to addAcceptCallback() must * always be made from the AsyncServerSocket's primary EventBase thread. * acceptStarted() provides a hook that will always be invoked in the * callback's thread.) * * Note that the call to acceptStarted() is made once the callback is * added, regardless of whether or not the AsyncServerSocket is actually * accepting at the moment. acceptStarted() will be called even if the * AsyncServerSocket is paused when the callback is added (including if * the initial call to startAccepting() on the AsyncServerSocket has not * been made yet). */ virtual void acceptStarted() noexcept {} /** * acceptStopped() will be called when this AcceptCallback is removed from * the AsyncServerSocket, or when the AsyncServerSocket is destroyed, * whichever occurs first. * * No more calls to connectionAccepted() or acceptError() will be made * after acceptStopped() is invoked. */ virtual void acceptStopped() noexcept {} }; static const uint32_t kDefaultMaxAcceptAtOnce = 30; static const uint32_t kDefaultCallbackAcceptAtOnce = 5; static const uint32_t kDefaultMaxMessagesInQueue = 0; /** * Create a new AsyncServerSocket with the specified EventBase. * * @param eventBase The EventBase to use for driving the asynchronous I/O. * If this parameter is nullptr, attachEventBase() must be * called before this socket can begin accepting * connections. */ explicit AsyncServerSocket(EventBase* eventBase = nullptr); /** * Helper function to create a shared_ptr<AsyncServerSocket>. * * This passes in the correct destructor object, since AsyncServerSocket's * destructor is protected and cannot be invoked directly. */ static std::shared_ptr<AsyncServerSocket> newSocket(EventBase* evb = nullptr) { return std::shared_ptr<AsyncServerSocket>(new AsyncServerSocket(evb), Destructor()); } void setShutdownSocketSet(ShutdownSocketSet* newSS); /** * Destroy the socket. * * AsyncServerSocket::destroy() must be called to destroy the socket. * The normal destructor is private, and should not be invoked directly. * This prevents callers from deleting a AsyncServerSocket while it is * invoking a callback. * * destroy() must be invoked from the socket's primary EventBase thread. * * If there are AcceptCallbacks still installed when destroy() is called, * acceptStopped() will be called on these callbacks to notify them that * accepting has stopped. Accept callbacks being driven by other EventBase * threads may continue to receive new accept callbacks for a brief period of * time after destroy() returns. They will not receive any more callback * invocations once acceptStopped() is invoked. */ virtual void destroy(); /** * Attach this AsyncServerSocket to its primary EventBase. * * This may only be called if the AsyncServerSocket is not already attached * to a EventBase. The AsyncServerSocket must be attached to a EventBase * before it can begin accepting connections. */ void attachEventBase(EventBase *eventBase); /** * Detach the AsyncServerSocket from its primary EventBase. * * detachEventBase() may only be called if the AsyncServerSocket is not * currently accepting connections. */ void detachEventBase(); /** * Get the EventBase used by this socket. */ EventBase* getEventBase() const { return eventBase_; } /** * Create a AsyncServerSocket from an existing socket file descriptor. * * useExistingSocket() will cause the AsyncServerSocket to take ownership of * the specified file descriptor, and use it to listen for new connections. * The AsyncServerSocket will close the file descriptor when it is * destroyed. * * useExistingSocket() must be called before bind() or listen(). * * The supplied file descriptor will automatically be put into non-blocking * mode. The caller may have already directly called bind() and possibly * listen on the file descriptor. If so the caller should skip calling the * corresponding AsyncServerSocket::bind() and listen() methods. * * On error a TTransportException will be thrown and the caller will retain * ownership of the file descriptor. */ void useExistingSocket(int fd); void useExistingSockets(const std::vector<int>& fds); /** * Return the underlying file descriptor */ std::vector<int> getSockets() const { std::vector<int> sockets; for (auto& handler : sockets_) { sockets.push_back(handler.socket_); } return sockets; } /** * Backwards compatible getSocket, warns if > 1 socket */ int getSocket() const { if (sockets_.size() > 1) { VLOG(2) << "Warning: getSocket can return multiple fds, " << "but getSockets was not called, so only returning the first"; } if (sockets_.size() == 0) { return -1; } else { return sockets_[0].socket_; } } /** * Bind to the specified address. * * This must be called from the primary EventBase thread. * * Throws TTransportException on error. */ virtual void bind(const SocketAddress& address); /** * Bind to the specified port. * * This must be called from the primary EventBase thread. * * Throws TTransportException on error. */ virtual void bind(uint16_t port); /** * Get the local address to which the socket is bound. * * Throws TTransportException on error. */ void getAddress(SocketAddress* addressReturn) const; /** * Get all the local addresses to which the socket is bound. * * Throws TTransportException on error. */ std::vector<SocketAddress> getAddresses() const; /** * Begin listening for connections. * * This calls ::listen() with the specified backlog. * * Once listen() is invoked the socket will actually be open so that remote * clients may establish connections. (Clients that attempt to connect * before listen() is called will receive a connection refused error.) * * At least one callback must be set and startAccepting() must be called to * actually begin notifying the accept callbacks of newly accepted * connections. The backlog parameter controls how many connections the * kernel will accept and buffer internally while the accept callbacks are * paused (or if accepting is enabled but the callbacks cannot keep up). * * bind() must be called before calling listen(). * listen() must be called from the primary EventBase thread. * * Throws TTransportException on error. */ virtual void listen(int backlog); /** * Add an AcceptCallback. * * When a new socket is accepted, one of the AcceptCallbacks will be invoked * with the new socket. The AcceptCallbacks are invoked in a round-robin * fashion. This allows the accepted sockets to distributed among a pool of * threads, each running its own EventBase object. This is a common model, * since most asynchronous-style servers typically run one EventBase thread * per CPU. * * The EventBase object associated with each AcceptCallback must be running * its loop. If the EventBase loop is not running, sockets will still be * scheduled for the callback, but the callback cannot actually get invoked * until the loop runs. * * This method must be invoked from the AsyncServerSocket's primary * EventBase thread. * * Note that startAccepting() must be called on the AsyncServerSocket to * cause it to actually start accepting sockets once callbacks have been * installed. * * @param callback The callback to invoke. * @param eventBase The EventBase to use to invoke the callback. This * parameter may be nullptr, in which case the callback will be invoked in * the AsyncServerSocket's primary EventBase. * @param maxAtOnce The maximum number of connections to accept in this * callback on a single iteration of the event base loop. * This only takes effect when eventBase is non-nullptr. * When using a nullptr eventBase for the callback, the * setMaxAcceptAtOnce() method controls how many * connections the main event base will accept at once. */ virtual void addAcceptCallback( AcceptCallback *callback, EventBase *eventBase, uint32_t maxAtOnce = kDefaultCallbackAcceptAtOnce); /** * Remove an AcceptCallback. * * This allows a single AcceptCallback to be removed from the round-robin * pool. * * This method must be invoked from the AsyncServerSocket's primary * EventBase thread. Use EventBase::runInEventBaseThread() to schedule the * operation in the correct EventBase if your code is not in the server * socket's primary EventBase. * * Given that the accept callback is being driven by a different EventBase, * the AcceptCallback may continue to be invoked for a short period of time * after removeAcceptCallback() returns in this thread. Once the other * EventBase thread receives the notification to stop, it will call * acceptStopped() on the callback to inform it that it is fully stopped and * will not receive any new sockets. * * If the last accept callback is removed while the socket is accepting, * the socket will implicitly pause accepting. If a callback is later added, * it will resume accepting immediately, without requiring startAccepting() * to be invoked. * * @param callback The callback to uninstall. * @param eventBase The EventBase associated with this callback. This must * be the same EventBase that was used when the callback was installed * with addAcceptCallback(). */ void removeAcceptCallback(AcceptCallback *callback, EventBase *eventBase); /** * Begin accepting connctions on this socket. * * bind() and listen() must be called before calling startAccepting(). * * When a AsyncServerSocket is initially created, it will not begin * accepting connections until at least one callback has been added and * startAccepting() has been called. startAccepting() can also be used to * resume accepting connections after a call to pauseAccepting(). * * If startAccepting() is called when there are no accept callbacks * installed, the socket will not actually begin accepting until an accept * callback is added. * * This method may only be called from the primary EventBase thread. */ virtual void startAccepting(); /** * Pause accepting connections. * * startAccepting() may be called to resume accepting. * * This method may only be called from the primary EventBase thread. * If there are AcceptCallbacks being driven by other EventBase threads they * may continue to receive callbacks for a short period of time after * pauseAccepting() returns. * * Unlike removeAcceptCallback() or destroy(), acceptStopped() will not be * called on the AcceptCallback objects simply due to a temporary pause. If * the server socket is later destroyed while paused, acceptStopped() will be * called all of the installed AcceptCallbacks. */ void pauseAccepting(); /** * Shutdown the listen socket and notify all callbacks that accept has * stopped, but don't close the socket. This invokes shutdown(2) with the * supplied argument. Passing -1 will close the socket now. Otherwise, the * close will be delayed until this object is destroyed. * * Only use this if you have reason to pass special flags to shutdown. * Otherwise just destroy the socket. * * This method has no effect when a ShutdownSocketSet option is used. * * Returns the result of shutdown on sockets_[n-1] */ int stopAccepting(int shutdownFlags = -1); /** * Get the maximum number of connections that will be accepted each time * around the event loop. */ uint32_t getMaxAcceptAtOnce() const { return maxAcceptAtOnce_; } /** * Set the maximum number of connections that will be accepted each time * around the event loop. * * This provides a very coarse-grained way of controlling how fast the * AsyncServerSocket will accept connections. If you find that when your * server is overloaded AsyncServerSocket accepts connections more quickly * than your code can process them, you can try lowering this number so that * fewer connections will be accepted each event loop iteration. * * For more explicit control over the accept rate, you can also use * pauseAccepting() to temporarily pause accepting when your server is * overloaded, and then use startAccepting() later to resume accepting. */ void setMaxAcceptAtOnce(uint32_t numConns) { maxAcceptAtOnce_ = numConns; } /** * Get the maximum number of unprocessed messages which a NotificationQueue * can hold. */ uint32_t getMaxNumMessagesInQueue() const { return maxNumMsgsInQueue_; } /** * Set the maximum number of unprocessed messages in NotificationQueue. * No new message will be sent to that NotificationQueue if there are more * than such number of unprocessed messages in that queue. * * Only works if called before addAcceptCallback. */ void setMaxNumMessagesInQueue(uint32_t num) { maxNumMsgsInQueue_ = num; } /** * Get the speed of adjusting connection accept rate. */ double getAcceptRateAdjustSpeed() const { return acceptRateAdjustSpeed_; } /** * Set the speed of adjusting connection accept rate. */ void setAcceptRateAdjustSpeed(double speed) { acceptRateAdjustSpeed_ = speed; } /** * Get the number of connections dropped by the AsyncServerSocket */ uint64_t getNumDroppedConnections() const { return numDroppedConnections_; } /** * Set whether or not SO_KEEPALIVE should be enabled on the server socket * (and thus on all subsequently-accepted connections). By default, keepalive * is enabled. * * Note that TCP keepalive usually only kicks in after the connection has * been idle for several hours. Applications should almost always have their * own, shorter idle timeout. */ void setKeepAliveEnabled(bool enabled) { keepAliveEnabled_ = enabled; for (auto& handler : sockets_) { if (handler.socket_ < 0) { continue; } int val = (enabled) ? 1 : 0; if (setsockopt(handler.socket_, SOL_SOCKET, SO_KEEPALIVE, &val, sizeof(val)) != 0) { LOG(ERROR) << "failed to set SO_KEEPALIVE on async server socket: %s" << strerror(errno); } } } /** * Get whether or not SO_KEEPALIVE is enabled on the server socket. */ bool getKeepAliveEnabled() const { return keepAliveEnabled_; } /** * Set whether or not the socket should close during exec() (FD_CLOEXEC). By * default, this is enabled */ void setCloseOnExec(bool closeOnExec) { closeOnExec_ = closeOnExec; } /** * Get whether or not FD_CLOEXEC is enabled on the server socket. */ bool getCloseOnExec() const { return closeOnExec_; } protected: /** * Protected destructor. * * Invoke destroy() instead to destroy the AsyncServerSocket. */ virtual ~AsyncServerSocket(); private: enum class MessageType { MSG_NEW_CONN = 0, MSG_ERROR = 1 }; struct QueueMessage { MessageType type; int fd; int err; SocketAddress address; std::string msg; }; /** * A class to receive notifications to invoke AcceptCallback objects * in other EventBase threads. * * A RemoteAcceptor object is created for each AcceptCallback that * is installed in a separate EventBase thread. The RemoteAcceptor * receives notification of new sockets via a NotificationQueue, * and then invokes the AcceptCallback. */ class RemoteAcceptor : private NotificationQueue<QueueMessage>::Consumer { public: explicit RemoteAcceptor(AcceptCallback *callback) : callback_(callback) {} ~RemoteAcceptor() {} void start(EventBase *eventBase, uint32_t maxAtOnce, uint32_t maxInQueue); void stop(EventBase* eventBase, AcceptCallback* callback); virtual void messageAvailable(QueueMessage&& message); NotificationQueue<QueueMessage>* getQueue() { return &queue_; } private: AcceptCallback *callback_; NotificationQueue<QueueMessage> queue_; }; /** * A struct to keep track of the callbacks associated with this server * socket. */ struct CallbackInfo { CallbackInfo(AcceptCallback *cb, EventBase *evb) : callback(cb), eventBase(evb), consumer(nullptr) {} AcceptCallback *callback; EventBase *eventBase; RemoteAcceptor* consumer; }; class BackoffTimeout; virtual void handlerReady( uint16_t events, int socket, sa_family_t family) noexcept; int createSocket(int family); void setupSocket(int fd); void dispatchSocket(int socket, SocketAddress&& address); void dispatchError(const char *msg, int errnoValue); void enterBackoff(); void backoffTimeoutExpired(); CallbackInfo* nextCallback() { CallbackInfo* info = &callbacks_[callbackIndex_]; ++callbackIndex_; if (callbackIndex_ >= callbacks_.size()) { callbackIndex_ = 0; } return info; } struct ServerEventHandler : public EventHandler { ServerEventHandler(EventBase* eventBase, int socket, AsyncServerSocket* parent, sa_family_t addressFamily) : EventHandler(eventBase, socket) , eventBase_(eventBase) , socket_(socket) , parent_(parent) , addressFamily_(addressFamily) {} ServerEventHandler(const ServerEventHandler& other) : EventHandler(other.eventBase_, other.socket_) , eventBase_(other.eventBase_) , socket_(other.socket_) , parent_(other.parent_) , addressFamily_(other.addressFamily_) {} ServerEventHandler& operator=( const ServerEventHandler& other) { if (this != &other) { eventBase_ = other.eventBase_; socket_ = other.socket_; parent_ = other.parent_; addressFamily_ = other.addressFamily_; detachEventBase(); attachEventBase(other.eventBase_); changeHandlerFD(other.socket_); } return *this; } // Inherited from EventHandler virtual void handlerReady(uint16_t events) noexcept { parent_->handlerReady(events, socket_, addressFamily_); } EventBase* eventBase_; int socket_; AsyncServerSocket* parent_; sa_family_t addressFamily_; }; EventBase *eventBase_; std::vector<ServerEventHandler> sockets_; std::vector<int> pendingCloseSockets_; bool accepting_; uint32_t maxAcceptAtOnce_; uint32_t maxNumMsgsInQueue_; double acceptRateAdjustSpeed_; //0 to disable auto adjust double acceptRate_; std::chrono::time_point<std::chrono::steady_clock> lastAccepTimestamp_; uint64_t numDroppedConnections_; uint32_t callbackIndex_; BackoffTimeout *backoffTimeout_; std::vector<CallbackInfo> callbacks_; bool keepAliveEnabled_; bool closeOnExec_; ShutdownSocketSet* shutdownSocketSet_; }; } // folly
{ "content_hash": "27e9a772163a79b489501e8dc183a0f9", "timestamp": "", "source": "github", "line_count": 668, "max_line_length": 80, "avg_line_length": 34.09730538922156, "alnum_prop": 0.6903455239935022, "repo_name": "xliux/chess", "id": "449b5a4a483484fdd83b5c3bd472df8db4b84395", "size": "23372", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "folly/io/async/AsyncServerSocket.h", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C", "bytes": "22425" }, { "name": "C++", "bytes": "4041302" }, { "name": "CSS", "bytes": "165" }, { "name": "Makefile", "bytes": "158941" }, { "name": "Objective-C", "bytes": "661" }, { "name": "Perl", "bytes": "8251" }, { "name": "Python", "bytes": "14873" }, { "name": "Ruby", "bytes": "12616" }, { "name": "Shell", "bytes": "767439" }, { "name": "VimL", "bytes": "4727" } ], "symlink_target": "" }
// Provides the Design Time Metadata for the sap.ui.layout.BlockLayout control sap.ui.define([], function () { "use strict"; return { palette: { group: "LAYOUT", icons: { svg: "sap/ui/layout/designtime/BlockLayout.icon.svg" } }, aggregations: { content: { domRef: ":sap-domref", actions: { move: "moveControls" } } } }; }, /* bExport= */ false);
{ "content_hash": "a90241d273b429381cec128fd68f0ecd", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 78, "avg_line_length": 16.6, "alnum_prop": 0.5590361445783133, "repo_name": "nzamani/openui5", "id": "9fa67fbd5ea037226fa208e663cfc4777a5978fd", "size": "438", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "src/sap.ui.layout/src/sap/ui/layout/designtime/BlockLayout.designtime.js", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "2853775" }, { "name": "Gherkin", "bytes": "17351" }, { "name": "HTML", "bytes": "17332110" }, { "name": "Java", "bytes": "83480" }, { "name": "JavaScript", "bytes": "44924427" } ], "symlink_target": "" }
使用自定义指示符。 ## en-US Use custom loading indicator.
{ "content_hash": "ae08bfd71cc8e45555bf0c1785272b56", "timestamp": "", "source": "github", "line_count": 5, "max_line_length": 29, "avg_line_length": 10.2, "alnum_prop": 0.7254901960784313, "repo_name": "ant-design/ant-design", "id": "d8e15dbb2444f0567e694df8122870e633f86948", "size": "79", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "components/spin/demo/custom-indicator.md", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "3713" }, { "name": "HTML", "bytes": "1142" }, { "name": "JavaScript", "bytes": "100866" }, { "name": "Shell", "bytes": "1234" }, { "name": "TypeScript", "bytes": "4173852" } ], "symlink_target": "" }
package ctxutil import ( "context" "testing" ) func TestDebug(t *testing.T) { ctx := context.Background() if IsDebug(ctx) { t.Errorf("Vanilla ctx should not be debug") } if !IsDebug(WithDebug(ctx, true)) { t.Errorf("Should have debug flag") } if IsDebug(WithDebug(ctx, false)) { t.Errorf("Should not have debug flag") } } func TestColor(t *testing.T) { ctx := context.Background() if !IsColor(ctx) { t.Errorf("Vanilla ctx should have color") } if !IsColor(WithColor(ctx, true)) { t.Errorf("Should have color flag") } if IsColor(WithColor(ctx, false)) { t.Errorf("Should not have color flag") } } func TestTerminal(t *testing.T) { ctx := context.Background() if !IsTerminal(ctx) { t.Errorf("Vanilla ctx should be terminal") } if !IsTerminal(WithTerminal(ctx, true)) { t.Errorf("Should have terminal flag") } if IsTerminal(WithTerminal(ctx, false)) { t.Errorf("Should not have terminal flag") } } func TestInteractive(t *testing.T) { ctx := context.Background() if !IsInteractive(ctx) { t.Errorf("Vanilla ctx should be interactive") } if !IsInteractive(WithInteractive(ctx, true)) { t.Errorf("Should have interactive flag") } if IsInteractive(WithInteractive(ctx, false)) { t.Errorf("Should not have interactive flag") } } func TestComposite(t *testing.T) { ctx := context.Background() ctx = WithDebug(ctx, true) ctx = WithColor(ctx, false) ctx = WithTerminal(ctx, false) ctx = WithInteractive(ctx, false) ctx = WithStdin(ctx, true) ctx = WithAskForMore(ctx, true) ctx = WithClipTimeout(ctx, 10) ctx = WithNoConfirm(ctx, true) ctx = WithNoPager(ctx, true) ctx = WithShowSafeContent(ctx, true) ctx = WithGitCommit(ctx, false) ctx = WithAlwaysYes(ctx, true) if !IsDebug(ctx) { t.Errorf("Debug should be true") } if IsColor(ctx) { t.Errorf("Color should be false") } if IsTerminal(ctx) { t.Errorf("Termiunal should be false") } if IsInteractive(ctx) { t.Errorf("IsInteractive should be false") } if !IsStdin(ctx) { t.Errorf("IsStdin should be true") } if !IsAskForMore(ctx) { t.Errorf("Ask for more should be true") } if GetClipTimeout(ctx) != 10 { t.Errorf("Clip timeout should be 10") } if !IsNoConfirm(ctx) { t.Errorf("NoConfirm should be true") } if !IsNoPager(ctx) { t.Errorf("NoPager should be true") } if !IsShowSafeContent(ctx) { t.Errorf("ShowSafeContexnt should be true") } if IsGitCommit(ctx) { t.Errorf("Git commit should be false") } if !IsAlwaysYes(ctx) { t.Errorf("Always yes should be true") } }
{ "content_hash": "8b0c90b619eb89dad0582ae148c9b737", "timestamp": "", "source": "github", "line_count": 115, "max_line_length": 48, "avg_line_length": 22.026086956521738, "alnum_prop": 0.6833793920252664, "repo_name": "metalmatze/gopass", "id": "b415292167a9dd711af2b358d7076bed87bead52", "size": "2533", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "utils/ctxutil/ctxutil_test.go", "mode": "33188", "license": "mit", "language": [ { "name": "Go", "bytes": "333278" }, { "name": "Makefile", "bytes": "2722" }, { "name": "Shell", "bytes": "5455" } ], "symlink_target": "" }
import socket, threading, random, multiprocessing, time def processClient(client, address): print('In', threading.currentThread().name, 'client descriptor', client, 'client address', address) client.send(b' Welcome to this server') while True: data = client.recv(1024) print('-> From', address, 'get data: ', data) if not data or data.decode('utf-8') == 'exit': client.send(b' Bye') break client.send(b' Hello %s' % (data)) client.close() def server(address, port): fd = socket.socket(socket.AF_INET, socket.SOCK_STREAM) if isinstance(address, str) and isinstance(port, int): fd.bind((address, port)) else: raise ValueError('params invalid') fd.listen(3) print('>>> socket listen in %s:%s' % (address, port)) for index in range(3): client, addr = fd.accept() print('>>> client connected', '%s/3' % (index)) t = threading.Thread(target = processClient, args = (client, addr), name = 'Client Worker') t.start() print('>>> service end. close socket') fd.close() def client(server): if len(server) != 2: raise ValueError('params invalid') print('Client start', threading.currentThread().name) serv = socket.socket(socket.AF_INET, socket.SOCK_STREAM) serv.connect(server) print(' > recv data: ', serv.recv(1024)) for index in range(random.randint(1, 3)): msg = '' for chi in range(5): msg += chr(random.randint(65, 94)) serv.send(msg.encode('utf-8')) print(' > recv data: ', serv.recv(1024)) serv.send(b'exit') print(' > recv data: ', serv.recv(1024)) serv.close() if __name__ == '__main__': serv = multiprocessing.Process(target = server, args = ('127.0.0.1', 9527)) serv.start() for index in range(3): t = threading.Thread(target = client, args = (('127.0.0.1', 9527),), name = 'User') t.start() t.join() serv.terminate()
{ "content_hash": "068021cb731d91a3d152bf600558a4bc", "timestamp": "", "source": "github", "line_count": 66, "max_line_length": 103, "avg_line_length": 31.666666666666668, "alnum_prop": 0.5645933014354066, "repo_name": "JShadowMan/package", "id": "b040536be1c9a4676a6f4fcc9ec16f200297572b", "size": "2114", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "python/socket_/cs.py", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "55729" }, { "name": "Makefile", "bytes": "721" }, { "name": "Python", "bytes": "42" }, { "name": "Shell", "bytes": "3398" } ], "symlink_target": "" }
class AddCharacteristicsColumns < ActiveRecord::Migration def self.up add_column 'characteristics', :parent_id, :integer, :null => true add_column 'characteristics', :root_id, :integer, :null => true add_column 'characteristics', :function_key, :string, :null => true, :limit => 100 add_column 'characteristics', :factor_value, :decimal, :null => true, :precision => 30, :scale => 20 add_column 'characteristics', :factor_unit, :string, :null => true, :limit => 100 add_column 'characteristics', :offset_value, :decimal, :null => true, :precision => 30, :scale => 20 add_column 'characteristics', :offset_unit, :string, :null => true, :limit => 100 add_column 'characteristics', :created_at, :datetime, :null => true add_column 'characteristics', :updated_at, :datetime, :null => true end end
{ "content_hash": "f4e2a1b4b0f9bcbc0e7fee2ce5e1a9a3", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 115, "avg_line_length": 58, "alnum_prop": 0.6045258620689655, "repo_name": "MediaYouCanFeel/Azzenda", "id": "291f94006457dca303f3708922a919b2c869418b", "size": "1835", "binary": false, "copies": "18", "ref": "refs/heads/master", "path": "sonarqube-5.2/web/WEB-INF/db/migrate/461_add_characteristics_columns.rb", "mode": "33188", "license": "mit", "language": [ { "name": "ApacheConf", "bytes": "1250" }, { "name": "Batchfile", "bytes": "15871" }, { "name": "CSS", "bytes": "427637" }, { "name": "Groff", "bytes": "11395" }, { "name": "HTML", "bytes": "661947" }, { "name": "JavaScript", "bytes": "1886835" }, { "name": "Ruby", "bytes": "3879993" }, { "name": "Shell", "bytes": "100093" } ], "symlink_target": "" }
package com.umeng.comm.ui.emoji; import android.content.Context; import android.text.SpannableStringBuilder; import android.text.TextUtils; import android.util.AttributeSet; import android.widget.TextView; /** * @author Hieu Rocker ([email protected]). */ public class EmojiTextView extends TextView { private int mEmojiconSize; private int mEmojiconTextSize; private int mTextStart = 0; private int mTextLength = -1; public EmojiTextView(Context context) { super(context); init(null); } public EmojiTextView(Context context, AttributeSet attrs) { super(context, attrs); init(attrs); } public EmojiTextView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); init(attrs); } private void init(AttributeSet attrs) { mEmojiconTextSize = (int) getTextSize(); mEmojiconSize = 70; mTextStart = 0; mTextLength = -1; mEmojiconTextSize = (int) Math.max(getTextSize(), mEmojiconSize); } @Override public void setText(CharSequence text, BufferType type) { if (!TextUtils.isEmpty(text)) { SpannableStringBuilder builder = new SpannableStringBuilder(text); EmojiHandler.addEmojis(getContext(), builder, mEmojiconSize, mEmojiconTextSize, mTextStart, mTextLength); text = builder; } super.setText(text, type); } /** * Set the size of emojicon in pixels. */ public void setEmojiconSize(int pixels) { mEmojiconSize = pixels; super.setText(getText()); } }
{ "content_hash": "f3c51760b7bbd0d8c98004c352420836", "timestamp": "", "source": "github", "line_count": 62, "max_line_length": 91, "avg_line_length": 26.677419354838708, "alnum_prop": 0.6475211608222491, "repo_name": "pengwei1024/AndroidGank", "id": "f9e20d217ec7bec19a38cf8871f17e73f764f752", "size": "2247", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "umeng_libs/src/main/java/com/umeng/comm/ui/emoji/EmojiTextView.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "HTML", "bytes": "948" }, { "name": "Java", "bytes": "1462685" } ], "symlink_target": "" }
<div ng-controller="AuthenticationController"> <h3 class="col-md-12 text-center">Cadastre-se</h3> <div class="col-xs-offset-2 col-xs-8 col-md-offset-4 col-md-4"> <form name="userForm" ng-submit="signup(userForm.$valid)" class="signin" novalidate autocomplete="off"> <fieldset> <div class="form-group" show-errors> <label for="firstName">Nome</label> <input type="text" id="firstName" name="firstName" class="form-control" ng-model="credentials.firstName" placeholder="Nome" required> <div ng-messages="userForm.firstName.$error" role="alert"> <p class="help-block error-text" ng-message="required">Nome é um campo obrigatório.</p> </div> </div> <div class="form-group" show-errors> <label for="lastName">Sobrenome</label> <input type="text" id="lastName" name="lastName" class="form-control" ng-model="credentials.lastName" placeholder="Sobrenome" required> <div ng-messages="userForm.lastName.$error" role="alert"> <p class="help-block error-text" ng-message="required">Sobrenome é um campo obrigatório.</p> </div> </div> <div class="form-group" show-errors> <label for="email">E-mail</label> <input type="email" id="email" name="email" class="form-control" ng-model="credentials.email" placeholder="Email" lowercase required> <div ng-messages="userForm.email.$error" role="alert"> <p class="help-block error-text" ng-message="required">Email é obrigatório.</p> <p class="help-block error-text" ng-message="email">Email inválido.</p> </div> </div> <div class="form-group" show-errors> <label for="username">Usuário</label> <input type="text" id="username" name="username" class="form-control" ng-model="credentials.username" placeholder="Usuário" lowercase required> <div ng-messages="userForm.username.$error" role="alert"> <p class="help-block error-text" ng-message="required">Usuário é obrigatório.</p> </div> </div> <div class="form-group" show-errors> <label for="password">Senha</label> <input type="password" id="password" name="password" class="form-control" ng-model="credentials.password" placeholder="Senha" popover="{{popoverMsg}}" popover-trigger="focus" password-validator required> <div ng-messages="userForm.password.$error" role="alert"> <p class="help-block error-text" ng-message="required">Password é obrigatório.</p> <div ng-repeat="passwordError in passwordErrors"> <p class="help-block error-text" ng-show="userForm.password.$error.requirements">{{passwordError}}</p> </div> </div> </div> <div class="form-group" ng-show="!userForm.password.$error.required"> <label>Password Requirements</label> <progressbar value="requirementsProgress" type="{{requirementsColor}}"><span style="color:white; white-space:nowrap;">{{requirementsProgress}}%</span></progressbar> </div> <div class="text-center form-group"> <button type="submit" class="btn btn-primary">Cadastrar</button> &nbsp; ou&nbsp; <a ui-sref="authentication.signin" class="show-signup">Acessar</a> </div> <div ng-show="error" class="text-center text-danger"> <strong ng-bind="error"></strong> </div> </fieldset> </form> </div> </div>
{ "content_hash": "a6fd4cf152854641053ce513797d86ea", "timestamp": "", "source": "github", "line_count": 60, "max_line_length": 215, "avg_line_length": 59, "alnum_prop": 0.6271186440677966, "repo_name": "rodrigocprates/eucinefilo", "id": "65edf8ffa4ae124125a371873b0d6fcb0f329492", "size": "3554", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "modules/users/client/views/authentication/signup.client.view.html", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "1220" }, { "name": "HTML", "bytes": "41930" }, { "name": "JavaScript", "bytes": "292235" }, { "name": "Shell", "bytes": "685" } ], "symlink_target": "" }
var moose = require("../../../../lib"), mysql = moose.adapters.mysql, types = mysql.types; exports.up = function() { moose.alterTable("company", function(table) { table.rename("companyNew"); table.addUnique("companyName"); table.addColumn("employeeCount", types.INT()); table.addUnique(["companyName", "employeeCount"]); }); }; exports.down = function() { moose.alterTable("companyNew", function(table) { table.rename("company"); table.dropUnique("companyName"); table.dropUnique(["companyName", "employeeCount"]); table.dropColumn("employeeCount"); }); };
{ "content_hash": "e63969858e7a6539648e915cd1b64075", "timestamp": "", "source": "github", "line_count": 21, "max_line_length": 59, "avg_line_length": 31.142857142857142, "alnum_prop": 0.6039755351681957, "repo_name": "c0d3x42/moose", "id": "24697732dd3888bbc17ecbf6243edf2a509d00fb", "size": "654", "binary": false, "copies": "5", "ref": "refs/heads/master", "path": "test/data/migrations/migrations/alterTables.4.js", "mode": "33188", "license": "mit", "language": [], "symlink_target": "" }
using GameOfLife; using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace GameOfLifeWPF { /// <summary> /// Factory to create a <see cref="ToroidLifeBoard"/>. /// </summary> /// <seealso cref="GameOfLifeWPF.ILifeBoardFactory" /> internal class ToroidLifeBoardFactory : ILifeBoardFactory { #region Public Properties /// <summary> /// Gets or sets the height of the toroid. /// </summary> /// <value> /// The height. /// </value> public int Height { get; set; } = 10; /// <summary> /// Gets or sets the width of the toroid. /// </summary> /// <value> /// The width. /// </value> public int Width { get; set; } = 10; #endregion Public Properties #region Public Methods /// <summary> /// Creates a new instance of the <see cref="ToroidLifeBoard" /> class. /// </summary> /// <returns></returns> public LifeBoard Create() { return ToroidLifeBoard.Create(Width, Height); } #endregion Public Methods } }
{ "content_hash": "896a867ba9bf022b334d8c0336f31cfd", "timestamp": "", "source": "github", "line_count": 48, "max_line_length": 79, "avg_line_length": 24.666666666666668, "alnum_prop": 0.5464527027027027, "repo_name": "marcOcram/GameOfLife-CodeCompetition", "id": "018c65132d90e4bc5bef413301b0b189cb4b2f1f", "size": "1186", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "GameOfLife/GameOfLifeWPF/ToroidLifeBoardFactory.cs", "mode": "33188", "license": "mit", "language": [ { "name": "C#", "bytes": "147004" } ], "symlink_target": "" }
class ConsultationPublicFeedback < Response def singular_routing_symbol :public_feedback end def friendly_name "public feedback" end end
{ "content_hash": "dde0cbd5e3b72eada2d3b608ff1814f1", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 43, "avg_line_length": 17.11111111111111, "alnum_prop": 0.7467532467532467, "repo_name": "alphagov/whitehall", "id": "e96b6ac3def6c8c0c725c204277fe5b1bcdcbc79", "size": "154", "binary": false, "copies": "1", "ref": "refs/heads/main", "path": "app/models/consultation_public_feedback.rb", "mode": "33188", "license": "mit", "language": [ { "name": "Dockerfile", "bytes": "3039" }, { "name": "Gherkin", "bytes": "82444" }, { "name": "HTML", "bytes": "695467" }, { "name": "JavaScript", "bytes": "250602" }, { "name": "Procfile", "bytes": "117" }, { "name": "Ruby", "bytes": "5239261" }, { "name": "SCSS", "bytes": "180354" }, { "name": "Shell", "bytes": "3870" } ], "symlink_target": "" }
<?php /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ namespace AppBundle\Controller; /** * Description of LuckyController * * @author tankosic.branislav */ use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Symfony\Component\HttpFoundation\Response; use Symfony\Bundle\FrameworkBundle\Controller\Controller; class LuckyController extends Controller { //put your code here /** * @Route("/lucky/number", name="lucky_number") * */ public function numberAction() { $number = mt_rand(0, 100); // return new Response( // '<html><body><b>Lucky number: '.$number.'</b></body></html>' // ); return $this->render('lucky/number.html.twig', array( 'number' => $number, )); } }
{ "content_hash": "32b176037a060ca4e91c5c14b673d6fb", "timestamp": "", "source": "github", "line_count": 44, "max_line_length": 79, "avg_line_length": 22.522727272727273, "alnum_prop": 0.5983854692230071, "repo_name": "tankosb/uvtest", "id": "d4881a2fb2a3a8f87f5a27137e98f11032858b34", "size": "991", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/AppBundle/Controller/LuckyController.php", "mode": "33188", "license": "mit", "language": [ { "name": "ApacheConf", "bytes": "3605" }, { "name": "CSS", "bytes": "12480" }, { "name": "HTML", "bytes": "8783" }, { "name": "JavaScript", "bytes": "2129" }, { "name": "PHP", "bytes": "68950" } ], "symlink_target": "" }
package org.onosproject.vtnweb.web; import static com.google.common.base.Preconditions.checkNotNull; import static org.onlab.util.Tools.nullIsIllegal; import java.util.List; import org.onosproject.codec.CodecContext; import org.onosproject.codec.JsonCodec; import org.onosproject.core.CoreService; import org.onosproject.vtnrsc.DefaultPortPairGroup; import org.onosproject.vtnrsc.PortPairGroup; import org.onosproject.vtnrsc.PortPairGroupId; import org.onosproject.vtnrsc.PortPairId; import org.onosproject.vtnrsc.TenantId; import com.fasterxml.jackson.databind.node.ArrayNode; import com.fasterxml.jackson.databind.node.ObjectNode; import com.google.common.collect.Lists; /** * Port Pair Group JSON codec. */ public final class PortPairGroupCodec extends JsonCodec<PortPairGroup> { private static final String ID = "id"; private static final String TENANT_ID = "tenant_id"; private static final String NAME = "name"; private static final String DESCRIPTION = "description"; private static final String PORT_PAIRS = "port_pairs"; private static final String MISSING_MEMBER_MESSAGE = " member is required in PortPairGroup"; @Override public PortPairGroup decode(ObjectNode json, CodecContext context) { if (json == null || !json.isObject()) { return null; } PortPairGroup.Builder resultBuilder = new DefaultPortPairGroup.Builder(); CoreService coreService = context.getService(CoreService.class); String id = nullIsIllegal(json.get(ID), ID + MISSING_MEMBER_MESSAGE).asText(); resultBuilder.setId(PortPairGroupId.of(id)); String tenantId = nullIsIllegal(json.get(TENANT_ID), TENANT_ID + MISSING_MEMBER_MESSAGE).asText(); resultBuilder.setTenantId(TenantId.tenantId(tenantId)); String name = nullIsIllegal(json.get(NAME), NAME + MISSING_MEMBER_MESSAGE).asText(); resultBuilder.setName(name); String description = nullIsIllegal(json.get(DESCRIPTION), DESCRIPTION + MISSING_MEMBER_MESSAGE).asText(); resultBuilder.setDescription(description); List<PortPairId> list = Lists.newArrayList(); ArrayNode arrayNode = (ArrayNode) json.path(PORT_PAIRS); arrayNode.forEach(i -> list.add(PortPairId.of(i.asText()))); resultBuilder.setPortPairs(list); return resultBuilder.build(); } @Override public ObjectNode encode(PortPairGroup portPairGroup, CodecContext context) { checkNotNull(portPairGroup, "port pair group cannot be null"); ObjectNode result = context.mapper().createObjectNode() .put(ID, portPairGroup.portPairGroupId().toString()) .put(TENANT_ID, portPairGroup.tenantId().toString()) .put(NAME, portPairGroup.name()) .put(DESCRIPTION, portPairGroup.description()) .put(PORT_PAIRS, portPairGroup.portPairs().toString()); return result; } }
{ "content_hash": "001ca7b2bb4e7ee89292a55fe9a8a665", "timestamp": "", "source": "github", "line_count": 81, "max_line_length": 90, "avg_line_length": 38.53086419753087, "alnum_prop": 0.6760653636654919, "repo_name": "VinodKumarS-Huawei/ietf96yang", "id": "01f1dd92e7ccd218e6475615a74f28c381cad896", "size": "3738", "binary": false, "copies": "13", "ref": "refs/heads/master", "path": "apps/vtn/vtnweb/src/main/java/org/onosproject/vtnweb/web/PortPairGroupCodec.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "ANTLR", "bytes": "74069" }, { "name": "CSS", "bytes": "192215" }, { "name": "Groff", "bytes": "1090" }, { "name": "HTML", "bytes": "170763" }, { "name": "Java", "bytes": "26926510" }, { "name": "JavaScript", "bytes": "3066650" }, { "name": "Protocol Buffer", "bytes": "7499" }, { "name": "Python", "bytes": "121312" }, { "name": "Shell", "bytes": "913" } ], "symlink_target": "" }
FROM ubuntu MAINTAINER [email protected] VOLUME ["/var/cache/apt-cacher-ng"] RUN apt-get update && apt-get install -y apt-cacher-ng EXPOSE 3142 CMD chmod 777 /var/cache/apt-cacher-ng && /etc/init.d/apt-cacher-ng start && tail -f /var/log/apt-cacher-ng/*
{ "content_hash": "de8ecf6071dd910b28514f4f968776ae", "timestamp": "", "source": "github", "line_count": 8, "max_line_length": 113, "avg_line_length": 36, "alnum_prop": 0.6666666666666666, "repo_name": "cdd-aix/DockerExperiments", "id": "d946f5a5a95441533929ad7317c23f2116e6dbde", "size": "576", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "apt-cacher-ng/Dockerfile", "mode": "33188", "license": "bsd-3-clause", "language": [], "symlink_target": "" }
ACCEPTED #### According to International Plant Names Index #### Published in J. D. Hooker, Fl. Brit. India 2:637. 1879 #### Original name null ### Remarks null
{ "content_hash": "121cf864530037875750ee602263304b", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 41, "avg_line_length": 12.538461538461538, "alnum_prop": 0.6871165644171779, "repo_name": "mdoering/backbone", "id": "cbcef0d6094e7d54a279530eed86c7aaeac4c339", "size": "216", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "life/Plantae/Magnoliophyta/Magnoliopsida/Cucurbitales/Begoniaceae/Begonia/Begonia triradiata/README.md", "mode": "33188", "license": "apache-2.0", "language": [], "symlink_target": "" }
<?php /** * ALIPAY API: koubei.craftsman.data.work.create request * * @author auto create * @since 1.0, 2019-01-07 20:51:15 */ class KoubeiCraftsmanDataWorkCreateRequest { /** * 手艺人作品发布接口 **/ private $bizContent; private $apiParas = array(); private $terminalType; private $terminalInfo; private $prodCode; private $apiVersion="1.0"; private $notifyUrl; private $returnUrl; private $needEncrypt=false; public function setBizContent($bizContent) { $this->bizContent = $bizContent; $this->apiParas["biz_content"] = $bizContent; } public function getBizContent() { return $this->bizContent; } public function getApiMethodName() { return "koubei.craftsman.data.work.create"; } public function setNotifyUrl($notifyUrl) { $this->notifyUrl=$notifyUrl; } public function getNotifyUrl() { return $this->notifyUrl; } public function setReturnUrl($returnUrl) { $this->returnUrl=$returnUrl; } public function getReturnUrl() { return $this->returnUrl; } public function getApiParas() { return $this->apiParas; } public function getTerminalType() { return $this->terminalType; } public function setTerminalType($terminalType) { $this->terminalType = $terminalType; } public function getTerminalInfo() { return $this->terminalInfo; } public function setTerminalInfo($terminalInfo) { $this->terminalInfo = $terminalInfo; } public function getProdCode() { return $this->prodCode; } public function setProdCode($prodCode) { $this->prodCode = $prodCode; } public function setApiVersion($apiVersion) { $this->apiVersion=$apiVersion; } public function getApiVersion() { return $this->apiVersion; } public function setNeedEncrypt($needEncrypt) { $this->needEncrypt=$needEncrypt; } public function getNeedEncrypt() { return $this->needEncrypt; } }
{ "content_hash": "404947afa4f56c3792f06de6e532a70f", "timestamp": "", "source": "github", "line_count": 118, "max_line_length": 56, "avg_line_length": 15.983050847457626, "alnum_prop": 0.6940615058324496, "repo_name": "Bigotry/OneBase", "id": "a29e0cadbe1609d3a843383da41252e4fe8c7f03", "size": "1904", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "app/common/service/pay/driver/alipay/alipay-sdk-PHP-3.4.2/aop/request/KoubeiCraftsmanDataWorkCreateRequest.php", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "22" }, { "name": "CSS", "bytes": "328207" }, { "name": "HTML", "bytes": "261069" }, { "name": "Hack", "bytes": "1426" }, { "name": "JavaScript", "bytes": "375125" }, { "name": "PHP", "bytes": "4792230" }, { "name": "PLpgSQL", "bytes": "3923" }, { "name": "Shell", "bytes": "26" }, { "name": "Smarty", "bytes": "33004" } ], "symlink_target": "" }
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) require 'juman_knp'
{ "content_hash": "fc40802beb46de455209771327980e01", "timestamp": "", "source": "github", "line_count": 2, "max_line_length": 58, "avg_line_length": 39.5, "alnum_prop": 0.6455696202531646, "repo_name": "rilmayer/juman_knp", "id": "8dca30832e8776f36cf90d79abc4be58053fdb42", "size": "79", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "spec/spec_helper.rb", "mode": "33188", "license": "mit", "language": [ { "name": "Ruby", "bytes": "6370" } ], "symlink_target": "" }
<?php namespace Symfony\Component\Form; /* * This file is part of the Symfony framework. * * (c) Fabien Potencier <[email protected]> * * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ /** * Field for entering URLs * * @author Bernhard Schussek <[email protected]> */ class UrlField extends TextField { /** * {@inheritDoc} */ protected function configure() { $this->addOption('default_protocol', 'http'); parent::configure(); } /** * {@inheritDoc} */ protected function processData($data) { $protocol = $this->getOption('default_protocol'); if ($protocol && $data && !preg_match('~^\w+://~', $data)) { $data = $protocol . '://' . $data; } return $data; } }
{ "content_hash": "4c62dd66cdcd70e5d89841cc7c33d6d5", "timestamp": "", "source": "github", "line_count": 44, "max_line_length": 68, "avg_line_length": 20.227272727272727, "alnum_prop": 0.5831460674157304, "repo_name": "ShinichiU/mySymfony2study", "id": "057d91b41b20755945eb63ad9d3dfea682335532", "size": "890", "binary": false, "copies": "10", "ref": "refs/heads/master", "path": "src/vendor/symfony/src/Symfony/Component/Form/UrlField.php", "mode": "33188", "license": "mit", "language": [ { "name": "PHP", "bytes": "32853" }, { "name": "Shell", "bytes": "632" } ], "symlink_target": "" }
{% load static %} <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- Bootstrap --> <link rel="stylesheet" type="text/css" href="{{STATIC_URL}}css/bootstrap.min.css"/> <link rel="stylesheet" type="text/css" href="{{STATIC_URL}}css/bootstrap-responsive.min.css"/> <script type="text/javascript" src="{{STATIC_URL}}js/bootstrap.min.js"></script> </head> <body> <div class="navbar navbar-inverse navbar-fixed-top"> <div class="navbar-inner"> <div class="container"> <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <div class="nav-collapse collapse"> <ul class="nav pull-right"> {% if user.is_authenticated %} <li class="navbar-text">Welcome, {{ user.username }}!</li> <li><a href="/userprofile/">Go to User Profile</a></li> <li><a href="/logout/">Logout</a></li> <li><a href="/">Home</a></li> {% else %} <li><p> Looks like you are not authenticated</p> </li> <li> <a href="/login/">Login</a><br> </li> <li><a href="/register/">Register Here</a> </li> {% endif %} </ul> </div> </div> </div> </div> <div class="container-fluid"> <div class="row-fluid"> <div class="span3"> <div class="well sidebar-nav"> </div> </div> <div class="span9"> {% block body_block %} {% endblock %} </div> <!--/span--> </div> <!--/row--> </div> <!--/.fluid-container--> <hr> <!-- footer --> <footer> <div class="container"> <p>&copy; KenyaDataWorks</p> </div> </footer> <script src="{% static 'js/jquery-2.0.3.min.js' %}"></script> <script src="{% static 'js/bootstrap.min.js' %}"></script> </body> </html> <!-- <a href="/logout/">Logout</a><br /> -->
{ "content_hash": "53782313b94568afea0e658a09a7d074", "timestamp": "", "source": "github", "line_count": 75, "max_line_length": 111, "avg_line_length": 32.093333333333334, "alnum_prop": 0.4549231408392189, "repo_name": "omiltoro/softbrew", "id": "15f57bbc95641dad29b00c94b79294ba238a06f1", "size": "2407", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "templates/index.html", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Python", "bytes": "20523" } ], "symlink_target": "" }
+++ title = "Motorleistungsoptimierung - Basis Iveco Turbo Daily 4x4" linktitle = "Tuning" date = "2005-07-08" description = "Erfahrungen mit der Niemz'schen Optimierung/Tuning am Motor des Iveco Daily 4x4" keywords = "Iveco, Turbo Daily, 4x4, Allrad, Motor, Leistung, Optimierung, Tuning, Niemz" iveco = ["Homepage", "Fahrzeugtechnik"] weight = 13 +++ <!--INHALT Beginn--> Inhalt: * [Motorleistungsoptimierung (Tuning)](#leist) * [Probleme in der Praxis](#prob) * [Untersuchung und Ergebnisse](#unt) * [Schlußbemerkungen](#schluss) <a name="leist"></a> ## Motorleistungsoptimierung (Tuning) Der Beitrag bezieht sich auf die Leistungsoptimierung, die von der [Fa. Niemz](../iveco-womo/links.html) angeboten wird. Es handelt sich dabei um eine _<u>Darstellung meiner persönlichen Erfahrungen</u>_, die nicht unbedingt zu verallgemeinern sind, hier aber in der Hoffung wiedergegeben werden, andere in die Lage zu versetzen, sich durch vorbeugendes Handeln vor ähnlich unliebsamen Überraschungen zu bewahren. * Art der Modifizierung: Umbau der Einspritzpumpe * Ziel: Anhebung der Leistung auf ca. 130PS und Ausdehnung des nutzbaren Drehzahlbereichs nach unten (ab ca. 1500/min) * Zeitaufwand: unter 1h * Meßprotokolle: keine * Kostenpunkt: 600,- Euro (04/2004) * Erfahrungen: War vorher der sinnvoll nutzbare Drehzahlbereich begrenzt auf 2000-3000/min, so zieht das Fahrzeug nach der Modifikation schon ab ca. 1600/min, und zwar deutlich stärker als vorher bei 2000/min. Bei diesen niedrigen Drehzahlen machen sich dann lediglich allerhand rappelnde Handschuhfach- und ähnliche Klappen und Deckel bemerkbar, kann man sich aber dran gewöhnen. Nebeneffekt: man wird schaltfaul. * Verbrauch: nicht auffällig, tendenziell eher niedriger. Meine Ausgangssituation sieht folgendermaßen aus: * Motor: 8140.23.3811 * Kühler: TN. 9380 9324 * Propeller: 8 Flügel * kein Intercooler * Einspritzpumpe Bosch VE4/12F1800R657, Teilenummer 0460 424 124 * dazu: Einspritzdüsen Bosch SACLESS DSLA 134 P 604 bei 240bar <small>[>>> Seitenanfang](#oben)</small> <a name="prob"></a> ## Probleme in der Praxis Nach der Optimierung stellten sich alsbald folgende Probleme ein: 1. stark erhöhte Kühlwassertemperaturen 2. verstärkte Rußentwicklung 3. Kaltstartprobleme **zu 1.)** Ich möchte die Problematik anhand zweier typischer Beispiele beschreiben: * In Spanien hatte ich schon bei einer Außentemperatur von 19°C auf einer Strecke von 6km Länge und 5% Steigung bei Drehzahl von 2700/min konstant (knapp 80km/h) und **manuell dauernd eingeschaltetem Ventilator** eine von 85°C auf 100°C **steigende** Wassertemperatur beobachtet. * Auf der nördlichen Zufahrt zum Gotthard-Tunnel bei mäßigen Außentemperaturen (um 16°C) unter Vollast und bei ca. 2500/min (ca. 75...80km/h) und **permanent mitlaufendem** (via Handschalter) Kühlerventilator **Temperaturanstieg von 70°** (Ausfahrt Gotthard-Raststätte) über 80°C (beim Passieren der AS Erstfeld, Thermostatöffnungstemperatur) **auf 98°** (hatte früher selbst bei hohen Außentemperaturen in diesem Betriebszustand max. 90° konstant, tendenziell führte aber der Ventilator auch unter Last zu sinkenden Temperaturen). Das löste eine gewisse Besorgnis bzgl. Betrieb unter sommerlichen Bedingungen bzw. Betrieb in potentiell warmen Ländern (z. B. Marokko) unter Last und geringen Geschwindigkeiten aus. Während ich bereits auf meiner ersten Tour nach der Modifikation die Fa. Niemz [per e-mail](/docs/iveco-technik/niemz_kraftstoffverbrauch_temperatur.pdf) mehrfach auf die Probleme hingewiesen hatte und keinerlei Antwort erhielt, war nach meiner Rückkehr während der dann geführten Telefonate mit Herrn Niemz lediglich Abwiegeln und Desinteresse feststellbar, jedenfalls kein konstruktives Bemühen um eine Problemlösung. Inwieweit weitere Maßnahmen wie z. B.: * Umbau auf Kühler des Intercooler-Motors (122PS-Version) * Umbau auf 11-flügeligen Propeller die Probleme lindern bzw. beheben können, habe ich aus Kostengründen sowie der Tatsache, daß die ESP aus anderen Gründen sowieso ausgetauscht werden mußte, nicht mehr untersucht. **zu 2.)** Die Maschine rußt nach der "Optimierung" sichtbar viel stärker, besonders beim Anfahren oder Beschleunigen aus niedrigen Drehzahlen, da ist mir früher nie sowas aufgefallen. Mein Daily '96 hat bereits serienmäßig ein kurzes Auspuffrohr, das _unter_ der Kabine endet, trotzdem: je nach Windrichtung kommt rechts oder links eine Wolke unterm Auto raus - und da meine ich, wird's wohl schon problematisch... (Der eine oder andere Pkw-Fahrer hat auch schon freiwillig den Abstand vergrößert ). Niemz wiegelt ab: "Das haben die eigentlich alle..." und empfiehlt: Luftfilter tauschen. Erfolg: keine Verbesserung. Dieseladditiv bringt eine Verbesserung in Verbindung mit langer (einige 100km) zügiger Autobahnfahrt, aber nur temporär. **zu 3.)** Bei niedrigen Temperaturen (unter 0°C) schlechtes Startverhalten: Der Motor läuft zögernd an, eine ganze Weile sehr ungleichmäßig (unrund) und unter heftigem Ausstoß von sog. "Weißrauch", obwohl das Flammstartgerät die Ansaugluft noch vorwärmt nach dem Start, was genau dieses Verhalten eigentlich verhindern soll - und im Originalzustand auch hat. (Aufgrund der Qualität des bisherigen "Supports" habe ich dieses Thema Herrn Niemz nicht mehr zur Diskussion gestellt). <small>[>>> Seitenanfang](#oben)</small> <a name="unt"></a> ## Untersuchung und Ergebnisse Als Folge habe ich daher die Einspritzpumpe bei einem anstehenden Austausch zum Altteilewert angekauft und einer genauen Untersuchung unterziehen lassen. Die wichtigsten Ergebnisse: * Einbaumaß: Förderbeginn 0.28mm (Sollwert: 0.78mm) Der Förderbeginn ist damit in Richtung "spät" verstellt, was ggf. die Anlaufprobleme bei niedrigen Temperaturen begünstigen kann. * Betriebswerte: <table> <tr> <th width="120"> n<br> 1/min</th> <th width="120"> Sollwert <sup>1)</sup><br> </th> <th width="120"> LDA Druck <br> hPa</th> <th width="120"> Meßwert</th> </tr> <tr> <td colspan="4"> Vollast-Startmenge</td> </tr> <tr> <td> 100</td> <td> 85 </td> <td> 0</td> <td> 90</td> </tr> <tr> <td> 510</td> <td> 30 </td> <td> 0</td> <td> 51</td> </tr> <tr> <td> 200</td> <td> 90 </td> <td> 0</td> <td> 98</td> </tr> <tr> <td colspan="4"> Vollast</td> </tr> <tr> <td> 1100</td> <td> 58,5 </td> <td> 1200</td> <td> 84</td> </tr> <tr> <td> 800</td> <td> 51 </td> <td> 500</td> <td> 67</td> </tr> <tr> <td> 550</td> <td> 30,5 </td> <td> 0</td> <td> 49</td> </tr> <tr> <td> 1800</td> <td> 61,5 </td> <td> 1200</td> <td> 76</td> </tr> <tr> <td> 600</td> <td> 62,5 </td> <td> 1200</td> <td> 105</td> </tr> <tr> <td> 950</td> <td> 58,0 </td> <td> 1200</td> <td> 89</td> </tr> <tr> <td colspan="5">Abregelung</td> </tr> <tr> <td> 2000</td> <td> 43 </td> <td> 1200</td> <td> 77</td> </tr> <tr> <td> 2100</td> <td> 20 </td> <td> 1200</td> <td> 65</td> </tr> <tr> <td> 2200</td> <td> 2 </td> <td> 1200</td> <td> 46</td> </tr> </table> <small>Die angegebenen Drehzahlen beziehen sich auf die ESP, die Motordrehzahl im jeweiligen Prüfpunkt ist doppelt so hoch. <sup>1)</sup> Die Toleranzen liegen i. d. Regel bei <10% des jeweiligen Sollwerts.</small> Interpretation: * Alle Werte mit Ladedruck sind deutlich erhöht (bis über 50%) * Auch ohne Ladedruck sind die Werte bei Drehzahlen um 550/min erhöht * Der ausgeprägte Abfall oberhalb 2100/min (Motordrehzahl 4200/min) liegt nicht vor, die Abregeldrehzahl liegt daher deutlich über dem Sollwert **wichtig:** Die Pumpe läßt sich durch bloße Einstellung nicht mehr in den Sollzustand bringen. <small>[>>> Seitenanfang](#oben)</small> <a name="schluss"></a> ## Schlußbemerkungen <span class="re">![](/bilder/iveco-technik/leistungsmessung_2005-02-01_kl.gif)</span> Nach Austausch der Pumpe (Bosch-Dienst) bin ich wieder ungetunt unterwegs... ... was auch seine Vorteile hat: * Motor-Temperaturen sind drastisch niedriger * sichtbarer Rußausstoß ist völlig weg * bei niedrigen Temperaturen (0 ... -8°C) erheblich besseres Startverhalten: Motor läuft von Anfang an rund, praktisch kein Weißrauch mehr Die Betriebssicherheit ist wieder erheblich gestiegen und befindet sich auf dem Niveau des fabrikneuen Fahrzeugs. **Fazit: Für mich hat sich das Thema "Motoroptimierung/Tuning" erledigt** <small>[>>> Seitenanfang](#oben)</small>
{ "content_hash": "12bebe0b2f7f03ea0c34e205848d132e", "timestamp": "", "source": "github", "line_count": 214, "max_line_length": 533, "avg_line_length": 41.03738317757009, "alnum_prop": 0.7041676155773172, "repo_name": "ominty/ominty-hugoissues", "id": "bddee92984bc4b4cd66624b1a5727cb1cf19a43e", "size": "8879", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "content/iveco-technik/optimierung.md", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "10427" }, { "name": "HTML", "bytes": "28941" } ], "symlink_target": "" }
// Lumol, an extensible molecular simulation engine // Copyright (C) 2015-2016 Lumol's contributors — BSD license //! Saving properties of a system during a simulation use std::io::prelude::*; use std::io; use std::fs::File; use std::path::{Path, PathBuf}; use utils; use sys::System; use sys::{Trajectory, TrajectoryError}; /// The `Output` trait define the interface for all the quantities outputted by /// the simulation during the run. An Output can be a text or a binary data /// file, an image, a text log, … pub trait Output { /// Function called once at the beginning of the simulation, which allow /// for some setup of the output if needed. fn setup(&mut self, _: &System) {} /// Write the output from the system. fn write(&mut self, system: &System); /// Function called once at the end of the simulation. fn finish(&mut self, _: &System) {} } /******************************************************************************/ /// The `TrajectoryOutput` allow to write the trajectory of the system to a /// file, using any format supported by the [Chemfiles][chemfiles] library. /// /// [chemfiles]: http://chemfiles.github.io pub struct TrajectoryOutput { file: Trajectory, } impl TrajectoryOutput { /// Create a new `TrajectoryOutput` writing to `filename`. The file is /// replaced if it already exists. pub fn new<P>(path: P) -> Result<TrajectoryOutput, TrajectoryError> where P: AsRef<Path> { Ok(TrajectoryOutput{ file: try!(Trajectory::create(path)) }) } } impl Output for TrajectoryOutput { fn write(&mut self, system: &System) { match self.file.write(system) { Ok(()) => (), Err(err) => { fatal_error!("Error in while writing trajectory: {}", err); } } } } /******************************************************************************/ /// The `CellOutput` write all the components of a cell to a file . The columns /// in the file contains the following values: `A B C α β γ`. pub struct CellOutput { file: File, path: PathBuf } impl CellOutput { /// Create a new `CellOutput` writing to `filename`. The file is replaced if /// it already exists. pub fn new<P: AsRef<Path>>(filename: P) -> Result<CellOutput, io::Error> { Ok(CellOutput{ file: try!(File::create(filename.as_ref())), path: filename.as_ref().to_owned(), }) } } impl Output for CellOutput { fn setup(&mut self, _: &System) { if let Err(err) = writeln!(&mut self.file, "# Unit cell of the simulation") { // Do panic in early time fatal_error!("Could not write to file '{}': {}", self.path.display(), err); } if let Err(err) = writeln!(&mut self.file, "# Step A/Å B/Å C/Å α/deg β/deg γ/deg") { fatal_error!("Could not write to file '{}': {}", self.path.display(), err); } } fn write(&mut self, system: &System) { let cell = system.cell(); if let Err(err) = writeln!( &mut self.file, "{} {} {} {} {} {} {}", system.step(), cell.a(), cell.b(), cell.c(), cell.alpha(), cell.beta(), cell.gamma() ) { // Do not panic during the simulation error!("Could not write to file '{}': {}", self.path.display(), err); } } } /******************************************************************************/ /// The `EnergyOutput` write the energy of the system to a text file, organized /// as: `PotentialEnergy KineticEnergy TotalEnergy`. pub struct EnergyOutput { file: File, path: PathBuf } impl EnergyOutput { /// Create a new `EnergyOutput` writing to `filename`. The file is replaced /// if it already exists. pub fn new<P: AsRef<Path>>(filename: P) -> Result<EnergyOutput, io::Error> { Ok(EnergyOutput{ file: try!(File::create(filename.as_ref())), path: filename.as_ref().to_owned(), }) } } impl Output for EnergyOutput { fn setup(&mut self, _: &System) { if let Err(err) = writeln!(&mut self.file, "# Energy of the simulation (kJ/mol)") { fatal_error!("Could not write to file '{}': {}", self.path.display(), err); } if let Err(err) = writeln!(&mut self.file, "# Step Potential Kinetic Total") { fatal_error!("Could not write to file '{}': {}", self.path.display(), err); } } fn write(&mut self, system: &System) { let potential = utils::unit_to(system.potential_energy(), "kJ/mol"); let kinetic = utils::unit_to(system.kinetic_energy(), "kJ/mol"); let total = utils::unit_to(system.total_energy(), "kJ/mol"); if let Err(err) = writeln!(&mut self.file, "{} {} {} {}", system.step(), potential, kinetic, total) { error!("Could not write to file '{}': {}", self.path.display(), err); } } } /******************************************************************************/ /// The `PropertiesOutput` write various physical properties of the system to /// a file. These properties are: /// /// - volume of the unit cell; /// - instant temperature; /// - instant pressure; pub struct PropertiesOutput { file: File, path: PathBuf, } impl PropertiesOutput { /// Create a new `PropertiesOutput` writing to `filename`. The file is replaced /// if it already exists. pub fn new<P: AsRef<Path>>(filename: P) -> Result<PropertiesOutput, io::Error> { Ok(PropertiesOutput{ file: try!(File::create(filename.as_ref())), path: filename.as_ref().to_owned(), }) } } impl Output for PropertiesOutput { fn setup(&mut self, _: &System) { if let Err(err) = writeln!(&mut self.file, "# Physical properties of the simulation") { fatal_error!("Could not write to file '{}': {}", self.path.display(), err); } if let Err(err) = writeln!(&mut self.file, "# Step Volume/A^3 Temperature/K Pressure/bar") { fatal_error!("Could not write to file '{}': {}", self.path.display(), err); } } fn write(&mut self, system: &System) { let volume = utils::unit_to(system.volume(), "A^3"); let temperature = utils::unit_to(system.temperature(), "K"); let pressure = utils::unit_to(system.pressure(), "bar"); if let Err(err) = writeln!(&mut self.file, "{} {} {} {}", system.step(), volume, temperature, pressure) { error!("Could not write to file '{}': {}", self.path.display(), err); } } } #[cfg(test)] mod tests { extern crate tempfile; use self::tempfile::{NamedTempFile, NamedTempFileOptions}; use std::io::prelude::*; use std::fs::File; use super::*; use sys::*; use types::*; use energy::*; use utils::unit_from; fn testing_system() -> System { let mut system = System::from_cell(UnitCell::cubic(10.0));; system.add_particle(Particle::new("F")); system[0].position = Vector3D::zero(); system.add_particle(Particle::new("F")); system[1].position = Vector3D::new(1.3, 0.0, 0.0); let harmonic = Box::new(Harmonic{ k: unit_from(300.0, "kJ/mol/A^2"), x0: unit_from(1.2, "A")} ); system.interactions_mut().add_pair("F", "F", PairInteraction::new(harmonic, 5.0) ); return system; } fn check_file_content(mut file: File, content: &str) { let mut buffer = String::new(); let _ = file.read_to_string(&mut buffer).unwrap(); assert_eq!(buffer, content); } #[test] fn trajectory() { let tempfile = NamedTempFileOptions::new().suffix(".xyz").create().unwrap(); let system = testing_system(); { let mut out = TrajectoryOutput::new(tempfile.path()).unwrap(); out.setup(&system); out.write(&system); out.finish(&system); } let content = "2 Written by the chemfiles library F 0 0 0 F 1.3 0 0 "; let file = tempfile.reopen().unwrap(); check_file_content(file, content); } #[test] fn energy() { let tempfile = NamedTempFile::new().unwrap(); let system = testing_system(); { let mut out = EnergyOutput::new(tempfile.path()).unwrap(); out.setup(&system); out.write(&system); out.finish(&system); } let content = "\ # Energy of the simulation (kJ/mol) # Step Potential Kinetic Total 0 1.5000000000000027 0 1.5000000000000027 "; let file = tempfile.reopen().unwrap(); check_file_content(file, content); } #[test] fn cell() { let tempfile = NamedTempFile::new().unwrap(); let system = testing_system(); { let mut out = CellOutput::new(tempfile.path()).unwrap(); out.setup(&system); out.write(&system); out.finish(&system); } let content = "\ # Unit cell of the simulation # Step A/Å B/Å C/Å α/deg β/deg γ/deg 0 10 10 10 90 90 90 "; let file = tempfile.reopen().unwrap(); check_file_content(file, content); } #[test] fn properties() { let tempfile = NamedTempFile::new().unwrap(); let system = testing_system(); { let mut out = PropertiesOutput::new(tempfile.path()).unwrap(); out.setup(&system); out.write(&system); out.finish(&system); } let content = "\ # Physical properties of the simulation # Step Volume/A^3 Temperature/K Pressure/bar 0 1000 0 -215.87004181115455 "; let file = tempfile.reopen().unwrap(); check_file_content(file, content); } }
{ "content_hash": "118f4f3194e213e0521966a19b35f104", "timestamp": "", "source": "github", "line_count": 306, "max_line_length": 113, "avg_line_length": 32.09477124183007, "alnum_prop": 0.5556460645555442, "repo_name": "antoinewdg/lumol", "id": "ff3e6847dc3150d8194b0ec0e325e1389b6d1e48", "size": "9840", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/core/src/out.rs", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "Python", "bytes": "1416" }, { "name": "Rust", "bytes": "579953" }, { "name": "Shell", "bytes": "776" } ], "symlink_target": "" }
layout: page title: Martha Bridges's 84th Birthday date: 2016-05-24 author: Jacqueline Sanchez tags: weekly links, java status: published summary: Quisque id dolor tempus, convallis lorem nec, ullamcorper. banner: images/banner/leisure-05.jpg booking: startDate: 03/10/2019 endDate: 03/13/2019 ctyhocn: AUSUAHX groupCode: MB8B published: true --- Ut accumsan consectetur mauris vel faucibus. Etiam hendrerit magna id risus malesuada, sit amet laoreet nulla scelerisque. Sed tempus ante sit amet justo auctor scelerisque. Etiam ac odio libero. Aliquam erat volutpat. In commodo ex ut diam euismod viverra. Donec ultricies, orci at volutpat elementum, mauris tellus iaculis dolor, vitae efficitur justo est sed mauris. Aenean in vehicula felis, nec porttitor nulla. Quisque sem elit, bibendum nec leo vel, ultricies cursus eros. * Mauris blandit tortor sed nulla vestibulum interdum * Morbi euismod mi nec porttitor placerat * Nunc ac lectus quis arcu viverra mollis * Aliquam interdum nulla id bibendum laoreet * Phasellus sed risus sed ante lacinia tincidunt. Nullam vitae tortor a nulla tempor aliquam a id neque. Nam sit amet diam cursus, volutpat lorem interdum, auctor arcu. Sed pulvinar, nisi sagittis vestibulum consequat, purus nisl tincidunt turpis, nec lacinia tellus ex sed ligula. Cras bibendum tellus eu leo volutpat tempus. Maecenas malesuada ut sem vel malesuada. Maecenas sagittis ullamcorper scelerisque. Morbi id elit ac odio fringilla sollicitudin. In tellus arcu, viverra nec pulvinar suscipit, mattis eu erat. Praesent fringilla, sapien eu pellentesque maximus, nibh augue viverra felis, gravida interdum purus enim id nisi. Suspendisse placerat, quam id posuere tincidunt, turpis eros convallis libero, vitae rutrum lectus elit a enim. Morbi eu lectus in nisi suscipit condimentum ac ut libero. Sed tristique suscipit nulla ornare bibendum. Mauris sodales arcu est. Donec eleifend sem non dictum maximus. Etiam varius tempor dui in luctus. Vestibulum ut nunc sit amet justo ornare porta at eget lorem.
{ "content_hash": "a88d16fba8a0850077fd5ecd216e8d93", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 555, "avg_line_length": 81.32, "alnum_prop": 0.8086571569109691, "repo_name": "KlishGroup/prose-pogs", "id": "22d10e463d09b0bbc045298610e47da044c29ff0", "size": "2037", "binary": false, "copies": "1", "ref": "refs/heads/gh-pages", "path": "pogs/A/AUSUAHX/MB8B/index.md", "mode": "33188", "license": "mit", "language": [], "symlink_target": "" }
@interface GenerateQrCodeActivity : UIActivity // Initializes the GenerateQrCodeActivity with the |activityURL| used to // generate the QR code, the |title| of the page at that URL, and a |dispatcher| // to handle the command. - (instancetype)initWithURL:(const GURL&)activityURL title:(NSString*)title handler:(id<QRGenerationCommands>)handler NS_DESIGNATED_INITIALIZER; - (instancetype)init NS_UNAVAILABLE; @end #endif // IOS_CHROME_BROWSER_UI_ACTIVITY_SERVICES_ACTIVITIES_GENERATE_QR_CODE_ACTIVITY_H_
{ "content_hash": "33dfa3f6568bd9be0ada19c299210aba", "timestamp": "", "source": "github", "line_count": 15, "max_line_length": 90, "avg_line_length": 37, "alnum_prop": 0.7207207207207207, "repo_name": "endlessm/chromium-browser", "id": "e741ed816ebb14c0da862ef030b6dffea6186965", "size": "1074", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "ios/chrome/browser/ui/activity_services/activities/generate_qr_code_activity.h", "mode": "33188", "license": "bsd-3-clause", "language": [], "symlink_target": "" }
module("SoulSkillList", package.seeall) mScene = nil -- ³¡¾° -- ³¡¾°Èë¿Ú function pushScene() initResource() createScene() end -- -------------------------˽ÓнӿÚ------------------------ -- -- ³õʼ»¯×ÊÔ´¡¢³ÉÔ±±äÁ¿ function initResource() end -- ÊÍ·Å×ÊÔ´ function releaseResource() mLayer = nil mScene = nil heroLayer=nil heroList=nil noticeLabel=nil HeroAccessory.releaseResource() SoulSkillScene.releaseResource() end -- ´´½¨³¡¾° function createScene() local scene = ScutScene:new() mScene = scene.root mScene:registerScriptHandler(SpriteEase_onEnterOrExit) scene:registerCallback(networkCallback) SlideInLReplaceScene(mScene,1) -- ×¢²áÍøÂç»Øµ÷ -- Ìí¼ÓÖ÷²ã mLayer= CCLayer:create() mScene:addChild(mLayer, 0) --Öмä²ã local midSprite=CCSprite:create(P("common/list_1040.png")) local boxSize=SZ(pWinSize.width,pWinSize.height*0.68) midSprite:setScaleX(boxSize.width/midSprite:getContentSize().width) midSprite:setScaleY(boxSize.height/midSprite:getContentSize().height) midSprite:setAnchorPoint(PT(0.5,0)) midSprite:setPosition(PT(pWinSize.width/2,pWinSize.height*0.145)) mLayer:addChild(midSprite,0) --±êÇ© local tabName = { Language.SKILL_LIST} createTabBar(tabName) -- ´Ë´¦Ìí¼Ó³¡¾°³õʼÄÚÈÝ MainMenuLayer.init(1, mLayer) showList() sendAction(1483) end function SpriteEase_onEnterOrExit (tag) if tag == "exit" then releaseResource() end end --Tab½çÃæÇл» function createTabBar(tabName) local tabBar = ZyTabBar:new(Image.image_top_button_0, Image.image_top_button_1, tabName, FONT_NAME, FONT_SM_SIZE, 4, Image.image_LeftButtonNorPath, Image.image_rightButtonNorPath); tabBar:addto(mLayer,0) ------Ìí¼Ó tabBar:setColor(ZyColor:colorYellow()) ---ÉèÖÃÑÕÉ« tabBar:setPosition(PT(SX(25),pWinSize.height*0.775)) -----ÉèÖÃ×ø±ê end function showList() local layer = CCLayer:create() mLayer:addChild(layer, 0) heroLayer = layer local list_width = pWinSize.width*0.9 local list_height = pWinSize.height*0.52 local list_x = pWinSize.width*0.5-list_width*0.5 local list_y = pWinSize.height*0.24 local listSize = SZ(list_width, list_height) list = ScutCxList:node(listSize.height/4, ccc4(24, 24, 24, 0), listSize) list:setAnchorPoint(PT(0, 0)) list:setPosition(PT(list_x, list_y)) layer:addChild(list,0) list:setTouchEnabled(true) heroList = list end function showContent() local list = heroList heroList:clear() if not noticeLabel then noticeLabel = CCLabelTTF:create("", FONT_NAME, FONT_SM_SIZE) noticeLabel:setAnchorPoint(PT(0,0)) noticeLabel:setPosition(PT(pWinSize.width*0.5, pWinSize.height*0.65)) mLayer:addChild(noticeLabel, 0) end if #skillListInfo.RecordTabel == 0 then noticeLabel:setString(Language.SKILL_NOSKILL) return else noticeLabel:setString("") end for k,v in ipairs(skillListInfo.RecordTabel) do local listItem=ScutCxListItem:itemWithColor(ccc3(32, 24, 3)) listItem:setOpacity(0) local item = creatItem(v,k) local layout=CxLayout() layout.val_x.t = ABS_WITH_PIXEL layout.val_y.t = ABS_WITH_PIXEL layout.val_x.val.pixel_val =0 layout.val_y.val.pixel_val =0 listItem:addChildItem(item, layout) list:addListItem(listItem, false) end end; --´´½¨µ¥Ìõ»ê¼¼ÐÅÏ¢ function creatItem(info, tag) local layer = CCLayer:create() local layerSize = SZ(list:getContentSize().width, list:getRowHeight()) layer:setContentSize(layerSize) --±³¾° local itemBg = CCSprite:create(P("common/list_1038.9.png")) itemBg:setScaleX((layerSize.width-SX(4))/itemBg:getContentSize().width) itemBg:setScaleY((layerSize.height-SY(4))/itemBg:getContentSize().height) itemBg:setAnchorPoint(PT(0,0)) itemBg:setPosition(PT(SX(2), SY(2))) layer:addChild(itemBg, 0) --»ê¼¼Í¼Æ¬ local actionPath = key_head local image = string.format("smallitem/%s.png", info.HeadID) local headItem = creatHeadItem(image, tag, actionPath, info.AbilityQuality) headItem:setAnchorPoint(PT(0,0)) headItem:setPosition(PT(layerSize.width*0.05, layerSize.height*0.5-headItem:getContentSize().height*0.5)) layer:addChild(headItem, 0) local startX = layerSize.width*0.25 --»ê¼¼Ãû³Æ local nameStr = info.AbilityName if nameStr then local nameLabel = CCLabelTTF:create(nameStr, FONT_NAME, FONT_SM_SIZE) nameLabel:setAnchorPoint(PT(0,0)) nameLabel:setPosition(PT(startX, layerSize.height*0.7+SY(1))) layer:addChild(nameLabel, 0) end --Æ·ÖÊ if info.AbilityQuality and genrealQuality[info.AbilityQuality] then local qualityStr = Language.BAG_QUALITY..":"..genrealQuality[info.AbilityQuality] local qualityLabel = CCLabelTTF:create(qualityStr, FONT_NAME, FONT_SM_SIZE) qualityLabel:setAnchorPoint(PT(0,0)) qualityLabel:setPosition(PT(startX, layerSize.height*0.5+SY(1))) layer:addChild(qualityLabel, 0) end --»ê¼¼µÈ¼¶ if info.AbilityLv then local levelStr = Language.ROLE_LEVEL..":"..info.AbilityLv local levelLabel = CCLabelTTF:create(levelStr, FONT_NAME, FONT_SM_SIZE) levelLabel:setAnchorPoint(PT(0,0)) levelLabel:setPosition(PT(startX, layerSize.height*0.3+SY(1))) layer:addChild(levelLabel, 0) end ---- »ê¼¼ÍþÁ¦ if info.RatioNum then local ratioNumStr = Language.SKILL_PROWER..":"..info.RatioNum local ratioNum = CCLabelTTF:create(ratioNumStr, FONT_NAME, FONT_SM_SIZE) ratioNum:setAnchorPoint(PT(0,0)) ratioNum:setPosition(PT(startX, layerSize.height*0.1+SY(1))) layer:addChild(ratioNum, 0) end --×°±¸ÓÚ local GeneralName = info.GeneralName--info.AbilityName if GeneralName then local generalStr = Language.SKILL_EQUIP..GeneralName local generalLabel = CCLabelTTF:create(generalStr, FONT_NAME, FONT_SM_SIZE) generalLabel:setAnchorPoint(PT(0,0)) generalLabel:setPosition(PT(layerSize.width*0.5, layerSize.height*0.6)) layer:addChild(generalLabel, 0) end --¹¥»÷ÀàÐÍ local AttackType = info.AttackType if AttackType and AttackTypetTable[AttackType] then local typeStr = AttackTypetTable[AttackType] local typeLabel = CCLabelTTF:create(typeStr, FONT_NAME, FONT_SM_SIZE) typeLabel:setAnchorPoint(PT(0,0)) typeLabel:setPosition(PT(layerSize.width*0.5, layerSize.height*0.2)) layer:addChild(typeLabel, 0) end local button = ZyButton:new(Image.image_button, nil, nil, Language.IDS_LEVELUP, FONT_NAME, FONT_SM_SIZE) button:setAnchorPoint(PT(0,0)) button:setPosition(PT(layerSize.width*0.8, layerSize.height*0.5-button:getContentSize().height*0.5)) button:addto(layer, 0) button:registerScriptHandler(key_LvUp) button:setTag(tag) return layer end; --´´½¨Í·Ïñ function creatHeadItem(image, tag, actionPath, abilityQuality) -- ±³¾° local bgImg = getQualityBg(abilityQuality,1) local menuItem = CCMenuItemImage:create(P(bgImg), P(bgImg)) local btn = CCMenu:createWithItem(menuItem) btn:setAnchorPoint(PT(0,0)) menuItem:setAnchorPoint(PT(0,0)) if tag~= nil and tag~=-1 then menuItem:setTag(tag) end btn:setContentSize(SZ(menuItem:getContentSize().width,menuItem:getContentSize().height)) --ÉèÖûص÷ if actionPath ~= nil then menuItem:registerScriptTapHandler(actionPath) end -- ËõÂÔͼ if image ~= nil and image ~= "" then local imageLabel = CCSprite:create(P(image)) imageLabel:setAnchorPoint(CCPoint(0.5, 0.5)) imageLabel:setPosition(PT(menuItem:getContentSize().width*0.5,menuItem:getContentSize().height*0.5)) menuItem:addChild(imageLabel,0) end return btn end function key_head(pNode) local tag = pNode local UserItemID = skillListInfo.RecordTabel[tag].UserItemID sendAction(1485, UserItemID) end --µã»÷Éý¼¶°´Å¥ function key_LvUp(pNode) local tag = pNode:getTag() local AbilityID = skillListInfo.RecordTabel[tag].AbilityID--¼¼ÄÜid local UserItemID = skillListInfo.RecordTabel[tag].UserItemID -- SoulSkillScene.setAbilityID(AbilityID, UserItemID, mScene) SoulSkillScene.init() end function refreshWin() sendAction(1483) end --·¢ËÍÇëÇó function sendAction(actionId, data) if actionId == 1483 then-- 1483_»ê¼¼Áбí½Ó¿Ú£¨ID=1483£© actionLayer.Action1483(mScene, nil,1,199, 0)--PageIndex,PageSize,Ops --0£ºÈ«²¿£º1δװÔÚÓ¶±øÉíÉÏ elseif actionId == 1485 then actionLayer.Action1485(mScene,nil, data,data) end end -- ÍøÂç»Øµ÷ function networkCallback(pScutScene, lpExternalData) local actionId = ZyReader:getActionID() local userData = ScutRequestParam:getParamData(lpExternalData) if actionId == 1483 then-- 1483_»ê¼¼Áбí½Ó¿Ú£¨ID=1483£© local serverInfo = actionLayer._1483Callback(pScutScene, lpExternalData) if serverInfo then skillListInfo = serverInfo showContent() end elseif actionId == 1481 or actionId == 1482 then SoulSkillScene.networkCallback(pScutScene, lpExternalData) elseif actionId == 1485 then local serverInfo = actionLayer._1485Callback(pScutScene, lpExternalData) if serverInfo ~= nil then serverInfo.UserItemID = userData HeroAccessory.setScene(mScene) HeroAccessory.setData(serverInfo) local isNochangeBtn = true--ÊÇ·ñûÓиü»»°´Å¥ HeroAccessory.showSkillDetailLayer(isNochangeBtn) end end commonCallback.networkCallback(pScutScene, lpExternalData) end
{ "content_hash": "986efe91fff299cb5517de2434497e46", "timestamp": "", "source": "github", "line_count": 332, "max_line_length": 181, "avg_line_length": 28.337349397590362, "alnum_prop": 0.7107780612244898, "repo_name": "wenhulove333/ScutServer", "id": "8c938f9cab988f5182b41247213bd53e4b8a8e51", "size": "9662", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Sample/Koudai/Client/lua/scenes/SoulSkillList.lua", "mode": "33188", "license": "mit", "language": [ { "name": "ASP", "bytes": "150472" }, { "name": "ActionScript", "bytes": "339184" }, { "name": "Batchfile", "bytes": "60466" }, { "name": "C", "bytes": "3976261" }, { "name": "C#", "bytes": "9481083" }, { "name": "C++", "bytes": "11640198" }, { "name": "CMake", "bytes": "489" }, { "name": "CSS", "bytes": "13478" }, { "name": "Groff", "bytes": "16179" }, { "name": "HTML", "bytes": "283997" }, { "name": "Inno Setup", "bytes": "28931" }, { "name": "Java", "bytes": "214263" }, { "name": "JavaScript", "bytes": "2809" }, { "name": "Lua", "bytes": "4667522" }, { "name": "Makefile", "bytes": "166623" }, { "name": "Objective-C", "bytes": "401654" }, { "name": "Objective-C++", "bytes": "355347" }, { "name": "Python", "bytes": "1633926" }, { "name": "Shell", "bytes": "101770" }, { "name": "Visual Basic", "bytes": "18764" } ], "symlink_target": "" }
using NUnit.Framework; using System; using System.Collections.Generic; using System.Linq; using System.Text; using ComponentGlue.Tests.Classes; namespace ComponentGlue.Tests { [TestFixture] public class LifecycleManagementTests { [Test] public void Disposing_Of_Container_Calls_Dispose_On_Singleton_Obects() { ComponentContainer container = new ComponentContainer(); container.Bind<DisposableObject>().ToSelf().AsSingleton(); DisposableObject obj = container.Resolve<DisposableObject>(); container.Dispose(); Assert.IsTrue(obj.WasDisposed); } } }
{ "content_hash": "0ea2954c37af45e4a147628d2f232656", "timestamp": "", "source": "github", "line_count": 26, "max_line_length": 78, "avg_line_length": 25.384615384615383, "alnum_prop": 0.6696969696969697, "repo_name": "smack0007/ComponentGlue", "id": "fdf63590fe3ddc825190998517abaad90dccc725", "size": "662", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "ComponentGlue.Tests/LifecycleManagementTests.cs", "mode": "33188", "license": "mit", "language": [ { "name": "C#", "bytes": "91041" }, { "name": "Shell", "bytes": "457" } ], "symlink_target": "" }
<HTML> <BODY BGCOLOR="white"> <PRE> <FONT color="green">001</FONT> <a name="line.16"></a> <FONT color="green">017</FONT> package org.apache.commons.lang.exception;<a name="line.17"></a> <FONT color="green">018</FONT> <a name="line.18"></a> <FONT color="green">019</FONT> import java.io.PrintStream;<a name="line.19"></a> <FONT color="green">020</FONT> import java.io.PrintWriter;<a name="line.20"></a> <FONT color="green">021</FONT> <a name="line.21"></a> <FONT color="green">022</FONT> /**<a name="line.22"></a> <FONT color="green">023</FONT> * An interface to be implemented by {@link java.lang.Throwable}<a name="line.23"></a> <FONT color="green">024</FONT> * extensions which would like to be able to nest root exceptions<a name="line.24"></a> <FONT color="green">025</FONT> * inside themselves.<a name="line.25"></a> <FONT color="green">026</FONT> *<a name="line.26"></a> <FONT color="green">027</FONT> * @author Daniel L. Rall<a name="line.27"></a> <FONT color="green">028</FONT> * @author &lt;a href="mailto:[email protected]"&gt;Kasper Nielsen&lt;/a&gt;<a name="line.28"></a> <FONT color="green">029</FONT> * @author &lt;a href="mailto:[email protected]"&gt;Steven Caswell&lt;/a&gt;<a name="line.29"></a> <FONT color="green">030</FONT> * @author Pete Gieser<a name="line.30"></a> <FONT color="green">031</FONT> * @since 1.0<a name="line.31"></a> <FONT color="green">032</FONT> * @version $Id: Nestable.java 512889 2007-02-28 18:18:20Z dlr $<a name="line.32"></a> <FONT color="green">033</FONT> */<a name="line.33"></a> <FONT color="green">034</FONT> public interface Nestable {<a name="line.34"></a> <FONT color="green">035</FONT> <a name="line.35"></a> <FONT color="green">036</FONT> /**<a name="line.36"></a> <FONT color="green">037</FONT> * Returns the reference to the exception or error that caused the<a name="line.37"></a> <FONT color="green">038</FONT> * exception implementing the &lt;code&gt;Nestable&lt;/code&gt; to be thrown.<a name="line.38"></a> <FONT color="green">039</FONT> *<a name="line.39"></a> <FONT color="green">040</FONT> * @return throwable that caused the original exception<a name="line.40"></a> <FONT color="green">041</FONT> */<a name="line.41"></a> <FONT color="green">042</FONT> public Throwable getCause();<a name="line.42"></a> <FONT color="green">043</FONT> <a name="line.43"></a> <FONT color="green">044</FONT> /**<a name="line.44"></a> <FONT color="green">045</FONT> * Returns the error message of this and any nested<a name="line.45"></a> <FONT color="green">046</FONT> * &lt;code&gt;Throwable&lt;/code&gt;.<a name="line.46"></a> <FONT color="green">047</FONT> *<a name="line.47"></a> <FONT color="green">048</FONT> * @return the error message<a name="line.48"></a> <FONT color="green">049</FONT> */<a name="line.49"></a> <FONT color="green">050</FONT> public String getMessage();<a name="line.50"></a> <FONT color="green">051</FONT> <a name="line.51"></a> <FONT color="green">052</FONT> /**<a name="line.52"></a> <FONT color="green">053</FONT> * Returns the error message of the &lt;code&gt;Throwable&lt;/code&gt; in the chain<a name="line.53"></a> <FONT color="green">054</FONT> * of &lt;code&gt;Throwable&lt;/code&gt;s at the specified index, numbered from 0.<a name="line.54"></a> <FONT color="green">055</FONT> *<a name="line.55"></a> <FONT color="green">056</FONT> * @param index the index of the &lt;code&gt;Throwable&lt;/code&gt; in the chain of<a name="line.56"></a> <FONT color="green">057</FONT> * &lt;code&gt;Throwable&lt;/code&gt;s<a name="line.57"></a> <FONT color="green">058</FONT> * @return the error message, or null if the &lt;code&gt;Throwable&lt;/code&gt; at the<a name="line.58"></a> <FONT color="green">059</FONT> * specified index in the chain does not contain a message<a name="line.59"></a> <FONT color="green">060</FONT> * @throws IndexOutOfBoundsException if the &lt;code&gt;index&lt;/code&gt; argument is<a name="line.60"></a> <FONT color="green">061</FONT> * negative or not less than the count of &lt;code&gt;Throwable&lt;/code&gt;s in the<a name="line.61"></a> <FONT color="green">062</FONT> * chain<a name="line.62"></a> <FONT color="green">063</FONT> */<a name="line.63"></a> <FONT color="green">064</FONT> public String getMessage(int index);<a name="line.64"></a> <FONT color="green">065</FONT> <a name="line.65"></a> <FONT color="green">066</FONT> /**<a name="line.66"></a> <FONT color="green">067</FONT> * Returns the error message of this and any nested &lt;code&gt;Throwable&lt;/code&gt;s<a name="line.67"></a> <FONT color="green">068</FONT> * in an array of Strings, one element for each message. Any<a name="line.68"></a> <FONT color="green">069</FONT> * &lt;code&gt;Throwable&lt;/code&gt; not containing a message is represented in the<a name="line.69"></a> <FONT color="green">070</FONT> * array by a null. This has the effect of cause the length of the returned<a name="line.70"></a> <FONT color="green">071</FONT> * array to be equal to the result of the {@link #getThrowableCount()}<a name="line.71"></a> <FONT color="green">072</FONT> * operation.<a name="line.72"></a> <FONT color="green">073</FONT> *<a name="line.73"></a> <FONT color="green">074</FONT> * @return the error messages<a name="line.74"></a> <FONT color="green">075</FONT> */<a name="line.75"></a> <FONT color="green">076</FONT> public String[] getMessages();<a name="line.76"></a> <FONT color="green">077</FONT> <a name="line.77"></a> <FONT color="green">078</FONT> /**<a name="line.78"></a> <FONT color="green">079</FONT> * Returns the &lt;code&gt;Throwable&lt;/code&gt; in the chain of<a name="line.79"></a> <FONT color="green">080</FONT> * &lt;code&gt;Throwable&lt;/code&gt;s at the specified index, numbered from 0.<a name="line.80"></a> <FONT color="green">081</FONT> *<a name="line.81"></a> <FONT color="green">082</FONT> * @param index the index, numbered from 0, of the &lt;code&gt;Throwable&lt;/code&gt; in<a name="line.82"></a> <FONT color="green">083</FONT> * the chain of &lt;code&gt;Throwable&lt;/code&gt;s<a name="line.83"></a> <FONT color="green">084</FONT> * @return the &lt;code&gt;Throwable&lt;/code&gt;<a name="line.84"></a> <FONT color="green">085</FONT> * @throws IndexOutOfBoundsException if the &lt;code&gt;index&lt;/code&gt; argument is<a name="line.85"></a> <FONT color="green">086</FONT> * negative or not less than the count of &lt;code&gt;Throwable&lt;/code&gt;s in the<a name="line.86"></a> <FONT color="green">087</FONT> * chain<a name="line.87"></a> <FONT color="green">088</FONT> */<a name="line.88"></a> <FONT color="green">089</FONT> public Throwable getThrowable(int index);<a name="line.89"></a> <FONT color="green">090</FONT> <a name="line.90"></a> <FONT color="green">091</FONT> /**<a name="line.91"></a> <FONT color="green">092</FONT> * Returns the number of nested &lt;code&gt;Throwable&lt;/code&gt;s represented by<a name="line.92"></a> <FONT color="green">093</FONT> * this &lt;code&gt;Nestable&lt;/code&gt;, including this &lt;code&gt;Nestable&lt;/code&gt;.<a name="line.93"></a> <FONT color="green">094</FONT> *<a name="line.94"></a> <FONT color="green">095</FONT> * @return the throwable count<a name="line.95"></a> <FONT color="green">096</FONT> */<a name="line.96"></a> <FONT color="green">097</FONT> public int getThrowableCount();<a name="line.97"></a> <FONT color="green">098</FONT> <a name="line.98"></a> <FONT color="green">099</FONT> /**<a name="line.99"></a> <FONT color="green">100</FONT> * Returns this &lt;code&gt;Nestable&lt;/code&gt; and any nested &lt;code&gt;Throwable&lt;/code&gt;s<a name="line.100"></a> <FONT color="green">101</FONT> * in an array of &lt;code&gt;Throwable&lt;/code&gt;s, one element for each<a name="line.101"></a> <FONT color="green">102</FONT> * &lt;code&gt;Throwable&lt;/code&gt;.<a name="line.102"></a> <FONT color="green">103</FONT> *<a name="line.103"></a> <FONT color="green">104</FONT> * @return the &lt;code&gt;Throwable&lt;/code&gt;s<a name="line.104"></a> <FONT color="green">105</FONT> */<a name="line.105"></a> <FONT color="green">106</FONT> public Throwable[] getThrowables();<a name="line.106"></a> <FONT color="green">107</FONT> <a name="line.107"></a> <FONT color="green">108</FONT> /**<a name="line.108"></a> <FONT color="green">109</FONT> * Returns the index, numbered from 0, of the first occurrence of the<a name="line.109"></a> <FONT color="green">110</FONT> * specified type, or a subclass, in the chain of &lt;code&gt;Throwable&lt;/code&gt;s.<a name="line.110"></a> <FONT color="green">111</FONT> * The method returns -1 if the specified type is not found in the chain.<a name="line.111"></a> <FONT color="green">112</FONT> * &lt;p&gt;<a name="line.112"></a> <FONT color="green">113</FONT> * NOTE: From v2.1, we have clarified the &lt;code&gt;Nestable&lt;/code&gt; interface<a name="line.113"></a> <FONT color="green">114</FONT> * such that this method matches subclasses.<a name="line.114"></a> <FONT color="green">115</FONT> * If you want to NOT match subclasses, please use<a name="line.115"></a> <FONT color="green">116</FONT> * {@link ExceptionUtils#indexOfThrowable(Throwable, Class)}<a name="line.116"></a> <FONT color="green">117</FONT> * (which is avaiable in all versions of lang).<a name="line.117"></a> <FONT color="green">118</FONT> *<a name="line.118"></a> <FONT color="green">119</FONT> * @param type the type to find, subclasses match, null returns -1<a name="line.119"></a> <FONT color="green">120</FONT> * @return index of the first occurrence of the type in the chain, or -1 if<a name="line.120"></a> <FONT color="green">121</FONT> * the type is not found<a name="line.121"></a> <FONT color="green">122</FONT> */<a name="line.122"></a> <FONT color="green">123</FONT> public int indexOfThrowable(Class type);<a name="line.123"></a> <FONT color="green">124</FONT> <a name="line.124"></a> <FONT color="green">125</FONT> /**<a name="line.125"></a> <FONT color="green">126</FONT> * Returns the index, numbered from 0, of the first &lt;code&gt;Throwable&lt;/code&gt;<a name="line.126"></a> <FONT color="green">127</FONT> * that matches the specified type, or a subclass, in the chain of &lt;code&gt;Throwable&lt;/code&gt;s<a name="line.127"></a> <FONT color="green">128</FONT> * with an index greater than or equal to the specified index.<a name="line.128"></a> <FONT color="green">129</FONT> * The method returns -1 if the specified type is not found in the chain.<a name="line.129"></a> <FONT color="green">130</FONT> * &lt;p&gt;<a name="line.130"></a> <FONT color="green">131</FONT> * NOTE: From v2.1, we have clarified the &lt;code&gt;Nestable&lt;/code&gt; interface<a name="line.131"></a> <FONT color="green">132</FONT> * such that this method matches subclasses.<a name="line.132"></a> <FONT color="green">133</FONT> * If you want to NOT match subclasses, please use<a name="line.133"></a> <FONT color="green">134</FONT> * {@link ExceptionUtils#indexOfThrowable(Throwable, Class, int)}<a name="line.134"></a> <FONT color="green">135</FONT> * (which is avaiable in all versions of lang).<a name="line.135"></a> <FONT color="green">136</FONT> *<a name="line.136"></a> <FONT color="green">137</FONT> * @param type the type to find, subclasses match, null returns -1<a name="line.137"></a> <FONT color="green">138</FONT> * @param fromIndex the index, numbered from 0, of the starting position in<a name="line.138"></a> <FONT color="green">139</FONT> * the chain to be searched<a name="line.139"></a> <FONT color="green">140</FONT> * @return index of the first occurrence of the type in the chain, or -1 if<a name="line.140"></a> <FONT color="green">141</FONT> * the type is not found<a name="line.141"></a> <FONT color="green">142</FONT> * @throws IndexOutOfBoundsException if the &lt;code&gt;fromIndex&lt;/code&gt; argument<a name="line.142"></a> <FONT color="green">143</FONT> * is negative or not less than the count of &lt;code&gt;Throwable&lt;/code&gt;s in the<a name="line.143"></a> <FONT color="green">144</FONT> * chain<a name="line.144"></a> <FONT color="green">145</FONT> */<a name="line.145"></a> <FONT color="green">146</FONT> public int indexOfThrowable(Class type, int fromIndex);<a name="line.146"></a> <FONT color="green">147</FONT> <a name="line.147"></a> <FONT color="green">148</FONT> /**<a name="line.148"></a> <FONT color="green">149</FONT> * Prints the stack trace of this exception to the specified print<a name="line.149"></a> <FONT color="green">150</FONT> * writer. Includes information from the exception, if any,<a name="line.150"></a> <FONT color="green">151</FONT> * which caused this exception.<a name="line.151"></a> <FONT color="green">152</FONT> *<a name="line.152"></a> <FONT color="green">153</FONT> * @param out &lt;code&gt;PrintWriter&lt;/code&gt; to use for output.<a name="line.153"></a> <FONT color="green">154</FONT> */<a name="line.154"></a> <FONT color="green">155</FONT> public void printStackTrace(PrintWriter out);<a name="line.155"></a> <FONT color="green">156</FONT> <a name="line.156"></a> <FONT color="green">157</FONT> /**<a name="line.157"></a> <FONT color="green">158</FONT> * Prints the stack trace of this exception to the specified print<a name="line.158"></a> <FONT color="green">159</FONT> * stream. Includes information from the exception, if any,<a name="line.159"></a> <FONT color="green">160</FONT> * which caused this exception.<a name="line.160"></a> <FONT color="green">161</FONT> *<a name="line.161"></a> <FONT color="green">162</FONT> * @param out &lt;code&gt;PrintStream&lt;/code&gt; to use for output.<a name="line.162"></a> <FONT color="green">163</FONT> */<a name="line.163"></a> <FONT color="green">164</FONT> public void printStackTrace(PrintStream out);<a name="line.164"></a> <FONT color="green">165</FONT> <a name="line.165"></a> <FONT color="green">166</FONT> /**<a name="line.166"></a> <FONT color="green">167</FONT> * Prints the stack trace for this exception only--root cause not<a name="line.167"></a> <FONT color="green">168</FONT> * included--using the provided writer. Used by<a name="line.168"></a> <FONT color="green">169</FONT> * {@link org.apache.commons.lang.exception.NestableDelegate} to write<a name="line.169"></a> <FONT color="green">170</FONT> * individual stack traces to a buffer. The implementation of<a name="line.170"></a> <FONT color="green">171</FONT> * this method should call<a name="line.171"></a> <FONT color="green">172</FONT> * &lt;code&gt;super.printStackTrace(out);&lt;/code&gt; in most cases.<a name="line.172"></a> <FONT color="green">173</FONT> *<a name="line.173"></a> <FONT color="green">174</FONT> * @param out The writer to use.<a name="line.174"></a> <FONT color="green">175</FONT> */<a name="line.175"></a> <FONT color="green">176</FONT> public void printPartialStackTrace(PrintWriter out);<a name="line.176"></a> <FONT color="green">177</FONT> <a name="line.177"></a> <FONT color="green">178</FONT> }<a name="line.178"></a> </PRE> </BODY> </HTML>
{ "content_hash": "01e503a1360088e55b13326b7d7b8431", "timestamp": "", "source": "github", "line_count": 229, "max_line_length": 163, "avg_line_length": 70.09170305676857, "alnum_prop": 0.6207089900940751, "repo_name": "seeseekey/jenet", "id": "eda36176bf19f9e98c7e11696a0dddc6fdb29ca0", "size": "17686", "binary": false, "copies": "6", "ref": "refs/heads/master", "path": "libs/commons-lang-2.6/apidocs/src-html/org/apache/commons/lang/exception/Nestable.html", "mode": "33188", "license": "mit", "language": [ { "name": "Java", "bytes": "234374" } ], "symlink_target": "" }
FROM nodesource/vivid-base MAINTAINER William Blankenship <[email protected]> RUN curl https://deb.nodesource.com/iojs_2.x/pool/main/i/iojs/iojs_2.2.1-1nodesource1~vivid1_amd64.deb > node.deb \ && dpkg -i node.deb \ && rm node.deb RUN npm install -g pangyp\ && ln -s $(which pangyp) $(dirname $(which pangyp))/node-gyp\ && npm cache clear\ && node-gyp configure || echo "" ENV NODE_ENV production WORKDIR /usr/src/app CMD ["npm","start"] RUN apt-get update \ && apt-get upgrade -y --force-yes \ && rm -rf /var/lib/apt/lists/*;
{ "content_hash": "ed49708f4ebb581d50d3930b401d06ad", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 115, "avg_line_length": 28.789473684210527, "alnum_prop": 0.6910420475319927, "repo_name": "nodesource/docker-node", "id": "85f45ab55b034d8073d6359a76793c70d50a06fb", "size": "547", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "ubuntu/vivid/iojs/2.2.1/Dockerfile", "mode": "33188", "license": "mit", "language": [ { "name": "JavaScript", "bytes": "6919" }, { "name": "Makefile", "bytes": "791" } ], "symlink_target": "" }
.. include:: ../INSTALLATION.rst
{ "content_hash": "0086d745c0ea59d5cd27d7d0d24c134c", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 32, "avg_line_length": 33, "alnum_prop": 0.6666666666666666, "repo_name": "steven-murray/halomod", "id": "469b998861189d81e609d5e9308225677d8dcffc", "size": "33", "binary": false, "copies": "6", "ref": "refs/heads/master", "path": "docs/installation.rst", "mode": "33188", "license": "mit", "language": [ { "name": "Fortran", "bytes": "23761" }, { "name": "Jupyter Notebook", "bytes": "106960" }, { "name": "Python", "bytes": "180580" } ], "symlink_target": "" }
package proguard.evaluation; import proguard.classfile.Clazz; import proguard.classfile.attribute.CodeAttribute; import proguard.evaluation.value.InstructionOffsetValue; /** * This BranchUnit remembers the branch unit commands that are invoked on it. * I doesn't consider conditions when branching. * * @author Eric Lafortune */ public class BasicBranchUnit implements BranchUnit { private boolean wasCalled; private InstructionOffsetValue traceBranchTargets; /** * Resets the flag that tells whether any of the branch unit commands was * called. */ public void resetCalled() { wasCalled = false; } /** * Sets the flag that tells whether any of the branch unit commands was * called. */ protected void setCalled() { wasCalled = true; } /** * Returns whether any of the branch unit commands was called. */ public boolean wasCalled() { return wasCalled; } /** * Sets the initial branch targets, which will be updated as the branch * methods of the branch unit are called. */ public void setTraceBranchTargets(InstructionOffsetValue branchTargets) { this.traceBranchTargets = branchTargets; } public InstructionOffsetValue getTraceBranchTargets() { return traceBranchTargets; } // Implementations for BranchUnit. public void branch(Clazz clazz, CodeAttribute codeAttribute, int offset, int branchTarget) { // Override the branch targets. traceBranchTargets = new InstructionOffsetValue(branchTarget); wasCalled = true; } public void branchConditionally(Clazz clazz, CodeAttribute codeAttribute, int offset, int branchTarget, int conditional) { // Accumulate the branch targets. traceBranchTargets = traceBranchTargets.generalize(new InstructionOffsetValue(branchTarget)).instructionOffsetValue(); wasCalled = true; } public void returnFromMethod() { // Stop processing this block. traceBranchTargets = InstructionOffsetValue.EMPTY_VALUE; wasCalled = true; } public void throwException() { // Stop processing this block. traceBranchTargets = InstructionOffsetValue.EMPTY_VALUE; wasCalled = true; } }
{ "content_hash": "b7e5422be5f5f9ca9244af9dd73c2f74", "timestamp": "", "source": "github", "line_count": 107, "max_line_length": 109, "avg_line_length": 24.850467289719628, "alnum_prop": 0.5987213238059421, "repo_name": "0x90sled/droidtowers", "id": "1c0188887f5bbc636d8eeb2f79e7bf67f3e709dc", "size": "3557", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "tools/proguard/src/proguard/evaluation/BasicBranchUnit.java", "mode": "33188", "license": "mit", "language": [ { "name": "C#", "bytes": "3063" }, { "name": "HTML", "bytes": "138067" }, { "name": "Java", "bytes": "8129289" }, { "name": "OpenEdge ABL", "bytes": "13997" }, { "name": "Python", "bytes": "29062" }, { "name": "Shell", "bytes": "4114" } ], "symlink_target": "" }
@implementation PlayerDanmakuAndSubtitleViewController - (void)viewDidLoad { [super viewDidLoad]; [self.view setWantsLayer:YES]; self.view.layer.backgroundColor = DDPRGBAColor(0, 0, 0, 0.5).CGColor; [self addChildViewController:self.danmakuVC]; [self.view addSubview:_danmakuVC.view]; [self addChildViewController:self.subtitleVC]; [self.view addSubview:_subtitleVC.view]; [_danmakuVC.view mas_makeConstraints:^(MASConstraintMaker *make) { make.top.left.bottom.mas_equalTo(0); make.right.equalTo(self.subtitleVC.view.mas_left); }]; [_subtitleVC.view mas_makeConstraints:^(MASConstraintMaker *make) { make.top.right.bottom.mas_equalTo(0); make.width.equalTo(self.danmakuVC.view.mas_width); }]; } - (void)startPlayNotice:(NSNotification *)sender { } #pragma mark - 懒加载 - (PlayerDanmakuViewController *)danmakuVC { if(_danmakuVC == nil) { _danmakuVC = [[PlayerDanmakuViewController alloc] initWithNibName:@"PlayerDanmakuViewController" bundle:nil]; } return _danmakuVC; } - (PlayerSubtitleViewController *)subtitleVC { if(_subtitleVC == nil) { _subtitleVC = [[PlayerSubtitleViewController alloc] initWithNibName:@"PlayerSubtitleViewController" bundle:nil]; } return _subtitleVC; } @end
{ "content_hash": "0fac76217a01bb1d9c8497e5836ed876", "timestamp": "", "source": "github", "line_count": 44, "max_line_length": 120, "avg_line_length": 30.204545454545453, "alnum_prop": 0.6945071482317532, "repo_name": "sunsx9316/DanDanPlayForMac", "id": "917f23eb38cf4cb8a9fdc1bc69a91f0961873583", "size": "1555", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "DanDanPlayForMac/ViewController/PlayerDanmakuAndSubtitleViewController.m", "mode": "33188", "license": "mit", "language": [ { "name": "Objective-C", "bytes": "636306" }, { "name": "Ruby", "bytes": "2083" } ], "symlink_target": "" }
'use strict'; const Audit = require('../../../audits/accessibility/color-contrast.js'); const assert = require('assert'); /* eslint-env mocha */ describe('Accessibility: color-contrast audit', () => { it('generates an audit output', () => { const artifacts = { Accessibility: { violations: [{ id: 'color-contrast', nodes: [], help: 'http://example.com/' }] } }; const output = Audit.audit(artifacts); assert.equal(output.rawValue, false); assert.equal(output.displayValue, ''); }); it('generates an audit output (single node)', () => { const artifacts = { Accessibility: { violations: [{ id: 'color-contrast', nodes: [{}], help: 'http://example.com/' }] } }; const output = Audit.audit(artifacts); assert.equal(output.rawValue, false); assert.equal(output.displayValue, ''); }); });
{ "content_hash": "caa5c3f0deaa8d6feaadc5f1bea830f5", "timestamp": "", "source": "github", "line_count": 41, "max_line_length": 73, "avg_line_length": 23.26829268292683, "alnum_prop": 0.5482180293501048, "repo_name": "tommycli/lighthouse", "id": "618286d477c6d6e58729f344e469032a181419ff", "size": "1582", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "lighthouse-core/test/audits/accessibility/color-contrast-test.js", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "50982" }, { "name": "HTML", "bytes": "55706" }, { "name": "JavaScript", "bytes": "973882" }, { "name": "Ruby", "bytes": "3249" }, { "name": "Shell", "bytes": "2316" }, { "name": "TypeScript", "bytes": "37453" } ], "symlink_target": "" }
package org.knowm.xchange.dsx.service; import org.knowm.xchange.Exchange; import org.knowm.xchange.dsx.DSXAuthenticatedV3; import org.knowm.xchange.dsx.service.core.DSXTradeServiceCore; /** @author Pavel Chertalev */ public class DSXTradeServiceV3 extends DSXTradeServiceCore<DSXAuthenticatedV3> { public DSXTradeServiceV3(Exchange exchange) { super(exchange, DSXAuthenticatedV3.class); } }
{ "content_hash": "8f5f0ba390eff47216cec44b4e018699", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 80, "avg_line_length": 33.416666666666664, "alnum_prop": 0.8079800498753117, "repo_name": "ww3456/XChange", "id": "da510e6f5b9ce6919f7a5cb6ab5df27a8d359ef8", "size": "401", "binary": false, "copies": "3", "ref": "refs/heads/develop", "path": "xchange-dsx/src/main/java/org/knowm/xchange/dsx/service/DSXTradeServiceV3.java", "mode": "33188", "license": "mit", "language": [ { "name": "Java", "bytes": "7790130" } ], "symlink_target": "" }
package org.apache.kafka.streams.kstream; /** * The {@link KeyValueMapper} interface for mapping a key-value pair to a new value (could be another key-value pair). * * @param <K> original key type * @param <V> original value type * @param <R> mapped value type */ public interface KeyValueMapper<K, V, R> { /** * Map a record with the given key and value to a new value. * * @param key the key of the record * @param value the value of the record * @return the new value */ R apply(K key, V value); }
{ "content_hash": "ba515d70a77abb7dd739f17bbdd61c6e", "timestamp": "", "source": "github", "line_count": 22, "max_line_length": 118, "avg_line_length": 25.681818181818183, "alnum_prop": 0.6247787610619469, "repo_name": "eribeiro/kafka", "id": "b36ed63586a5416bfb87b9fb7b085bca433295cc", "size": "1366", "binary": false, "copies": "8", "ref": "refs/heads/trunk", "path": "streams/src/main/java/org/apache/kafka/streams/kstream/KeyValueMapper.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "25631" }, { "name": "HTML", "bytes": "5443" }, { "name": "Java", "bytes": "6254418" }, { "name": "Python", "bytes": "462640" }, { "name": "Scala", "bytes": "3469375" }, { "name": "Shell", "bytes": "54956" }, { "name": "XSLT", "bytes": "7116" } ], "symlink_target": "" }
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>Chosen: A jQuery Plugin by Harvest to Tame Unwieldy Select Boxes</title> <link rel="stylesheet" href="docsupport/style.css"> <link rel="stylesheet" href="docsupport/prism.css"> <link rel="stylesheet" href="chosen.css"> <style type="text/css" media="all"> /* fix rtl for demo */ .chosen-rtl .chosen-drop { left: -9000px; } </style> </head> <body> <div id="container"> <div id="content"> <header> <h1>Chosen <small>(<span id="latest-version">v1.6.2</span>)</small></h1> </header> <p>Chosen has a number of options and attributes that allow you to have full control of your select boxes.</p> <h2><a name="options" class="anchor" href="#options">Options</a></h2> <p>The following options are available to pass into Chosen on instantiation.</p> <h3>Example:</h3> <pre> <code class="language-javascript">$(".my_select_box").chosen({ disable_search_threshold: 10, no_results_text: "Oops, nothing found!", width: "95%" });</code> </pre> <table class="docs-table"> <tr> <th>Option</th><th>Default</th><th>Description</th> </tr> <tr> <td>allow_single_deselect</td> <td>false</td> <td>When set to <code class="language-javascript">true</code> on a single select, Chosen adds a UI element which selects the first element (if it is blank).</td> </tr> <tr> <td>disable_search</td> <td>false</td> <td>When set to <code class="language-javascript">true</code>, Chosen will not display the search field (single selects only).</td> </tr> <tr> <td>disable_search_threshold</td> <td>0</td> <td>Hide the search input on single selects if there are <i>n</i> or fewer options.</td> </tr> <tr> <td>enable_split_word_search</td> <td>true</td> <td>By default, searching will match on any word within an option tag. Set this option to <code class="language-javascript">false</code> if you want to only match on the entire text of an option tag.</td> </tr> <tr> <td>inherit_select_classes</td> <td>false</td> <td>When set to <code class="language-javascript">true</code>, Chosen will grab any classes on the original select field and add them to Chosen’s container div.</td> </tr> <tr> <td>max_selected_options</td> <td>Infinity</td> <td>Limits how many options the user can select. When the limit is reached, the <code class="language-javascript">chosen:maxselected</code> event is triggered.</td> </tr> <tr> <td>no_results_text</td> <td>"No results match"</td> <td>The text to be displayed when no matching results are found. The current search is shown at the end of the text (<i>e.g.</i>, No results match "Bad Search").</td> </tr> <tr> <td>placeholder_text_multiple</td> <td>"Select Some Options"</td> <td>The text to be displayed as a placeholder when no options are selected for a multiple select.</td> </tr> <tr> <td>placeholder_text_single</td> <td>"Select an Option"</td> <td>The text to be displayed as a placeholder when no options are selected for a single select.</td> </tr> <tr> <td>search_contains</td> <td>false</td> <td>By default, Chosen’s search matches starting at the beginning of a word. Setting this option to <code class="language-javascript">true</code> allows matches starting from anywhere within a word. This is especially useful for options that include a lot of special characters or phrases in ()s and []s.</td> </tr> <tr> <td>single_backstroke_delete</td> <td>true</td> <td>By default, pressing delete/backspace on multiple selects will remove a selected choice. When <code class="language-javascript">false</code>, pressing delete/backspace will highlight the last choice, and a second press deselects it.</td> </tr> <tr> <td>width</td> <td>Original select width.</td> <td>The width of the Chosen select box. By default, Chosen attempts to match the width of the select box you are replacing. If your select is hidden when Chosen is instantiated, you must specify a width or the select will show up with a width of 0.</td> </tr> <tr> <td>display_disabled_options</td> <td>true</td> <td>By default, Chosen includes disabled options in search results with a special styling. Setting this option to false will hide disabled results and exclude them from searches.</td> </tr> <tr> <td>display_selected_options</td> <td>true</td> <td> <p>By default, Chosen includes selected options in search results with a special styling. Setting this option to false will hide selected results and exclude them from searches.</p> <p><strong>Note:</strong> this is for multiple selects only. In single selects, the selected result will always be displayed.</p> </td> </tr> <tr> <td>include_group_label_in_selected</td> <td>false</td> <td> <p>By default, Chosen only shows the text of a selected option. Setting this option to <code class="language-javascript">true</code> will show the text and group (if any) of the selected option.</p> </td> </tr> <tr> <td>max_shown_results</td> <td>Infinity</td> <td> <p>Only show the first (n) matching options in the results. This can be used to increase performance for selects with very many options.</p> </td> </tr> <tr> <td>case_sensitive_search</td> <td>false</td> <td> <p>By default Chosen's search is case-insensitive. Setting this option to <code class="language-javascript">true</code> makes the search case-sensitive.</p> </td> </tr> </table> <h2><a name="attributes" class="anchor" href="#attributes">Attributes</a></h2> <p>Certain attributes placed on the select tag or its options can be used to configure Chosen.</p> <h3>Example:</h3> <pre> <code class="language-markup">&lt;select class="my_select_box" data-placeholder="Select Your Options"&gt; &lt;option value="1"&gt;Option 1&lt;/option&gt; &lt;option value="2" selected&gt;Option 2&lt;/option&gt; &lt;option value="3" disabled&gt;Option 3&lt;/option&gt; &lt;/select&gt;</code> </pre> <table class="docs-table"> <tr> <th>Attribute</th><th>Description</th> </tr> <tr> <td>data-placeholder</td> <td> <p>The text to be displayed as a placeholder when no options are selected for a select. Defaults to "Select an Option" for single selects or "Select Some Options" for multiple selects.</p> <p><strong>Note:</strong>This attribute overrides anything set in the <code class="language-javascript">placeholder_text_multiple</code> or <code class="language-javascript">placeholder_text_single</code> options.</p> </td> </tr> <tr> <td>multiple</td> <td>The attribute <code class="language-html">multiple</code> on your select box dictates whether Chosen will render a multiple or single select.</td> </tr> <tr> <td>selected, disabled</td> <td>Chosen automatically highlights selected options and disables disabled options.</td> </tr> </table> <h2><a name="classes" class="anchor" href="#classes">Classes</a></h2> <p>Classes placed on the select tag can be used to configure Chosen.</p> <h3>Example:</h3> <pre> <code class="language-markup">&lt;select class="my_select_box chosen-rtl"&gt; &lt;option value="1"&gt;Option 1&lt;/option&gt; &lt;option value="2"&gt;Option 2&lt;/option&gt; &lt;option value="3"&gt;Option 3&lt;/option&gt; &lt;/select&gt;</code> </pre> <table class="docs-table"> <tr> <th>Classname</th> <th>Description</th> </tr> <tr> <td>chosen-rtl</td> <td> <p>Chosen supports right-to-left text in select boxes. Add the class <code class="language-html">chosen-rtl</code> to your select tag to support right-to-left text options.</p> <p><strong>Note:</strong> The <code class="language-html">chosen-rtl</code> class will pass through to the Chosen select even when the <code class="language-javascript">inherit_select_classes</code> option is set to <code class="language-javascript">false</code>.</p> </td> </tr> </table> <h2><a name="triggered-events" class="anchor" href="#triggered-events">Triggered Events</a></h2> <p>Chosen triggers a number of standard and custom events on the original select field.</p> <h3>Example:</h3> <pre> <code class="language-javascript">$('.my_select_box').on('change', function(evt, params) { do_something(evt, params); });</code> </pre> <table class="docs-table"> <tr> <th>Event</th><th>Description</th> </tr> <tr> <td>change</td> <td> <p>Chosen triggers the standard DOM event whenever a selection is made (it also sends a <code class="language-javascript">selected</code> or <code class="language-javascript">deselected</code> parameter that tells you which option was changed).</p> <p><strong>Note:</strong> in order to use change in the Prototype version, you have to include the <a href="https://github.com/kangax/protolicious/blob/5b56fdafcd7d7662c9d648534225039b2e78e371/event.simulate.js">Event.simulate</a> class. The selected and deselected parameters are not available for Prototype.</p> </td> </tr> <tr> <td>chosen:ready</td> <td>Triggered after Chosen has been fully instantiated.</td> </tr> <tr> <td>chosen:maxselected</td> <td>Triggered if <code class="language-javascript">max_selected_options</code> is set and that total is broken.</td> </tr> <tr> <td>chosen:showing_dropdown</td> <td>Triggered when Chosen’s dropdown is opened.</td> </tr> <tr> <td>chosen:hiding_dropdown</td> <td>Triggered when Chosen’s dropdown is closed.</td> </tr> <tr> <td>chosen:no_results</td> <td>Triggered when a search returns no matching results.</td> </tr> </table> <p> <strong>Note:</strong> all custom Chosen events (those that begin with <code class="language-javascript">chosen:</code>) also include the <code class="language-javascript">chosen</code> object as a parameter. </p> <h2><a name="triggerable-events" class="anchor" href="#triggerable-events">Triggerable Events</a></h2> <p>You can trigger several events on the original select field to invoke a behavior in Chosen.</p> <h3>Example:</h3> <pre> <code class="language-javascript">// tell Chosen that a select has changed $('.my_select_box').trigger('chosen:updated');</code> </pre> <table class="docs-table"> <tr> <th>Event</th><th>Description</th> </tr> <tr> <td>chosen:updated</td> <td>This event should be triggered whenever Chosen’s underlying select element changes (such as a change in selected options).</td> </tr> <tr> <td>chosen:activate</td> <td>This is the equivalant of focusing a standard HTML select field. When activated, Chosen will capure keypress events as if you had clicked the field directly.</td> </tr> <tr> <td>chosen:open</td> <td>This event activates Chosen and also displays the search results.</td> </tr> <tr> <td>chosen:close</td> <td>This event deactivates Chosen and hides the search results.</td> </tr> </table> <footer> &copy; 2011&ndash;2016 <a href="http://www.getharvest.com/">Harvest</a>. Chosen is licensed under the <a href="https://github.com/harvesthq/chosen/blob/master/LICENSE.md">MIT license</a>. </footer> </div> </div> <div class="oss-bar"> <ul> <li><a class="fork" href="https://github.com/harvesthq/chosen">Fork on Github</a></li> <li><a class="harvest" href="http://www.getharvest.com/">Built by Harvest</a></li> </ul> </div> <script src="docsupport/prism.js" type="text/javascript" charset="utf-8"></script> </body> </html>
{ "content_hash": "3da0f486dc0ddc7fcd374bb136702438", "timestamp": "", "source": "github", "line_count": 290, "max_line_length": 325, "avg_line_length": 44.6, "alnum_prop": 0.6126488325344055, "repo_name": "liorch88/chosen", "id": "8344e252df29c05399f6785fdf5c5db79af7c269", "size": "12944", "binary": false, "copies": "32", "ref": "refs/heads/master", "path": "public/options.html", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "18392" }, { "name": "CoffeeScript", "bytes": "59325" }, { "name": "HTML", "bytes": "185853" }, { "name": "JavaScript", "bytes": "2128" }, { "name": "Ruby", "bytes": "424" }, { "name": "Shell", "bytes": "1107" } ], "symlink_target": "" }
package com.lambdaworks.redis.resource; import java.io.Closeable; import java.io.IOException; import java.net.InetAddress; import java.net.UnknownHostException; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Properties; import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingEnumeration; import javax.naming.NamingException; import javax.naming.directory.Attribute; import javax.naming.directory.Attributes; import javax.naming.directory.InitialDirContext; import com.google.common.net.InetAddresses; import com.lambdaworks.redis.LettuceStrings; import com.lambdaworks.redis.internal.LettuceAssert; /** * DNS Resolver based on Java's {@link com.sun.jndi.dns.DnsContextFactory}. This resolver resolves hostnames to IPv4 and IPv6 * addresses using {@code A}, {@code AAAA} and {@code CNAME} records. Java IP stack preferences are read from system properties * and taken into account when resolving names. * <p> * The default configuration uses system-configured DNS server addresses to perform lookups but server adresses can be specified * using {@link #DirContextDnsResolver(Iterable)}. Custom DNS servers can be specified by using * {@link #DirContextDnsResolver(String)} or {@link #DirContextDnsResolver(Iterable)}. * </p> * * @author Mark Paluch * @since 4.2 */ public class DirContextDnsResolver implements DnsResolver, Closeable { static final String PREFER_IPV4_KEY = "java.net.preferIPv4Stack"; static final String PREFER_IPV6_KEY = "java.net.preferIPv6Stack"; private static final String CTX_FACTORY_NAME = "com.sun.jndi.dns.DnsContextFactory"; private static final String INITIAL_TIMEOUT = "com.sun.jndi.dns.timeout.initial"; private static final String LOOKUP_RETRIES = "com.sun.jndi.dns.timeout.retries"; private static final String DEFAULT_INITIAL_TIMEOUT = "1000"; private static final String DEFAULT_RETRIES = "4"; private final boolean preferIpv4; private final boolean preferIpv6; private final Properties properties; private final InitialDirContext context; /** * Creates a new {@link DirContextDnsResolver} using system-configured DNS servers. */ public DirContextDnsResolver() { this(new Properties(), new StackPreference()); } /** * Creates a new {@link DirContextDnsResolver} using a collection of DNS servers. * * @param dnsServer must not be {@literal null} and not empty. */ public DirContextDnsResolver(String dnsServer) { this(Collections.singleton(dnsServer)); } /** * Creates a new {@link DirContextDnsResolver} using a collection of DNS servers. * * @param dnsServers must not be {@literal null} and not empty. */ public DirContextDnsResolver(Iterable<String> dnsServers) { this(getProperties(dnsServers), new StackPreference()); } /** * Creates a new {@link DirContextDnsResolver} for the given stack preference and {@code properties}. * * @param preferIpv4 flag to prefer IPv4 over IPv6 address resolution. * @param preferIpv6 flag to prefer IPv6 over IPv4 address resolution. * @param properties custom properties for creating the context, must not be {@literal null}. */ public DirContextDnsResolver(boolean preferIpv4, boolean preferIpv6, Properties properties) { this.preferIpv4 = preferIpv4; this.preferIpv6 = preferIpv6; this.properties = properties; this.context = createContext(properties); } private DirContextDnsResolver(Properties properties, StackPreference stackPreference) { this.properties = new Properties(properties); this.preferIpv4 = stackPreference.preferIpv4; this.preferIpv6 = stackPreference.preferIpv6; this.context = createContext(properties); } private InitialDirContext createContext(Properties properties) { LettuceAssert.notNull(properties, "Properties must not be null"); Properties hashtable = (Properties) properties.clone(); hashtable.put(InitialContext.INITIAL_CONTEXT_FACTORY, CTX_FACTORY_NAME); if (!hashtable.containsKey(INITIAL_TIMEOUT)) { hashtable.put(INITIAL_TIMEOUT, DEFAULT_INITIAL_TIMEOUT); } if (!hashtable.containsKey(LOOKUP_RETRIES)) { hashtable.put(LOOKUP_RETRIES, DEFAULT_RETRIES); } try { return new InitialDirContext(hashtable); } catch (NamingException e) { throw new IllegalStateException(e); } } @Override public void close() throws IOException { try { context.close(); } catch (NamingException e) { throw new IOException(e); } } /** * Perform hostname to address resolution. * * @param host the hostname, must not be empty or {@literal null}. * @return array of one or more {@link InetAddress adresses} * @throws UnknownHostException */ @Override public InetAddress[] resolve(String host) throws UnknownHostException { if (InetAddresses.isInetAddress(host)) { return new InetAddress[] { InetAddresses.forString(host) }; } List<InetAddress> inetAddresses = new ArrayList<>(); try { resolve(host, inetAddresses); } catch (NamingException e) { throw new UnknownHostException(String.format("Cannot resolve %s to a hostname because of %s", host, e)); } if (inetAddresses.isEmpty()) { throw new UnknownHostException(String.format("Cannot resolve %s to a hostname", host)); } return inetAddresses.toArray(new InetAddress[inetAddresses.size()]); } /** * Resolve a hostname * * @param hostname * @param inetAddresses * @throws NamingException * @throws UnknownHostException */ private void resolve(String hostname, List<InetAddress> inetAddresses) throws NamingException, UnknownHostException { if (preferIpv6 || (!preferIpv4 && !preferIpv6)) { inetAddresses.addAll(resolve(hostname, "AAAA")); inetAddresses.addAll(resolve(hostname, "A")); } else { inetAddresses.addAll(resolve(hostname, "A")); inetAddresses.addAll(resolve(hostname, "AAAA")); } if (inetAddresses.isEmpty()) { inetAddresses.addAll(resolveCname(hostname)); } } /** * Resolves {@code CNAME} records to {@link InetAddress adresses}. * * @param hostname * @return * @throws NamingException */ @SuppressWarnings("rawtypes") private List<InetAddress> resolveCname(String hostname) throws NamingException { List<InetAddress> inetAddresses = new ArrayList<>(); Attributes attrs = context.getAttributes(hostname, new String[] { "CNAME" }); Attribute attr = attrs.get("CNAME"); if (attr != null && attr.size() > 0) { NamingEnumeration e = attr.getAll(); while (e.hasMore()) { String h = (String) e.next(); if (h.endsWith(".")) { h = h.substring(0, h.lastIndexOf('.')); } try { InetAddress[] resolved = resolve(h); for (InetAddress inetAddress : resolved) { inetAddresses.add(InetAddress.getByAddress(hostname, inetAddress.getAddress())); } } catch (UnknownHostException e1) { // ignore } } } return inetAddresses; } /** * Resolve an attribute for a hostname. * * @param hostname * @param attrName * @return * @throws NamingException * @throws UnknownHostException */ @SuppressWarnings("rawtypes") private List<InetAddress> resolve(String hostname, String attrName) throws NamingException, UnknownHostException { Attributes attrs = context.getAttributes(hostname, new String[] { attrName }); List<InetAddress> inetAddresses = new ArrayList<>(); Attribute attr = attrs.get(attrName); if (attr != null && attr.size() > 0) { NamingEnumeration e = attr.getAll(); while (e.hasMore()) { InetAddress inetAddress = InetAddress.getByName("" + e.next()); inetAddresses.add(InetAddress.getByAddress(hostname, inetAddress.getAddress())); } } return inetAddresses; } private static Properties getProperties(Iterable<String> dnsServers) { Properties properties = new Properties(); StringBuffer providerUrl = new StringBuffer(); for (String dnsServer : dnsServers) { LettuceAssert.isTrue(LettuceStrings.isNotEmpty(dnsServer), "DNS Server must not be empty"); if (providerUrl.length() != 0) { providerUrl.append(' '); } providerUrl.append(String.format("dns://%s", dnsServer)); } if (providerUrl.length() == 0) { throw new IllegalArgumentException("DNS Servers must not be empty"); } properties.put(Context.PROVIDER_URL, providerUrl.toString()); return properties; } /** * Stack preference utility. */ private static final class StackPreference { final boolean preferIpv4; final boolean preferIpv6; public StackPreference() { boolean preferIpv4 = false; boolean preferIpv6 = false; if (System.getProperty(PREFER_IPV4_KEY) == null && System.getProperty(PREFER_IPV6_KEY) == null) { preferIpv4 = false; preferIpv6 = false; } if (System.getProperty(PREFER_IPV4_KEY) == null && System.getProperty(PREFER_IPV6_KEY) != null) { preferIpv6 = Boolean.getBoolean(PREFER_IPV6_KEY); if (!preferIpv6) { preferIpv4 = true; } } if (System.getProperty(PREFER_IPV4_KEY) != null && System.getProperty(PREFER_IPV6_KEY) == null) { preferIpv4 = Boolean.getBoolean(PREFER_IPV4_KEY); if (!preferIpv4) { preferIpv6 = true; } } if (System.getProperty(PREFER_IPV4_KEY) != null && System.getProperty(PREFER_IPV6_KEY) != null) { preferIpv4 = Boolean.getBoolean(PREFER_IPV4_KEY); preferIpv6 = Boolean.getBoolean(PREFER_IPV6_KEY); } this.preferIpv4 = preferIpv4; this.preferIpv6 = preferIpv6; } } }
{ "content_hash": "ef0a909fdd3dd54a4533ea07d6fb22c0", "timestamp": "", "source": "github", "line_count": 322, "max_line_length": 128, "avg_line_length": 33.54037267080745, "alnum_prop": 0.6312962962962962, "repo_name": "CiNC0/Cartier", "id": "88dadff52f61f7c92a6da0e861e5bf19e211c7f9", "size": "11420", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "cartier-redis/src/main/java/com/lambdaworks/redis/resource/DirContextDnsResolver.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "891" }, { "name": "Java", "bytes": "6775528" }, { "name": "Makefile", "bytes": "13867" }, { "name": "Python", "bytes": "251197" }, { "name": "Ruby", "bytes": "226" }, { "name": "Shell", "bytes": "117358" }, { "name": "Swift", "bytes": "18348" } ], "symlink_target": "" }
#include "HTGAvatarView.h" static int32 kMargin = 5; HTGAvatarView::HTGAvatarView(twitCurl* twitObj, BHandler* parent, BRect frame, uint32 resizingMode) : BView(frame, "AvatarView", resizingMode, B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE) { SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); avatarTweet = NULL; this->twitObj = twitObj; displayAvatar = true; fParent = parent; //Set up text view BRect viewRect(5,22,frame.right-60,45); fMessage = new HTGTextView(viewRect, "Text", BRect(5,5,viewRect.right-5,viewRect.bottom-5), B_FOLLOW_LEFT_RIGHT, B_WILL_DRAW); AddChild(fMessage); //Set up post button fPostButton = new BButton(BRect(frame.right-55, frame.top+1+kMargin, frame.right-5, frame.top), NULL, "Tweet", new BMessage(POST)); fPostButton->SetEnabled(false); //Set up symbol counter fCounterView = new BStringView(BRect(frame.right-40, frame.top+1+kMargin+fPostButton->Bounds().Height(), frame.right-15, frame.top+1+kMargin+fPostButton->Bounds().Height()+12), "Counter", "140"); fCounterView->SetHighColor(128, 128, 128); } void HTGAvatarView::SetAvatarTweet(HTTweet* theTweet) { avatarTweet = theTweet; avatarTweet->setView(this); Invalidate(); } HTGAvatarView::~HTGAvatarView() { delete twitObj; if(avatarTweet != NULL) delete avatarTweet; } void HTGAvatarView::AttachedToWindow() { if ( Parent() ) SetViewColor(Parent()->ViewColor()); fMessage->WindowActivated(true); BView::AttachedToWindow(); } void HTGAvatarView::_UpdateCounter() { char counterString[32]; int symbolsLeft = NUMBER_OF_ALLOWED_CHARS; /*Calculate the number of characters left*/ int utf8length = 0; uchar c; for(int i=0; (c=fMessage->ByteAt(i))!='\0'; i++) { if ((c&0x80) == 0) { // UTF-8 single byte char utf8length++; } else if ((c&0xc0) != 0x80) { // first byte of UTF-8 multi byte character utf8length++; } } symbolsLeft -= utf8length; sprintf(counterString, "%i", symbolsLeft); /*Check symbolsLeft, disable/enable post button and change counter color.*/ if(symbolsLeft < 0) { fCounterView->SetHighColor(255, 0, 0); fPostButton->SetEnabled(false); } else if(symbolsLeft < 140) { fCounterView->SetHighColor(128, 128, 128); fPostButton->SetEnabled(true); if(displayAvatar) { displayAvatar = false; Invalidate(); AddChild(fPostButton); AddChild(fCounterView); ResizeTo(Bounds().Width(), 83); BPoint buttonPoint(Frame().right-55, Frame().top+1+kMargin); BPoint counterPoint(Frame().right-40, Frame().top+1+kMargin+fPostButton->Bounds().Height()); fPostButton->MoveTo(buttonPoint); fCounterView->MoveTo(counterPoint); ((HTGMainWindow *)Window())->AvatarViewResized(); BRect textRect(5,22,Bounds().right-60,65); fMessage->ResizeTo(textRect.Width(), textRect.Height()); } } else if(symbolsLeft >= 140) { fPostButton->SetEnabled(false); ResizeTo(Bounds().Width(), 52); ((HTGMainWindow *)Window())->AvatarViewResized(); BRect textRect(5,22,Bounds().right-60,45); displayAvatar = true; Invalidate(); fPostButton->RemoveSelf(); fCounterView->RemoveSelf(); fMessage->ResizeTo(textRect.Width(), textRect.Height()); } fCounterView->SetText(counterString); } void HTGAvatarView::Draw(BRect updateRect) { if(avatarTweet == NULL) return; SetDrawingMode(B_OP_OVER); SetHighColor(000, 000, 000); MovePenTo(5, 17); DrawString("What's Happening, "); SetHighColor(051,102,152); DrawString(avatarTweet->getScreenName().c_str()); SetHighColor(000, 000, 000); DrawString("?"); //Draw avatar if(!avatarTweet->isDownloadingBitmap() && displayAvatar) { SetDrawingMode(B_OP_ALPHA); DrawBitmapAsync(avatarTweet->getBitmap(), _AvatarBounds()); SetDrawingMode(B_OP_OVER); } } BRect HTGAvatarView::_AvatarBounds() { BRect frame = Bounds(); BRect bounds = BRect(); bounds.left = frame.right-kMargin-48; bounds.top = frame.top+kMargin; bounds.right = bounds.left+48; bounds.bottom = bounds.top+48; return bounds; } void HTGAvatarView::MessageReceived(BMessage *msg) { switch(msg->what) { case POST: postTweet(); fMessage->SetText(""); _UpdateCounter(); break; case UPDATED: _UpdateCounter(); break; default: BView::MessageReceived(msg); } } void HTGAvatarView::postTweet() { std::string replyMsg( "" ); std::string replyId( "" ); std::string postMsg = urlEncode(fMessage->Text()); if( twitObj->statusUpdate(postMsg, replyId) ) { printf( "Status update: OK\n" ); twitObj->getLastWebResponse(replyMsg); int errorStart = replyMsg.find("<error>"); int errorEnd = replyMsg.find("<\error>"); if(errorStart-errorEnd > 0) HTGErrorHandling::displayError(replyMsg.substr(errorStart, errorEnd-errorStart).c_str()); else { // Send "status updated" to parent, so we can refresh timelines BMessage* statusUpdated = new BMessage(STATUS_UPDATED); statusUpdated->AddString("content", fMessage->Text()); fParent->MessageReceived(statusUpdated); } } else { //twitObj->getLastCurlError( replyMsg ); HTGErrorHandling::displayError("Oops, sorry! Looks like curl failed at some point..."); } } std::string HTGAvatarView::urlEncode(const char* input) { std::string output(input); for(size_t i = 0; i < output.length(); i++) { if(output[i] == '%') output.replace(i, 1, "%25"); if(output[i] == '&') output.replace(i, 1, "%26"); if(output[i] == '+') output.replace(i, 1, "%2B"); if(output[i] == '@') output.replace(i, 1, "%40"); if(output[i] == '?') output.replace(i, 1, "%3F"); if(output[i] == '=') output.replace(i, 1, "%3D"); if(output[i] == '$') output.replace(i, 1, "%24"); if(output[i] == '/') output.replace(i, 1, "%2F"); if(output[i] == ':') output.replace(i, 1, "%3A"); if(output[i] == ';') output.replace(i, 1, "%3B"); if(output[i] == ',') output.replace(i, 1, "%2C"); } return output; }
{ "content_hash": "b44d807db6df923b53b59300ed3268c6", "timestamp": "", "source": "github", "line_count": 229, "max_line_length": 196, "avg_line_length": 25.641921397379914, "alnum_prop": 0.6728542234332425, "repo_name": "HaikuArchives/HaikuTwitter", "id": "39aa228837fabb9f040fa886496cc6d3444003f5", "size": "6076", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/HTGAvatarView.cpp", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "8389" }, { "name": "C++", "bytes": "332691" }, { "name": "Makefile", "bytes": "5971" } ], "symlink_target": "" }
import { ChangeDetectorRef, Directive, ElementRef, forwardRef, HostListener, Inject, Input, OnInit, Renderer2 } from '@angular/core'; import { AbstractControl, NG_VALIDATORS, NG_VALUE_ACCESSOR, ValidationErrors, Validator } from '@angular/forms'; import { ALuDateAdapter, ELuDateGranularity } from '@lucca-front/ng/core'; import { ALuInput } from '@lucca-front/ng/input'; import { LuDateInputIntl } from './date-input.intl'; import { ILuDateInputLabel } from './date-input.translate'; @Directive({ selector: 'input[luDateInput]', providers: [ { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => LuDateInputDirective), multi: true, }, { provide: NG_VALIDATORS, useExisting: LuDateInputDirective, multi: true, }, ], }) export class LuDateInputDirective<D> extends ALuInput<D, HTMLInputElement> implements Validator, OnInit { private _focused = false; @Input() min?: D; @Input() max?: D; @Input() granularity: ELuDateGranularity = ELuDateGranularity.day; @Input() override set placeholder(p: string) { this._elementRef.nativeElement.placeholder = p; } constructor( _changeDetectorRef: ChangeDetectorRef, _elementRef: ElementRef<HTMLInputElement>, _renderer: Renderer2, private _adapter: ALuDateAdapter<D>, @Inject(LuDateInputIntl) private _intl: ILuDateInputLabel, ) { super(_changeDetectorRef, _elementRef, _renderer); } ngOnInit() { switch (this.granularity) { case ELuDateGranularity.year: this.placeholder = this._intl.placeholderYear; break; case ELuDateGranularity.month: this.placeholder = this._intl.placeholderMonth; break; case ELuDateGranularity.day: default: this.placeholder = this._intl.placeholderDay; break; } } protected render() { if (this._focused) { return; } let format: string; switch (this.granularity) { case ELuDateGranularity.year: format = this._intl.formatYear; break; case ELuDateGranularity.month: format = this._intl.formatMonth; break; case ELuDateGranularity.day: default: format = this._intl.formatDay; break; } const text = this.value && this._adapter.isValid(this.value) ? this._adapter.format(this.value, format) : ''; this._elementRef.nativeElement.value = text; } @HostListener('input', ['$event']) onInput(event) { // FIXME // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access const text = event.target.value as string; const value = this.parse(text); this.setValue(value); } private parse(text: string): D { const date = this._adapter.parse(text, this.granularity); return date; } @HostListener('focus') onFocus() { this._focused = true; } @HostListener('blur') onBlur() { this._focused = false; this.render(); } validate(control: AbstractControl): ValidationErrors | null { const d = control.value as D; if (!d) { return null; } if (!this._adapter.isValid(d)) { return { date: true }; } if (!!this.min && this._adapter.isValid(this.min) && this._adapter.compare(this.min, d, ELuDateGranularity.day) > 0) { return { min: true }; } if (!!this.max && this._adapter.isValid(this.max) && this._adapter.compare(this.max, d, ELuDateGranularity.day) < 0) { return { max: true }; } return null; } }
{ "content_hash": "fc4e34e266a8d04d58abb1d5eff5e65c", "timestamp": "", "source": "github", "line_count": 112, "max_line_length": 133, "avg_line_length": 29.205357142857142, "alnum_prop": 0.6918373586059309, "repo_name": "LuccaSA/lucca-front", "id": "9017f5b76cf1a944d3edbd433fecf9f276c9365f", "size": "3271", "binary": false, "copies": "1", "ref": "refs/heads/rc", "path": "packages/ng/date/src/lib/input/date-input.directive.ts", "mode": "33188", "license": "mit", "language": [ { "name": "C#", "bytes": "12176" }, { "name": "CSS", "bytes": "431545" }, { "name": "Gherkin", "bytes": "21006" }, { "name": "HTML", "bytes": "530729" }, { "name": "JavaScript", "bytes": "31271" }, { "name": "SCSS", "bytes": "311548" }, { "name": "TypeScript", "bytes": "638202" } ], "symlink_target": "" }
ACCEPTED #### According to The Catalogue of Life, 3rd January 2011 #### Published in Bot. Mag. (Tokyo) 31:130. 1917 #### Original name null ### Remarks null
{ "content_hash": "fdb805cbeb466e483099c6f2c3b378cc", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 39, "avg_line_length": 12.307692307692308, "alnum_prop": 0.68125, "repo_name": "mdoering/backbone", "id": "1c62f07838297878130b33cea26d83e280585da0", "size": "205", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "life/Plantae/Magnoliophyta/Magnoliopsida/Rosales/Rosaceae/Rosa/Rosa sambucina/README.md", "mode": "33188", "license": "apache-2.0", "language": [], "symlink_target": "" }
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <artifactId>cloud-is-pom</artifactId> <groupId>eu.celarcloud.cloud-is</groupId> <version>0.0.1-SNAPSHOT</version> </parent> <artifactId>cloud-is-core</artifactId> <packaging>pom</packaging> <name>cloud-is-core</name> <modules> <module>analysisModule</module> <module>dataCollectionModule</module> <module>is-core-packaging</module> <module>controller</module> </modules> </project>
{ "content_hash": "022a4a260fbe4003c767f71111c82a0c", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 204, "avg_line_length": 40.27777777777778, "alnum_prop": 0.6896551724137931, "repo_name": "CELAR/cloud-is", "id": "585409a62a9beb9866d41886d6af6090b799ec1b", "size": "725", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "cloud-is-core/pom.xml", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "62108" }, { "name": "HTML", "bytes": "9599" }, { "name": "Java", "bytes": "445697" }, { "name": "JavaScript", "bytes": "659613" }, { "name": "Shell", "bytes": "2635" } ], "symlink_target": "" }
/* This module supports "frameback" functionality. This is useful when there's a master/detail set of pages, and displaying the master page is expensive. For example, a Web based email client might have an URL like "/inbox" that shows a list of emails, and URLs like "/email/1", "/email/2", etc., to show the contents of a particular email. Imagine a user is viewing "/inbox", and clicks through to "/email/32", and then clicks the back button. The browser will re-request "/inbox" (assuming it's not cacheable, etc.) If displaying "/inbox" is slow, the user will be forced to wait. One solution to this is to open details pages such as "/email/32" in a new tab or window. The back button no longer works, but the window showing "/inbox" is still there showing the correct content! This module offers an alternate way to speed up the back button. Instead of opening the details view in the same window (replacing the master view), or opening in a new window, this library opens the details view in an iframe, and hides the master view. It uses HTML5 techniques to change the browser URL without forcing a page reload. When the user presses the back button, the details view is hidden and the master view is displayed- instant back button! In browsers that don't support HTML5 style history manipulation, the experience is similar, but the back button isn't speeded up. No iframe is used and the library gets out of the way. You can choose to either open in a new tab or the same tab (by setting the 'target' attribute of anchors.) You can use this functionality by simply adding a `frameback={true}` attribute to your `<Link>` element. The details page linked to need not itself be a react-server page. If it _is_ a react-server page it will have its client-navigation disabled. Any navigation away from the details page will result in a full navigation of the outer window away from the master. Thus only the master=>details=>back navigation is speeded up. */ var EventEmitter = require('events').EventEmitter; var Q = require('q') , logger = require('./logging').getLogger(__LOGGER__) , RLS = require('./util/RequestLocalStorage').getNamespace() var ClientRequest = require('./ClientRequest'); var History = require('./components/History'); // This is an attribute that's added to the main content div that contains all // react-server elements. var {PAGE_CONTENT_NODE_ID} = require('./constants'); var _ = { assign: require('lodash/assign'), forEach: require('lodash/forEach'), } // Cover the whole viewport. var FRAME_STYLE = { 'border' : '0px', 'position' : 'absolute', 'top' : '0px', 'left' : '0px', 'width' : '100%', 'height' : '100%', 'display' : 'block', 'zIndex' : '10', } class FramebackController extends EventEmitter { // This is only works from the outer frame. // It's deprecated. Access via the RequestContext. static getCurrent() { return RLS().instance; } constructor() { super(); // We'll set this when we're showing the details page. this.active = false; // When we navigate back from a details page we'll restore the // outer page's title to that of the master page. this.masterTitle = document.title; // Stash ourselves in request local storage. RLS().instance = this; } // Are we currently showing a details page in an iframe? isActive(){ return this.active; } navigate(request){ const url = request.getUrl(); logger.debug(`Navigating to ${url}`); this.loadTimer = logger.timer('loadTime'); this.active = true; // update master title in case the title has changed since initialization this.masterTitle = document.title; this.hideMaster(); if (url === this.url){ // We're just going to show the frame. It's already got our page. setTimeout(() => this.emit('loadComplete')); } else { if (this.frame && request.getReuseFrame()) { // If we have a frame and the request permits // us to reuse it by performing a client // transition we'll do that. this.navigateFrame(request); } else { // Otherwise we, unfortunately, can't just // point an existing frame at a new page since // that would be a navigation. So, we'll // destroy it and create a fresh replacement. if (this.frame){ this.destroyFrame(); } this.createFrame(url); } } // One way or another we've got a frame pointed at this URL now. this.url = url; this.showFrame(); // Should we wait for the details page to load? // I don't think so. We want the back button to be snappy. // If the user clicks back before the page finishes loading // we'll just abandon the frame. If that causes some issue // then we'll have to return a promise attached to a deferred // that gets resolved in `_handleFrameLoad()`. return Q(); } willHandle(request, type) { // If we're not in a frame, then we've got nothing to do. if (!window.__reactServerIsFrame) return false; // If this is the initial page load request then the navigator // should handle it. if (!type || type === History.events.PAGELOAD) return false; // If the request is coming from the outer frame's frameback // controller, then the navigator should handle it. if (request.getOpts()._fromOuterFrame) return false; // Otherwise this is a client transition request from within // our frame, and we need to pass it through the outer frame's // navigator to get the history navigation stack taken care // of. // Can't reuse the frame if our request is for frameback // without frame reuse. const reuseFrame = request.getReuseFrame() || !request.getFrameback(); request = new ClientRequest( request.getUrl(), _.assign({}, request.getOpts(), { frameback: false, // Navigation is _for_ frame. reuseFrame, }) ); window.parent.__reactServerClientController.context .navigate(request, type); return true; } navigateBack(){ logger.debug(`Navigating back`); this.hideFrame(); this.showMaster(); this.active = false; } hideMaster(){ contentDiv().style.display = 'none'; this.emit('hideMaster'); } showMaster(){ contentDiv().style.display = 'block'; document.title = this.masterTitle; document.activeElement.blur(); window.focus(); this.emit('showMaster'); } navigateFrame(request){ // This is a request that we're going to send to the navigator // _in our frame_. const frameRequest = new ClientRequest( request.getUrl(), _.assign({}, request.getOpts(), { frameback : false, // No frameback within frame. _fromOuterFrame : true, // Actually navigate in frame. }) ) this.frame.contentWindow .__reactServerClientController .context .navigate(frameRequest, // The frame isn't actually managing the // history navigation stack. We just tell it // that it's always navigating forward // regardless of what sort of navigation // _we're_ performing. History.events.PUSHSTATE ); } createFrame(url){ const frame = this.frame = document.createElement("iframe"); frame.src = absoluteUrl(url); _.forEach(FRAME_STYLE, (v, k) => {frame.style[k] = v}); frame.addEventListener('load', () => this._handleFrameLoad(frame)); document.body.appendChild(frame); // Set this right away once we have a content window // (available as soon as we've appended to the DOM). frame.contentWindow.__reactServerIsFrame = true; } showFrame(){ this.emit('showFrame'); this.frame.style.display = 'block'; // We want to put the focus on our child frame // Note that this will fire too soon when we're creating our // child frame for the first time but will cover the case // where we're navigating back to a child frame that's already // been created this.frame.contentWindow.focus(); this.setTitleFromFrame(); } setTitleFromFrame(){ var doc = this.frame.contentDocument; if (doc.title && this.active){ document.title = doc.title; } } hideFrame(){ this.emit('hideFrame'); this.frame.style.display = 'none'; } destroyFrame(){ document.body.removeChild(this.frame); this.frame = null; } _handleFrameLoad(frame){ // Just in case the user navigated back and to a different // frame while we were waiting for the first frame to load. if (frame !== this.frame) return; const clientController = frame.contentWindow.__reactServerClientController; // If the frame has a client controller we'll listen to when // _it_ tells us it's done loading. // if (clientController && !clientController.__parentIsListening) { clientController.__parentIsListening = true; clientController.context.onLoadComplete(this._handleFrameLoad.bind(this, frame)); } // It may have finished _before_ we get here, so we'll also check // whether it has already set its `_previouslyRendered` flag. // if (clientController && !clientController._previouslyRendered) { return; } [].slice.call(frame.contentDocument.body.querySelectorAll('a')).forEach(link => { if (!link.target) link.target = '_top'; }); // We've got it now, so let's set it. this.setTitleFromFrame(); // When a frame is created for the first time, we need to wait // for it to load before giving it focus this.frame.contentWindow.focus(); if (this.loadTimer) { this.loadTimer.stop(); delete this.loadTimer; logger.debug("Frame loaded"); } else { logger.debug("Frame navigated"); } this.emit('loadComplete'); } } function contentDiv(){ return document.body.querySelector(`div[${PAGE_CONTENT_NODE_ID}]`); } function absoluteUrl(url){ if (0 === url.indexOf('/')) { url = window.location.protocol + '//' + window.location.host + url; } return url; } module.exports = FramebackController;
{ "content_hash": "18a5bc6a563fb59a55de36a846fbe65e", "timestamp": "", "source": "github", "line_count": 342, "max_line_length": 84, "avg_line_length": 28.555555555555557, "alnum_prop": 0.6938357567069424, "repo_name": "davidalber/react-server", "id": "336be3ab811f83ebc54bd5b8aa41121cba28dca5", "size": "9766", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "packages/react-server/core/FramebackController.js", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "17442" }, { "name": "JavaScript", "bytes": "22413" }, { "name": "Nginx", "bytes": "2591" }, { "name": "Shell", "bytes": "827" } ], "symlink_target": "" }
#include <errno.h> #include <stdlib.h> #include <string.h> #include "lwan.h" #include "lwan-config.h" #include "lwan-template.h" #include "database.h" #include "json.h" enum db_connect_type { DB_CONN_MYSQL, DB_CONN_SQLITE }; struct db_connection_params { enum db_connect_type type; union { struct { const char *user; const char *password; const char *database; const char *hostname; } mysql; struct { const char *path; const char **pragmas; } sqlite; }; }; static struct db_connection_params db_connection_params; static struct db *get_db(void) { static __thread struct db *database; if (!database) { switch (db_connection_params.type) { case DB_CONN_MYSQL: database = db_connect_mysql(db_connection_params.mysql.hostname, db_connection_params.mysql.user, db_connection_params.mysql.password, db_connection_params.mysql.database); break; case DB_CONN_SQLITE: database = db_connect_sqlite(db_connection_params.sqlite.path, true, db_connection_params.sqlite.pragmas); break; } if (!database) lwan_status_critical("Could not connect to the database"); } return database; } static const char hello_world[] = "Hello, World!"; static const char random_number_query[] = "SELECT randomNumber FROM world WHERE id=?"; struct Fortune { struct { coro_function_t generator; int id; char *message; } item; }; DEFINE_ARRAY_TYPE_INLINEFIRST(fortune_array, struct Fortune) static const char fortunes_template_str[] = "<!DOCTYPE html>" "<html>" "<head><title>Fortunes</title></head>" "<body>" "<table>" "<tr><th>id</th><th>message</th></tr>" "{{#item}}" "<tr><td>{{item.id}}</td><td>{{item.message}}</td></tr>" "{{/item}}" "</table>" "</body>" "</html>"; static int fortune_list_generator(struct coro *coro, void *data); #undef TPL_STRUCT #define TPL_STRUCT struct Fortune static const struct lwan_var_descriptor fortune_item_desc[] = { TPL_VAR_INT(item.id), TPL_VAR_STR_ESCAPE(item.message), TPL_VAR_SENTINEL, }; static const struct lwan_var_descriptor fortune_desc[] = { TPL_VAR_SEQUENCE(item, fortune_list_generator, fortune_item_desc), TPL_VAR_SENTINEL, }; static struct lwan_tpl *fortune_tpl; struct hello_world_json { const char *message; }; static const struct json_obj_descr hello_world_json_desc[] = { JSON_OBJ_DESCR_PRIM(struct hello_world_json, message, JSON_TOK_STRING), }; struct db_json { int id; int randomNumber; }; static const struct json_obj_descr db_json_desc[] = { JSON_OBJ_DESCR_PRIM(struct db_json, id, JSON_TOK_NUMBER), JSON_OBJ_DESCR_PRIM(struct db_json, randomNumber, JSON_TOK_NUMBER), }; struct queries_json { struct db_json queries[500]; size_t queries_len; }; static const struct json_obj_descr queries_json_desc[] = { JSON_OBJ_DESCR_OBJ_ARRAY(struct queries_json, queries, 500, queries_len, db_json_desc, N_ELEMENTS(db_json_desc)), }; static int append_to_strbuf(const char *bytes, size_t len, void *data) { struct lwan_strbuf *strbuf = data; return lwan_strbuf_append_str(strbuf, bytes, len) ? 0 : -EINVAL; } static enum lwan_http_status json_response(struct lwan_response *response, const struct json_obj_descr *descr, size_t descr_len, const void *data) { if (json_obj_encode(descr, descr_len, data, append_to_strbuf, response->buffer) < 0) return HTTP_INTERNAL_ERROR; response->mime_type = "application/json"; return HTTP_OK; } LWAN_HANDLER(json) { struct hello_world_json j = {.message = hello_world}; return json_response(response, hello_world_json_desc, N_ELEMENTS(hello_world_json_desc), &j); } static bool db_query(struct db_stmt *stmt, struct db_row rows[], struct db_row results[], struct db_json *out) { int id = rand() % 10000; rows[0].u.i = id; if (UNLIKELY(!db_stmt_bind(stmt, rows, 1))) return false; if (UNLIKELY(!db_stmt_step(stmt, results))) return false; out->id = id; out->randomNumber = results[0].u.i; return true; } LWAN_HANDLER(db) { struct db_row rows[1] = {{.kind = 'i'}}; struct db_row results[] = {{.kind = 'i'}, {.kind = '\0'}}; struct db_stmt *stmt = db_prepare_stmt(get_db(), random_number_query, sizeof(random_number_query) - 1); struct db_json db_json; if (UNLIKELY(!stmt)) { lwan_status_debug("preparing stmt failed"); return HTTP_INTERNAL_ERROR; } bool queried = db_query(stmt, rows, results, &db_json); db_stmt_finalize(stmt); if (!queried) return HTTP_INTERNAL_ERROR; return json_response(response, db_json_desc, N_ELEMENTS(db_json_desc), &db_json); } LWAN_HANDLER(queries) { enum lwan_http_status ret = HTTP_INTERNAL_ERROR; const char *queries_str = lwan_request_get_query_param(request, "queries"); long queries; if (LIKELY(queries_str)) { queries = parse_long(queries_str, -1); if (UNLIKELY(queries <= 0)) queries = 1; else if (UNLIKELY(queries > 500)) queries = 500; } else { queries = 1; } struct db_stmt *stmt = db_prepare_stmt(get_db(), random_number_query, sizeof(random_number_query) - 1); if (UNLIKELY(!stmt)) return HTTP_INTERNAL_ERROR; struct queries_json qj = {.queries_len = queries}; struct db_row rows[1] = {{.kind = 'i'}}; struct db_row results[] = {{.kind = 'i'}, {.kind = '\0'}}; for (long i = 0; i < queries; i++) { if (!db_query(stmt, rows, results, &qj.queries[i])) goto out; } ret = json_response(response, queries_json_desc, N_ELEMENTS(queries_json_desc), &qj); out: db_stmt_finalize(stmt); return ret; } LWAN_HANDLER(plaintext) { lwan_strbuf_set_static(response->buffer, hello_world, sizeof(hello_world) - 1); response->mime_type = "text/plain"; return HTTP_OK; } static int fortune_compare(const void *a, const void *b) { const struct Fortune *fortune_a = (const struct Fortune *)a; const struct Fortune *fortune_b = (const struct Fortune *)b; size_t a_len = strlen(fortune_a->item.message); size_t b_len = strlen(fortune_b->item.message); if (!a_len || !b_len) return a_len > b_len; size_t min_len = a_len < b_len ? a_len : b_len; int cmp = memcmp(fortune_a->item.message, fortune_b->item.message, min_len); return cmp == 0 ? -(ssize_t)min_len : cmp; } static bool append_fortune(struct coro *coro, struct fortune_array *fortunes, int id, const char *message) { struct Fortune *fortune; char *message_copy; message_copy = coro_strdup(coro, message); if (UNLIKELY(!message_copy)) return false; fortune = fortune_array_append(fortunes); if (UNLIKELY(!fortune)) return false; fortune->item.id = id; fortune->item.message = message_copy; return true; } static int fortune_list_generator(struct coro *coro, void *data) { static const char fortune_query[] = "SELECT * FROM Fortune"; char fortune_buffer[256]; struct Fortune *fortune = data; struct fortune_array fortunes; struct db_stmt *stmt; stmt = db_prepare_stmt(get_db(), fortune_query, sizeof(fortune_query) - 1); if (UNLIKELY(!stmt)) return 0; fortune_array_init(&fortunes); struct db_row results[] = {{.kind = 'i'}, {.kind = 's', .u.s = fortune_buffer, .buffer_length = sizeof(fortune_buffer)}, {.kind = '\0'}}; while (db_stmt_step(stmt, results)) { if (!append_fortune(coro, &fortunes, results[0].u.i, results[1].u.s)) goto out; } if (!append_fortune(coro, &fortunes, 0, "Additional fortune added at request time.")) goto out; fortune_array_sort(&fortunes, fortune_compare); struct Fortune *iter; LWAN_ARRAY_FOREACH (&fortunes, iter) { fortune->item.id = iter->item.id; fortune->item.message = iter->item.message; coro_yield(coro, 1); } out: fortune_array_reset(&fortunes); db_stmt_finalize(stmt); return 0; } LWAN_HANDLER(fortunes) { struct Fortune fortune; if (UNLIKELY(!lwan_tpl_apply_with_buffer(fortune_tpl, response->buffer, &fortune))) return HTTP_INTERNAL_ERROR; response->mime_type = "text/html; charset=UTF-8"; return HTTP_OK; } int main(void) { static const struct lwan_url_map url_map[] = { {.prefix = "/json", .handler = LWAN_HANDLER_REF(json)}, {.prefix = "/db", .handler = LWAN_HANDLER_REF(db)}, {.prefix = "/queries", .handler = LWAN_HANDLER_REF(queries)}, {.prefix = "/plaintext", .handler = LWAN_HANDLER_REF(plaintext)}, {.prefix = "/fortunes", .handler = LWAN_HANDLER_REF(fortunes)}, {.prefix = NULL}, }; struct lwan l; lwan_init(&l); srand((unsigned int)time(NULL)); if (getenv("USE_MYSQL")) { db_connection_params = (struct db_connection_params) { .type = DB_CONN_MYSQL, .mysql.user = getenv("MYSQL_USER"), .mysql.password = getenv("MYSQL_PASS"), .mysql.hostname = getenv("MYSQL_HOST"), .mysql.database = getenv("MYSQL_DB") }; if (!db_connection_params.mysql.user) lwan_status_critical("No MySQL user provided"); if (!db_connection_params.mysql.password) lwan_status_critical("No MySQL password provided"); if (!db_connection_params.mysql.hostname) lwan_status_critical("No MySQL hostname provided"); if (!db_connection_params.mysql.database) lwan_status_critical("No MySQL database provided"); } else { const char *pragmas[] = {"PRAGMA mmap_size=44040192", "PRAGMA journal_mode=OFF", "PRAGMA locking_mode=EXCLUSIVE", NULL}; db_connection_params = (struct db_connection_params) { .type = DB_CONN_SQLITE, .sqlite.path = "techempower.db", .sqlite.pragmas = pragmas, }; } fortune_tpl = lwan_tpl_compile_string_full( fortunes_template_str, fortune_desc, LWAN_TPL_FLAG_CONST_TEMPLATE); if (!fortune_tpl) lwan_status_critical("Could not compile fortune templates"); lwan_set_url_map(&l, url_map); lwan_main_loop(&l); lwan_tpl_free(fortune_tpl); lwan_shutdown(&l); return 0; }
{ "content_hash": "87270407c98f2ef242fb0b3dafda70d2", "timestamp": "", "source": "github", "line_count": 402, "max_line_length": 80, "avg_line_length": 28.65174129353234, "alnum_prop": 0.5638999826358743, "repo_name": "zloster/FrameworkBenchmarks", "id": "4a2d2dd11f2e4910754063504b196ff18bfa044b", "size": "12327", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "frameworks/C/lwan/src/techempower.c", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "ASP", "bytes": "104" }, { "name": "Batchfile", "bytes": "1125" }, { "name": "C", "bytes": "243674" }, { "name": "C#", "bytes": "484837" }, { "name": "C++", "bytes": "197934" }, { "name": "CMake", "bytes": "6315" }, { "name": "CSS", "bytes": "2035" }, { "name": "Clojure", "bytes": "80972" }, { "name": "Common Lisp", "bytes": "22120" }, { "name": "Crystal", "bytes": "27193" }, { "name": "D", "bytes": "203825" }, { "name": "Dart", "bytes": "52130" }, { "name": "Dockerfile", "bytes": "339472" }, { "name": "Dylan", "bytes": "868" }, { "name": "Elixir", "bytes": "14485" }, { "name": "Erlang", "bytes": "41222" }, { "name": "F#", "bytes": "91061" }, { "name": "Go", "bytes": "161938" }, { "name": "Groovy", "bytes": "21834" }, { "name": "HTML", "bytes": "142024" }, { "name": "Hack", "bytes": "2261" }, { "name": "Haskell", "bytes": "55691" }, { "name": "Java", "bytes": "682207" }, { "name": "JavaScript", "bytes": "175373" }, { "name": "Kotlin", "bytes": "57654" }, { "name": "Lua", "bytes": "14508" }, { "name": "Makefile", "bytes": "4991" }, { "name": "Meson", "bytes": "846" }, { "name": "MoonScript", "bytes": "2396" }, { "name": "Nim", "bytes": "1288" }, { "name": "PHP", "bytes": "533948" }, { "name": "PLpgSQL", "bytes": "3446" }, { "name": "Perl", "bytes": "15376" }, { "name": "Python", "bytes": "359517" }, { "name": "QMake", "bytes": "2301" }, { "name": "Racket", "bytes": "5069" }, { "name": "Ruby", "bytes": "89692" }, { "name": "Rust", "bytes": "89001" }, { "name": "Scala", "bytes": "101770" }, { "name": "Shell", "bytes": "96116" }, { "name": "Smarty", "bytes": "744" }, { "name": "Swift", "bytes": "101361" }, { "name": "TypeScript", "bytes": "15109" }, { "name": "UrWeb", "bytes": "4453" }, { "name": "Vala", "bytes": "1579" }, { "name": "Visual Basic", "bytes": "27087" }, { "name": "Volt", "bytes": "511" } ], "symlink_target": "" }
using System; using System.Collections.Generic; namespace org.ohdsi.cdm.framework.common.Omop { //public class Note : Entity, IEquatable<Note> public class Note : IEquatable<Note> { public int EncodingConceptId { get; set; } public int LanguageConceptId { get; set; } public string Title { get; set; } public string Text { get; set; } public long Id { get; set; } public long PersonId { get; set; } public DateTime StartDate { get; set; } public long? ProviderId { get; set; } public int? TypeConceptId { get; set; } public long? VisitOccurrenceId { get; set; } public long? VisitDetailId { get; set; } public int ConceptId { get; set; } public string SourceValue { get; set; } public long EventId { get; set; } public int EventFieldConceptId { get; set; } public Dictionary<string, string> AdditionalFields { get; set; } public Note() { } public bool Equals(Note other) { return this.PersonId.Equals(other.PersonId) && this.ConceptId.Equals(other.ConceptId) && this.StartDate.Equals(other.StartDate) && //this.EndDate.Equals(other.EndDate) && this.VisitOccurrenceId.Equals(other.VisitOccurrenceId) && //this.SourceConceptId.Equals(other.SourceConceptId) && this.TypeConceptId.Equals(other.TypeConceptId) && this.SourceValue.Equals(other.SourceValue); } public override int GetHashCode() { return PersonId.GetHashCode() ^ ConceptId.GetHashCode() ^ (StartDate.GetHashCode()) ^ //(EndDate.GetHashCode()) ^ TypeConceptId.GetHashCode() ^ //SourceConceptId.GetHashCode() ^ VisitOccurrenceId.GetHashCode() ^ (SourceValue != null ? SourceValue.GetHashCode() : 0); } //public override EntityType GeEntityType() //{ // return EntityType.Note; //} } }
{ "content_hash": "c41d9f3a03160851166d84e8a9282596", "timestamp": "", "source": "github", "line_count": 72, "max_line_length": 76, "avg_line_length": 30.569444444444443, "alnum_prop": 0.55474784189005, "repo_name": "OHDSI/ETL-CDMBuilder", "id": "df348da78d18daa0a611d3cd42a7e546b2dd4384", "size": "2203", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "source/org.ohdsi.cdm.framework.common/Omop/Note.cs", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C#", "bytes": "2469354" }, { "name": "Dockerfile", "bytes": "2077" }, { "name": "Perl", "bytes": "11421" }, { "name": "TSQL", "bytes": "140218" } ], "symlink_target": "" }