text
stringlengths
2
1.04M
meta
dict
<?xml version="1.0" encoding="utf-8"?> <resources> <!-- From: file:/C:/Users/Orlyn/Documents/MyOffice/personal/umedinfo/deb/uMedInfo/build/intermediates/exploded-aar/com.android.support/appcompat-v7/22.2.0/res/values-uz-rUZ/values-uz-rUZ.xml --> <eat-comment/> <string msgid="4600421777120114993" name="abc_action_bar_home_description">"Boshiga o‘tish"</string> <string msgid="1594238315039666878" name="abc_action_bar_up_description">"Yuqoriga o‘tish"</string> <string msgid="3588849162933574182" name="abc_action_menu_overflow_description">"Qo‘shimcha sozlamalar"</string> <string msgid="4076576682505996667" name="abc_action_mode_done">"Tayyor"</string> <string msgid="7468859129482906941" name="abc_activity_chooser_view_see_all">"Barchasini ko‘rish"</string> <string msgid="2031811694353399454" name="abc_activitychooserview_choose_application">"Dastur tanlang"</string> <string msgid="3691816814315814921" name="abc_searchview_description_clear">"So‘rovni tozalash"</string> <string msgid="2550479030709304392" name="abc_searchview_description_query">"So‘rovni izlash"</string> <string msgid="8264924765203268293" name="abc_searchview_description_search">"Izlash"</string> <string msgid="8928215447528550784" name="abc_searchview_description_submit">"So‘rov yaratish"</string> <string msgid="893419373245838918" name="abc_searchview_description_voice">"Ovozli qidiruv"</string> <string msgid="3421042268587513524" name="abc_shareactionprovider_share_with">"Bo‘lishish:"</string> </resources>
{ "content_hash": "c915843647251b4a3464a0b0aba12255", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 198, "avg_line_length": 91.3529411764706, "alnum_prop": 0.7578879587894398, "repo_name": "orlyngerano/searchmedicine", "id": "ac65a19bc0d665d5899e627a265988b999aaf578", "size": "1569", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "uMedInfo/build/intermediates/res/debug/values-uz-rUZ/values-uz-rUZ.xml", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "485262" } ], "symlink_target": "" }
 #pragma once #include <aws/s3control/S3Control_EXPORTS.h> #include <aws/s3control/S3ControlRequest.h> #include <aws/core/utils/memory/stl/AWSString.h> #include <utility> namespace Aws { namespace S3Control { namespace Model { /** */ class AWS_S3CONTROL_API GetBucketVersioningRequest : public S3ControlRequest { public: GetBucketVersioningRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "GetBucketVersioning"; } Aws::String SerializePayload() const override; Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** * <p>The Amazon Web Services account ID of the S3 on Outposts bucket.</p> */ inline const Aws::String& GetAccountId() const{ return m_accountId; } /** * <p>The Amazon Web Services account ID of the S3 on Outposts bucket.</p> */ inline bool AccountIdHasBeenSet() const { return m_accountIdHasBeenSet; } /** * <p>The Amazon Web Services account ID of the S3 on Outposts bucket.</p> */ inline void SetAccountId(const Aws::String& value) { m_accountIdHasBeenSet = true; m_accountId = value; } /** * <p>The Amazon Web Services account ID of the S3 on Outposts bucket.</p> */ inline void SetAccountId(Aws::String&& value) { m_accountIdHasBeenSet = true; m_accountId = std::move(value); } /** * <p>The Amazon Web Services account ID of the S3 on Outposts bucket.</p> */ inline void SetAccountId(const char* value) { m_accountIdHasBeenSet = true; m_accountId.assign(value); } /** * <p>The Amazon Web Services account ID of the S3 on Outposts bucket.</p> */ inline GetBucketVersioningRequest& WithAccountId(const Aws::String& value) { SetAccountId(value); return *this;} /** * <p>The Amazon Web Services account ID of the S3 on Outposts bucket.</p> */ inline GetBucketVersioningRequest& WithAccountId(Aws::String&& value) { SetAccountId(std::move(value)); return *this;} /** * <p>The Amazon Web Services account ID of the S3 on Outposts bucket.</p> */ inline GetBucketVersioningRequest& WithAccountId(const char* value) { SetAccountId(value); return *this;} /** * <p>The S3 on Outposts bucket to return the versioning state for.</p> */ inline const Aws::String& GetBucket() const{ return m_bucket; } /** * <p>The S3 on Outposts bucket to return the versioning state for.</p> */ inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; } /** * <p>The S3 on Outposts bucket to return the versioning state for.</p> */ inline void SetBucket(const Aws::String& value) { m_bucketHasBeenSet = true; m_bucket = value; } /** * <p>The S3 on Outposts bucket to return the versioning state for.</p> */ inline void SetBucket(Aws::String&& value) { m_bucketHasBeenSet = true; m_bucket = std::move(value); } /** * <p>The S3 on Outposts bucket to return the versioning state for.</p> */ inline void SetBucket(const char* value) { m_bucketHasBeenSet = true; m_bucket.assign(value); } /** * <p>The S3 on Outposts bucket to return the versioning state for.</p> */ inline GetBucketVersioningRequest& WithBucket(const Aws::String& value) { SetBucket(value); return *this;} /** * <p>The S3 on Outposts bucket to return the versioning state for.</p> */ inline GetBucketVersioningRequest& WithBucket(Aws::String&& value) { SetBucket(std::move(value)); return *this;} /** * <p>The S3 on Outposts bucket to return the versioning state for.</p> */ inline GetBucketVersioningRequest& WithBucket(const char* value) { SetBucket(value); return *this;} private: Aws::String m_accountId; bool m_accountIdHasBeenSet = false; Aws::String m_bucket; bool m_bucketHasBeenSet = false; }; } // namespace Model } // namespace S3Control } // namespace Aws
{ "content_hash": "61c50c10cf59adea5e37f1dad741bcad", "timestamp": "", "source": "github", "line_count": 126, "max_line_length": 122, "avg_line_length": 34.15873015873016, "alnum_prop": 0.6744888475836431, "repo_name": "aws/aws-sdk-cpp", "id": "e41f9296e2f8682b32d70a82fe7934bf1e987e32", "size": "4423", "binary": false, "copies": "1", "ref": "refs/heads/main", "path": "aws-cpp-sdk-s3control/include/aws/s3control/model/GetBucketVersioningRequest.h", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C", "bytes": "309797" }, { "name": "C++", "bytes": "476866144" }, { "name": "CMake", "bytes": "1245180" }, { "name": "Dockerfile", "bytes": "11688" }, { "name": "HTML", "bytes": "8056" }, { "name": "Java", "bytes": "413602" }, { "name": "Python", "bytes": "79245" }, { "name": "Shell", "bytes": "9246" } ], "symlink_target": "" }
<!DOCTYPE html> <html lang="de"> <head> <title>1939: Die Sprechmaschine</title> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta name="keywords" content=""> <meta name="robots" content="index, follow"> <meta name="revisit-after" content="7 days"> <link rel="apple-touch-icon" href="/export/sites/oe6/adl612/favicon.png" /> <link rel="icon" href="/export/sites/oe6/adl612/favicon.png" type="image/png" /> <link rel="stylesheet" href="/export/system/modules/at.oevsv.apollo.extensions/resources/css/style-oevsv.min.css" /> <link rel="alternate" type="application/rss+xml" href="/adl612/rss-news.xml" title="Aktuelles"> <link rel="alternate" type="application/rss+xml" href="/adl612/rss-events.xml" title="Veranstaltungen & Termine"> </head> <body> <div class="wrapper"> <div id="page-complete" > <div class=""><div ><div class="mb-20"> <div class="header topheader-oevsv"> <div class="container oevsv"> <!--=== Top ===--> <div class="topbar"> <ul class="loginbar pull-right"> <li class="hoverSelector"> <i class="fa fa-globe"></i> <a>ÖVSV - LANDESVERBÄNDE</a> <ul class="languages hoverSelectorBlock"> <li><a href="http://oe1.oevsv.at">OE1 Wien</a></li> <li><a href="http://oe2.oevsv.at">OE2 Salzburg</a></li> <li><a href="http://oe3.oevsv.at">OE3 Niederösterreich</a></li> <li><a href="http://oe4.oevsv.at">OE4 Burgenland</a></li> <li><a href="http://oe5.oevsv.at">OE5 Oberösterreich</a></li> <li class="active"><a href="http://oe6.oevsv.at">OE6 Steiermark&nbsp;<i class="fa fa-check"></i></a></li> <li><a href="http://oe7.oevsv.at">OE7 Tirol</a></li> <li><a href="http://oe8.oevsv.at">OE8 Kärnten</a></li> <li><a href="http://oe9.oevsv.at">OE9 Vorarlberg</a></li> <li><a href="http://amrs.oevsv.at">AMRS</a></li> <li><a href="http://www.oevsv.at">Dachverband</a></li> </ul> </li> <li class="topbar-devider"></li> <li class="hoverSelector"> <i class="fa fa-key"></i> <a href="http://workplace.oevsv.at/system/login/">Login</a> </li> </ul> </div> <!--=== End Top ===--> </div> </div> <div class="container oevsv"> <div class="row"> <div class="col-xs-12"> <a href="/"> <img src="/export/shared/.content/.galleries/logos/Kopfleisten-OE6/Kopfleiste-Steiermark-ADL612.png" alt="" class="img-responsive"> </a> </div> </div> </div> <div class="header"> <div class="container oevsv"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse"> <span class="sr-only">Toggle navigation</span> <span class="fa fa-bars"></span> </button> </div> <!--/end container--> <!-- Menu --> <div class="collapse navbar-collapse mega-menu navbar-responsive-collapse"> <div class="container mt-10"> <ul class="nav navbar-nav"> <li > <a href="/adl612/home/" >Home</a> </li><li class="dropdown active"> <a href="/adl612/oevsv/der-oevsv/" class="dropdown-toggle" data-toggle="dropdown">ÖVSV</a> <ul class="dropdown-menu"><li > <a href="/adl612/oevsv/der-oevsv/" >Der ÖVSV</a> </li><li class="active"> <a href="/adl612/oevsv/aktuelles/" >Aktuelles</a> </li><li > <a href="/adl612/oevsv/veranstaltungen/" >Veranstaltungen</a> </li></ul></li><li id="searchButtonHeader"> <i class="search fa fa-search search-btn"></i> <div class="search-open"> <form class="form-inline" name="searchFormHeader" action="/adl612/suche/" method="post"> <div class="input-group animated fadeInDown" id="searchContentHeader"> <input type="text" name="q" class="form-control" placeholder="Search" id="searchWidgetAutoCompleteHeader" /> <span class="input-group-btn"> <button class="btn-u" type="button" onclick="this.form.submit(); return false;">Go</button> </span> </div> </form> </div> </li> </ul> </div><!--/end container--> </div><!-- /collapse --> </div> <!--/header --> </div> </div></div> <div > <div class="container "><div > <div class="row "><div class="col-md-9" > <div class="row "><div class="col-xs-12" ><div class="mb-20"> <!-- blog header --> <div class="blog-page"> <div class="blog"> <div class="hidden-xs pull-right"> <a class=" btn-u btn-u-xs" href="/pdflink/en/ca595340-57ca-11e5-a989-0242ac11002b/1939-Die-Sprechmaschine.pdf" target="pdf"> <i class="fa fa-file-pdf-o"></i> Download PDF </a> </div> <div class="headline"> <h2 >1939: Die Sprechmaschine</h2> </div> <div class="visible-xs margin-bottom-20"> <a class=" btn-u btn-u-red" href="/pdflink/en/ca595340-57ca-11e5-a989-0242ac11002b/1939-Die-Sprechmaschine.pdf" target="pdf"> <i class="fa fa-file-pdf-o"></i> Download PDF </a> </div> <ul class="list-unstyled list-inline blog-info"> <li><i class="icon-calendar"></i> 22.06.20, 09:30</li> <li><i class="icon-pencil"></i> Gerhard Pirklbauer</li> </ul> <ul class="pull-left list-unstyled list-inline blog-tags"> <li><i class="fa fa-tag"></i>&nbsp; <span class="label rounded label-light">Alle Verbände</span> <span class="label rounded label-light">OE5</span> <span class="label rounded label-light">ÖVSV Dachverband</span> </li> </ul> </div> </div> <!-- //END blog header --> <!-- paragraphs --> <div class="paragraph margin-bottom-20"> <span ></span> <div ><div class="description" data-v-e92fdfd2=""> <p>1939 konnten die Besucher/innen der Weltausstellung eine sonderbare neue Maschine bestaunen. Eine Art Orgel, der adrett gekleidete Damen einzelne Worte entlocken konnten. Der Voder ("Voice Operation Demonstrator") war die neueste Kreation der berühmten Bell Labs und der Menschheit erster Versuch, die menschliche Stimme künstlich zu erzeugen. Musste man sich damals noch ziemlich anstrengen um aus den gelallten Silben Wörter auszumachen, so sind heute Computerstimmen von echten Stimmen kaum mehr zu unterscheiden.<br />Gestaltung: <a href="https://oe1.orf.at/team/anna_masoner" target="_blank" rel="noopener">Anna Masoner</a></p> </div> <p class="service" data-v-e92fdfd2="">&nbsp;</p> <p>Links:<br /><a href="https://www.ccc.de/">Chaos Computer Club</a><br /><a href="https://blog.stummkonzert.de/wp-content/uploads/2011/08/die_hackerbibel_teil_1.pdf">Hackerbibel</a><br /><a href="https://ds.ccc.de/">Datenschleuder</a><br /><a href="https://logbuch-netzpolitik.de/">Logbuch Netzpolitik</a></p> <p>TCPIP<br /><a href="https://internethalloffame.org/inductees/vint-cerf">Vint Cerf in der Internet Hall of Fame</a><br /><a href="https://amturing.acm.org/">Turing Award</a></p> <p>Kostenfreie Podcasts:<br /><a href="https://files.orf.at/podcast/oe1/oe1_radiokolleg.xml">Radiokolleg</a>&nbsp;- XML<br /><a href="https://itunes.apple.com/us/podcast/%C3%B61-radiokolleg/id1455341019?mt=2">Radiokolleg</a>&nbsp;- iTunes</p> <p>&nbsp;</p> <p class="link" data-v-e92fdfd2=""><a href="https://oe1.orf.at/radiokolleg2" target="_blank" rel="noopener" data-v-e92fdfd2="">Radiokolleg - Datenpunkte im Informationszeitalter</a></p></div> <p> <a class="btn-u btn-u-small" href="https://oe1.orf.at/player/20200622/601739">AUDIO starten</a> </p> </div> <!-- //END paragraphs --> </div> </div></div> <div class="row "><div class="col-sm-6" ></div><div class="col-sm-6" ></div></div> </div><div class="col-md-3" > <div class="row "><div class="col-xs-12" ></div></div> </div></div> </div></div> </div> <div id="footer-default" class="footer-default mt-10"> <div class="footer footer-oevsv"> <div class="container"><div > <div class="row mb-20"><div class="hidden-xs hidden-sm col-md-3" ><div class="ap-sec "> <div class="ap-img ap-img-v0"> <div class="ap-img-pic "> <a data-gallery="true" class="zoomer" data-size="w:200,h:145" href="/export/shared/.content/.galleries/logos/OeVSV-Logo-weiss.png" title=" " data-rel="fancybox-button-87644cfd-a1ec-11e6-9755-ab9d06357455" id="fancyboxzoom87644cfd-a1ec-11e6-9755-ab9d06357455"> <span class="overlay-zoom"> <span > <img src="/export/shared/.content/.galleries/logos/OeVSV-Logo-weiss.png" class="img-responsive " alt=" " title=" " /> </span> <span class="zoom-icon"></span> </span> </a> </div> </div> </div> </div><div class="col-xs-12 col-sm-4 col-md-3" ></div><div class="col-xs-12 col-sm-4 col-md-3" ></div><div class="col-xs-12 col-sm-4 col-md-3" ><div class="ap-sec "> <div class="headline"> <h2 > Kontakt</h2> </div> <div class="ap-plain" > <div > <p>Landesverband Steiermark<br />des Österreichischen Versuchssenderverbands ÖVSV<br /><br /><em class="fa fa-envelope">&nbsp;</em> <a href="mailto:[email protected]">@oevsv.at</a></p></div> </div> </div></div></div> <div> <div class="row"> <div class="col-sm-4 col-md-3 mb-20"> <a href="#top"><i class="fa fa-caret-square-o-up"></i> zum Seitenanfang</a> </div> <div class="col-sm-4 col-md-3 mb-20"> <a href="http://www.oevsv.at/map/"><i class="fa fa-folder-open"></i> Sitemap</a> </div> <div class="col-sm-4 col-md-3 mb-20"> <ul class="social-oevsv"> <li><a href=""><img src="/export/shared/.content/.galleries/icons/Facebook.png" alt="" /></a></li> <li><a href=""><img src="/export/shared/.content/.galleries/icons/Twitter.png" alt="" /></a></li> <li><a href=""><img src="/export/shared/.content/.galleries/icons/Instagram.png" alt="" /></a></li> <li><a href=""><img src="/export/shared/.content/.galleries/icons/YouTube.png" alt="" /></a></li> <li><a href=""><img src="/export/shared/.content/.galleries/icons/Google.png" alt="" /></a></li> <li><a href=""><img src="/export/shared/.content/.galleries/icons/RSS.png" alt="" /></a></li> <li><a href=""><img src="/export/shared/.content/.galleries/icons/Pinterest.png" alt="" /></a></li> </ul> <div class="clearfix"></div> </div> <div class="col-sm-12 col-md-3 mb-20"> <a href="http://oe3.oevsv.at/impressum/">Impressum</a> </div> </div></div> <div> <!-- Piwik --> <script type="text/javascript"> var _paq = _paq || []; _paq.push(["setDomains", ["*.www.oe6.oevsv.at"]]); _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); (function() { var u="//piwik.oevsv.at/"; _paq.push(['setTrackerUrl', u+'piwik.php']); _paq.push(['setSiteId', '7']); var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s); })(); </script> <noscript><p><img src="/piwik.php?idsite=7" style="border:0;" alt="" /></p></noscript> <!-- End Piwik Code --> </div> </div></div> </div> </div> </div></div> <!--/wrapper--> <script type="text/javascript" src="/export/system/modules/org.opencms.apollo.template.basics/resources/js/scripts-all.min.js"></script> <script type="text/javascript"> initList(); </script> <script type="text/javascript"> jQuery(document).ready(function() { App.init(); try { createBanner(); } catch (e) {} try { $("#list_pagination").bootstrapPaginator(options); } catch (e) {} }); </script> <!--[if lt IE 9]> <script src="/export/system/modules/org.opencms.apollo.template.basics/resources/compatibility/respond.js"></script> <script src="/export/system/modules/org.opencms.apollo.template.basics/resources/compatibility/html5shiv.js"></script> <script src="/export/system/modules/org.opencms.apollo.template.basics/resources/compatibility/placeholder-IE-fixes.js"></script> <![endif]--> </body> </html>
{ "content_hash": "db159948e2b1e2b68f57bf6a607f0928", "timestamp": "", "source": "github", "line_count": 827, "max_line_length": 635, "avg_line_length": 16.64087061668682, "alnum_prop": 0.544615608196483, "repo_name": "oevsv-lv6/homepage-backup", "id": "e0acb33904c2251f4c98bc7e47de33af972ab0ab", "size": "13776", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "oe6.oevsv.at/adl612/oevsv/aktuelles/1939-Die-Sprechmaschine/index.html", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "92568" }, { "name": "HTML", "bytes": "25684365" }, { "name": "Hack", "bytes": "9262" }, { "name": "Java", "bytes": "28190" }, { "name": "JavaScript", "bytes": "151227" }, { "name": "Roff", "bytes": "208036" }, { "name": "Shell", "bytes": "301" } ], "symlink_target": "" }
package util import ( "bufio" "fmt" "os" "strings" "github.com/lxc/lxd/shared" ) // LoadModule loads the kernel module with the given name, by invoking // modprobe. This respects any modprobe configuration on the system. func LoadModule(module string) error { if shared.PathExists(fmt.Sprintf("/sys/module/%s", module)) { return nil } _, err := shared.RunCommand("modprobe", "-b", module) return err } // SupportsFilesystem checks whether a given filesystem is already supported // by the kernel. Note that if the filesystem is a module, you may need to // load it first. func SupportsFilesystem(filesystem string) bool { file, err := os.Open("/proc/filesystems") if err != nil { return false } defer func() { _ = file.Close() }() scanner := bufio.NewScanner(file) for scanner.Scan() { fields := strings.Fields(strings.TrimSpace(scanner.Text())) entry := fields[len(fields)-1] if entry == filesystem { return true } } return false } // HugepagesPath attempts to locate the mount point of the hugepages filesystem. func HugepagesPath() (string, error) { // Find the source mount of the path file, err := os.Open("/proc/mounts") if err != nil { return "", err } defer func() { _ = file.Close() }() scanner := bufio.NewScanner(file) matches := []string{} for scanner.Scan() { line := scanner.Text() cols := strings.Fields(line) if cols[2] == "hugetlbfs" { matches = append(matches, cols[1]) } } if len(matches) == 0 { return "", fmt.Errorf("No hugetlbfs mount found, can't use hugepages") } if len(matches) > 1 { if shared.StringInSlice("/dev/hugepages", matches) { return "/dev/hugepages", nil } return "", fmt.Errorf("More than one hugetlbfs instance found and none at standard /dev/hugepages") } return matches[0], nil }
{ "content_hash": "22b4d820e0271f82ffba07209be03f63", "timestamp": "", "source": "github", "line_count": 81, "max_line_length": 101, "avg_line_length": 22.320987654320987, "alnum_prop": 0.6736725663716814, "repo_name": "lxc/lxd", "id": "2a232c5597f2d3d8e39a6a353fe98adcc0497156", "size": "1808", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "lxd/util/kernel.go", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C", "bytes": "221263" }, { "name": "CSS", "bytes": "3967" }, { "name": "Emacs Lisp", "bytes": "256" }, { "name": "Go", "bytes": "8129779" }, { "name": "HTML", "bytes": "9200" }, { "name": "JavaScript", "bytes": "3991" }, { "name": "Makefile", "bytes": "8620" }, { "name": "Python", "bytes": "20803" }, { "name": "Ruby", "bytes": "1578" }, { "name": "Shell", "bytes": "758632" } ], "symlink_target": "" }
<?php namespace ARIPD\AdminBundle\Form\Type; use ARIPD\CRMBundle\Entity\Tagkey; use ARIPD\CRMBundle\Entity\Tag; use Symfony\Component\OptionsResolver\OptionsResolverInterface; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; class CRMTagType extends AbstractType { public function buildForm(FormBuilderInterface $builder, array $options) { $builder ->add('tagkey', 'entity', array('class' => get_class(new Tagkey()), 'property' => 'name',)); $builder->add('name'); } public function setDefaultOptions(OptionsResolverInterface $resolver) { $resolver->setDefaults(array( 'data_class' => get_class(new Tag()), )); } public function getName() { return 'aripdadmin_crmtagtype'; } }
{ "content_hash": "ee9723bf9ff69342cf077981c35c7473", "timestamp": "", "source": "github", "line_count": 29, "max_line_length": 75, "avg_line_length": 26.24137931034483, "alnum_prop": 0.7293035479632063, "repo_name": "gobb/albatros", "id": "48c81d2fd881d322c0e89c6ef372d54a84857291", "size": "761", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/ARIPD/AdminBundle/Form/Type/CRMTagType.php", "mode": "33261", "license": "mit", "language": [], "symlink_target": "" }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>hedges: 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 / hedges - 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> hedges <small> 8.8.0 <span class="label label-info">Not compatible 👼</span> </small> </h1> <p>📅 <em><script>document.write(moment("2021-12-31 19:49:08 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-12-31 19:49:08 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 coq 8.10.0 Formal proof management system num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.09.1 The OCaml compiler (virtual package) ocaml-base-compiler 4.09.1 Official release 4.09.1 ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.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/hedges&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/Hedges&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.8&quot; &amp; &lt; &quot;8.9~&quot;} ] tags: [ &quot;keyword: bisimulation&quot; &quot;keyword: spi-calculus&quot; &quot;keyword: hedges&quot; &quot;category: Computer Science/Concurrent Systems and Protocols/Theory of concurrent systems&quot; &quot;date: 20 April 2004&quot; ] authors: [ &quot;Sébastien Briais&quot; ] bug-reports: &quot;https://github.com/coq-contribs/hedges/issues&quot; dev-repo: &quot;git+https://github.com/coq-contribs/hedges.git&quot; synopsis: &quot;Some properties of hedges used by hedged bisimulation&quot; description: &quot;&quot;&quot; These properties are in section 6.1 of the paper &quot;On Bisimulations for the Spi-Calculus&quot; by J. Borgström and U. Nestmann. However, we consider here an extended message language.&quot;&quot;&quot; flags: light-uninstall url { src: &quot;https://github.com/coq-contribs/hedges/archive/v8.8.0.tar.gz&quot; checksum: &quot;md5=c5d938fa94645f81135b4b15d3c48db6&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-hedges.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-hedges -&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-hedges.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"> Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣 </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": "9e291fb1185c88d561f3b8e6538766d3", "timestamp": "", "source": "github", "line_count": 166, "max_line_length": 238, "avg_line_length": 41.90963855421687, "alnum_prop": 0.5454937473048728, "repo_name": "coq-bench/coq-bench.github.io", "id": "f44b641b740f10c80e6ef5462c69d20687c06050", "size": "6984", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "clean/Linux-x86_64-4.09.1-2.0.6/released/8.10.0/hedges/8.8.0.html", "mode": "33188", "license": "mit", "language": [], "symlink_target": "" }
package x import ( "context" "github.com/gorilla/sessions" "github.com/ory/x/tracing" "github.com/ory/herodot" "github.com/ory/x/logrusx" ) type RegistryLogger interface { Logger() *logrusx.Logger AuditLogger() *logrusx.Logger } type RegistryWriter interface { Writer() herodot.Writer } type RegistryCookieStore interface { CookieStore() sessions.Store } type TracingProvider interface { Tracer(ctx context.Context) *tracing.Tracer }
{ "content_hash": "e0bd93ce7b3b4d808d5847b5074b16c1", "timestamp": "", "source": "github", "line_count": 29, "max_line_length": 44, "avg_line_length": 15.586206896551724, "alnum_prop": 0.7522123893805309, "repo_name": "ory-am/hydra", "id": "96fc32591b380f498968d30c14ba9f395b01d596", "size": "452", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "x/registry.go", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Go", "bytes": "322097" } ], "symlink_target": "" }
''' Test of a LookupTable layer, which is often being used for word embedding ''' from builtins import zip import itertools as itt import numpy as np from neon.backends import gen_backend from neon import NervanaObject from neon import logger as neon_logger from neon.initializers.initializer import GlorotUniform from neon.layers.layer import LookupTable from utils import allclose_with_out def pytest_generate_tests(metafunc): if metafunc.config.option.all: bsz_rng = [16, 32, 64] else: bsz_rng = [128] if 'basic_linargs' in metafunc.fixturenames: fargs = [] if metafunc.config.option.all: nin_rng = [1, 2, 64, 128] nout_rng = [1, 4, 128, 64] vocab_size = [1, 4, 1000, 2000] else: nin_rng = [4, 32] nout_rng = [3, 33] vocab_size = [10, 34] fargs = itt.product(nin_rng, nout_rng, vocab_size, bsz_rng) neon_logger.display('{}'.format(fargs)) metafunc.parametrize('basic_linargs', fargs) def test_lookuptable_zeros_error(backend_default, basic_linargs, deltas_buffer): # basic sanity check with 0 weights random inputs nin, nout, batch_size, vocab_size = basic_linargs NervanaObject.be.bsz = batch_size dtypeu = np.float32 init_glorot = GlorotUniform() layer = LookupTable( vocab_size=vocab_size, embedding_dim=nout, init=init_glorot) inp = np.random.random_integers(0, vocab_size - 1, size=nin * batch_size) layer.configure(nin) layer.allocate() layer.prev_layer = True # Hack to force delta buffer allocation layer.allocate_deltas(deltas_buffer) deltas_buffer.allocate_buffers() layer.set_deltas(deltas_buffer) inputs = layer.be.array(inp.reshape((nin, batch_size))) out = layer.fprop(inputs).get() W = layer.W.get() for i in range(nin * batch_size): assert np.all(W[inp[i]].T == out[:, i]) err = dtypeu(np.zeros((nout, nin * batch_size))) layer.bprop(layer.be.array(err)).get() dw = layer.dW.get() assert np.min(dw) == 0.0 and np.max(dw) == 0.0 return def test_lookuptable_ones_error(backend_default, basic_linargs, deltas_buffer): nin, nout, batch_size, vocab_size = basic_linargs NervanaObject.be.bsz = batch_size dtypeu = np.float32 init_glorot = GlorotUniform() layer = LookupTable( vocab_size=vocab_size, embedding_dim=nout, init=init_glorot) inp = np.random.random_integers(0, vocab_size - 1, size=nin * batch_size) layer.configure(nin) layer.allocate() layer.prev_layer = True # Hack to force delta buffer allocation layer.allocate_deltas(deltas_buffer) deltas_buffer.allocate_buffers() layer.set_deltas(deltas_buffer) inputs = layer.be.array(inp.reshape((nin, batch_size))) out = layer.fprop(inputs).get() W = layer.W.get() for i in range(nin * batch_size): assert np.all(W[inp[i]].T == out[:, i]) err = dtypeu(np.ones((nout, nin * batch_size))) layer.bprop(layer.be.array(err)).get() dw = layer.dW.get() unqidx, count = np.unique(inp, return_counts=True) dw_exp = np.zeros((1, nout)) for wrd_id, cnt in zip(unqidx, count): dw_exp = err[:, 0] * cnt assert np.all(dw_exp == dw[wrd_id, :]) return def test_lookuptable_rand_error(backend_default, basic_linargs, deltas_buffer): nin, nout, batch_size, vocab_size = basic_linargs NervanaObject.be.bsz = batch_size dtypeu = np.float32 init_glorot = GlorotUniform() layer = LookupTable( vocab_size=vocab_size, embedding_dim=nout, init=init_glorot) inp = np.random.random_integers(0, vocab_size - 1, size=nin * batch_size) layer.configure(nin) layer.allocate() layer.prev_layer = True # Hack to force delta buffer allocation layer.allocate_deltas(deltas_buffer) deltas_buffer.allocate_buffers() layer.set_deltas(deltas_buffer) inputs = layer.be.array(inp.reshape((nin, batch_size))) out = layer.fprop(inputs).get() W = layer.W.get() for i in range(nin * batch_size): assert np.all(W[inp[i]].T == out[:, i]) err = dtypeu(np.random.random((nout, nin * batch_size))) layer.bprop(layer.be.array(err)).get() dw = layer.dW.get() unqidx, count = np.unique(inp, return_counts=True) dw_exp = np.zeros((1, nout)) for wrd_id, cnt in zip(unqidx, count): dw_exp[:] = 0 cnt_exp = 0 for i, w_id in enumerate(inp): if w_id == wrd_id: dw_exp[:] = dw_exp[:] + err[:, i] cnt_exp += 1 assert allclose_with_out(dw[wrd_id, :], dw_exp, atol=0, rtol=1e-4) assert allclose_with_out(dw_exp, dw[wrd_id, :], atol=0, rtol=1e-4) assert cnt == cnt_exp return if __name__ == '__main__': fargs = [1, 128, 1, 1] be = gen_backend(backend='cpu', datatype=np.float32, batch_size=128, rng_seed=0) test_lookuptable_zeros_error(be, fargs)
{ "content_hash": "15a2c697e675d61d26655005b9972fcd", "timestamp": "", "source": "github", "line_count": 163, "max_line_length": 80, "avg_line_length": 30.938650306748468, "alnum_prop": 0.6218520721792584, "repo_name": "NervanaSystems/neon", "id": "55d4bb3123f7198300ec510f729c70359af53d56", "size": "5791", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "tests/test_lookuptable.py", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "267" }, { "name": "C", "bytes": "125018" }, { "name": "CSS", "bytes": "1484011" }, { "name": "Cuda", "bytes": "14937" }, { "name": "Dockerfile", "bytes": "1483" }, { "name": "Makefile", "bytes": "12033" }, { "name": "Perl", "bytes": "130967" }, { "name": "Python", "bytes": "2113676" }, { "name": "Shell", "bytes": "5711" } ], "symlink_target": "" }
Hello API Documentation {#mainpage} ============ [TOC] # Introduction {#Introduction} Welcome to Hello, a C++ library and application to rule the world. In its spare time it serves as a template for new C++ projects, as detailed in the @ref documentation. Hello 1.0 is the first complete release. It can be retrieved by cloning the [source code](https://github.com/BlueBrain/Hello). ## Features {#Features} Hello provides the following major features: * Rule the world * Provide a template for C++ projects - - - # New in this release {#New} Hello 1.0 provides the following features: ## New Features {#NewFeatures} * @ref documentation ## Enhancements {#Enhancements} * Integrated CMake subtree using git_external ## Optimizations {#Optimizations} * No optimizations ## Documentation {#Documentation} * No new documentation ## Bug Fixes {#Fixes} Hello 1.0 includes various bugfixes over the last release, including the following: * No bugs ## Known Bugs {#Bugs} The following bugs were known at release time. Please file a [Bug Report](https://github.com/BlueBrain/Hello/issues) if you find any other issue with this release. * No known bugs - - - # About {#About} Hello is a cross-platform toolkit, designed to run on any modern operating system, including all Unix variants. Hello uses CMake to create a platform-specific build environment. The following platforms and build environments are tested: * Linux: Ubuntu 12.10, 13.04, 13.10 RHEL 6 (Makefile, i386, x64) * Mac OS X: 10.8 (Makefile, XCode, i386, x64) The [API documentation](https://bluebrain.github.io/Hello-1.0/index.html) can be found on [bluebrain.github.io] (http://bluebrain.github.io/) - - - # Errata {#Errata} * Post-release hot fixes go here
{ "content_hash": "a9d93f096ae70abae919aded98307cb4", "timestamp": "", "source": "github", "line_count": 78, "max_line_length": 73, "avg_line_length": 22.384615384615383, "alnum_prop": 0.7331042382588774, "repo_name": "kaust-vislab/scpp", "id": "4bbf59e5ef98e867080d264cf32489f6ad663629", "size": "1746", "binary": false, "copies": "5", "ref": "refs/heads/master", "path": "doc/RelNotes.md", "mode": "33188", "license": "mit", "language": [ { "name": "C++", "bytes": "6786" } ], "symlink_target": "" }
const items = require('../seed-data/products.json'); const TABLE_NAME = 'products'; items.unshift(TABLE_NAME); exports.seed = function (knex, Promise) { return Promise .map(items, function (item) { if (item === TABLE_NAME) // Deletes ALL existing entries return knex(TABLE_NAME).del(); else // Inserts seed entries return knex(TABLE_NAME) .insert({ id: item.id, name: item.name, vintage: item.vintage, saleprice: item.saleprice, listprice: item.listprice, quantity: item.quantity, type_id: item.type, size_id: item.size, // regions: item.regions }); }) .catch(err => { console.error('ERROR products:', err); }); };
{ "content_hash": "a5013791199cd811c3bef3a48402a00a", "timestamp": "", "source": "github", "line_count": 31, "max_line_length": 52, "avg_line_length": 26.258064516129032, "alnum_prop": 0.5356265356265356, "repo_name": "rkoberg/rihpl", "id": "d3c5a4b9e16c28c089084a6d3d7e9e1d2ee790fe", "size": "815", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "db/seeds/Q_products.js", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "33886" }, { "name": "JavaScript", "bytes": "187525" } ], "symlink_target": "" }
<?php namespace Acast\Socket\Enhanced; use GatewayWorker\ { BusinessWorker, Register, Gateway as GatewayWorker }; use Workerman\ { Worker }; class Server extends \Acast\Server { /** * 路由实例 * @var Router */ protected $_router; /** * 处理业务逻辑的Worker * @var BusinessWorker */ protected $_business_worker; /** * @var callable */ protected $_on_business_start; /** * @var callable */ protected $_on_connect; /** * @var callable */ protected $_on_close; /** * @var callable */ protected $_on_business_message; /** * @var callable */ protected $_on_business_stop; /** * 收到请求回调 * * @param string $client_id * @param string $data */ function onMessage($client_id, $data) { if (!is_null($callback = $_SESSION['lock'])) { is_callable($callback) && $callback($client_id, $data); return; } $path = $method = null; if (is_callable($callback = $this->_on_business_message)) $this->_router->requestData = $callback($client_id, $data, $path, $method); $this->_router->client_id = $client_id; $this->_router->locate($path ?? [], $method ?? Router::DEFAULT_METHOD); } /** * 建立与BusinessWorker的连接后执行此回调 * * @param $client_id */ function onConnect($client_id) { if (is_callable($this->_on_connect)) call_user_func($this->_on_connect, $client_id); } /** * 断开与BusinessWorker的连接后执行此回调 * * @param $client_id */ function onClose($client_id) { if (is_callable($this->_on_close)) call_user_func($this->_on_close, $client_id); } /** * BusinessWorker启动回调 * * @param Worker $worker */ function onBusinessStart(Worker $worker) { self::$name = $this->_name; self::$memcached = new \Memcached(); if (is_callable($this->_on_business_start)) call_user_func($this->_on_business_start, $worker); self::$_status = self::_STATUS_STARTED; } /** * BusinessWorker停止回调 * * @param Worker $worker */ function onBusinessStop(Worker $worker) { if (is_callable($this->_on_business_stop)) call_user_func($this->_on_business_stop, $worker); } /** * {@inheritdoc} */ function onServerStop(Worker $worker) { parent::onServerStop($worker); foreach ($worker->connections as $connection) $connection->close(); } /** * {@inheritdoc} */ function __construct(string $name, ?string $listen, ?array $ssl = null) { if ($listen) { parent::__construct($name, $listen, $ssl, GatewayWorker::class); $this->_worker->onWorkerStart = [$this, 'onServerStart']; $this->_worker->onWorkerStop = [$this, 'onServerStop']; $this->workerConfig(DEFAULT_GATEWAY_WORKER_CONFIG); } } /** * 创建服务 * * @param string $app * @param null|string $listen * @param array|null $ssl * @param bool $businessWorker * @return Server */ static function create(string $app, ?string $listen = null, ?array $ssl = null, bool $businessWorker = true) { parent::create($app); self::$_apps[$app] = new self($app, $listen, $ssl); if ($businessWorker) self::$_apps[$app]->addBusinessWorker(); return self::$_apps[$app]; } /** * 单独添加BusinessWorker */ function addBusinessWorker() { $this->_business_worker = new BusinessWorker; $this->_business_worker->onWorkerStart = [$this, 'onBusinessStart']; $this->_business_worker->onWorkerStop = [$this, 'onBusinessStop']; $this->_business_worker->eventHandler = $this; $this->businessWorkerConfig(DEFAULT_BUSINESS_WORKER_CONFIG); } /** * 配置BusinessWorker * * @param array $config */ function businessWorkerConfig(array $config) { foreach ($config as $key => $value) $this->_business_worker->$key = $value; } /** * 获取BusinessWorker属性 * * @param string $name * @return bool */ function getBusinessWorkerProperty(string $name) { if (!($this->_business_worker instanceof Worker)) { Console::warning('Worker not initialized.'); return false; } return $this->_business_worker->$name; } /** * 为BusinessWorker注册事件 * * @param string $event * @param callable $callback */ function businessEvent(string $event, callable $callback) { if (self::$_status > self::_STATUS_INITIAL) { Console::warning('Cannot set event callback once the service is started.'); return; } if (!is_callable($callback)) { Console::warning('Failed to set event callback. Not callable.'); return; } switch ($event) { case 'WorkerStart': $this->_on_business_start = $callback; break; case 'WorkerStop': $this->_on_business_stop = $callback; break; case 'Message': $this->_on_business_message = $callback; break; case 'Connect': $this->_on_connect = $callback; break; case 'Close': $this->_on_close = $callback; break; default: $this->_business_worker->{'on'.$event} = $callback; } } /** * 添加注册服务器 * * @param string $name * @param string $listen */ static function addRegister(string $name, string $listen) { $register = new Register('text://'.$listen); $register->name = $name; } }
{ "content_hash": "3cb4b267c6a8d32d9a6855e1fb507882", "timestamp": "", "source": "github", "line_count": 212, "max_line_length": 114, "avg_line_length": 28.03301886792453, "alnum_prop": 0.5288574793875147, "repo_name": "CismonX/Acast", "id": "fc4ceb994e53d8cc39e10b093cea3a401ea78ef7", "size": "6093", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/Socket/Enhanced/Server.php", "mode": "33188", "license": "mit", "language": [ { "name": "PHP", "bytes": "57318" } ], "symlink_target": "" }
(function( $ ){ $.fn.paginationNav = function(options) { self = this; this.defaultSettings = { numPages: 0, pageNumber: -1, direction: 1, visibleNums: 5, currentPosition: null, showPrev: true, showNext: true, showFirst: true, showLast: true }; $.extend(this, this.defaultSettings); $.extend(this, options); /*--------------------------------------------------*/ this.setPage = function(pageNumber) { pageNumber = parseInt(pageNumber,10); if (this.pageNumber != pageNumber){ //keep the pageNumber within range of this.numPages pageNumber %= this.numPages + 1; //loop if pageNumber is negative if (pageNumber < 0){ pageNumber += this.numPages; } this.direction = (pageNumber - this.pageNumber > 0) ? 1 : -1; //build display this.rebuild(pageNumber); //tell the world what you've done this.trigger("setPage", {pageNumber:pageNumber, direction: this.direction}); } }; /*--------------------------------------------------*/ this.rebuild = function(pageNumber) { this.pageNumber = pageNumber || 0; var currentPosition = this.currentPosition || Math.floor(this.visibleNums * 0.5); var visiblePrev = visiblePrev || currentPosition; var visibleNext = visibleNext || this.visibleNums - currentPosition - 1; var showPrev = showPrev || this.showPrev; var showNext = showNext || this.showNext; var showFirst = showFirst || this.showFirst; var showLast = showLast || this.showLast; var startNumber = this.pageNumber - visiblePrev; if (startNumber <= 0) { visibleNext -= startNumber; startNumber = 0; } var endNumber = this.pageNumber + visibleNext; if (endNumber >= this.numPages) { endNumber = this.numPages - 1; visiblePrev += visibleNext startNumber = Math.max(0, this.numPages - (visiblePrev) - 1); } var html = ""; if (this.numPages > 0) { for (var i = startNumber; i <= endNumber; i++) { html += this.makeNumberDisplay(i, this.pageNumber); } if (showFirst && this.pageNumber - visiblePrev > 0) { html = this.makeNumberDisplay(0, this.pageNumber) + " ... " + html; } if (showLast && this.pageNumber + visibleNext < this.numPages) { html = html + " ... " + this.makeNumberDisplay(this.numPages, this.pageNumber); } } this.html(html); //Set Events this.find(".pageNumber").each(function(i, item){ $item = $(item); $item.click(function(){ $(this).trigger('changePageClick', $(this).data('pagenumber')); }); $item.on('changePageClick', self.handleNumberClick); }); }; /*--------------------------------------------------*/ this.handleNumberClick = function(event, pageNumber){ self.setPage.call(self, [parseInt(pageNumber,10), true]); }; /*--------------------------------------------------*/ this.makeNumberDisplay = function(index, pageNumber) { var classNames = 'pageNumber' + ((index == pageNumber) ? " active" : ""); var displayText = (index + 1); var html = '<div class="' + classNames + '" data-pagenumber="'+index+'">' + displayText + '</div>'; return html; }; /*--------------------------------------------------*/ this.nextPage = function() { if (this.pageNumber + 1 < this.numPages) { this.setPage(this.pageNumber + 1); } }; /*--------------------------------------------------*/ this.prevPage = function() { if (this.pageNumber - 1 >= 0) { this.setPage(this.pageNumber - 1); } }; this.setPage(0); return this; }; })( jQuery );
{ "content_hash": "7e1f78ee02cae1f01ef7f8a7408d714e", "timestamp": "", "source": "github", "line_count": 130, "max_line_length": 107, "avg_line_length": 31.50769230769231, "alnum_prop": 0.496826171875, "repo_name": "gunderson/jquery.paginationNav", "id": "06a4ece9f1c071241c5cea92b594fdb35722fa1b", "size": "4250", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "dist/jquery.paginationNav.js", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "4599" }, { "name": "JavaScript", "bytes": "54852" } ], "symlink_target": "" }
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> <PreferenceCategory android:title="Mouse Settings"> <EditTextPreference android:defaultValue="0.7" android:inputType="numberDecimal" android:key="pref_sensitivity" android:title="Sensitivity" android:dialogTitle="Set mouse sensitivity" /> <EditTextPreference android:defaultValue="1.5" android:inputType="numberDecimal" android:key="pref_acceleration" android:title="Acceleration" android:dialogTitle="Set mouse acceleration" /> </PreferenceCategory> <PreferenceCategory android:title="Server Settings"> <EditTextPreference android:key="pref_server" android:title="Server Address" android:dialogTitle="Set server address" /> <EditTextPreference android:defaultValue="9000" android:inputType="number" android:key="pref_port" android:title="Server Port" android:dialogTitle="Set server port" /> </PreferenceCategory> </PreferenceScreen>
{ "content_hash": "0602f33ec239d5dd4726872f2fe3db0e", "timestamp": "", "source": "github", "line_count": 40, "max_line_length": 67, "avg_line_length": 32.175, "alnum_prop": 0.5757575757575758, "repo_name": "marcusfeeney/AndroidTouchMouse", "id": "0b7970b072e1ed58eaaf50a47ae87e279d03f5d4", "size": "1287", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "res/layout/preferences.xml", "mode": "33188", "license": "mit", "language": [ { "name": "Java", "bytes": "11106" } ], "symlink_target": "" }
using namespace std; int Ped::Tobstacle::staticid = 0; /// Default constructor, places a wall from 0/0 to 1/1 /// \date 2012-01-07 Ped::Tobstacle::Tobstacle() { id = staticid++; ax = 0; ay = 0; bx = 1; by = 1; type = 0; } /// Constructor used to set initial values. /// \date 2012-01-07 /// \param pax x coordinate of the first corner of the obstacle. /// \param pay y coordinate of the first corner of the obstacle. /// \param pbx x coordinate of the second corner of the obstacle. /// \param pby y coordinate of the second corner of the obstacle. Ped::Tobstacle::Tobstacle(double pax, double pay, double pbx, double pby) { id = staticid++; ax = pax; ay = pay; bx = pbx; by = pby; type = 0; } /// Constructor used to set initial values. /// \date 2013-08-02 /// \param startIn The first corner of the obstacle. /// \param endIn The second corner of the obstacle. Ped::Tobstacle::Tobstacle(const Tvector& startIn, const Tvector& endIn) { id = staticid++; ax = startIn.x; ay = startIn.y; bx = endIn.x; by = endIn.y; type = 0; } /// Destructor Ped::Tobstacle::~Tobstacle() { // clean up } Ped::Tvector Ped::Tobstacle::getStartPoint() const { return Tvector(ax, ay); } Ped::Tvector Ped::Tobstacle::getEndPoint() const { return Tvector(bx, by); } /// Moves the obstacle to a new position. Can be uses to simulate opening doors etc. /// \date 2012-01-07 /// \param pax x coordinate of the first corner of the obstacle. /// \param pay y coordinate of the first corner of the obstacle. /// \param pbx x coordinate of the second corner of the obstacle. /// \param pby y coordinate of the second corner of the obstacle. void Ped::Tobstacle::setPosition(double pax, double pay, double pbx, double pby) { ax = pax; ay = pay; bx = pbx; by = pby; } void Ped::Tobstacle::setPosition(const Tvector& startIn, const Tvector& endIn) { setPosition(startIn.x, startIn.y, endIn.x, endIn.y); } void Ped::Tobstacle::setStartPoint(const Tvector& startIn) { ax = startIn.x; ay = startIn.y; } void Ped::Tobstacle::setEndPoint(const Tvector& endIn) { bx = endIn.x; by = endIn.y; } Ped::Tvector Ped::Tobstacle::closestPoint(const Tvector& pointIn) const { Tvector startPoint(ax, ay); Tvector endPoint(bx, by); Tvector relativeEndPoint = endPoint - startPoint; Tvector relativePoint = pointIn - startPoint; double lambda = (Tvector::dotProduct(relativePoint, relativeEndPoint)) / relativeEndPoint.lengthSquared(); if(lambda <= 0) return startPoint; else if(lambda >= 1) return endPoint; else return startPoint + lambda*relativeEndPoint; } /// Calculates and returns the forces of the obstacle to a given point x/y. /// x/y can be the location of an agent, but it can also be anything else, /// for example a grid coordinate of the user interface, if you want to display /// the obstacle forces on the map. /// \date 2012-01-17 /// \return Tvector forces /// \param double x: The x coordinate of the point /// \param double y: The y coordinate of the point Ped::Tvector Ped::Tobstacle::closestPoint(double p1, double p2) const { return closestPoint(Tvector(p1, p2)); } /// Rotate obstacle /// \author chgloor /// \warning Due to rounding errors, this will fail after a while. /// \param rotationCenterIn The point the obstacle will be rotated around. /// \param angleIn The angle the obstacle will be rotated, where phi is given in radians void Ped::Tobstacle::rotate(const Ped::Tvector& rotationCenterIn, const Ped::Tangle& angleIn) { double angleValue = angleIn.toRadian(); double sinPhi = sin(angleValue); double cosPhi = cos(angleValue); Ped::Tvector relativeStart = getStartPoint() - rotationCenterIn; Ped::Tvector relativeEnd = getEndPoint() - rotationCenterIn; // computation //NOTE: currently there is no matrix support in PedSim Ped::Tvector rotatedStart = Ped::Tvector(cosPhi*relativeStart.x - sinPhi*relativeStart.y, sinPhi*relativeStart.x + cosPhi*relativeStart.y) + rotationCenterIn; Ped::Tvector rotatedEnd = Ped::Tvector(cosPhi*relativeEnd.x - sinPhi*relativeEnd.y, sinPhi*relativeEnd.x + cosPhi*relativeEnd.y) + rotationCenterIn; // update position setPosition(rotatedStart, rotatedEnd); }
{ "content_hash": "5485e64e9c931e9c67b6ebda53e53020", "timestamp": "", "source": "github", "line_count": 139, "max_line_length": 159, "avg_line_length": 30.136690647482013, "alnum_prop": 0.7111482454046312, "repo_name": "zchenpds/ee631_final", "id": "69fc382dd9b24ac42137b70d2ea8a781153bccbc", "size": "4364", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "pedsim/src/ped_obstacle.cpp", "mode": "33188", "license": "bsd-2-clause", "language": [ { "name": "C++", "bytes": "544804" }, { "name": "CMake", "bytes": "9953" }, { "name": "Python", "bytes": "54830" }, { "name": "Shell", "bytes": "325" } ], "symlink_target": "" }
// Copyright 2014 The Bazel Authors. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.devtools.build.lib.analysis; import com.google.common.collect.ImmutableCollection; import com.google.common.collect.ImmutableList; import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.analysis.config.BuildConfiguration; import com.google.devtools.build.lib.cmdline.Label; import com.google.devtools.build.lib.collect.nestedset.NestedSet; import com.google.devtools.build.lib.collect.nestedset.NestedSetBuilder; import com.google.devtools.build.lib.collect.nestedset.Order; import com.google.devtools.build.lib.events.Location; import com.google.devtools.build.lib.packages.PackageSpecification; import com.google.devtools.build.lib.packages.SkylarkClassObjectConstructor; import com.google.devtools.build.lib.packages.SkylarkProviderIdentifier; import com.google.devtools.build.lib.packages.Target; import com.google.devtools.build.lib.syntax.ClassObject; import com.google.devtools.build.lib.syntax.EvalException; import com.google.devtools.build.lib.syntax.EvalUtils; import com.google.devtools.build.lib.syntax.SkylarkNestedSet; import javax.annotation.Nullable; /** * An abstract implementation of ConfiguredTarget in which all properties are * assigned trivial default values. */ public abstract class AbstractConfiguredTarget implements ConfiguredTarget, VisibilityProvider, ClassObject { private final Target target; private final BuildConfiguration configuration; private final NestedSet<PackageSpecification> visibility; // Accessors for Skylark private static final String DATA_RUNFILES_FIELD = "data_runfiles"; private static final String DEFAULT_RUNFILES_FIELD = "default_runfiles"; private static final String LABEL_FIELD = "label"; private static final String FILES_FIELD = "files"; AbstractConfiguredTarget(Target target, BuildConfiguration configuration) { this.target = target; this.configuration = configuration; this.visibility = NestedSetBuilder.emptySet(Order.STABLE_ORDER); } AbstractConfiguredTarget(TargetContext targetContext) { this.target = targetContext.getTarget(); this.configuration = targetContext.getConfiguration(); this.visibility = targetContext.getVisibility(); } @Override public final NestedSet<PackageSpecification> getVisibility() { return visibility; } @Override public Target getTarget() { return target; } @Override public BuildConfiguration getConfiguration() { return configuration; } @Nullable @Override public Object get(SkylarkProviderIdentifier id) { if (id.isLegacy()) { return get(id.getLegacyId()); } return get(id.getKey()); } @Override public Label getLabel() { return getTarget().getLabel(); } @Override public String toString() { return "ConfiguredTarget(" + getTarget().getLabel() + ", " + getConfiguration() + ")"; } @Nullable @Override public <P extends TransitiveInfoProvider> P getProvider(Class<P> provider) { AnalysisUtils.checkProvider(provider); if (provider.isAssignableFrom(getClass())) { return provider.cast(this); } else { return null; } } @Override public Object getValue(String name) { switch (name) { case LABEL_FIELD: return getLabel(); case FILES_FIELD: // A shortcut for files to build in Skylark. FileConfiguredTarget and RuleConfiguredTarget // always has FileProvider and Error- and PackageGroupConfiguredTarget-s shouldn't be // accessible in Skylark. return SkylarkNestedSet.of( Artifact.class, getProvider(FileProvider.class).getFilesToBuild()); case DEFAULT_RUNFILES_FIELD: return RunfilesProvider.DEFAULT_RUNFILES.apply(this); case DATA_RUNFILES_FIELD: return RunfilesProvider.DATA_RUNFILES.apply(this); default: return get(name); } } @Override public Object getIndex(Object key, Location loc) throws EvalException { if (!(key instanceof SkylarkClassObjectConstructor)) { throw new EvalException(loc, String.format( "Type Target only supports indexing by object constructors, got %s instead", EvalUtils.getDataTypeName(key))); } SkylarkClassObjectConstructor constructor = (SkylarkClassObjectConstructor) key; SkylarkProviders provider = getProvider(SkylarkProviders.class); if (provider != null) { Object declaredProvider = provider.getDeclaredProvider(constructor.getKey()); if (declaredProvider != null) { return declaredProvider; } } // Either provider or declaredProvider is null throw new EvalException(loc, String.format( "Object of type Target doesn't contain declared provider %s", constructor.getKey().getExportedName())); } @Override public String errorMessage(String name) { return null; } @Override public ImmutableCollection<String> getKeys() { return ImmutableList.of(DATA_RUNFILES_FIELD, DEFAULT_RUNFILES_FIELD, LABEL_FIELD, FILES_FIELD); } }
{ "content_hash": "34b5810a8762aae5da7367902a071024", "timestamp": "", "source": "github", "line_count": 161, "max_line_length": 99, "avg_line_length": 35.24844720496895, "alnum_prop": 0.7379735682819383, "repo_name": "mrdomino/bazel", "id": "107e64bb8fc37374f5d3283b0186c3cbf5f422ba", "size": "5675", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/main/java/com/google/devtools/build/lib/analysis/AbstractConfiguredTarget.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "78" }, { "name": "C", "bytes": "24763" }, { "name": "C++", "bytes": "627733" }, { "name": "HTML", "bytes": "17102" }, { "name": "Java", "bytes": "19142986" }, { "name": "Makefile", "bytes": "248" }, { "name": "PowerShell", "bytes": "3232" }, { "name": "Protocol Buffer", "bytes": "106331" }, { "name": "Python", "bytes": "283340" }, { "name": "Shell", "bytes": "627490" } ], "symlink_target": "" }
from __future__ import absolute_import from django.http import HttpResponse, HttpResponseNotAllowed import ujson from typing import Optional, Any, Dict, List from six import text_type class HttpResponseUnauthorized(HttpResponse): status_code = 401 def __init__(self, realm): # type (text_type) -> None HttpResponse.__init__(self) self["WWW-Authenticate"] = 'Basic realm="%s"' % (realm,) def json_unauthorized(message): # type: (text_type) -> text_type resp = HttpResponseUnauthorized("zulip") resp.content = ujson.dumps({"result": "error", "msg": message}) + "\n" return resp def json_method_not_allowed(methods): # type: (List[text_type]) -> text_type resp = HttpResponseNotAllowed(methods) resp.content = ujson.dumps({"result": "error", "msg": "Method Not Allowed", "allowed_methods": methods}) return resp def json_response(res_type="success", msg="", data=None, status=200): # type: (text_type, text_type, Optional[Dict[str, Any]], int) -> HttpResponse content = {"result": res_type, "msg": msg} if data is not None: content.update(data) return HttpResponse(content=ujson.dumps(content) + "\n", content_type='application/json', status=status) def json_success(data=None): # type: (Optional[Dict[str, Any]]) -> HttpResponse return json_response(data=data) def json_error(msg, data=None, status=400): # type: (str, Optional[Dict[str, Any]], int) -> HttpResponse return json_response(res_type="error", msg=msg, data=data, status=status) def json_unhandled_exception(): # type: () -> HttpResponse return json_response(res_type="error", msg="Internal server error", status=500)
{ "content_hash": "6afc9fbbdf61eebd0966805171c66eb0", "timestamp": "", "source": "github", "line_count": 51, "max_line_length": 83, "avg_line_length": 34.745098039215684, "alnum_prop": 0.6467268623024831, "repo_name": "Vallher/zulip", "id": "588154a4fa51b5a5cb2f01f6e4ed805ee1f1c95a", "size": "1772", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "zerver/lib/response.py", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "164" }, { "name": "CSS", "bytes": "182566" }, { "name": "CoffeeScript", "bytes": "18435" }, { "name": "Groovy", "bytes": "5515" }, { "name": "HTML", "bytes": "385288" }, { "name": "JavaScript", "bytes": "1571752" }, { "name": "Nginx", "bytes": "1228" }, { "name": "PHP", "bytes": "18930" }, { "name": "Pascal", "bytes": "1113" }, { "name": "Perl", "bytes": "383634" }, { "name": "Puppet", "bytes": "95624" }, { "name": "Python", "bytes": "1862563" }, { "name": "Ruby", "bytes": "255867" }, { "name": "Shell", "bytes": "32357" } ], "symlink_target": "" }
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace _02.ChangeList { class ChangeList { static void Main() { List<int> numbers = Console.ReadLine() .Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries) .Select(int.Parse) .ToList(); string command = Console.ReadLine().ToLower(); while (command != "odd" && command != "even") { string[] tokens = command.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); int element = int.Parse(tokens[1]); switch (tokens[0]) { case "delete": DeleteElements(numbers, element); break; case "insert": int index = int.Parse(tokens[2]); numbers.Insert(index, element); break; } command = Console.ReadLine().ToLower(); } if (command == "odd") { numbers = numbers.Where(n => n % 2 != 0) .ToList(); } else if (command == "even") { numbers = numbers.Where(n => n % 2 == 0) .ToList(); } Console.WriteLine(string.Join(" ", numbers)); } private static void DeleteElements(List<int> numbers, int element) { for (int i = 0; i < numbers.Count; i++) { if (numbers[i] == element) { numbers.RemoveAt(i); i--; } } } } }
{ "content_hash": "d095f198f4e118ae2eae2bef72478def", "timestamp": "", "source": "github", "line_count": 68, "max_line_length": 107, "avg_line_length": 28.5, "alnum_prop": 0.3993808049535604, "repo_name": "ShadyObeyd/ProgrammingFundamentals-Homeworks", "id": "c7be81511ce0b3fdf25ceec1c1b8cf542eeb074c", "size": "1940", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "12.Lists-Exercises/02.ChangeList/ChangeList.cs", "mode": "33188", "license": "mit", "language": [ { "name": "C#", "bytes": "569658" } ], "symlink_target": "" }
/* ### * IP: GHIDRA * * 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 ghidra.app.plugin.assembler.sleigh.tree; import java.io.PrintStream; import ghidra.app.plugin.assembler.sleigh.grammars.AssemblyGrammar; import ghidra.app.plugin.assembler.sleigh.symbol.AssemblySymbol; /** * A node in a parse tree */ public abstract class AssemblyParseTreeNode { protected AssemblyParseBranch parent = null; protected final AssemblyGrammar grammar; /** * Construct a node for a tree parsed by the given grammar * * @param grammar the grammar */ public AssemblyParseTreeNode(AssemblyGrammar grammar) { this.grammar = grammar; } /** * Get the symbol for which this node is substituted * * <p> * For a branch, this is the LHS of the corresponding production. For a token, this is the * terminal whose tokenizer matched it. * * @return the symbol */ public abstract AssemblySymbol getSym(); /** * Get the branch which contains this node * * @return */ public AssemblyParseBranch getParent() { return parent; } /** * Set the branch which contains this node * * @param parent */ protected void setParent(AssemblyParseBranch parent) { // NOTE: Cannot assert, since the LR parser may backtrack and reassign. this.parent = parent; } /** * For debugging: Display this parse tree via the given stream * * @param out the stream */ public void print(PrintStream out) { print(out, ""); } /** * For debugging: Display the tree with the given indent * * @param out the stream * @param indent the indent */ protected abstract void print(PrintStream out, String indent); /** * Check if this node yields a subconstructor resolution * * @return true if this node yields a subconstructor resolution */ public boolean isConstructor() { return false; } /** * Check if this node yields a numeric value * * @return true if this node yields a numeric value */ public boolean isNumeric() { return false; } /** * Get the grammar used to parse the tree * * @return the grammar */ public AssemblyGrammar getGrammar() { return grammar; } /** * Generate the string that this node parsed * * @return the string */ public abstract String generateString(); }
{ "content_hash": "5778907adb4c0b44bd39c46a9beedafa", "timestamp": "", "source": "github", "line_count": 119, "max_line_length": 91, "avg_line_length": 23.49579831932773, "alnum_prop": 0.6995708154506438, "repo_name": "NationalSecurityAgency/ghidra", "id": "ca80792d600d0cae21c48eb5693f7027e95ebab2", "size": "2796", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/app/plugin/assembler/sleigh/tree/AssemblyParseTreeNode.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Assembly", "bytes": "77536" }, { "name": "Batchfile", "bytes": "21610" }, { "name": "C", "bytes": "1132868" }, { "name": "C++", "bytes": "7334484" }, { "name": "CSS", "bytes": "75788" }, { "name": "GAP", "bytes": "102771" }, { "name": "GDB", "bytes": "3094" }, { "name": "HTML", "bytes": "4121163" }, { "name": "Hack", "bytes": "31483" }, { "name": "Haskell", "bytes": "453" }, { "name": "Java", "bytes": "88669329" }, { "name": "JavaScript", "bytes": "1109" }, { "name": "Lex", "bytes": "22193" }, { "name": "Makefile", "bytes": "15883" }, { "name": "Objective-C", "bytes": "23937" }, { "name": "Pawn", "bytes": "82" }, { "name": "Python", "bytes": "587415" }, { "name": "Shell", "bytes": "234945" }, { "name": "TeX", "bytes": "54049" }, { "name": "XSLT", "bytes": "15056" }, { "name": "Xtend", "bytes": "115955" }, { "name": "Yacc", "bytes": "127754" } ], "symlink_target": "" }
using System; using System.Xml.Serialization; namespace Aop.Api.Response { /// <summary> /// AlipayOpenPublicComptestCreateResponse. /// </summary> public class AlipayOpenPublicComptestCreateResponse : AopResponse { /// <summary> /// 1 /// </summary> [XmlElement("result")] public string Result { get; set; } } }
{ "content_hash": "91388d294985c9289dd9c4081a9c9595", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 69, "avg_line_length": 22.235294117647058, "alnum_prop": 0.6031746031746031, "repo_name": "329277920/Snail", "id": "ff4378a3b0124b8b8a09aba8013a0f324c4c5cf7", "size": "378", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Snail.Pay.Ali.Sdk/Response/AlipayOpenPublicComptestCreateResponse.cs", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C#", "bytes": "8409939" }, { "name": "CSS", "bytes": "8789" }, { "name": "Dockerfile", "bytes": "639" }, { "name": "HTML", "bytes": "14995" }, { "name": "JavaScript", "bytes": "29933" } ], "symlink_target": "" }
module.exports = { parser: "@typescript-eslint/parser", // Specifies the ESLint parser extends: [ "plugin:@typescript-eslint/recommended", // Uses the recommended rules from the @typescript-eslint/eslint-plugin "prettier/@typescript-eslint", // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier "plugin:prettier/recommended", // Enables eslint-plugin-prettier and eslint-config-prettier. This will display prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array. "plugin:react/recommended" // Enables eslint-plugin-react for React specific linting rules for ESLint. ], parserOptions: { ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features sourceType: "module", // Allows for the use of imports ecmaFeatures: { jsx: true // Allows for the parsing of JSX } }, rules: { // Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs // "@typescript-eslint/explicit-function-return-type": "off", "@typescript-eslint/explicit-function-return-type": [ "off", { "allowHigherOrderFunctions": true } ] }, settings: { react: { version: "detect" // Tells eslint-plugin-react to automatically detect the version of React to use } } };
{ "content_hash": "261656d2d9f21be6100941bd72d1fa32", "timestamp": "", "source": "github", "line_count": 31, "max_line_length": 218, "avg_line_length": 45.67741935483871, "alnum_prop": 0.7076271186440678, "repo_name": "gibbok/react-color-picker-palette", "id": "5094beb33d4e349d5235758a05955862d02152b7", "size": "1416", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": ".eslintrc.js", "mode": "33188", "license": "mit", "language": [ { "name": "HTML", "bytes": "3981" }, { "name": "JavaScript", "bytes": "5881" }, { "name": "Shell", "bytes": "2379" }, { "name": "TypeScript", "bytes": "15262" } ], "symlink_target": "" }
<!doctype html> <html <?php language_attributes(); ?> class="no-js"> <head> <meta charset="<?php bloginfo('charset'); ?>"> <title><?php wp_title(''); ?><?php if(wp_title('', false)) { echo ' :'; } ?> <?php bloginfo('name'); ?></title> <link href="//www.google-analytics.com" rel="dns-prefetch"> <link href="<?php echo get_template_directory_uri(); ?>/img/icons/favicon.ico" rel="shortcut icon"> <link href="<?php echo get_template_directory_uri(); ?>/img/icons/touch.png" rel="apple-touch-icon-precomposed"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content="<?php bloginfo('description'); ?>"> <!-- Bootstrap --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> <!-- fontawesome --> <link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet"> <!-- jQuery --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <?php wp_head(); ?> <script> // conditionizr.com // configure environment tests conditionizr.config({ assets: '<?php echo get_template_directory_uri(); ?>', tests: {} }); </script> </head> <body <?php body_class(); ?>> <div class="container-fluid"> <!-- header --> <header id="" role="banner"> <div class='col-xs-12 header includeTitle clear'> <!-- logo --> <div class="wrapper"> <h1><a class="logo includeTitleLogo" href="<?php echo home_url(); ?>">Palmetto Pressure Clean Logo</a></h1> <ul class="contact"> <li><a href="tel://803-467-7887">803.467.7887</a></li> <li><a href="mailto:[email protected]"><i class="fa fa-envelope"></i> Email</a></li> <li><a href="">Pay Bill</a></li> </ul> <h1 class="addTitle">About Us</h1> </div> <!-- /logo --> </div> <!-- nav --> <nav class="nav" role="navigation"> <?php html5blank_nav(); ?> </nav> <!-- /nav --> </header> <!-- /header -->
{ "content_hash": "a5ee163c8c12997868e14b3fca222dde", "timestamp": "", "source": "github", "line_count": 66, "max_line_length": 120, "avg_line_length": 33.59090909090909, "alnum_prop": 0.571041948579161, "repo_name": "abbystarnes/PPClean", "id": "ccad518f6a8cc6b6f7921316e62a4ecbe73386d7", "size": "2217", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "header-custom1.php", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "33212" }, { "name": "JavaScript", "bytes": "131" }, { "name": "PHP", "bytes": "43203" } ], "symlink_target": "" }
namespace openmc { inline void set_errmsg(const char* message) { std::strcpy(openmc_err_msg, message); } inline void set_errmsg(const std::string& message) { std::strcpy(openmc_err_msg, message.c_str()); } inline void set_errmsg(const std::stringstream& message) { std::strcpy(openmc_err_msg, message.str().c_str()); } [[noreturn]] void fatal_error(const std::string& message, int err=-1); [[noreturn]] inline void fatal_error(const std::stringstream& message) { fatal_error(message.str()); } [[noreturn]] inline void fatal_error(const char* message) { fatal_error(std::string{message, std::strlen(message)}); } void warning(const std::string& message); inline void warning(const std::stringstream& message) { warning(message.str()); } void write_message(const std::string& message, int level=0); inline void write_message(const std::stringstream& message, int level) { write_message(message.str(), level); } template<typename... Params> void write_message( int level, const std::string& message, const Params&... fmt_args) { if (settings::verbosity >= level) { write_message(fmt::format(message, fmt_args...)); } } template<typename... Params> void write_message(const std::string& message, const Params&... fmt_args) { write_message(fmt::format(message, fmt_args...)); } #ifdef OPENMC_MPI extern "C" void abort_mpi(int code); #endif } // namespace openmc #endif // OPENMC_ERROR_H
{ "content_hash": "d7e5f93ab1c3b869b95b540a34df984a", "timestamp": "", "source": "github", "line_count": 71, "max_line_length": 73, "avg_line_length": 20.028169014084508, "alnum_prop": 0.7018284106891702, "repo_name": "smharper/openmc", "id": "4c4efe6a73ea4d76253f66c07951f6379662ef8a", "size": "1712", "binary": false, "copies": "4", "ref": "refs/heads/develop", "path": "include/openmc/error.h", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "10738" }, { "name": "C++", "bytes": "1386884" }, { "name": "CMake", "bytes": "14031" }, { "name": "Dockerfile", "bytes": "1426" }, { "name": "Python", "bytes": "2922150" }, { "name": "Shell", "bytes": "2609" } ], "symlink_target": "" }
// // ProgramGeneratorResult.cs // // Author: // Roman Lacko ([email protected]) // // Copyright (c) 2010 - 2014 Roman Lacko // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to // permit persons to whom the Software is furnished to do so, subject to // the following conditions: // // The above copyright notice and this permission notice shall be // included in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // using System.Collections.Generic; namespace SharpTAL.TemplateProgram { public class ProgramGeneratorResult { /// <summary> /// Main template program compiled from TemplateBody. /// </summary> public Program MainProgram; /// <summary> /// Dictionary of TemplatePrograms compiled from templates imported by "metal:import" command. /// The key contains the full path to the template file. /// The value contains the compiled program. /// </summary> public Dictionary<string, Program> ImportedPrograms; /// <summary> /// Dictionary of paths to imported programs hashed by namespace created by "metal:import" command. /// The key contains the imported program namespace. /// The value contains the list of full paths to template files. /// </summary> public Dictionary<string, HashSet<string>> ImportedNamespaces; } }
{ "content_hash": "fa0d3c7280b2a2fa0924fffea306ee4f", "timestamp": "", "source": "github", "line_count": 54, "max_line_length": 101, "avg_line_length": 38.27777777777778, "alnum_prop": 0.7435897435897436, "repo_name": "lck/SharpTAL", "id": "c6c7e88149b26f1f9be487a39c0a0c8621ea2967", "size": "2069", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "SharpTAL/TemplateProgram/ProgramGeneratorResult.cs", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "484" }, { "name": "C#", "bytes": "349149" }, { "name": "HTML", "bytes": "6109" }, { "name": "PowerShell", "bytes": "6478" } ], "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="@drawable/background" android:orientation="vertical" > <com.huassit.imenu.android.view.NavigationView android:id="@+id/navigationView" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentTop="true" /> <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_above="@+id/cartLayout" android:layout_below="@id/navigationView" android:orientation="horizontal" > <LinearLayout android:layout_width="0dp" android:layout_height="fill_parent" android:layout_weight="2" android:background="@android:color/transparent" android:orientation="vertical" > <RelativeLayout android:id="@+id/all" android:layout_width="fill_parent" android:layout_height="50dp" android:paddingLeft="15dp" > <TextView android:id="@+id/tv_all" android:layout_width="fill_parent" android:layout_height="50dp" android:gravity="center_vertical" android:text="全部" android:textColor="#FFFFFF" /> <ImageView android:id="@+id/choosen" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_centerVertical="true" android:layout_marginRight="10dp" android:src="@drawable/more" /> </RelativeLayout> <TextView android:id="@+id/driver1" android:layout_width="fill_parent" android:layout_height="0.5dp" android:background="#b3b3b3" /> <ListView android:id="@+id/categoryList" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@android:color/transparent" > </ListView> </LinearLayout> <RelativeLayout android:layout_width="0dp" android:layout_height="fill_parent" android:layout_weight="3" > <TextView android:id="@+id/driver" android:layout_width="0.5dp" android:layout_height="fill_parent" android:background="#b3b3b3" /> <ListView android:id="@+id/menuList" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="5dp" android:layout_toRightOf="@id/driver" > </ListView> </RelativeLayout> </LinearLayout> <LinearLayout android:id="@+id/cartLayout" android:layout_width="fill_parent" android:layout_height="50dp" android:layout_alignParentBottom="true" android:background="@color/white" android:visibility="gone" > <RelativeLayout android:layout_width="0dp" android:layout_height="fill_parent" android:layout_weight="1" > <TextView android:id="@+id/orderCount" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_marginLeft="20dp" android:gravity="center" android:text="1" android:textColor="@color/orange" /> <TextView android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_toRightOf="@+id/orderCount" android:gravity="center_vertical" android:text="单品" android:textColor="@color/orange" /> </RelativeLayout> <RelativeLayout android:layout_width="0dp" android:layout_height="fill_parent" android:layout_weight="1" > <TextView android:id="@+id/hj" android:layout_width="wrap_content" android:layout_height="fill_parent" android:gravity="center_vertical" android:text="合计:¥" android:textColor="@color/orange" /> <TextView android:id="@+id/totalPrice" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_centerVertical="true" android:layout_toRightOf="@+id/hj" android:gravity="center_vertical" android:text="12" android:textColor="@color/orange" /> </RelativeLayout> <TextView android:id="@+id/gotoCart" android:layout_width="0dp" android:layout_height="fill_parent" android:layout_weight="1" android:background="@color/blue" android:drawableRight="@drawable/next" android:gravity="center" android:paddingRight="10dp" android:text="购物车" android:textColor="@color/white" /> </LinearLayout> </RelativeLayout>
{ "content_hash": "97599530c38a0872e820cd266f2c1fd1", "timestamp": "", "source": "github", "line_count": 155, "max_line_length": 74, "avg_line_length": 37.47096774193548, "alnum_prop": 0.5258264462809917, "repo_name": "kevin-duan/Imenu", "id": "392d74d3e3767f520e703c185caff8dec89c45fa", "size": "5830", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "iMenu/res/layout/menu_choose_list.xml", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "1486454" } ], "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("ForeGroundStealBlocker")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("ForeGroundStealBlocker")] [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("e769826a-e6af-4353-95a5-7632e1f4338f")] // 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": "3ef488f5fcfd4ede9619e651d67e9c8a", "timestamp": "", "source": "github", "line_count": 36, "max_line_length": 84, "avg_line_length": 40.361111111111114, "alnum_prop": 0.7302133516861665, "repo_name": "waldfee/ForeGroundStealBlocker", "id": "c2ea804138917004ee2093174995147603992d72", "size": "1456", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "ForeGroundStealBlocker/Properties/AssemblyInfo.cs", "mode": "33188", "license": "mit", "language": [ { "name": "C#", "bytes": "17057" } ], "symlink_target": "" }
<!-- Copyright 2013 The Android Open Source Project 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. --> <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" tools:context=".Mainactivity"> <!--<item android:id="@+id/menu_toggle_log"--> <!--android:showAsAction="always"--> <!--android:title="@string/sample_show_log" />--> </menu>
{ "content_hash": "3a826333160295b5897c98cd1947fafe", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 74, "avg_line_length": 39.12, "alnum_prop": 0.7085889570552147, "repo_name": "norihirosunada/bluetoothchat-multi", "id": "415fdcc0feccd7483d09991d4c5b2c19756dc6e9", "size": "978", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Application/src/main/res/menu/main.xml", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "104731" } ], "symlink_target": "" }
var express = require('express'); var http = require('http'); // Set your secret key: remember to change this to your live secret key in production // See your keys here https://dashboard.stripe.com/account/apikeys var stripe = require("stripe")("sk_live_lololololol"); var app = express(); app.use(require('body-parser').urlencoded()); app.get('/pay_:price', (req, res, next) => res.status(200).send(`<!DOCTYPE html> <html> <body> <form class="pay-form" action="/charge" method="POST"> <script src="https://checkout.stripe.com/checkout.js" class="stripe-button" data-key="pk_live_hahahahahhah" data-amount="${req.params.price}" data-locale="auto"> </script> <input name="amount" type="hidden" value="${req.params.price}"> </form> </body> </html>`)); function msgPage(msg) { return `<!DOCTYPE html><html><body>${msg}</body></html>`; } app.post('/charge', (req, res, next) => { // Get the token resulting from the form submit var stripeToken = req.body.stripeToken; console.log('calling stripe...', req.body); var charge = stripe.charges.create({ amount: req.body.amount, // amount in cents, again currency: "usd", source: stripeToken, description: "That store your mother warned you about" }, function(err, charge) { if (err) { // The card has been declined or something else happened console.log('processing error:', err); res.status(400).send(msgPage('Sorry, your payment could not be processed.')); } else { res.status(200).send(msgPage('Your payment has been processed. Thank you!')); } }); }); http.createServer(app).listen(3003, '127.0.0.1');
{ "content_hash": "dc172779d274117fb02f1a462b9279de", "timestamp": "", "source": "github", "line_count": 54, "max_line_length": 85, "avg_line_length": 31.38888888888889, "alnum_prop": 0.6424778761061947, "repo_name": "lharding/striped", "id": "d70873393de4025d3300cadfb8ae62815557b64b", "size": "1695", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "striped.js", "mode": "33188", "license": "mit", "language": [ { "name": "JavaScript", "bytes": "1695" } ], "symlink_target": "" }
{% extends "base.html" %} {% load i18n %} {% block meta_title %}{% trans "Home" %}{% endblock %} {% block title %}{% trans "Home" %}{% endblock %} {% block breadcrumb_menu %} <li class="active">{% trans "HOME" %}</li> {% endblock %} {% block main %} {% blocktrans %} <h2>Hackers in Residence Program!</h2> <p> Imagine a constant stream of diverse hackers from everywhere, traveling the world, gaining invaluable experience, sharing what they know and love, helping others everywhere they go. <p> Imagine diverse Organizations all over the world offering Residency opportunities for hackers, where communities will greatly benefit from the wealth of knowledge and skills, enthusiasm and creativity hackers have to offer. <p> This International Hackers in Residence site links cool people with cool organizations! <p> Schools, universities, hackerspaces, libraries, arts communities, and other Organizations around the world, can create a free web page to describe their Hackers In Residence Program which will attract potential Residents. <p> Anyone can browse Residency opportunities, and apply to Organizations where they would like to share of themselves, learn from others while there, and bring what they learn back home, and spread the joy. <p> Everybody wins! <p> This site is totally free for everyone to use. <p> If you would like to be a Resident it is free to browse the list of Organizations to find Residency Opportunities to apply for. <p> If you are an Organization it is free to register, enter info about your Organization, what you offer Residents, and what you require from Residents. <!-- <hr> Mezzanine tools - this section will be removed <ul> <li><a href="/admin/">Log in to the admin interface</a></li> <li><a href="http://mezzanine.jupo.org/docs/content-architecture.html">Creating custom page types</a></li> <li><a href="http://mezzanine.jupo.org/docs/frequently-asked-questions.html#templates">Modifying HTML templates</a></li> <li><a href="http://mezzanine.jupo.org/docs/frequently-asked-questions.html#why-isn-t-the-homepage-a-page-object-i-can-edit-via-the-admin">Changing this homepage</a></li> <li><a href="http://mezzanine.jupo.org/docs/frequently-asked-questions.html">Other frequently asked questions</a></li> <li><a href="http://mezzanine.jupo.org/docs/configuration.html#default-settings">Full list of settings</a></li> <li><a href="http://mezzanine.jupo.org/docs/deployment.html">Deploying to a production server</a></li> </ul> --> {% endblocktrans %} {% endblock %}
{ "content_hash": "8c6439839b972d3accd9ef17eb673068", "timestamp": "", "source": "github", "line_count": 57, "max_line_length": 223, "avg_line_length": 44.68421052631579, "alnum_prop": 0.7412642324303101, "repo_name": "gerghas/hir", "id": "de1525df64e1613f3b187375f4565deee94af4d1", "size": "2547", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "templates/index.html", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "169731" }, { "name": "HTML", "bytes": "33281" }, { "name": "JavaScript", "bytes": "272316" }, { "name": "Nginx", "bytes": "1230" }, { "name": "Python", "bytes": "81309" } ], "symlink_target": "" }
<link rel="import" href="../../components/polymer/polymer.html"> <polymer-element name="async-import" attributes="href wait"> <script> Polymer('async-import', { wait: 0, href: '', hrefChanged: function() { if (this.wait) { setTimeout(this.import.bind(this), this.wait); } else { this.import(); } }, import: function() { Polymer.import([ this.href ]); } }); </script> </polymer-element>
{ "content_hash": "a682cba3f8078edc618d948fec467bdb", "timestamp": "", "source": "github", "line_count": 20, "max_line_length": 64, "avg_line_length": 24.35, "alnum_prop": 0.5318275154004107, "repo_name": "PolymerLabs/labs", "id": "1988d468db9a964b7b60598e64d20785958b9c6d", "size": "487", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "sjmiles/demos/segmented-app/elements/async-import.html", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "ApacheConf", "bytes": "2979" }, { "name": "CSS", "bytes": "298886" }, { "name": "HTML", "bytes": "9672921" }, { "name": "JavaScript", "bytes": "2370396" }, { "name": "PHP", "bytes": "2151" }, { "name": "Python", "bytes": "7016" }, { "name": "Shell", "bytes": "19655" } ], "symlink_target": "" }
import React, { Component } from 'react'; import PlayerDetails from '../components/player-details'; import Error from '../components/error'; import { fetchResource } from '../util/util'; class PlayerDetailsContainer extends Component { constructor() { super(); this.state = { matches: [], player: null, loading: true }; } componentDidMount() { this.fetchData(this.props.params.playerId); } componentWillReceiveProps(nextProps) { this.fetchData(nextProps.params.playerId); } fetchData(playerId) { fetchResource(`/api/player/${playerId}`) .then(player => { this.setState({player}); return fetchResource(`/api/matches/${playerId}`); }) .then(matches => { this.fixMatchPlayerOrder(matches); this.setState({matches}); this.setState({loading: false}); }) .catch(error => { this.setState({error}); }); } // Arrange the match data so that this player is player1 in every match. // That way the matches table is easier to read. fixMatchPlayerOrder(matches) { matches.forEach(match => { if (match.player1.nick !== this.state.player.nick) [match.player1, match.player2] = [match.player2, match.player1]; }); } render() { if (this.state.error) return(<Error message={this.state.error} />); if (this.state.loading === true) return (<div>Loading...</div>); else { return( <PlayerDetails player={this.state.player} matches={this.state.matches} /> ); } } } export default PlayerDetailsContainer;
{ "content_hash": "9d3e3cb3b2e4b2a526a637aac6e655d8", "timestamp": "", "source": "github", "line_count": 65, "max_line_length": 80, "avg_line_length": 28.861538461538462, "alnum_prop": 0.5314498933901919, "repo_name": "orouvinen/dnf-ranks-frontend", "id": "5c09cc3767773255be26242a03b48c85810ad72b", "size": "1877", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/containers/player-details-container.js", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "1847" }, { "name": "HTML", "bytes": "1194" }, { "name": "JavaScript", "bytes": "23011" } ], "symlink_target": "" }
/* * Created on Mar 22, 2004 */ package edu.uci.ics.jung.graph.predicates; import java.util.Iterator; import java.util.Set; import edu.uci.ics.jung.graph.ArchetypeGraph; import edu.uci.ics.jung.graph.Vertex; /** * Returns true if this graph is a clique (that is, if * each vertex in the graph is a neighbor of each other * vertex; also known as a <i>complete graph</i>). * * @author danyelf */ public class CliqueGraphPredicate extends GraphPredicate { private static final String message = "CliqueGraphPredicate"; private static CliqueGraphPredicate instance; protected CliqueGraphPredicate() { super(); } public static CliqueGraphPredicate getInstance() { if (instance == null) instance = new CliqueGraphPredicate(); return instance; } /** * @see edu.uci.ics.jung.graph.predicates.GraphPredicate#evaluateGraph(edu.uci.ics.jung.graph.ArchetypeGraph) */ public boolean evaluateGraph(ArchetypeGraph g) { for (Iterator iter = g.getVertices().iterator(); iter.hasNext();) { Vertex v = (Vertex) iter.next(); int wanted = g.numVertices() - 1; Set s = v.getNeighbors(); if( s.contains( v )) wanted += 1; if (s.size() != wanted) return false; } return true; } public String toString() { return message; } }
{ "content_hash": "18c0c0c8a58aa0e0d2ccfb9ecca4dabd", "timestamp": "", "source": "github", "line_count": 59, "max_line_length": 113, "avg_line_length": 25.1864406779661, "alnum_prop": 0.5989232839838493, "repo_name": "markus1978/clickwatch", "id": "a6a93999afea7d5e3e3328767873e26e46e9d2de", "size": "1759", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "external/edu.uci.ics.jung/src/edu/uci/ics/jung/graph/predicates/CliqueGraphPredicate.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "10246972" }, { "name": "Matlab", "bytes": "7054" }, { "name": "Shell", "bytes": "256" }, { "name": "XML", "bytes": "14136" } ], "symlink_target": "" }
package com.amazonaws.services.robomaker.model.transform; import javax.annotation.Generated; import com.amazonaws.SdkClientException; import com.amazonaws.services.robomaker.model.*; import com.amazonaws.protocol.*; import com.amazonaws.annotation.SdkInternalApi; /** * DeploymentConfigMarshaller */ @Generated("com.amazonaws:aws-java-sdk-code-generator") @SdkInternalApi public class DeploymentConfigMarshaller { private static final MarshallingInfo<Integer> CONCURRENTDEPLOYMENTPERCENTAGE_BINDING = MarshallingInfo.builder(MarshallingType.INTEGER) .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("concurrentDeploymentPercentage").build(); private static final MarshallingInfo<Integer> FAILURETHRESHOLDPERCENTAGE_BINDING = MarshallingInfo.builder(MarshallingType.INTEGER) .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("failureThresholdPercentage").build(); private static final MarshallingInfo<Long> ROBOTDEPLOYMENTTIMEOUTINSECONDS_BINDING = MarshallingInfo.builder(MarshallingType.LONG) .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("robotDeploymentTimeoutInSeconds").build(); private static final MarshallingInfo<StructuredPojo> DOWNLOADCONDITIONFILE_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED) .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("downloadConditionFile").build(); private static final DeploymentConfigMarshaller instance = new DeploymentConfigMarshaller(); public static DeploymentConfigMarshaller getInstance() { return instance; } /** * Marshall the given parameter object. */ public void marshall(DeploymentConfig deploymentConfig, ProtocolMarshaller protocolMarshaller) { if (deploymentConfig == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(deploymentConfig.getConcurrentDeploymentPercentage(), CONCURRENTDEPLOYMENTPERCENTAGE_BINDING); protocolMarshaller.marshall(deploymentConfig.getFailureThresholdPercentage(), FAILURETHRESHOLDPERCENTAGE_BINDING); protocolMarshaller.marshall(deploymentConfig.getRobotDeploymentTimeoutInSeconds(), ROBOTDEPLOYMENTTIMEOUTINSECONDS_BINDING); protocolMarshaller.marshall(deploymentConfig.getDownloadConditionFile(), DOWNLOADCONDITIONFILE_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } } }
{ "content_hash": "cce8cfb45a58b7fa2b9ffe01e7f9e714", "timestamp": "", "source": "github", "line_count": 53, "max_line_length": 140, "avg_line_length": 49.35849056603774, "alnum_prop": 0.7775229357798165, "repo_name": "aws/aws-sdk-java", "id": "55b69c7bfeb3a7be7002d07c44fb98ab4a4dc68b", "size": "3196", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "aws-java-sdk-robomaker/src/main/java/com/amazonaws/services/robomaker/model/transform/DeploymentConfigMarshaller.java", "mode": "33188", "license": "apache-2.0", "language": [], "symlink_target": "" }
// BasicBlock.java, created Wed Feb 23 13:47:55 2005 by salcianu // Copyright (C) 2005 Alexandru Salcianu <[email protected]> // Licensed under the Modified BSD Licence; see COPYING for details. package jpaul.Graphs; import java.util.List; import java.util.LinkedList; /** * <code>BasicBlock</code> is a <i>straight-line</i> sequence of * vertices. Except (possibly) for the first vertex, every other * vertex has a single incoming arc, from the immediate predecessor in * the same basic block. Similarly, except (possibly) for the last * vertex, every other vertex has a single outgoing arc, to the * immediate successor in the same basic block. Moreover, the basic * block is maximal with respect to these properties: it cannot be * extended upward (e.g., because the first element has two incoming * arcs), not downward. * * @see BasicBlockDiGraph * * @author Alexandru Salcianu - [email protected] * @version $Id: BasicBlock.java,v 1.6 2005/12/08 06:27:04 salcianu Exp $ */ public interface BasicBlock<Vertex> { /** @return List of basic blocks predecessors. Caller should not mutate the returned list. Complexity: O(1). */ public List<BasicBlock<Vertex>> prev(); /** @return List of basic blocks successors. Caller should not mutate the returned list. Complexity: O(1). */ public List<BasicBlock<Vertex>> next(); /** @return List of vertices from <code>this</code> basic block. Caller should not mutate the returned list. Complexity: O(1). */ public LinkedList<Vertex> elems(); /** @return Integer identifier for <code>this</code> basic block. The identifiers of basic blocks from the same <code>BasicBlockDiGraph</code> should be distinct. Complexity: O(1). */ public int getId(); /** @return Enclosing {@link BasicBlockDiGraph}. Complexity: O(1). */ public DiGraph<BasicBlock<Vertex>> enclosingBBDiGraph(); }
{ "content_hash": "b04ada1dc27454ecb7931e9e8e0235d3", "timestamp": "", "source": "github", "line_count": 55, "max_line_length": 76, "avg_line_length": 34.92727272727273, "alnum_prop": 0.7121290994273816, "repo_name": "protegeproject/jpaul", "id": "c76c13f3243b6ef19cfd2af915a43ae7bbcdb119", "size": "1921", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "src/main/java/jpaul/Graphs/BasicBlock.java", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "HTML", "bytes": "14025" }, { "name": "Java", "bytes": "414220" } ], "symlink_target": "" }
import alpenglow as prs import alpenglow.Getter as rs from alpenglow.utils import AvailabilityFilter import pandas as pd class TestAvailabilityFilter: def test_init(self): df = pd.DataFrame({'time': [30, 20, 10], 'item': [3, 2, 1], 'duration': [10, 10, 10]}) a = AvailabilityFilter(df) #todo: needs experiment environment r = rs.RecDat() r.time = 21 #a.run(r) #no run function, updates itself automatically
{ "content_hash": "66355e29ff8a6281944e542edf301e3c", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 94, "avg_line_length": 34.84615384615385, "alnum_prop": 0.6622516556291391, "repo_name": "rpalovics/Alpenglow", "id": "1758eeda0b9e741da8564e5bb04e98d5305c6704", "size": "453", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "python/test_alpenglow/utils/test_AvailabilityFilter.py", "mode": "33261", "license": "apache-2.0", "language": [ { "name": "C++", "bytes": "693969" }, { "name": "Python", "bytes": "343804" }, { "name": "Shell", "bytes": "10978" } ], "symlink_target": "" }
<html> <head> <title>User agent detail - Mozilla/5.0 (Linux; U; Android 4.0.4; de-at; HTC_OneSV/1.17.169.7 Build/IMM76I) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/css/materialize.min.css"> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> </head> <body> <div class="container"> <div class="section"> <h1 class="header center orange-text">User agent detail</h1> <div class="row center"> <h5 class="header light"> Mozilla/5.0 (Linux; U; Android 4.0.4; de-at; HTC_OneSV/1.17.169.7 Build/IMM76I) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 </h5> </div> </div> <div class="section"> <table class="striped"><tr><th></th><th colspan="3">General</th><th colspan="5">Device</th><th colspan="3">Bot</th><th colspan="2"></th></tr><tr><th>Provider</th><th>Browser</th><th>Engine</th><th>OS</th><th>Brand</th><th>Model</th><th>Type</th><th>Is mobile</th><th>Is touch</th><th>Is bot</th><th>Name</th><th>Type</th><th>Parse time</th><th>Actions</th></tr><tr><th colspan="14" class="green lighten-3">Source result (test suite)</th></tr><tr><td>ua-parser/uap-core<br /><small>vendor/thadafinser/uap-core/tests/test_device.yaml</small></td><td> </td><td> </td><td> </td><td style="border-left: 1px solid #555">HTC</td><td>OneSV</td><td></td><td></td><td></td><td style="border-left: 1px solid #555"></td><td></td><td></td><td></td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-test">Detail</a> <!-- Modal Structure --> <div id="modal-test" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>Testsuite result detail</h4> <p><pre><code class="php">Array ( [user_agent_string] => Mozilla/5.0 (Linux; U; Android 4.0.4; de-at; HTC_OneSV/1.17.169.7 Build/IMM76I) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 [family] => HTC OneSV [brand] => HTC [model] => OneSV ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><th colspan="14" class="green lighten-3">Providers</th></tr><tr><td>BrowscapPhp<br /><small>6012</small></td><td>Android 4.0</td><td>WebKit </td><td>Android 4.0</td><td style="border-left: 1px solid #555">HTC</td><td>One</td><td>Mobile Phone</td><td>yes</td><td>yes</td><td style="border-left: 1px solid #555"></td><td></td><td></td><td>0.08403</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-215ac98d-ccf8-4615-916e-5a819d6a59c9">Detail</a> <!-- Modal Structure --> <div id="modal-215ac98d-ccf8-4615-916e-5a819d6a59c9" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>BrowscapPhp result detail</h4> <p><pre><code class="php">stdClass Object ( [browser_name_regex] => /^mozilla\/5\.0 \(.*linux.*android.4\.0.*htc_one.* build\/.*\) applewebkit\/.* \(khtml,.*like gecko.*\) version\/4\.0.*safari.*$/ [browser_name_pattern] => mozilla/5.0 (*linux*android?4.0*htc_one* build/*) applewebkit/* (khtml,*like gecko*) version/4.0*safari* [parent] => Android Browser 4.0 [comment] => Android Browser 4.0 [browser] => Android [browser_type] => Browser [browser_bits] => 32 [browser_maker] => Google Inc [browser_modus] => unknown [version] => 4.0 [majorver] => 4 [minorver] => 0 [platform] => Android [platform_version] => 4.0 [platform_description] => Android OS [platform_bits] => 32 [platform_maker] => Google Inc [alpha] => [beta] => [win16] => [win32] => [win64] => [frames] => 1 [iframes] => 1 [tables] => 1 [cookies] => 1 [backgroundsounds] => [javascript] => 1 [vbscript] => [javaapplets] => 1 [activexcontrols] => [ismobiledevice] => 1 [istablet] => [issyndicationreader] => [crawler] => [cssversion] => 3 [aolversion] => 0 [device_name] => One [device_maker] => HTC [device_type] => Mobile Phone [device_pointing_method] => touchscreen [device_code_name] => M7 [device_brand_name] => HTC [renderingengine_name] => WebKit [renderingengine_version] => unknown [renderingengine_description] => For Google Chrome, iOS (including both mobile Safari, WebViews within third-party apps, and web clips), Safari, Arora, Midori, OmniWeb, Shiira, iCab since version 4, Web, SRWare Iron, Rekonq, and in Maxthon 3. [renderingengine_maker] => Apple Inc ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>DonatjUAParser<br /><small>v0.5.0</small></td><td>Android Browser 4.0</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-f1436016-fdf1-4aea-b4be-1d7c99ab0661">Detail</a> <!-- Modal Structure --> <div id="modal-f1436016-fdf1-4aea-b4be-1d7c99ab0661" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>DonatjUAParser result detail</h4> <p><pre><code class="php">Array ( [platform] => Android [browser] => Android Browser [version] => 4.0 ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>NeutrinoApiCom<br /><small></small></td><td>Android Webkit 4.0</td><td><i class="material-icons">close</i></td><td>Android 4.0.4</td><td style="border-left: 1px solid #555">HTC</td><td>One SV</td><td>mobile-browser</td><td>yes</td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.26</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-9b0fa449-ec1b-40c8-8b1c-9486eb3b9cbc">Detail</a> <!-- Modal Structure --> <div id="modal-9b0fa449-ec1b-40c8-8b1c-9486eb3b9cbc" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>NeutrinoApiCom result detail</h4> <p><pre><code class="php">stdClass Object ( [mobile_screen_height] => 800 [is_mobile] => 1 [type] => mobile-browser [mobile_brand] => HTC [mobile_model] => One SV [version] => 4.0 [is_android] => 1 [browser_name] => Android Webkit [operating_system_family] => Android [operating_system_version] => 4.0.4 [is_ios] => [producer] => Google Inc. [operating_system] => Android 4.0.x Ice Cream Sandwich [mobile_screen_width] => 480 [mobile_browser] => Android Webkit ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>PiwikDeviceDetector<br /><small>3.5.2</small></td><td>Android Browser </td><td>WebKit </td><td>Android 4.0</td><td style="border-left: 1px solid #555">HTC</td><td>OneSV</td><td>smartphone</td><td>yes</td><td></td><td style="border-left: 1px solid #555"></td><td></td><td></td><td>0.005</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-21638055-738d-46ba-a1b1-f5114bc26475">Detail</a> <!-- Modal Structure --> <div id="modal-21638055-738d-46ba-a1b1-f5114bc26475" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>PiwikDeviceDetector result detail</h4> <p><pre><code class="php">Array ( [client] => Array ( [type] => browser [name] => Android Browser [short_name] => AN [version] => [engine] => WebKit ) [operatingSystem] => Array ( [name] => Android [short_name] => AND [version] => 4.0 [platform] => ) [device] => Array ( [brand] => HT [brandName] => HTC [model] => OneSV [device] => 1 [deviceName] => smartphone ) [bot] => [extra] => Array ( [isBot] => [isBrowser] => 1 [isFeedReader] => [isMobileApp] => [isPIM] => [isLibrary] => [isMediaPlayer] => [isCamera] => [isCarBrowser] => [isConsole] => [isFeaturePhone] => [isPhablet] => [isPortableMediaPlayer] => [isSmartDisplay] => [isSmartphone] => 1 [isTablet] => [isTV] => [isDesktop] => [isMobile] => 1 [isTouchEnabled] => ) ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>SinergiBrowserDetector<br /><small>6.0.0</small></td><td>Navigator 4.0</td><td><i class="material-icons">close</i></td><td>Android 4.0.4</td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td></td><td><i class="material-icons">close</i></td><td>yes</td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0.001</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-5415e7f2-ef7b-434c-abe0-b71ba9f6707c">Detail</a> <!-- Modal Structure --> <div id="modal-5415e7f2-ef7b-434c-abe0-b71ba9f6707c" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>SinergiBrowserDetector result detail</h4> <p><pre><code class="php">Array ( [browser] => Sinergi\BrowserDetector\Browser Object ( [userAgent:Sinergi\BrowserDetector\Browser:private] => Sinergi\BrowserDetector\UserAgent Object ( [userAgentString:Sinergi\BrowserDetector\UserAgent:private] => Mozilla/5.0 (Linux; U; Android 4.0.4; de-at; HTC_OneSV/1.17.169.7 Build/IMM76I) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 ) [name:Sinergi\BrowserDetector\Browser:private] => Navigator [version:Sinergi\BrowserDetector\Browser:private] => 4.0 [isRobot:Sinergi\BrowserDetector\Browser:private] => [isChromeFrame:Sinergi\BrowserDetector\Browser:private] => ) [operatingSystem] => Sinergi\BrowserDetector\Os Object ( [name:Sinergi\BrowserDetector\Os:private] => Android [version:Sinergi\BrowserDetector\Os:private] => 4.0.4 [isMobile:Sinergi\BrowserDetector\Os:private] => 1 [userAgent:Sinergi\BrowserDetector\Os:private] => Sinergi\BrowserDetector\UserAgent Object ( [userAgentString:Sinergi\BrowserDetector\UserAgent:private] => Mozilla/5.0 (Linux; U; Android 4.0.4; de-at; HTC_OneSV/1.17.169.7 Build/IMM76I) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 ) ) [device] => Sinergi\BrowserDetector\Device Object ( [name:Sinergi\BrowserDetector\Device:private] => unknown [userAgent:Sinergi\BrowserDetector\Device:private] => Sinergi\BrowserDetector\UserAgent Object ( [userAgentString:Sinergi\BrowserDetector\UserAgent:private] => Mozilla/5.0 (Linux; U; Android 4.0.4; de-at; HTC_OneSV/1.17.169.7 Build/IMM76I) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 ) ) ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>UAParser<br /><small>v3.4.5</small></td><td>Android 4.0.4</td><td><i class="material-icons">close</i></td><td>Android 4.0.4</td><td style="border-left: 1px solid #555">HTC</td><td>OneSV</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.002</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-346c1a98-5fd3-454f-b6c8-350f2f505d8b">Detail</a> <!-- Modal Structure --> <div id="modal-346c1a98-5fd3-454f-b6c8-350f2f505d8b" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>UAParser result detail</h4> <p><pre><code class="php">UAParser\Result\Client Object ( [ua] => UAParser\Result\UserAgent Object ( [major] => 4 [minor] => 0 [patch] => 4 [family] => Android ) [os] => UAParser\Result\OperatingSystem Object ( [major] => 4 [minor] => 0 [patch] => 4 [patchMinor] => [family] => Android ) [device] => UAParser\Result\Device Object ( [brand] => HTC [model] => OneSV [family] => HTC OneSV ) [originalUserAgent] => Mozilla/5.0 (Linux; U; Android 4.0.4; de-at; HTC_OneSV/1.17.169.7 Build/IMM76I) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>UserAgentStringCom<br /><small></small></td><td>Android Webkit Browser </td><td><i class="material-icons">close</i></td><td>Android 4.0.4</td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td></td><td>0.069</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-9cdd8b45-a2eb-406b-bd27-7e48af38ffd4">Detail</a> <!-- Modal Structure --> <div id="modal-9cdd8b45-a2eb-406b-bd27-7e48af38ffd4" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>UserAgentStringCom result detail</h4> <p><pre><code class="php">stdClass Object ( [agent_type] => Browser [agent_name] => Android Webkit Browser [agent_version] => -- [os_type] => Android [os_name] => Android [os_versionName] => [os_versionNumber] => 4.0.4 [os_producer] => [os_producerURL] => [linux_distibution] => Null [agent_language] => German - Austrian [agent_languageTag] => de-at ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>WhatIsMyBrowserCom<br /><small></small></td><td>Android Browser 4.0</td><td>WebKit 534.30</td><td>Android 4.0.4</td><td style="border-left: 1px solid #555"></td><td>HTC One</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0.404</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-9795f66f-7271-430e-973a-a5c0e14dc35a">Detail</a> <!-- Modal Structure --> <div id="modal-9795f66f-7271-430e-973a-a5c0e14dc35a" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>WhatIsMyBrowserCom result detail</h4> <p><pre><code class="php">stdClass Object ( [operating_system_name] => Android [simple_sub_description_string] => [simple_browser_string] => Android Browser 4 on Android (Ice Cream Sandwich) [browser_version] => 4 [extra_info] => Array ( ) [operating_platform] => HTC One [extra_info_table] => stdClass Object ( [System Build] => IMM76I ) [layout_engine_name] => WebKit [detected_addons] => Array ( ) [operating_system_flavour_code] => [hardware_architecture] => [operating_system_flavour] => [operating_system_frameworks] => Array ( ) [browser_name_code] => android-browser [operating_system_version] => Ice Cream Sandwich [simple_operating_platform_string] => HTC One [is_abusive] => [layout_engine_version] => 534.30 [browser_capabilities] => Array ( ) [operating_platform_vendor_name] => [operating_system] => Android (Ice Cream Sandwich) [operating_system_version_full] => 4.0.4 [operating_platform_code] => [browser_name] => Android Browser [operating_system_name_code] => android [user_agent] => Mozilla/5.0 (Linux; U; Android 4.0.4; de-at; HTC_OneSV/1.17.169.7 Build/IMM76I) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 [browser_version_full] => 4.0 [browser] => Android Browser 4 ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>WhichBrowser<br /><small>2.0.10</small></td><td>Android Browser </td><td>Webkit 534.30</td><td>Android 4.0.4</td><td style="border-left: 1px solid #555">HTC</td><td>One SV</td><td>mobile:smart</td><td>yes</td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.015</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-342c8d32-4765-40a8-8a5c-af3a38d19ae4">Detail</a> <!-- Modal Structure --> <div id="modal-342c8d32-4765-40a8-8a5c-af3a38d19ae4" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>WhichBrowser result detail</h4> <p><pre><code class="php">Array ( [browser] => Array ( [name] => Android Browser ) [engine] => Array ( [name] => Webkit [version] => 534.30 ) [os] => Array ( [name] => Android [version] => 4.0.4 ) [device] => Array ( [type] => mobile [subtype] => smart [manufacturer] => HTC [model] => One SV ) ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>Woothee<br /><small>v1.2.0</small></td><td>Safari 4.0</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>smartphone</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-3f285ff5-314b-4db4-9948-54572e92e7b6">Detail</a> <!-- Modal Structure --> <div id="modal-3f285ff5-314b-4db4-9948-54572e92e7b6" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>Woothee result detail</h4> <p><pre><code class="php">Array ( [name] => Safari [vendor] => Apple [version] => 4.0 [category] => smartphone [os] => Android [os_version] => 4.0.4 ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>Wurfl<br /><small>1.6.4</small></td><td>Android Webkit 4.0</td><td><i class="material-icons">close</i></td><td>Android 4.0</td><td style="border-left: 1px solid #555">HTC</td><td>One SV</td><td>Smartphone</td><td>yes</td><td>yes</td><td style="border-left: 1px solid #555"></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0.18106</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-1a1aee36-7ce7-4111-a391-8e2c501f1532">Detail</a> <!-- Modal Structure --> <div id="modal-1a1aee36-7ce7-4111-a391-8e2c501f1532" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>Wurfl result detail</h4> <p><pre><code class="php">Array ( [virtual] => Array ( [is_android] => true [is_ios] => false [is_windows_phone] => false [is_app] => false [is_full_desktop] => false [is_largescreen] => true [is_mobile] => true [is_robot] => false [is_smartphone] => true [is_touchscreen] => true [is_wml_preferred] => false [is_xhtmlmp_preferred] => false [is_html_preferred] => true [advertised_device_os] => Android [advertised_device_os_version] => 4.0 [advertised_browser] => Android Webkit [advertised_browser_version] => 4.0 [complete_device_name] => HTC One SV [form_factor] => Smartphone [is_phone] => true [is_app_webview] => false ) [all] => Array ( [brand_name] => HTC [model_name] => One SV [unique] => true [ununiqueness_handler] => [is_wireless_device] => true [device_claims_web_support] => true [has_qwerty_keyboard] => true [can_skip_aligned_link_row] => true [uaprof] => http://www.htcmms.com.tw/Android/Common/PL8011/ua-profile.xml [uaprof2] => [uaprof3] => [nokia_series] => 0 [nokia_edition] => 0 [device_os] => Android [mobile_browser] => Android Webkit [mobile_browser_version] => [device_os_version] => 4.0 [pointing_method] => touchscreen [release_date] => 2013_january [marketing_name] => [model_extra_info] => [nokia_feature_pack] => 0 [can_assign_phone_number] => true [is_tablet] => false [manufacturer_name] => [is_bot] => false [is_google_glass] => false [proportional_font] => false [built_in_back_button_support] => false [card_title_support] => true [softkey_support] => false [table_support] => true [numbered_menus] => false [menu_with_select_element_recommended] => false [menu_with_list_of_links_recommended] => true [icons_on_menu_items_support] => false [break_list_of_links_with_br_element_recommended] => true [access_key_support] => false [wrap_mode_support] => false [times_square_mode_support] => false [deck_prefetch_support] => false [elective_forms_recommended] => true [wizards_recommended] => false [image_as_link_support] => false [insert_br_element_after_widget_recommended] => false [wml_can_display_images_and_text_on_same_line] => false [wml_displays_image_in_center] => false [opwv_wml_extensions_support] => false [wml_make_phone_call_string] => wtai://wp/mc; [chtml_display_accesskey] => false [emoji] => false [chtml_can_display_images_and_text_on_same_line] => false [chtml_displays_image_in_center] => false [imode_region] => none [chtml_make_phone_call_string] => tel: [chtml_table_support] => false [xhtml_honors_bgcolor] => true [xhtml_supports_forms_in_table] => true [xhtml_support_wml2_namespace] => false [xhtml_autoexpand_select] => false [xhtml_select_as_dropdown] => false [xhtml_select_as_radiobutton] => false [xhtml_select_as_popup] => false [xhtml_display_accesskey] => false [xhtml_supports_invisible_text] => false [xhtml_supports_inline_input] => false [xhtml_supports_monospace_font] => false [xhtml_supports_table_for_layout] => true [xhtml_supports_css_cell_table_coloring] => true [xhtml_format_as_css_property] => false [xhtml_format_as_attribute] => false [xhtml_nowrap_mode] => false [xhtml_marquee_as_css_property] => false [xhtml_readable_background_color1] => #FFFFFF [xhtml_readable_background_color2] => #FFFFFF [xhtml_allows_disabled_form_elements] => true [xhtml_document_title_support] => true [xhtml_preferred_charset] => iso-8859-1 [opwv_xhtml_extensions_support] => false [xhtml_make_phone_call_string] => tel: [xhtmlmp_preferred_mime_type] => text/html [xhtml_table_support] => true [xhtml_send_sms_string] => sms: [xhtml_send_mms_string] => mms: [xhtml_file_upload] => supported [cookie_support] => true [accept_third_party_cookie] => true [xhtml_supports_iframe] => full [xhtml_avoid_accesskeys] => true [xhtml_can_embed_video] => none [ajax_support_javascript] => true [ajax_manipulate_css] => true [ajax_support_getelementbyid] => true [ajax_support_inner_html] => true [ajax_xhr_type] => standard [ajax_manipulate_dom] => true [ajax_support_events] => true [ajax_support_event_listener] => true [ajax_preferred_geoloc_api] => w3c_api [xhtml_support_level] => 4 [preferred_markup] => html_web_4_0 [wml_1_1] => true [wml_1_2] => false [wml_1_3] => false [html_wi_w3_xhtmlbasic] => true [html_wi_oma_xhtmlmp_1_0] => true [html_wi_imode_html_1] => false [html_wi_imode_html_2] => false [html_wi_imode_html_3] => false [html_wi_imode_html_4] => false [html_wi_imode_html_5] => false [html_wi_imode_htmlx_1] => false [html_wi_imode_htmlx_1_1] => false [html_wi_imode_compact_generic] => false [html_web_3_2] => true [html_web_4_0] => true [voicexml] => false [multipart_support] => false [total_cache_disable_support] => false [time_to_live_support] => false [resolution_width] => 480 [resolution_height] => 800 [columns] => 25 [max_image_width] => 320 [max_image_height] => 480 [rows] => 21 [physical_screen_width] => 57 [physical_screen_height] => 94 [dual_orientation] => true [density_class] => 1.0 [wbmp] => true [bmp] => true [epoc_bmp] => false [gif_animated] => false [jpg] => true [png] => true [tiff] => false [transparent_png_alpha] => true [transparent_png_index] => true [svgt_1_1] => true [svgt_1_1_plus] => false [greyscale] => false [gif] => true [colors] => 65536 [webp_lossy_support] => true [webp_lossless_support] => false [post_method_support] => true [basic_authentication_support] => true [empty_option_value_support] => true [emptyok] => false [nokia_voice_call] => false [wta_voice_call] => false [wta_phonebook] => false [wta_misc] => false [wta_pdc] => false [https_support] => true [phone_id_provided] => false [max_data_rate] => 3600 [wifi] => true [sdio] => false [vpn] => false [has_cellular_radio] => true [max_deck_size] => 2000000 [max_url_length_in_requests] => 256 [max_url_length_homepage] => 0 [max_url_length_bookmark] => 0 [max_url_length_cached_page] => 0 [max_no_of_connection_settings] => 0 [max_no_of_bookmarks] => 0 [max_length_of_username] => 0 [max_length_of_password] => 0 [max_object_size] => 0 [downloadfun_support] => false [directdownload_support] => true [inline_support] => false [oma_support] => true [ringtone] => false [ringtone_3gpp] => false [ringtone_midi_monophonic] => false [ringtone_midi_polyphonic] => false [ringtone_imelody] => false [ringtone_digiplug] => false [ringtone_compactmidi] => false [ringtone_mmf] => false [ringtone_rmf] => false [ringtone_xmf] => false [ringtone_amr] => false [ringtone_awb] => false [ringtone_aac] => false [ringtone_wav] => false [ringtone_mp3] => false [ringtone_spmidi] => false [ringtone_qcelp] => false [ringtone_voices] => 1 [ringtone_df_size_limit] => 0 [ringtone_directdownload_size_limit] => 0 [ringtone_inline_size_limit] => 0 [ringtone_oma_size_limit] => 0 [wallpaper] => false [wallpaper_max_width] => 0 [wallpaper_max_height] => 0 [wallpaper_preferred_width] => 0 [wallpaper_preferred_height] => 0 [wallpaper_resize] => none [wallpaper_wbmp] => false [wallpaper_bmp] => false [wallpaper_gif] => false [wallpaper_jpg] => false [wallpaper_png] => false [wallpaper_tiff] => false [wallpaper_greyscale] => false [wallpaper_colors] => 2 [wallpaper_df_size_limit] => 0 [wallpaper_directdownload_size_limit] => 0 [wallpaper_inline_size_limit] => 0 [wallpaper_oma_size_limit] => 0 [screensaver] => false [screensaver_max_width] => 0 [screensaver_max_height] => 0 [screensaver_preferred_width] => 0 [screensaver_preferred_height] => 0 [screensaver_resize] => none [screensaver_wbmp] => false [screensaver_bmp] => false [screensaver_gif] => false [screensaver_jpg] => false [screensaver_png] => false [screensaver_greyscale] => false [screensaver_colors] => 2 [screensaver_df_size_limit] => 0 [screensaver_directdownload_size_limit] => 0 [screensaver_inline_size_limit] => 0 [screensaver_oma_size_limit] => 0 [picture] => false [picture_max_width] => 0 [picture_max_height] => 0 [picture_preferred_width] => 0 [picture_preferred_height] => 0 [picture_resize] => none [picture_wbmp] => false [picture_bmp] => false [picture_gif] => false [picture_jpg] => false [picture_png] => false [picture_greyscale] => false [picture_colors] => 2 [picture_df_size_limit] => 0 [picture_directdownload_size_limit] => 0 [picture_inline_size_limit] => 0 [picture_oma_size_limit] => 0 [video] => false [oma_v_1_0_forwardlock] => false [oma_v_1_0_combined_delivery] => false [oma_v_1_0_separate_delivery] => false [streaming_video] => true [streaming_3gpp] => true [streaming_mp4] => true [streaming_mov] => false [streaming_video_size_limit] => 0 [streaming_real_media] => none [streaming_flv] => false [streaming_3g2] => false [streaming_vcodec_h263_0] => 45 [streaming_vcodec_h263_3] => -1 [streaming_vcodec_mpeg4_sp] => 0 [streaming_vcodec_mpeg4_asp] => -1 [streaming_vcodec_h264_bp] => 1 [streaming_acodec_amr] => nb [streaming_acodec_aac] => lc [streaming_wmv] => none [streaming_preferred_protocol] => rtsp [streaming_preferred_http_protocol] => apple_live_streaming [wap_push_support] => true [connectionless_service_indication] => false [connectionless_service_load] => false [connectionless_cache_operation] => false [connectionoriented_unconfirmed_service_indication] => false [connectionoriented_unconfirmed_service_load] => false [connectionoriented_unconfirmed_cache_operation] => false [connectionoriented_confirmed_service_indication] => false [connectionoriented_confirmed_service_load] => false [connectionoriented_confirmed_cache_operation] => false [utf8_support] => true [ascii_support] => false [iso8859_support] => false [expiration_date] => false [j2me_cldc_1_0] => false [j2me_cldc_1_1] => false [j2me_midp_1_0] => false [j2me_midp_2_0] => false [doja_1_0] => false [doja_1_5] => false [doja_2_0] => false [doja_2_1] => false [doja_2_2] => false [doja_3_0] => false [doja_3_5] => false [doja_4_0] => false [j2me_jtwi] => false [j2me_mmapi_1_0] => false [j2me_mmapi_1_1] => false [j2me_wmapi_1_0] => false [j2me_wmapi_1_1] => false [j2me_wmapi_2_0] => false [j2me_btapi] => false [j2me_3dapi] => false [j2me_locapi] => false [j2me_nokia_ui] => false [j2me_motorola_lwt] => false [j2me_siemens_color_game] => false [j2me_siemens_extension] => false [j2me_heap_size] => 0 [j2me_max_jar_size] => 0 [j2me_storage_size] => 0 [j2me_max_record_store_size] => 0 [j2me_screen_width] => 0 [j2me_screen_height] => 0 [j2me_canvas_width] => 0 [j2me_canvas_height] => 0 [j2me_bits_per_pixel] => 0 [j2me_audio_capture_enabled] => false [j2me_video_capture_enabled] => false [j2me_photo_capture_enabled] => false [j2me_capture_image_formats] => none [j2me_http] => false [j2me_https] => false [j2me_socket] => false [j2me_udp] => false [j2me_serial] => false [j2me_gif] => false [j2me_gif89a] => false [j2me_jpg] => false [j2me_png] => false [j2me_bmp] => false [j2me_bmp3] => false [j2me_wbmp] => false [j2me_midi] => false [j2me_wav] => false [j2me_amr] => false [j2me_mp3] => false [j2me_mp4] => false [j2me_imelody] => false [j2me_rmf] => false [j2me_au] => false [j2me_aac] => false [j2me_realaudio] => false [j2me_xmf] => false [j2me_wma] => false [j2me_3gpp] => false [j2me_h263] => false [j2me_svgt] => false [j2me_mpeg4] => false [j2me_realvideo] => false [j2me_real8] => false [j2me_realmedia] => false [j2me_left_softkey_code] => 0 [j2me_right_softkey_code] => 0 [j2me_middle_softkey_code] => 0 [j2me_select_key_code] => 0 [j2me_return_key_code] => 0 [j2me_clear_key_code] => 0 [j2me_datefield_no_accepts_null_date] => false [j2me_datefield_broken] => false [receiver] => true [sender] => true [mms_max_size] => 307200 [mms_max_height] => 1840 [mms_max_width] => 3264 [built_in_recorder] => false [built_in_camera] => true [mms_jpeg_baseline] => true [mms_jpeg_progressive] => false [mms_gif_static] => true [mms_gif_animated] => true [mms_png] => true [mms_bmp] => true [mms_wbmp] => true [mms_amr] => true [mms_wav] => true [mms_midi_monophonic] => true [mms_midi_polyphonic] => false [mms_midi_polyphonic_voices] => 0 [mms_spmidi] => false [mms_mmf] => false [mms_mp3] => true [mms_evrc] => false [mms_qcelp] => false [mms_ota_bitmap] => false [mms_nokia_wallpaper] => false [mms_nokia_operatorlogo] => false [mms_nokia_3dscreensaver] => false [mms_nokia_ringingtone] => false [mms_rmf] => false [mms_xmf] => false [mms_symbian_install] => false [mms_jar] => false [mms_jad] => false [mms_vcard] => true [mms_vcalendar] => true [mms_wml] => false [mms_wbxml] => false [mms_wmlc] => false [mms_video] => true [mms_mp4] => true [mms_3gpp] => true [mms_3gpp2] => true [mms_max_frame_rate] => 0 [nokiaring] => false [picturemessage] => false [operatorlogo] => false [largeoperatorlogo] => false [callericon] => false [nokiavcard] => false [nokiavcal] => false [sckl_ringtone] => false [sckl_operatorlogo] => false [sckl_groupgraphic] => false [sckl_vcard] => false [sckl_vcalendar] => false [text_imelody] => false [ems] => false [ems_variablesizedpictures] => false [ems_imelody] => false [ems_odi] => false [ems_upi] => false [ems_version] => 0 [siemens_ota] => false [siemens_logo_width] => 101 [siemens_logo_height] => 29 [siemens_screensaver_width] => 101 [siemens_screensaver_height] => 50 [gprtf] => false [sagem_v1] => false [sagem_v2] => false [panasonic] => false [sms_enabled] => true [wav] => true [mmf] => false [smf] => false [mld] => false [midi_monophonic] => true [midi_polyphonic] => false [sp_midi] => false [rmf] => false [xmf] => false [compactmidi] => false [digiplug] => false [nokia_ringtone] => false [imelody] => true [au] => false [amr] => true [awb] => false [aac] => true [mp3] => true [voices] => 1 [qcelp] => false [evrc] => false [flash_lite_version] => [fl_wallpaper] => false [fl_screensaver] => false [fl_standalone] => false [fl_browser] => false [fl_sub_lcd] => false [full_flash_support] => true [css_supports_width_as_percentage] => true [css_border_image] => webkit [css_rounded_corners] => webkit [css_gradient] => none [css_spriting] => true [css_gradient_linear] => none [is_transcoder] => false [transcoder_ua_header] => user-agent [rss_support] => false [pdf_support] => true [progressive_download] => true [playback_vcodec_h263_0] => 10 [playback_vcodec_h263_3] => -1 [playback_vcodec_mpeg4_sp] => 0 [playback_vcodec_mpeg4_asp] => -1 [playback_vcodec_h264_bp] => 3.0 [playback_real_media] => none [playback_3gpp] => true [playback_3g2] => false [playback_mp4] => true [playback_mov] => false [playback_acodec_amr] => nb [playback_acodec_aac] => none [playback_df_size_limit] => 0 [playback_directdownload_size_limit] => 0 [playback_inline_size_limit] => 0 [playback_oma_size_limit] => 0 [playback_acodec_qcelp] => false [playback_wmv] => none [hinted_progressive_download] => true [html_preferred_dtd] => html4 [viewport_supported] => true [viewport_width] => device_width_token [viewport_userscalable] => no [viewport_initial_scale] => [viewport_maximum_scale] => [viewport_minimum_scale] => [mobileoptimized] => false [handheldfriendly] => false [canvas_support] => full [image_inlining] => true [is_smarttv] => false [is_console] => false [nfc_support] => true [ux_full_desktop] => false [jqm_grade] => A [is_sencha_touch_ok] => false [controlcap_is_smartphone] => default [controlcap_is_ios] => default [controlcap_is_android] => default [controlcap_is_robot] => default [controlcap_is_app] => default [controlcap_advertised_device_os] => default [controlcap_advertised_device_os_version] => default [controlcap_advertised_browser] => default [controlcap_advertised_browser_version] => default [controlcap_is_windows_phone] => default [controlcap_is_full_desktop] => default [controlcap_is_largescreen] => default [controlcap_is_mobile] => default [controlcap_is_touchscreen] => default [controlcap_is_wml_preferred] => default [controlcap_is_xhtmlmp_preferred] => default [controlcap_is_html_preferred] => default [controlcap_form_factor] => default [controlcap_complete_device_name] => default ) ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr></table> </div> <div class="section"> <h1 class="header center orange-text">About this comparison</h1> <div class="row center"> <h5 class="header light"> The primary goal of this project is simple<br /> I wanted to know which user agent parser is the most accurate in each part - device detection, bot detection and so on...<br /> <br /> The secondary goal is to provide a source for all user agent parsers to improve their detection based on this results.<br /> <br /> You can also improve this further, by suggesting ideas at <a href="https://github.com/ThaDafinser/UserAgentParserComparison">ThaDafinser/UserAgentParserComparison</a><br /> <br /> The comparison is based on the abstraction by <a href="https://github.com/ThaDafinser/UserAgentParser">ThaDafinser/UserAgentParser</a> </h5> </div> </div> <div class="card"> <div class="card-content"> Comparison created <i>2016-02-13 13:41:05</i> | by <a href="https://github.com/ThaDafinser">ThaDafinser</a> </div> </div> </div> <script src="https://code.jquery.com/jquery-2.1.4.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/js/materialize.min.js"></script> <script src="http://cdnjs.cloudflare.com/ajax/libs/list.js/1.1.1/list.min.js"></script> <script> $(document).ready(function(){ // the "href" attribute of .modal-trigger must specify the modal ID that wants to be triggered $('.modal-trigger').leanModal(); }); </script> </body> </html>
{ "content_hash": "fb59ffffc9fc93b6d9eb7eddd5dc8b0c", "timestamp": "", "source": "github", "line_count": 1122, "max_line_length": 743, "avg_line_length": 41.50356506238859, "alnum_prop": 0.5383211286962871, "repo_name": "ThaDafinser/UserAgentParserComparison", "id": "6da227c4337cc08e16b801485ee473f72f5f2b1f", "size": "46568", "binary": false, "copies": "1", "ref": "refs/heads/gh-pages", "path": "v4/user-agent-detail/e0/48/e048d4e1-7a71-4b7a-9b57-1dc0c6103424.html", "mode": "33188", "license": "mit", "language": [ { "name": "HTML", "bytes": "2060859160" } ], "symlink_target": "" }
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Bomberman.SettingsModel; namespace Bomberman.StateImplementation { public interface ILoadGameStorage { GameStorage Load(); } }
{ "content_hash": "3cb4a1600a30889ec3a04d23c64456be", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 39, "avg_line_length": 18.53846153846154, "alnum_prop": 0.7468879668049793, "repo_name": "mierzynskim/bomberman", "id": "e5c88a83b89d2232e6f747b491c3c57b61c0ee46", "size": "243", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Bomberman/StateImplementation/ILoadGameStorage.cs", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C#", "bytes": "257856" } ], "symlink_target": "" }
<?php /** * CEmailLogRoute sends selected log messages to email addresses. * * The target email addresses may be specified via {@link setEmails emails} property. * Optionally, you may set the email {@link setSubject subject}, the * {@link setSentFrom sentFrom} address and any additional {@link setHeaders headers}. * * @property array $emails List of destination email addresses. * @property string $subject Email subject. Defaults to CEmailLogRoute::DEFAULT_SUBJECT. * @property string $sentFrom Send from address of the email. * @property array $headers Additional headers to use when sending an email. * * @author Qiang Xue <[email protected]> * @version $Id: CEmailLogRoute.php 3426 2011-10-25 00:01:09Z alexander.makarow $ * @package system.logging * @since 1.0 */ class CEmailLogRoute extends CLogRoute { /** * @var array list of destination email addresses. */ private $_email=array(); /** * @var string email subject */ private $_subject; /** * @var string email sent from address */ private $_from; /** * @var array list of additional headers to use when sending an email. */ private $_headers=array(); /** *the queueName of BCMS */ public $queueName=''; /** *initilize the queueName */ public function __construct($queueName='') { $this->queueName=$queueName; } /** * Sends log messages to specified email addresses. * @param array $logs list of log messages */ protected function processLogs($logs) { $message=''; foreach($logs as $log) $message.=$this->formatLogMessage($log[0],$log[1],$log[2],$log[3]); $message=wordwrap($message,70); $subject=$this->getSubject(); if($subject===null) $subject=Yii::t('yii','Application Log'); if(IS_BAE) { $this->sendEmail($this->getEmails(),$subject,$message); } else { foreach($this->getEmails() as $email) $this->sendEmail($email,$subject,$message); } } /** * Sends an email. * @param string $email single email address * @param string $subject email subject * @param string $message email content */ protected function sendEmail($email,$subject,$message) { if(IS_BAE) { require_once ( "Bcms.class.php" ) ; $bcms = new Bcms(); $ret = $bcms->mail ( $this->queueName, $message,json_encode($email)) ; if ( false === $ret ) { Yii::trace("send log to email is failed"); } else { Yii::trace("send log to email success"); } } else { $headers=$this->getHeaders(); if(($from=$this->getSentFrom())!==null) $headers[]="From: {$from}"; mail($email,$subject,$message,implode("\r\n",$headers)); } } /** * @return array list of destination email addresses */ public function getEmails() { return $this->_email; } /** * @param mixed $value list of destination email addresses. If the value is * a string, it is assumed to be comma-separated email addresses. */ public function setEmails($value) { if(IS_BAE) { if(is_array($value)) $this->_email=$value; else $this->_email=preg_split('/[\s,]+/',$value,-1,PREG_SPLIT_NO_EMPTY); } else { if(is_array($value)) $this->_email=$value; else $this->_email=preg_split('/[\s,]+/',$value,-1,PREG_SPLIT_NO_EMPTY); } } /** * @return string email subject. Defaults to CEmailLogRoute::DEFAULT_SUBJECT */ public function getSubject() { return $this->_subject; } /** * @param string $value email subject. */ public function setSubject($value) { $this->_subject=$value; } /** * @return string send from address of the email */ public function getSentFrom() { return $this->_from; } /** * @param string $value send from address of the email */ public function setSentFrom($value) { $this->_from=$value; } /** * @return array additional headers to use when sending an email. * @since 1.1.4 */ public function getHeaders() { return $this->_headers; } /** * @param mixed $value list of additional headers to use when sending an email. * If the value is a string, it is assumed to be line break separated headers. * @since 1.1.4 */ public function setHeaders($value) { if (is_array($value)) $this->_headers=$value; else $this->_headers=preg_split('/\r\n|\n/',$value,-1,PREG_SPLIT_NO_EMPTY); } }
{ "content_hash": "1c54f937e88680ae10f6f204d43a85a6", "timestamp": "", "source": "github", "line_count": 189, "max_line_length": 96, "avg_line_length": 23.915343915343914, "alnum_prop": 0.6108407079646018, "repo_name": "xuanfei/ljz", "id": "be779f13bb656faf5f5f1a1c1ac523053bf45631", "size": "4748", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "framework/logging/CEmailLogRoute.php", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "JavaScript", "bytes": "466629" }, { "name": "PHP", "bytes": "18099617" }, { "name": "Shell", "bytes": "6532" } ], "symlink_target": "" }
/* AUTO-GENERATED FILE. DO NOT MODIFY. * * This class was automatically generated by the * aapt tool from the resource data it found. It * should not be modified by hand. */ package com.procrastigain.mobile; public final class R { public static final class array { public static final int hours_spinner_ints=0x7f070000; public static final int minutes_spinner_ints=0x7f070001; } public static final class attr { } public static final class color { public static final int AliceBlue=0x7f04003d; public static final int AntiqueWhite=0x7f040033; public static final int Aqua=0x7f04008d; public static final int Aquamarine=0x7f040072; public static final int Azure=0x7f04003b; public static final int Beige=0x7f040038; public static final int Bisque=0x7f04001e; public static final int Black=0x7f04009c; public static final int BlanchedAlmond=0x7f04001c; public static final int Blue=0x7f040098; public static final int BlueViolet=0x7f04006b; public static final int Brown=0x7f04005f; public static final int BurlyWood=0x7f040045; public static final int CadetBlue=0x7f04007d; public static final int Chartreuse=0x7f040073; public static final int Chocolate=0x7f04004f; public static final int Coral=0x7f040028; public static final int CornflowerBlue=0x7f04007c; public static final int Cornsilk=0x7f040018; public static final int Crimson=0x7f040048; public static final int Cyan=0x7f04008e; public static final int DarkBlue=0x7f04009a; public static final int DarkCyan=0x7f040094; public static final int DarkGoldenrod=0x7f040057; public static final int DarkGray=0x7f04005e; public static final int DarkGreen=0x7f040097; public static final int DarkKhaki=0x7f040054; public static final int DarkMagenta=0x7f040069; public static final int DarkOliveGreen=0x7f04007e; public static final int DarkOrange=0x7f040027; public static final int DarkOrchid=0x7f040062; public static final int DarkRed=0x7f04006a; public static final int DarkSalmon=0x7f040042; public static final int DarkSeaGreen=0x7f040067; public static final int DarkSlateBlue=0x7f040081; public static final int DarkSlateGray=0x7f040087; public static final int DarkTurquoise=0x7f040092; public static final int DarkViolet=0x7f040064; public static final int DeepPink=0x7f04002c; public static final int DeepSkyBlue=0x7f040093; public static final int DimGray=0x7f04007a; public static final int DodgerBlue=0x7f04008b; public static final int FireBrick=0x7f040058; public static final int FloralWhite=0x7f040016; public static final int ForestGreen=0x7f040089; public static final int Fuchsia=0x7f04002d; public static final int Gainsboro=0x7f040047; public static final int GhostWhite=0x7f040035; public static final int Gold=0x7f040022; public static final int Goldenrod=0x7f04004a; public static final int Gray=0x7f04006e; public static final int Green=0x7f040096; public static final int GreenYellow=0x7f04005c; public static final int Honeydew=0x7f04003c; public static final int HotPink=0x7f040029; public static final int IndianRed=0x7f040051; public static final int Indigo=0x7f04007f; public static final int Ivory=0x7f040012; public static final int Khaki=0x7f04003e; public static final int Lavender=0x7f040043; public static final int LavenderBlush=0x7f04001a; public static final int LawnGreen=0x7f040074; public static final int LemonChiffon=0x7f040017; public static final int LightBlue=0x7f04005d; public static final int LightCoral=0x7f04003f; public static final int LightCyan=0x7f040044; public static final int LightGoldenrodYellow=0x7f040031; public static final int LightGreen=0x7f040066; public static final int LightGrey=0x7f04004d; public static final int LightPink=0x7f040024; public static final int LightSalmon=0x7f040026; public static final int LightSeaGreen=0x7f04008a; public static final int LightSkyBlue=0x7f04006c; public static final int LightSlateGray=0x7f040076; public static final int LightSteelBlue=0x7f04005a; public static final int LightYellow=0x7f040013; public static final int Lime=0x7f040090; public static final int LimeGreen=0x7f040086; public static final int Linen=0x7f040032; public static final int Magenta=0x7f04002e; public static final int Maroon=0x7f040071; public static final int MediumAquamarine=0x7f04007b; public static final int MediumBlue=0x7f040099; public static final int MediumOrchid=0x7f040056; public static final int MediumPurple=0x7f040065; public static final int MediumSeaGreen=0x7f040085; public static final int MediumSlateBlue=0x7f040075; public static final int MediumSpringGreen=0x7f040091; public static final int MediumTurquoise=0x7f040080; public static final int MediumVioletRed=0x7f040052; public static final int MidnightBlue=0x7f04008c; public static final int MintCream=0x7f040036; public static final int MistyRose=0x7f04001d; public static final int Moccasin=0x7f04001f; public static final int NavajoWhite=0x7f040020; public static final int Navy=0x7f04009b; public static final int OldLace=0x7f040030; public static final int Olive=0x7f04006f; public static final int OliveDrab=0x7f040078; public static final int Orange=0x7f040025; public static final int OrangeRed=0x7f04002b; public static final int Orchid=0x7f04004b; public static final int PaleGoldenrod=0x7f040040; public static final int PaleGreen=0x7f040063; public static final int PaleTurquoise=0x7f04005b; public static final int PaleVioletRed=0x7f040049; public static final int PapayaWhip=0x7f04001b; public static final int PeachPuff=0x7f040021; public static final int Peru=0x7f040050; public static final int Pink=0x7f040023; public static final int Plum=0x7f040046; public static final int PowderBlue=0x7f040059; public static final int Purple=0x7f040070; public static final int Red=0x7f04002f; public static final int RosyBrown=0x7f040055; public static final int RoyalBlue=0x7f040083; public static final int SaddleBrown=0x7f040068; public static final int Salmon=0x7f040034; public static final int SandyBrown=0x7f04003a; public static final int SeaGreen=0x7f040088; public static final int Seashell=0x7f040019; public static final int Sienna=0x7f040060; public static final int Silver=0x7f040053; public static final int SkyBlue=0x7f04006d; public static final int SlateBlue=0x7f040079; public static final int SlateGray=0x7f040077; public static final int Snow=0x7f040015; public static final int SpringGreen=0x7f04008f; public static final int SteelBlue=0x7f040082; public static final int Tan=0x7f04004e; public static final int Teal=0x7f040095; public static final int Thistle=0x7f04004c; public static final int Tomato=0x7f04002a; public static final int Turquoise=0x7f040084; public static final int Violet=0x7f040041; public static final int Wheat=0x7f040039; public static final int White=0x7f040011; public static final int WhiteSmoke=0x7f040037; public static final int Yellow=0x7f040014; public static final int YellowGreen=0x7f040061; public static final int aqua=0x7f04000a; public static final int black=0x7f040010; public static final int blue=0x7f04000e; public static final int fuchsia=0x7f040003; public static final int gray=0x7f040006; public static final int green=0x7f04000d; public static final int lime=0x7f04000b; public static final int maroon=0x7f040009; public static final int navy=0x7f04000f; public static final int olive=0x7f040007; public static final int p_blue=0x7f040000; public static final int purple=0x7f040008; public static final int red=0x7f040004; public static final int silver=0x7f040005; public static final int teal=0x7f04000c; public static final int white=0x7f040001; public static final int yellow=0x7f040002; } public static final class dimen { /** Default screen margins, per the Android Design guidelines. Customize dimensions originally defined in res/values/dimens.xml (such as screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here. */ public static final int activity_horizontal_margin=0x7f050000; public static final int activity_vertical_margin=0x7f050001; } public static final class drawable { public static final int btn_black=0x7f020000; public static final int btn_blue=0x7f020001; public static final int btn_green=0x7f020002; public static final int btn_red=0x7f020003; public static final int ic_action_new=0x7f020004; public static final int ic_launcher=0x7f020005; } public static final class id { public static final int action_forgot_password=0x7f0a001e; public static final int action_login=0x7f0a001f; public static final int action_logout=0x7f0a0020; public static final int action_new_task=0x7f0a0021; public static final int action_settings=0x7f0a001d; public static final int email=0x7f0a0004; public static final int id_appeal_layout=0x7f0a0014; public static final int id_my_tasks_list_view=0x7f0a000a; public static final int id_new_task_appeal_seekbar=0x7f0a0015; public static final int id_new_task_appeal_tag=0x7f0a0013; public static final int id_new_task_date=0x7f0a0017; public static final int id_new_task_date_tag=0x7f0a0016; public static final int id_new_task_hours_spinner=0x7f0a000f; public static final int id_new_task_hours_tag=0x7f0a0010; public static final int id_new_task_minutes_spinner=0x7f0a0011; public static final int id_new_task_minutes_tag=0x7f0a0012; public static final int id_new_task_parent_layout=0x7f0a000b; public static final int id_new_task_time_tag=0x7f0a000e; public static final int id_new_task_title=0x7f0a000d; public static final int id_new_task_title_tag=0x7f0a000c; public static final int id_task_date=0x7f0a001a; public static final int id_task_edit=0x7f0a001b; public static final int id_task_title=0x7f0a0019; public static final int id_task_work_button=0x7f0a001c; public static final int login=0x7f0a0006; public static final int login_form=0x7f0a0002; public static final int login_status=0x7f0a0000; public static final int login_status_message=0x7f0a0001; public static final int my_tasks_parent_layout=0x7f0a0009; public static final int new_task_button=0x7f0a0018; public static final int password=0x7f0a0005; public static final int register_button=0x7f0a0008; public static final int sign_in_button=0x7f0a0007; public static final int welcome_message_text=0x7f0a0003; } public static final class layout { public static final int activity_login=0x7f030000; public static final int activity_main=0x7f030001; public static final int activity_my_tasks=0x7f030002; public static final int activity_new_task=0x7f030003; public static final int task_template=0x7f030004; } public static final class menu { public static final int edit_task=0x7f090000; public static final int login=0x7f090001; public static final int menu_main=0x7f090002; public static final int my_tasks=0x7f090003; public static final int new_task=0x7f090004; } public static final class string { public static final int action_forgot_password=0x7f060027; public static final int action_new_task=0x7f060021; public static final int action_register=0x7f060025; public static final int action_settings=0x7f06000f; public static final int action_sign_in=0x7f060026; public static final int action_sign_in_short=0x7f060028; public static final int app_name=0x7f060001; public static final int button_my_tasks=0x7f06000c; public static final int button_new_task=0x7f06000d; public static final int button_new_task_submit=0x7f06001b; public static final int dlg_password_sent=0x7f06002f; public static final int dlg_title_password_sent=0x7f06002e; public static final int error_field_required=0x7f06002d; public static final int error_incorrect_password=0x7f06002c; public static final int error_invalid_email=0x7f06002a; public static final int error_invalid_password=0x7f06002b; public static final int header_rsvp_rsvp=0x7f060005; public static final int header_rsvp_user=0x7f060004; public static final int hello_world=0x7f060010; public static final int hint_new_task_title=0x7f060014; public static final int label_rsvp=0x7f060006; public static final int login_for_rsvp=0x7f06000a; public static final int login_progress_signing_in=0x7f060029; public static final int maps_api_key=0x7f060000; public static final int new_task_appeal=0x7f060018; public static final int new_task_date=0x7f06001c; public static final int new_task_hate=0x7f060019; public static final int new_task_hours=0x7f060016; public static final int new_task_love=0x7f06001a; public static final int new_task_minutes=0x7f060017; public static final int new_task_pick_date=0x7f06001d; public static final int new_task_time=0x7f060015; public static final int new_task_title=0x7f060013; /** Strings related to login */ public static final int prompt_email=0x7f060023; public static final int prompt_password=0x7f060024; public static final int rsvp_maybe=0x7f060008; public static final int rsvp_no=0x7f060009; public static final int rsvp_yes=0x7f060007; public static final int task_edit=0x7f06001e; public static final int task_name_placeholder=0x7f060020; public static final int task_work=0x7f06001f; public static final int title_activity_date_picker_fragment=0x7f060011; public static final int title_activity_edit_task=0x7f060022; public static final int title_activity_my_tasks=0x7f06000e; public static final int title_activity_new_task=0x7f060012; public static final int title_login=0x7f060003; public static final int title_party_detail=0x7f060002; public static final int welcome_message=0x7f06000b; } public static final class style { /** Base application theme, dependent on API level. This theme is replaced by AppBaseTheme from res/values-vXX/styles.xml on newer devices. Theme customizations available in newer API levels can go in res/values-vXX/styles.xml, while customizations related to backward-compatibility can go here. Base application theme for API 11+. This theme completely replaces AppBaseTheme from res/values/styles.xml on API 11+ devices. API 11 theme customizations can go here. Base application theme for API 14+. This theme completely replaces AppBaseTheme from BOTH res/values/styles.xml and res/values-v11/styles.xml on API 14+ devices. API 14 theme customizations can go here. */ public static final int AppBaseTheme=0x7f080000; /** Application theme. All customizations that are NOT specific to a particular API-level can go here. */ public static final int AppTheme=0x7f080001; public static final int ButtonText=0x7f080003; public static final int LoginFormContainer=0x7f080002; } }
{ "content_hash": "ab42665079e0215ad79f3a6571da2fb5", "timestamp": "", "source": "github", "line_count": 326, "max_line_length": 82, "avg_line_length": 51.395705521472394, "alnum_prop": 0.7122649955237242, "repo_name": "davidfreifeld/ProcrastigainDDPClient", "id": "dd98c9c3e955cef24e162b30b52f6342e9a9af7d", "size": "16755", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "gen/com/procrastigain/mobile/R.java", "mode": "33188", "license": "apache-2.0", "language": [], "symlink_target": "" }
using System; using System.Collections.Generic; using System.Reflection; using UnityEngine; namespace ModTools { public class Watches : GUIWindow { private Configuration config { get { return ModTools.Instance.config; } } private Vector2 watchesScroll = Vector2.zero; public Watches() : base("Watches", new Rect(504, 128, 800, 300), skin) { onDraw = DoWatchesWindow; } public void AddWatch(ReferenceChain refChain, FieldInfo field, object o) { fieldWatches.Add(refChain, new KeyValuePair<FieldInfo, object>(field, o)); visible = true; } public void AddWatch(ReferenceChain refChain, PropertyInfo property, object o) { propertyWatches.Add(refChain, new KeyValuePair<PropertyInfo, object>(property, o)); visible = true; } public void RemoveWatch(ReferenceChain refChain) { if (fieldWatches.ContainsKey(refChain)) { fieldWatches.Remove(refChain); } if (propertyWatches.ContainsKey(refChain)) { propertyWatches.Remove(refChain); } } public Type GetWatchType(ReferenceChain refChain) { Type ret = null; if (fieldWatches.ContainsKey(refChain)) { ret = fieldWatches[refChain].Key.FieldType; } if (propertyWatches.ContainsKey(refChain)) { ret = propertyWatches[refChain].Key.PropertyType; } return ret; } public object ReadWatch(ReferenceChain refChain) { object ret = null; if (fieldWatches.ContainsKey(refChain)) { try { ret = fieldWatches[refChain].Key.GetValue(fieldWatches[refChain].Value); } catch (Exception) { return null; } } if (propertyWatches.ContainsKey(refChain)) { try { ret = propertyWatches[refChain].Key.GetValue(propertyWatches[refChain].Value, null); } catch (Exception) { return null; } } return ret; } public bool IsConstWatch(ReferenceChain refChain) { if (fieldWatches.ContainsKey(refChain)) { return fieldWatches[refChain].Key.IsInitOnly; } if (propertyWatches.ContainsKey(refChain)) { return !propertyWatches[refChain].Key.CanWrite; } return true; } public void WriteWatch(ReferenceChain refChain, object value) { if (fieldWatches.ContainsKey(refChain)) { try { fieldWatches[refChain].Key.SetValue(fieldWatches[refChain].Value, value); } catch (Exception) { return; } } if (propertyWatches.ContainsKey(refChain)) { try { propertyWatches[refChain].Key.SetValue(propertyWatches[refChain].Value, value, null); } catch (Exception) { return; } } } public ReferenceChain[] GetWatches() { ReferenceChain[] watches = new ReferenceChain[fieldWatches.Count + propertyWatches.Count]; int i = 0; foreach (var item in fieldWatches) { watches[i++] = item.Key; } foreach (var item in propertyWatches) { watches[i++] = item.Key; } return watches; } private Dictionary<ReferenceChain, KeyValuePair<FieldInfo, object>> fieldWatches = new Dictionary<ReferenceChain, KeyValuePair<FieldInfo, object>>(); private Dictionary<ReferenceChain, KeyValuePair<PropertyInfo, object>> propertyWatches = new Dictionary<ReferenceChain, KeyValuePair<PropertyInfo, object>>(); void DoWatchesWindow() { watchesScroll = GUILayout.BeginScrollView(watchesScroll); foreach (var watch in GetWatches()) { GUILayout.BeginHorizontal(); var type = GetWatchType(watch); GUI.contentColor = config.typeColor; GUILayout.Label(type.ToString()); GUI.contentColor = config.nameColor; GUILayout.Label(watch.ToString()); GUI.contentColor = Color.white; GUILayout.Label(" = "); if (IsConstWatch(watch)) { GUI.enabled = false; } var value = ReadWatch(watch); GUI.contentColor = config.valueColor; if (value == null || !TypeUtil.IsBuiltInType(type)) { GUILayout.Label(value == null ? "null" : value.ToString()); } else { try { var newValue = GUIControls.EditorValueField(watch, "watch."+watch, type, value); if (newValue != value) { WriteWatch(watch, newValue); } } catch (Exception) { GUILayout.Label(value == null ? "null" : value.ToString()); } } GUI.contentColor = Color.white; GUI.enabled = true; GUILayout.FlexibleSpace(); if (GUILayout.Button("x", GUILayout.Width(24))) { RemoveWatch(watch); } GUILayout.EndHorizontal(); } GUILayout.EndScrollView(); } } }
{ "content_hash": "580d3ff81383e5830c40f5b8ffee8b9e", "timestamp": "", "source": "github", "line_count": 223, "max_line_length": 166, "avg_line_length": 28.48878923766816, "alnum_prop": 0.47206044388477886, "repo_name": "Rychard/Skylines-ModTools", "id": "056c43f8fd56f784de6bcef12b39b379a9373c2b", "size": "6355", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "Debugger/Watches.cs", "mode": "33188", "license": "mit", "language": [ { "name": "C#", "bytes": "360459" } ], "symlink_target": "" }
(function ($) { $.fn.quicksand = function (collection, customOptions) { var options = { duration: 750, easing: 'swing', attribute: 'data-id', // attribute to recognize same items within source and dest adjustHeight: 'auto', // 'dynamic' animates height during shuffling (slow), 'auto' adjusts it before or after the animation, false leaves height constant useScaling: true, // disable it if you're not using scaling effect or want to improve performance enhancement: function(c) {}, // Visual enhacement (eg. font replacement) function for cloned elements selector: '> *', dx: 0, dy: 0 }; $.extend(options, customOptions); if ($.browser.msie || (typeof($.fn.scale) == 'undefined')) { // Got IE and want scaling effect? Kiss my ass. options.useScaling = false; } var callbackFunction; if (typeof(arguments[1]) == 'function') { var callbackFunction = arguments[1]; } else if (typeof(arguments[2] == 'function')) { var callbackFunction = arguments[2]; } return this.each(function (i) { var val; var animationQueue = []; // used to store all the animation params before starting the animation; solves initial animation slowdowns var $collection = $(collection).clone(); // destination (target) collection var $sourceParent = $(this); // source, the visible container of source collection var sourceHeight = $(this).css('height'); // used to keep height and document flow during the animation var destHeight; var adjustHeightOnCallback = false; var offset = $($sourceParent).offset(); // offset of visible container, used in animation calculations var offsets = []; // coordinates of every source collection item var $source = $(this).find(options.selector); // source collection items // Replace the collection and quit if IE6 if ($.browser.msie && $.browser.version.substr(0,1)<7) { $sourceParent.html('').append($collection); return; } // Gets called when any animation is finished var postCallbackPerformed = 0; // prevents the function from being called more than one time var postCallback = function () { if (!postCallbackPerformed) { postCallbackPerformed = 1; // hack: // used to be: $sourceParent.html($dest.html()); // put target HTML into visible source container // but new webkit builds cause flickering when replacing the collections $toDelete = $sourceParent.find('> *'); $sourceParent.prepend($dest.find('> *')); $toDelete.remove(); if (adjustHeightOnCallback) { $sourceParent.css('height', destHeight); } options.enhancement($sourceParent); // Perform custom visual enhancements on a newly replaced collection if (typeof callbackFunction == 'function') { callbackFunction.call(this); } } }; // Position: relative situations var $correctionParent = $sourceParent.offsetParent(); var correctionOffset = $correctionParent.offset(); if ($correctionParent.css('position') == 'relative') { if ($correctionParent.get(0).nodeName.toLowerCase() == 'body') { } else { correctionOffset.top += (parseFloat($correctionParent.css('border-top-width')) || 0); correctionOffset.left +=( parseFloat($correctionParent.css('border-left-width')) || 0); } } else { correctionOffset.top -= (parseFloat($correctionParent.css('border-top-width')) || 0); correctionOffset.left -= (parseFloat($correctionParent.css('border-left-width')) || 0); correctionOffset.top -= (parseFloat($correctionParent.css('margin-top')) || 0); correctionOffset.left -= (parseFloat($correctionParent.css('margin-left')) || 0); } // perform custom corrections from options (use when Quicksand fails to detect proper correction) if (isNaN(correctionOffset.left)) { correctionOffset.left = 0; } if (isNaN(correctionOffset.top)) { correctionOffset.top = 0; } correctionOffset.left -= options.dx; correctionOffset.top -= options.dy; // keeps nodes after source container, holding their position $sourceParent.css('height', $(this).height()); // get positions of source collections $source.each(function (i) { offsets[i] = $(this).offset(); }); // stops previous animations on source container $(this).stop(); var dx = 0; var dy = 0; $source.each(function (i) { $(this).stop(); // stop animation of collection items var rawObj = $(this).get(0); if (rawObj.style.position == 'absolute') { dx = -options.dx; dy = -options.dy; } else { dx = options.dx; dy = options.dy; } rawObj.style.position = 'absolute'; rawObj.style.margin = '0'; rawObj.style.top = (offsets[i].top - parseFloat(rawObj.style.marginTop) - correctionOffset.top + dy) + 'px'; rawObj.style.left = (offsets[i].left - parseFloat(rawObj.style.marginLeft) - correctionOffset.left + dx) + 'px'; }); // create temporary container with destination collection var $dest = $($sourceParent).clone(); var rawDest = $dest.get(0); rawDest.innerHTML = ''; rawDest.setAttribute('id', ''); rawDest.style.height = 'auto'; rawDest.style.width = $sourceParent.width() + 'px'; $dest.append($collection); // insert node into HTML // Note that the node is under visible source container in the exactly same position // The browser render all the items without showing them (opacity: 0.0) // No offset calculations are needed, the browser just extracts position from underlayered destination items // and sets animation to destination positions. $dest.insertBefore($sourceParent); $dest.css('opacity', 0.0); rawDest.style.zIndex = -1; rawDest.style.margin = '0'; rawDest.style.position = 'absolute'; rawDest.style.top = offset.top - correctionOffset.top + 'px'; rawDest.style.left = offset.left - correctionOffset.left + 'px'; if (options.adjustHeight === 'dynamic') { // If destination container has different height than source container // the height can be animated, adjusting it to destination height $sourceParent.animate({height: $dest.height()}, options.duration, options.easing); } else if (options.adjustHeight === 'auto') { destHeight = $dest.height(); if (parseFloat(sourceHeight) < parseFloat(destHeight)) { // Adjust the height now so that the items don't move out of the container $sourceParent.css('height', destHeight); } else { // Adjust later, on callback adjustHeightOnCallback = true; } } // Now it's time to do shuffling animation // First of all, we need to identify same elements within source and destination collections $source.each(function (i) { var destElement = []; if (typeof(options.attribute) == 'function') { val = options.attribute($(this)); $collection.each(function() { if (options.attribute(this) == val) { destElement = $(this); return false; } }); } else { destElement = $collection.filter('[' + options.attribute + '=' + $(this).attr(options.attribute) + ']'); } if (destElement.length) { // The item is both in source and destination collections // It it's under different position, let's move it if (!options.useScaling) { animationQueue.push( { element: $(this), animation: {top: destElement.offset().top - correctionOffset.top, left: destElement.offset().left - correctionOffset.left, opacity: 1.0 } }); } else { animationQueue.push({ element: $(this), animation: {top: destElement.offset().top - correctionOffset.top, left: destElement.offset().left - correctionOffset.left, opacity: 1.0, scale: '1.0' } }); } } else { // The item from source collection is not present in destination collections // Let's remove it if (!options.useScaling) { animationQueue.push({element: $(this), animation: {opacity: '0.0'}}); } else { animationQueue.push({element: $(this), animation: {opacity: '0.0', scale: '0.0'}}); } } }); $collection.each(function (i) { // Grab all items from target collection not present in visible source collection var sourceElement = []; var destElement = []; if (typeof(options.attribute) == 'function') { val = options.attribute($(this)); $source.each(function() { if (options.attribute(this) == val) { sourceElement = $(this); return false; } }); $collection.each(function() { if (options.attribute(this) == val) { destElement = $(this); return false; } }); } else { sourceElement = $source.filter('[' + options.attribute + '=' + $(this).attr(options.attribute) + ']'); destElement = $collection.filter('[' + options.attribute + '=' + $(this).attr(options.attribute) + ']'); } var animationOptions; if (sourceElement.length === 0) { // No such element in source collection... if (!options.useScaling) { animationOptions = { opacity: '1.0' }; } else { animationOptions = { opacity: '1.0', scale: '1.0' }; } // Let's create it d = destElement.clone(); var rawDestElement = d.get(0); rawDestElement.style.position = 'absolute'; rawDestElement.style.margin = '0'; rawDestElement.style.top = destElement.offset().top - correctionOffset.top + 'px'; rawDestElement.style.left = destElement.offset().left - correctionOffset.left + 'px'; d.css('opacity', 0.0); // IE if (options.useScaling) { d.css('transform', 'scale(0.0)'); } d.appendTo($sourceParent); animationQueue.push({element: $(d), animation: animationOptions}); } }); $dest.remove(); options.enhancement($sourceParent); // Perform custom visual enhancements during the animation for (i = 0; i < animationQueue.length; i++) { animationQueue[i].element.animate(animationQueue[i].animation, options.duration, options.easing, postCallback); } }); }; })(jQuery); $(document).ready(function() { // get the action filter option item on page load var $filterType = $('.filter_nav li.active a').attr('class'); // get and assign the ourHolder element to the // $holder varible for use later var $holder = $('ul.filter_content'); // clone all items within the pre-assigned $holder element var $data = $holder.clone(); // attempt to call Quicksand when a filter option // item is clicked $('.filter_nav li a').click(function(e) { // reset the active class on all the buttons $('.filter_nav li').removeClass('active'); // assign the class of the clicked filter option // element to our $filterType variable var $filterType = $(this).attr('class'); $(this).parent().addClass('active'); if ($filterType == 'all') { // assign all li items to the $filteredData var when // the 'All' filter option is clicked var $filteredData = $data.find('li'); } else { // find all li elements that have our required $filterType // values for the data-type element var $filteredData = $data.find('li[data-type~=' + $filterType + ']'); } // call quicksand and assign transition parameters $holder.quicksand($filteredData, { duration: 400, easing: 'easeInOutQuad', adjustHeight: 'auto', enhancement: function() { //prettyphoto $('a[data-rel]').each(function() { $(this).attr('rel', $(this).data('rel')); }); $("a[rel^='prettyPhoto[gallery1]']").prettyPhoto({ animation_speed: 'fast', slideshow: 5000, autoplay_slideshow: false, opacity: 0.80, show_title: false, theme: 'pp_default', /* light_rounded / dark_rounded / light_square / dark_square / facebook */ overlay_gallery: false, social_tools: false, changepicturecallback: function(){ var $pp = $('.pp_default'); if( parseInt( $pp.css('left') ) < 0 ){ $pp.css('left', 0 ); } } }); } }); return false; }); }); ty: 0.80, show_title: false, theme: 'pp_default', /* light_rounded / dark_rounded / light_square / dark_square / facebook */ overlay_gallery: false, social_tools: false, changepicturecallback: function(){ var $pp = $('.pp_default'); if( parseInt( $pp.css('left') ) < 0 ){ $pp.css('left', 0 ); } } }); } }); return false; }); });
{ "content_hash": "2397b7e383040a3ae9544038fc6b97a5", "timestamp": "", "source": "github", "line_count": 392, "max_line_length": 165, "avg_line_length": 42.05612244897959, "alnum_prop": 0.48210602935824337, "repo_name": "djstearns/blabfeed-beta2", "id": "b581bcf8847a12a62e27b9f6d20aba103d3bccb6", "size": "16999", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "webroot/js/gjs/jquery.quicksand.js", "mode": "33188", "license": "mit", "language": [ { "name": "CoffeeScript", "bytes": "47686" }, { "name": "JavaScript", "bytes": "6401213" }, { "name": "Logos", "bytes": "7766" }, { "name": "PHP", "bytes": "3756608" }, { "name": "Ruby", "bytes": "4505" } ], "symlink_target": "" }
module Query # Simple user search. class UserPatternSearch < Query::UserBase include Query::Initializers::PatternSearch def parameter_declarations super.merge( pattern: :string ) end def initialize_flavor search = google_parse_pattern add_search_conditions(search, *search_fields) super end def search_fields [ "users.login", "users.name" ] end end end
{ "content_hash": "d480d19262bf5b231c3769507301dd48", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 51, "avg_line_length": 18.24, "alnum_prop": 0.6140350877192983, "repo_name": "raysuelzer/mushroom-observer", "id": "49a5d168fd0810089b7f6a1783db06a97a27fe4b", "size": "456", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "app/classes/query/user_pattern_search.rb", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "45875" }, { "name": "CSS", "bytes": "62555" }, { "name": "HTML", "bytes": "512053" }, { "name": "JavaScript", "bytes": "138848" }, { "name": "Nginx", "bytes": "4875" }, { "name": "Perl", "bytes": "93217" }, { "name": "Python", "bytes": "582" }, { "name": "Ruby", "bytes": "3059376" }, { "name": "SQLPL", "bytes": "837" }, { "name": "Shell", "bytes": "23585" } ], "symlink_target": "" }
/** * BSD-style license; for more info see http://pmd.sourceforge.net/license.html */ package net.sourceforge.pmd.dcd.graph; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import net.sourceforge.pmd.dcd.asm.PrintVisitor; import net.sourceforge.pmd.dcd.asm.TypeSignatureVisitor; import net.sourceforge.pmd.util.filter.Filter; import org.objectweb.asm.AnnotationVisitor; import org.objectweb.asm.Attribute; import org.objectweb.asm.ClassReader; import org.objectweb.asm.ClassVisitor; import org.objectweb.asm.FieldVisitor; import org.objectweb.asm.Label; import org.objectweb.asm.MethodVisitor; import org.objectweb.asm.Opcodes; import org.objectweb.asm.signature.SignatureReader; /** * Utility class used to build a UsageGraph. */ public class UsageGraphBuilder { /** * Should trace level logging be enabled. This is a development debugging * option. */ private static final boolean TRACE = false; private static final boolean INDEX = true; protected final UsageGraph usageGraph; protected final Filter<String> classFilter; public UsageGraphBuilder(Filter<String> classFilter) { this.classFilter = classFilter; this.usageGraph = new UsageGraph(classFilter); } public void index(String name) { try { String className = getClassName(name); String classResourceName = getResourceName(name); if (classFilter.filter(className)) { if (!usageGraph.isClass(className)) { usageGraph.defineClass(className); InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream( classResourceName + ".class"); ClassReader classReader = new ClassReader(inputStream); classReader.accept(getNewClassVisitor(), 0); } } } catch (IOException e) { throw new RuntimeException("For " + name + ": " + e.getMessage(), e); } } public UsageGraph getUsageGraph() { return usageGraph; } private ClassVisitor getNewClassVisitor() { return new MyClassVisitor(); } // ASM visitor to on Class files to build a UsageGraph class MyClassVisitor extends ClassVisitor { private final PrintVisitor p; protected void println(String s) { p.println(s); } protected void printlnIndent(String s) { p.printlnIndent(s); } public MyClassVisitor() { super(Opcodes.ASM4); p = new PrintVisitor(); } private String className; public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) { if (TRACE) { println("visit:"); printlnIndent("version: " + version); printlnIndent("access: " + access); printlnIndent("name: " + name); printlnIndent("signature: " + signature); printlnIndent("superName: " + superName); printlnIndent("interfaces: " + asList(interfaces)); } this.className = getClassName(name); } public AnnotationVisitor visitAnnotation(String desc, boolean visible) { if (TRACE) { println("visitAnnotation:"); printlnIndent("desc: " + desc); printlnIndent("visible: " + visible); } return null; } public void visitAttribute(Attribute attr) { if (TRACE) { println("visitAttribute:"); printlnIndent("attr: " + attr); } } public void visitEnd() { if (TRACE) { println("visitEnd:"); } } public FieldVisitor visitField(int access, String name, String desc, String signature, Object value) { if (TRACE) { println("visitField:"); printlnIndent("access: " + access); printlnIndent("name: " + name); printlnIndent("desc: " + desc); printlnIndent("signature: " + signature); printlnIndent("value: " + value); } if (INDEX) { SignatureReader signatureReader = new SignatureReader(desc); TypeSignatureVisitor visitor = new TypeSignatureVisitor(p); signatureReader.acceptType(visitor); if (TRACE) { printlnIndent("fieldType: " + visitor.getFieldType()); } usageGraph.defineField(className, name, desc); } return null; } public void visitInnerClass(String name, String outerName, String innerName, int access) { if (TRACE) { println("visitInnerClass:"); printlnIndent("name: " + name); printlnIndent("outerName: " + outerName); printlnIndent("innerName: " + innerName); printlnIndent("access: " + access); } index(name); } public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { MemberNode memberNode = null; if (TRACE) { println("visitMethod:"); printlnIndent("access: " + access); printlnIndent("name: " + name); printlnIndent("desc: " + desc); printlnIndent("signature: " + signature); printlnIndent("exceptions: " + asList(exceptions)); } if (INDEX) { memberNode = usageGraph.defineMethod(className, name, desc); } return getNewMethodVisitor(p, memberNode); } public void visitOuterClass(String owner, String name, String desc) { if (TRACE) { println("visitOuterClass:"); printlnIndent("owner: " + owner); printlnIndent("name: " + name); printlnIndent("desc: " + desc); } } public void visitSource(String source, String debug) { if (TRACE) { println("visitSource:"); printlnIndent("source: " + source); printlnIndent("debug: " + debug); } } } protected MethodVisitor getNewMethodVisitor(PrintVisitor parent, MemberNode usingMemberNode) { return new MyMethodVisitor(parent, usingMemberNode); } protected class MyMethodVisitor extends MethodVisitor { private final PrintVisitor p; protected void println(String s) { p.println(s); } protected void printlnIndent(String s) { p.printlnIndent(s); } private final MemberNode usingMemberNode; public MyMethodVisitor(PrintVisitor parent, MemberNode usingMemberNode) { super(Opcodes.ASM4); p = parent; this.usingMemberNode = usingMemberNode; } public AnnotationVisitor visitAnnotation(String desc, boolean visible) { if (TRACE) { println("visitAnnotation:"); printlnIndent("desc: " + desc); printlnIndent("visible: " + visible); } return null; } public AnnotationVisitor visitAnnotationDefault() { if (TRACE) { println("visitAnnotationDefault:"); } return null; } public void visitAttribute(Attribute attr) { if (TRACE) { println("visitAttribute:"); printlnIndent("attr: " + attr); } } public void visitCode() { if (TRACE) { println("visitCode:"); } } public void visitEnd() { if (TRACE) { println("visitEnd:"); } } public void visitFieldInsn(int opcode, String owner, String name, String desc) { if (TRACE) { println("visitFieldInsn:"); printlnIndent("opcode: " + opcode); printlnIndent("owner: " + owner); printlnIndent("name: " + name); printlnIndent("desc: " + desc); } if (INDEX) { String className = getClassName(owner); usageGraph.usageField(className, name, desc, usingMemberNode); } } public void visitFrame(int type, int local, Object[] local2, int stack, Object[] stack2) { if (TRACE) { println("visitFrame:"); printlnIndent("type: " + type); printlnIndent("local: " + local); printlnIndent("local2: " + asList(local2)); printlnIndent("stack: " + stack); printlnIndent("stack2: " + asList(stack2)); } } public void visitIincInsn(int var, int increment) { if (TRACE) { println("visitIincInsn:"); printlnIndent("var: " + var); printlnIndent("increment: " + increment); } } public void visitInsn(int opcode) { if (TRACE) { println("visitInsn:"); printlnIndent("opcode: " + opcode); } } public void visitIntInsn(int opcode, int operand) { if (TRACE) { println("visitIntInsn:"); printlnIndent("opcode: " + opcode); printlnIndent("operand: " + operand); } } public void visitJumpInsn(int opcode, Label label) { if (TRACE) { println("visitJumpInsn:"); printlnIndent("opcode: " + opcode); printlnIndent("label: " + label); } } public void visitLabel(Label label) { if (TRACE) { println("visitLabel:"); printlnIndent("label: " + label); } } public void visitLdcInsn(Object cst) { if (TRACE) { println("visitLdcInsn:"); printlnIndent("cst: " + cst); } } public void visitLineNumber(int line, Label start) { if (TRACE) { println("visitLineNumber:"); printlnIndent("line: " + line); printlnIndent("start: " + start); } } public void visitLocalVariable(String name, String desc, String signature, Label start, Label end, int index) { if (TRACE) { println("visitLocalVariable:"); printlnIndent("name: " + name); printlnIndent("desc: " + desc); printlnIndent("signature: " + signature); printlnIndent("start: " + start); printlnIndent("end: " + end); printlnIndent("index: " + index); } } public void visitLookupSwitchInsn(Label dflt, int[] keys, Label[] labels) { if (TRACE) { println("visitLookupSwitchInsn:"); printlnIndent("dflt: " + dflt); printlnIndent("keys: " + asList(keys)); printlnIndent("labels: " + asList(labels)); } } public void visitMaxs(int maxStack, int maxLocals) { if (TRACE) { println("visitMaxs:"); printlnIndent("maxStack: " + maxStack); printlnIndent("maxLocals: " + maxLocals); } } public void visitMethodInsn(int opcode, String owner, String name, String desc) { if (TRACE) { println("visitMethodInsn:"); printlnIndent("opcode: " + opcode); printlnIndent("owner: " + owner); printlnIndent("name: " + name); printlnIndent("desc: " + desc); } if (INDEX) { String className = getClassName(owner); usageGraph.usageMethod(className, name, desc, usingMemberNode); } } public void visitMultiANewArrayInsn(String desc, int dims) { if (TRACE) { println("visitMultiANewArrayInsn:"); printlnIndent("desc: " + desc); printlnIndent("dims: " + dims); } } public AnnotationVisitor visitParameterAnnotation(int parameter, String desc, boolean visible) { if (TRACE) { println("visitParameterAnnotation:"); printlnIndent("parameter: " + parameter); printlnIndent("desc: " + desc); printlnIndent("visible: " + visible); } return null; } public void visitTableSwitchInsn(int min, int max, Label dflt, Label[] labels) { if (TRACE) { println("visitTableSwitchInsn:"); printlnIndent("min: " + min); printlnIndent("max: " + max); printlnIndent("dflt: " + dflt); printlnIndent("labels: " + asList(labels)); } } public void visitTryCatchBlock(Label start, Label end, Label handler, String type) { if (TRACE) { println("visitTryCatchBlock:"); printlnIndent("start: " + start); printlnIndent("end: " + end); printlnIndent("handler: " + handler); printlnIndent("type: " + type); } } public void visitTypeInsn(int opcode, String desc) { if (TRACE) { println("visitTypeInsn:"); printlnIndent("opcode: " + opcode); printlnIndent("desc: " + desc); } } public void visitVarInsn(int opcode, int var) { if (TRACE) { println("visitVarInsn:"); printlnIndent("opcode: " + opcode); printlnIndent("var: " + var); } } } private static String getResourceName(String name) { return name.replace('.', '/'); } static String getClassName(String name) { return name.replace('/', '.'); } private static List<Integer> asList(int[] array) { List<Integer> list = null; if (array != null) { list = new ArrayList<Integer>(array.length); for (int i : array) { list.add(i); } } return list; } private static List<Object> asList(Object[] array) { return array != null ? Arrays.asList(array) : null; } }
{ "content_hash": "303d4f62128c82f4a47f898cfee981d6", "timestamp": "", "source": "github", "line_count": 445, "max_line_length": 116, "avg_line_length": 27.804494382022472, "alnum_prop": 0.6330720116382446, "repo_name": "byronka/xenos", "id": "ec466a72314ab5ff6ab2e1f91d86d5e5c477a196", "size": "12373", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "utils/pmd-bin-5.2.2/src/pmd-core/src/main/java/net/sourceforge/pmd/dcd/graph/UsageGraphBuilder.java", "mode": "33188", "license": "mit", "language": [ { "name": "Batchfile", "bytes": "102953" }, { "name": "C++", "bytes": "436" }, { "name": "CSS", "bytes": "482910" }, { "name": "HTML", "bytes": "220459885" }, { "name": "Java", "bytes": "31611126" }, { "name": "JavaScript", "bytes": "19708" }, { "name": "NSIS", "bytes": "38770" }, { "name": "PLSQL", "bytes": "19219" }, { "name": "Perl", "bytes": "23704" }, { "name": "Python", "bytes": "3299" }, { "name": "SQLPL", "bytes": "54633" }, { "name": "Shell", "bytes": "192465" }, { "name": "XSLT", "bytes": "499720" } ], "symlink_target": "" }
<?php declare(strict_types=1); namespace Doctrine\Tests\ORM\Functional; use Doctrine\Tests\Models\Cache\City; use Doctrine\Tests\Models\Cache\State; use Doctrine\Tests\Models\Cache\Travel; use Doctrine\Tests\Models\Cache\Traveler; /** * @group DDC-2183 */ class SecondLevelCacheManyToManyTest extends SecondLevelCacheAbstractTest { public function testShouldPutManyToManyCollectionOwningSideOnPersist() { $this->evictRegions(); $this->loadFixturesCountries(); $this->loadFixturesStates(); $this->loadFixturesCities(); $this->loadFixturesTraveler(); $this->loadFixturesTravels(); $this->em->clear(); self::assertTrue($this->cache->containsEntity(Travel::class, $this->travels[0]->getId())); self::assertTrue($this->cache->containsEntity(Travel::class, $this->travels[1]->getId())); self::assertTrue($this->cache->containsCollection(Travel::class, 'visitedCities', $this->travels[0]->getId())); self::assertTrue($this->cache->containsCollection(Travel::class, 'visitedCities', $this->travels[1]->getId())); self::assertTrue($this->cache->containsEntity(City::class, $this->cities[0]->getId())); self::assertTrue($this->cache->containsEntity(City::class, $this->cities[1]->getId())); self::assertTrue($this->cache->containsEntity(City::class, $this->cities[2]->getId())); self::assertTrue($this->cache->containsEntity(City::class, $this->cities[3]->getId())); } public function testPutAndLoadManyToManyRelation() { $this->evictRegions(); $this->loadFixturesCountries(); $this->loadFixturesStates(); $this->loadFixturesCities(); $this->loadFixturesTraveler(); $this->loadFixturesTravels(); $this->em->clear(); $this->cache->evictEntityRegion(City::class); $this->cache->evictEntityRegion(Travel::class); $this->cache->evictCollectionRegion(Travel::class, 'visitedCities'); $this->secondLevelCacheLogger->clearStats(); self::assertFalse($this->cache->containsEntity(Travel::class, $this->travels[0]->getId())); self::assertFalse($this->cache->containsEntity(Travel::class, $this->travels[1]->getId())); self::assertFalse($this->cache->containsCollection(Travel::class, 'visitedCities', $this->travels[0]->getId())); self::assertFalse($this->cache->containsCollection(Travel::class, 'visitedCities', $this->travels[1]->getId())); self::assertFalse($this->cache->containsEntity(City::class, $this->cities[0]->getId())); self::assertFalse($this->cache->containsEntity(City::class, $this->cities[1]->getId())); self::assertFalse($this->cache->containsEntity(City::class, $this->cities[2]->getId())); self::assertFalse($this->cache->containsEntity(City::class, $this->cities[3]->getId())); $t1 = $this->em->find(Travel::class, $this->travels[0]->getId()); $t2 = $this->em->find(Travel::class, $this->travels[1]->getId()); self::assertEquals(2, $this->secondLevelCacheLogger->getPutCount()); self::assertEquals(2, $this->secondLevelCacheLogger->getMissCount()); self::assertEquals(2, $this->secondLevelCacheLogger->getRegionPutCount($this->getEntityRegion(Travel::class))); self::assertEquals(2, $this->secondLevelCacheLogger->getRegionMissCount($this->getEntityRegion(Travel::class))); //trigger lazy load self::assertCount(3, $t1->getVisitedCities()); self::assertCount(2, $t2->getVisitedCities()); self::assertEquals(4, $this->secondLevelCacheLogger->getPutCount()); self::assertEquals(4, $this->secondLevelCacheLogger->getMissCount()); self::assertEquals(2, $this->secondLevelCacheLogger->getRegionPutCount($this->getCollectionRegion(Travel::class, 'visitedCities'))); self::assertEquals(2, $this->secondLevelCacheLogger->getRegionMissCount($this->getCollectionRegion(Travel::class, 'visitedCities'))); self::assertInstanceOf(City::class, $t1->getVisitedCities()->get(0)); self::assertInstanceOf(City::class, $t1->getVisitedCities()->get(1)); self::assertInstanceOf(City::class, $t1->getVisitedCities()->get(2)); self::assertInstanceOf(City::class, $t2->getVisitedCities()->get(0)); self::assertInstanceOf(City::class, $t2->getVisitedCities()->get(1)); self::assertTrue($this->cache->containsEntity(Travel::class, $this->travels[0]->getId())); self::assertTrue($this->cache->containsEntity(Travel::class, $this->travels[1]->getId())); self::assertTrue($this->cache->containsCollection(Travel::class, 'visitedCities', $this->travels[0]->getId())); self::assertTrue($this->cache->containsCollection(Travel::class, 'visitedCities', $this->travels[1]->getId())); self::assertTrue($this->cache->containsEntity(City::class, $this->cities[0]->getId())); self::assertTrue($this->cache->containsEntity(City::class, $this->cities[1]->getId())); self::assertTrue($this->cache->containsEntity(City::class, $this->cities[2]->getId())); self::assertTrue($this->cache->containsEntity(City::class, $this->cities[3]->getId())); $this->em->clear(); $this->secondLevelCacheLogger->clearStats(); $queryCount = $this->getCurrentQueryCount(); $t3 = $this->em->find(Travel::class, $this->travels[0]->getId()); $t4 = $this->em->find(Travel::class, $this->travels[1]->getId()); //trigger lazy load from cache self::assertCount(3, $t3->getVisitedCities()); self::assertCount(2, $t4->getVisitedCities()); self::assertInstanceOf(City::class, $t3->getVisitedCities()->get(0)); self::assertInstanceOf(City::class, $t3->getVisitedCities()->get(1)); self::assertInstanceOf(City::class, $t3->getVisitedCities()->get(2)); self::assertInstanceOf(City::class, $t4->getVisitedCities()->get(0)); self::assertInstanceOf(City::class, $t4->getVisitedCities()->get(1)); self::assertEquals(4, $this->secondLevelCacheLogger->getHitCount()); self::assertEquals(2, $this->secondLevelCacheLogger->getRegionHitCount($this->getEntityRegion(Travel::class))); self::assertEquals(2, $this->secondLevelCacheLogger->getRegionHitCount($this->getCollectionRegion(Travel::class, 'visitedCities'))); self::assertNotSame($t1->getVisitedCities()->get(0), $t3->getVisitedCities()->get(0)); self::assertEquals($t1->getVisitedCities()->get(0)->getId(), $t3->getVisitedCities()->get(0)->getId()); self::assertEquals($t1->getVisitedCities()->get(0)->getName(), $t3->getVisitedCities()->get(0)->getName()); self::assertNotSame($t1->getVisitedCities()->get(1), $t3->getVisitedCities()->get(1)); self::assertEquals($t1->getVisitedCities()->get(1)->getId(), $t3->getVisitedCities()->get(1)->getId()); self::assertEquals($t1->getVisitedCities()->get(1)->getName(), $t3->getVisitedCities()->get(1)->getName()); self::assertNotSame($t1->getVisitedCities()->get(2), $t3->getVisitedCities()->get(2)); self::assertEquals($t1->getVisitedCities()->get(2)->getId(), $t3->getVisitedCities()->get(2)->getId()); self::assertEquals($t1->getVisitedCities()->get(2)->getName(), $t3->getVisitedCities()->get(2)->getName()); self::assertNotSame($t2->getVisitedCities()->get(0), $t4->getVisitedCities()->get(0)); self::assertEquals($t2->getVisitedCities()->get(0)->getId(), $t4->getVisitedCities()->get(0)->getId()); self::assertEquals($t2->getVisitedCities()->get(0)->getName(), $t4->getVisitedCities()->get(0)->getName()); self::assertNotSame($t2->getVisitedCities()->get(1), $t4->getVisitedCities()->get(1)); self::assertEquals($t2->getVisitedCities()->get(1)->getId(), $t4->getVisitedCities()->get(1)->getId()); self::assertEquals($t2->getVisitedCities()->get(1)->getName(), $t4->getVisitedCities()->get(1)->getName()); self::assertEquals(4, $this->secondLevelCacheLogger->getHitCount()); self::assertEquals($queryCount, $this->getCurrentQueryCount()); } public function testStoreManyToManyAssociationWhitCascade() { $this->evictRegions(); $this->loadFixturesCountries(); $this->loadFixturesStates(); $this->loadFixturesCities(); $this->cache->evictEntityRegion(City::class); $this->cache->evictEntityRegion(Traveler::class); $this->cache->evictEntityRegion(Travel::class); $this->cache->evictCollectionRegion(State::class, 'cities'); $this->cache->evictCollectionRegion(Traveler::class, 'travels'); $traveler = new Traveler('Doctrine Bot'); $travel = new Travel($traveler); $travel->addVisitedCity($this->cities[0]); $travel->addVisitedCity($this->cities[1]); $travel->addVisitedCity($this->cities[3]); $this->em->persist($traveler); $this->em->persist($travel); $this->em->flush(); $this->em->clear(); self::assertTrue($this->cache->containsEntity(Travel::class, $travel->getId())); self::assertTrue($this->cache->containsEntity(Traveler::class, $traveler->getId())); self::assertTrue($this->cache->containsEntity(City::class, $this->cities[0]->getId())); self::assertTrue($this->cache->containsEntity(City::class, $this->cities[1]->getId())); self::assertTrue($this->cache->containsEntity(City::class, $this->cities[3]->getId())); self::assertTrue($this->cache->containsCollection(Travel::class, 'visitedCities', $travel->getId())); $queryCount1 = $this->getCurrentQueryCount(); $t1 = $this->em->find(Travel::class, $travel->getId()); self::assertInstanceOf(Travel::class, $t1); self::assertCount(3, $t1->getVisitedCities()); self::assertEquals($queryCount1, $this->getCurrentQueryCount()); } /** * @expectedException \Doctrine\ORM\Cache\CacheException * @expectedExceptionMessage Cannot update a readonly collection "Doctrine\Tests\Models\Cache\Travel#visitedCities */ public function testReadOnlyCollection() { $this->evictRegions(); $this->loadFixturesCountries(); $this->loadFixturesStates(); $this->loadFixturesCities(); $this->loadFixturesTraveler(); $this->loadFixturesTravels(); $this->em->clear(); self::assertTrue($this->cache->containsEntity(Travel::class, $this->travels[0]->getId())); self::assertTrue($this->cache->containsCollection(Travel::class, 'visitedCities', $this->travels[0]->getId())); $travel = $this->em->find(Travel::class, $this->travels[0]->getId()); self::assertCount(3, $travel->getVisitedCities()); $travel->getVisitedCities()->remove(0); $this->em->persist($travel); $this->em->flush(); } public function testManyToManyWithEmptyRelation() { $this->loadFixturesCountries(); $this->loadFixturesStates(); $this->loadFixturesCities(); $this->loadFixturesTraveler(); $this->loadFixturesTravels(); $this->em->clear(); $this->evictRegions(); $queryCount = $this->getCurrentQueryCount(); $entitiId = $this->travels[2]->getId(); //empty travel $entity = $this->em->find(Travel::class, $entitiId); self::assertEquals(0, $entity->getVisitedCities()->count()); self::assertEquals($queryCount+2, $this->getCurrentQueryCount()); $this->em->clear(); $entity = $this->em->find(Travel::class, $entitiId); $queryCount = $this->getCurrentQueryCount(); self::assertEquals(0, $entity->getVisitedCities()->count()); self::assertEquals($queryCount, $this->getCurrentQueryCount()); } }
{ "content_hash": "d473d71b365790f0e1383d2b9db7144c", "timestamp": "", "source": "github", "line_count": 247, "max_line_length": 141, "avg_line_length": 48.178137651821864, "alnum_prop": 0.6457142857142857, "repo_name": "mikeSimonson/doctrine2", "id": "f149ed7d67e23c5ee5090c89cc107ec3f1db7f17", "size": "11900", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "tests/Doctrine/Tests/ORM/Functional/SecondLevelCacheManyToManyTest.php", "mode": "33188", "license": "mit", "language": [ { "name": "Batchfile", "bytes": "220" }, { "name": "PHP", "bytes": "4615833" }, { "name": "Shell", "bytes": "1543" } ], "symlink_target": "" }
package org.apache.camel.component.as2.api; public interface AS2Charset { /** * Name of charset parameter in Content-Type header values. */ public static final String PARAM = "charset"; /** * Character Set Name for US ASCII */ public static final String US_ASCII = "US-ASCII"; }
{ "content_hash": "1214d83ee47480c8c96042a6352ede6d", "timestamp": "", "source": "github", "line_count": 15, "max_line_length": 63, "avg_line_length": 21.8, "alnum_prop": 0.6299694189602446, "repo_name": "jonmcewen/camel", "id": "2b43afdbcce78051e6c859ce2a4459a5c40cf1e0", "size": "1130", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2Charset.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Apex", "bytes": "6519" }, { "name": "Batchfile", "bytes": "1518" }, { "name": "CSS", "bytes": "30373" }, { "name": "Elm", "bytes": "10852" }, { "name": "FreeMarker", "bytes": "11410" }, { "name": "Groovy", "bytes": "54390" }, { "name": "HTML", "bytes": "190919" }, { "name": "Java", "bytes": "68307055" }, { "name": "JavaScript", "bytes": "90399" }, { "name": "Makefile", "bytes": "513" }, { "name": "PLSQL", "bytes": "1419" }, { "name": "Protocol Buffer", "bytes": "2514" }, { "name": "Python", "bytes": "36" }, { "name": "Ruby", "bytes": "4802" }, { "name": "Scala", "bytes": "323702" }, { "name": "Shell", "bytes": "17107" }, { "name": "Tcl", "bytes": "4974" }, { "name": "Thrift", "bytes": "6979" }, { "name": "XQuery", "bytes": "546" }, { "name": "XSLT", "bytes": "284638" } ], "symlink_target": "" }
package org.apache.carbondata.spark.testsuite.detailquery import org.apache.spark.sql.test.util.QueryTest import org.scalatest.BeforeAndAfterAll /** * Test Class for detailed query on Int and BigInt of No Dictionary col * */ class NoDictionaryColumnTestCase extends QueryTest with BeforeAndAfterAll { override def beforeAll { sql("DROP TABLE IF EXISTS carbonTable") sql("DROP TABLE IF EXISTS hiveTable") sql("DROP TABLE IF EXISTS carbonEmpty") sql("DROP TABLE IF EXISTS hiveEmpty") sql("CREATE TABLE carbonTable (imei String, age Int, num BigInt) STORED AS carbondata ") sql(s"LOAD DATA LOCAL INPATH '$resourcesPath/datawithNegtiveNumber.csv' INTO TABLE carbonTable") sql("CREATE TABLE hiveTable (imei String, age Int, num BigInt) ROW FORMAT DELIMITED FIELDS TERMINATED BY ','") sql(s"LOAD DATA LOCAL INPATH '$resourcesPath/datawithNegeativewithoutHeader.csv' INTO TABLE hiveTable") sql("CREATE TABLE carbonEmpty (cust_id int, cust_name String, active_emui_version String, bob timestamp, bigint_column bigint) STORED AS carbondata ") sql(s"LOAD DATA LOCAL INPATH '$resourcesPath/dataWithEmptyRows.csv' INTO TABLE carbonEmpty OPTIONS('FILEHEADER'='cust_id,cust_name,active_emui_version,bob,bigint_column')") sql("CREATE TABLE hiveEmpty (cust_id int, cust_name String, active_emui_version String, bob timestamp, bigint_column bigint) ROW FORMAT DELIMITED FIELDS TERMINATED BY ','") sql(s"LOAD DATA LOCAL INPATH '$resourcesPath/dataWithEmptyRows.csv' INTO TABLE hiveEmpty") } test("SELECT IntType FROM carbonTable") { checkAnswer( sql("SELECT imei,age FROM carbonTable ORDER BY imei"), sql("SELECT imei,age FROM hiveTable ORDER BY imei") ) } test("SELECT BigIntType FROM carbonTable") { checkAnswer( sql("SELECT imei,num FROM carbonTable ORDER BY imei"), sql("SELECT imei,num FROM hiveTable ORDER BY imei") ) } test("test load data with one row that all no dictionary column values are empty") { checkAnswer( sql("SELECT cust_name,active_emui_version FROM carbonEmpty"), sql("SELECT cust_name,active_emui_version FROM hiveEmpty") ) } override def afterAll { sql("DROP TABLE IF EXISTS carbonTable") sql("DROP TABLE IF EXISTS hiveTable") sql("DROP TABLE IF EXISTS carbonEmpty") sql("DROP TABLE IF EXISTS hiveEmpty") } }
{ "content_hash": "0a7f6703b41cedd4998c91831a25fdfb", "timestamp": "", "source": "github", "line_count": 57, "max_line_length": 176, "avg_line_length": 41.64912280701754, "alnum_prop": 0.7329401853411963, "repo_name": "jackylk/incubator-carbondata", "id": "921ed62978aeb138ce5d95820352294362adddba", "size": "3174", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/detailquery/NoDictionaryColumnTestCase.scala", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "1639" }, { "name": "C++", "bytes": "110888" }, { "name": "CMake", "bytes": "1555" }, { "name": "Java", "bytes": "7172203" }, { "name": "Python", "bytes": "365111" }, { "name": "Scala", "bytes": "10579226" }, { "name": "Shell", "bytes": "7259" }, { "name": "Smalltalk", "bytes": "86" }, { "name": "Thrift", "bytes": "24309" } ], "symlink_target": "" }
rpi_ws281x ========== Userspace Raspberry Pi PWM library for WS281X LEDs This includes WS2812 and SK6812RGB RGB LEDs Preliminary support is now included for SK6812RGBW LEDs (yes, RGB + W) ### Background: The BCM2835 in the Raspberry Pi has a PWM module that is well suited to driving individually controllable WS281X LEDs. Using the DMA, PWM FIFO, and serial mode in the PWM, it's possible to control almost any number of WS281X LEDs in a chain connected to the PWM output pin. This library and test program set the clock rate of the PWM controller to 3X the desired output frequency and creates a bit pattern in RAM from an array of colors where each bit is represented by 3 bits for the PWM controller as follows. Bit 1 - 1 1 0 Bit 0 - 1 0 0 ### Hardware: WS281X LEDs are generally driven at 5V, which requires that the data signal be at the same level. Converting the output from a Raspberry Pi GPIO/PWM to a higher voltage through a level shifter is required. It is possible to run the LEDs from a 3.3V - 3.6V power source, and connect the GPIO directly at a cost of brightness, but this isn't recommended. The test program is designed to drive a 8x8 grid of LEDs from Adafruit (http://www.adafruit.com/products/1487). Please see the Adafruit website for more information. Know what you're doing with the hardware and electricity. I take no reponsibility for damage, harm, or mistakes. ### Build: - Install Scons (on raspbian, apt-get install scons). - Make sure to adjust the parameters in main.c to suit your hardare. - Signal rate (400kHz to 800kHz). Default 800kHz. - ledstring.invert=1 if using a inverting level shifter. - Width and height of LED matrix (height=1 for LED string). - Type 'scons' from inside the source directory. ### Running: - Type 'sudo scons'. - Type 'sudo ./test'. - That's it. You should see a moving rainbow scroll across the display. ### Limitations: Since this library and the onboard Raspberry Pi audio both use the PWM, they cannot be used together. You will need to blacklist the Broadcom audio kernel module by creating a file /etc/modprobe.d/snd-blacklist.conf with blacklist snd_bcm2835 If the audio device is still loading after blacklisting, you may also need to comment it out in the /etc/modules file. Some distributions use audio by default, even if nothing is being played. If audio is needed, you can use a USB audio device instead. ### Usage: The API is very simple. Make sure to create and initialize the ws2811_t structure as seen in main.c. From there it can be initialized by calling ws2811_init(). LEDs are changed by modifying the color in the .led[index] array and calling ws2811_render(). The rest is handled by the library, which creates the DMA memory and starts the DMA/PWM. Make sure to hook a signal handler for SIGKILL to do cleanup. From the handler make sure to call ws2811_fini(). It'll make sure that the DMA is finished before program execution stops. That's it. Have fun. This was a fun little weekend project. I hope you find it useful.
{ "content_hash": "73f17c94d4aa6ab7fff77fe8da7c14b5", "timestamp": "", "source": "github", "line_count": 85, "max_line_length": 73, "avg_line_length": 36.082352941176474, "alnum_prop": 0.758721878056733, "repo_name": "wcthompson/theia", "id": "34be7711e1f6c11c2f3ba854e1537c26b0c9a2d9", "size": "3067", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "modules/lights/rpi_ws281x/README.md", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "82027" }, { "name": "CSS", "bytes": "77050" }, { "name": "Go", "bytes": "2989" }, { "name": "HTML", "bytes": "2266" }, { "name": "JavaScript", "bytes": "135824" }, { "name": "Python", "bytes": "1653700" }, { "name": "Shell", "bytes": "5121" } ], "symlink_target": "" }
namespace Dike.Core.Events.Bus.Exceptions { using System; /// <summary> /// Represents a class that can be used to notify about an exception. /// </summary> /// <seealso cref="Dike.Core.Events.Bus.EventData" /> public class ExceptionData : EventData { #region Constructors /// <summary> /// Initializes a new instance of the <see cref="ExceptionData"/> class. /// </summary> /// <param name="exception">The exception.</param> public ExceptionData(Exception exception) { Exception = exception; } #endregion Constructors #region Properties /// <summary> /// Gets the exception. /// </summary> /// <value>The exception.</value> public Exception Exception { get; } #endregion Properties } }
{ "content_hash": "f67a4e456439ef820ddde491dc15cc20", "timestamp": "", "source": "github", "line_count": 38, "max_line_length": 80, "avg_line_length": 23.710526315789473, "alnum_prop": 0.5482796892341842, "repo_name": "IngbertPalm/project.dike", "id": "ba835534dd55e6a511d5fdbe45a681b5f527ae38", "size": "903", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/Dike.Core/Events/Bus/Exceptions/ExceptionData.cs", "mode": "33188", "license": "mit", "language": [ { "name": "C#", "bytes": "3735688" }, { "name": "CSS", "bytes": "260971" }, { "name": "JavaScript", "bytes": "7937" }, { "name": "TypeScript", "bytes": "1181" } ], "symlink_target": "" }
<?xml version="1.0" encoding="UTF-8"?> <lom xmlns="http://www.imsglobal.org/xsd/imsmd_rootv1p2p1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.imsglobal.org/xsd/imsmd_rootv1p2p1 imsmd_rootv1p2p1.xsd"> <general> <title> <langstring>communaction skill</langstring> </title> <catalogentry> <catalog>communaction skill</catalog> <entry> <langstring>sco03_07.swf</langstring> </entry> </catalogentry> <language>en</language> <description> <langstring>default</langstring> </description> <keyword> <langstring>default</langstring> </keyword> <keyword> <langstring>default</langstring> </keyword> <keyword> <langstring>default</langstring> </keyword> <keyword> <langstring>default</langstring> </keyword> <aggregationlevel> <source> <langstring xml:lang="x-none">LOMv1.0</langstring> </source> <value> <langstring xml:lang="x-none">1</langstring> </value> </aggregationlevel> </general> <lifecycle> <version> <langstring>1.1</langstring> </version> <status> <source> <langstring xml:lang="x-none">LOMv1.0</langstring> </source> <value> <langstring xml:lang="x-none">Final</langstring> </value> </status> <contribute> <role> <source> <langstring xml:lang="x-none">LOMv1.0</langstring> </source> <value> <langstring xml:lang="x-none">Graphical Designer</langstring> </value> </role> <centity> <vcard>BEGIN:vCard ORG:ADL Co-Lab END:vCard</vcard> </centity> <date> <datetime>2005-03-17</datetime> <description> <langstring>Date this meta-data test was created</langstring> </description> </date> </contribute> </lifecycle> <metametadata> <metadatascheme>ADL SCORM 1.2</metadatascheme> </metametadata> <technical> <format>flash</format> <size>100</size> <location type="URI">course01/sco_sets/sco03/sco03_07.swf</location> </technical> <educational> <learningresourcetype> <source> <langstring xml:lang="x-none">LOMv1.0</langstring> </source> <value> <langstring xml:lang="x-none">Figure</langstring> </value> </learningresourcetype> </educational> <rights> <cost> <source> <langstring xml:lang="x-none">LOMv1.0</langstring> </source> <value> <langstring xml:lang="x-none">no</langstring> </value> </cost> <copyrightandotherrestrictions> <source> <langstring xml:lang="x-none">LOMv1.0</langstring> </source> <value> <langstring xml:lang="x-none">no</langstring> </value> </copyrightandotherrestrictions> <description> <langstring>default</langstring> </description> </rights> </lom>
{ "content_hash": "77f58958da0537d54661b30d3f5e91f6", "timestamp": "", "source": "github", "line_count": 112, "max_line_length": 201, "avg_line_length": 29.321428571428573, "alnum_prop": 0.5450669914738124, "repo_name": "uukuguy/eginx", "id": "a0bf377204d8742ab0ac91afc4a6ef3555a80088", "size": "3284", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "html/media/rrtd/course01/sco_sets/sco03/sco03_07.xml", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "51437" }, { "name": "C++", "bytes": "29946" }, { "name": "CSS", "bytes": "321" }, { "name": "HTML", "bytes": "40511" }, { "name": "JavaScript", "bytes": "66041" }, { "name": "Makefile", "bytes": "2010" }, { "name": "Nginx", "bytes": "7086" }, { "name": "Shell", "bytes": "2785" } ], "symlink_target": "" }
<!DOCTYPE html> <html lang="en"> <head> <title>Cat Facts</title> <link rel="stylesheet" href="static/css/styles.css"/> <link rel="icon" href="static/images/favicon.ico"/> </head> <body> <div class="cat-panel"> <div class="cat-bg day"></div> <div class="cat-bg night"></div> <h1>Cat Facts</h1> <div id="signin-button" style="display: {{ buttonDisplay }};"> <span class="g-signin" data-scope="{{ scope }}" data-clientid="{{ clientId }}" data-redirecturi="postmessage" data-accesstype="offline" data-cookiepolicy="single_host_origin" data-callback="signInCallback" data-approvalprompt="{{ approvalPrompt }}"> </span> </div> <div id="result" class="controls" style="display: none;"> <div class="control"> <label for="frequency">Send me a cat fact every</label> <select id="frequency" name="frequency"> <option value="15">15 minutes</option> <option value="30">30 minutes</option> <option value="60">1 hour</option> </select> </div> <div class="control"> <input type="checkbox" id="night-mode" name="night-mode"></input> <label for="night-mode">Send me cat facts at night, too</label> </div> </div> </div> <div id="status-bar"></div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script src="static/js/main.js"></script> <script src="https://plus.google.com/js/client:plusone.js?onload=start"></script> </body> </html>
{ "content_hash": "5644fc5a1416ca89985f3344f9c98718", "timestamp": "", "source": "github", "line_count": 47, "max_line_length": 91, "avg_line_length": 34, "alnum_prop": 0.5901126408010012, "repo_name": "googleglass/mirror-catfacts-python", "id": "4b9f001e7f01b81093d0e8a2ee76f9ab72eb80f8", "size": "1598", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "templates/index.html", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "1520" }, { "name": "JavaScript", "bytes": "3732" }, { "name": "Python", "bytes": "402218" } ], "symlink_target": "" }
"""Run an SMTP daemon process. .. autosummary:: :toctree: signals management.commands.recmail """ from lino.api import ad, _ class Plugin(ad.Plugin): "See :doc:`/dev/plugins`." verbose_name = _("Mail server")
{ "content_hash": "d2729ce6fa081d308ec0299f2c1d0c75", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 35, "avg_line_length": 12.368421052631579, "alnum_prop": 0.625531914893617, "repo_name": "khchine5/lino", "id": "7e0cc4c49b0e0a439e3140dc40cb4ef8d5e07138", "size": "315", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "lino/modlib/smtpd/__init__.py", "mode": "33188", "license": "bsd-2-clause", "language": [ { "name": "Batchfile", "bytes": "704" }, { "name": "CSS", "bytes": "1372581" }, { "name": "Emacs Lisp", "bytes": "277895" }, { "name": "HTML", "bytes": "1146746" }, { "name": "Hack", "bytes": "3416" }, { "name": "JavaScript", "bytes": "1212734" }, { "name": "PHP", "bytes": "56272" }, { "name": "Python", "bytes": "2484371" }, { "name": "Shell", "bytes": "5752" } ], "symlink_target": "" }
package dom import ( "errors" ) type ServerRepository interface { Init(update bool, id string, version string) error Get() (*Server, error) Update(version string) error } type Server struct { Id string `json:"id"` Version string `json:"version"` } func (s *Server) Validate() error { if s.Id == "" { return errors.New("Invalid server id") } return nil }
{ "content_hash": "098f92fa7cd4f2d878425e0349fab5d8", "timestamp": "", "source": "github", "line_count": 24, "max_line_length": 51, "avg_line_length": 15.625, "alnum_prop": 0.6693333333333333, "repo_name": "diegogub/gocqrs", "id": "b8604bb7cc428ce620f39e22e1b731bfd3ec8fd3", "size": "375", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "vendor/bitbucket.org/dgub/evento/dom/server.go", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Go", "bytes": "38214" } ], "symlink_target": "" }
<?php namespace Symfony\Component\ErrorRenderer\ErrorRenderer; use Symfony\Component\ErrorRenderer\Exception\FlattenException; /** * @author Yonel Ceruto <[email protected]> */ class JsonErrorRenderer implements ErrorRendererInterface { private $debug; public function __construct(bool $debug = true) { $this->debug = $debug; } /** * {@inheritdoc} */ public static function getFormat(): string { return 'json'; } /** * {@inheritdoc} */ public function render(FlattenException $exception): string { $content = [ 'title' => $exception->getTitle(), 'status' => $exception->getStatusCode(), 'detail' => $exception->getMessage(), ]; if ($this->debug) { $content['exceptions'] = $exception->toArray(); } return (string) json_encode($content, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_LINE_TERMINATORS | JSON_PRESERVE_ZERO_FRACTION); } }
{ "content_hash": "00c6eb09529d1fd1b9a36021ce22127e", "timestamp": "", "source": "github", "line_count": 45, "max_line_length": 179, "avg_line_length": 23.57777777777778, "alnum_prop": 0.6041470311027333, "repo_name": "teohhanhui/symfony", "id": "66f9af1058e51b0f3eb23f3b89aa098fc4e1d95a", "size": "1290", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/Symfony/Component/ErrorRenderer/ErrorRenderer/JsonErrorRenderer.php", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "3010" }, { "name": "HTML", "bytes": "386277" }, { "name": "Hack", "bytes": "26" }, { "name": "JavaScript", "bytes": "12603" }, { "name": "PHP", "bytes": "17432152" }, { "name": "Shell", "bytes": "3136" } ], "symlink_target": "" }
SYNONYM #### According to The Catalogue of Life, 3rd January 2011 #### Published in null #### Original name null ### Remarks null
{ "content_hash": "26c173923ecf372403032e200aa7d28d", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 39, "avg_line_length": 10.23076923076923, "alnum_prop": 0.6917293233082706, "repo_name": "mdoering/backbone", "id": "3618c0e32df94df9ae478310f5a262809a97bde5", "size": "212", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "life/Plantae/Magnoliophyta/Liliopsida/Asparagales/Orchidaceae/Lepanthes/Lepanthes pseudocaulescens/ Syn. Penducella pseudocaulescens/README.md", "mode": "33188", "license": "apache-2.0", "language": [], "symlink_target": "" }
/** */ package CIM.IEC61970.Informative.Reservation.impl; import CIM.IEC61970.Informative.Reservation.ReservationPackage; import CIM.IEC61970.Informative.Reservation.ReservationVersion; import CIM.impl.ElementImpl; import java.util.Date; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.impl.ENotificationImpl; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Version</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * </p> * <ul> * <li>{@link CIM.IEC61970.Informative.Reservation.impl.ReservationVersionImpl#getDate <em>Date</em>}</li> * <li>{@link CIM.IEC61970.Informative.Reservation.impl.ReservationVersionImpl#getVersion <em>Version</em>}</li> * </ul> * * @generated */ public class ReservationVersionImpl extends ElementImpl implements ReservationVersion { /** * The default value of the '{@link #getDate() <em>Date</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getDate() * @generated * @ordered */ protected static final Date DATE_EDEFAULT = null; /** * The cached value of the '{@link #getDate() <em>Date</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getDate() * @generated * @ordered */ protected Date date = DATE_EDEFAULT; /** * The default value of the '{@link #getVersion() <em>Version</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getVersion() * @generated * @ordered */ protected static final String VERSION_EDEFAULT = null; /** * The cached value of the '{@link #getVersion() <em>Version</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getVersion() * @generated * @ordered */ protected String version = VERSION_EDEFAULT; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected ReservationVersionImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return ReservationPackage.Literals.RESERVATION_VERSION; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Date getDate() { return date; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setDate(Date newDate) { Date oldDate = date; date = newDate; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ReservationPackage.RESERVATION_VERSION__DATE, oldDate, date)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getVersion() { return version; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setVersion(String newVersion) { String oldVersion = version; version = newVersion; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ReservationPackage.RESERVATION_VERSION__VERSION, oldVersion, version)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case ReservationPackage.RESERVATION_VERSION__DATE: return getDate(); case ReservationPackage.RESERVATION_VERSION__VERSION: return getVersion(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case ReservationPackage.RESERVATION_VERSION__DATE: setDate((Date)newValue); return; case ReservationPackage.RESERVATION_VERSION__VERSION: setVersion((String)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case ReservationPackage.RESERVATION_VERSION__DATE: setDate(DATE_EDEFAULT); return; case ReservationPackage.RESERVATION_VERSION__VERSION: setVersion(VERSION_EDEFAULT); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case ReservationPackage.RESERVATION_VERSION__DATE: return DATE_EDEFAULT == null ? date != null : !DATE_EDEFAULT.equals(date); case ReservationPackage.RESERVATION_VERSION__VERSION: return VERSION_EDEFAULT == null ? version != null : !VERSION_EDEFAULT.equals(version); } return super.eIsSet(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (date: "); result.append(date); result.append(", version: "); result.append(version); result.append(')'); return result.toString(); } } //ReservationVersionImpl
{ "content_hash": "508be0fbb2cddce6dfbf66c43119dd15", "timestamp": "", "source": "github", "line_count": 220, "max_line_length": 128, "avg_line_length": 23.568181818181817, "alnum_prop": 0.6447444551591128, "repo_name": "georghinkel/ttc2017smartGrids", "id": "7c7e79bc2ed525b25fecedc699520e8e49859b89", "size": "5185", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "solutions/ModelJoin/src/main/java/CIM/IEC61970/Informative/Reservation/impl/ReservationVersionImpl.java", "mode": "33188", "license": "mit", "language": [ { "name": "C#", "bytes": "79261108" }, { "name": "Java", "bytes": "38407170" }, { "name": "Python", "bytes": "6055" }, { "name": "R", "bytes": "15405" }, { "name": "Rebol", "bytes": "287" } ], "symlink_target": "" }
Meteor.methods({ getEnvironmentRoot: function(){ //console.log(process.env.ROOT_URL); return process.env.ROOT_URL; }, eventsOnHooksInit: function () { return true; } });
{ "content_hash": "6567fe2d95a466bcda02e661df5ff8b4", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 40, "avg_line_length": 21.11111111111111, "alnum_prop": 0.6526315789473685, "repo_name": "johntday/idiagram", "id": "b946f6925d1a5c09b8e98a451f478ff63cf9afd3", "size": "192", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "server/app.environment.js", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "14955" }, { "name": "HTML", "bytes": "82384" }, { "name": "JavaScript", "bytes": "456559" } ], "symlink_target": "" }
<tt xmlns="http://www.w3.org/2006/10/ttaf1"> <body> <div xml:id="captions"> <p begin="00:00:00" end="00:00:05">I’m Roger Oldham and I’m deputy director for digital services and the Ministry of Justice. </p> <p begin="00:00:05" end="00:00:09">We’re creating a new digital services division here at the Ministry of Justice, and that’s </p> <p begin="00:00:09" end="00:00:14">to act as a centre of expertise in helping the department transform itself digitally. </p> <p begin="00:00:14" end="00:00:19">So it will be a unit which is filled with specialist so that we have a range of specialist </p> <p begin="00:00:19" end="00:00:24">digital expertise. But it will also be about helping the business build capability right </p> <p begin="00:00:24" end="00:00:31">across in a variety of different roles. So, for senior management and policy and operational </p> <p begin="00:00:31" end="00:00:35">colleagues, that means that it’s about giving them the understanding of what digital can </p> <p begin="00:00:35" end="00:00:40">do for their business area, helping them so that they can have a degree of digital thinking </p> <p begin="00:00:40" end="00:00:45">that becomes part of their day-to-day. In assessing the digital capability that we </p> <p begin="00:00:45" end="00:00:51">needed, the specialist skills that we needed to bring into the ministry, we looked at how </p> <p begin="00:00:51" end="00:00:55">the best organisations deliver their digital services. We worked with the government digital </p> <p begin="00:00:55" end="00:01:00">service to understand how they had developed a specialist capability right at the centre </p> <p begin="00:01:00" end="00:01:05">of government, and we addressed the skills gaps that we identified as a result. </p> <p begin="00:01:05" end="00:01:09">The kind of skills that you need to deliver digital services effectively are quite different </p> <p begin="00:01:09" end="00:01:15">to the skills that you might typically find in the civil service. And therefore a skillset </p> <p begin="00:01:15" end="00:01:19">that we needed to develop. So we had some of the right expertise in some parts of the </p> <p begin="00:01:19" end="00:01:24">department, but certainly not enough of the expertise that we needed across the board. </p> <p begin="00:01:24" end="00:01:28">In actual fact, when you look at the civil service more broadly, typically people have </p> <p begin="00:01:28" end="00:01:33">moved around and had a general level of ability in a wide range of different roles. Actually </p> <p begin="00:01:33" end="00:01:38">delivering digital services doesn’t play to that particular model. So we’ve needed </p> <p begin="00:01:38" end="00:01:45">to bring in people who have got hands-on experience of delivering great digital services and to </p> <p begin="00:01:45" end="00:01:50">actually use them to develop the capability that we need. The ministry is the first department </p> <p begin="00:01:50" end="00:01:54">to be implementing a digital services division in this way. </p> <p begin="00:01:54" end="00:01:58">An example of a service that we’re transforming would be Legal Aid eligibility. Only those </p> <p begin="00:01:58" end="00:02:03">who are actually eligible come through to the phone line and have the more detailed </p> <p begin="00:02:03" end="00:02:07">conversation with a specialist advisor. The value of that particular service is to ensure </p> <p begin="00:02:07" end="00:02:13">that we don’t have significant numbers of calls coming through to our call centres for </p> <p begin="00:02:13" end="00:02:18">people who are not eligible and who the specialists are not able to help. So we can maintain, </p> <p begin="00:02:18" end="00:02:25">if you like, a level of service by ensuring that people are diverted to alternative forms </p> <p begin="00:02:25" end="00:02:31">of help where appropriate, and reducing the burden on the call centres that we’re operating. </p> <p begin="00:02:31" end="00:02:34">We’re certainly approaching the unit as a pathfinder and working very closely with </p> <p begin="00:02:34" end="00:02:39">a government digital service to ensure that we establish it in a way that not only links </p> <p begin="00:02:39" end="00:02:44">in well to the unit that they’ve set up at the centre, but also could form a model </p> <p begin="00:02:44" end="00:02:50">for other departments to follow. It may be possible in time for units to be shared across </p> <p begin="00:02:50" end="00:02:53">a number of departments. For people who are looking to set up this </p> <p begin="00:02:53" end="00:02:58">kind of unit in other departments, I would say that you need to have a very clear vision </p> <p begin="00:02:58" end="00:03:02">of what you’re trying to achieve. You need to be, I think, focused on the fact that you’re </p> <p begin="00:03:02" end="00:03:06">not going to be able to do everything for everybody so you need to very clear about </p> <p begin="00:03:06" end="00:03:11">what your priorities are. So the way in which I’m approaching it is to look at the service </p> <p begin="00:03:11" end="00:03:18">we’re providing as if it’s a service to the business that enables them to transform </p> <p begin="00:03:19" end="00:03:23">the business that they’re operating. I would say to those who have the opportunity </p> <p begin="00:03:23" end="00:03:27">to come and work in government and to be part of that, you won’t experience anything like </p> <p begin="00:03:27" end="00:03:32">it. There can be a lot of difficult issues, which you have to cut through. It requires </p> <p begin="00:03:32" end="00:03:37">a lot of very clear communication, and a lot of engagement, but it also requires you to </p> <p begin="00:03:37" end="00:03:42">be single-minded and not to be afraid of having tough conversations and dealing with difficult </p> <p begin="00:03:42" end="00:03:49">issues and with conflict. This is an incredibly motivating kind of role and the opportunity </p> <p begin="00:03:50" end="00:03:57">to really make a difference, to be contributing towards something which is greater than yourself. </p> <p begin="00:03:58" end="00:03:58">How could I not be having fun? </p> </div> </body> </tt>
{ "content_hash": "84f1f397068d434666544e6bfdd48e56", "timestamp": "", "source": "github", "line_count": 196, "max_line_length": 86, "avg_line_length": 31.836734693877553, "alnum_prop": 0.7184294871794872, "repo_name": "gds-attic/government-digital-strategy", "id": "7411fb8467d643ab4fb84485e2b1be30a15f8751", "size": "6278", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "source/digital/strategy/case-studies/digital-capabilities/transcript.xml", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "70841" }, { "name": "JavaScript", "bytes": "9131" }, { "name": "Ruby", "bytes": "40592" }, { "name": "Shell", "bytes": "971" } ], "symlink_target": "" }
from django.conf.urls import url from . import views urlpatterns = [ url(r'sign_in/$', views.sign_in, name='sign_in'), url(r'sign_up/$', views.sign_up, name='sign_up'), url(r'sign_out/$', views.sign_out, name='sign_out'), url(r'profile/create/$', views.create_profile, name='create_profile'), url(r'profile/edit/$', views.edit_profile, name='edit_profile'), url(r'profile/change_password/$', views.change_password, name='change_password'), url(r'profile/$', views.profile, name='profile'), ]
{ "content_hash": "4231e94beddcc9a2735e5da25b47ef6c", "timestamp": "", "source": "github", "line_count": 15, "max_line_length": 85, "avg_line_length": 34.93333333333333, "alnum_prop": 0.6545801526717557, "repo_name": "squadran2003/django-user-profile", "id": "c719207b4990de83aa3f0c6aa59e75a6577f275a", "size": "524", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "django-user-profile/accounts/urls.py", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "267893" }, { "name": "HTML", "bytes": "10841" }, { "name": "JavaScript", "bytes": "4450" }, { "name": "Python", "bytes": "34098" } ], "symlink_target": "" }
""" Revision ID: 0205_service_callback_type Revises: 0204_service_data_retention Create Date: 2018-07-17 15:51:10.776698 """ import sqlalchemy as sa from alembic import op revision = "0205_service_callback_type" down_revision = "0204_service_data_retention" def upgrade(): # ### commands auto generated by Alembic - please adjust! ### op.create_table( "service_callback_type", sa.Column("name", sa.String(), nullable=False), sa.PrimaryKeyConstraint("name") ) op.execute("insert into service_callback_type values ('delivery_status'), ('complaint')") op.add_column("service_callback_api", sa.Column("callback_type", sa.String(), nullable=True)) op.create_foreign_key( "service_callback_api_type_fk", "service_callback_api", "service_callback_type", ["callback_type"], ["name"] ) op.add_column("service_callback_api_history", sa.Column("callback_type", sa.String(), nullable=True)) # ### end Alembic commands ### def downgrade(): # ### commands auto generated by Alembic - please adjust! ### op.drop_column("service_callback_api_history", "callback_type") op.drop_constraint("service_callback_api_type_fk", "service_callback_api", type_="foreignkey") op.drop_column("service_callback_api", "callback_type") op.drop_table("service_callback_type") # ### end Alembic commands ###
{ "content_hash": "8e5b0f9acd9efc3c4070518f8a959499", "timestamp": "", "source": "github", "line_count": 35, "max_line_length": 116, "avg_line_length": 38.77142857142857, "alnum_prop": 0.6875460574797347, "repo_name": "alphagov/notifications-api", "id": "e589e598153c49aec9e81c57bc37b049ecaa7180", "size": "1357", "binary": false, "copies": "1", "ref": "refs/heads/main", "path": "migrations/versions/0205_service_callback_type.py", "mode": "33188", "license": "mit", "language": [ { "name": "Dockerfile", "bytes": "719" }, { "name": "Jinja", "bytes": "5543" }, { "name": "Makefile", "bytes": "6627" }, { "name": "Mako", "bytes": "361" }, { "name": "Procfile", "bytes": "35" }, { "name": "Python", "bytes": "3506225" }, { "name": "Shell", "bytes": "13179" } ], "symlink_target": "" }
 # Load posh-git example profile . $env:USERPROFILE\Documents\WindowsPowerShell\Modules\posh-git\profile.example.ps1 Import-Module Beautiful-PoshGit
{ "content_hash": "8af214b7eef51bd28e8bdac9c1c94331", "timestamp": "", "source": "github", "line_count": 5, "max_line_length": 83, "avg_line_length": 30, "alnum_prop": 0.8266666666666667, "repo_name": "hashhar/Beautiful-PoshGit", "id": "53ecd92ef4667d12c90f5b8932bf56b0d6709306", "size": "152", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Microsoft.PowerShell_profile.ps1", "mode": "33188", "license": "mit", "language": [ { "name": "PowerShell", "bytes": "3360" } ], "symlink_target": "" }
package ru.pft40.bugHunter.mathematics; /** * Created by BugHunter on 08.04.2017. */ public class Point { double x; //coordinate X double y; //coordinate Y public Point(double x, double y) { this.x = x; this.y = y; } public double calculateDistanceTo(Point p) { double xSubstrDegree2 = substractionDegree2(p.x, this.x); double ySubstrDegree2 = substractionDegree2(p.y, this.y); return Math.sqrt(xSubstrDegree2 + ySubstrDegree2); } public static double substractionDegree2(double a, double b) { return (a*a - 2*a*b + b*b); } }
{ "content_hash": "f465c0bd9847c527313800d8c753471f", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 66, "avg_line_length": 24.52, "alnum_prop": 0.6296900489396411, "repo_name": "cpmBugHunter/JavaForTesters-40", "id": "70b347d0c3fab916f66ff1dc995236a3029d14d4", "size": "613", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "sandbox/src/main/java/ru/pft40/bugHunter/mathematics/Point.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "100585" }, { "name": "PHP", "bytes": "470" } ], "symlink_target": "" }
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>const_buffers_1::const_iterator</title> <link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css"> <meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> <link rel="home" href="../../../boost_asio.html" title="Boost.Asio"> <link rel="up" href="../const_buffers_1.html" title="const_buffers_1"> <link rel="prev" href="const_buffers_1/overload2.html" title="const_buffers_1::const_buffers_1 (2 of 2 overloads)"> <link rel="next" href="end.html" title="const_buffers_1::end"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <table cellpadding="2" width="100%"><tr> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> <td align="center"><a href="../../../../../index.html">Home</a></td> <td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> <td align="center"><a href="../../../../../more/index.htm">More</a></td> </tr></table> <hr> <div class="spirit-nav"> <a accesskey="p" href="const_buffers_1/overload2.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../const_buffers_1.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../boost_asio.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="end.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> </div> <div class="section"> <div class="titlepage"><div><div><h4 class="title"> <a name="boost_asio.reference.const_buffers_1.const_iterator"></a><a class="link" href="const_iterator.html" title="const_buffers_1::const_iterator">const_buffers_1::const_iterator</a> </h4></div></div></div> <p> <a class="indexterm" name="id1328485"></a> A random-access iterator type that may be used to read elements. </p> <pre class="programlisting"><span class="keyword">typedef</span> <span class="keyword">const</span> <span class="identifier">const_buffer</span> <span class="special">*</span> <span class="identifier">const_iterator</span><span class="special">;</span> </pre> <h6> <a name="boost_asio.reference.const_buffers_1.const_iterator.h0"></a> <span><a name="boost_asio.reference.const_buffers_1.const_iterator.requirements"></a></span><a class="link" href="const_iterator.html#boost_asio.reference.const_buffers_1.const_iterator.requirements">Requirements</a> </h6> <p> <span class="bold"><strong>Header: </strong></span><code class="literal">boost/asio/buffer.hpp</code> </p> <p> <span class="bold"><strong>Convenience header: </strong></span><code class="literal">boost/asio.hpp</code> </p> </div> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <td align="left"></td> <td align="right"><div class="copyright-footer">Copyright &#169; 2003-2012 Christopher M. Kohlhoff<p> Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) </p> </div></td> </tr></table> <hr> <div class="spirit-nav"> <a accesskey="p" href="const_buffers_1/overload2.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../const_buffers_1.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../boost_asio.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="end.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> </div> </body> </html>
{ "content_hash": "d9e0e0cb1bf5d3418dcee790934ac3d4", "timestamp": "", "source": "github", "line_count": 60, "max_line_length": 441, "avg_line_length": 66.21666666666667, "alnum_prop": 0.6360432922225019, "repo_name": "djsedulous/namecoind", "id": "87d6dbb57178eaf25551bd51e7e78426e4196045", "size": "3973", "binary": false, "copies": "4", "ref": "refs/heads/master", "path": "libs/boost_1_50_0/doc/html/boost_asio/reference/const_buffers_1/const_iterator.html", "mode": "33261", "license": "mit", "language": [ { "name": "Assembly", "bytes": "843598" }, { "name": "Awk", "bytes": "90447" }, { "name": "C", "bytes": "19896147" }, { "name": "C#", "bytes": "121901" }, { "name": "C++", "bytes": "132199970" }, { "name": "CSS", "bytes": "336528" }, { "name": "Emacs Lisp", "bytes": "1639" }, { "name": "IDL", "bytes": "11976" }, { "name": "Java", "bytes": "3955488" }, { "name": "JavaScript", "bytes": "22346" }, { "name": "Max", "bytes": "36857" }, { "name": "Objective-C", "bytes": "23505" }, { "name": "Objective-C++", "bytes": "2450" }, { "name": "PHP", "bytes": "55712" }, { "name": "Perl", "bytes": "4194947" }, { "name": "Python", "bytes": "761429" }, { "name": "R", "bytes": "4009" }, { "name": "Rebol", "bytes": "354" }, { "name": "Scheme", "bytes": "6073" }, { "name": "Shell", "bytes": "550004" }, { "name": "Tcl", "bytes": "2268735" }, { "name": "TeX", "bytes": "13404" }, { "name": "TypeScript", "bytes": "5318296" }, { "name": "XSLT", "bytes": "757548" }, { "name": "eC", "bytes": "5079" } ], "symlink_target": "" }
ACCEPTED #### According to International Plant Names Index #### Published in null #### Original name null ### Remarks null
{ "content_hash": "86e2e0544aef628423405d431ee711ba", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 31, "avg_line_length": 9.692307692307692, "alnum_prop": 0.7063492063492064, "repo_name": "mdoering/backbone", "id": "945101035ab71e7d4431f1fc295236c36bde11e4", "size": "168", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "life/Plantae/Magnoliophyta/Magnoliopsida/Lamiales/Orobanchaceae/Bartsia/Bartsia viscosa/README.md", "mode": "33188", "license": "apache-2.0", "language": [], "symlink_target": "" }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_151) on Wed Dec 02 13:39:45 MST 2020 --> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Uses of Class org.wildfly.swarm.swagger.webapp.SwaggerWebAppMessages_$logger (BOM: * : All 2.7.1.Final-SNAPSHOT API)</title> <meta name="date" content="2020-12-02"> <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../../../../script.js"></script> </head> <body> <script type="text/javascript"><!-- try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Class org.wildfly.swarm.swagger.webapp.SwaggerWebAppMessages_$logger (BOM: * : All 2.7.1.Final-SNAPSHOT API)"; } } catch(err) { } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar.top"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../../../org/wildfly/swarm/swagger/webapp/SwaggerWebAppMessages_$logger.html" title="class in org.wildfly.swarm.swagger.webapp">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../../../../../../overview-tree.html">Tree</a></li> <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../../index-all.html">Index</a></li> <li><a href="../../../../../../help-doc.html">Help</a></li> </ul> <div class="aboutLanguage">Thorntail API, 2.7.1.Final-SNAPSHOT</div> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../../index.html?org/wildfly/swarm/swagger/webapp/class-use/SwaggerWebAppMessages_$logger.html" target="_top">Frames</a></li> <li><a href="SwaggerWebAppMessages_$logger.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip.navbar.top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <div class="header"> <h2 title="Uses of Class org.wildfly.swarm.swagger.webapp.SwaggerWebAppMessages_$logger" class="title">Uses of Class<br>org.wildfly.swarm.swagger.webapp.SwaggerWebAppMessages_$logger</h2> </div> <div class="classUseContainer">No usage of org.wildfly.swarm.swagger.webapp.SwaggerWebAppMessages_$logger</div> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar.bottom"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../../../org/wildfly/swarm/swagger/webapp/SwaggerWebAppMessages_$logger.html" title="class in org.wildfly.swarm.swagger.webapp">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../../../../../../overview-tree.html">Tree</a></li> <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../../index-all.html">Index</a></li> <li><a href="../../../../../../help-doc.html">Help</a></li> </ul> <div class="aboutLanguage">Thorntail API, 2.7.1.Final-SNAPSHOT</div> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../../index.html?org/wildfly/swarm/swagger/webapp/class-use/SwaggerWebAppMessages_$logger.html" target="_top">Frames</a></li> <li><a href="SwaggerWebAppMessages_$logger.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip.navbar.bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> <p class="legalCopy"><small>Copyright &#169; 2020 <a href="http://www.jboss.org">JBoss by Red Hat</a>. All rights reserved.</small></p> </body> </html>
{ "content_hash": "8db9ab462b897f5f7f78c80b996019e1", "timestamp": "", "source": "github", "line_count": 128, "max_line_length": 187, "avg_line_length": 40.2109375, "alnum_prop": 0.6226928307752089, "repo_name": "wildfly-swarm/wildfly-swarm-javadocs", "id": "8fdf1348f9bd320d369ef569c32f666a99b56fd7", "size": "5147", "binary": false, "copies": "1", "ref": "refs/heads/gh-pages", "path": "2.7.1.Final-SNAPSHOT/apidocs/org/wildfly/swarm/swagger/webapp/class-use/SwaggerWebAppMessages_$logger.html", "mode": "33188", "license": "apache-2.0", "language": [], "symlink_target": "" }
from distutils.core import setup setup( name = 'jpyon', packages = ['jpyon'], # this must be the same as the name above version = '0.5', description = 'Converts objects, lists, and dicts to jsons automatically.', author = 'deeredman1991', author_email = '[email protected]', url = 'https://github.com/deeredman1991/JPyon', # use the URL to the github repo download_url = 'https://github.com/peterldowns/mypackage/tarball/0.1', # I'll explain this in a second keywords = ['json', 'automatic', 'conversion'], # arbitrary keywords classifiers = [], )
{ "content_hash": "1e63e2d6a5c5a2c9b976fdc469abd6fa", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 104, "avg_line_length": 44.07692307692308, "alnum_prop": 0.6980802792321117, "repo_name": "deeredman1991/JPyon", "id": "3e8682b300a12890a87534cb79623486e9dcd5c3", "size": "573", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "setup.py", "mode": "33188", "license": "mit", "language": [ { "name": "Python", "bytes": "25080" } ], "symlink_target": "" }
set -e mkdir -p /var/local/git git clone --recursive /var/local/jenkins/grpc /var/local/git/grpc # copy service account keys if available cp -r /var/local/jenkins/service_account $HOME || true cd /var/local/git/grpc # build C# interop client & server make CONFIG=dbg grpc_csharp_ext (cd src/csharp && mono /var/local/NuGet.exe restore Grpc.sln) (cd src/csharp && xbuild Grpc.sln)
{ "content_hash": "5100b27ab89575e5c3c8bd9c1bbb2aba", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 65, "avg_line_length": 27.428571428571427, "alnum_prop": 0.734375, "repo_name": "miselin/grpc", "id": "dc1f7a331ab0350388e755021d11440b166cf002", "size": "1981", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "tools/dockerfile/grpc_interop_csharp/build_interop.sh", "mode": "33261", "license": "bsd-3-clause", "language": [ { "name": "Batchfile", "bytes": "12656" }, { "name": "C", "bytes": "4911267" }, { "name": "C#", "bytes": "1107955" }, { "name": "C++", "bytes": "1361012" }, { "name": "DTrace", "bytes": "147" }, { "name": "JavaScript", "bytes": "282482" }, { "name": "M4", "bytes": "34062" }, { "name": "Makefile", "bytes": "591839" }, { "name": "Objective-C", "bytes": "274724" }, { "name": "PHP", "bytes": "128996" }, { "name": "Protocol Buffer", "bytes": "102293" }, { "name": "Python", "bytes": "1586857" }, { "name": "Ruby", "bytes": "498986" }, { "name": "Shell", "bytes": "49986" }, { "name": "Swift", "bytes": "5279" } ], "symlink_target": "" }
package jetbrains.jetpad.base.function; public interface Supplier<ValueT> { ValueT get(); }
{ "content_hash": "bc2ab9349928718b3214e3115cf8e008", "timestamp": "", "source": "github", "line_count": 6, "max_line_length": 39, "avg_line_length": 16, "alnum_prop": 0.75, "repo_name": "timzam/jetpad-mapper", "id": "be4ea581c755be1383a68993589f849b1d496036", "size": "697", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "util/base/src/main/java/jetbrains/jetpad/base/function/Supplier.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "863762" } ], "symlink_target": "" }
export default function parseTextUriList(textUriList) { // Lines are terminated with a CRLF pair. textUriList = textUriList.replace(/(?:\r\n|\r|\n)$/, ""); if (textUriList === "") { return []; } return textUriList.split(/(?:\r\n|\r|\n)/).filter(function (line) { // Ignore comments. return line[0] !== "#"; // The remaining non-comment lines will be URIs (URNs or URLs), // encoded according to the URL or URN specifications (RFC2141, // RFC1738 and RFC2396). Each URI shall appear on one and only one // line. Very long URIs are not broken in the text/uri-list format. // Content-transfer-encodings may be used to enforce line length // limitations. }); }
{ "content_hash": "f8af55f74ee9350690aff89637bb975a", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 71, "avg_line_length": 43.75, "alnum_prop": 0.6571428571428571, "repo_name": "Neilos/touch-dnd-custom-events", "id": "670e311edc8e2be2fd2904ec6c92b3186fa805e9", "size": "735", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/parseTextUriList.js", "mode": "33188", "license": "mit", "language": [ { "name": "JavaScript", "bytes": "22280" } ], "symlink_target": "" }
<?php namespace common\models; /** * This is the ActiveQuery class for [[RefMemberType]]. * * @see RefMemberType */ class RefMemberTypeQuery extends \yii\db\ActiveQuery { /*public function active() { return $this->andWhere('[[status]]=1'); }*/ /** * @inheritdoc * @return RefMemberType[]|array */ public function all($db = null) { return parent::all($db); } /** * @inheritdoc * @return RefMemberType|array|null */ public function one($db = null) { return parent::one($db); } }
{ "content_hash": "d920b2996003d35ebae4ea17bd630891", "timestamp": "", "source": "github", "line_count": 34, "max_line_length": 55, "avg_line_length": 17.147058823529413, "alnum_prop": 0.5557461406518011, "repo_name": "spiro-stathakis/projects", "id": "12b770bc964e501ae075e766ebe7c16a5c2e4b0a", "size": "583", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "common/models/RefMemberTypeQuery.php", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "ApacheConf", "bytes": "201" }, { "name": "Batchfile", "bytes": "1541" }, { "name": "CSS", "bytes": "36068" }, { "name": "JavaScript", "bytes": "632845" }, { "name": "PHP", "bytes": "815205" }, { "name": "SQLPL", "bytes": "24096" }, { "name": "Shell", "bytes": "307" } ], "symlink_target": "" }
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 // 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: 2014.05.03 at 03:15:27 PM EDT // package API.amazon.mws.xml.JAXB; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.adapters.NormalizedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element ref="{}Battery" minOccurs="0"/> * &lt;element name="CanShipInOriginalContainer" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/> * &lt;element name="ColorMap" type="{}StringNotNull" minOccurs="0"/> * &lt;element name="IdentityPackageType" minOccurs="0"> * &lt;simpleType> * &lt;restriction base="{}StringNotNull"> * &lt;enumeration value="bulk"/> * &lt;enumeration value="frustration_free"/> * &lt;enumeration value="traditional"/> * &lt;/restriction> * &lt;/simpleType> * &lt;/element> * &lt;element name="Material" type="{}StringNotNull" minOccurs="0"/> * &lt;element name="MoistureNeeds" minOccurs="0"> * &lt;simpleType> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"> * &lt;enumeration value="little-to-no-watering"/> * &lt;enumeration value="moderate-watering"/> * &lt;enumeration value="regular-watering"/> * &lt;enumeration value="constant-watering"/> * &lt;/restriction> * &lt;/simpleType> * &lt;/element> * &lt;element name="PoolType" type="{}StringNotNull" minOccurs="0"/> * &lt;element name="PowerSource" type="{}StringNotNull" minOccurs="0"/> * &lt;element name="Spread" type="{}LengthDimension" minOccurs="0"/> * &lt;element name="SunlightExposure" minOccurs="0"> * &lt;simpleType> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"> * &lt;enumeration value="shade"/> * &lt;enumeration value="partial-shade"/> * &lt;enumeration value="partial-sun"/> * &lt;enumeration value="full-sun"/> * &lt;/restriction> * &lt;/simpleType> * &lt;/element> * &lt;element name="SunsetClimateZone" maxOccurs="24" minOccurs="0"> * &lt;simpleType> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}positiveInteger"> * &lt;minInclusive value="1"/> * &lt;maxInclusive value="24"/> * &lt;/restriction> * &lt;/simpleType> * &lt;/element> * &lt;element name="USDAHardinessZone" maxOccurs="11" minOccurs="0"> * &lt;simpleType> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}positiveInteger"> * &lt;minInclusive value="1"/> * &lt;maxInclusive value="11"/> * &lt;/restriction> * &lt;/simpleType> * &lt;/element> * &lt;element name="VariationData" minOccurs="0"> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="VariationTheme" minOccurs="0"> * &lt;simpleType> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"> * &lt;enumeration value="Size"/> * &lt;enumeration value="Color"/> * &lt;enumeration value="Size-Color"/> * &lt;enumeration value="StyleName"/> * &lt;enumeration value="CustomerPackageType"/> * &lt;enumeration value="ColorName-CustomerPackageType"/> * &lt;enumeration value="SizeName-CustomerPackageType"/> * &lt;enumeration value="SizeName-ColorName-CustomerPackageType"/> * &lt;enumeration value="StyleName-CustomerPackageType"/> * &lt;enumeration value="SizeName-StyleName-CustomerPackageType"/> * &lt;/restriction> * &lt;/simpleType> * &lt;/element> * &lt;element name="Size" type="{}StringNotNull" minOccurs="0"/> * &lt;element name="Color" type="{}StringNotNull" minOccurs="0"/> * &lt;element name="StyleName" type="{}StringNotNull" minOccurs="0"/> * &lt;element name="CustomerPackageType" type="{}StringNotNull" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * &lt;/element> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "battery", "canShipInOriginalContainer", "colorMap", "identityPackageType", "material", "moistureNeeds", "poolType", "powerSource", "spread", "sunlightExposure", "sunsetClimateZone", "usdaHardinessZone", "variationData" }) @XmlRootElement(name = "SeedsAndPlants") public class SeedsAndPlants { @XmlElement(name = "Battery") protected Battery battery; @XmlElement(name = "CanShipInOriginalContainer") protected Boolean canShipInOriginalContainer; @XmlElement(name = "ColorMap") @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String colorMap; @XmlElement(name = "IdentityPackageType") @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String identityPackageType; @XmlElement(name = "Material") @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String material; @XmlElement(name = "MoistureNeeds") protected String moistureNeeds; @XmlElement(name = "PoolType") @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String poolType; @XmlElement(name = "PowerSource") @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String powerSource; @XmlElement(name = "Spread") protected LengthDimension spread; @XmlElement(name = "SunlightExposure") protected String sunlightExposure; @XmlElement(name = "SunsetClimateZone", type = Integer.class) protected List<Integer> sunsetClimateZone; @XmlElement(name = "USDAHardinessZone", type = Integer.class) protected List<Integer> usdaHardinessZone; @XmlElement(name = "VariationData") protected SeedsAndPlants.VariationData variationData; /** * Gets the value of the battery property. * * @return * possible object is * {@link Battery } * */ public Battery getBattery() { return battery; } /** * Sets the value of the battery property. * * @param value * allowed object is * {@link Battery } * */ public void setBattery(Battery value) { this.battery = value; } /** * Gets the value of the canShipInOriginalContainer property. * * @return * possible object is * {@link Boolean } * */ public Boolean isCanShipInOriginalContainer() { return canShipInOriginalContainer; } /** * Sets the value of the canShipInOriginalContainer property. * * @param value * allowed object is * {@link Boolean } * */ public void setCanShipInOriginalContainer(Boolean value) { this.canShipInOriginalContainer = value; } /** * Gets the value of the colorMap property. * * @return * possible object is * {@link String } * */ public String getColorMap() { return colorMap; } /** * Sets the value of the colorMap property. * * @param value * allowed object is * {@link String } * */ public void setColorMap(String value) { this.colorMap = value; } /** * Gets the value of the identityPackageType property. * * @return * possible object is * {@link String } * */ public String getIdentityPackageType() { return identityPackageType; } /** * Sets the value of the identityPackageType property. * * @param value * allowed object is * {@link String } * */ public void setIdentityPackageType(String value) { this.identityPackageType = value; } /** * Gets the value of the material property. * * @return * possible object is * {@link String } * */ public String getMaterial() { return material; } /** * Sets the value of the material property. * * @param value * allowed object is * {@link String } * */ public void setMaterial(String value) { this.material = value; } /** * Gets the value of the moistureNeeds property. * * @return * possible object is * {@link String } * */ public String getMoistureNeeds() { return moistureNeeds; } /** * Sets the value of the moistureNeeds property. * * @param value * allowed object is * {@link String } * */ public void setMoistureNeeds(String value) { this.moistureNeeds = value; } /** * Gets the value of the poolType property. * * @return * possible object is * {@link String } * */ public String getPoolType() { return poolType; } /** * Sets the value of the poolType property. * * @param value * allowed object is * {@link String } * */ public void setPoolType(String value) { this.poolType = value; } /** * Gets the value of the powerSource property. * * @return * possible object is * {@link String } * */ public String getPowerSource() { return powerSource; } /** * Sets the value of the powerSource property. * * @param value * allowed object is * {@link String } * */ public void setPowerSource(String value) { this.powerSource = value; } /** * Gets the value of the spread property. * * @return * possible object is * {@link LengthDimension } * */ public LengthDimension getSpread() { return spread; } /** * Sets the value of the spread property. * * @param value * allowed object is * {@link LengthDimension } * */ public void setSpread(LengthDimension value) { this.spread = value; } /** * Gets the value of the sunlightExposure property. * * @return * possible object is * {@link String } * */ public String getSunlightExposure() { return sunlightExposure; } /** * Sets the value of the sunlightExposure property. * * @param value * allowed object is * {@link String } * */ public void setSunlightExposure(String value) { this.sunlightExposure = value; } /** * Gets the value of the sunsetClimateZone property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the sunsetClimateZone property. * * <p> * For example, to add a new item, do as follows: * <pre> * getSunsetClimateZone().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link Integer } * * */ public List<Integer> getSunsetClimateZone() { if (sunsetClimateZone == null) { sunsetClimateZone = new ArrayList<Integer>(); } return this.sunsetClimateZone; } /** * Gets the value of the usdaHardinessZone property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the usdaHardinessZone property. * * <p> * For example, to add a new item, do as follows: * <pre> * getUSDAHardinessZone().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link Integer } * * */ public List<Integer> getUSDAHardinessZone() { if (usdaHardinessZone == null) { usdaHardinessZone = new ArrayList<Integer>(); } return this.usdaHardinessZone; } /** * Gets the value of the variationData property. * * @return * possible object is * {@link SeedsAndPlants.VariationData } * */ public SeedsAndPlants.VariationData getVariationData() { return variationData; } /** * Sets the value of the variationData property. * * @param value * allowed object is * {@link SeedsAndPlants.VariationData } * */ public void setVariationData(SeedsAndPlants.VariationData value) { this.variationData = value; } /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="VariationTheme" minOccurs="0"> * &lt;simpleType> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"> * &lt;enumeration value="Size"/> * &lt;enumeration value="Color"/> * &lt;enumeration value="Size-Color"/> * &lt;enumeration value="StyleName"/> * &lt;enumeration value="CustomerPackageType"/> * &lt;enumeration value="ColorName-CustomerPackageType"/> * &lt;enumeration value="SizeName-CustomerPackageType"/> * &lt;enumeration value="SizeName-ColorName-CustomerPackageType"/> * &lt;enumeration value="StyleName-CustomerPackageType"/> * &lt;enumeration value="SizeName-StyleName-CustomerPackageType"/> * &lt;/restriction> * &lt;/simpleType> * &lt;/element> * &lt;element name="Size" type="{}StringNotNull" minOccurs="0"/> * &lt;element name="Color" type="{}StringNotNull" minOccurs="0"/> * &lt;element name="StyleName" type="{}StringNotNull" minOccurs="0"/> * &lt;element name="CustomerPackageType" type="{}StringNotNull" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "variationTheme", "size", "color", "styleName", "customerPackageType" }) public static class VariationData { @XmlElement(name = "VariationTheme") protected String variationTheme; @XmlElement(name = "Size") @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String size; @XmlElement(name = "Color") @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String color; @XmlElement(name = "StyleName") @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String styleName; @XmlElement(name = "CustomerPackageType") @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String customerPackageType; /** * Gets the value of the variationTheme property. * * @return * possible object is * {@link String } * */ public String getVariationTheme() { return variationTheme; } /** * Sets the value of the variationTheme property. * * @param value * allowed object is * {@link String } * */ public void setVariationTheme(String value) { this.variationTheme = value; } /** * Gets the value of the size property. * * @return * possible object is * {@link String } * */ public String getSize() { return size; } /** * Sets the value of the size property. * * @param value * allowed object is * {@link String } * */ public void setSize(String value) { this.size = value; } /** * Gets the value of the color property. * * @return * possible object is * {@link String } * */ public String getColor() { return color; } /** * Sets the value of the color property. * * @param value * allowed object is * {@link String } * */ public void setColor(String value) { this.color = value; } /** * Gets the value of the styleName property. * * @return * possible object is * {@link String } * */ public String getStyleName() { return styleName; } /** * Sets the value of the styleName property. * * @param value * allowed object is * {@link String } * */ public void setStyleName(String value) { this.styleName = value; } /** * Gets the value of the customerPackageType property. * * @return * possible object is * {@link String } * */ public String getCustomerPackageType() { return customerPackageType; } /** * Sets the value of the customerPackageType property. * * @param value * allowed object is * {@link String } * */ public void setCustomerPackageType(String value) { this.customerPackageType = value; } } }
{ "content_hash": "65f31fad9d35810e28438c4325ec3a7e", "timestamp": "", "source": "github", "line_count": 681, "max_line_length": 121, "avg_line_length": 29.728340675477238, "alnum_prop": 0.54522104223265, "repo_name": "VDuda/SyncRunner-Pub", "id": "33485f91c6be1697b22893046162e9fbf0655559", "size": "20245", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/API/amazon/mws/xml/JAXB/SeedsAndPlants.java", "mode": "33188", "license": "mit", "language": [ { "name": "Java", "bytes": "11076554" } ], "symlink_target": "" }
class Procedure < ActiveRecord::Base belongs_to :practice_type end
{ "content_hash": "47f6bd155f5e2c2f3d66ae0869a9c7d9", "timestamp": "", "source": "github", "line_count": 3, "max_line_length": 36, "avg_line_length": 23, "alnum_prop": 0.782608695652174, "repo_name": "austin84718/DentalLink-backend-Rails", "id": "3e0f668371081d04db0bda04a8ad51777d7090ed", "size": "69", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "app/models/procedure.rb", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "2647" }, { "name": "CoffeeScript", "bytes": "1266" }, { "name": "JavaScript", "bytes": "599" }, { "name": "Ruby", "bytes": "114999" } ], "symlink_target": "" }
require 'spec_helper' describe Hooksler::Trello do it 'has a version number' do expect(Hooksler::Trello::VERSION).not_to be nil end it 'does something useful' do expect(false).to eq(true) end end
{ "content_hash": "030662e5882d1856e0277ac91eca289d", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 51, "avg_line_length": 19.454545454545453, "alnum_prop": 0.7009345794392523, "repo_name": "hooksler/hooksler-trello", "id": "2e84a1c1ce995caf7322993e29870bc9d2f28afe", "size": "214", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "spec/hooksler/trello_spec.rb", "mode": "33188", "license": "mit", "language": [ { "name": "Ruby", "bytes": "12758" }, { "name": "Shell", "bytes": "115" } ], "symlink_target": "" }
bg: "grails.jpg" layout: page title: "About" crawlertitle: "About Me" permalink: /about/ summary: "Skillsets and work done along with projects" active: about --- ## First of all i made this jekyll theme from ground up not copied i used design inspiration from Hyde and Poole . An Undergraduate Engineering student of [Arya college of Engineering and I.T](http://www.aryacollege.in) , jaipur Learning Web development #Skills - HTML5 - CSS 3 - JAVASCRIPT - JQUERY - BOOTSTRAP v3 , v4 - FOUNDATION - SASS - JEKYLL - RUBYGEMS ( management ) - NODEJS - NPM MODULES SCRIPTING [Projects](https://resume.github.io/?mvmohitverma54) <-- all projects are mentioned in this automated resume generator. You can find the source code for this project at {{site.github_username}} / [jekyll](https://github.com/mvmohitverma54/mvmohitverma54.github.io)
{ "content_hash": "e34cbc9669f55c04131b92a14d61e180", "timestamp": "", "source": "github", "line_count": 29, "max_line_length": 121, "avg_line_length": 29.517241379310345, "alnum_prop": 0.7406542056074766, "repo_name": "mvmohitverma54/mvmohitverma54.github.io", "id": "e69985de77fd214f0978c01c5e70821beb2bc2cb", "size": "860", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "about.md", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "19260" }, { "name": "HTML", "bytes": "39937" }, { "name": "JavaScript", "bytes": "5934" } ], "symlink_target": "" }
function geolocationDemo() { function geoSuccess(position) { var coords = position.coords; var latitude = coords.latitude; var longitude = coords.longitude; var msg = "You are at " + latitude + ", " + longitude; alert(msg); } function geoError(errorObj) { var code = errorObj.code; var msg = errorObj.message; alert("error code " + code + ", error msg: " + msg); } if (typeof navigator.geolocation != "undefined") { navigator.geolocation.getCurrentPosition(geoSuccess, geoError); } else { alert("This browser does not support navigator.geolocation"); } } function colorDemo() { var colorDepth = window.screen.colorDepth; document.bgColor = "red"; alert("colorDepth = " + colorDepth); }
{ "content_hash": "58c42242836bddd4e203209b6ecd9cba", "timestamp": "", "source": "github", "line_count": 27, "max_line_length": 71, "avg_line_length": 29.925925925925927, "alnum_prop": 0.6163366336633663, "repo_name": "clevergump/FrontendNote", "id": "d7b01a7057d4f3e1384d0635aef7f4ec6281c82c", "size": "808", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "demo/Beginning_Js_demo/chapter8/c8.js", "mode": "33188", "license": "mit", "language": [], "symlink_target": "" }
function [ac,bc,cc,dc] = dreg(a,b,c,d,k,l,e,f,g) %DREG Form discrete LQG controller. % % [Ac,Bc,Cc,Dc] = DREG(A,B,C,D,K,L) produces the LQG controller % based on the discrete system (A,B,C,D) with feedback gain matrix, % K, and Kalman gain matrix L, assuming all the inputs of the system % are control inputs and all the outputs of the system are sensor % outputs. The resulting state-space controller is % % xBar[n+1] = [A-ALC-(B-ALD)E(K-KLC)] xBar[n] + [AL-(B-ALD)EKL] y[n] % uHat[n] = [K-KLC+KLDE(K-KLC)] xBar[n] + [KL+KLDEKL] y[n] % % where E=inv(I+KLD) and has control feedback commands uHat as % outputs and sensors y as inputs. The controller should be % connected to the plant using negative feedback. % % [Ac,Bc,Cc,Dc] = DREG(A,B,C,D,K,L,SENSORS,KNOWN,CONTROLS) forms the % LQG controller using the sensors specified by SENSORS, the % additional known inputs specified by KNOWN, and the control inputs % specified by CONTROLS. The resulting system has control feedback % commands as outputs and the known inputs and sensors as inputs. % The KNOWN inputs are non-stochastic inputs of the plant and are % usually additional control inputs or command inputs. % % See also DESTIM, DLQR, DLQE, REG. % Clay M. Thompson 7-2-90 % Copyright (c) 1986-1999 The Mathworks, Inc. All Rights Reserved. % $Revision: 1.4 $ $Date: 1999/01/05 15:22:14 $ if ~((nargin==6)|(nargin==9)), error('Wrong number of input arguments.'); end [msg,a,b,c,d]=abcdchk(a,b,c,d); error(msg); [nx,na] = size(a); [ny,nu] = size(d); if (nargin==6) sensors = [1:ny]; known = []; controls = [1:nu]; end if (nargin==9) sensors = e; known = f; controls = g; end nsens = length(sensors); nknown = length(known); nfb = length(controls); % Check size of K and L with number of states, sensors and controls [nk,mk] = size(k); [nl,ml] = size(l); if (nk~=nfb) error('Number of controls and size of K matrix don''t match.'); end if (mk~=nx) error('The A and K matrices must have the same number of columns.'); end if (ml~=nsens) error('Number of sensors and size of L matrix don''t match.'); end if (nl~=nx) error('The A and L matrices must have the same number of rows.'); end fdbk = [1:nfb] + ny; inputs = [1:nsens] + nu; % --- Form discrete LQG controller --- ac = a; bc = [b,a*l]; cc = [c;k]; dc = [d, zeros(ny,nsens);zeros(nfb,nu), k*l]; % close sensor and internal control feedback loops [ac,bc,cc,dc] = cloop(ac,bc,cc,dc,[fdbk,sensors],-[controls,inputs]); [ac,bc,cc,dc] = ssselect(ac,bc,cc,dc,[known,inputs],fdbk); % end dreg
{ "content_hash": "6cc2b0d5cee1544e00436f6d49e75a1d", "timestamp": "", "source": "github", "line_count": 76, "max_line_length": 72, "avg_line_length": 35.11842105263158, "alnum_prop": 0.6418134132633946, "repo_name": "chaohu/Daily-Learning", "id": "c1f09708cfbdbd24eef3c374de0d1e6f8a16ca2a", "size": "2669", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Matlab/workuse/mytoolbox/others/control/obsolete/dreg.m", "mode": "33188", "license": "mit", "language": [ { "name": "Assembly", "bytes": "71311" }, { "name": "Batchfile", "bytes": "14084" }, { "name": "C", "bytes": "5347170" }, { "name": "C++", "bytes": "271067" }, { "name": "CSS", "bytes": "9367" }, { "name": "Coq", "bytes": "912" }, { "name": "Cuda", "bytes": "5482" }, { "name": "Fortran", "bytes": "22800" }, { "name": "GDB", "bytes": "694" }, { "name": "HTML", "bytes": "1704469" }, { "name": "Java", "bytes": "11327" }, { "name": "JavaScript", "bytes": "273463" }, { "name": "Lex", "bytes": "43111" }, { "name": "Makefile", "bytes": "56238" }, { "name": "Matlab", "bytes": "3277182" }, { "name": "Pascal", "bytes": "16651" }, { "name": "Perl", "bytes": "195471" }, { "name": "Perl 6", "bytes": "24199" }, { "name": "Roff", "bytes": "14151" }, { "name": "Shell", "bytes": "172364" }, { "name": "Tcl", "bytes": "114584" }, { "name": "TeX", "bytes": "48328" }, { "name": "Verilog", "bytes": "256767" }, { "name": "Yacc", "bytes": "98088" } ], "symlink_target": "" }
package ru.job4j.models; public class Bug extends Item { }
{ "content_hash": "9c42b02785e35209719daca23cea34d0", "timestamp": "", "source": "github", "line_count": 5, "max_line_length": 31, "avg_line_length": 12, "alnum_prop": 0.75, "repo_name": "ryslanzaharov/rzaharov", "id": "bc79cb09db6b8c55664137a9d5f7d80c25d67dfe", "size": "60", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "chapter_001/src/main/java/ru/job4j/models/Bug.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "6320" }, { "name": "FreeMarker", "bytes": "14263" }, { "name": "HTML", "bytes": "36373" }, { "name": "Java", "bytes": "677006" }, { "name": "JavaScript", "bytes": "21179" }, { "name": "XSLT", "bytes": "8746" } ], "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("12. SubtractAndMultiplyPolynomials")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("12. SubtractAndMultiplyPolynomials")] [assembly: AssemblyCopyright("Copyright © 2013")] [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("9692d38a-8e9c-417a-a48e-b9d7083d5186")] // 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": "767da04e4dc61fa6cd740283ac72a706", "timestamp": "", "source": "github", "line_count": 36, "max_line_length": 84, "avg_line_length": 40.02777777777778, "alnum_prop": 0.7501734906315058, "repo_name": "vladislav-karamfilov/TelerikAcademy", "id": "e54106fc337ea822f10ac95543f8d93046589acf", "size": "1444", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "C# II Projects/Homework-Methods/12. SubtractAndMultiplyPolynomials/Properties/AssemblyInfo.cs", "mode": "33188", "license": "mit", "language": [ { "name": "ASP", "bytes": "80863" }, { "name": "C#", "bytes": "4381282" }, { "name": "CSS", "bytes": "480577" }, { "name": "JavaScript", "bytes": "6109063" }, { "name": "PHP", "bytes": "34696" }, { "name": "Ruby", "bytes": "960" }, { "name": "Shell", "bytes": "21037" }, { "name": "Smalltalk", "bytes": "79233" }, { "name": "XSLT", "bytes": "4100" } ], "symlink_target": "" }
package com.example.yinlei.coolweather.util; import android.content.Context; import android.content.SharedPreferences; import android.preference.PreferenceManager; import android.text.TextUtils; import com.example.yinlei.coolweather.db.CoolWeatherDB; import com.example.yinlei.coolweather.model.City; import com.example.yinlei.coolweather.model.Country; import com.example.yinlei.coolweather.model.Province; import org.json.JSONObject; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; /** * Created by yinlei on 2015/9/10. */ public class Utility { public synchronized static boolean handleProvincesResponse(CoolWeatherDB coolWeatherDB, String response) { if (!TextUtils.isEmpty(response)) { String[] allProvinces = response.split(","); if (allProvinces != null && allProvinces.length > 0) { for (String p : allProvinces) { String[] array = p.split("\\|"); Province province = new Province(); province.setProvinceCode(array[0]); province.setProvinceName(array[1]); //将解析出来的数据存储到Province表中 coolWeatherDB.saveProvince(province); } return true; } } return false; } /** * * @param coolWeatherDB * @param response * @param provinceId * @return 解析和处理服务器返回的市级数据 */ public static boolean handleCitiesResponse(CoolWeatherDB coolWeatherDB,String response,int provinceId){ if(!TextUtils.isEmpty(response)){ String []allCities = response.split(","); if(allCities != null&& allCities.length > 0){ for (String c:allCities) { String[] array = c.split("\\|"); City city = new City(); city.setCityCode(array[0]); city.setCityName(array[1]); city.setProvinceId(provinceId); //将解析出来的数据存储到city表 coolWeatherDB.saveCity(city); } return true; } } return false; } /** * * @param coolWeatherDB * @param response * @param cityId * @return 解析和处理服务返回的县级数据 */ public static boolean handleCountriesResponse(CoolWeatherDB coolWeatherDB,String response,int cityId){ if(!TextUtils.isEmpty(response)){ String []allCountries = response.split(","); if(allCountries != null&& allCountries.length > 0){ for (String c:allCountries) { String[] array = c.split("\\|"); Country country = new Country(); country.setCountryCode(array[0]); country.setCountryName(array[1]); country.setCityId(cityId); //将解析出来的数据存储到city表 coolWeatherDB.savaCounty(country); } return true; } } return false; } /** * * @param context * @param response 解析服务器返回的JSON数据,并将解析的数据存储到本地 */ public static void handleWeatherResponse(Context context,String response){ try { JSONObject jsonObject = new JSONObject(response); JSONObject weatherInfo = jsonObject.getJSONObject("weatherinfo"); String cityName = weatherInfo.getString("city"); String weatherCode = weatherInfo.getString("cityid"); String temp1 = weatherInfo.getString("temp1"); String temp2 = weatherInfo.getString("temp2"); String weatherDesp = weatherInfo.getString("weather"); String publishTime = weatherInfo.getString("ptime"); saveWeatherInfo(context,cityName,weatherCode,temp1,temp2,weatherDesp,publishTime); } catch (Exception e) { e.printStackTrace(); } } /** * * @param context * @param cityName * @param weatherCode * @param temp1 * @param temp2 * @param weatherDesp * @param publishTime 将服务器返回的所有天气信息存储到SharedPreferences文件中 */ public static void saveWeatherInfo(Context context,String cityName,String weatherCode,String temp1 ,String temp2,String weatherDesp,String publishTime){ SimpleDateFormat sdf = new SimpleDateFormat("yyyy年M月d日", Locale.CHINA); SharedPreferences.Editor editor = PreferenceManager.getDefaultSharedPreferences(context).edit(); editor.putBoolean("city_selected",true); editor.putString("city_name", cityName); editor.putString("weather_code", weatherCode); editor.putString("temp1", temp1); editor.putString("temp2", temp2); editor.putString("weather_desp", weatherDesp); editor.putString("publish_time",publishTime); editor.putString("current_data",sdf.format(new Date())); editor.commit(); } }
{ "content_hash": "501f251ff0fb38958f61a6cc4505c379", "timestamp": "", "source": "github", "line_count": 142, "max_line_length": 110, "avg_line_length": 35.30281690140845, "alnum_prop": 0.5958507879513265, "repo_name": "wuyinlei/coolweather", "id": "422157519e42a139f4b31d6805fdcebdede381f4", "size": "5235", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/main/java/com/example/yinlei/coolweather/util/Utility.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "32729" } ], "symlink_target": "" }
<div class="o-metrics"> <div class="o-metrics__metric"> <div class="o-metrics__group"> <img class="o-metrics__icon" src="images/icon_eye.svg" alt=""> <span class="o-metrics__label">views</span> </div> <span class="o-metrics__number">100</span> </div> <div class="o-metrics__metric"> <div class="o-metrics__group"> <img class="o-metrics__icon" src="images/icon_graph.png" alt=""> <span class="o-metrics__label">downloads</span> </div> <span class="o-metrics__number">50</span> </div> </div>
{ "content_hash": "21d25a912be5dacdc567033c0157c6e7", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 67, "avg_line_length": 32.375, "alnum_prop": 0.6332046332046332, "repo_name": "CDLUC3/stash_engine", "id": "f88aa39aa8b49b672c719c7ca3d4883e20cfbfd5", "size": "519", "binary": false, "copies": "1", "ref": "refs/heads/development", "path": "ui-library/includes/metrics.html", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "2203718" }, { "name": "HTML", "bytes": "898777" }, { "name": "JavaScript", "bytes": "213899" }, { "name": "Ruby", "bytes": "176676" }, { "name": "Shell", "bytes": "366" } ], "symlink_target": "" }
/* global console, require */ var opcua = require("node-opcua"); var server = new opcua.OPCUAServer({ port: 4334 // the port of the listening socket of the server }); function post_initialize() { var myDevice = server.engine.addFolder("RootFolder",{ browseName: "MyDevice"}); var method = server.engine.addMethod(myDevice,{ browseName: "Bark", inputArguments: [{ name:"nbBarks", description: { text: "specifies the number of time I should bark" }, dataType: opcua.DataType.UInt32 },{ name:"volume", description: { text: "specifies the sound volume [0 = quiet ,100 = loud]" }, dataType: opcua.DataType.UInt32 }], outputArguments: [{ name:"Barks", description:{ text: "the generated barks" }, dataType: opcua.DataType.String , valueRank: 1 }] }); server.engine.bindMethod(method.nodeId,function(inputArguments,context,callback) { var nbBarks = inputArguments[0].value; var volume = inputArguments[1].value; console.log("Hello World ! I will bark ",nbBarks," times"); console.log("the requested volume is ",volume,""); var sound_volume = Array(volume).join("!"); var barks = []; for(var i=0;i<nbBarks;i++){ barks.push("Whaff" + sound_volume);} var callMethodResult = { statusCode: opcua.StatusCodes.Good, outputArguments: [{ dataType: opcua.DataType.String, arrayType: opcua.VariantArrayType.Array, value :barks }] }; callback(null,callMethodResult); }); } server.initialize(post_initialize); server.start(function() { console.log("Server is now listening ... ( press CTRL+C to stop)"); });
{ "content_hash": "b30b42bbbbdc9e0040e17719b0f57cc2", "timestamp": "", "source": "github", "line_count": 64, "max_line_length": 91, "avg_line_length": 30.015625, "alnum_prop": 0.5622071837584591, "repo_name": "jcodling/node-OPC-UA-server", "id": "b2e9a5e4fff894ab82fce625a8b4de23cea88a24", "size": "1921", "binary": false, "copies": "4", "ref": "refs/heads/master", "path": "documentation/server_with_method.js", "mode": "33188", "license": "mit", "language": [ { "name": "Batchfile", "bytes": "473" }, { "name": "JavaScript", "bytes": "3105003" }, { "name": "Makefile", "bytes": "1507" } ], "symlink_target": "" }
function custom_plugin_view_generic_graph(graphinfo) { if(graphinfo['show_html_legend']) { $('<h1>Collectd source '+graphinfo['cdsrc']+' </h1>').appendTo('div[pwtabid="'+graphinfo['pwtabid']+'"] div div[class="graphcontainer"]'); } $('<img class="graph" id="graph_'+graphinfo['pwtabid']+'_'+graphinfo['graphid']+'" zone="tab"/><br/>').appendTo('div[pwtabid="'+graphinfo['pwtabid']+'"] div div[class="graphcontainer"]'); $('#graph_'+graphinfo['pwtabid']+'_'+graphinfo['graphid']).pwgraph({ cdsrc: graphinfo['cdsrc'], host: graphinfo['host'], plugin: graphinfo['plugin'], plugin_instance: graphinfo['plugin_instance'], type: graphinfo['type'], type_instance: graphinfo['type_instance'] }).pwgraph('display'); } function custom_plugin_view_generic(pwtabid, plugin, options) { var selector0_legend = 'Select Collectd source(s)'; var selector1_legend = ''; var selector2_legend = ''; var selector3_legend = ''; var selector0_select = 'select[pwtabid="'+pwtabid+'"][part="cdsrc"]'; var selector1_select = 'select[pwtabid="'+pwtabid+'"][part="plugin_instance"]'; var selector2_select = 'select[pwtabid="'+pwtabid+'"][part="type"]'; var selector3_select = 'select[pwtabid="'+pwtabid+'"][part="type_instance"]'; var cdsrc_list = new Array(); var pi_list = new Array(); var t_list = new Array(); var ti_list = new Array(); var selector0_show = 0; var selector1_show = 0; var selector2_show = 0; var selector3_show = 0; var show_html_legend_per_graph = 0; var graph_function = custom_plugin_view_generic_graph; var switch_plugin_type_for_collectdv4_check = 0; var switch_plugin_type_for_collectdv4_needed = false; /* * if(!switch_plugin_type_for_collectdv4_needed) { * normal mode * } else { * move ti to pi. * So plugin instance is '_' and selector 1 contains ti list instead of pi list. * } */ if(options['switch_plugin_type_for_collectdv4']) { switch_plugin_type_for_collectdv4_check = options['switch_plugin_type_for_collectdv4']; } if(options['selector0_legend']) { selector0_legend = options['selector0_legend']; } if(options['selector1_legend']) { selector1_legend = options['selector1_legend']; } if(options['selector2_legend']) { selector2_legend = options['selector2_legend']; } if(options['selector3_legend']) { selector3_legend = options['selector3_legend']; } if(options['graph_function']) { graph_function = options['graph_function']; } if((! (typeof json_item_datas['aggregators'] === 'undefined')) && json_item_datas['aggregators']) { $.each(json_item_datas['aggregators'], function (cdsrc, aggregator_plugins) { $.each(aggregator_plugins, function (current_plugin, current_plugin_instance) { if(current_plugin == plugin) { $.each(current_plugin_instance, function (plugin_instance_name, plugin_instance) { $.each(plugin_instance, function (type_name, type) { show_html_legend_per_graph = 1; if ($.inArray(cdsrc, cdsrc_list) == -1) { cdsrc_list.push(cdsrc); } if ($.inArray(plugin_instance_name, pi_list) == -1) { pi_list.push(plugin_instance_name); } if ($.inArray(type_name, t_list) == -1) { t_list.push(type_name); } $.each(type, function (type_instance_name, type_instance) { if ($.inArray(type_instance_name, ti_list) == -1) { ti_list.push(type_instance_name); } }); }); }); } }); }); } if((! (typeof json_item_datas['plugins'][plugin] === 'undefined')) && json_item_datas['plugins'][plugin]) { $.each(json_item_datas['plugins'][plugin], function (plugin_instance_name, plugin_instance) { $.each(plugin_instance, function (type_name, type) { if ($.inArray(json_item_datas['config']['CdSrc']['source'], cdsrc_list) == -1) { cdsrc_list.push(json_item_datas['config']['CdSrc']['source']); } if ($.inArray(plugin_instance_name, pi_list) == -1) { pi_list.push(plugin_instance_name); } if ($.inArray(type_name, t_list) == -1) { t_list.push(type_name); } $.each(type, function (type_instance_name, type_instance) { if ($.inArray(type_instance_name, ti_list) == -1) { ti_list.push(type_instance_name); } }); }); }); } $.each(pi_list, function (i, pi) { if (switch_plugin_type_for_collectdv4_check && pi == '_' && pi_list.length == 1) { switch_plugin_type_for_collectdv4_needed = true; } }); $.each(cdsrc_list, function (i, cdsrc) { var option = document.createElement('option'); var value = new Array(cdsrc); var ht = cdsrc; if(options['selector0_legend_function']) { ht = options['selector0_legend_function'](ht); } option.innerHTML = ht; $(option).data(value); $(option).appendTo(selector0_select); }); if(!switch_plugin_type_for_collectdv4_needed) { $.each(pi_list, function (i, pi) { var option = document.createElement('option'); var value = new Array(pi); var ht = pi; if(options['selector1_legend_function']) { ht = options['selector1_legend_function'](ht); } option.innerHTML = ht; $(option).data(value); $(option).appendTo(selector1_select); }); } $.each(t_list, function (i, t) { var option = document.createElement('option'); var value = new Array(t); var ht = t; if(options['selector2_legend_function']) { ht = options['selector2_legend_function'](ht); } option.innerHTML = ht; $(option).data(value); $(option).appendTo(selector2_select); }); $.each(ti_list, function (i, ti) { var option = document.createElement('option'); var value = new Array(ti); var ht = ti; if(options['selector3_legend_function']) { ht = options['selector3_legend_function'](ht); } option.innerHTML = ht; $(option).data(value); if(!switch_plugin_type_for_collectdv4_needed) { $(option).appendTo(selector3_select); } else { $(option).appendTo(selector1_select); } }); $(selector0_select).multiselect({ noneSelectedText: selector0_legend, selectedList: 0 }).multiselectfilter(); $(selector1_select).multiselect({ noneSelectedText: selector1_legend, selectedList: 0 }).multiselectfilter(); $(selector2_select).multiselect({ noneSelectedText: selector2_legend, selectedList: 0 }).multiselectfilter(); $(selector3_select).multiselect({ noneSelectedText: selector3_legend, selectedList: 0 }).multiselectfilter(); if(cdsrc_list.length > 1) { selector0_show = 1; } else { $(selector0_select).remove(); } if(t_list.length > 1) { selector2_show = 1; } else { $(selector2_select).remove(); } if(!switch_plugin_type_for_collectdv4_needed) { if(pi_list.length > 1) { selector1_show = 1; } else { $(selector1_select).remove(); } if(ti_list.length > 1) { selector3_show = 1; } else { $(selector3_select).remove(); } } else { if(ti_list.length > 1) { selector1_show = 1; } else { $(selector1_select).remove(); } $(selector3_select).remove(); } var input_selector = 'input[pwtabid='+pwtabid+']'; $(input_selector) .button() .click(function () { $('div[pwtabid="'+pwtabid+'"] div div[class="graphcontainer"]').html(''); var cdsrc_list_selected = new Array(); var pi_list_selected = new Array(); var t_list_selected = new Array(); var ti_list_selected = new Array(); if(selector0_show) { $(selector0_select+' option:selected').each(function() { cdsrc_list_selected.push($(this).data()[0]); }); } else { cdsrc_list_selected = cdsrc_list; } if(selector1_legend != '' && selector1_show) { $(selector1_select+' option:selected').each(function() { pi_list_selected.push($(this).data()[0]); }); } else { if(!switch_plugin_type_for_collectdv4_needed) { pi_list_selected = pi_list; } else { pi_list_selected = ti_list; } } if(selector2_legend != '' && selector2_show) { $(selector2_select+' option:selected').each(function() { t_list_selected.push($(this).data()[0]); }); } else { t_list_selected = t_list; } if(!switch_plugin_type_for_collectdv4_needed) { if(selector3_legend != '' && selector3_show) { $(selector3_select+' option:selected').each(function() { ti_list_selected.push($(this).data()[0]); }); } else { ti_list_selected = ti_list; } } if(pi_list_selected.length == 0) { pi_list_selected.push(''); } if(t_list_selected.length == 0) { t_list_selected.push(''); } if(ti_list_selected.length == 0) { ti_list_selected.push(''); } $(cdsrc_list_selected).each(function(i, cdsrc) { $(pi_list_selected).each(function(i, pi) { $(t_list_selected).each(function(i, t) { $(ti_list_selected).each(function(i, ti) { graphid++; var graphinfo = { show_html_legend: show_html_legend_per_graph, pwtabid: pwtabid, graphid: graphid, cdsrc: cdsrc, host: json_item_datas['host'], plugin: plugin, plugin_instance: (!switch_plugin_type_for_collectdv4_needed)?pi:'', type: t, type_instance: (!switch_plugin_type_for_collectdv4_needed)?ti:pi }; graph_function(graphinfo); }); }); }); }); }); } function custom_plugin_view_generic_one_selector(pwtabid, plugin, options) { var selector0_legend = 'Select Collectd source(s)'; var selector1_legend = ''; var selector0_select = 'select[pwtabid="'+pwtabid+'"][part="cdsrc"]'; var selector1_select = 'select[pwtabid="'+pwtabid+'"][part="plugin_filter"]'; var cdsrc_list = new Array(); var selector0_show = 0; var selector1_show = 0; var show_html_legend_per_graph = 0; var graph_function = custom_plugin_view_generic_graph; if(options['selector0_legend']) { selector0_legend = options['selector0_legend']; } if(options['selector1_legend']) { selector1_legend = options['selector1_legend']; } if(options['graph_function']) { graph_function = options['graph_function']; } if((! (typeof json_item_datas['aggregators'] === 'undefined')) && json_item_datas['aggregators']) { $.each(json_item_datas['aggregators'], function (cdsrc, aggregator_plugins) { $.each(aggregator_plugins, function (current_plugin, current_plugin_instance) { if(current_plugin == plugin) { $.each(current_plugin_instance, function (plugin_instance_name, plugin_instance) { $.each(plugin_instance, function (type_name, type) { $.each(type, function (type_instance_name, type_instance) { if ($.inArray(cdsrc, cdsrc_list) == -1) { cdsrc_list.push(cdsrc); } var option = document.createElement('option'); var value = new Array(cdsrc, plugin, plugin_instance_name, type_name, type_instance_name); var ht = plugin_instance_name+'-'+type_instance_name; show_html_legend_per_graph = 1; if(options['selector1_legend_function']) { ht = options['selector1_legend_function'](value); } option.innerHTML = ht; $(option).data(value); $(option).appendTo(selector1_select); }); }); }); } }); }); } if((! (typeof json_item_datas['plugins'][plugin] === 'undefined')) && json_item_datas['plugins'][plugin]) { cdsrc_list.push(json_item_datas['config']['CdSrc']['source']); $.each(json_item_datas['plugins'][plugin], function (plugin_instance_name, plugin_instance) { $.each(plugin_instance, function (type_name, type) { $.each(type, function (type_instance_name, type_instance) { var option = document.createElement('option'); var value = new Array(json_item_datas['config']['CdSrc']['source'], plugin, plugin_instance_name, type_name, type_instance_name); var ht = plugin_instance_name+'-'+type_instance_name; if(options['selector1_legend_function']) { ht = options['selector1_legend_function'](value); } option.innerHTML = ht; $(option).data(value); $(option).appendTo(selector1_select); }); }); }); } $.each(cdsrc_list, function (i, cdsrc) { var option = document.createElement('option'); var value = new Array(cdsrc); var ht = cdsrc; if(options['selector0_legend_function']) { ht = options['selector0_legend_function'](ht); } option.innerHTML = ht; $(option).data(value); $(option).appendTo(selector0_select); }); $(selector0_select).multiselect({ noneSelectedText: selector0_legend, selectedList: 0 }).multiselectfilter(); $(selector1_select).multiselect({ noneSelectedText: selector1_legend, selectedList: 0 }).multiselectfilter(); if(cdsrc_list.length > 1) { selector0_show = 1; } else { $(selector0_select).remove(); } selector1_show = 1; var input_selector = 'input[pwtabid='+pwtabid+']'; $(input_selector) .button() .click(function () { $('div[pwtabid="'+pwtabid+'"] div div[class="graphcontainer"]').html(''); var cdsrc_list_selected = new Array(); if(selector0_show) { $(selector0_select+' option:selected').each(function() { cdsrc_list_selected.push($(this).data()[0]); }); } else { cdsrc_list_selected = cdsrc_list; } $(cdsrc_list_selected).each(function(i, cdsrc) { $(selector1_select+' option:selected').each(function() { graphid++; var graphinfo = { show_html_legend: show_html_legend_per_graph, pwtabid: pwtabid, graphid: graphid, cdsrc: $(this).data()[0], host: json_item_datas['host'], plugin: $(this).data()[1], plugin_instance: $(this).data()[2], type: $(this).data()[3], type_instance: $(this).data()[4] }; graph_function(graphinfo); }); }); }); } function cpu_plugin_view(pwtabid, plugin) { $.ajax({ async : true, type: 'GET', url: 'html/cpu_plugin_view.html', complete : function (r) { if(r.status) { ich.addTemplate('cpu_plugin_view', r.responseText); ich.cpu_plugin_view({ pwtabid: pwtabid, plugin: plugin }).appendTo('div[pwtabid="'+pwtabid+'"]'); } } }); } function df_plugin_view(pwtabid, plugin) { $.ajax({ async : true, type: 'GET', url: 'html/df_plugin_view.html', complete : function (r) { if(r.status) { ich.addTemplate('df_plugin_view', r.responseText); ich.df_plugin_view({ pwtabid: pwtabid, plugin: plugin }).appendTo('div[pwtabid="'+pwtabid+'"]'); } } }); } function disk_plugin_view(pwtabid, plugin) { $.ajax({ async : true, type: 'GET', url: 'html/disk_plugin_view.html', complete : function (r) { if(r.status) { ich.addTemplate('disk_plugin_view', r.responseText); ich.disk_plugin_view({ pwtabid: pwtabid, plugin: plugin }).appendTo('div[pwtabid="'+pwtabid+'"]'); } } }); } function interface_plugin_view(pwtabid, plugin) { $.ajax({ async : true, type: 'GET', url: 'html/interface_plugin_view.html', complete : function (r) { if(r.status) { ich.addTemplate('interface_plugin_view', r.responseText); ich.interface_plugin_view({ pwtabid: pwtabid, plugin: plugin }).appendTo('div[pwtabid="'+pwtabid+'"]'); } } }); } function disk_plugin_view(pwtabid, plugin) { $.ajax({ async : true, type: 'GET', url: 'html/disk_plugin_view.html', complete : function (r) { if(r.status) { ich.addTemplate('disk_plugin_view', r.responseText); ich.disk_plugin_view({ pwtabid: pwtabid, plugin: plugin }).appendTo('div[pwtabid="'+pwtabid+'"]'); } } }); } function processes_plugin_view(pwtabid, plugin) { $.ajax({ async : true, type: 'GET', url: 'html/processes_plugin_view.html', complete : function (r) { if(r.status) { ich.addTemplate('processes_plugin_view', r.responseText); ich.processes_plugin_view({ pwtabid: pwtabid, plugin: plugin }).appendTo('div[pwtabid="'+pwtabid+'"]'); } } }); } function protocols_plugin_view(pwtabid, plugin) { $.ajax({ async : true, type: 'GET', url: 'html/protocols_plugin_view.html', complete : function (r) { if(r.status) { ich.addTemplate('protocols_plugin_view', r.responseText); ich.protocols_plugin_view({ pwtabid: pwtabid, plugin: plugin }).appendTo('div[pwtabid="'+pwtabid+'"]'); } } }); } function tcpconns_plugin_view(pwtabid, plugin) { $.ajax({ async : true, type: 'GET', url: 'html/tcpconns_plugin_view.html', complete : function (r) { if(r.status) { ich.addTemplate('tcpconns_plugin_view', r.responseText); ich.tcpconns_plugin_view({ pwtabid: pwtabid, plugin: plugin }).appendTo('div[pwtabid="'+pwtabid+'"]'); } } }); } function vmem_plugin_view(pwtabid, plugin) { $.ajax({ async : true, type: 'GET', url: 'html/vmem_plugin_view.html', complete : function (r) { if(r.status) { ich.addTemplate('vmem_plugin_view', r.responseText); ich.vmem_plugin_view({ pwtabid: pwtabid, plugin: plugin }).appendTo('div[pwtabid="'+pwtabid+'"]'); } } }); } function win32_process_plugin_view(pwtabid, plugin) { $.ajax({ async : true, type: 'GET', url: 'html/win32_process_plugin_view.html', complete : function (r) { if(r.status) { ich.addTemplate('win32_process_plugin_view', r.responseText); ich.win32_process_plugin_view({ pwtabid: pwtabid, plugin: plugin }).appendTo('div[pwtabid="'+pwtabid+'"]'); } } }); } // vim: set filetype=javascript fdm=marker sw=4 ts=4 et:
{ "content_hash": "657e1c41f9f7118281f7525120ad6abe", "timestamp": "", "source": "github", "line_count": 459, "max_line_length": 191, "avg_line_length": 42.26143790849673, "alnum_prop": 0.5570161872357975, "repo_name": "perfwatcher/perfwatcher", "id": "e8d7d9e100fb38f192f5c1a56371e712237ef96d", "size": "20784", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "js/custom_plugin_view.js", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "30263" }, { "name": "HTML", "bytes": "75625" }, { "name": "JavaScript", "bytes": "139531" }, { "name": "PHP", "bytes": "324448" }, { "name": "Shell", "bytes": "2899" } ], "symlink_target": "" }
<!doctype html> <html class="default no-js"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>PeriodType | The Traveler</title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="../assets/css/main.css"> </head> <body> <header> <div class="tsd-page-toolbar"> <div class="container"> <div class="table-wrap"> <div class="table-cell" id="tsd-search" data-index="../assets/js/search.js" data-base=".."> <div class="field"> <label for="tsd-search-field" class="tsd-widget search no-caption">Search</label> <input id="tsd-search-field" type="text" /> </div> <ul class="results"> <li class="state loading">Preparing search index...</li> <li class="state failure">The search index is not available</li> </ul> <a href="../index.html" class="title">The Traveler</a> </div> <div class="table-cell" id="tsd-widgets"> <div id="tsd-filter"> <a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a> <div class="tsd-filter-group"> <div class="tsd-select" id="tsd-filter-visibility"> <span class="tsd-select-label">All</span> <ul class="tsd-select-list"> <li data-value="public">Public</li> <li data-value="protected">Public/Protected</li> <li data-value="private" class="selected">All</li> </ul> </div> <input type="checkbox" id="tsd-filter-inherited" checked /> <label class="tsd-widget" for="tsd-filter-inherited">Inherited</label> <input type="checkbox" id="tsd-filter-externals" checked /> <label class="tsd-widget" for="tsd-filter-externals">Externals</label> <input type="checkbox" id="tsd-filter-only-exported" /> <label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label> </div> </div> <a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a> </div> </div> </div> </div> <div class="tsd-page-title"> <div class="container"> <ul class="tsd-breadcrumb"> <li> <a href="../globals.html">Globals</a> </li> <li> <a href="periodtype.html">PeriodType</a> </li> </ul> <h1>Enumeration PeriodType</h1> </div> </div> </header> <div class="container container-main"> <div class="row"> <div class="col-8 col-content"> <section class="tsd-panel-group tsd-index-group"> <h2>Index</h2> <section class="tsd-panel tsd-index-panel"> <div class="tsd-index-content"> <section class="tsd-index-section tsd-is-external"> <h3>Enumeration members</h3> <ul class="tsd-index-list"> <li class="tsd-kind-enum-member tsd-parent-kind-enum tsd-is-external"><a href="periodtype.html#activity" class="tsd-kind-icon">Activity</a></li> <li class="tsd-kind-enum-member tsd-parent-kind-enum tsd-is-external"><a href="periodtype.html#alltime" class="tsd-kind-icon">All<wbr>Time</a></li> <li class="tsd-kind-enum-member tsd-parent-kind-enum tsd-is-external"><a href="periodtype.html#daily" class="tsd-kind-icon">Daily</a></li> <li class="tsd-kind-enum-member tsd-parent-kind-enum tsd-is-external"><a href="periodtype.html#none" class="tsd-kind-icon">None</a></li> </ul> </section> </div> </section> </section> <section class="tsd-panel-group tsd-member-group tsd-is-external"> <h2>Enumeration members</h2> <section class="tsd-panel tsd-member tsd-kind-enum-member tsd-parent-kind-enum tsd-is-external"> <a name="activity" class="tsd-anchor"></a> <h3>Activity</h3> <div class="tsd-signature tsd-kind-icon">Activity<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol"> =&nbsp;3</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/alexanderwe/the-traveler/blob/bfd7db0/src/type-definitions/destiny2/interfaces.ts#L7151">type-definitions/destiny2/interfaces.ts:7151</a></li> </ul> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-enum-member tsd-parent-kind-enum tsd-is-external"> <a name="alltime" class="tsd-anchor"></a> <h3>All<wbr>Time</h3> <div class="tsd-signature tsd-kind-icon">All<wbr>Time<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol"> =&nbsp;2</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/alexanderwe/the-traveler/blob/bfd7db0/src/type-definitions/destiny2/interfaces.ts#L7150">type-definitions/destiny2/interfaces.ts:7150</a></li> </ul> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-enum-member tsd-parent-kind-enum tsd-is-external"> <a name="daily" class="tsd-anchor"></a> <h3>Daily</h3> <div class="tsd-signature tsd-kind-icon">Daily<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol"> =&nbsp;1</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/alexanderwe/the-traveler/blob/bfd7db0/src/type-definitions/destiny2/interfaces.ts#L7149">type-definitions/destiny2/interfaces.ts:7149</a></li> </ul> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-enum-member tsd-parent-kind-enum tsd-is-external"> <a name="none" class="tsd-anchor"></a> <h3>None</h3> <div class="tsd-signature tsd-kind-icon">None<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol"> =&nbsp;0</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/alexanderwe/the-traveler/blob/bfd7db0/src/type-definitions/destiny2/interfaces.ts#L7148">type-definitions/destiny2/interfaces.ts:7148</a></li> </ul> </aside> </section> </section> </div> <div class="col-4 col-menu menu-sticky-wrap menu-highlight"> <nav class="tsd-navigation primary"> <ul> <li class="globals "> <a href="../globals.html"><em>Globals</em></a> </li> </ul> </nav> <nav class="tsd-navigation secondary menu-sticky"> <ul class="before-current"> </ul> <ul class="current"> <li class="current tsd-kind-enum tsd-is-external"> <a href="periodtype.html" class="tsd-kind-icon">Period<wbr>Type</a> <ul> <li class=" tsd-kind-enum-member tsd-parent-kind-enum tsd-is-external"> <a href="periodtype.html#activity" class="tsd-kind-icon">Activity</a> </li> <li class=" tsd-kind-enum-member tsd-parent-kind-enum tsd-is-external"> <a href="periodtype.html#alltime" class="tsd-kind-icon">All<wbr>Time</a> </li> <li class=" tsd-kind-enum-member tsd-parent-kind-enum tsd-is-external"> <a href="periodtype.html#daily" class="tsd-kind-icon">Daily</a> </li> <li class=" tsd-kind-enum-member tsd-parent-kind-enum tsd-is-external"> <a href="periodtype.html#none" class="tsd-kind-icon">None</a> </li> </ul> </li> </ul> <ul class="after-current"> </ul> </nav> </div> </div> </div> <footer> <div class="container"> <h2>Legend</h2> <div class="tsd-legend-group"> <ul class="tsd-legend"> <li class="tsd-kind-module"><span class="tsd-kind-icon">Module</span></li> <li class="tsd-kind-object-literal"><span class="tsd-kind-icon">Object literal</span></li> <li class="tsd-kind-variable"><span class="tsd-kind-icon">Variable</span></li> <li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li> <li class="tsd-kind-function tsd-has-type-parameter"><span class="tsd-kind-icon">Function with type parameter</span></li> <li class="tsd-kind-index-signature"><span class="tsd-kind-icon">Index signature</span></li> <li class="tsd-kind-type-alias"><span class="tsd-kind-icon">Type alias</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-enum"><span class="tsd-kind-icon">Enumeration</span></li> <li class="tsd-kind-enum-member"><span class="tsd-kind-icon">Enumeration member</span></li> <li class="tsd-kind-property tsd-parent-kind-enum"><span class="tsd-kind-icon">Property</span></li> <li class="tsd-kind-method tsd-parent-kind-enum"><span class="tsd-kind-icon">Method</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-interface"><span class="tsd-kind-icon">Interface</span></li> <li class="tsd-kind-interface tsd-has-type-parameter"><span class="tsd-kind-icon">Interface with type parameter</span></li> <li class="tsd-kind-constructor tsd-parent-kind-interface"><span class="tsd-kind-icon">Constructor</span></li> <li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li> <li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li> <li class="tsd-kind-index-signature tsd-parent-kind-interface"><span class="tsd-kind-icon">Index signature</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-class"><span class="tsd-kind-icon">Class</span></li> <li class="tsd-kind-class tsd-has-type-parameter"><span class="tsd-kind-icon">Class with type parameter</span></li> <li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li> <li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li> <li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li> <li class="tsd-kind-accessor tsd-parent-kind-class"><span class="tsd-kind-icon">Accessor</span></li> <li class="tsd-kind-index-signature tsd-parent-kind-class"><span class="tsd-kind-icon">Index signature</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited constructor</span></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li> <li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited accessor</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected property</span></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li> <li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected accessor</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private method</span></li> <li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private accessor</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li> <li class="tsd-kind-call-signature tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li> </ul> </div> </div> </footer> <div class="overlay"></div> <script src="../assets/js/main.js"></script> <script>if (location.protocol == 'file:') document.write('<script src="../assets/js/search.js"><' + '/script>');</script> </body> </html>
{ "content_hash": "a3e97a061ff143d06c4f686d4879d488", "timestamp": "", "source": "github", "line_count": 228, "max_line_length": 192, "avg_line_length": 51.82017543859649, "alnum_prop": 0.6593313584426577, "repo_name": "alexanderwe/the-traveler", "id": "f907e23dceca37cd02602dce8d1f3510253d28f0", "size": "11815", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "docs/enums/periodtype.html", "mode": "33188", "license": "mit", "language": [ { "name": "JavaScript", "bytes": "298" }, { "name": "TypeScript", "bytes": "690965" } ], "symlink_target": "" }
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_UTIL_H #define BITCOIN_UTIL_H #include "uint256.h" #include <stdarg.h> #ifndef WIN32 #include <sys/types.h> #include <sys/time.h> #include <sys/resource.h> #else typedef int pid_t; /* define for Windows compatibility */ #endif #include <map> #include <list> #include <utility> #include <vector> #include <string> #include <boost/version.hpp> #include <boost/thread.hpp> #include <boost/filesystem.hpp> #include <boost/filesystem/path.hpp> #include <boost/date_time/gregorian/gregorian_types.hpp> #include <boost/date_time/posix_time/posix_time_types.hpp> #include "netbase.h" // for AddTimeData typedef long long int64; typedef unsigned long long uint64; static const int64 COIN = 100000000; static const int64 CENT = 1000000; //#define loop for (;;) #define BEGIN(a) ((char*)&(a)) #define END(a) ((char*)&((&(a))[1])) #define UBEGIN(a) ((unsigned char*)&(a)) #define UEND(a) ((unsigned char*)&((&(a))[1])) #define ARRAYLEN(array) (sizeof(array)/sizeof((array)[0])) #ifndef PRI64d #if defined(_MSC_VER) || defined(__MSVCRT__) #define PRI64d "I64d" #define PRI64u "I64u" #define PRI64x "I64x" #else #define PRI64d "lld" #define PRI64u "llu" #define PRI64x "llx" #endif #endif /* Format characters for (s)size_t and ptrdiff_t */ #if defined(_MSC_VER) || defined(__MSVCRT__) /* (s)size_t and ptrdiff_t have the same size specifier in MSVC: http://msdn.microsoft.com/en-us/library/tcxf1dw6%28v=vs.100%29.aspx */ #define PRIszx "Ix" #define PRIszu "Iu" #define PRIszd "Id" #define PRIpdx "Ix" #define PRIpdu "Iu" #define PRIpdd "Id" #else /* C99 standard */ #define PRIszx "zx" #define PRIszu "zu" #define PRIszd "zd" #define PRIpdx "tx" #define PRIpdu "tu" #define PRIpdd "td" #endif // This is needed because the foreach macro can't get over the comma in pair<t1, t2> #define PAIRTYPE(t1, t2) std::pair<t1, t2> // Align by increasing pointer, must have extra space at end of buffer template <size_t nBytes, typename T> T* alignup(T* p) { union { T* ptr; size_t n; } u; u.ptr = p; u.n = (u.n + (nBytes-1)) & ~(nBytes-1); return u.ptr; } #ifdef WIN32 #define MSG_NOSIGNAL 0 #define MSG_DONTWAIT 0 #ifndef S_IRUSR #define S_IRUSR 0400 #define S_IWUSR 0200 #endif #else #define MAX_PATH 1024 #endif inline void MilliSleep(int64 n) { // Boost's sleep_for was uninterruptable when backed by nanosleep from 1.50 // until fixed in 1.52. Use the deprecated sleep method for the broken case. // See: https://svn.boost.org/trac/boost/ticket/7238 #if BOOST_VERSION >= 105000 && (!defined(BOOST_HAS_NANOSLEEP) || BOOST_VERSION >= 105200) boost::this_thread::sleep_for(boost::chrono::milliseconds(n)); #else boost::this_thread::sleep(boost::posix_time::milliseconds(n)); #endif } /* This GNU C extension enables the compiler to check the format string against the parameters provided. * X is the number of the "format string" parameter, and Y is the number of the first variadic parameter. * Parameters count from 1. */ #ifdef __GNUC__ #define ATTR_WARN_PRINTF(X,Y) __attribute__((format(printf,X,Y))) #else #define ATTR_WARN_PRINTF(X,Y) #endif extern std::map<std::string, std::string> mapArgs; extern std::map<std::string, std::vector<std::string> > mapMultiArgs; extern bool fDebug; extern bool fDebugNet; extern bool fPrintToConsole; extern bool fPrintToDebugger; extern bool fDaemon; extern bool fServer; extern bool fCommandLine; extern std::string strMiscWarning; extern bool fTestNet; extern bool fNoListen; extern bool fLogTimestamps; extern volatile bool fReopenDebugLog; void RandAddSeed(); void RandAddSeedPerfmon(); int ATTR_WARN_PRINTF(1,2) OutputDebugStringF(const char* pszFormat, ...); /* Rationale for the real_strprintf / strprintf construction: It is not allowed to use va_start with a pass-by-reference argument. (C++ standard, 18.7, paragraph 3). Use a dummy argument to work around this, and use a macro to keep similar semantics. */ /** Overload strprintf for char*, so that GCC format type warnings can be given */ std::string ATTR_WARN_PRINTF(1,3) real_strprintf(const char *format, int dummy, ...); /** Overload strprintf for std::string, to be able to use it with _ (translation). * This will not support GCC format type warnings (-Wformat) so be careful. */ std::string real_strprintf(const std::string &format, int dummy, ...); #define strprintf(format, ...) real_strprintf(format, 0, __VA_ARGS__) std::string vstrprintf(const char *format, va_list ap); bool ATTR_WARN_PRINTF(1,2) error(const char *format, ...); /* Redefine printf so that it directs output to debug.log * * Do this *after* defining the other printf-like functions, because otherwise the * __attribute__((format(printf,X,Y))) gets expanded to __attribute__((format(OutputDebugStringF,X,Y))) * which confuses gcc. */ #define printf OutputDebugStringF void LogException(std::exception* pex, const char* pszThread); void PrintException(std::exception* pex, const char* pszThread); void PrintExceptionContinue(std::exception* pex, const char* pszThread); void ParseString(const std::string& str, char c, std::vector<std::string>& v); std::string FormatMoney(int64 n, bool fPlus=false); bool ParseMoney(const std::string& str, int64& nRet); bool ParseMoney(const char* pszIn, int64& nRet); std::vector<unsigned char> ParseHex(const char* psz); std::vector<unsigned char> ParseHex(const std::string& str); bool IsHex(const std::string& str); std::vector<unsigned char> DecodeBase64(const char* p, bool* pfInvalid = NULL); std::string DecodeBase64(const std::string& str); std::string EncodeBase64(const unsigned char* pch, size_t len); std::string EncodeBase64(const std::string& str); std::vector<unsigned char> DecodeBase32(const char* p, bool* pfInvalid = NULL); std::string DecodeBase32(const std::string& str); std::string EncodeBase32(const unsigned char* pch, size_t len); std::string EncodeBase32(const std::string& str); void ParseParameters(int argc, const char*const argv[]); bool WildcardMatch(const char* psz, const char* mask); bool WildcardMatch(const std::string& str, const std::string& mask); void FileCommit(FILE *fileout); int GetFilesize(FILE* file); bool TruncateFile(FILE *file, unsigned int length); int RaiseFileDescriptorLimit(int nMinFD); void AllocateFileRange(FILE *file, unsigned int offset, unsigned int length); bool RenameOver(boost::filesystem::path src, boost::filesystem::path dest); boost::filesystem::path GetDefaultDataDir(); const boost::filesystem::path &GetDataDir(bool fNetSpecific = true); boost::filesystem::path GetConfigFile(); boost::filesystem::path GetPidFile(); void CreatePidFile(const boost::filesystem::path &path, pid_t pid); void ReadConfigFile(std::map<std::string, std::string>& mapSettingsRet, std::map<std::string, std::vector<std::string> >& mapMultiSettingsRet); #ifdef WIN32 boost::filesystem::path GetSpecialFolderPath(int nFolder, bool fCreate = true); #endif boost::filesystem::path GetTempPath(); void ShrinkDebugFile(); int GetRandInt(int nMax); uint64 GetRand(uint64 nMax); uint256 GetRandHash(); int64 GetTime(); void SetMockTime(int64 nMockTimeIn); int64 GetAdjustedTime(); int64 GetTimeOffset(); std::string FormatFullVersion(); std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector<std::string>& comments); void AddTimeData(const CNetAddr& ip, int64 nTime); void runCommand(std::string strCommand); inline std::string i64tostr(int64 n) { return strprintf("%"PRI64d, n); } inline std::string itostr(int n) { return strprintf("%d", n); } inline int64 atoi64(const char* psz) { #ifdef _MSC_VER return _atoi64(psz); #else return strtoll(psz, NULL, 10); #endif } inline int64 atoi64(const std::string& str) { #ifdef _MSC_VER return _atoi64(str.c_str()); #else return strtoll(str.c_str(), NULL, 10); #endif } inline int atoi(const std::string& str) { return atoi(str.c_str()); } inline int roundint(double d) { return (int)(d > 0 ? d + 0.5 : d - 0.5); } inline int64 roundint64(double d) { return (int64)(d > 0 ? d + 0.5 : d - 0.5); } inline int64 abs64(int64 n) { return (n >= 0 ? n : -n); } template<typename T> std::string HexStr(const T itbegin, const T itend, bool fSpaces=false) { std::string rv; static const char hexmap[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' }; rv.reserve((itend-itbegin)*3); for(T it = itbegin; it < itend; ++it) { unsigned char val = (unsigned char)(*it); if(fSpaces && it != itbegin) rv.push_back(' '); rv.push_back(hexmap[val>>4]); rv.push_back(hexmap[val&15]); } return rv; } inline std::string HexStr(const std::vector<unsigned char>& vch, bool fSpaces=false) { return HexStr(vch.begin(), vch.end(), fSpaces); } template<typename T> void PrintHex(const T pbegin, const T pend, const char* pszFormat="%s", bool fSpaces=true) { printf(pszFormat, HexStr(pbegin, pend, fSpaces).c_str()); } inline void PrintHex(const std::vector<unsigned char>& vch, const char* pszFormat="%s", bool fSpaces=true) { printf(pszFormat, HexStr(vch, fSpaces).c_str()); } inline int64 GetPerformanceCounter() { int64 nCounter = 0; #ifdef WIN32 QueryPerformanceCounter((LARGE_INTEGER*)&nCounter); #else timeval t; gettimeofday(&t, NULL); nCounter = (int64) t.tv_sec * 1000000 + t.tv_usec; #endif return nCounter; } inline int64 GetTimeMillis() { return (boost::posix_time::ptime(boost::posix_time::microsec_clock::universal_time()) - boost::posix_time::ptime(boost::gregorian::date(1970,1,1))).total_milliseconds(); } inline int64 GetTimeMicros() { return (boost::posix_time::ptime(boost::posix_time::microsec_clock::universal_time()) - boost::posix_time::ptime(boost::gregorian::date(1970,1,1))).total_microseconds(); } inline std::string DateTimeStrFormat(const char* pszFormat, int64 nTime) { time_t n = nTime; struct tm* ptmTime = gmtime(&n); char pszTime[200]; strftime(pszTime, sizeof(pszTime), pszFormat, ptmTime); return pszTime; } template<typename T> void skipspaces(T& it) { while (isspace(*it)) ++it; } inline bool IsSwitchChar(char c) { #ifdef WIN32 return c == '-' || c == '/'; #else return c == '-'; #endif } /** * Return string argument or default value * * @param strArg Argument to get (e.g. "-foo") * @param default (e.g. "1") * @return command-line argument or default value */ std::string GetArg(const std::string& strArg, const std::string& strDefault); /** * Return integer argument or default value * * @param strArg Argument to get (e.g. "-foo") * @param default (e.g. 1) * @return command-line argument (0 if invalid number) or default value */ int64 GetArg(const std::string& strArg, int64 nDefault); /** * Return boolean argument or default value * * @param strArg Argument to get (e.g. "-foo") * @param default (true or false) * @return command-line argument or default value */ bool GetBoolArg(const std::string& strArg, bool fDefault=false); /** * Set an argument if it doesn't already have a value * * @param strArg Argument to set (e.g. "-foo") * @param strValue Value (e.g. "1") * @return true if argument gets set, false if it already had a value */ bool SoftSetArg(const std::string& strArg, const std::string& strValue); /** * Set a boolean argument if it doesn't already have a value * * @param strArg Argument to set (e.g. "-foo") * @param fValue Value (e.g. false) * @return true if argument gets set, false if it already had a value */ bool SoftSetBoolArg(const std::string& strArg, bool fValue); /** * MWC RNG of George Marsaglia * This is intended to be fast. It has a period of 2^59.3, though the * least significant 16 bits only have a period of about 2^30.1. * * @return random value */ extern uint32_t insecure_rand_Rz; extern uint32_t insecure_rand_Rw; static inline uint32_t insecure_rand(void) { insecure_rand_Rz = 36969 * (insecure_rand_Rz & 65535) + (insecure_rand_Rz >> 16); insecure_rand_Rw = 18000 * (insecure_rand_Rw & 65535) + (insecure_rand_Rw >> 16); return (insecure_rand_Rw << 16) + insecure_rand_Rz; } /** * Seed insecure_rand using the random pool. * @param Deterministic Use a determinstic seed */ void seed_insecure_rand(bool fDeterministic=false); /** * Timing-attack-resistant comparison. * Takes time proportional to length * of first argument. */ template <typename T> bool TimingResistantEqual(const T& a, const T& b) { if (b.size() == 0) return a.size() == 0; size_t accumulator = a.size() ^ b.size(); for (size_t i = 0; i < a.size(); i++) accumulator |= a[i] ^ b[i%b.size()]; return accumulator == 0; } /** Median filter over a stream of values. * Returns the median of the last N numbers */ template <typename T> class CMedianFilter { private: std::vector<T> vValues; std::vector<T> vSorted; unsigned int nSize; public: CMedianFilter(unsigned int size, T initial_value): nSize(size) { vValues.reserve(size); vValues.push_back(initial_value); vSorted = vValues; } void input(T value) { if(vValues.size() == nSize) { vValues.erase(vValues.begin()); } vValues.push_back(value); vSorted.resize(vValues.size()); std::copy(vValues.begin(), vValues.end(), vSorted.begin()); std::sort(vSorted.begin(), vSorted.end()); } T median() const { int size = vSorted.size(); assert(size>0); if(size & 1) // Odd number of elements { return vSorted[size/2]; } else // Even number of elements { return (vSorted[size/2-1] + vSorted[size/2]) / 2; } } int size() const { return vValues.size(); } std::vector<T> sorted () const { return vSorted; } }; bool NewThread(void(*pfn)(void*), void* parg); #ifdef WIN32 inline void SetThreadPriority(int nPriority) { SetThreadPriority(GetCurrentThread(), nPriority); } #else #define THREAD_PRIORITY_LOWEST PRIO_MAX #define THREAD_PRIORITY_BELOW_NORMAL 2 #define THREAD_PRIORITY_NORMAL 0 #define THREAD_PRIORITY_ABOVE_NORMAL 0 inline void SetThreadPriority(int nPriority) { // It's unclear if it's even possible to change thread priorities on Linux, // but we really and truly need it for the generation threads. #ifdef PRIO_THREAD setpriority(PRIO_THREAD, 0, nPriority); #else setpriority(PRIO_PROCESS, 0, nPriority); #endif } inline void ExitThread(size_t nExitCode) { pthread_exit((void*)nExitCode); } #endif void RenameThread(const char* name); inline uint32_t ByteReverse(uint32_t value) { value = ((value & 0xFF00FF00) >> 8) | ((value & 0x00FF00FF) << 8); return (value<<16) | (value>>16); } // Standard wrapper for do-something-forever thread functions. // "Forever" really means until the thread is interrupted. // Use it like: // new boost::thread(boost::bind(&LoopForever<void (*)()>, "dumpaddr", &DumpAddresses, 900000)); // or maybe: // boost::function<void()> f = boost::bind(&FunctionWithArg, argument); // threadGroup.create_thread(boost::bind(&LoopForever<boost::function<void()> >, "nothing", f, milliseconds)); template <typename Callable> void LoopForever(const char* name, Callable func, int64 msecs) { std::string s = strprintf("protoshares-%s", name); RenameThread(s.c_str()); printf("%s thread start\n", name); try { while (1) { MilliSleep(msecs); func(); } } catch (boost::thread_interrupted) { printf("%s thread stop\n", name); throw; } catch (std::exception& e) { PrintException(&e, name); } catch (...) { PrintException(NULL, name); } } // .. and a wrapper that just calls func once template <typename Callable> void TraceThread(const char* name, Callable func) { std::string s = strprintf("protoshares-%s", name); RenameThread(s.c_str()); try { printf("%s thread start\n", name); func(); printf("%s thread exit\n", name); } catch (boost::thread_interrupted) { printf("%s thread interrupt\n", name); throw; } catch (std::exception& e) { PrintException(&e, name); } catch (...) { PrintException(NULL, name); } } #endif
{ "content_hash": "2a6b8a6441cc0c2f23e75689b72dc003", "timestamp": "", "source": "github", "line_count": 607, "max_line_length": 143, "avg_line_length": 27.97693574958814, "alnum_prop": 0.6657637498527853, "repo_name": "donSchoe/angelshares", "id": "b60ad71835bc0aaa75840ebfd2e1b8d58625371a", "size": "16982", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "src/util.h", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "101887" }, { "name": "C++", "bytes": "2421665" }, { "name": "CSS", "bytes": "1127" }, { "name": "IDL", "bytes": "25378" }, { "name": "Objective-C", "bytes": "2686" }, { "name": "Python", "bytes": "69704" }, { "name": "Shell", "bytes": "13057" }, { "name": "TypeScript", "bytes": "5232121" } ], "symlink_target": "" }
package br.com.caelum.tubaina.parser.html.desktop; import static org.junit.Assert.assertTrue; import java.io.File; import java.io.IOException; import org.junit.Before; import org.junit.Test; import br.com.caelum.tubaina.Book; import br.com.caelum.tubaina.SectionsManager; import br.com.caelum.tubaina.TubainaBuilder; import br.com.caelum.tubaina.builder.BookBuilder; import freemarker.ext.beans.BeansWrapper; import freemarker.template.Configuration; public class SingleHtmlTOCGeneratorTest { private Configuration cfg; @Before public void setUp() throws IOException { cfg = new Configuration(); cfg.setDirectoryForTemplateLoading(new File(TubainaBuilder.DEFAULT_TEMPLATE_DIR, "singlehtml/")); cfg.setObjectWrapper(new BeansWrapper()); } @Test public void shouldCreateATOCFromBook() throws Exception { setUp(); Book build = createBook(); SingleHtmlTOCGenerator tocGenerator = new SingleHtmlTOCGenerator(build, cfg); String toc = tocGenerator.generateTOC().toString(); assertTrue(toc.contains("O que &eacute; java")); assertTrue(toc.contains("Primeira se&ccedil;&atilde;o")); assertTrue(toc.contains("Segunda se&ccedil;&atilde;o")); } private Book createBook() { BookBuilder builder = new BookBuilder("title", new SectionsManager()); builder.addReaderFromString( "[chapter O que é java? ]\n" + "texto da seção\n" + "[section Primeira seção]\n" + "texto da prim seção\n" + "[section Segunda seção]\n" + "texto da segunda seção\n\n"); builder.addReaderFromString("[chapter Introdução]\n" + "Algum texto de introdução\n"); Book build = builder.build(); return build; } }
{ "content_hash": "b80b8386fb03b92e6907856a37c2370b", "timestamp": "", "source": "github", "line_count": 55, "max_line_length": 88, "avg_line_length": 33.61818181818182, "alnum_prop": 0.6619794483504597, "repo_name": "caelum/tubaina", "id": "8eb6196691fea6c38f6eccac1c8317a57041b10c", "size": "1864", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/test/java/br/com/caelum/tubaina/parser/html/desktop/SingleHtmlTOCGeneratorTest.java", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "213156" }, { "name": "FreeMarker", "bytes": "18806" }, { "name": "HTML", "bytes": "1087390" }, { "name": "Java", "bytes": "498494" }, { "name": "JavaScript", "bytes": "26828" }, { "name": "Ruby", "bytes": "338" }, { "name": "Shell", "bytes": "1139" }, { "name": "TeX", "bytes": "82706" } ], "symlink_target": "" }
FROM ubuntu:14.04 # install osm2pgsql build deps RUN apt-get update \ && apt-get -y install software-properties-common \ && apt-add-repository -y ppa:tilezen \ && apt-get update \ && apt-get -y install \ libpq-dev \ osm2pgsql \ python \ libxml2-dev \ libxslt1-dev \ postgresql-client \ python-dev \ python-jinja2 \ python-yaml \ python-pip \ git-core \ make \ wget \ unzip \ && rm -rf /var/lib/apt/lists/* COPY . /usr/src/app WORKDIR /usr/src/app RUN pip install -r requirements.txt RUN pip install -e . CMD ["/bin/bash", "scripts/docker_boostrap.sh"]
{ "content_hash": "057796ab7fef85fdc2f171bf8cfb2fac", "timestamp": "", "source": "github", "line_count": 30, "max_line_length": 51, "avg_line_length": 20.533333333333335, "alnum_prop": 0.6298701298701299, "repo_name": "mapzen/vector-datasource", "id": "3f7990a941b98dc7b0f05f840c29fecdfeb2a5f4", "size": "616", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "Dockerfile", "mode": "33188", "license": "mit", "language": [ { "name": "HTML", "bytes": "2839" }, { "name": "PLpgSQL", "bytes": "32195" }, { "name": "Python", "bytes": "268894" }, { "name": "SQLPL", "bytes": "222" }, { "name": "Shell", "bytes": "13283" }, { "name": "XSLT", "bytes": "339" } ], "symlink_target": "" }
package com.amazonaws.services.pinpoint.model.transform; import java.math.*; import javax.annotation.Generated; import com.amazonaws.services.pinpoint.model.*; import com.amazonaws.transform.SimpleTypeJsonUnmarshallers.*; import com.amazonaws.transform.*; import com.fasterxml.jackson.core.JsonToken; import static com.fasterxml.jackson.core.JsonToken.*; /** * RecencyDimension JSON Unmarshaller */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class RecencyDimensionJsonUnmarshaller implements Unmarshaller<RecencyDimension, JsonUnmarshallerContext> { public RecencyDimension unmarshall(JsonUnmarshallerContext context) throws Exception { RecencyDimension recencyDimension = new RecencyDimension(); int originalDepth = context.getCurrentDepth(); String currentParentElement = context.getCurrentParentElement(); int targetDepth = originalDepth + 1; JsonToken token = context.getCurrentToken(); if (token == null) token = context.nextToken(); if (token == VALUE_NULL) { return null; } while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("Duration", targetDepth)) { context.nextToken(); recencyDimension.setDuration(context.getUnmarshaller(String.class).unmarshall(context)); } if (context.testExpression("RecencyType", targetDepth)) { context.nextToken(); recencyDimension.setRecencyType(context.getUnmarshaller(String.class).unmarshall(context)); } } else if (token == END_ARRAY || token == END_OBJECT) { if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) { if (context.getCurrentDepth() <= originalDepth) break; } } token = context.nextToken(); } return recencyDimension; } private static RecencyDimensionJsonUnmarshaller instance; public static RecencyDimensionJsonUnmarshaller getInstance() { if (instance == null) instance = new RecencyDimensionJsonUnmarshaller(); return instance; } }
{ "content_hash": "23c74fcde2ba1af924428dd91981b25a", "timestamp": "", "source": "github", "line_count": 67, "max_line_length": 136, "avg_line_length": 36.04477611940298, "alnum_prop": 0.6405797101449275, "repo_name": "dagnir/aws-sdk-java", "id": "62c1e3c88867a06fa703341ca91f181ad9b698c6", "size": "2995", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/transform/RecencyDimensionJsonUnmarshaller.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "FreeMarker", "bytes": "157317" }, { "name": "Gherkin", "bytes": "25556" }, { "name": "Java", "bytes": "165755153" }, { "name": "Scilab", "bytes": "3561" } ], "symlink_target": "" }
namespace alinous {namespace html {namespace xpath { bool IVariableValue::__init_done = __init_static_variables(); bool IVariableValue::__init_static_variables(){ Java2CppSystem::getSelf(); ThreadContext* ctx = ThreadContext::newThreadContext(); { GCNotifier __refobj1(ctx, __FILEW__, __LINE__, L"IVariableValue", L"__init_static_variables"); } ctx->localGC(); delete ctx; return true; } IVariableValue::IVariableValue(ThreadContext* ctx) throw() : IObject(ctx) { } void IVariableValue::__construct_impl(ThreadContext* ctx) throw() { } IVariableValue::~IVariableValue() throw() { ThreadContext *ctx = ThreadContext::getCurentContext(); if(ctx != nullptr){ctx->incGcDenial();} __releaseRegerences(false, ctx); if(ctx != nullptr){ctx->decGcDenial();} } void IVariableValue::__releaseRegerences(bool prepare, ThreadContext* ctx) throw() { if(!prepare){ return; } } void IVariableValue::__cleanUp(ThreadContext* ctx){ } }}}
{ "content_hash": "eeffc060c76cf8c539d2098b29f9ca48", "timestamp": "", "source": "github", "line_count": 39, "max_line_length": 96, "avg_line_length": 24.307692307692307, "alnum_prop": 0.709915611814346, "repo_name": "alinous-core/alinous-elastic-db", "id": "06ce6722b34e7879947e7d293e61570dcb09c9b5", "size": "2750", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "lib/src_java/alinous.html.xpath/IVariableValue.cpp", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "7447" }, { "name": "C++", "bytes": "14486500" }, { "name": "CMake", "bytes": "223064" } ], "symlink_target": "" }
<?php //Privacy Policy return array( 'tos' => '<h2>Terms of Service</h2> <p>Please read these Terms of Service carefully before using this site. This Agreement sets forth the legally binding terms and conditions for your use of the Site at <strong>' . url() . '</strong>.</p> <p>By accessing or using the Site in any manner, including, but not limited to, visiting or browsing the Site or contributing content or other materials to the Site, you agree to be bound by these Terms of Service. Capitalized terms are defined in this Agreement.</p> <p><strong>Intellectual Property</strong><br />The Site and its original content, features and functionality are owned by mtdb and are protected by international copyright, trademark, patent, trade secret and other intellectual property or proprietary rights laws.</p> <p><strong>Termination</strong><br />We may terminate your access to the Site, without cause or notice, which may result in the forfeiture and destruction of all information associated with you. All provisions of this Agreement that by their nature should survive termination shall survive termination, including, without limitation, ownership provisions, warranty disclaimers, indemnity, and limitations of liability.</p> <p><strong>Links To Other Sites</strong><br />Our Site may contain links to third-party sites that are not owned or controlled by mtdb.</p> <p>mtdb has no control over, and assumes no responsibility for, the content, privacy policies, or practices of any third party sites or services. We strongly advise you to read the terms and conditions and privacy policy of any third-party site that you visit.</p> <p><strong>Governing Law</strong><br />This Agreement (and any further rules, polices, or guidelines incorporated by reference) shall be governed and construed in accordance with the laws of Lithuania, without giving effect to any principles of conflicts of law.</p> <p><strong>Changes To This Agreement</strong><br />We reserve the right, at our sole discretion, to modify or replace these Terms of Service by posting the updated terms on the Site. Your continued use of the Site after any such changes constitutes your acceptance of the new Terms of Service.</p> <p>Please review this Agreement periodically for changes. If you do not agree to any of this Agreement or any changes to this Agreement, do not use, access or continue to access the Site or discontinue any use of the Site immediately.</p> <p><strong>Contact Us</strong><br />If you have any questions about this Agreement, please contact us.</p>' );
{ "content_hash": "b4256b29405979b8254940676ff8ca9e", "timestamp": "", "source": "github", "line_count": 27, "max_line_length": 423, "avg_line_length": 96.70370370370371, "alnum_prop": 0.767905017234776, "repo_name": "romeoinbar/MDTB", "id": "e8eccce8da8098b06f6445a556c9893d8446ff42", "size": "2611", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "app/lang/en/tos.php", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "PHP", "bytes": "843189" } ], "symlink_target": "" }
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd"> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <beans/>
{ "content_hash": "79f91a12791ce73e9be0f8468f12a65f", "timestamp": "", "source": "github", "line_count": 20, "max_line_length": 74, "avg_line_length": 47.6, "alnum_prop": 0.7510504201680672, "repo_name": "apache/forrest", "id": "6046f3585cfc489f210b7f1d1680916fed407cfd", "size": "952", "binary": false, "copies": "2", "ref": "refs/heads/trunk", "path": "whiteboard/cocoon-2.2-blocks/locationmap/src/main/resources/META-INF/cocoon/spring/demo-application-context.xml", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "62060" }, { "name": "CSS", "bytes": "234824" }, { "name": "Clean", "bytes": "7189" }, { "name": "HTML", "bytes": "197618" }, { "name": "Java", "bytes": "1155856" }, { "name": "JavaScript", "bytes": "64397" }, { "name": "Perl", "bytes": "23794" }, { "name": "Python", "bytes": "6570" }, { "name": "Scala", "bytes": "33856" }, { "name": "Shell", "bytes": "35462" }, { "name": "XSLT", "bytes": "2100713" } ], "symlink_target": "" }
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); session_start(); class Activity extends CI_Controller { // Informasi Type // 1 = Posting // 2 = Komentar // 3 = Like public function __construct() { parent::__construct(); $this->load->helper(array('form', 'url')); $this->load->model('mpost'); $this->load->model('muser'); $this->load->model('mwidget'); $this->load->model('mcomment'); $this->load->model('mactivity'); } public function index() { $this->load->view('home'); } public function listMy() { $user_id = 5; $limit = $this->input->post('limit'); $start = $this->input->post('start'); $data = $this->mactivity->myactivity($user_id); $output = array( "feed" => $data, ); echo $this->mwidget->json($output); } }
{ "content_hash": "8a36df860b9434928e79ef993a60c383", "timestamp": "", "source": "github", "line_count": 43, "max_line_length": 74, "avg_line_length": 18.767441860465116, "alnum_prop": 0.5923172242874845, "repo_name": "infomugi/sawarga", "id": "ee40e10bdac9ad7d6680c23524454e5d3525d106", "size": "807", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "application/controllers/activity.php", "mode": "33188", "license": "mit", "language": [ { "name": "ApacheConf", "bytes": "317" }, { "name": "CSS", "bytes": "15876" }, { "name": "HTML", "bytes": "8435560" }, { "name": "JavaScript", "bytes": "92173" }, { "name": "PHP", "bytes": "2368983" }, { "name": "Roff", "bytes": "258665" } ], "symlink_target": "" }
apt-get update # Install mysql export DEBIAN_FRONTEND=noninteractive apt-get -q -y install mysql-server # set up database mysql -vv < /vagrant/sql/createdb.sql # Install Java apt-get install -y openjdk-7-jdk # make logs dir mkdir /vagrant/logs # Install jetty 8 not using ubuntu package because it's JSP support is broken cd /tmp tar -xvf /vagrant/jetty-distribution-8.1.16.v20140903.tar.gz mv jetty-distribution-8.1.16.v20140903 /opt/jetty # configure jetty echo "NO_START=0" > /etc/default/jetty echo "JETTY_HOST=0.0.0.0" >> /etc/default/jetty echo "JETTY_PORT=8080" >> /etc/default/jetty echo "JETTY_HOME=/opt/jetty" >> /etc/default/jetty echo "JETTY_LOGS=/vagrant/logs" >> /etc/default/jetty echo 'JAVA_OPTIONS="-Xmx256m -Djava.awt.headless=true -Dopwas.config.file=/opt/opwas/etc/opwas.properties"' >> /etc/default/jetty # set up jetty init script cp /vagrant/jettyinitscript /etc/init.d/jetty chown root:root /etc/init.d/jetty chmod 744 /etc/init.d/jetty # set up app cp /vagrant/opwas.war /opt/jetty/webapps/ mkdir /opt/opwas/ mkdir /opt/opwas/etc cp /vagrant/etc/* /opt/opwas/etc/ service jetty restart
{ "content_hash": "e94d9d8cc8c71e7b55739d771b55949e", "timestamp": "", "source": "github", "line_count": 44, "max_line_length": 129, "avg_line_length": 25.613636363636363, "alnum_prop": 0.7426796805678794, "repo_name": "rabidgremlin/one-page-web-app-starter", "id": "d250b71324844cf2e3329eed4203acc85c085535", "size": "1148", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/vagrant/bootstrap.sh", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "215" }, { "name": "Java", "bytes": "23709" }, { "name": "JavaScript", "bytes": "6044" }, { "name": "Ruby", "bytes": "194" }, { "name": "Shell", "bytes": "1148" } ], "symlink_target": "" }
/***********************************************************************/ /* */ /* OCaml */ /* */ /* Xavier Leroy, projet Cristal, INRIA Rocquencourt */ /* */ /* Copyright 1996 Institut National de Recherche en Informatique et */ /* en Automatique. All rights reserved. This file is distributed */ /* under the terms of the GNU Library General Public License, with */ /* the special exception on linking described in file ../LICENSE. */ /* */ /***********************************************************************/ /* Win32-specific stuff */ #include <windows.h> #include <stdlib.h> #include <stdio.h> #include <stdarg.h> #include <io.h> #include <fcntl.h> #include <sys/types.h> #include <sys/stat.h> #include <ctype.h> #include <errno.h> #include <string.h> #include <signal.h> #include "fail.h" #include "memory.h" #include "misc.h" #include "osdeps.h" #include "signals.h" #include "sys.h" #include <flexdll.h> #ifndef S_ISREG #define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG) #endif char * caml_decompose_path(struct ext_table * tbl, char * path) { char * p, * q; int n; if (path == NULL) return NULL; p = caml_strdup(path); q = p; while (1) { for (n = 0; q[n] != 0 && q[n] != ';'; n++) /*nothing*/; caml_ext_table_add(tbl, q); q = q + n; if (*q == 0) break; *q = 0; q += 1; } return p; } char * caml_search_in_path(struct ext_table * path, char * name) { char * p, * dir, * fullname; int i; struct stat st; for (p = name; *p != 0; p++) { if (*p == '/' || *p == '\\') goto not_found; } for (i = 0; i < path->size; i++) { dir = path->contents[i]; if (dir[0] == 0) continue; /* not sure what empty path components mean under Windows */ fullname = caml_strconcat(3, dir, "\\", name); caml_gc_message(0x100, "Searching %s\n", (uintnat) fullname); if (stat(fullname, &st) == 0 && S_ISREG(st.st_mode)) return fullname; caml_stat_free(fullname); } not_found: caml_gc_message(0x100, "%s not found in search path\n", (uintnat) name); return caml_strdup(name); } CAMLexport char * caml_search_exe_in_path(char * name) { char * fullname, * filepart; size_t fullnamelen; DWORD retcode; fullnamelen = strlen(name) + 1; if (fullnamelen < 256) fullnamelen = 256; while (1) { fullname = caml_stat_alloc(fullnamelen); retcode = SearchPath(NULL, /* use system search path */ name, ".exe", /* add .exe extension if needed */ fullnamelen, fullname, &filepart); if (retcode == 0) { caml_gc_message(0x100, "%s not found in search path\n", (uintnat) name); caml_stat_free(fullname); return caml_strdup(name); } if (retcode < fullnamelen) return fullname; caml_stat_free(fullname); fullnamelen = retcode + 1; } } char * caml_search_dll_in_path(struct ext_table * path, char * name) { char * dllname; char * res; dllname = caml_strconcat(2, name, ".dll"); res = caml_search_in_path(path, dllname); caml_stat_free(dllname); return res; } void * caml_dlopen(char * libname, int for_execution, int global) { void *handle; int flags = (global ? FLEXDLL_RTLD_GLOBAL : 0); if (!for_execution) flags |= FLEXDLL_RTLD_NOEXEC; handle = flexdll_dlopen(libname, flags); if ((handle != NULL) && ((caml_verb_gc & 0x100) != 0)) { flexdll_dump_exports(handle); fflush(stdout); } return handle; } void caml_dlclose(void * handle) { flexdll_dlclose(handle); } void * caml_dlsym(void * handle, char * name) { return flexdll_dlsym(handle, name); } void * caml_globalsym(char * name) { return flexdll_dlsym(flexdll_dlopen(NULL,0), name); } char * caml_dlerror(void) { return flexdll_dlerror(); } /* Proper emulation of signal(), including ctrl-C and ctrl-break */ typedef void (*sighandler)(int sig); static int ctrl_handler_installed = 0; static volatile sighandler ctrl_handler_action = SIG_DFL; static BOOL WINAPI ctrl_handler(DWORD event) { int saved_mode; /* Only ctrl-C and ctrl-Break are handled */ if (event != CTRL_C_EVENT && event != CTRL_BREAK_EVENT) return FALSE; /* Default behavior is to exit, which we get by not handling the event */ if (ctrl_handler_action == SIG_DFL) return FALSE; /* Ignore behavior is to do nothing, which we get by claiming that we have handled the event */ if (ctrl_handler_action == SIG_IGN) return TRUE; /* Win32 doesn't like it when we do a longjmp() at this point (it looks like we're running in a different thread than the main program!). So, just record the signal. */ caml_record_signal(SIGINT); /* We have handled the event */ return TRUE; } sighandler caml_win32_signal(int sig, sighandler action) { sighandler oldaction; if (sig != SIGINT) return signal(sig, action); if (! ctrl_handler_installed) { SetConsoleCtrlHandler(ctrl_handler, TRUE); ctrl_handler_installed = 1; } oldaction = ctrl_handler_action; ctrl_handler_action = action; return oldaction; } /* Expansion of @responsefile and *? file patterns in the command line */ static int argc; static char ** argv; static int argvsize; static void store_argument(char * arg); static void expand_argument(char * arg); static void expand_pattern(char * arg); static void out_of_memory(void) { fprintf(stderr, "Out of memory while expanding command line\n"); exit(2); } static void store_argument(char * arg) { if (argc + 1 >= argvsize) { argvsize *= 2; argv = (char **) realloc(argv, argvsize * sizeof(char *)); if (argv == NULL) out_of_memory(); } argv[argc++] = arg; } static void expand_argument(char * arg) { char * p; for (p = arg; *p != 0; p++) { if (*p == '*' || *p == '?') { expand_pattern(arg); return; } } store_argument(arg); } static void expand_pattern(char * pat) { char * prefix, * p, * name; int handle; struct _finddata_t ffblk; size_t i; handle = _findfirst(pat, &ffblk); if (handle == -1) { store_argument(pat); /* a la Bourne shell */ return; } prefix = caml_strdup(pat); for (i = strlen(prefix); i > 0; i--) { char c = prefix[i - 1]; if (c == '\\' || c == '/' || c == ':') { prefix[i] = 0; break; } } do { name = caml_strconcat(2, prefix, ffblk.name); store_argument(name); } while (_findnext(handle, &ffblk) != -1); _findclose(handle); caml_stat_free(prefix); } CAMLexport void caml_expand_command_line(int * argcp, char *** argvp) { int i; argc = 0; argvsize = 16; argv = (char **) malloc(argvsize * sizeof(char *)); if (argv == NULL) out_of_memory(); for (i = 0; i < *argcp; i++) expand_argument((*argvp)[i]); argv[argc] = NULL; *argcp = argc; *argvp = argv; } /* Add to [contents] the (short) names of the files contained in the directory named [dirname]. No entries are added for [.] and [..]. Return 0 on success, -1 on error; set errno in the case of error. */ int caml_read_directory(char * dirname, struct ext_table * contents) { size_t dirnamelen; char * template; #if _MSC_VER <= 1200 int h; #else intptr_t h; #endif struct _finddata_t fileinfo; dirnamelen = strlen(dirname); if (dirnamelen > 0 && (dirname[dirnamelen - 1] == '/' || dirname[dirnamelen - 1] == '\\' || dirname[dirnamelen - 1] == ':')) template = caml_strconcat(2, dirname, "*.*"); else template = caml_strconcat(2, dirname, "\\*.*"); h = _findfirst(template, &fileinfo); if (h == -1) { caml_stat_free(template); return errno == ENOENT ? 0 : -1; } do { if (strcmp(fileinfo.name, ".") != 0 && strcmp(fileinfo.name, "..") != 0) { caml_ext_table_add(contents, caml_strdup(fileinfo.name)); } } while (_findnext(h, &fileinfo) == 0); _findclose(h); caml_stat_free(template); return 0; } #ifndef NATIVE_CODE /* Set up a new thread for control-C emulation and termination */ void caml_signal_thread(void * lpParam) { char *endptr; HANDLE h; /* Get an hexa-code raw handle through the environment */ h = (HANDLE) strtol(getenv("CAMLSIGPIPE"), &endptr, 16); while (1) { DWORD numread; BOOL ret; char iobuf[2]; /* This shall always return a single character */ ret = ReadFile(h, iobuf, 1, &numread, NULL); if (!ret || numread != 1) caml_sys_exit(Val_int(2)); switch (iobuf[0]) { case 'C': caml_record_signal(SIGINT); break; case 'T': raise(SIGTERM); return; } } } #endif /* NATIVE_CODE */ #if defined(NATIVE_CODE) && !defined(_WIN64) /* Handling of system stack overflow. * Based on code provided by Olivier Andrieu. * An EXCEPTION_STACK_OVERFLOW is signaled when the guard page at the * end of the stack has been accessed. Windows clears the PAGE_GUARD * protection (making it a regular PAGE_READWRITE) and then calls our * exception handler. This means that although we're handling an "out * of stack" condition, there is a bit of stack available to call * functions and allocate temporaries. * * PAGE_GUARD is a one-shot access protection mechanism: we need to * restore the PAGE_GUARD protection on this page otherwise the next * stack overflow won't be detected and the program will abruptly exit * with STATUS_ACCESS_VIOLATION. * * Visual Studio 2003 and later (_MSC_VER >= 1300) have a * _resetstkoflw() function that resets this protection. * Unfortunately, it cannot work when called directly from the * exception handler because at this point we are using the page that * is to be protected. * * A solution is to used an alternate stack when restoring the * protection. However it's not possible to use _resetstkoflw() then * since it determines the stack pointer by calling alloca(): it would * try to protect the alternate stack. * * Finally, we call caml_raise_stack_overflow; it will either call * caml_raise_exception which switches back to the normal stack, or * call caml_fatal_uncaught_exception which terminates the program * quickly. * * NB: The PAGE_GUARD protection is only available on WinNT, not * Win9x. There is an equivalent mechanism on Win9x with * PAGE_NOACCESS. * * Currently, does not work under Win64. */ static uintnat win32_alt_stack[0x80]; static void caml_reset_stack (void *faulting_address) { OSVERSIONINFO osi; SYSTEM_INFO si; DWORD page_size; MEMORY_BASIC_INFORMATION mbi; DWORD oldprot; /* get the os version (Win9x or WinNT ?) */ osi.dwOSVersionInfoSize = sizeof osi; if (! GetVersionEx (&osi)) goto failed; /* get the system's page size. */ GetSystemInfo (&si); page_size = si.dwPageSize; /* get some information on the page the fault occurred */ if (! VirtualQuery (faulting_address, &mbi, sizeof mbi)) goto failed; /* restore the PAGE_GUARD protection on this page */ switch (osi.dwPlatformId) { case VER_PLATFORM_WIN32_NT: VirtualProtect (mbi.BaseAddress, page_size, mbi.Protect | PAGE_GUARD, &oldprot); break; case VER_PLATFORM_WIN32_WINDOWS: VirtualProtect (mbi.BaseAddress, page_size, PAGE_NOACCESS, &oldprot); break; } failed: caml_raise_stack_overflow(); } extern char * caml_code_area_start, * caml_code_area_end; CAMLextern int caml_is_in_code(void *); #define Is_in_code_area(pc) \ ( ((char *)(pc) >= caml_code_area_start && \ (char *)(pc) <= caml_code_area_end) \ || (Classify_addr(pc) & In_code_area) ) static LONG CALLBACK caml_UnhandledExceptionFilter (EXCEPTION_POINTERS* exn_info) { DWORD code = exn_info->ExceptionRecord->ExceptionCode; CONTEXT *ctx = exn_info->ContextRecord; DWORD *ctx_ip = &(ctx->Eip); DWORD *ctx_sp = &(ctx->Esp); if (code == EXCEPTION_STACK_OVERFLOW && Is_in_code_area (*ctx_ip)) { uintnat faulting_address; uintnat * alt_esp; /* grab the address that caused the fault */ faulting_address = exn_info->ExceptionRecord->ExceptionInformation[1]; /* call caml_reset_stack(faulting_address) using the alternate stack */ alt_esp = win32_alt_stack + sizeof(win32_alt_stack) / sizeof(uintnat); *--alt_esp = faulting_address; *ctx_sp = (uintnat) (alt_esp - 1); *ctx_ip = (uintnat) &caml_reset_stack; return EXCEPTION_CONTINUE_EXECUTION; } return EXCEPTION_CONTINUE_SEARCH; } void caml_win32_overflow_detection() { SetUnhandledExceptionFilter (caml_UnhandledExceptionFilter); } #endif /* Seeding of pseudo-random number generators */ int caml_win32_random_seed (intnat data[16]) { /* For better randomness, consider: http://msdn.microsoft.com/library/en-us/seccrypto/security/rtlgenrandom.asp http://blogs.msdn.com/b/michael_howard/archive/2005/01/14/353379.aspx */ FILETIME t; LARGE_INTEGER pc; GetSystemTimeAsFileTime(&t); QueryPerformanceCounter(&pc); /* PR#6032 */ data[0] = t.dwLowDateTime; data[1] = t.dwHighDateTime; data[2] = GetCurrentProcessId(); data[3] = pc.LowPart; data[4] = pc.HighPart; return 5; } #ifdef _MSC_VER static void invalid_parameter_handler(const wchar_t* expression, const wchar_t* function, const wchar_t* file, unsigned int line, uintptr_t pReserved) { /* no crash box */ } void caml_install_invalid_parameter_handler() { _set_invalid_parameter_handler(invalid_parameter_handler); } #endif /* Recover executable name */ int caml_executable_name(char * name, int name_len) { int retcode; int ret = GetModuleFileName(NULL, name, name_len); if (0 == ret || ret >= name_len) return -1; return 0; } /* snprintf emulation */ int caml_snprintf(char * buf, size_t size, const char * format, ...) { int len; va_list args; if (size > 0) { va_start(args, format); len = _vsnprintf(buf, size, format, args); va_end(args); if (len >= 0 && len < size) { /* [len] characters were stored in [buf], a null-terminator was appended. */ return len; } /* [size] characters were stored in [buf], without null termination. Put a null terminator, truncating the output. */ buf[size - 1] = 0; } /* Compute the actual length of output, excluding null terminator */ va_start(args, format); len = _vscprintf(format, args); va_end(args); return len; }
{ "content_hash": "430678a99e39f29046d62a19915fbc71", "timestamp": "", "source": "github", "line_count": 541, "max_line_length": 80, "avg_line_length": 27.21441774491682, "alnum_prop": 0.6160429260340963, "repo_name": "ucsd-progsys/nate", "id": "67e96832111322d6e08eef57f2ed56174c067f5b", "size": "14723", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "eval/ocaml/byterun/win32.c", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "Assembly", "bytes": "334291" }, { "name": "C", "bytes": "3206196" }, { "name": "C++", "bytes": "55172" }, { "name": "CSS", "bytes": "889" }, { "name": "Emacs Lisp", "bytes": "418541" }, { "name": "HTML", "bytes": "1036" }, { "name": "Java", "bytes": "173254" }, { "name": "JavaScript", "bytes": "2800" }, { "name": "Lex", "bytes": "3435" }, { "name": "M", "bytes": "28618" }, { "name": "Makefile", "bytes": "215266" }, { "name": "Mathematica", "bytes": "11837" }, { "name": "OCaml", "bytes": "26469249" }, { "name": "Perl", "bytes": "3633" }, { "name": "Python", "bytes": "63563" }, { "name": "R", "bytes": "18107" }, { "name": "Roff", "bytes": "55057" }, { "name": "Shell", "bytes": "125276" }, { "name": "Smarty", "bytes": "5510" }, { "name": "Standard ML", "bytes": "39787" }, { "name": "Tcl", "bytes": "66" }, { "name": "TeX", "bytes": "1552215" } ], "symlink_target": "" }
package eventListener import ( //"strings" //"github.com/gotstago/GoGameEngine/services/lexer/lexertoken" ) /* This lexer function starts everything off. It determines if we are beginning with a key/value assignment or a section. */ func GameBidding(listener *EventListener) ListenerFn { return GameDealingTwo }
{ "content_hash": "942cbbdad985f23fc9ff0bedb3654bab", "timestamp": "", "source": "github", "line_count": 15, "max_line_length": 66, "avg_line_length": 21.2, "alnum_prop": 0.779874213836478, "repo_name": "gotstago/GoGameEngine", "id": "94e22cd341a49c189325393aa9c39454c7edfff4", "size": "318", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "services/gameengine/eventListener/GameBidding.go", "mode": "33188", "license": "mit", "language": [ { "name": "Go", "bytes": "17657" } ], "symlink_target": "" }
''' Created on Dec 16, 2011 @author: t4aalton ''' from socialDevices.action import Action, actionbody, actionprecondition from socialDevices.deviceInterfaces.talkingDevice import TalkingDevice from socialDevices.device import Device import socialDevices.misc as misc class Dialog(Action): def __init__(self, d1, d2): self.d1 = d1 self.d2 = d2 @actionprecondition def precondition(self, d1, d2): return misc.proximity([d1, d2]) and d1.isWilling() and d2.talkingDevice.isWilling() and d1.talkingDevice.isSilent() and \ d1.hasInterface(TalkingDevice) and d2.hasInterface(TalkingDevice) @actionbody def body(self, d1, d2): mtalk = misc.Mtalk() conversation = mtalk.getConversation(nbrOfPeople=2) devices = [d1, d2] for line in conversation: devices[line[0]].talkingDevice.say(line[1])
{ "content_hash": "7312cc03df49654b08f7bd9544af7206", "timestamp": "", "source": "github", "line_count": 32, "max_line_length": 129, "avg_line_length": 28.4375, "alnum_prop": 0.6714285714285714, "repo_name": "socialdevices/manager", "id": "26b93b946843c46bb2d75d86eefeb671b67a6997", "size": "910", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "core/fixtures/talkingDevices/invalid_files/dialog_precondition_method_call_error.py", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "JavaScript", "bytes": "58821" }, { "name": "Python", "bytes": "759639" }, { "name": "Shell", "bytes": "134" }, { "name": "Visual Basic", "bytes": "982" } ], "symlink_target": "" }
""" Created on Tue Feb 2 17:50:09 2021 @author: sahrendt """ from dataclasses import dataclass from itertools import tee import numpy as np import numpy.typing as npt from ..components import ChannelProfiler, FlowAccumulator from .network import NetworkModelGrid try: from itertools import pairwise except ImportError: # Not available before Python 3.10 def pairwise(iterable): # pairwise('ABCDEFG') --> AB BC CD DE EF FG a, b = tee(iterable) next(b, None) return zip(a, b) def network_grid_from_raster( grid, reducer=None, include="*", exclude=None, minimum_channel_threshold=0.0 ): """Create a NetworkModelGrid from a RasterModelGrid. The optional *reducer* keyword is use to pass a function that reduces the number of nodes in each channel segment. The default is to keep all segment nodes. Parameters ---------- grid : RasterModelGrid object A raster grid used to create a network grid reducer : func, optional A function used to reduce the number of nodes in each segment. The default is to include all segment nodes in the created NetworkModelGrid. include : str, or iterable of str, optional Glob-style pattern for field names to include. exclude : str, or iterable of str, optional Glob-style pattern for field names to exclude. minimum_channel_threshold : float, optional Value to use for the minimum drainage area associated with a plotted channel segment from the ChannelProfiler. Default values 10000. Returns ------- network : NetworkModelGrid NetworkModelGrid object with .at_node['rmg_node_value'] attribute listing the RasterModelGrid node ids at each NetworkModelGrid node. """ if "drainage_area" not in grid.at_node: FlowAccumulator( grid, "topographic__elevation", flow_director="D8", depression_finder="DepressionFinderAndRouter", ).run_one_step() if "drainage_area" not in grid.at_node: raise ValueError("'drainage_area' field is missing from the grid") channel_segments = get_channel_segments( grid, minimum_channel_threshold=minimum_channel_threshold ) if reducer is not None: channel_segments = [reducer(segment) for segment in channel_segments] network_grid = network_grid_from_segments( grid, channel_segments, include=include, exclude=exclude ) return network_grid def get_channel_segments(grid, divergent_okay=False, minimum_channel_threshold=0.0): """Extract channel segments from a grid. Each segment includes nodes within the segment, upstream segments, and downstream segments. Parameters ---------- grid : RasterModelGrid Grid from which to extract channel segments. divergent_okay : bool, optional If ``False``, raise an error if the network is divergent (i.e. a channel segment has more than one downstream segments). Returns ------- segments : list Channel segments as lists of grid nodes. Nodes are ordered from downstream to upstream. """ # delineate channel profiler = ChannelProfiler( grid, number_of_watersheds=1, minimum_channel_threshold=minimum_channel_threshold, # outlet_nodes=outlet_nodes, main_channel_only=False, ) profiler.run_one_step() if len(profiler.data_structure) > 1: raise RuntimeError( "number of watersheds is greater than the requested number " f"({len(profiler.data_structure)} > 1)" ) # obtain watershed key (should only be one) watershed = list(profiler.data_structure.keys())[0] segments = [ segment["ids"] for segment in profiler.data_structure[watershed].values() ] return segments def network_grid_from_segments(grid, nodes_at_segment, include="*", exclude=None): """Create a NetworkModelGrid from channel segments.""" channel_network = ChannelSegmentConnector(*nodes_at_segment) for segment in channel_network.root: if len(segment.upstream) == 1: if len(segment.upstream[0]) > 0: print("segments can be joined") xy_of_node = create_xy_of_node(channel_network.root, grid) at_node = get_node_fields( channel_network.root, grid, include=include, exclude=exclude ) reindex_network_nodes(channel_network.root) nodes_at_link = create_network_links(channel_network.root) grid = NetworkModelGrid((xy_of_node[:, 1], xy_of_node[:, 0]), links=nodes_at_link) for name, values in at_node.items(): grid.at_node[name] = values[grid._sorted_nodes] return grid class SegmentReducer: """Base class for reducing the nodes in a segment.""" def reduce(self, segment): """Reduce the number of nodes in a channel segment.""" raise NotImplementedError("reduce") def __call__(self, segment): return self.reduce(segment) @dataclass class SpacingAtLeast(SegmentReducer): """Remove segment nodes to ensure a minimum along-channel spacing.""" xy_of_node: npt.ArrayLike spacing: npt.ArrayLike = 1.0 def __post_init__(self): self.xy_of_node = np.asarray(self.xy_of_node) self.spacing = np.broadcast_to(self.spacing, len(self.xy_of_node)) def calc_distance_along_segment(self, segment): """Calculate the along-channel distance of a segment. Parameters ---------- segment : iterable of int Indices of nodes along a channel. Returns ------- ndarray of int Distances to each node along the channel. """ return np.sqrt( np.sum( np.diff( self.xy_of_node[ segment, ], axis=0, prepend=self.xy_of_node[None, segment[0], :], ) ** 2, axis=1, ) ).cumsum() def reduce(self, segment): nodes = _reduce_to_fewest_nodes( self.xy_of_node[segment], spacing=self.spacing[segment] ) return np.take(segment, nodes) @dataclass class AlongChannelSpacingAtLeast(SpacingAtLeast): """Remove segment nodes to ensure a minimum per-node along-channel spacing.""" def reduce(self, segment): nodes = _reduce_nodes( self.calc_distance_along_segment(segment), spacing=self.spacing[ segment, ], ) return np.take(segment, nodes) class JustEndNodes(SegmentReducer): """Reduce a segment to just its end nodes.""" def reduce(self, segment): return np.asarray([segment[0], segment[-1]]) @dataclass class AtMostNodes(SegmentReducer): """Reduce a segment to a maximum number of nodes.""" count: int = 3 def __post_init__(self): if self.count < 2: raise ValueError( f"unable to reduce a segment to less than two nodes ({self.count})" ) def reduce(self, segment: npt.ArrayLike) -> npt.ArrayLike: if self.count < len(segment): step = len(segment) // (self.count - 2 + 1) reduced_segment = np.append( segment[: -step + 1 : step][: self.count - 1], segment[-1] ) else: reduced_segment = np.asarray(segment) return reduced_segment def spacing_from_drainage_area( drainage_area, a=9.68, b=0.32, n_widths=20.0, ): """Calculate channel spacing based on upstream drainage area of each node. Parameters ---------- drainage_area : number or ndarray Upstream drainage area in km ** 2. Returns ------- ndarray Node spacing in meters. """ return n_widths * (a * drainage_area / (1000**2)) ** b def _reduce_nodes(distance_along_segment, spacing=1.0): """Reduce the number of nodes in a segment based on a minimum spacing. Parameters ---------- distance_along_segment : array of float Distance along a segment to each of the segment's nodes. spacing : float or array of float, optional Minimum spacing for each node along a segment. If a scalar, a constant spacing is used along the segment. Returns ------- list : nodes Indices of nodes to retain after the reduction. Examples -------- >>> from landlab.grid.create_network import _reduce_nodes Maintain a spacing of at least 1.75. >>> distance = [0.0, 1.0, 2.0, 3.0, 4.0] >>> _reduce_nodes(distance, spacing=1.75) [0, 2, 4] If the requested minimum spacing is already smaller than the initial spacing, keep all the nodes. >>> distance = [0.0, 1.0, 2.0, 3.0, 4.0] >>> _reduce_nodes(distance, spacing=0.5) [0, 1, 2, 3, 4] The spacing can be variable from node to node. >>> distance = [0.0, 1.0, 2.0, 3.0, 4.0] >>> _reduce_nodes(distance, spacing=[0.5, 1.0, 2.0, 1.0, 0.5]) [0, 1, 2, 4] The end nodes are always retained. >>> distance = [0.0, 1.0, 2.0, 3.0, 4.0] >>> _reduce_nodes(distance, spacing=100.) [0, 4] """ from bisect import bisect_left distance_along_segment = np.asarray(distance_along_segment) n_nodes = len(distance_along_segment) spacing = np.broadcast_to(spacing, n_nodes) nodes = [] head_node = 0 while head_node < n_nodes - 1: nodes.append(head_node) distance_to_tail_node = distance_along_segment[head_node] + spacing[head_node] tail_node = bisect_left( distance_along_segment, distance_to_tail_node, lo=head_node + 1 ) head_node = tail_node if nodes[-1] < n_nodes - 1: nodes.append(n_nodes - 1) return nodes def calc_distance_to_point(point, points): """Find the euclidian distance between one point and a set of points.""" return np.sqrt(np.sum((point - points) ** 2, axis=1)) def _reduce_to_fewest_nodes(xy_of_node, spacing=1.0): """Reduce to the fewest number of nodes while maintaining a minimum spacing. Parameters ---------- xy_of_node : array of float shape (n_nodes, 2) x and y coordinates of each node along a segment. spacing : float or array of float, optional Minimum spacing for each node along a segment. If a scalar, a constant spacing is used along the segment. Returns ------- list : nodes Indices of nodes to retain after the reduction. >>> from landlab.grid.create_network import _reduce_to_fewest_nodes Maintain a spacing of at least 1.75. >>> xy_of_node = [[0.0, 0.0], [1.0, 0.0], [2.0, 0.0], [3.0, 0.0], [4.0, 0.0]] >>> _reduce_to_fewest_nodes(xy_of_node, spacing=1.75) [0, 2, 4] If the requested minimum spacing is already smaller than the initial spacing, keep all the nodes. >>> xy_of_node = [[0.0, 0.0], [1.0, 0.0], [2.0, 0.0], [3.0, 0.0], [4.0, 0.0]] >>> _reduce_to_fewest_nodes(xy_of_node, spacing=0.5) [0, 1, 2, 3, 4] The spacing can be variable from node to node. >>> xy_of_node = [[0.0, 0.0], [1.0, 0.0], [2.0, 0.0], [3.0, 0.0], [4.0, 0.0]] >>> _reduce_to_fewest_nodes(xy_of_node, spacing=[0.5, 1.0, 2.0, 1.0, 0.5]) [0, 1, 2, 4] The end nodes are always retained. >>> xy_of_node = [[0.0, 0.0], [1.0, 0.0], [2.0, 0.0], [3.0, 0.0], [4.0, 0.0]] >>> _reduce_to_fewest_nodes(xy_of_node, spacing=100.) [0, 4] """ xy_of_node = np.asarray(xy_of_node) n_nodes = len(xy_of_node) spacing = np.broadcast_to(spacing, n_nodes) nodes = [] head_node = 0 while head_node < n_nodes - 1: nodes.append(head_node) distance_from_head = calc_distance_to_point( xy_of_node[head_node], xy_of_node[head_node + 1 :, :] ) try: tail_node = ( np.where(distance_from_head < spacing[head_node])[0][-1] + head_node + 2 ) except IndexError: tail_node = head_node + 1 head_node = tail_node if nodes[-1] != n_nodes - 1: nodes.append(n_nodes - 1) return nodes class SegmentLinkCollector: """Collect links between nodes of segments.""" def __init__(self, links=None): if links is None: self._links = [] else: self._links = list(links) def __call__(self, segment): """Add links between segment nodes to those previously collected.""" try: nodes = [segment.downstream._nodes[-1]] except AttributeError: nodes = [segment._nodes[0]] nodes.extend(segment._nodes[1:]) for head, tail in pairwise(nodes): self._links.append((head, tail)) @property def links(self): """Head and tail nodes of all collected links.""" return self._links class ChannelSegment: """A channel segment. Parameters ---------- nodes : iterable of int The nodes of the channel, listed from downstream to upstream. """ def __init__(self, nodes): self._nodes = None self._upstream = [] self._downstream = None self.nodes = nodes def __iter__(self): yield self for upstream in self._upstream: for segment in upstream: yield segment def __len__(self): return len(self._nodes) def __repr__(self): return f"ChannelSegment({self._nodes})" def for_each(self, func): for segment in self: func(segment) def iter_downstream(self): yield self try: iter_downstream = self.downstream.iter_downstream except AttributeError: pass else: for segment in iter_downstream(): yield segment def count_segments(self, direction="upstream"): count = 0 if direction == "upstream": iter = self.__iter__ elif direction == "downstream": iter = self.iter_downstream else: raise ValueError(f"direction not understood ({direction})") for _ in iter(): count += 1 return count - 1 @property def downstream(self): """The downstream segment.""" return self._downstream @downstream.setter def downstream(self, segment): self._downstream = segment segment.add_upstream(self) @property def upstream(self): """The upstream segments.""" return tuple(self._upstream) def add_upstream(self, segment): """Add an upstream segment.""" self._upstream.append(segment) segment._downstream = self @property def downstream_node(self): """The most downstream node of the channel segment.""" return self._nodes[0] @property def upstream_node(self): """The most upstream node of the channel segment.""" return self._nodes[-1] @property def nodes(self): """The nodes of the segment, from downstream to upstream.""" return self._nodes @nodes.setter def nodes(self, nodes): self._nodes = np.array(nodes, copy=True) class DisconnectedSegmentError(Exception): """Raise this exception if a channel segment cannot be connected to a network.""" pass class ChannelSegmentConnector: """Connect channel segments to form a network.""" def __init__(self, *args): """ChannelSegmentConnector(channel1, channel2, ...)""" self._root = None self._orphans = [] for segment in args: self.add(segment) @property def root(self): """The root (most downstream) channel of the network.""" return self._root @property def orphans(self): """Channel segments that are not connected to the main network.""" return tuple(self._orphans) def set_root(self, new_root): if self._root is None: pass elif self._root.downstream_node == new_root.upstream_node: new_root.add_upstream(self._root) else: self._orphans.append(self._root) self._root = new_root return self._root def _add_or_raise(self, new_segment): """Try to add a segment to the network, raise an error if disconnected.""" is_orphan = True if ( self._root is None or self._root.downstream_node == new_segment.upstream_node ): self._root = self.set_root(new_segment) is_orphan = False else: for segment in self._root: if new_segment.downstream_node == segment.upstream_node: segment.add_upstream(new_segment) is_orphan = False break if is_orphan: raise DisconnectedSegmentError() return self._root def _add_orphans(self): """Add orphans to the root.""" orphans = [] for orphan in self._orphans: try: self._root = self._add_or_raise(orphan) except DisconnectedSegmentError: orphans.append(orphan) return orphans def add(self, new_segment): """Add a new segment to the network.""" if not isinstance(new_segment, ChannelSegment): new_segment = ChannelSegment(new_segment) try: self._root = self._add_or_raise(new_segment) except DisconnectedSegmentError: is_orphan = True else: is_orphan = False if not is_orphan: self._orphans = self._add_orphans() else: self._orphans.append(new_segment) def __repr__(self): return f"ChannelConnector({self._root})" def create_xy_of_node(network, grid): """Create an array of coordinates for each node of a channel network.""" xy_of_node_collector = SegmentNodeCoordinateCollector(grid) network.for_each(xy_of_node_collector) return np.asarray(xy_of_node_collector.xy_of_node) class SegmentNodeCoordinateCollector: """Collect xy coordinates for each node along segments.""" def __init__(self, grid): self._grid = grid self._xy_of_node = [] def __call__(self, segment): """Add coordinates of the nodes of a segment to previously collected coordinates.""" if segment.downstream is None: nodes = segment._nodes else: nodes = segment._nodes[1:] self._xy_of_node.extend( zip(self._grid.x_of_node[nodes], self._grid.y_of_node[nodes]) ) @property def xy_of_node(self): """Coordinates of all collected nodes.""" return self._xy_of_node def get_node_fields(network, grid, include="*", exclude=None): """Get field values for each node of a channel network. Parameters ---------- network : ChannelSegment A channel network to extract fields for. grid : ModelGrid Grid from which to extract fields from. include : str or list of str, optional Patterns to use for including fields. exclude : str or list of str, optional Patterns to use for excluding fields. Returns ------- at_node : dict Dictionary of node fields for each node of a channel network. """ if isinstance(include, str): include = [include] include = [ pattern if pattern.startswith("at_") else f"at_node:{pattern}" for pattern in include ] node_fields = set() for canonical_name in grid.fields(include=include, exclude=exclude): dim, name = canonical_name[len("at_") :].split(":") dim == "node" and node_fields.add(name) at_node = {} for name in node_fields: field_value_collector = SegmentFieldCollector(grid.at_node[name]) network.for_each(field_value_collector) at_node[name] = np.asarray(field_value_collector.values) return at_node class SegmentFieldCollector: """Collect field values for each node along segments.""" def __init__(self, field): self._field = field self._values = [] def __call__(self, segment): """Add field values for nodes along a segment to previously collected values.""" if segment.downstream is None: nodes = segment._nodes else: nodes = segment._nodes[1:] self._values.extend(self._field[nodes]) @property def values(self): """Field values of all collected nodes.""" return self._values def reindex_network_nodes(network): """Reindex the nodes of a channel network.""" node_reindexer = SegmentNodeReindexer() network.for_each(node_reindexer) return network class SegmentNodeReindexer: """Reindex nodes along segments.""" def __init__(self, nodes=None): if nodes is None: self._nodes = [] else: self._nodes = list(nodes) def __call__(self, segment): """Reindex nodes of a segment based on previously collected nodes.""" try: start = self._nodes[-1] + 1 except IndexError: start = 0 try: downstream_node = segment.downstream._nodes[-1] except AttributeError: segment._nodes = list(range(start, start + len(segment))) else: segment._nodes = [downstream_node] + list( range(start, start + len(segment) - 1) ) self._nodes.extend(segment._nodes) @property def nodes(self): """Reindexed nodes of all collected nodes.""" return self._nodes def create_network_links(network): """Create links between nodes of the channels of a network. Parameters ---------- network : ChannelSegment Channel network to create links for. Returns ------- links : list of tuple Links for network as *(head_node, tail_node)*.""" collect_segment_links = SegmentLinkCollector() network.for_each(collect_segment_links) return collect_segment_links.links
{ "content_hash": "098e617e38af9bc86c99bd5e352ab8e1", "timestamp": "", "source": "github", "line_count": 776, "max_line_length": 92, "avg_line_length": 28.75644329896907, "alnum_prop": 0.5954738964821868, "repo_name": "landlab/landlab", "id": "88efa002aaa819b7c4bdfe708225f876070933a8", "size": "22339", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "landlab/grid/create_network.py", "mode": "33188", "license": "mit", "language": [ { "name": "C++", "bytes": "762" }, { "name": "Cython", "bytes": "265735" }, { "name": "Gherkin", "bytes": "1601" }, { "name": "Jupyter Notebook", "bytes": "1373117" }, { "name": "Makefile", "bytes": "2250" }, { "name": "Python", "bytes": "4497175" }, { "name": "Roff", "bytes": "445" }, { "name": "Shell", "bytes": "1073" }, { "name": "TeX", "bytes": "42252" } ], "symlink_target": "" }
See the README section on [DA Methods](https://github.com/nansencenter/DAPPER#DA-Methods) for an overview of the methods included with DAPPER. ## Defining your own method Follow the example of one of the methods within one of the sub-directories/packages. The simplest example is perhaps `dapper.da_methods.ensemble.EnKF`. ## General advice for programming/debugging scientific experiments - Start with something simple. This helps make sure the basics of the experiment are reasonable. For example, start with - a pre-existing example, - something you are able to reproduce, - a small/simple model. - Set the observation error to be small. - Observe everything. - Don't include model error and/or noise to begin with. - Additionally, test a simple/baseline method to begin with. When including an ensemble method, start with using a large ensemble, and introduce localisation later. - Take incremental steps towards your ultimate experiment setup. Validate each incremental setup with prints/plots. If results change, make sure you understand why. - Use short experiment duration. You probably don't need statistical significance while debugging.
{ "content_hash": "6c792d6e170916be57b51b944f1a241c", "timestamp": "", "source": "github", "line_count": 35, "max_line_length": 71, "avg_line_length": 34.65714285714286, "alnum_prop": 0.7584501236603463, "repo_name": "nansencenter/DAPPER", "id": "7a187be42509816f1027ffaab94664cee37b9d99", "size": "1213", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "dapper/da_methods/README.md", "mode": "33188", "license": "mit", "language": [ { "name": "Fortran", "bytes": "54649" }, { "name": "Makefile", "bytes": "907" }, { "name": "Python", "bytes": "609077" }, { "name": "Shell", "bytes": "2975" } ], "symlink_target": "" }
import React from 'react'; export default function Placeholder() { return ( <div className="placeholder"> <div className="spinner"> <div className="rect1"></div> <div className="rect2"></div> <div className="rect3"></div> <div className="rect4"></div> <div className="rect5"></div> </div> </div> ); }
{ "content_hash": "90b3c8483d912bdbf061bb25d517159c", "timestamp": "", "source": "github", "line_count": 15, "max_line_length": 39, "avg_line_length": 24.4, "alnum_prop": 0.5628415300546448, "repo_name": "jasonslyvia/react-lazyload", "id": "cd73972c005175e17806308120539c3737d29292", "size": "366", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "examples/components/Placeholder.js", "mode": "33188", "license": "mit", "language": [ { "name": "JavaScript", "bytes": "51686" } ], "symlink_target": "" }
using UnityEngine; using System.Collections; using UnityEngine.UI; public class PlayerInfo : MonoBehaviour { public string playerName; public string identification; [SerializeField] RawImage imgIsReady; [SerializeField] Text txtPlayerName; [SerializeField] Texture imgReady, imgUnready; public bool isReady { get { return _isReady; } set { _isReady = value; if (value) imgIsReady.texture = imgReady; else imgIsReady.texture = imgUnready; } } bool _isReady; // Use this for initialization void Start () { isReady = false; txtPlayerName.text = playerName; } // Update is called once per frame void Update () { } }
{ "content_hash": "7a428b6b243caf4a4078353924af0c76", "timestamp": "", "source": "github", "line_count": 34, "max_line_length": 53, "avg_line_length": 21.941176470588236, "alnum_prop": 0.6300268096514745, "repo_name": "ciiwolstudio/FleeOrFace", "id": "25e7d75db8ce3c7bd3cd6b5eeef3c236f34bc305", "size": "748", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Assets/Scripts/Menu/PlayerInfo.cs", "mode": "33188", "license": "mit", "language": [ { "name": "C#", "bytes": "757423" }, { "name": "GLSL", "bytes": "358458" } ], "symlink_target": "" }
#include <stdint.h> #include <stdio.h> /* * The basic idea of a pre-generated table is that we, for each leftmost * byte in the current CRC16, pre-calculate the XOR pattern with a 0x00 input * byte. We can then create the next CRC by using the old rightmost byte as * the new leftmost byte, the new data as the rightmost byte, and XOR this new * 16-bit word with the contents of the lookup table. We index our lookup * table using the old leftmost byte, as it is what controls the XOR * operations in the CRC. */ int main(void) { uint16_t i; int j; int xor_flag; uint16_t result; /* Print header */ printf("/*\n" " * This file is autogenerated by %s\n" " * See http://github.com/zqad/crc16-ccitt" " for more information\n" " */\n\n", __FILE__); printf("#include <stdint.h>\n\n"); printf("uint16_t crc16_ccitt_table[] = {\n\t"); for (i = 0; i < 256; i++) { result = i << 8; for (j = 0; j < 8; j++) { /* Flag for XOR if leftmost bit is set */ xor_flag = result & 0x8000; /* Shift CRC */ result <<= 1; /* Perform the XOR */ if (xor_flag) result ^= 0x1021; } printf("0x%04hX,", result); /* Pretty formatting */ if ((i + 1) % 8) printf(" "); else if (i != 255) printf("\n\t"); } printf("\n};\n"); }
{ "content_hash": "521a5535f1333a4cf783d4a853e637fe", "timestamp": "", "source": "github", "line_count": 53, "max_line_length": 78, "avg_line_length": 24.07547169811321, "alnum_prop": 0.6073667711598746, "repo_name": "zqad/crc16-ccitt", "id": "708776a2e8bbb0120a95470c4aa8f0e4393e43ba", "size": "2397", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "crc16-ccitt-generate-table.c", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "12656" } ], "symlink_target": "" }
import sys import relative_note_net import midi if __name__ == '__main__': if len(sys.argv) != 3: print 'Requires midi files as args, src then dest' exit(1) filename = sys.argv[1] outfile = sys.argv[2] notelist = relative_note_net.get_notelist_for_xml(filename) tracklist = [] # for notelist in notelists: # tracklist.append(relative_note_net.note_list_to_midi(notelist)) #55 ticks per slice tracklist.append(relative_note_net.note_list_to_midi_XML(notelist)) midi.write_midifile(outfile, midi.Pattern(tracklist))
{ "content_hash": "91843fbe2c8af4becb0abdc04019b44c", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 69, "avg_line_length": 23.869565217391305, "alnum_prop": 0.697632058287796, "repo_name": "grant/algorithm-music", "id": "1c9cc185c313375b59e9a0eda4ac9d65d93fd84f", "size": "549", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "neuralnet/miditestthru.py", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "6914" }, { "name": "HTML", "bytes": "701" }, { "name": "JavaScript", "bytes": "384222" }, { "name": "OpenEdge ABL", "bytes": "31675913" }, { "name": "Python", "bytes": "130660" }, { "name": "Shell", "bytes": "2365" } ], "symlink_target": "" }
SYNONYM #### According to The Catalogue of Life, 3rd January 2011 #### Published in Phytopathology 34: 392 (1944) #### Original name Fusarium avenaceum var. fabae T.F. Yu, 1944 ### Remarks null
{ "content_hash": "c8d5d44c0f222a1c43046f732b4e6b36", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 43, "avg_line_length": 15.153846153846153, "alnum_prop": 0.7106598984771574, "repo_name": "mdoering/backbone", "id": "83f19ad7b9f48c75561e9dbf711af550af5270d1", "size": "264", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "life/Fungi/Ascomycota/Sordariomycetes/Hypocreales/Nectriaceae/Gibberella/Gibberella avenacea/ Syn. Fusarium avenaceum fabae/README.md", "mode": "33188", "license": "apache-2.0", "language": [], "symlink_target": "" }