text
stringlengths
2
1.04M
meta
dict
/** * Connections * (sails.config.connections) * * `Connections` are like "saved settings" for your adapters. What's the difference between * a connection and an adapter, you might ask? An adapter (e.g. `sails-mysql`) is generic-- * it needs some additional information to work (e.g. your database host, password, user, etc.) * A `connection` is that additional information. * * Each model must have a `connection` property (a string) which is references the name of one * of these connections. If it doesn't, the default `connection` configured in `config/models.js` * will be applied. Of course, a connection can (and usually is) shared by multiple models. * . * Note: If you're using version control, you should put your passwords/api keys * in `config/local.js`, environment variables, or use another strategy. * (this is to prevent you inadvertently sensitive credentials up to your repository.) * * For more information on configuration, check out: * http://sailsjs.org/#/documentation/reference/sails.config/sails.config.connections.html */ module.exports.connections = { /*************************************************************************** * * * Local disk storage for DEVELOPMENT ONLY * * * * Installed by default. * * * ***************************************************************************/ localDiskDb: { adapter: 'sails-disk' }, /*************************************************************************** * * * MySQL is the world's most popular relational database. * * http://en.wikipedia.org/wiki/MySQL * * * * Run: npm install sails-mysql * * * ***************************************************************************/ someMysqlServer: { adapter: 'sails-mysql', host: 'YOUR_MYSQL_SERVER_HOSTNAME_OR_IP_ADDRESS', user: 'YOUR_MYSQL_USER', password: 'YOUR_MYSQL_PASSWORD', database: 'YOUR_MYSQL_DB' }, /*************************************************************************** * * * MongoDB is the leading NoSQL database. * * http://en.wikipedia.org/wiki/MongoDB * * * * Run: npm install sails-mongo * * * ***************************************************************************/ someMongodbServer: { adapter: 'sails-mongo', host: 'localhost', port: 27017, // user: 'username', // password: 'password', database: 'mySailsDB' }, /*************************************************************************** * * * PostgreSQL is another officially supported relational database. * * http://en.wikipedia.org/wiki/PostgreSQL * * * * Run: npm install sails-postgresql * * * * * ***************************************************************************/ somePostgresqlServer: { adapter: 'sails-postgresql', host: 'YOUR_POSTGRES_SERVER_HOSTNAME_OR_IP_ADDRESS', user: 'YOUR_POSTGRES_USER', password: 'YOUR_POSTGRES_PASSWORD', database: 'YOUR_POSTGRES_DB' } /*************************************************************************** * * * More adapters: https://github.com/balderdashy/sails * * * ***************************************************************************/ };
{ "content_hash": "21ba89390e7d5a0992a4f6f3d92d03de", "timestamp": "", "source": "github", "line_count": 95, "max_line_length": 98, "avg_line_length": 49.38947368421053, "alnum_prop": 0.3446291560102302, "repo_name": "ufik/charity-starter", "id": "f1e13f4f9621e79c091799f1df50174ed58026c0", "size": "4692", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "config/connections.js", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "874" }, { "name": "JavaScript", "bytes": "97014" }, { "name": "Shell", "bytes": "283" } ], "symlink_target": "" }
package org.tinylog.impl.format.pattern.placeholders; import java.util.EnumSet; import java.util.Set; import org.tinylog.impl.LogEntry; import org.tinylog.impl.LogEntryValue; import org.tinylog.impl.format.pattern.ValueType; /** * Placeholder implementation for resolving the source thread ID of a log entry. */ public class ThreadIdPlaceholder implements Placeholder { /** */ public ThreadIdPlaceholder() { } @Override public Set<LogEntryValue> getRequiredLogEntryValues() { return EnumSet.of(LogEntryValue.THREAD); } @Override public ValueType getType() { return ValueType.LONG; } @Override public Long getValue(LogEntry entry) { Thread thread = entry.getThread(); return thread == null ? null : thread.getId(); } @Override public void render(StringBuilder builder, LogEntry entry) { Thread thread = entry.getThread(); builder.append(thread == null ? "?" : thread.getId()); } }
{ "content_hash": "ed5b5cb675bbce47a85e98e15545c710", "timestamp": "", "source": "github", "line_count": 41, "max_line_length": 80, "avg_line_length": 22.390243902439025, "alnum_prop": 0.7396514161220044, "repo_name": "pmwmedia/tinylog", "id": "db7be45cc2d86cc040fc7c834faffd244c03aaa5", "size": "918", "binary": false, "copies": "1", "ref": "refs/heads/v3.0", "path": "tinylog-impl/src/main/java/org/tinylog/impl/format/pattern/placeholders/ThreadIdPlaceholder.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "2001571" }, { "name": "Kotlin", "bytes": "145725" }, { "name": "Scala", "bytes": "229130" } ], "symlink_target": "" }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>pi-agm: 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.5.0~camlp4 / pi-agm - 1.0.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> pi-agm <small> 1.0.0 <span class="label label-info">Not compatible 👼</span> </small> </h1> <p>📅 <em><script>document.write(moment("2022-08-05 09:13:08 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-08-05 09:13:08 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-num base Num library distributed with the OCaml compiler base-ocamlbuild base OCamlbuild binary and libraries distributed with the OCaml compiler base-threads base base-unix base camlp4 4.02+7 Camlp4 is a system for writing extensible parsers for programming languages conf-findutils 1 Virtual package relying on findutils conf-which 1 Virtual package relying on which coq 8.5.0~camlp4 Formal proof management system num 0 The Num library for arbitrary-precision integer and rational arithmetic ocaml 4.02.3 The OCaml compiler (virtual package) ocaml-base-compiler 4.02.3 Official 4.02.3 release ocaml-config 1 OCaml Switch Configuration ocamlbuild 0 Build system distributed with the OCaml compiler since OCaml 3.10.0 # opam file: opam-version: &quot;2.0&quot; name: &quot;coq-pi-agm&quot; version: &quot;1.0.0&quot; maintainer: &quot;yves.bertot@inria.fr&quot; homepage: &quot;http://www-sop.inria.fr/members/Yves.Bertot/&quot; bug-reports: &quot;yves.bertot@inria.fr&quot; license: &quot;CeCILL-B&quot; build: [ make &quot;-j&quot; &quot;%{jobs}%&quot; ] install: [ make &quot;install&quot; &quot;DEST=&#39;%{lib}%/coq/user-contrib/pi_agm&#39;&quot; ] remove: [ &quot;sh&quot; &quot;-c&quot; &quot;rm -rf &#39;%{lib}%/coq/user-contrib/pi_agm&#39;&quot; ] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.4pl4&quot; &amp; &lt; &quot;8.5~&quot;} &quot;coq-ssreflect&quot; {= &quot;1.5.0&quot;} &quot;coq-coquelicot&quot; {= &quot;2.0.1&quot;} ] tags: [ &quot;keyword:real analysis&quot; &quot;keyword:pi&quot; &quot;category:Mathematics/Real Calculus and Topology&quot; ] authors: [ &quot;Yves Bertot &lt;yves.bertot@inria.fr&gt;&quot; ] synopsis: &quot;Computing thousands or millions of digits of PI with arithmetic-geometric means&quot; description: &quot;&quot;&quot; This is a proof of correctness for an algorithm to compute PI to high precision using an algorithm based on arithmetic-geometric means. A first file contains the calculus-based proofs for an abstract view of the algorithm, where all numbers are real numbers. A second file describes how to approximate all computations using large integers. The whole development can be used to produce mathematically proved and formally verified approximations of PI.&quot;&quot;&quot; url { src: &quot;http://www-sop.inria.fr/members/Yves.Bertot/proofs/pi_agm_1_0_0.tar.gz&quot; checksum: &quot;md5=adf0c47dff6a77a50de98dfec5d56674&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-pi-agm.1.0.0 coq.8.5.0~camlp4</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.5.0~camlp4). The following dependencies couldn&#39;t be met: - coq-pi-agm -&gt; coq-ssreflect -&gt; coq &lt; 8.5~ -&gt; ocaml &lt; 4.02.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-pi-agm.1.0.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": "32ca6980758f5f5cda0a15814d5b9bd7", "timestamp": "", "source": "github", "line_count": 176, "max_line_length": 159, "avg_line_length": 44.01704545454545, "alnum_prop": 0.5602168581386343, "repo_name": "coq-bench/coq-bench.github.io", "id": "f95e253df20596d646da363f50f7ab7f0f4d81f6", "size": "7772", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "clean/Linux-x86_64-4.02.3-2.0.6/released/8.5.0~camlp4/pi-agm/1.0.0.html", "mode": "33188", "license": "mit", "language": [], "symlink_target": "" }
<meta http-equiv="X-UA-Compatible" content="IE=Edge"> <html class = "ui-mobile-rendering"> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="/quickforms/css/quickforms/quickforms.css" /> <script src = "/quickforms/js/require.min.js" ></script> </head> <body> <div data-role="page" id="formsTabs"> <script type="text/javascript"> require(['/quickforms/js/quickforms.js'],function(){ quickforms.registerReadyFunction(function() { require(['dom/navControl'], function(){ quickforms.loadNav('nav.html','nav'); }); }); }); </script> <div data-role="header"><h1>SAID APP</h1></div> <!--For Header line--> <div id = "nav"></div> <div data-role="content"> <form id ="forms"> </br> <a href="referrals.html" data-theme="b" data-icon="plus" data-role="button" rel="external">Patient Referral Form</a> </br> </br> <a href="training.html" data-theme="b" data-icon="plus" data-role="button" rel ="external">Training form</a> </form> </div> </br> </br> </br> </br> </br> </br> </br> </br> </br> </br> </br> <div data-role="footer"><h1></h1></div> </div> <!-- Main --> </body> </html>
{ "content_hash": "3693e96b1b7ee160ea9d9834c2ad2957", "timestamp": "", "source": "github", "line_count": 48, "max_line_length": 123, "avg_line_length": 26.1875, "alnum_prop": 0.5839299920445505, "repo_name": "uoForms/quickforms3", "id": "9b0729cb132f5f8358557a4ce69d0045b09c4dae", "size": "1257", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "QF3 Apps/said/forms.html", "mode": "33188", "license": "mit", "language": [ { "name": "ASP", "bytes": "17156" }, { "name": "CSS", "bytes": "1422627" }, { "name": "HTML", "bytes": "1911010" }, { "name": "Java", "bytes": "257081" }, { "name": "JavaScript", "bytes": "1914119" }, { "name": "SQLPL", "bytes": "4247" }, { "name": "Visual Basic", "bytes": "356" } ], "symlink_target": "" }
""" ZMQ example using python3's asyncio Bitcoin should be started with the command line arguments: bitcoind -testnet -daemon \ -zmqpubrawtx=tcp://127.0.0.1:28225 \ -zmqpubrawblock=tcp://127.0.0.1:28225 \ -zmqpubhashtx=tcp://127.0.0.1:28225 \ -zmqpubhashblock=tcp://127.0.0.1:28225 We use the asyncio library here. `self.handle()` installs itself as a future at the end of the function. Since it never returns with the event loop having an empty stack of futures, this creates an infinite loop. An alternative is to wrap the contents of `handle` inside `while True`. The `@asyncio.coroutine` decorator and the `yield from` syntax found here was introduced in python 3.4 and has been deprecated in favor of the `async` and `await` keywords respectively. A blocking example using python 2.7 can be obtained from the git history: https://github.com/bitcoin/bitcoin/blob/37a7fe9e440b83e2364d5498931253937abe9294/contrib/zmq/zmq_sub.py """ import binascii import asyncio import zmq import zmq.asyncio import signal import struct import sys if (sys.version_info.major, sys.version_info.minor) < (3, 4): print("This example only works with Python 3.4 and greater") sys.exit(1) port = 28225 class ZMQHandler(): def __init__(self): self.loop = asyncio.get_event_loop() self.zmqContext = zmq.asyncio.Context() self.zmqSubSocket = self.zmqContext.socket(zmq.SUB) self.zmqSubSocket.setsockopt_string(zmq.SUBSCRIBE, "hashblock") self.zmqSubSocket.setsockopt_string(zmq.SUBSCRIBE, "hashtx") self.zmqSubSocket.setsockopt_string(zmq.SUBSCRIBE, "rawblock") self.zmqSubSocket.setsockopt_string(zmq.SUBSCRIBE, "rawtx") self.zmqSubSocket.connect("tcp://127.0.0.1:%i" % port) @asyncio.coroutine def handle(self) : msg = yield from self.zmqSubSocket.recv_multipart() topic = msg[0] body = msg[1] sequence = "Unknown" if len(msg[-1]) == 4: msgSequence = struct.unpack('<I', msg[-1])[-1] sequence = str(msgSequence) if topic == b"hashblock": print('- HASH BLOCK ('+sequence+') -') print(binascii.hexlify(body)) elif topic == b"hashtx": print('- HASH TX ('+sequence+') -') print(binascii.hexlify(body)) elif topic == b"rawblock": print('- RAW BLOCK HEADER ('+sequence+') -') print(binascii.hexlify(body[:80])) elif topic == b"rawtx": print('- RAW TX ('+sequence+') -') print(binascii.hexlify(body)) # schedule ourselves to receive the next message asyncio.ensure_future(self.handle()) def start(self): self.loop.add_signal_handler(signal.SIGINT, self.stop) self.loop.create_task(self.handle()) self.loop.run_forever() def stop(self): self.loop.stop() self.zmqContext.destroy() daemon = ZMQHandler() daemon.start()
{ "content_hash": "542b8fb5d18ef9aa49bd078a451ef607", "timestamp": "", "source": "github", "line_count": 84, "max_line_length": 107, "avg_line_length": 36.392857142857146, "alnum_prop": 0.633954857703631, "repo_name": "GlobalBoost/GlobalBoost-Y", "id": "de051f60f1e233058caf06c92c0c34de6c299082", "size": "3272", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "contrib/zmq/zmq_sub3.4.py", "mode": "33261", "license": "mit", "language": [ { "name": "Assembly", "bytes": "28453" }, { "name": "C", "bytes": "781289" }, { "name": "C++", "bytes": "6028829" }, { "name": "HTML", "bytes": "21860" }, { "name": "Java", "bytes": "30290" }, { "name": "M4", "bytes": "196776" }, { "name": "Makefile", "bytes": "110650" }, { "name": "Objective-C", "bytes": "3012" }, { "name": "Objective-C++", "bytes": "4202" }, { "name": "Python", "bytes": "1467860" }, { "name": "QMake", "bytes": "756" }, { "name": "Shell", "bytes": "78870" } ], "symlink_target": "" }
title: "HOWTO: Jimmac mouse cursors on XP" slug: "howto-jimmac-mouse-cursors-on-xp" date: "2007-06-21T10:33:38-06:00" author: "fak3r" categories: - geek - howto - linux tags: - hacker - howto --- and get into its config menu, which is a new tab under Settings > Mouse. From the drop down list choose <Broswe>, point it to the theme and you're done. You wouldn't think a change of mouse cursors would change the feel of a system so much, but these do; I feel more at home. Even if you've never used Linux you'll still love this cursor set, try it, it's all free.
{ "content_hash": "ca6bab1eae1e1b1e8d854dbf73f2b92e", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 370, "avg_line_length": 40.57142857142857, "alnum_prop": 0.7253521126760564, "repo_name": "philcryer/fak3r.com", "id": "1bc6c841c349e494acde0805452e3905900a1b2d", "size": "572", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "content/post/2007-06-21-howto-jimmac-mouse-cursors-on-xp.md", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "18271" }, { "name": "HTML", "bytes": "7338" }, { "name": "Shell", "bytes": "1866" } ], "symlink_target": "" }
package org.ukettle.system.mapper; import org.springframework.stereotype.Repository; import org.ukettle.basics.base.mapper.BaseMapper; @Repository public interface RestMapper<T extends Object> extends BaseMapper<T> { }
{ "content_hash": "60f81c20ae82e7be54cda80e0991c7c6", "timestamp": "", "source": "github", "line_count": 10, "max_line_length": 69, "avg_line_length": 22.3, "alnum_prop": 0.8161434977578476, "repo_name": "uKettle/kettle", "id": "c66fc7fa5ee2c100cde2abbd362e98462f564bda", "size": "223", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/main/java/org/ukettle/system/mapper/RestMapper.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "81662" }, { "name": "HTML", "bytes": "493" }, { "name": "Java", "bytes": "510546" }, { "name": "JavaScript", "bytes": "98946" } ], "symlink_target": "" }
@interface GSPriceRuleModel : NSObject @property (nonatomic,copy) NSString *price; @property (nonatomic,copy) NSString *step; @property (nonatomic,copy) NSString *mileage; @property (nonatomic,copy) NSString *long_mileage; @property (nonatomic,assign) CGFloat distance; @end
{ "content_hash": "c67a7014c22ca819ad83c05e0a2c879e", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 50, "avg_line_length": 30.77777777777778, "alnum_prop": 0.7833935018050542, "repo_name": "NY-Z/MaShangTong-Personal", "id": "5e701b377ec357f0f4e66fc47eb7416f25ca5736", "size": "454", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "MaShangTong-Personal/Home/Home-personal/Model/GSPriceRuleModel.h", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "5459" }, { "name": "Objective-C", "bytes": "1139881" } ], "symlink_target": "" }
using System; using System.Xml; using System.Collections; using NUnit.Framework; namespace MonoTests.System.Xml { [TestFixture] public class XmlNodeListTests : Assertion { XmlDocument document; XmlElement documentElement; XmlElement element; XmlNode node; Object obj; IEnumerator enumerator; int index; [SetUp] public void GetReady () { document = new XmlDocument (); } [Test] public void NodeTypesThatCantHaveChildren () { document.LoadXml ("<foo>bar</foo>"); documentElement = document.DocumentElement; node = documentElement.FirstChild; AssertEquals ("Expected a text node.", node.NodeType, XmlNodeType.Text); AssertEquals ("Shouldn't have children.", node.HasChildNodes, false); AssertEquals ("Should be empty node list.", node.ChildNodes.Count, 0); AssertEquals ("Should be empty node list.", node.GetEnumerator().MoveNext(), false); } [Test] public void ZeroChildren () { document.LoadXml ("<foo/>"); documentElement = document.DocumentElement; AssertEquals ("Should be empty node list.", documentElement.GetEnumerator().MoveNext(), false); } [Test] public void OneChild () { document.LoadXml ("<foo><child1/></foo>"); documentElement = document.DocumentElement; AssertEquals ("Incorrect number of children returned from Count property.", documentElement.ChildNodes.Count, 1); index = 1; foreach (XmlNode childNode in documentElement.ChildNodes) { AssertEquals ("Enumerator didn't return correct node.", "child" + index.ToString(), childNode.LocalName); index++; } AssertEquals ("foreach didn't loop over all children correctly.", index, 2); } [Test] public void MultipleChildren () { document.LoadXml ("<foo><child1/><child2/><child3/></foo>"); element = document.DocumentElement; AssertEquals ("Incorrect number of children returned from Count property.", element.ChildNodes.Count, 3); AssertNull ("Index less than zero should have returned null.", element.ChildNodes [-1]); AssertNull ("Index greater than or equal to Count should have returned null.", element.ChildNodes [3]); AssertEquals ("Didn't return the correct child.", element.FirstChild, element.ChildNodes[0]); AssertEquals ("Didn't return the correct child.", "child1", element.ChildNodes[0].LocalName); AssertEquals ("Didn't return the correct child.", "child2", element.ChildNodes[1].LocalName); AssertEquals ("Didn't return the correct child.", "child3", element.ChildNodes[2].LocalName); index = 1; foreach (XmlNode childNode in element.ChildNodes) { AssertEquals ("Enumerator didn't return correct node.", "child" + index.ToString(), childNode.LocalName); index++; } AssertEquals ("foreach didn't loop over all children correctly.", index, 4); } [Test] public void AppendChildAffectOnEnumeration () { document.LoadXml ("<foo><child1/></foo>"); element = document.DocumentElement; enumerator = element.GetEnumerator(); AssertEquals ("MoveNext should have succeeded.", enumerator.MoveNext(), true); AssertEquals ("MoveNext should have failed.", enumerator.MoveNext(), false); enumerator.Reset(); AssertEquals ("MoveNext should have succeeded.", enumerator.MoveNext(), true); element.AppendChild(document.CreateElement("child2")); AssertEquals ("MoveNext should have succeeded.", enumerator.MoveNext(), true); AssertEquals ("MoveNext should have failed.", enumerator.MoveNext(), false); } [Test] public void RemoveChildAffectOnEnumeration () { document.LoadXml ("<foo><child1/><child2/></foo>"); element = document.DocumentElement; enumerator = element.GetEnumerator(); element.RemoveChild(element.FirstChild); enumerator.MoveNext(); AssertEquals ("Expected child2 element.", ((XmlElement)enumerator.Current).LocalName, "child2"); } [Test] public void RemoveChildAffectOnEnumerationWhenEnumeratorIsOnRemovedChild () { document.LoadXml ("<foo><child1/><child2/><child3/></foo>"); element = document.DocumentElement; enumerator = element.GetEnumerator (); enumerator.MoveNext (); enumerator.MoveNext (); AssertEquals ("Expected child2 element.", "child2", ((XmlElement)enumerator.Current).LocalName); AssertEquals ("Expected child2 element.", "child2", element.FirstChild.NextSibling.LocalName); element.RemoveChild (element.FirstChild.NextSibling); enumerator.MoveNext (); try { element = (XmlElement) enumerator.Current; Fail ("Expected an InvalidOperationException."); } catch (InvalidOperationException) { } } // TODO: Take the word save off front of this method when XmlNode.ReplaceChild() is implemented. public void saveTestReplaceChildAffectOnEnumeration () { document.LoadXml ("<foo><child1/><child2/></foo>"); element = document.DocumentElement; node = document.CreateElement("child3"); enumerator = element.GetEnumerator(); AssertEquals ("MoveNext should have succeeded.", enumerator.MoveNext(), true); element.ReplaceChild(node, element.LastChild); enumerator.MoveNext(); AssertEquals ("Expected child3 element.", ((XmlElement)enumerator.Current).LocalName, "child3"); AssertEquals ("MoveNext should have failed.", enumerator.MoveNext(), false); } [Test] public void RemoveOnlyChildAffectOnEnumeration () { document.LoadXml ("<foo><child1/></foo>"); element = document.DocumentElement; enumerator = element.GetEnumerator(); element.RemoveChild(element.FirstChild); AssertEquals ("MoveNext should have failed.", enumerator.MoveNext(), false); } // TODO: Take the word save off front of this method when XmlNode.RemoveAll() is fully implemented. public void saveTestRemoveAllAffectOnEnumeration () { document.LoadXml ("<foo><child1/><child2/><child3/></foo>"); element = document.DocumentElement; enumerator = element.GetEnumerator(); AssertEquals ("Expected 3 children.", element.ChildNodes.Count, 3); AssertEquals ("MoveNext should have succeeded.", enumerator.MoveNext(), true); element.RemoveAll(); AssertEquals ("MoveNext should have failed.", enumerator.MoveNext(), false); } [Test] public void CurrentBeforeFirstNode () { document.LoadXml ("<foo><child1/></foo>"); element = document.DocumentElement; enumerator = element.GetEnumerator(); try { obj = enumerator.Current; Fail ("Calling Current property before first node in list should have thrown InvalidOperationException."); } catch (InvalidOperationException) { } } [Test] public void CurrentAfterLastNode () { document.LoadXml ("<foo><child1/></foo>"); element = document.DocumentElement; enumerator = element.GetEnumerator(); enumerator.MoveNext(); enumerator.MoveNext(); try { obj = enumerator.Current; Fail ("Calling Current property after last node in list should have thrown InvalidOperationException."); } catch (InvalidOperationException) { } } [Test] public void CurrentDoesntMove () { document.LoadXml ("<foo><child1/></foo>"); element = document.DocumentElement; enumerator = element.GetEnumerator(); enumerator.MoveNext(); AssertEquals("Consecutive calls to Current property should yield same reference.", Object.ReferenceEquals(enumerator.Current, enumerator.Current), true); } [Test] public void Reset () { document.LoadXml ("<foo><child1/><child2/></foo>"); element = document.DocumentElement; enumerator = element.GetEnumerator(); enumerator.MoveNext(); enumerator.MoveNext(); AssertEquals("Expected child2.", ((XmlElement)enumerator.Current).LocalName, "child2"); enumerator.Reset(); enumerator.MoveNext(); AssertEquals("Expected child1.", ((XmlElement)enumerator.Current).LocalName, "child1"); } [Test] public void ReturnNullWhenIndexIsOutOfRange () { document.LoadXml ("<root><foo/></root>"); XmlNodeList nl = document.DocumentElement.GetElementsByTagName ("bar"); AssertEquals ("empty list. count", 0, nl.Count); try { AssertNull ("index 0", nl [0]); AssertNull ("index 1", nl [1]); AssertNull ("index -1", nl [-1]); } catch (ArgumentOutOfRangeException) { Fail ("don't throw index out of range."); } } } }
{ "content_hash": "232cf9639fb479750ccedfa9cf3023d3", "timestamp": "", "source": "github", "line_count": 234, "max_line_length": 156, "avg_line_length": 35.26068376068376, "alnum_prop": 0.7088837716640407, "repo_name": "jjenki11/blaze-chem-rendering", "id": "3cab445df30179f8d95db264d22d3e588d0de8c2", "size": "8453", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.XML/Test/System.Xml/XmlNodeListTests.cs", "mode": "33188", "license": "mit", "language": [ { "name": "Shell", "bytes": "2476" } ], "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 Sat Mar 16 04:11:57 MST 2019 --> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Uses of Class org.wildfly.swarm.config.infinispan.cache_container.RemoteCommandThreadPool (BOM: * : All 2.3.1.Final-SNAPSHOT API)</title> <meta name="date" content="2019-03-16"> <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.config.infinispan.cache_container.RemoteCommandThreadPool (BOM: * : All 2.3.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/config/infinispan/cache_container/RemoteCommandThreadPool.html" title="class in org.wildfly.swarm.config.infinispan.cache_container">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.3.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/config/infinispan/cache_container/class-use/RemoteCommandThreadPool.html" target="_top">Frames</a></li> <li><a href="RemoteCommandThreadPool.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.config.infinispan.cache_container.RemoteCommandThreadPool" class="title">Uses of Class<br>org.wildfly.swarm.config.infinispan.cache_container.RemoteCommandThreadPool</h2> </div> <div class="classUseContainer"> <ul class="blockList"> <li class="blockList"> <table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> <caption><span>Packages that use <a href="../../../../../../../org/wildfly/swarm/config/infinispan/cache_container/RemoteCommandThreadPool.html" title="class in org.wildfly.swarm.config.infinispan.cache_container">RemoteCommandThreadPool</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Package</th> <th class="colLast" scope="col">Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><a href="#org.wildfly.swarm.config.infinispan">org.wildfly.swarm.config.infinispan</a></td> <td class="colLast">&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><a href="#org.wildfly.swarm.config.infinispan.cache_container">org.wildfly.swarm.config.infinispan.cache_container</a></td> <td class="colLast">&nbsp;</td> </tr> </tbody> </table> </li> <li class="blockList"> <ul class="blockList"> <li class="blockList"><a name="org.wildfly.swarm.config.infinispan"> <!-- --> </a> <h3>Uses of <a href="../../../../../../../org/wildfly/swarm/config/infinispan/cache_container/RemoteCommandThreadPool.html" title="class in org.wildfly.swarm.config.infinispan.cache_container">RemoteCommandThreadPool</a> in <a href="../../../../../../../org/wildfly/swarm/config/infinispan/package-summary.html">org.wildfly.swarm.config.infinispan</a></h3> <table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> <caption><span>Methods in <a href="../../../../../../../org/wildfly/swarm/config/infinispan/package-summary.html">org.wildfly.swarm.config.infinispan</a> that return <a href="../../../../../../../org/wildfly/swarm/config/infinispan/cache_container/RemoteCommandThreadPool.html" title="class in org.wildfly.swarm.config.infinispan.cache_container">RemoteCommandThreadPool</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code><a href="../../../../../../../org/wildfly/swarm/config/infinispan/cache_container/RemoteCommandThreadPool.html" title="class in org.wildfly.swarm.config.infinispan.cache_container">RemoteCommandThreadPool</a></code></td> <td class="colLast"><span class="typeNameLabel">CacheContainer.CacheContainerResources.</span><code><span class="memberNameLink"><a href="../../../../../../../org/wildfly/swarm/config/infinispan/CacheContainer.CacheContainerResources.html#remoteCommandThreadPool--">remoteCommandThreadPool</a></span>()</code> <div class="block">Defines a thread pool used to execute remote commands.</div> </td> </tr> </tbody> </table> <table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> <caption><span>Methods in <a href="../../../../../../../org/wildfly/swarm/config/infinispan/package-summary.html">org.wildfly.swarm.config.infinispan</a> with parameters of type <a href="../../../../../../../org/wildfly/swarm/config/infinispan/cache_container/RemoteCommandThreadPool.html" title="class in org.wildfly.swarm.config.infinispan.cache_container">RemoteCommandThreadPool</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code><a href="../../../../../../../org/wildfly/swarm/config/infinispan/CacheContainer.html" title="type parameter in CacheContainer">T</a></code></td> <td class="colLast"><span class="typeNameLabel">CacheContainer.</span><code><span class="memberNameLink"><a href="../../../../../../../org/wildfly/swarm/config/infinispan/CacheContainer.html#remoteCommandThreadPool-org.wildfly.swarm.config.infinispan.cache_container.RemoteCommandThreadPool-">remoteCommandThreadPool</a></span>(<a href="../../../../../../../org/wildfly/swarm/config/infinispan/cache_container/RemoteCommandThreadPool.html" title="class in org.wildfly.swarm.config.infinispan.cache_container">RemoteCommandThreadPool</a>&nbsp;value)</code> <div class="block">Defines a thread pool used to execute remote commands.</div> </td> </tr> </tbody> </table> </li> <li class="blockList"><a name="org.wildfly.swarm.config.infinispan.cache_container"> <!-- --> </a> <h3>Uses of <a href="../../../../../../../org/wildfly/swarm/config/infinispan/cache_container/RemoteCommandThreadPool.html" title="class in org.wildfly.swarm.config.infinispan.cache_container">RemoteCommandThreadPool</a> in <a href="../../../../../../../org/wildfly/swarm/config/infinispan/cache_container/package-summary.html">org.wildfly.swarm.config.infinispan.cache_container</a></h3> <table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing classes, and an explanation"> <caption><span>Classes in <a href="../../../../../../../org/wildfly/swarm/config/infinispan/cache_container/package-summary.html">org.wildfly.swarm.config.infinispan.cache_container</a> with type parameters of type <a href="../../../../../../../org/wildfly/swarm/config/infinispan/cache_container/RemoteCommandThreadPool.html" title="class in org.wildfly.swarm.config.infinispan.cache_container">RemoteCommandThreadPool</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Class and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code>class&nbsp;</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/wildfly/swarm/config/infinispan/cache_container/RemoteCommandThreadPool.html" title="class in org.wildfly.swarm.config.infinispan.cache_container">RemoteCommandThreadPool</a>&lt;T extends <a href="../../../../../../../org/wildfly/swarm/config/infinispan/cache_container/RemoteCommandThreadPool.html" title="class in org.wildfly.swarm.config.infinispan.cache_container">RemoteCommandThreadPool</a>&lt;T&gt;&gt;</span></code> <div class="block">Defines a thread pool used to execute remote commands.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>interface&nbsp;</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/wildfly/swarm/config/infinispan/cache_container/RemoteCommandThreadPoolConsumer.html" title="interface in org.wildfly.swarm.config.infinispan.cache_container">RemoteCommandThreadPoolConsumer</a>&lt;T extends <a href="../../../../../../../org/wildfly/swarm/config/infinispan/cache_container/RemoteCommandThreadPool.html" title="class in org.wildfly.swarm.config.infinispan.cache_container">RemoteCommandThreadPool</a>&lt;T&gt;&gt;</span></code>&nbsp;</td> </tr> <tr class="altColor"> <td class="colFirst"><code>interface&nbsp;</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/wildfly/swarm/config/infinispan/cache_container/RemoteCommandThreadPoolSupplier.html" title="interface in org.wildfly.swarm.config.infinispan.cache_container">RemoteCommandThreadPoolSupplier</a>&lt;T extends <a href="../../../../../../../org/wildfly/swarm/config/infinispan/cache_container/RemoteCommandThreadPool.html" title="class in org.wildfly.swarm.config.infinispan.cache_container">RemoteCommandThreadPool</a>&gt;</span></code>&nbsp;</td> </tr> </tbody> </table> <table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> <caption><span>Methods in <a href="../../../../../../../org/wildfly/swarm/config/infinispan/cache_container/package-summary.html">org.wildfly.swarm.config.infinispan.cache_container</a> that return <a href="../../../../../../../org/wildfly/swarm/config/infinispan/cache_container/RemoteCommandThreadPool.html" title="class in org.wildfly.swarm.config.infinispan.cache_container">RemoteCommandThreadPool</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code><a href="../../../../../../../org/wildfly/swarm/config/infinispan/cache_container/RemoteCommandThreadPool.html" title="class in org.wildfly.swarm.config.infinispan.cache_container">RemoteCommandThreadPool</a></code></td> <td class="colLast"><span class="typeNameLabel">RemoteCommandThreadPoolSupplier.</span><code><span class="memberNameLink"><a href="../../../../../../../org/wildfly/swarm/config/infinispan/cache_container/RemoteCommandThreadPoolSupplier.html#get--">get</a></span>()</code> <div class="block">Constructed instance of RemoteCommandThreadPool resource</div> </td> </tr> </tbody> </table> </li> </ul> </li> </ul> </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/config/infinispan/cache_container/RemoteCommandThreadPool.html" title="class in org.wildfly.swarm.config.infinispan.cache_container">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.3.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/config/infinispan/cache_container/class-use/RemoteCommandThreadPool.html" target="_top">Frames</a></li> <li><a href="RemoteCommandThreadPool.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; 2019 <a href="http://www.jboss.org">JBoss by Red Hat</a>. All rights reserved.</small></p> </body> </html>
{ "content_hash": "563c71de1b4f4d4e2ac63ddfefdde83b", "timestamp": "", "source": "github", "line_count": 232, "max_line_length": 555, "avg_line_length": 61.375, "alnum_prop": 0.6876185125359927, "repo_name": "wildfly-swarm/wildfly-swarm-javadocs", "id": "190b7bd95f1b85641089e2e6fb79be2dc79ba325", "size": "14239", "binary": false, "copies": "1", "ref": "refs/heads/gh-pages", "path": "2.3.1.Final-SNAPSHOT/apidocs/org/wildfly/swarm/config/infinispan/cache_container/class-use/RemoteCommandThreadPool.html", "mode": "33188", "license": "apache-2.0", "language": [], "symlink_target": "" }
--- uid: SolidEdgePart.FaceSet.Application summary: remarks: ---
{ "content_hash": "5a250c89e39f68b30f8ee2085a330dfc", "timestamp": "", "source": "github", "line_count": 5, "max_line_length": 38, "avg_line_length": 13.6, "alnum_prop": 0.7058823529411765, "repo_name": "SolidEdgeCommunity/docs", "id": "294e1eb0900afe1da2aac282f5f17283467da9b7", "size": "70", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "docfx_project/apidoc/SolidEdgePart.FaceSet.Application.md", "mode": "33188", "license": "mit", "language": [ { "name": "Batchfile", "bytes": "38" }, { "name": "C#", "bytes": "5048212" }, { "name": "C++", "bytes": "2265" }, { "name": "CSS", "bytes": "148" }, { "name": "PowerShell", "bytes": "180" }, { "name": "Smalltalk", "bytes": "1996" }, { "name": "Visual Basic", "bytes": "10236277" } ], "symlink_target": "" }
<?php namespace ApiBundle\Controller; use ApiBundle\Dispatcher\DispatcherEntryEvent; use ApiBundle\Dispatcher\DispatcherEventName; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Security\Core\Exception\InvalidArgumentException; /** * Class DispatcherController * @package AppBundle\Controller * @Route("/api/dispatcher") */ class DispatcherController extends Controller { /** * @Route("/entry", name="api_dispatcher_entry") * @Method("POST") * * @param Request $request * @return JsonResponse */ public function entryAction(Request $request) { if(!$request->request->has('eventkey')) { throw new InvalidArgumentException("Missing eventKey parameter"); } if(!$request->request->has('eventvalue')) { throw new InvalidArgumentException("Missing eventValue parameter"); } $eventkey = $request->get('eventKey'); $eventvalue = $request->get('eventValue'); $this->get('event_dispatcher')->dispatch(DispatcherEventName::API_DISPATCHER_ENTRY, new DispatcherEntryEvent($eventkey, $eventvalue)); return new JsonResponse(); } }
{ "content_hash": "fd720ccdc7bf6b548e6d2c4a92c90387", "timestamp": "", "source": "github", "line_count": 45, "max_line_length": 136, "avg_line_length": 29.466666666666665, "alnum_prop": 0.7579185520361991, "repo_name": "acassan/api-bundle", "id": "7bb5f397d8fbf01992b97e51502a75df9d611424", "size": "1326", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Controller/DispatcherController.php", "mode": "33188", "license": "mit", "language": [ { "name": "PHP", "bytes": "16711" } ], "symlink_target": "" }
/* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/> * @author <author> * @Fecha <fecha> * @use <USE DESCRIPCION> */ var app = angular.module('myApp',[]) app.controller('myCtrl',function($scope){ $('#BicicletasparaalquilereDetalle').YellowText(); $scope.guardar = function(){ $('form#BicicletasparaalquilereEditForm').submit(); }; $scope.cancelar = function(){ window.history.back(); }; }) /*** $(document).ready(function(){ IniciarEventos(); }) function IniciarEventos(){ $('#guardar').click(guardardatos) $('#cancelar').click(function(){}) } function guardardatos(){ } **/
{ "content_hash": "9532c43b7baaaf6f602ead3b2d260ddc", "timestamp": "", "source": "github", "line_count": 45, "max_line_length": 73, "avg_line_length": 27.022222222222222, "alnum_prop": 0.6924342105263158, "repo_name": "luisse/tbike", "id": "94037584c1a3c1aed4d8ad42b8af289ddbcd908f", "size": "1216", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "app/webroot/js/bicicletasparaalquileres/edit.js", "mode": "33188", "license": "mit", "language": [ { "name": "Batchfile", "bytes": "3038" }, { "name": "C++", "bytes": "3021" }, { "name": "CSS", "bytes": "390119" }, { "name": "HTML", "bytes": "4005" }, { "name": "Hack", "bytes": "109" }, { "name": "JavaScript", "bytes": "1890720" }, { "name": "PHP", "bytes": "10717596" }, { "name": "Python", "bytes": "3978" }, { "name": "Shell", "bytes": "23555" } ], "symlink_target": "" }
ACCEPTED #### According to The Catalogue of Life, 3rd January 2011 #### Published in Lichenologist 17(3): 305 (1985) #### Original name Stictina insculpta Stizenb. ### Remarks null
{ "content_hash": "a7af4b405ccd89c8396f436df6ecb918", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 39, "avg_line_length": 14.153846153846153, "alnum_prop": 0.717391304347826, "repo_name": "mdoering/backbone", "id": "5c385e54f70632c885b134edd7d29855af678465", "size": "261", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "life/Fungi/Ascomycota/Lecanoromycetes/Peltigerales/Lobariaceae/Pseudocyphellaria/Pseudocyphellaria insculpta/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 (version 1.7.0_17) on Mon Dec 02 20:33:04 CET 2013 --> <title>Uses of Class org.lwjgl.opengl.NVConditionalRender (LWJGL API)</title> <meta name="date" content="2013-12-02"> <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> </head> <body> <script type="text/javascript"><!-- if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Class org.lwjgl.opengl.NVConditionalRender (LWJGL API)"; } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar_top"> <!-- --> </a><a href="#skip-navbar_top" title="Skip navigation links"></a><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/lwjgl/opengl/NVConditionalRender.html" title="class in org.lwjgl.opengl">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> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../index.html?org/lwjgl/opengl/class-use/NVConditionalRender.html" target="_top">Frames</a></li> <li><a href="NVConditionalRender.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../allclasses-noframe.html">All 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.lwjgl.opengl.NVConditionalRender" class="title">Uses of Class<br>org.lwjgl.opengl.NVConditionalRender</h2> </div> <div class="classUseContainer">No usage of org.lwjgl.opengl.NVConditionalRender</div> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar_bottom"> <!-- --> </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><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/lwjgl/opengl/NVConditionalRender.html" title="class in org.lwjgl.opengl">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> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../index.html?org/lwjgl/opengl/class-use/NVConditionalRender.html" target="_top">Frames</a></li> <li><a href="NVConditionalRender.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../allclasses-noframe.html">All 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><i>Copyright &#169; 2002-2009 lwjgl.org. All Rights Reserved.</i></small></p> </body> </html>
{ "content_hash": "1f113cbeec0c7e80ce8c94bbe1ef9d5b", "timestamp": "", "source": "github", "line_count": 116, "max_line_length": 135, "avg_line_length": 37.43103448275862, "alnum_prop": 0.6031782588668816, "repo_name": "CodeConglomerate/TeacherSmash", "id": "476c2d7f56171c29acfd2572bb272b8a99f0009d", "size": "4342", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "dependencies/lwjgl-2.9.1/javadoc/org/lwjgl/opengl/class-use/NVConditionalRender.html", "mode": "33188", "license": "mit", "language": [ { "name": "Java", "bytes": "10484" } ], "symlink_target": "" }
<?php defined('BASEPATH') or exit('No direct script access allowed'); class Field_geocoder { public $field_type_slug = 'geocoder'; public $db_col_type = 'varchar'; public $version = '1.0.0'; public $author = array('name' => 'David Lewis', 'url' => 'http://jedihorsemanship.com'); // -------------------------------------------------------------------------- /** * Output form input * * @access public * @param $data array * @return string */ public function form_output($data) { $value = json_decode($data['value']); $options = array( 'name' => $data['form_slug'], 'id' => $data['form_slug'], 'value' => $data['value'], 'type' => 'hidden', ); $html = '<span id="'.$data['form_slug'].'_msg" class="stream_map_msg"></span>'; $html .= '<div id="'.$data['form_slug'].'_map" class="stream_map"></div>'; $options_input = array( 'id' => $data['form_slug'].'_input', // jhubb81 added name attribute to generated address_input to allow for proper javascript validation 'name' => $data['form_slug'].'_input', # Check if addres exists to maintain backward compatibility 'value' => (!empty($value->address)) ? $value->address : $data['value'], 'type' => 'text', ); return form_input($options).form_input($options_input).$html; } // -------------------------------------------------------------------------- /** * Tag output variables * * Outputs 'latitude' & 'longitude' variables * * @access public * @param string * @param array * @return array */ public function pre_output_plugin($input) { if ( ! $input) return null; $location = json_decode($input); # Maintain backward compatability if (!is_object($location)) { $pieces = explode(',', $input); if (count($pieces) != 2) return null; $array = array( 'lat' => $pieces[0], 'lng' => $pieces[1], 'address' => null, ); $location = (object) $array; } $data = array( 'latitude' => $location->lat, 'longitude' => $location->lng, 'lat' => $location->lat, 'lng' => $location->lng, 'address' => $location->address, ); return $data; } /** * Event * * Load assets * * @access public * @param $field object * @return void */ public function event($field) { $this->CI->type->add_misc('<script src="//maps.google.com/maps/api/js?sensor=false"></script>'); $this->CI->type->add_js('geocoder', 'geocoder.js'); $this->CI->type->add_css('geocoder', 'geocoder.css'); $this->CI->type->add_misc('<script type="text/javascript"> $(document).ready(function() { initialize("'.$field->field_slug.'"); $(".tabs").bind("tabsshow", function(event, ui) { google.maps.event.trigger(map, "resize"); mapLocation(); }); }); </script>'); } }
{ "content_hash": "6393a35bd59cd8d9962db6e0227f7165", "timestamp": "", "source": "github", "line_count": 112, "max_line_length": 104, "avg_line_length": 25.955357142857142, "alnum_prop": 0.5294117647058824, "repo_name": "HighwayofLife/PyroStreams-Geocoder-Field-Type", "id": "9e00095266b465478af103ff551781f74f53745e", "size": "3111", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "field.geocoder.php", "mode": "33188", "license": "bsd-2-clause", "language": [ { "name": "CSS", "bytes": "159" }, { "name": "JavaScript", "bytes": "1722" }, { "name": "PHP", "bytes": "3538" } ], "symlink_target": "" }
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Parser.BusinessLogic.Internal.Interfaces { /// <summary> /// A pair of card numbers that represent a fusable pair of cards, /// and whether or not it is a verified fusion.wh /// </summary> interface IFusable { /// <summary> /// Gets the first card number. /// </summary> /// <value> /// The first card number. /// </value> int FirstCardNumber { get; } /// <summary> /// Gets the second card number. /// </summary> /// <value> /// The second card number. /// </value> int SecondCardNumber { get; } /// <summary> /// Gets a value indicating whether this instance is a verified fusion. /// </summary> /// <value> /// <c>true</c> if this instance is a verified fusion; otherwise, <c>false</c>. /// </value> bool IsVerifiedFusion { get; } } }
{ "content_hash": "058a51c21c56f9aced2e25fefba34301", "timestamp": "", "source": "github", "line_count": 37, "max_line_length": 87, "avg_line_length": 28.72972972972973, "alnum_prop": 0.5522107243650047, "repo_name": "Nbjohnston86/Open-Rose_Duelist", "id": "ac67e687ede3f04af710cb56613e082e23ffb73c", "size": "1065", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "ParsingSolution/Parser.BusinessLogic/Internal/Interfaces/IFusable.cs", "mode": "33188", "license": "mit", "language": [ { "name": "C#", "bytes": "16002" } ], "symlink_target": "" }
namespace base { template <typename T, typename O> class NoDestructor; } // namespace base namespace ui { class AXActionHandlerBase; // An observer is informed of all automation actions. class AXActionHandlerObserver : public base::CheckedObserver { public: // This method is intended to route actions to their final destinations. The // routing is asynchronous and we do not know which observers intend to // respond to which actions -- so we forward all actions to all observers. // Only the observer that owns the unique |tree_id| will perform the action. virtual void PerformAction(const ui::AXActionData& action_data) = 0; }; // This class generates and saves a runtime id for an accessibility tree. // It provides a few distinct forms of generating an id: // - from a frame id (which consists of a process and routing id) // - from a backing |AXActionHandlerBase| object // // The first form allows underlying instances to change but refer to the same // frame. // The second form allows this registry to track the object for later retrieval. class AX_BASE_EXPORT AXActionHandlerRegistry final { public: using FrameID = std::pair<int, int>; // Get the single instance of this class. static AXActionHandlerRegistry* GetInstance(); virtual ~AXActionHandlerRegistry(); AXActionHandlerRegistry(const AXActionHandlerRegistry&) = delete; AXActionHandlerRegistry& operator=(const AXActionHandlerRegistry&) = delete; // Gets the frame id based on an ax tree id. FrameID GetFrameID(const AXTreeID& ax_tree_id); // Gets an ax tree id from a frame id. AXTreeID GetAXTreeID(FrameID frame_id); // Retrieve an |AXActionHandlerBase| based on an ax tree id. AXActionHandlerBase* GetActionHandler(AXTreeID ax_tree_id); // Removes an ax tree id, and its associated delegate and frame id (if it // exists). void RemoveAXTreeID(AXTreeID ax_tree_id); // Associate a frame id with an ax tree id. void SetFrameIDForAXTreeID(const FrameID& frame_id, const AXTreeID& ax_tree_id); void AddObserver(AXActionHandlerObserver* observer); void RemoveObserver(AXActionHandlerObserver* observer); // Calls PerformAction on all observers. void PerformAction(const ui::AXActionData& action_data); private: friend base::NoDestructor<AXActionHandlerRegistry, std::nullptr_t>; // Allows registration of tree ids meant to be internally by AXActionHandler*. // These typically involve the creation of a new tree id. friend AXActionHandler; friend AXActionHandlerBase; AXActionHandlerRegistry(); // Get or create a ax tree id keyed on |handler|. AXTreeID GetOrCreateAXTreeID(AXActionHandlerBase* handler); // Set a mapping between an AXTreeID and AXActionHandlerBase explicitly. void SetAXTreeID(const AXTreeID& ax_tree_id, AXActionHandlerBase* action_handler); // Maps an accessibility tree to its frame via ids. std::map<AXTreeID, FrameID> ax_tree_to_frame_id_map_; // Maps frames to an accessibility tree via ids. std::map<FrameID, AXTreeID> frame_to_ax_tree_id_map_; // Maps an id to its handler. std::map<AXTreeID, AXActionHandlerBase*> id_to_action_handler_; // Tracks all observers. base::ObserverList<AXActionHandlerObserver> observers_; }; } // namespace ui #endif // UI_ACCESSIBILITY_AX_ACTION_HANDLER_REGISTRY_H_
{ "content_hash": "e7db5d111d90d0961eb7e628f180dd40", "timestamp": "", "source": "github", "line_count": 94, "max_line_length": 80, "avg_line_length": 35.776595744680854, "alnum_prop": 0.7415997621171573, "repo_name": "ric2b/Vivaldi-browser", "id": "3b4c07469b4cda1a11a57b822bd37d43b04c6011", "size": "3861", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "chromium/ui/accessibility/ax_action_handler_registry.h", "mode": "33188", "license": "bsd-3-clause", "language": [], "symlink_target": "" }
ACCEPTED #### According to International Plant Names Index #### Published in null #### Original name null ### Remarks null
{ "content_hash": "746bb4b2264548113c4e81dcf81e27b4", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 31, "avg_line_length": 9.692307692307692, "alnum_prop": 0.7063492063492064, "repo_name": "mdoering/backbone", "id": "95f1ab5e20b2b6675f1336c82ee8b1b12c50bdf1", "size": "184", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "life/Plantae/Magnoliophyta/Liliopsida/Asparagales/Amaryllidaceae/Narcissus/Narcissus emeritensis/README.md", "mode": "33188", "license": "apache-2.0", "language": [], "symlink_target": "" }
package com.opennms.lucidity; public class LucidityException extends RuntimeException { private static final long serialVersionUID = 1L; public LucidityException() { super(); } public LucidityException(String message) { super(message); } public LucidityException(Throwable throwable) { super(throwable); } public LucidityException(String message, Throwable throwable) { super(message, throwable); } }
{ "content_hash": "faac3633734faac04200872967ba1e81", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 67, "avg_line_length": 19.12, "alnum_prop": 0.6736401673640168, "repo_name": "eevans/lucidity", "id": "9e46382af532f901fa7f66b8dbd560af171458bd", "size": "1086", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "src/main/java/com/opennms/lucidity/LucidityException.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "88002" } ], "symlink_target": "" }
FIND_PACKAGE(PkgConfig) PKG_CHECK_MODULES(PC_LIBUSB1 libusb-1.0 QUIET) SET(LIBUSB1_DEFINITIONS ${PC_LIBUSB1_CFLAGS_OTHER}) FIND_PATH(LIBUSB1_INCLUDE_DIRS NAMES libusb-1.0/libusb.h HINTS ${PC_LIBUSB1_INCLUDEDIR} ${PC_LIBUSB1_INCLUDE_DIRS} PATH_SUFFIXES libusb-1.0 ) FIND_LIBRARY(LIBUSB1_LIBRARIES NAMES usb-1.0 HINTS ${PC_LIBUSB1_LIBDIR} ${PC_LIBUSB1_LIBRARY_DIRS} ) # handle the QUIETLY and REQUIRED arguments and set LIBUSB1_FOUND to TRUE if # all listed variables are TRUE INCLUDE(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibUsb1 DEFAULT_MSG LIBUSB1_LIBRARIES LIBUSB1_INCLUDE_DIRS) MARK_AS_ADVANCED(LIBUSB1_INCLUDE_DIRS LIBUSB1_LIBRARIES)
{ "content_hash": "7174894a2512dd3f0f1a795e9e7582ac", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 93, "avg_line_length": 30.304347826086957, "alnum_prop": 0.7690100430416069, "repo_name": "esteve/r2d2-nxt", "id": "45c4eda73ca51d6dfc87d4e11ebbb40bb35033b5", "size": "1109", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "cmake/Modules/FindLibUsb1.cmake", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C", "bytes": "2337" }, { "name": "C++", "bytes": "61796" }, { "name": "Objective-C", "bytes": "6056" } ], "symlink_target": "" }
package com.mattprecious.notisync.wizardpager.ui; import android.app.TimePickerDialog; import android.app.TimePickerDialog.OnTimeSetListener; import android.os.Build; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.Button; import android.widget.TextView; import android.widget.TimePicker; import com.actionbarsherlock.app.SherlockFragment; import com.mattprecious.notisync.R; import com.mattprecious.notisync.util.Preferences; public class BluetoothBugFragment extends SherlockFragment { private Button scheduleButton; public static BluetoothBugFragment create() { return new BluetoothBugFragment(); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.wizard_bluetooth_bug, container, false); ((TextView) rootView.findViewById(R.id.content)) .setText(getString(R.string.wizard_bluetoothissue_content, Build.VERSION.RELEASE)); scheduleButton = (Button) rootView.findViewById(R.id.scheduleFixButton); scheduleButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { String[] pieces = Preferences.getBluetoothFixTime(getActivity()).split(":"); int hour = Integer.parseInt(pieces[0]); int minute = Integer.parseInt(pieces[1]); new TimePickerDialog(getActivity(), timeListener, hour, minute, false).show(); } }); return rootView; } private OnTimeSetListener timeListener = new OnTimeSetListener() { @Override public void onTimeSet(TimePicker view, int hourOfDay, int minute) { Preferences.setBluetoothFixEnabled(getActivity(), true); Preferences.setBluetoothFixTime(getActivity(), String.format("%d:%02d", hourOfDay, minute)); } }; }
{ "content_hash": "75f14d28e96fa97f6435dafe1174cdb4", "timestamp": "", "source": "github", "line_count": 63, "max_line_length": 103, "avg_line_length": 33.507936507936506, "alnum_prop": 0.693983893889152, "repo_name": "sluit/NotisyncOmateTruesmart", "id": "b50640697f0f060f759daf4a82c492f6a140c71c", "size": "2711", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/com/mattprecious/notisync/wizardpager/ui/BluetoothBugFragment.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Groovy", "bytes": "1322" }, { "name": "Java", "bytes": "2461109" } ], "symlink_target": "" }
@echo off set MAX_CHANNELS=999999 set STATE_SERVER=4002 set ASTRON_IP=127.0.0.1:7199 set EVENT_LOGGER_IP=127.0.0.1:7197 set /P DISTRICT_NAME="District Name (DEFAULT: Toontown Infinite Acres): " || ^ set DISTRICT_NAME=Toontown Infinite Acres set /P BASE_CHANNEL="Base Channel (DEFAULT: 401000000): " || ^ set BASE_CHANNEL=401000000 rem Read the contents of PPYTHON_PATH into %PPYTHON_PATH%: set /P PPYTHON_PATH=<PPYTHON_PATH echo =============================== echo Starting Toontown Infinite AI server... echo ppython: %PPYTHON_PATH% echo District Name: %DISTRICT_NAME% echo Base Channel: %BASE_CHANNEL% echo Max Channels: %MAX_CHANNELS% echo State Server ID: %STATE_SERVER% echo Message Director IP: %ASTRON_IP% echo Event Logger IP: %EVENT_LOGGER_IP% echo =============================== :main %PPYTHON_PATH% -m toontown.ai.ServiceStart --base-channel %BASE_CHANNEL% ^ --max-channels %MAX_CHANNELS% --stateserver %STATE_SERVER% ^ --astron-ip %ASTRON_IP% --eventlogger-ip %EVENT_LOGGER_IP% ^ --district-name "%DISTRICT_NAME%" goto main
{ "content_hash": "b17eafea997fb3e38223749f8a5916f9", "timestamp": "", "source": "github", "line_count": 32, "max_line_length": 78, "avg_line_length": 34, "alnum_prop": 0.6727941176470589, "repo_name": "ToonTownInfiniteRepo/ToontownInfinite", "id": "74432423da49cfb814c7effebcc65239fdcba417", "size": "1088", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "start_ai_server.bat", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "1703277" }, { "name": "C#", "bytes": "9892" }, { "name": "C++", "bytes": "5468044" }, { "name": "Emacs Lisp", "bytes": "210083" }, { "name": "F#", "bytes": "4611" }, { "name": "JavaScript", "bytes": "7003" }, { "name": "Objective-C", "bytes": "23212" }, { "name": "Puppet", "bytes": "5245" }, { "name": "Python", "bytes": "34010215" }, { "name": "Shell", "bytes": "11192" }, { "name": "Tcl", "bytes": "1981257" } ], "symlink_target": "" }
<?php namespace Symfony\Component\HttpClient; use Symfony\Component\HttpClient\Exception\TransportException; use Symfony\Component\HttpClient\Response\MockResponse; use Symfony\Component\HttpClient\Response\ResponseStream; use Symfony\Contracts\HttpClient\HttpClientInterface; use Symfony\Contracts\HttpClient\ResponseInterface; use Symfony\Contracts\HttpClient\ResponseStreamInterface; /** * A test-friendly HttpClient that doesn't make actual HTTP requests. * * @author Nicolas Grekas <p@tchwork.com> */ class MockHttpClient implements HttpClientInterface { use HttpClientTrait; private $responseFactory; private $requestsCount = 0; private $defaultOptions = []; /** * @param callable|callable[]|ResponseInterface|ResponseInterface[]|iterable|null $responseFactory */ public function __construct($responseFactory = null, ?string $baseUri = 'https://example.com') { if ($responseFactory instanceof ResponseInterface) { $responseFactory = [$responseFactory]; } if (!$responseFactory instanceof \Iterator && null !== $responseFactory && !\is_callable($responseFactory)) { $responseFactory = (static function () use ($responseFactory) { yield from $responseFactory; })(); } $this->responseFactory = $responseFactory; $this->defaultOptions['base_uri'] = $baseUri; } /** * {@inheritdoc} */ public function request(string $method, string $url, array $options = []): ResponseInterface { [$url, $options] = $this->prepareRequest($method, $url, $options, $this->defaultOptions, true); $url = implode('', $url); if (null === $this->responseFactory) { $response = new MockResponse(); } elseif (\is_callable($this->responseFactory)) { $response = ($this->responseFactory)($method, $url, $options); } elseif (!$this->responseFactory->valid()) { throw new TransportException('The response factory iterator passed to MockHttpClient is empty.'); } else { $responseFactory = $this->responseFactory->current(); $response = \is_callable($responseFactory) ? $responseFactory($method, $url, $options) : $responseFactory; $this->responseFactory->next(); } ++$this->requestsCount; if (!$response instanceof ResponseInterface) { throw new TransportException(sprintf('The response factory passed to MockHttpClient must return/yield an instance of ResponseInterface, "%s" given.', \is_object($response) ? \get_class($response) : \gettype($response))); } return MockResponse::fromRequest($method, $url, $options, $response); } /** * {@inheritdoc} */ public function stream($responses, float $timeout = null): ResponseStreamInterface { if ($responses instanceof ResponseInterface) { $responses = [$responses]; } elseif (!is_iterable($responses)) { throw new \TypeError(sprintf('"%s()" expects parameter 1 to be an iterable of MockResponse objects, "%s" given.', __METHOD__, get_debug_type($responses))); } return new ResponseStream(MockResponse::stream($responses, $timeout)); } public function getRequestsCount(): int { return $this->requestsCount; } /** * {@inheritdoc} */ public function withOptions(array $options): self { $clone = clone $this; $clone->defaultOptions = self::mergeDefaultOptions($options, $this->defaultOptions, true); return $clone; } }
{ "content_hash": "45f51f5a29b0356a80af2d737cedc33c", "timestamp": "", "source": "github", "line_count": 103, "max_line_length": 232, "avg_line_length": 35.398058252427184, "alnum_prop": 0.6437191442676906, "repo_name": "oleg-andreyev/symfony", "id": "538243f56c85da2ea755725d2bfe8f5b11d893fa", "size": "3875", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/Symfony/Component/HttpClient/MockHttpClient.php", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "49607" }, { "name": "HTML", "bytes": "356956" }, { "name": "Hack", "bytes": "26" }, { "name": "JavaScript", "bytes": "27650" }, { "name": "PHP", "bytes": "18500484" }, { "name": "Shell", "bytes": "3136" } ], "symlink_target": "" }
2021-12-06 Development Meeting ============================== Kacper, Mike H, Mike L Agenda ------ * Updates Updates ------- * Kacper * Finalized image caching - [whole-tale/gwvolman#158](https://github.com/whole-tale/gwvolman/pull/158) * Updated .test with Mike's work (showcase for DERIVA integration) * Reviews * Craig & Tim * Wrote some things ;-) * Mike H * Mike L * Mostly focused on Workbench CDDR project wrapup / release * Waiting to hear anymore feedback on Recorded Runs * AFAIK all previous feedback/issues have been addressed, but needs final sign-off
{ "content_hash": "72f730c3525fdd3d13ddef9d6e9a7b55", "timestamp": "", "source": "github", "line_count": 26, "max_line_length": 106, "avg_line_length": 23.23076923076923, "alnum_prop": 0.6556291390728477, "repo_name": "whole-tale/wt-design-docs", "id": "09eb95bc64416dadc21302654ad94ec70a6e57d8", "size": "604", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "development/meetings/2021-12-06.md", "mode": "33188", "license": "mit", "language": [ { "name": "HTML", "bytes": "11340" }, { "name": "Makefile", "bytes": "607" }, { "name": "Python", "bytes": "7083" } ], "symlink_target": "" }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="generator" content="rustdoc"> <meta name="description" content="API documentation for the Rust `LLVMRustDestroyArchive` fn in crate `rustc_llvm`."> <meta name="keywords" content="rust, rustlang, rust-lang, LLVMRustDestroyArchive"> <title>rustc_llvm::LLVMRustDestroyArchive - Rust</title> <link rel="stylesheet" type="text/css" href="../main.css"> <link rel="shortcut icon" href="http://www.rust-lang.org/favicon.ico"> </head> <body class="rustdoc"> <!--[if lte IE 8]> <div class="warning"> This old browser is unsupported and will most likely display funky things. </div> <![endif]--> <section class="sidebar"> <a href='../rustc_llvm/index.html'><img src='http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png' alt='' width='100'></a> <p class='location'><a href='index.html'>rustc_llvm</a></p><script>window.sidebarCurrent = {name: 'LLVMRustDestroyArchive', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script> </section> <nav class="sub"> <form class="search-form js-only"> <div class="search-container"> <input class="search-input" name="search" autocomplete="off" placeholder="Click or press 'S' to search, '?' for more options..." type="search"> </div> </form> </nav> <section id='main' class="content fn"> <h1 class='fqn'><span class='in-band'><a href='index.html'>rustc_llvm</a>::<wbr><a class='fn' href=''>LLVMRustDestroyArchive</a><wbr><a class='stability Unstable' title=''>Unstable</a></span><span class='out-of-band'><span id='render-detail'> <a id="collapse-all" href="#">[-]</a>&nbsp;<a id="expand-all" href="#">[+]</a> </span><a id='src-9016' href='../src/rustc_llvm/lib.rs.html#2055'>[src]</a></span></h1> <pre class='rust fn'>pub unsafe fn LLVMRustDestroyArchive(AR: <a class='type' href='../rustc_llvm/type.ArchiveRef.html' title='rustc_llvm::ArchiveRef'>ArchiveRef</a>)</pre></section> <section id='search' class="content hidden"></section> <section class="footer"></section> <div id="help" class="hidden"> <div class="shortcuts"> <h1>Keyboard shortcuts</h1> <dl> <dt>?</dt> <dd>Show this help dialog</dd> <dt>S</dt> <dd>Focus the search field</dd> <dt>&larrb;</dt> <dd>Move up in search results</dd> <dt>&rarrb;</dt> <dd>Move down in search results</dd> <dt>&#9166;</dt> <dd>Go to active search result</dd> </dl> </div> <div class="infos"> <h1>Search tricks</h1> <p> Prefix searches with a type followed by a colon (e.g. <code>fn:</code>) to restrict the search to a given type. </p> <p> Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>typedef</code> (or <code>tdef</code>). </p> </div> </div> <script> window.rootPath = "../"; window.currentCrate = "rustc_llvm"; window.playgroundUrl = ""; </script> <script src="../jquery.js"></script> <script src="../main.js"></script> <script async src="../search-index.js"></script> </body> </html>
{ "content_hash": "21737aaf8fcbdf54205f5b019c715d17", "timestamp": "", "source": "github", "line_count": 95, "max_line_length": 242, "avg_line_length": 39.242105263157896, "alnum_prop": 0.5493562231759657, "repo_name": "ArcherSys/ArcherSys", "id": "53457d14e8f41c1593a0a9fcd43ea4918ca1834c", "size": "3728", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Rust/share/doc/rust/html/rustc_llvm/fn.LLVMRustDestroyArchive.html", "mode": "33188", "license": "mit", "language": [], "symlink_target": "" }
#ifndef _CC_DigestSPI_H_ #define _CC_DigestSPI_H_ #include <stdint.h> #include <sys/types.h> #include <Availability.h> #ifdef __cplusplus extern "C" { #endif /*! @enum CCDigestAlgorithm @abstract Algorithms implemented in this module. @constant kCCDigestNone Digest Selector for "no digest" @constant kCCDigestMD2 MD2 digest @constant kCCDigestMD4 MD4 digest @constant kCCDigestMD5 MD5 digest @constant kCCDigestRMD128 RMD 128 bit digest @constant kCCDigestRMD160 RMD 160 bit digest @constant kCCDigestRMD256 RMD 256 bit digest @constant kCCDigestRMD320 RMD 320 bit digest @constant kCCDigestSHA1 SHA-1 digest @constant kCCDigestSHA224 SHA-2 224 bit digest @constant kCCDigestSHA256 SHA-2 256 bit digest @constant kCCDigestSHA384 SHA-2 384 bit digest @constant kCCDigestSHA512 SHA-2 512 bit digest @constant kCCDigestSkein128 Skein 128 bit digest @constant kCCDigestSkein160 Skein 160 bit digest @constant kCCDigestSkein224 Skein 224 bit digest @constant kCCDigestSkein256 Skein 256 bit digest @constant kCCDigestSkein384 Skein 384 bit digest @constant kCCDigestSkein512 Skein 512 bit digest */ enum { kCCDigestNone = 0, kCCDigestMD2 = 1, kCCDigestMD4 = 2, kCCDigestMD5 = 3, kCCDigestRMD128 = 4, kCCDigestRMD160 = 5, kCCDigestRMD256 = 6, kCCDigestRMD320 = 7, kCCDigestSHA1 = 8, kCCDigestSHA224 = 9, kCCDigestSHA256 = 10, kCCDigestSHA384 = 11, kCCDigestSHA512 = 12, kCCDigestSkein128 = 13, // Deprecated in iPhoneOS 6.0 and MacOSX10.9 kCCDigestSkein160 = 14, // Deprecated in iPhoneOS 6.0 and MacOSX10.9 kCCDigestSkein224 = 16, // Deprecated in iPhoneOS 6.0 and MacOSX10.9 kCCDigestSkein256 = 17, // Deprecated in iPhoneOS 6.0 and MacOSX10.9 kCCDigestSkein384 = 18, // Deprecated in iPhoneOS 6.0 and MacOSX10.9 kCCDigestSkein512 = 19, // Deprecated in iPhoneOS 6.0 and MacOSX10.9 }; typedef uint32_t CCDigestAlgorithm; // Hold this until Heimdal has changed. #define CCDigestAlg CCDigestAlgorithm /*! @typedef CCDigestCtx @abstract Digest context. */ #define CC_DIGEST_SIZE 1032 typedef struct CCDigestCtx_t { uint8_t context[CC_DIGEST_SIZE]; } CCDigestCtx, *CCDigestRef; #define CC_RMD128_DIGEST_LENGTH 16 /* digest length in bytes */ #define CC_RMD128_BLOCK_BYTES 64 /* block size in bytes */ #define CC_RMD128_BLOCK_LONG (CC_RMD128_BLOCK_BYTES / sizeof(CC_LONG)) #define CC_RMD160_DIGEST_LENGTH 20 /* digest length in bytes */ #define CC_RMD160_BLOCK_BYTES 64 /* block size in bytes */ #define CC_RMD160_BLOCK_LONG (CC_RMD160_BLOCK_BYTES / sizeof(CC_LONG)) #define CC_RMD256_DIGEST_LENGTH 32 /* digest length in bytes */ #define CC_RMD256_BLOCK_BYTES 64 /* block size in bytes */ #define CC_RMD256_BLOCK_LONG (CC_RMD256_BLOCK_BYTES / sizeof(CC_LONG)) #define CC_RMD320_DIGEST_LENGTH 40 /* digest length in bytes */ #define CC_RMD320_BLOCK_BYTES 64 /* block size in bytes */ #define CC_RMD320_BLOCK_LONG (CC_RMD320_BLOCK_BYTES / sizeof(CC_LONG)) /**************************************************************************/ /* SPI Only */ /**************************************************************************/ /* * This information will remain SPI - internal functions available * to callers not needing a stable ABI that have a need to provide * their own memory for use as contexts and return digest values. */ /*! @function CCDigestInit @abstract Initialize a CCDigestCtx for a digest. @param algorithm Digest algorithm to perform. @param ctx A digest context. returns 0 on success. */ int CCDigestInit(CCDigestAlgorithm algorithm, CCDigestRef ctx) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0); /**************************************************************************/ /* Future API */ /**************************************************************************/ /* * These functions will be put out for API review after this release. For * right now we're "road testing" them internally. */ /*! @function CCDigest @abstract Stateless, one-shot Digest function. @param algorithm Digest algorithm to perform. @param data The data to digest. @param length The length of the data to digest. @param output The digest bytes (space provided by the caller). Output is written to caller-supplied buffer, as in CCDigestFinal(). */ int CCDigest(CCDigestAlgorithm algorithm, const uint8_t *data, size_t length, uint8_t *output) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0); /*! @function CCDigestCreate @abstract Allocate and initialize a CCDigestCtx for a digest. @param algorithm Digest algorithm to setup. returns a pointer to a digestRef on success. */ CCDigestRef CCDigestCreate(CCDigestAlgorithm alg) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0); /*! @function CCDigestUpdate @abstract Continue to digest data. @param ctx A digest context. @param data The data to digest. @param length The length of the data to digest. returns 0 on success. */ int CCDigestUpdate(CCDigestRef ctx, const void *data, size_t length) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0); /*! @function CCDigestFinal @abstract Conclude digest operations and produce the digest output. @param ctx A digest context. @param output The digest bytes (space provided by the caller). returns 0 on success. */ int CCDigestFinal(CCDigestRef ctx, uint8_t *output) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0); /*! @function CCDigestDestroy @abstract Clear and free a CCDigestCtx @param ctx A digest context. */ void CCDigestDestroy(CCDigestRef ctx) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0); /*! @function CCDigestReset @abstract Clear and re-initialize a CCDigestCtx for the same algorithm. @param ctx A digest context. */ void CCDigestReset(CCDigestRef ctx) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0); /*! @function CCDigestRefGetDigest @abstract Produce the digest output result for the bytes currently processed. @param ctx A digest context. @param output The digest bytes (space provided by the caller). returns 0 on success. */ int CCDigestGetDigest(CCDigestRef ctx, uint8_t *output) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0); /*! @function CCDigestGetBlockSize @abstract Provides the block size of the digest algorithm @param algorithm A digest algorithm selector. returns 0 on failure or the block size on success. */ size_t CCDigestGetBlockSize(CCDigestAlgorithm algorithm) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0); /*! @function CCDigestGetOutputSize @abstract Provides the digest output size of the digest algorithm @param algorithm A digest algorithm selector. returns 0 on failure or the digest output size on success. */ size_t CCDigestGetOutputSize(CCDigestAlgorithm algorithm) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0); /*! @function CCDigestGetBlockSizeFromRef @abstract Provides the block size of the digest algorithm @param ctx A digest context. returns 0 on failure or the block size on success. */ size_t CCDigestGetBlockSizeFromRef(CCDigestRef ctx) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0); // Until Heimdal Changes // #define CCDigestBlockSize CCDigestGetBlockSizeFromRef size_t CCDigestBlockSize(CCDigestRef ctx) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_NA); /*! @function CCDigestGetOutputSizeFromRef @abstract Provides the digest output size of the digest algorithm @param ctx A digest context. returns 0 on failure or the digest output size on success. */ size_t CCDigestGetOutputSizeFromRef(CCDigestRef ctx) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0); // Until Heimdal Changes // #define CCDigestOutputSize CCDigestGetOutputSizeFromRef size_t CCDigestOutputSize(CCDigestRef ctx) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0); uint8_t * CCDigestOID(CCDigestRef ctx) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0); size_t CCDigestOIDLen(CCDigestRef ctx) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0); CCDigestRef CCDigestCreateByOID(uint8_t *OID, size_t OIDlen) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0); #ifdef __cplusplus } #endif #endif /* _CC_DigestSPI_H_ */
{ "content_hash": "286446d398546777d05afa3344c42af9", "timestamp": "", "source": "github", "line_count": 312, "max_line_length": 77, "avg_line_length": 28.958333333333332, "alnum_prop": 0.646485888212507, "repo_name": "GaloisInc/hacrypto", "id": "3612ab87aea97525f61a603e08f0ceac0e335c30", "size": "10004", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/C/CommonCrypto-60061.30.1/include/CommonDigestSPI.h", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "AGS Script", "bytes": "62991" }, { "name": "Ada", "bytes": "443" }, { "name": "AppleScript", "bytes": "4518" }, { "name": "Assembly", "bytes": "25398957" }, { "name": "Awk", "bytes": "36188" }, { "name": "Batchfile", "bytes": "530568" }, { "name": "C", "bytes": "344517599" }, { "name": "C#", "bytes": "7553169" }, { "name": "C++", "bytes": "36635617" }, { "name": "CMake", "bytes": "213895" }, { "name": "CSS", "bytes": "139462" }, { "name": "Coq", "bytes": "320964" }, { "name": "Cuda", "bytes": "103316" }, { "name": "DIGITAL Command Language", "bytes": "1545539" }, { "name": "DTrace", "bytes": "33228" }, { "name": "Emacs Lisp", "bytes": "22827" }, { "name": "GDB", "bytes": "93449" }, { "name": "Gnuplot", "bytes": "7195" }, { "name": "Go", "bytes": "393057" }, { "name": "HTML", "bytes": "41466430" }, { "name": "Hack", "bytes": "22842" }, { "name": "Haskell", "bytes": "64053" }, { "name": "IDL", "bytes": "3205" }, { "name": "Java", "bytes": "49060925" }, { "name": "JavaScript", "bytes": "3476841" }, { "name": "Jolie", "bytes": "412" }, { "name": "Lex", "bytes": "26290" }, { "name": "Logos", "bytes": "108920" }, { "name": "Lua", "bytes": "427" }, { "name": "M4", "bytes": "2508986" }, { "name": "Makefile", "bytes": "29393197" }, { "name": "Mathematica", "bytes": "48978" }, { "name": "Mercury", "bytes": "2053" }, { "name": "Module Management System", "bytes": "1313" }, { "name": "NSIS", "bytes": "19051" }, { "name": "OCaml", "bytes": "981255" }, { "name": "Objective-C", "bytes": "4099236" }, { "name": "Objective-C++", "bytes": "243505" }, { "name": "PHP", "bytes": "22677635" }, { "name": "Pascal", "bytes": "99565" }, { "name": "Perl", "bytes": "35079773" }, { "name": "Prolog", "bytes": "350124" }, { "name": "Python", "bytes": "1242241" }, { "name": "Rebol", "bytes": "106436" }, { "name": "Roff", "bytes": "16457446" }, { "name": "Ruby", "bytes": "49694" }, { "name": "Scheme", "bytes": "138999" }, { "name": "Shell", "bytes": "10192290" }, { "name": "Smalltalk", "bytes": "22630" }, { "name": "Smarty", "bytes": "51246" }, { "name": "SourcePawn", "bytes": "542790" }, { "name": "SystemVerilog", "bytes": "95379" }, { "name": "Tcl", "bytes": "35696" }, { "name": "TeX", "bytes": "2351627" }, { "name": "Verilog", "bytes": "91541" }, { "name": "Visual Basic", "bytes": "88541" }, { "name": "XS", "bytes": "38300" }, { "name": "Yacc", "bytes": "132970" }, { "name": "eC", "bytes": "33673" }, { "name": "q", "bytes": "145272" }, { "name": "sed", "bytes": "1196" } ], "symlink_target": "" }
package org.approvaltests.writers; import java.io.InputStream; import com.spun.util.io.FileUtils; public class ApprovalXmlWriter extends ApprovalTextWriter { public ApprovalXmlWriter(String text) { super(text, "xml"); } @Override public String writeReceivedFile(String received) throws Exception { received = super.writeReceivedFile(received); format(received); return received; } private void format(String fileName) throws Exception { String text = "\"C:\\temp\\xmlstarlet-1.0.1\\xml.exe\" format \"%s\""; text = String.format(text, fileName); Process exec = Runtime.getRuntime().exec(text); InputStream stream = exec.getInputStream(); Thread.sleep(400); FileUtils.redirectInputToFile(fileName, stream); } }
{ "content_hash": "b8bb209ef71fcc05a941d86cf529b1cf", "timestamp": "", "source": "github", "line_count": 30, "max_line_length": 74, "avg_line_length": 25.8, "alnum_prop": 0.7144702842377261, "repo_name": "bhagatsingh/ApprovalTests.Java.Maven", "id": "1cdef3ff6e9781227c3cfba41ac176a8a4b29e53", "size": "774", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/main/java/org/approvaltests/writers/ApprovalXmlWriter.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "HTML", "bytes": "6755" }, { "name": "Java", "bytes": "1057835" } ], "symlink_target": "" }
// Type definitions for commander // Original definitions by: Alan Agius <https://github.com/alan-agius4>, Marcelo Dezem <https://github.com/mdezem>, vvakame <https://github.com/vvakame>, Jules Randolph <https://github.com/sveinburne> ///<reference types="node" /> declare namespace commander { interface CommanderError extends Error { code: string; exitCode: number; message: string; nestedError?: string; } type CommanderErrorConstructor = { new (exitCode: number, code: string, message: string): CommanderError }; interface Option { flags: string; required: boolean; // A value must be supplied when the option is specified. optional: boolean; // A value is optional when the option is specified. mandatory: boolean; // The option must have a value after parsing, which usually means it must be specified on command line. bool: boolean; short?: string; long: string; description: string; } type OptionConstructor = { new (flags: string, description?: string): Option }; interface Command extends NodeJS.EventEmitter { [key: string]: any; // options as properties args: string[]; /** * Set the program version to `str`. * * This method auto-registers the "-V, --version" flag * which will print the version number when passed. * * You can optionally supply the flags and description to override the defaults. */ version(str: string, flags?: string, description?: string): Command; /** * Define a command, implemented using an action handler. * * @remarks * The command description is supplied using `.description`, not as a parameter to `.command`. * * @example * ```ts * program * .command('clone <source> [destination]') * .description('clone a repository into a newly created directory') * .action((source, destination) => { * console.log('clone command called'); * }); * ``` * * @param nameAndArgs - command name and arguments, args are `<required>` or `[optional]` and last may also be `variadic...` * @param opts - configuration options * @returns new command */ command(nameAndArgs: string, opts?: CommandOptions): Command; /** * Define a command, implemented in a separate executable file. * * @remarks * The command description is supplied as the second parameter to `.command`. * * @example * ```ts * program * .command('start <service>', 'start named service') * .command('stop [service]', 'stop named serice, or all if no name supplied'); * ``` * * @param nameAndArgs - command name and arguments, args are `<required>` or `[optional]` and last may also be `variadic...` * @param description - description of executable command * @param opts - configuration options * @returns top level command for chaining more command definitions */ command(nameAndArgs: string, description: string, opts?: commander.CommandOptions): Command; /** * Define argument syntax for the top-level command. * * @returns Command for chaining */ arguments(desc: string): Command; /** * Parse expected `args`. * * For example `["[type]"]` becomes `[{ required: false, name: 'type' }]`. * * @returns Command for chaining */ parseExpectedArgs(args: string[]): Command; /** * Register callback to use as replacement for calling process.exit. */ exitOverride(callback?: (err: CommanderError) => never|void): Command; /** * Register callback `fn` for the command. * * @example * program * .command('help') * .description('display verbose help') * .action(function() { * // output help here * }); * * @returns Command for chaining */ action(fn: (...args: any[]) => void): Command; /** * Define option with `flags`, `description` and optional * coercion `fn`. * * The `flags` string should contain both the short and long flags, * separated by comma, a pipe or space. The following are all valid * all will output this way when `--help` is used. * * "-p, --pepper" * "-p|--pepper" * "-p --pepper" * * @example * // simple boolean defaulting to false * program.option('-p, --pepper', 'add pepper'); * * --pepper * program.pepper * // => Boolean * * // simple boolean defaulting to true * program.option('-C, --no-cheese', 'remove cheese'); * * program.cheese * // => true * * --no-cheese * program.cheese * // => false * * // required argument * program.option('-C, --chdir <path>', 'change the working directory'); * * --chdir /tmp * program.chdir * // => "/tmp" * * // optional argument * program.option('-c, --cheese [type]', 'add cheese [marble]'); * * @returns Command for chaining */ option(flags: string, description?: string, fn?: ((arg1: any, arg2: any) => void) | RegExp, defaultValue?: any): Command; option(flags: string, description?: string, defaultValue?: any): Command; /** * Define a required option, which must have a value after parsing. This usually means * the option must be specified on the command line. (Otherwise the same as .option().) * * The `flags` string should contain both the short and long flags, separated by comma, a pipe or space. */ requiredOption(flags: string, description?: string, fn?: ((arg1: any, arg2: any) => void) | RegExp, defaultValue?: any): Command; requiredOption(flags: string, description?: string, defaultValue?: any): Command; /** * Whether to store option values as properties on command object, * or store separately (specify false). In both cases the option values can be accessed using .opts(). * * @return Command for chaining */ storeOptionsAsProperties(value?: boolean): Command; /** * Whether to pass command to action handler, * or just the options (specify false). * * @return Command for chaining */ passCommandToAction(value?: boolean): Command; /** * Allow unknown options on the command line. * * @param [arg] if `true` or omitted, no error will be thrown for unknown options. * @returns Command for chaining */ allowUnknownOption(arg?: boolean): Command; /** * Parse `argv`, setting options and invoking commands when defined. * * @returns Command for chaining */ parse(argv: string[]): Command; /** * Parse `argv`, setting options and invoking commands when defined. * * Use parseAsync instead of parse if any of your action handlers are async. Returns a Promise. * * @returns Promise */ parseAsync(argv: string[]): Promise<any>; /** * Parse options from `argv` returning `argv` void of these options. */ parseOptions(argv: string[]): commander.ParseOptionsResult; /** * Return an object containing options as key-value pairs */ opts(): { [key: string]: any }; /** * Set the description. * * @returns Command for chaining */ description(str: string, argsDescription?: {[argName: string]: string}): Command; /** * Get the description. */ description(): string; /** * Set an alias for the command. * * @returns Command for chaining */ alias(alias: string): Command; /** * Get alias for the command. */ alias(): string; /** * Set the command usage. * * @returns Command for chaining */ usage(str: string): Command; /** * Get the command usage. */ usage(): string; /** * Set the name of the command. * * @returns Command for chaining */ name(str: string): Command; /** * Get the name of the command. */ name(): string; /** * Output help information for this command. * * When listener(s) are available for the helpLongFlag * those callbacks are invoked. */ outputHelp(cb?: (str: string) => string): void; /** * You can pass in flags and a description to override the help * flags and help description for your command. */ helpOption(flags?: string, description?: string): Command; /** * Output help information and exit. */ help(cb?: (str: string) => string): never; } type CommandConstructor = { new (name?: string): Command }; interface CommandOptions { noHelp?: boolean; isDefault?: boolean; executableFile?: string; } interface ParseOptionsResult { args: string[]; unknown: string[]; } interface CommanderStatic extends Command { Command: CommandConstructor; Option: OptionConstructor; CommanderError:CommanderErrorConstructor; } } declare const commander: commander.CommanderStatic; export = commander;
{ "content_hash": "e38aa08fcb6c14ef8b1bb1e5fe013fbb", "timestamp": "", "source": "github", "line_count": 311, "max_line_length": 200, "avg_line_length": 30.006430868167204, "alnum_prop": 0.5978354050578654, "repo_name": "gusortiz/code_challenges", "id": "d1a89d8c25dab97d1ca86607217c6ccb1c53a6c6", "size": "9332", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "node_modules/commander/typings/index.d.ts", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "15967" }, { "name": "JavaScript", "bytes": "7760" } ], "symlink_target": "" }
import { Entity } from '../entity/entity'; /******************************************************************************************************************************************************************************************************* * * @data FragmentType - FragmentType inherited from Entity it is a specific type of a LevelGraphNode * * Entity * @superFields - id: number - ID of the FragmentType * @superFields - name: string - Name of the FragmentType * @superFields - expectedProperties: ExpectedProperty[] - Array of expected properties of the FragmentType * @superFields - providedProperties: ProvidedProperty[] - Array of provided properties of the FragmentType * * @author Arthur Kaul * ******************************************************************************************************************************************************************************************************/ export class FragmentType extends Entity { constructor() { super(); } }
{ "content_hash": "0325d0ac78cbc4e0986de0cf0de9550b", "timestamp": "", "source": "github", "line_count": 22, "max_line_length": 200, "avg_line_length": 45.54545454545455, "alnum_prop": 0.436127744510978, "repo_name": "kaular/ArchRef", "id": "9dffd4e6a3b3becaa8a777abe4e6eb1a76e42182", "size": "1002", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "ArchRefClient/ArchRefClient/src/app/shared/datamodels/types/fragmenttype.ts", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "5006" }, { "name": "CSS", "bytes": "27431" }, { "name": "HTML", "bytes": "136250" }, { "name": "Java", "bytes": "387627" }, { "name": "JavaScript", "bytes": "1963" }, { "name": "Shell", "bytes": "7058" }, { "name": "TypeScript", "bytes": "532313" } ], "symlink_target": "" }
Run `dotnet build /t:GenerateCode` to generate code. ``` yaml require: - https://github.com/Azure/azure-rest-api-specs/blob/f3ed9637897d9f095a8ec28ed82f59ec85fff954/specification/cognitiveservices/data-plane/AnomalyDetector/readme.md namespace: Azure.AI.AnomalyDetector public-clients: true credential-types: TokenCredential;AzureKeyCredential credential-header-name: Ocp-Apim-Subscription-Key credential-scopes: https://cognitiveservices.azure.com/.default ``` ### Make Endpoint type as Uri ``` yaml directive: from: swagger-document where: $.parameters.Endpoint transform: $.format = "url" ```
{ "content_hash": "620e5e64bcbb9d3636e8f55878db0ff9", "timestamp": "", "source": "github", "line_count": 20, "max_line_length": 167, "avg_line_length": 30.45, "alnum_prop": 0.7865353037766831, "repo_name": "ayeletshpigelman/azure-sdk-for-net", "id": "3b0131179f4cc6256ceae2fae73a1acd2bc4bd9d", "size": "641", "binary": false, "copies": "1", "ref": "refs/heads/ayshpige/InternalBranchForDebuging", "path": "sdk/anomalydetector/Azure.AI.AnomalyDetector/src/autorest.md", "mode": "33188", "license": "mit", "language": [ { "name": "ASP", "bytes": "118" }, { "name": "Batchfile", "bytes": "28895" }, { "name": "C#", "bytes": "45912328" }, { "name": "CSS", "bytes": "685" }, { "name": "HTML", "bytes": "45212" }, { "name": "JavaScript", "bytes": "7875" }, { "name": "PowerShell", "bytes": "24250" }, { "name": "Shell", "bytes": "1470" }, { "name": "XSLT", "bytes": "6114" } ], "symlink_target": "" }
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <artifactId>com.amazonaws.eclipse.elasticbeanstalk</artifactId> <packaging>eclipse-plugin</packaging> <parent> <groupId>com.amazonaws.eclipse</groupId> <artifactId>com.amazonaws.eclipse.bundles</artifactId> <version>1.0.0-SNAPSHOT</version> </parent> </project>
{ "content_hash": "ad500fce5907fc14a740b5f298619777", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 101, "avg_line_length": 43.61538461538461, "alnum_prop": 0.7231040564373897, "repo_name": "aws/aws-toolkit-eclipse", "id": "6ffc2e216d09b4fd517876223283919703ea1cf7", "size": "567", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "bundles/com.amazonaws.eclipse.elasticbeanstalk/pom.xml", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "2016" }, { "name": "FreeMarker", "bytes": "77017" }, { "name": "HTML", "bytes": "3566" }, { "name": "Java", "bytes": "5464354" }, { "name": "Shell", "bytes": "3124" }, { "name": "XSLT", "bytes": "485" } ], "symlink_target": "" }
package io.sarl.sarldoc.configs; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Set; import java.util.TreeMap; import java.util.TreeSet; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.google.common.base.Strings; /** * Placement for a custom tag. * * @author $Author: sgalland$ * @version $FullVersion$ * @mavengroupid $GroupId$ * @mavenartifactid $ArtifactId$ * @since 0.10 */ public enum Placement { /** Disable the tag. */ DISABLE('X', Messages.Placement_0), /** All elements. */ ALL('a', Messages.Placement_1), /** Into the overview. */ OVERVIEW('o', Messages.Placement_2), /** Into the packages. */ PACKAGES('p', Messages.Placement_3), /** Into the types (classes and interfaces). */ TYPES('t', Messages.Placement_4), /** Into constructors. */ CONSTRUCTORS('c', Messages.Placement_5), /** Into the methods. */ METHODS('m', Messages.Placement_6), /** Into the fields. */ FIELDS('f', Messages.Placement_7); private final char placement; private final String documentation; /** Constructor. * * @param placement the placement character. * @param documentation the placement documentation. */ Placement(char placement, String documentation) { this.placement = placement; this.documentation = documentation; } /** Replies the character representation of this placement. * * @return the character representation of this placement. */ public char toChar() { return this.placement; } /** Replies the documentation text associated to this placement. * * @return the documentation text for this placement. */ public String getDocumentation() { return this.documentation; } /** Replies the default visibility for the documented elements. * * @return the default visibility. */ public static Placement getDefault() { return ALL; } /** Parse the given case insensitive string for obtaining the placement. * * @param name the string to parse. * @return the placement. * @throws NullPointerException when the specified name is null */ @JsonCreator public static Placement valueOfCaseInsensitive(String name) { if (Strings.isNullOrEmpty(name)) { throw new NullPointerException("Name is null"); //$NON-NLS-1$ } return valueOf(name.toUpperCase()); } /** Parse the given string for obtaining the placements. * * <p>The string contains the placements' characters. * * @param text the string to parse. * @return the placements. */ public static List<Placement> valuesOf(String text) { final Map<Character, Placement> all = new TreeMap<>(); for (final Placement placement : values()) { all.put(placement.toChar(), placement); } final Set<Placement> placements = new TreeSet<>(); final int len = text.length(); for (int i = 0; i < len; ++i) { final Placement p = all.get(text.charAt(i)); if (p != null) { placements.add(p); } } return new ArrayList<>(placements); } /** Replies the Json string representation of this placement. * * @return the Json string representation. */ @JsonValue public String toJsonString() { return name().toLowerCase(); } }
{ "content_hash": "6bb5f964ae7ead4b88f259ad292e0b15", "timestamp": "", "source": "github", "line_count": 144, "max_line_length": 73, "avg_line_length": 22.48611111111111, "alnum_prop": 0.6920938851142681, "repo_name": "sarl/sarl", "id": "73129d9c0767829cbd77d9e11cda736683d8e280", "size": "3973", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "products/sarldoc/src/main/java/io/sarl/sarldoc/configs/Placement.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "1718" }, { "name": "GAP", "bytes": "1574648" }, { "name": "HTML", "bytes": "1314" }, { "name": "Java", "bytes": "24901728" }, { "name": "JavaScript", "bytes": "2352" }, { "name": "Perl", "bytes": "28685" }, { "name": "Python", "bytes": "35706" }, { "name": "Shell", "bytes": "10357" }, { "name": "TeX", "bytes": "12146" }, { "name": "Vim Script", "bytes": "5516" }, { "name": "Xtend", "bytes": "1612" } ], "symlink_target": "" }
using System; using SDL2; namespace SDL2_CS_OO { public sealed class SDLInvalidPtrException : Exception { public SDLInvalidPtrException(IntPtr ThePtr) : base(SDL.SDL_GetError()) { Ptr = ThePtr; } public SDLInvalidPtrException(IntPtr ThePtr, Exception TheInnerException) : base(SDL.SDL_GetError(), TheInnerException) { Ptr = ThePtr; } public SDLInvalidPtrException(IntPtr ThePtr, string TheMessage) : base(TheMessage) { Ptr = ThePtr; } public SDLInvalidPtrException(IntPtr ThePtr, string TheMessage, Exception TheInnerException) : base(TheMessage, TheInnerException) { Ptr = ThePtr; } public IntPtr Ptr { get; private set; } } }
{ "content_hash": "1749e1b2de26b1ecfce1938641cfb110", "timestamp": "", "source": "github", "line_count": 50, "max_line_length": 100, "avg_line_length": 17.52, "alnum_prop": 0.5605022831050228, "repo_name": "coruscateor/SDL2-CS-OO", "id": "651437b37bbfe6688b879b9fb4da9580b571fc78", "size": "878", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "SDL2-CS-OO/SDLInvalidPtrException.cs", "mode": "33188", "license": "mit", "language": [ { "name": "C#", "bytes": "147327" } ], "symlink_target": "" }
package sql.fredy.generate; /** TableTreeNodeObject * represents the Table for the XMLEditor * it contains the following Info: * - TableName * - PrimaryKeys **/ /** XMLEditor edits the XML-file used for Generate Code * and is a part of Admin... * Version 1.0 23. March 2002 * Fredy Fischer * * * Admin is a Tool around JDBC-enabled SQL-Databases to do basic jobs * for DB-Administrations, as create / delete / alter and query tables * it also creates indices and generates simple Java-Code to access DBMS-tables * and exports data into various formats * * Copyright (c) 2017 Fredy Fischer, sql@hulmen.ch 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. **/ import java.util.Vector; import java.util.StringTokenizer; import org.jdom.Document; import org.jdom.Element; import org.jdom.JDOMException; import org.jdom.input.SAXBuilder; import org.jdom.input.DOMBuilder; import org.jdom.Namespace; public class TableTreeNodeObject { String table; /** * Get the value of table. * @return value of table. */ public String getTable() {return table;} /** * Set the value of table. * @param v Value to assign to table. */ public void setTable(String v) {this.table = v;} Vector primaryKey = new Vector(); /** * Get the value of primaryKey. * @return value of primaryKey. */ public Vector getPrimaryKey() {return primaryKey;} /** * Set the value of primaryKey. * @param v Value to assign to primaryKey. */ public void setPrimaryKey(Vector v) {this.primaryKey = v;} public void addKey(String k) { primaryKey.addElement((String) k ); } public void doPrimaryKey(String s) { StringTokenizer st = new StringTokenizer(s,";"); while (st.hasMoreTokens()) addKey(st.nextToken()); } public String getPK() { String s=""; for (int i =0; i < primaryKey.size() ; i++) { if (i == 0 ) { s = (String) primaryKey.elementAt(i); } else { s = s + ";" + (String) primaryKey.elementAt(i); } } return s; } Element elt= new Element("table",getNs()); /** * Get the value of elt. * @return value of elt. */ public Element getElt() { elt = new Element("table",getNs()); elt.setAttribute("name",getTable()); elt.setAttribute("primaryKeys",getPK()); return elt; } /** * Set the value of elt. * @param v Value to assign to elt. */ public void setElt(Element v) { this.elt = v; setTable((String)elt.getAttributeValue("name")); doPrimaryKey((String)elt.getAttributeValue("primaryKeys")); } Namespace ns = Namespace.getNamespace("admin","Fredys-Admintool"); /** * Get the value of ns. * @return value of ns. */ public Namespace getNs() {return ns;} /** * Set the value of ns. * @param v Value to assign to ns. */ public void setNs(Namespace v) {this.ns = v;} public TableTreeNodeObject(String t, String p) { setTable(t); doPrimaryKey(p); } public TableTreeNodeObject(Element e) { setElt(e); } public TableTreeNodeObject (Namespace ns, Element e) { setNs(ns); setElt(e); } }
{ "content_hash": "5b2480f9810ae83b2e9c66561fb75bc0", "timestamp": "", "source": "github", "line_count": 166, "max_line_length": 80, "avg_line_length": 26.132530120481928, "alnum_prop": 0.6477639465191333, "repo_name": "hulmen/SQLAdmin", "id": "24977dee56901bcd7c526d3acb1ced304ce39ca3", "size": "4338", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/fredy/generate/TableTreeNodeObject.java", "mode": "33188", "license": "mit", "language": [ { "name": "Java", "bytes": "2677717" } ], "symlink_target": "" }
// // UIView+Explode.m // Takonaut // // Created by mugx on 07/04/16. // Copyright © 2016 mugx. All rights reserved. #import "UIImageView+MX.h" #import "UIImage+MX.h" #define ANIM_DURATION 1.0 #define SUB_TILE_DIVIDER_SIZE 5.0 @implementation UIImageView (MX) - (void)explode:(void (^)())completion { //--- checking image integrity ---// if (self.image == nil) { if (self.animationImages.count > 0) { self.image = self.animationImages[0]; self.animationImages = nil; } else { return; } } //--- preparing sub tiles ---// float originalW = self.image.size.width / SUB_TILE_DIVIDER_SIZE; float originalH = self.image.size.height / SUB_TILE_DIVIDER_SIZE; int cols = floorf(self.image.size.width / originalW); int rows = floorf(self.image.size.height / originalH); for (int y = 0; y < cols; ++y) { for (int x = 0; x < rows; ++x) { CGRect frame = CGRectMake(x * originalW, y * originalH, originalW, originalH); UIImageView *subTile = [[UIImageView alloc] initWithImage:[self.image crop:frame]]; subTile.frame = CGRectMake(x * originalW, y * originalH, originalW, originalH); [self addSubview:subTile]; } } [self setImage:nil]; //--- starting to animate the sub tiles ---// for (UIImageView *subTile in self.subviews) { [UIView animateWithDuration:ANIM_DURATION delay:0.0 options:UIViewAnimationOptionCurveEaseOut animations:^{ int randx = (arc4random() % 2 == 0 ? -1 : 1) * (arc4random() % 50); int randy = (arc4random() % 2 == 0 ? -1 : 1) * (arc4random() % 50); subTile.frame = CGRectOffset(subTile.frame, subTile.frame.origin.x + randx, subTile.frame.origin.y + randy); subTile.alpha = 0; } completion:^(BOOL finished) { [subTile removeFromSuperview]; self.hidden = YES; if (completion && self.subviews.count == 0) { completion(); } }]; } } - (void)blink:(NSUInteger)duration completion:(void (^)())completion { [UIView animateWithDuration:0.3 delay:0.0 options:UIViewAnimationOptionRepeat | UIViewAnimationOptionCurveEaseInOut animations:^{ [UIView setAnimationRepeatCount:duration / 0.3]; self.alpha = 0.2; } completion:^(BOOL finished) { self.alpha = 1.0; if (completion) { completion(); } }]; } - (void)spin { /* [UIView animateWithDuration:5.0 delay:0.0 options:UIViewAnimationOptionRepeat | UIViewAnimationOptionCurveLinear animations:^{ self.transform = CGAffineTransformMakeRotation(2 * M_PI); } completion:^(BOOL finished) { }]; */ CABasicAnimation *fullRotation; fullRotation = [CABasicAnimation animationWithKeyPath:@"transform.rotation"]; fullRotation.fromValue = [NSNumber numberWithFloat:0]; fullRotation.toValue = [NSNumber numberWithFloat:((360 * M_PI) / 180)]; fullRotation.duration = 3.0; fullRotation.repeatCount = MAXFLOAT; [self.layer addAnimation:fullRotation forKey:@"360"]; } @end
{ "content_hash": "dd83ab64207fdb73a56369138d10dd10", "timestamp": "", "source": "github", "line_count": 101, "max_line_length": 131, "avg_line_length": 29.445544554455445, "alnum_prop": 0.6546738399462004, "repo_name": "mugx/PsyNaut", "id": "a7c884f2f3ee8f1801fc3417cbea0c189a7290ef", "size": "2975", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "Tako-Naut/Sources/MXToolBox/UIImageView+MX.m", "mode": "33188", "license": "mit", "language": [ { "name": "Objective-C", "bytes": "31094" } ], "symlink_target": "" }
<?php /** * A filter that catches all exceptions in AJAX requests * and converts them to a JSON error response. */ class ExceptionCatchingFilter extends sfFilter { public function execute ($filterChain) { $request = $this->context->getRequest(); if($request->isXmlHttpRequest() && $this->isFirstCall()) { $debugMode = sfConfig::get('sf_debug'); try { $filterChain->execute(); } catch (PropelException $e) { $cause = $e->getCause(); if ($cause && $cause->getCode() == 23000) { if (!$debugMode) { $message = 'You are probably trying to delete or update a record that have other related records.'; } } else if (!$debugMode) { error_log('PropelException: '.$e->getMessage()); $message = 'A database error occured.'; } if (!isset($message)) { $message = $e->getMessage(); } $this->injectErrorIntoResponse($message); } catch (Exception $e) { if ($debugMode) { $errorMessage = $e->getMessage(); $errorMessage .= '<br />Exception throwed by '.$e->getFile().' on line: '.$e->getLine(); } else { error_log('Exception: '.$e->getMessage()); $errorMessage = 'Some unexpected error occured.'; } $this->injectErrorIntoResponse($errorMessage); } } else { $filterChain->execute(); } } private function injectErrorIntoResponse($errorMessage) { $debugMode = sfConfig::get('sf_debug'); if ($debugMode) { $errorMessage = 'Unable to do the action.<br/>Reason: '.$errorMessage; } else { $errorMessage .= '<br/><br/>If you believe you found a bug - <a href="javascript:void();" onclick="afApp.widgetPopup(\'/bugReport/index\',\'Send us a Bug Report\',null,\'iconCls: \\\'icon-bug-add\\\',width:650,height:328,maximizable: false\');">please let us know about it</a>.'; } $response = $this->context->getResponse(); $params = array('success' => false, 'message' => $errorMessage); $response->setContent(json_encode($params)); } }
{ "content_hash": "087c7d1093fcbec2779cfe26075ed1b8", "timestamp": "", "source": "github", "line_count": 61, "max_line_length": 295, "avg_line_length": 43.721311475409834, "alnum_prop": 0.4634420697412823, "repo_name": "appflower/appflower_engine", "id": "358cad25e097dc0d09b20acece91b1914e3f4cae", "size": "2667", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "lib/filter/ExceptionCatchingFilter.class.php", "mode": "33261", "license": "mit", "language": [ { "name": "ASP", "bytes": "93" }, { "name": "JavaScript", "bytes": "6086657" }, { "name": "PHP", "bytes": "10136546" }, { "name": "Perl", "bytes": "1074" }, { "name": "Python", "bytes": "2954" }, { "name": "Ruby", "bytes": "220" }, { "name": "Shell", "bytes": "387" }, { "name": "Visual Basic", "bytes": "1724" } ], "symlink_target": "" }
var chai = require('chai'); // chai.use(require('chai-json-schema')); var expect = chai.expect; var assert = chai.assert; var Service = require('../../src/Service'); var service = null; describe('Vanage', function() { describe('Service', function() { beforeEach(function() { service = new Service({}); }); it('should export all stats in a string format', function() { expect(service.export()).to.be.a('string'); }); it('should clone all properties via import/export method', function() { var s1 = new Service({ debug: true }); var s2 = new Service({}).import(s1.export()); expect(s2).to.deep.equal(s2); expect(s1.id).to.equal(s2.id); expect(s1._internalId).to.equal(s2._internalId); expect(s1._handlers.length).to.equal(s2._handlers.length); expect(s2.options.debug).to.equal(true); }); it('should recognize errors if an invalid import format was used', function() { var s2 = new Service({}).import('invalid format'); var s3 = new Service({}).import(['also', 'invalid']); var s4 = new Service({}).import(undefined); expect(service.error).to.equal(null); expect(s2.error).to.be.an('error'); expect(s3.error).to.be.an('error'); expect(s4.error).to.be.an('error'); }); it('should find no reuslts in an empty service instance', function() { expect(service.find({}).delegates.length).to.equal(0); expect(service.find({}).handlers.length).to.equal(0); }); it('should find registered delegates and handlers', function() { service.register({}, () => {}); service.delegate({}, () => {}); expect(service.find({}).delegates.length).to.equal(1); expect(service.find({}).handlers.length).to.equal(1); }); it('should only register valid delegates with all properties', function() { expect(service.delegate('invalid')).to.be.an('error'); expect(service.delegate({}, 'invalid')).to.be.an('error'); expect(service.delegate({}, () => {})).to.be.an('object'); }); it('should export all stats in a valid json v4 scheme', function() { /** * chai-json-schema plugin currently not support chai v3+ * * expect(service.export()).to.be.jsonSchema(require('../schemes/service.export.json')); */ }); it('should add waiter factories to the list', function() { service.waitFor({}, () => {}); expect(service._waiters.length).to.equal(1); }); it('should be configurable and run the postConfig hook', function() { expect(service.options.debug).to.equal(undefined); service.configure({ debug: true }); expect(service.options.debug).to.equal(true); }); it('should be configurable by the set method and run the postConfig hook', function() { expect(service.options.debug).to.equal(undefined); service.set('debug', true); expect(service.options.debug).to.equal(true); }); it('should have a timer which can be set with the delay method', function() { expect(service._timer).to.equal(null); service.delay(500); expect(service._timer).to.not.equal(undefined); expect(service._timer._delay).to.equal(500); }); it('should create a new queue with the queue method', function() { var q1 = service.queue([]); var q2 = service.queue([function(done) { return done(null, 10); }]); expect(q1.size).to.equal(0); expect(q2.size).to.equal(1); q2.run(function(err, res) { expect(res.length).to.equal(1); expect(err.length).to.equal(0); }); }); it('should (un-)register new and old factories by id', function() { var id1 = service.register({ a: 'b' }, (args, done) => { done(null, args) }); var id2 = service.register({ c: 'd' }, (args, done) => { done(null, args) }); expect(service._handlers.length).to.equal(2); var h1 = service.unregister(id1); expect(service._handlers.length).to.equal(1); expect(service.unregister('invalid type')).to.be.an('error'); }); it('should have a fail method to handle all errors', function() { expect(service.fail(new Error('test'))).to.be.an('error'); }); }); });
{ "content_hash": "0be3319ed975a86e60d86e7c529983d0", "timestamp": "", "source": "github", "line_count": 125, "max_line_length": 100, "avg_line_length": 38.224, "alnum_prop": 0.5397655922980327, "repo_name": "janbiasi/vanage", "id": "96fa372b14b6821baa9564d34e3cdc2f3b1a47e5", "size": "4778", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "test/classes/ServiceTest.js", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "HTML", "bytes": "2661" }, { "name": "JavaScript", "bytes": "62569" } ], "symlink_target": "" }
using System.Windows; namespace VisualBrush { /// <summary> /// Interaction logic for SampleViewer.xaml /// </summary> public partial class SampleViewer : Window { public SampleViewer() { InitializeComponent(); } } }
{ "content_hash": "3e8270800083f783807905fdde27b85f", "timestamp": "", "source": "github", "line_count": 15, "max_line_length": 51, "avg_line_length": 18.733333333333334, "alnum_prop": 0.5693950177935944, "repo_name": "Microsoft/WPF-Samples", "id": "15e0ec994a9969b736d35b87a9060e526b6b19cf", "size": "439", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Graphics/VisualBrush/SampleViewer.cs", "mode": "33188", "license": "mit", "language": [ { "name": "Batchfile", "bytes": "99" }, { "name": "C", "bytes": "4163" }, { "name": "C#", "bytes": "3700958" }, { "name": "C++", "bytes": "181426" }, { "name": "JavaScript", "bytes": "8906" }, { "name": "Rich Text Format", "bytes": "4398043" }, { "name": "Visual Basic", "bytes": "3465" } ], "symlink_target": "" }
var fs = require('fs'); var http = require("http"); var url = require("url"); var path = require("path"); var httpPort = process.argv[2] || 8888; var camera = require('./camera'); function loop(){ camera.saveImage(function(error){ console.log(error); }, function(filename){ console.log('Image saved: '+filename); }) }; setInterval(loop,5000);
{ "content_hash": "c219bdfb0afbbd05ddd719969477325e", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 40, "avg_line_length": 19.61111111111111, "alnum_prop": 0.660056657223796, "repo_name": "obiwanakin/node-camspy", "id": "dcd1f1b967b6a12e2d42d8707166f4eb4371478b", "size": "353", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "takePics.js", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "48611" }, { "name": "JavaScript", "bytes": "92605" }, { "name": "Shell", "bytes": "210" } ], "symlink_target": "" }
<?php /** * @author Félix Girault <felix.girault@gmail.com> * @license FreeBSD License (http://opensource.org/licenses/BSD-2-Clause) */ namespace Essence\Log; /** * A very basic logger. * Inspired by PSR log (https://github.com/php-fig/log). * * @package Essence.Log */ interface Logger { /** * Log level for normal but significant events. * * @var string */ const notice = 'notice'; /** * Logs a message. * * @param mixed $level Level. * @param string $message Message. * @param array $context Context. */ public function log( $level, $message, array $context = [ ]); }
{ "content_hash": "8bc91a907fb42e4bc0030bc0c896d034", "timestamp": "", "source": "github", "line_count": 41, "max_line_length": 73, "avg_line_length": 15.024390243902438, "alnum_prop": 0.6298701298701299, "repo_name": "kasperisager/vanilla-oembed", "id": "d4eec2467c5c7fa1cc22283c4ca6b45791196f3f", "size": "617", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "library/vendors/fg/essence/lib/Essence/Log/Logger.php", "mode": "33188", "license": "mit", "language": [ { "name": "PHP", "bytes": "1960" } ], "symlink_target": "" }
| api | version | note | |:------------------------------------|:-------------------|:------------------------------------| | arm/containerinstance | 2017-08-01-preview | new | | arm/eventgrid | 2017-06-15-preview | new | ### ASM - Marked as deprecated. - Added Go 1.7 build tags. ### Storage - Support for Go 1.7 and Go 1.6 (except table batch operation tests). ### Generated code notes - [Azure REST API specs](https://github.com/Azure/azure-rest-api-specs) commit: ad55af74f3f0e2b390a4306532528168ba742fef - [AutoRest](https://github.com/Azure/autorest) commit: cfb296f153f948f85afab637f7212fcfdc4a8bbb ## `v10.2.1-beta` - Fixes polymorphic structs in `mysql` and `postgresql` packages. ## `v10.2.0-beta` ### ARM | api | version | note | |:------------------------------------|:-------------------|:------------------------------------| | arm/cosmos-db | 2015-04-08 | new | | arm/mysql | 2017-04-30-preview | new | | arm/postgresql | 2017-04-30-preview | new | ### Storage - Bug fixes. ### Generated code notes - [Azure REST API specs](https://github.com/Azure/azure-rest-api-specs) commit: 485ded7560c6309efb2f795ec6e46b7436dc6fdb - [AutoRest](https://github.com/Azure/autorest) commit: c180952b850e677a8624655abeaded307d95cae3 ## `v10.1.0-beta` ### ARM | api | version | note | |:------------------------------------|:-------------------|:------------------------------------| | arm/recoveryservicessiterecovery | 2016-08-10 | new | | arm/managedapplications | 2016-09-01-preview | new | | arm/storsimple8000series | 2017-06-01 | new | | arm/streamanalytics | multiple | new | ### Storage - Bug fixes. ### Generated code notes - [Azure REST API specs](https://github.com/Azure/azure-rest-api-specs) commit: a2cdf005407b81edb161c1f7b5c49b5ce8e7f041 - [AutoRest](https://github.com/Azure/autorest) commit: 8e9c2d3704a04913a175ab76972b7d9597c77687 ----- ## `v10.0.0-beta` ### ARM In addition to the tabulated changes below, each package had the following updates: - Long running operations now run inside a goroutine and return channels for the response and the errors. - Some functions changed from returning `autorest.Response` to return the already unmarshaled struct. - Uses go-autorest v8.0.0. | api | version | note | |:------------------------------------|:-------------------|:------------------------------------| | arm/advisor | 2017-04-19 | new | | arm/analysisservices | 2016-05-16 | refactor | | arm/apimanagement | 2016-10-10 | update to latest swagger & refactor | | arm/appinsights | 2015-05-01 | new | | arm/automation | 2015-10-31 | new | | arm/billing | 2017-04-24-preview | update to latest swagger & refactor | | arm/cdn | 2016-10-02 | refactor | | arm/commerce | 2015-06-01-preview | refactor | | arm/compute | 2016-04-30-preview | refactor | | arm/consumption | 2017-04-24-preview | new | | arm/containerregistry | 2017-03-01 | update to latest swagger & refactor | | arm/containerservice | 2017-01-31 | update to latest swagger & refactor | | arm/customer-insights | 2017-01-01 | refactor | | arm/datalake-analytics/account | 2016-11-01 | refactor | | arm/datalake-store/account | 2016-11-01 | refactor | | arm/devtestlabs | 2016-05-15 | refactor | | arm/disk | 2016-04-30-preview | refactor | | arm/dns | 2016-04-01 | refactor | | arm/documentdb | 2015-04-08 | refactor | | arm/eventhub | 2015-08-01 | refactor | | arm/graphrbac | 1.6 | refactor | | arm/hdinsight | 2015-03-01-preview | new | | arm/insights | multiple | new | | arm/intune | 2015-01-14-preview | refactor | | arm/iothub | 2016-02-03 | refactor | | arm/machinelearning/commitmentplans | 2016-05-01-preview | refactor | | arm/machinelearning/webservices | 2017-01-01 | update to latest swagger & refactor | | arm/monitor | multiple | new | | arm/network | 2017-03-01 | update to latest swagger & refactor | | arm/notificationhubs | 2017-04-01 | update to latest swagger & refactor | | arm/operationalinsights | 2015-11-01-preview | update to latest swagger & refactor | | arm/powerbiembedded | 2016-01-29 | refactor | | arm/recoveryservices | 2016-12-01 | refactor | | arm/recoveryservicesbackup | 2016-12-01 | new | | arm/redis | 2016-04-01 | refactor | | arm/relay | 2016-07-01 | new | | arm/resourcehealth | 2015-01-01 | new | | arm/resources/features | 2015-12-01 | refactor | | arm/resources/links | 2016-09-01 | refactor | | arm/resources/resources | 2016-09-01 | refactor | | arm/resources/subscriptions | 2016-06-01 | refactor | | arm/scheduler | 2016-03-01 | refactor | | arm/servermanagement | 2016-07-01-preview | refactor | | arm/servicebus | 2015-08-01 | refactor | | arm/servicefabric | 2016-09-01 | new | | arm/service-map | 2015-11-01-preview | refactor | | arm/sql | multiple | update to latest swagger & refactor | | arm/storage | 2016-12-01 | update to latest swagger & refactor | | arm/storageimportexport | 2016-11-01 | refactor | | arm/web | multiple | refactor | ### Data plane | api | version | note | |:------------------------------------|:-------------------|:------------------------------------| | dataplane/keyvault | 2016-10-01 | refactor | ### Storage Storage has returned to this repo. It has also been refactored: - Blobs, containers, tables, etc are now method receivers. These structs are the ones being updated with each operation. - When creating a client, the SDK checks if the storage account provided is valid. - Added retry logic. It provides the flexibility for user to provide their own retry logic. - Added operations: - Get table - Get entity - Get and set queue ACL - Table batch - Page blob incremental copy - All operations that previously had `extraHeaders` as parameter now recieve a struct with well defined possible headers and other options. Some functions are easier to use. - Storage tests now use HTTP recordings. ### Generated code notes - [Azure REST API specs](https://github.com/Azure/azure-rest-api-specs) commit: 519980465d9c195622d466dc4601b1999a448ed5 - [AutoRest](https://github.com/Azure/autorest) commit: ced950d64e39735b84d41876a56b54b27c227dc7 ## `v9.0.0-beta` ### ARM In addition to the tabulated changes below, each package had the following updates: - API Version is now associated with individual methods, instead of the client. This was done to support composite swaggers, which logically may contain more than one API Version. - Version numbers are now calculated in the generator instead of at runtime. This keeps us from adding new allocations, while removing the race-conditions that were added. | api | version | note | |:------------------------------------|:-------------------|:-----------------------------------| | arm/analysisservices | 2016-05-16 | update to latest swagger | | arm/authorization | 2015-07-01 | refactoring | | arm/batch | 2017-01-01 | update to latest swagger &refactor | | arm/cdn | 2016-10-02 | update to latest swagger | | arm/compute | 2016-04-30-preview | update to latest swagger | | arm/dns | 2016-04-01 | update to latest swagger &refactor | | arm/eventhub | 2015-08-01 | refactoring | | arm/logic | 2016-06-01 | update to latest swagger &refactor | | arm/notificationshub | 2016-03-01 | update to latest swagger &refactor | | arm/redis | 2016-04-01 | update to latest swagger &refactor | | arm/resources/resources | 2016-09-01 | update to latest swagger | | arm/servicebus | 2015-08-01 | update to latest swagger | | arm/sql | 2014-04-01 | update to latest swagger | | arm/web | multiple | generating from composite | | datalake-analytics/account | 2016-11-01 | update to latest swagger | | datalake-store/filesystem | 2016-11-01 | update to latest swagger | ### Storage Storage has been moved to its own repository which can be found here: https://github.com/Azure/azure-storage-go For backwards compatibility, a submodule has been added to this repo. However, consuming storage via this repository is deprecated and may be deleted in future versions. ## `v8.1.0-beta` ### ARM | api | version | note | |:------------------------------------|:-------------------|:-----------------------------------| | arm/apimanagement | 2016-07-07 | new | | arm/apideployment | 2016-07-07 | new | | arm/billing | 2017-02-27-preview | new | | arm/compute | 2016-04-30-preview | update to latest swagger | | arm/containerservice | 2017-01-31 | update to latest swagger | | arm/customer-insights | 2017-01-01 | new | | arm/graphrbac | 1.6 | new | | arm/networkwatcher | 2016-12-01 | new | | arm/operationalinsights | 2015-11-01-preview | new | | arm/service-map | 2015-11-01-preview | new | | arm/storageimportexport | 2016-11-01 | new | ### Data plane | api | version | note | |:------------------------------------|:-------------------|:-----------------------------------| | dataplane/keyvault | 2016-10-01 | new | - Uses go-autorest v7.3.0 ## `v8.0.0-beta` ### ARM - In addition to the tablulated changes below, all updated packages received performance improvements to their Version() method. - Some validation that was taking place in the runtime was erroneously blocking calls. all packages have been updated to take that bug fix. | api | version | note | |:------------------------------------|:-------------------|:-----------------------------------| | arm/analysisservices | 2016-05-16 | update to latest swagger | | arm/cdn | 2016-10-02 | update to latest swagger | | arm/cognitiveservices | 2016-02-01-preview | update to latest swagger | | arm/compute | 2016-03-30 | update to latest swagger, refactor | | arm/containerregistry | 2016-06-27-preview | update to latest swagger | | arm/containerservice | 2016-09-30 | update to latest swagger | | arm/datalake-analytics | 2016-11-01 | update to latest swagger | | arm/datalake-store | 2016-11-01 | update to latest swagger | | arm/disk | 2016-04-30-preview | new | | arm/documentdb | 2015-04-08 | update to latest swagger | | arm/iothub | 2016-02-03 | update to latest swagger | | arm/keyvault | 2015-06-01 | update to latest swagger | | arm/logic | 2016-06-01 | update to latest swagger | | arm/machinelearning | 2016-05-01-preview | update to latest swagger | | arm/mobileengagement | 2014-12-01 | update to latest swagger, refactor | | arm/redis | 2016-04-01 | update to latest swagger | | arm/resources/locks | 2016-09-01 | refactor | | arm/resources/policy | 2016-12-01 | previous version was deleted | | arm/resources/resources | 2016-09-01 | update to latest swagger, refactor | | arm/scheduler | 2016-03-01 | refactor | | arm/search | 2015-08-19 | refactor | | arm/web | 2015-08-01 | refactor | ## `v7.0.0-beta` | api | version | note | |:------------------------------------|:-------------------|:-----------------------------------| | arm/analysisservices | 2016-05-16 | new | | arm/cdn | 2016-10-02 | update to latest swagger | | arm/commerce | 2015-06-01-preview | new | | arm/containerservice | 2016-09-30 | update to latest swagger | | arm/containerregistry | 2016-06-27-preview | new | | arm/datalake-analytics/account | 2016-11-01 | update to latest swagger | | arm/datalake-store/account | 2016-11-01 | update to latest swagger | | arm/datalake-store/filesystem | 2016-11-01 | update to latest swagger | | arm/documentdb | 2015-04-08 | new | | arm/machinelearning/commitmentplans | 2016-05-01-preview | new | | arm/recoveryservices | 2016-06-01 | new | | arm/resources/subscriptions | 2016-06-01 | new | | arm/search | 2015-08-19 | update to latest swagger | | arm/sql | 2014-04-01 | previous version was deleted | ### Storage - Can now update messages in storage queues. - Added support for blob snapshots and aborting blob copy operations. - Added support for getting and setting ACLs on containers. - Added various APIs for file and directory manipulation. ### Support for the following swagger extensions was added to the Go generator which affected codegen. - x-ms-client-flatten - x-ms-paramater-location ## `v6.0.0-beta` | api | version | note | |:-------------------------------|:-------------------|:-----------------------------------| | arm/authorization | no change | code refactoring | | arm/batch | no change | code refactoring | | arm/compute | no change | code refactoring | | arm/containerservice | 2016-03-30 | return | | arm/datalake-analytics/account | 2015-10-01-preview | new | | arm/datalake-store/filesystem | no change | moved to datalake-store/filesystem | | arm/eventhub | no change | code refactoring | | arm/intune | no change | code refactoring | | arm/iothub | no change | code refactoring | | arm/keyvault | no change | code refactoring | | arm/mediaservices | no change | code refactoring | | arm/network | no change | code refactoring | | arm/notificationhubs | no change | code refactoring | | arm/redis | no change | code refactoring | | arm/resources/resources | no change | code refactoring | | arm/resources/links | 2016-09-01 | new | | arm/resources/locks | 2016-09-01 | updated | | arm/resources/policy | no change | code refactoring | | arm/resources/resources | 2016-09-01 | updated | | arm/servermanagement | 2016-07-01-preview | updated | | arm/web | no change | code refactoring | - storage: Added blob lease functionality and tests ## `v5.0.0-beta` | api | version | note | |:------------------------------|:--------------------|:-----------------| | arm/network | 2016-09-01 | updated | | arm/servermanagement | 2015-07-01-preview | new | | arm/eventhub | 2015-08-01 | new | | arm/containerservice | -- | removed | | arm/resources/subscriptions | no change | code refactoring | | arm/resources/features | no change | code refactoring | | arm/resources/resources | no change | code refactoring | | arm/datalake-store/accounts | no change | code refactoring | | arm/datalake-store/filesystem | no change | code refactoring | | arm/notificationhubs | no change | code refactoring | | arm/redis | no change | code refactoring | - storage: Add more file storage share operations. - azure-rest-api-specs/commit/b8cdc2c50a0872fc0039f20c2b6b33aa0c2af4bf - Uses go-autorest v7.2.1 ## `v4.0.0-beta` - arm/logic: breaking change in package logic. - arm: parameter validation code added in all arm packages. - Uses go-autorest v7.2.0. ## `v3.2.0-beta` | api | version | note | |:----------------------------|:--------------------|:----------| | arm/mediaservices | 2015-10-01 | new | | arm/keyvault | 2015-06-01 | new | | arm/iothub | 2016-02-03 | new | | arm/datalake-store | 2015-12-01 | new | | arm/network | 2016-06-01 | updated | | arm/resources/resources | 2016-07-01 | updated | | arm/resources/policy | 2016-04-01 | updated | | arm/servicebus | 2015-08-01 | updated | - arm: uses go-autorest version v7.1.0. - storage: fix for operating on blobs names containing special characters. - storage: add SetBlobProperties(), update BlobProperties response fields. - storage: make storage client work correctly with read-only secondary account. - storage: add Azure Storage Emulator support. ## `v3.1.0-beta` - Added a new arm/compute/containerservice (2016-03-30) package - Reintroduced NewxxClientWithBaseURI method. - Uses go-autorest version - v7.0.7. ## `v3.0.0-beta` This release brings the Go SDK ARM packages up-to-date with Azure ARM Swagger files for most services. Since the underlying [Swagger files](https://github.com/Azure/azure-rest-api-specs) continue to change substantially, the ARM packages are still in *beta* status. The ARM packages now align with the following API versions (*highlighted* packages are new or updated in this release): | api | version | note | |:----------------------------|:--------------------|:----------| | arm/authorization | 2015-07-01 | no change | | arm/intune | 2015-01-14-preview | no change | | arm/notificationhubs | 2014-09-01 | no change | | arm/resources/features | 2015-12-01 | no change | | arm/resources/subscriptions | 2015-11-01 | no change | | arm/web | 2015-08-01 | no change | | arm/cdn | 2016-04-02 | updated | | arm/compute | 2016-03-30 | updated | | arm/dns | 2016-04-01 | updated | | arm/logic | 2015-08-01-preview | updated | | arm/network | 2016-03-30 | updated | | arm/redis | 2016-04-01 | updated | | arm/resources/resources | 2016-02-01 | updated | | arm/resources/policy | 2015-10-01-preview | updated | | arm/resources/locks | 2015-01-01 | updated (resources/authorization earlier)| | arm/scheduler | 2016-03-01 | updated | | arm/storage | 2016-01-01 | updated | | arm/search | 2015-02-28 | updated | | arm/batch | 2015-12-01 | new | | arm/cognitiveservices | 2016-02-01-preview | new | | arm/devtestlabs | 2016-05-15 | new | | arm/machinelearning | 2016-05-01-preview | new | | arm/powerbiembedded | 2016-01-29 | new | | arm/mobileengagement | 2014-12-01 | new | | arm/servicebus | 2014-09-01 | new | | arm/sql | 2015-05-01 | new | | arm/trafficmanager | 2015-11-01 | new | Below are some design changes. - Removed Api version from method arguments. - Removed New...ClientWithBaseURI() method in all clients. BaseURI value is set in client.go. - Uses go-autorest version v7.0.6. ## `v2.2.0-beta` - Uses go-autorest version v7.0.5. - Update version of pacakges "jwt-go" and "crypto" in glide.lock. ## `v2.1.1-beta` - arm: Better error messages for long running operation failures (Uses go-autorest version v7.0.4). ## `v2.1.0-beta` - arm: Uses go-autorest v7.0.3 (polling related updates). - arm: Cancel channel argument added in long-running calls. - storage: Allow caller to provide headers for DeleteBlob methods. - storage: Enables connection sharing with http keepalive. - storage: Add BlobPrefixes and Delimiter to BlobListResponse ## `v2.0.0-beta` - Uses go-autorest v6.0.0 (Polling and Asynchronous requests related changes). ## `v0.5.0-beta` Updated following packages to new API versions: - arm/resources/features 2015-12-01 - arm/resources/resources 2015-11-01 - arm/resources/subscriptions 2015-11-01 ### Changes - SDK now uses go-autorest v3.0.0. ## `v0.4.0-beta` This release brings the Go SDK ARM packages up-to-date with Azure ARM Swagger files for most services. Since the underlying [Swagger files](https://github.com/Azure/azure-rest-api-specs) continue to change substantially, the ARM packages are still in *beta* status. The ARM packages now align with the following API versions (*highlighted* packages are new or updated in this release): - *arm/authorization 2015-07-01* - *arm/cdn 2015-06-01* - arm/compute 2015-06-15 - arm/dns 2015-05-04-preview - *arm/intune 2015-01-14-preview* - arm/logic 2015-02-01-preview - *arm/network 2015-06-15* - *arm/notificationhubs 2014-09-01* - arm/redis 2015-08-01 - *arm/resources/authorization 2015-01-01* - *arm/resources/features 2014-08-01-preview* - *arm/resources/resources 2014-04-01-preview* - *arm/resources/subscriptions 2014-04-01-preview* - *arm/scheduler 2016-01-01* - arm/storage 2015-06-15 - arm/web 2015-08-01 ### Changes - Moved the arm/authorization, arm/features, arm/resources, and arm/subscriptions packages under a new, resources, package (to reflect the corresponding Swagger structure) - Added a new arm/authoriation (2015-07-01) package - Added a new arm/cdn (2015-06-01) package - Added a new arm/intune (2015-01-14-preview) package - Udated arm/network (2015-06-01) - Added a new arm/notificationhubs (2014-09-01) package - Updated arm/scheduler (2016-01-01) package ----- ## `v0.3.0-beta` - Corrected unintentional struct field renaming and client renaming in v0.2.0-beta ----- ## `v0.2.0-beta` - Added support for DNS, Redis, and Web site services - Updated Storage service to API version 2015-06-15 - Updated Network to include routing table support - Address https://github.com/Azure/azure-sdk-for-go/issues/232 - Address https://github.com/Azure/azure-sdk-for-go/issues/231 - Address https://github.com/Azure/azure-sdk-for-go/issues/230 - Address https://github.com/Azure/azure-sdk-for-go/issues/224 - Address https://github.com/Azure/azure-sdk-for-go/issues/184 - Address https://github.com/Azure/azure-sdk-for-go/issues/183 ------ ## `v0.1.1-beta` - Improves the UserAgent string to disambiguate arm packages from others in the SDK - Improves setting the http.Response into generated results (reduces likelihood of a nil reference) - Adds gofmt, golint, and govet to Travis CI for the arm packages ##### Fixed Issues - https://github.com/Azure/azure-sdk-for-go/issues/196 - https://github.com/Azure/azure-sdk-for-go/issues/213 ------ ## v0.1.0-beta This release addresses the issues raised against the alpha release and adds more features. Most notably, to address the challenges of encoding JSON (see the [comments](https://github.com/Azure/go-autorest#handling-empty-values) in the [go-autorest](https://github.com/Azure/go-autorest) package) by using pointers for *all* structure fields (with the exception of enumerations). The [go-autorest/autorest/to](https://github.com/Azure/go-autorest/tree/master/autorest/to) package provides helpers to convert to / from pointers. The examples demonstrate their usage. Additionally, the packages now align with Go coding standards and pass both `golint` and `govet`. Accomplishing this required renaming various fields and parameters (such as changing Url to URL). ##### Changes - Changed request / response structures to use pointer fields. - Changed methods to return `error` instead of `autorest.Error`. - Re-divided methods to ease asynchronous requests. - Added paged results support. - Added a UserAgent string. - Added changes necessary to pass golint and govet. - Updated README.md with details on asynchronous requests and paging. - Saved package dependencies through Godep (for the entire SDK). ##### Fixed Issues: - https://github.com/Azure/azure-sdk-for-go/issues/205 - https://github.com/Azure/azure-sdk-for-go/issues/206 - https://github.com/Azure/azure-sdk-for-go/issues/211 - https://github.com/Azure/azure-sdk-for-go/issues/212 ----- ## v0.1.0-alpha This release introduces the Azure Resource Manager packages generated from the corresponding [Swagger API](http://swagger.io) [definitions](https://github.com/Azure/azure-rest-api-specs).
{ "content_hash": "27318084d260f40186cb9da99e7f68c5", "timestamp": "", "source": "github", "line_count": 534, "max_line_length": 171, "avg_line_length": 56.99250936329588, "alnum_prop": 0.4943812840901623, "repo_name": "k4k/kubicorn", "id": "3b23b68450acf67cd164c008a5511e31993716a3", "size": "30474", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "vendor/github.com/Azure/azure-sdk-for-go/CHANGELOG.md", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Go", "bytes": "309392" }, { "name": "Makefile", "bytes": "5355" }, { "name": "Shell", "bytes": "37949" } ], "symlink_target": "" }
FSocketBSD* FSocketSubsystemBSD::InternalBSDSocketFactory(SOCKET Socket, ESocketType SocketType, const FString& SocketDescription) { // return a new socket object return new FSocketBSD(Socket, SocketType, SocketDescription, this); } FSocket* FSocketSubsystemBSD::CreateSocket(const FName& SocketType, const FString& SocketDescription, bool bForceUDP) { SOCKET Socket = INVALID_SOCKET; FSocket* NewSocket = nullptr; int PlatformSpecificTypeFlags = 0; #if PLATFORM_HAS_BSD_SOCKET_FEATURE_CLOSE_ON_EXEC PlatformSpecificTypeFlags = SOCK_CLOEXEC; #endif // PLATFORM_HAS_BSD_SOCKET_FEATURE_CLOSE_ON_EXEC switch (SocketType.GetComparisonIndex()) { case NAME_DGram: // Creates a data gram (UDP) socket Socket = socket(AF_INET, SOCK_DGRAM | PlatformSpecificTypeFlags, IPPROTO_UDP); NewSocket = (Socket != INVALID_SOCKET) ? InternalBSDSocketFactory(Socket, SOCKTYPE_Datagram, SocketDescription) : nullptr; break; case NAME_Stream: // Creates a stream (TCP) socket Socket = socket(AF_INET, SOCK_STREAM | PlatformSpecificTypeFlags, IPPROTO_TCP); NewSocket = (Socket != INVALID_SOCKET) ? InternalBSDSocketFactory(Socket, SOCKTYPE_Streaming, SocketDescription) : nullptr; break; default: break; } if (!NewSocket) { UE_LOG(LogSockets, Warning, TEXT("Failed to create socket %s [%s]"), *SocketType.ToString(), *SocketDescription); } return NewSocket; } void FSocketSubsystemBSD::DestroySocket(FSocket* Socket) { delete Socket; } ESocketErrors FSocketSubsystemBSD::GetHostByName(const ANSICHAR* HostName, FInternetAddr& OutAddr) { #if PLATFORM_HAS_BSD_SOCKET_FEATURE_GETHOSTNAME FScopeLock ScopeLock(&HostByNameSynch); addrinfo* AddrInfo = nullptr; // Limit the IP Addresses we get back to just IPv4 addrinfo HintAddrInfo; FMemory::Memzero(&HintAddrInfo, sizeof(HintAddrInfo)); HintAddrInfo.ai_family = AF_INET; int32 ErrorCode = getaddrinfo(HostName, nullptr, &HintAddrInfo, &AddrInfo); ESocketErrors SocketError = TranslateGAIErrorCode(ErrorCode); if (SocketError == SE_NO_ERROR) { for (; AddrInfo != nullptr; AddrInfo = AddrInfo->ai_next) { if (AddrInfo->ai_family == AF_INET) { sockaddr_in* IPv4SockAddr = reinterpret_cast<sockaddr_in*>(AddrInfo->ai_addr); if (IPv4SockAddr != nullptr) { uint32 HostIP = ntohl(IPv4SockAddr->sin_addr.s_addr); static_cast<FInternetAddrBSD&>(OutAddr).SetIp(HostIP); return SE_NO_ERROR; } } } return SE_HOST_NOT_FOUND; } return SocketError; #else UE_LOG(LogSockets, Error, TEXT("Platform has no getaddrinfo(), but did not override FSocketSubsystem::GetHostByName()")); return SE_NO_RECOVERY; #endif } bool FSocketSubsystemBSD::GetHostName(FString& HostName) { #if PLATFORM_HAS_BSD_SOCKET_FEATURE_GETHOSTNAME ANSICHAR Buffer[256]; bool bRead = gethostname(Buffer,256) == 0; if (bRead == true) { HostName = Buffer; } return bRead; #else UE_LOG(LogSockets, Error, TEXT("Platform has no gethostname(), but did not override FSocketSubsystem::GetHostName()")); return false; #endif } const TCHAR* FSocketSubsystemBSD::GetSocketAPIName() const { return TEXT("BSD"); } TSharedRef<FInternetAddr> FSocketSubsystemBSD::CreateInternetAddr(uint32 Address, uint32 Port) { TSharedRef<FInternetAddr> Result = MakeShareable(new FInternetAddrBSD); Result->SetIp(Address); Result->SetPort(Port); return Result; } ESocketErrors FSocketSubsystemBSD::GetLastErrorCode() { return TranslateErrorCode(errno); } ESocketErrors FSocketSubsystemBSD::TranslateErrorCode(int32 Code) { // @todo sockets: Windows for some reason doesn't seem to have all of the standard error messages, // but it overrides this function anyway - however, this #if !PLATFORM_HAS_BSD_SOCKET_FEATURE_WINSOCKETS // handle the generic -1 error if (Code == SOCKET_ERROR) { return GetLastErrorCode(); } switch (Code) { case 0: return SE_NO_ERROR; case EINTR: return SE_EINTR; case EBADF: return SE_EBADF; case EACCES: return SE_EACCES; case EFAULT: return SE_EFAULT; case EINVAL: return SE_EINVAL; case EMFILE: return SE_EMFILE; case EWOULDBLOCK: return SE_EWOULDBLOCK; case EINPROGRESS: return SE_EINPROGRESS; case EALREADY: return SE_EALREADY; case ENOTSOCK: return SE_ENOTSOCK; case EDESTADDRREQ: return SE_EDESTADDRREQ; case EMSGSIZE: return SE_EMSGSIZE; case EPROTOTYPE: return SE_EPROTOTYPE; case ENOPROTOOPT: return SE_ENOPROTOOPT; case EPROTONOSUPPORT: return SE_EPROTONOSUPPORT; case ESOCKTNOSUPPORT: return SE_ESOCKTNOSUPPORT; case EOPNOTSUPP: return SE_EOPNOTSUPP; case EPFNOSUPPORT: return SE_EPFNOSUPPORT; case EAFNOSUPPORT: return SE_EAFNOSUPPORT; case EADDRINUSE: return SE_EADDRINUSE; case EADDRNOTAVAIL: return SE_EADDRNOTAVAIL; case ENETDOWN: return SE_ENETDOWN; case ENETUNREACH: return SE_ENETUNREACH; case ENETRESET: return SE_ENETRESET; case ECONNABORTED: return SE_ECONNABORTED; case ECONNRESET: return SE_ECONNRESET; case ENOBUFS: return SE_ENOBUFS; case EISCONN: return SE_EISCONN; case ENOTCONN: return SE_ENOTCONN; case ESHUTDOWN: return SE_ESHUTDOWN; case ETOOMANYREFS: return SE_ETOOMANYREFS; case ETIMEDOUT: return SE_ETIMEDOUT; case ECONNREFUSED: return SE_ECONNREFUSED; case ELOOP: return SE_ELOOP; case ENAMETOOLONG: return SE_ENAMETOOLONG; case EHOSTDOWN: return SE_EHOSTDOWN; case EHOSTUNREACH: return SE_EHOSTUNREACH; case ENOTEMPTY: return SE_ENOTEMPTY; case EUSERS: return SE_EUSERS; case EDQUOT: return SE_EDQUOT; case ESTALE: return SE_ESTALE; case EREMOTE: return SE_EREMOTE; #if !PLATFORM_HAS_NO_EPROCLIM case EPROCLIM: return SE_EPROCLIM; #endif // case EDISCON: return SE_EDISCON; // case SYSNOTREADY: return SE_SYSNOTREADY; // case VERNOTSUPPORTED: return SE_VERNOTSUPPORTED; // case NOTINITIALISED: return SE_NOTINITIALISED; #if PLATFORM_HAS_BSD_SOCKET_FEATURE_GETHOSTNAME case HOST_NOT_FOUND: return SE_HOST_NOT_FOUND; case TRY_AGAIN: return SE_TRY_AGAIN; case NO_RECOVERY: return SE_NO_RECOVERY; #endif // case NO_DATA: return SE_NO_DATA; // case : return SE_UDP_ERR_PORT_UNREACH; //@TODO Find it's replacement } #endif UE_LOG(LogSockets, Warning, TEXT("Unhandled socket error! Error Code: %d"), Code); check(0); return SE_NO_ERROR; } #endif //PLATFORM_HAS_BSD_SOCKETS
{ "content_hash": "084a3ab381b163119967046f0bbad07c", "timestamp": "", "source": "github", "line_count": 208, "max_line_length": 130, "avg_line_length": 29.759615384615383, "alnum_prop": 0.7573505654281099, "repo_name": "PopCap/GameIdea", "id": "c426516a6038b5c158ca1dae0da89c8968247456", "size": "6372", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Engine/Source/Runtime/Sockets/Private/BSDSockets/SocketSubsystemBSD.cpp", "mode": "33188", "license": "bsd-2-clause", "language": [ { "name": "ASP", "bytes": "238055" }, { "name": "Assembly", "bytes": "184134" }, { "name": "Batchfile", "bytes": "116983" }, { "name": "C", "bytes": "84264210" }, { "name": "C#", "bytes": "9612596" }, { "name": "C++", "bytes": "242290999" }, { "name": "CMake", "bytes": "548754" }, { "name": "CSS", "bytes": "134910" }, { "name": "GLSL", "bytes": "96780" }, { "name": "HLSL", "bytes": "124014" }, { "name": "HTML", "bytes": "4097051" }, { "name": "Java", "bytes": "757767" }, { "name": "JavaScript", "bytes": "2742822" }, { "name": "Makefile", "bytes": "1976144" }, { "name": "Objective-C", "bytes": "75778979" }, { "name": "Objective-C++", "bytes": "312592" }, { "name": "PAWN", "bytes": "2029" }, { "name": "PHP", "bytes": "10309" }, { "name": "PLSQL", "bytes": "130426" }, { "name": "Pascal", "bytes": "23662" }, { "name": "Perl", "bytes": "218656" }, { "name": "Python", "bytes": "21593012" }, { "name": "SAS", "bytes": "1847" }, { "name": "Shell", "bytes": "2889614" }, { "name": "Tcl", "bytes": "1452" } ], "symlink_target": "" }
var validate = require('./validation.js').validate var evaluate = require('./evaluation.js').evaluate exports.validate = validate; exports.evaluate = evaluate;
{ "content_hash": "1fc23268d612c88e8bc0061c6cd0ed18", "timestamp": "", "source": "github", "line_count": 5, "max_line_length": 50, "avg_line_length": 32.2, "alnum_prop": 0.7577639751552795, "repo_name": "byteball/byteballcore", "id": "b204ffa943e9bdeb27c2b1f0ab6cb3d357692502", "size": "161", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "formula/index.js", "mode": "33188", "license": "mit", "language": [ { "name": "HTML", "bytes": "6442" }, { "name": "JavaScript", "bytes": "1000823" }, { "name": "Nearley", "bytes": "4979" } ], "symlink_target": "" }
Just a quick and simple project to get up and running with some basic novena stuff. Should blink one of the led's on the gpbb.
{ "content_hash": "3aeb96980a2d1c4d822df30bdfacef8e", "timestamp": "", "source": "github", "line_count": 3, "max_line_length": 83, "avg_line_length": 42.666666666666664, "alnum_prop": 0.7734375, "repo_name": "emusan/novena_bare", "id": "a10b2ca3826cfb2ce0ac7b52ea09212d3c0536f0", "size": "156", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "README.md", "mode": "33188", "license": "mit", "language": [ { "name": "HTML", "bytes": "7624" }, { "name": "Makefile", "bytes": "1572" }, { "name": "Shell", "bytes": "1869" }, { "name": "VHDL", "bytes": "753" } ], "symlink_target": "" }
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>jQuery.ScrollTo</title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script> <script type="text/javascript" src="../jquery.scrollTo-min.js"></script> <script type="text/javascript" src="test.js"></script> </head> <body> <h1>jQuery.ScrollTo - Test Window MaxY - Compat Mode</h1> <div style="height:1500px; width:500px; padding:0 50px; background-color:#AAA"> &nbsp; </div> <script type="text/javascript"> $(window).test(); </script> </html>
{ "content_hash": "058f9a09e0d036c92de34f11528397fd", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 121, "avg_line_length": 41.473684210526315, "alnum_prop": 0.6776649746192893, "repo_name": "zufrieden/num3", "id": "18b8b39de339787a397928223bc8baf360c470f2", "size": "788", "binary": false, "copies": "18", "ref": "refs/heads/master", "path": "web/assets/bower_components/jquery.scrollTo/tests/WinMaxY-compat.html", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "164210" }, { "name": "HTML", "bytes": "23246" }, { "name": "JavaScript", "bytes": "1951" }, { "name": "PHP", "bytes": "3957" }, { "name": "Ruby", "bytes": "1878" } ], "symlink_target": "" }
 using Microsoft.AspNetCore.Hosting; using System.IO; namespace Griddly.Models { public class ExampleModel { IWebHostEnvironment _env; public ExampleModel(IWebHostEnvironment env) { _env = env; } public string Title { get; set; } public string Description { get; set; } public string ParentView { get; set; } public string GridView { get; set; } public string GridAction { get; set; } public string MapPath(string path) { return Path.Join(_env.ContentRootPath, path); } } }
{ "content_hash": "2e2362f7cd2df6543e9678cb6111455b", "timestamp": "", "source": "github", "line_count": 30, "max_line_length": 57, "avg_line_length": 20.433333333333334, "alnum_prop": 0.5807504078303426, "repo_name": "programcsharp/griddly", "id": "630d073d66ae36bbf2a2ff1bb778ab968f236928", "size": "615", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Griddly.NetCore/Models/ExampleModel.cs", "mode": "33188", "license": "mit", "language": [ { "name": "ASP.NET", "bytes": "98" }, { "name": "C#", "bytes": "357726" }, { "name": "CSS", "bytes": "215310" }, { "name": "HTML", "bytes": "223870" }, { "name": "JavaScript", "bytes": "243066" }, { "name": "PowerShell", "bytes": "1830" } ], "symlink_target": "" }
package com.adaptris.core; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ScheduledFuture; import java.util.concurrent.TimeUnit; import com.adaptris.annotation.AdvancedConfig; import com.adaptris.core.util.ManagedThreadFactory; import com.adaptris.util.TimeInterval; /** * @since 3.4.0 */ public abstract class ScheduledTaskPoller extends PollerImp { private static final TimeInterval DEFAULT_POLL_INTERVAL = new TimeInterval(20L, TimeUnit.SECONDS); private static final TimeInterval DEFAULT_SHUTDOWN_WAIT = new TimeInterval(1L, TimeUnit.MINUTES); @AdvancedConfig private TimeInterval shutdownWaitTime; protected transient ScheduledExecutorService executor; protected transient ScheduledFuture pollerTask; public ScheduledTaskPoller() { } public void init() throws CoreException { } public void start() throws CoreException { executor = Executors.newSingleThreadScheduledExecutor(new ManagedThreadFactory()); scheduleTask(); } protected abstract void scheduleTask(); public void stop() { cancelTask(); shutdownExecutor(); } private void shutdownExecutor() { if (executor != null) { executor.shutdown(); boolean success = false; try { success = executor.awaitTermination(shutdownWaitTimeMs(), TimeUnit.MILLISECONDS); } catch (InterruptedException e) { } if (!success) { log.trace("Pool failed to shutdown in {}ms, forcing shutdown", shutdownWaitTimeMs()); executor.shutdownNow(); } executor = null; } } private void cancelTask() { if (pollerTask != null) { pollerTask.cancel(true); log.trace("Poller {} cancelled", pollerTask); pollerTask = null; } } public void close() { cancelTask(); shutdownExecutor(); } private class PollerTask implements Runnable { /** @see java.lang.Runnable#run() */ @Override public void run() { processMessages(); } } // properties... long shutdownWaitTimeMs() { return getShutdownWaitTime() != null ? getShutdownWaitTime().toMilliseconds() : DEFAULT_SHUTDOWN_WAIT.toMilliseconds(); } public TimeInterval getShutdownWaitTime() { return shutdownWaitTime; } /** * Set the shutdown wait timeout for the pool. * <p> * When <code>stop()</code> is invoked, this causes a emptying and shutdown of the pool. The specified value is the amount of time * to wait for a clean shutdown. If this timeout is exceeded then a forced shutdown ensues, which may mean messages are in an * inconsistent state. * </p> * * @param interval the shutdown time (default is 60 seconds) * @see #stop() */ public void setShutdownWaitTime(TimeInterval interval) { shutdownWaitTime = interval; } @Override public void prepare() throws CoreException {} }
{ "content_hash": "bc5052e45968f7c6910edbb415bdac34", "timestamp": "", "source": "github", "line_count": 112, "max_line_length": 132, "avg_line_length": 26.035714285714285, "alnum_prop": 0.698559670781893, "repo_name": "mcwarman/interlok", "id": "ba890bfdb96dabef3c2774fef82d35ebb655ba01", "size": "3514", "binary": false, "copies": "1", "ref": "refs/heads/develop", "path": "adapter/src/main/java/com/adaptris/core/ScheduledTaskPoller.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "HTML", "bytes": "14797" }, { "name": "Java", "bytes": "9045936" }, { "name": "SQLPL", "bytes": "12123" }, { "name": "XSLT", "bytes": "98810" } ], "symlink_target": "" }
<?xml version="1.0" encoding="UTF-8"?> <spirit:component xmlns:xilinx="http://www.xilinx.com" xmlns:spirit="http://www.spiritconsortium.org/XMLSchema/SPIRIT/1685-2009" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <spirit:vendor>dtysky</spirit:vendor> <spirit:library>user</spirit:library> <spirit:name>DATAPATH</spirit:name> <spirit:version>1.2</spirit:version> <spirit:model> <spirit:views> <spirit:view> <spirit:name>xilinx_verilogsynthesis</spirit:name> <spirit:displayName>Verilog Synthesis</spirit:displayName> <spirit:envIdentifier>verilogSource:vivado.xilinx.com:synthesis</spirit:envIdentifier> <spirit:language>verilog</spirit:language> <spirit:modelName>DATAPATH</spirit:modelName> <spirit:fileSetRef> <spirit:localName>xilinx_verilogsynthesis_view_fileset</spirit:localName> </spirit:fileSetRef> <spirit:parameters> <spirit:parameter> <spirit:name>viewChecksum</spirit:name> <spirit:value>0c6852de</spirit:value> </spirit:parameter> </spirit:parameters> </spirit:view> <spirit:view> <spirit:name>xilinx_verilogbehavioralsimulation</spirit:name> <spirit:displayName>Verilog Simulation</spirit:displayName> <spirit:envIdentifier>verilogSource:vivado.xilinx.com:simulation</spirit:envIdentifier> <spirit:language>verilog</spirit:language> <spirit:modelName>DATAPATH</spirit:modelName> <spirit:fileSetRef> <spirit:localName>xilinx_verilogbehavioralsimulation_view_fileset</spirit:localName> </spirit:fileSetRef> <spirit:parameters> <spirit:parameter> <spirit:name>viewChecksum</spirit:name> <spirit:value>0c6852de</spirit:value> </spirit:parameter> </spirit:parameters> </spirit:view> <spirit:view> <spirit:name>xilinx_xpgui</spirit:name> <spirit:displayName>UI Layout</spirit:displayName> <spirit:envIdentifier>:vivado.xilinx.com:xgui.ui</spirit:envIdentifier> <spirit:fileSetRef> <spirit:localName>xilinx_xpgui_view_fileset</spirit:localName> </spirit:fileSetRef> <spirit:parameters> <spirit:parameter> <spirit:name>viewChecksum</spirit:name> <spirit:value>f3590911</spirit:value> </spirit:parameter> </spirit:parameters> </spirit:view> </spirit:views> <spirit:ports> <spirit:port> <spirit:name>clk</spirit:name> <spirit:wire> <spirit:direction>in</spirit:direction> <spirit:wireTypeDefs> <spirit:wireTypeDef> <spirit:typeName>std_logic</spirit:typeName> <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef> <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef> </spirit:wireTypeDef> </spirit:wireTypeDefs> </spirit:wire> </spirit:port> <spirit:port> <spirit:name>clrn</spirit:name> <spirit:wire> <spirit:direction>in</spirit:direction> <spirit:wireTypeDefs> <spirit:wireTypeDef> <spirit:typeName>std_logic</spirit:typeName> <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef> <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef> </spirit:wireTypeDef> </spirit:wireTypeDefs> </spirit:wire> </spirit:port> <spirit:port> <spirit:name>alu_z</spirit:name> <spirit:wire> <spirit:direction>in</spirit:direction> <spirit:wireTypeDefs> <spirit:wireTypeDef> <spirit:typeName>std_logic</spirit:typeName> <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef> <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef> </spirit:wireTypeDef> </spirit:wireTypeDefs> </spirit:wire> </spirit:port> <spirit:port> <spirit:name>alu_r</spirit:name> <spirit:wire> <spirit:direction>in</spirit:direction> <spirit:vector> <spirit:left spirit:format="long" spirit:resolve="immediate">31</spirit:left> <spirit:right spirit:format="long" spirit:resolve="immediate">0</spirit:right> </spirit:vector> <spirit:wireTypeDefs> <spirit:wireTypeDef> <spirit:typeName>std_logic_vector</spirit:typeName> <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef> <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef> </spirit:wireTypeDef> </spirit:wireTypeDefs> </spirit:wire> </spirit:port> <spirit:port> <spirit:name>alu_a</spirit:name> <spirit:wire> <spirit:direction>out</spirit:direction> <spirit:vector> <spirit:left spirit:format="long" spirit:resolve="immediate">31</spirit:left> <spirit:right spirit:format="long" spirit:resolve="immediate">0</spirit:right> </spirit:vector> <spirit:wireTypeDefs> <spirit:wireTypeDef> <spirit:typeName>std_logic_vector</spirit:typeName> <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef> <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef> </spirit:wireTypeDef> </spirit:wireTypeDefs> </spirit:wire> </spirit:port> <spirit:port> <spirit:name>alu_b</spirit:name> <spirit:wire> <spirit:direction>out</spirit:direction> <spirit:vector> <spirit:left spirit:format="long" spirit:resolve="immediate">31</spirit:left> <spirit:right spirit:format="long" spirit:resolve="immediate">0</spirit:right> </spirit:vector> <spirit:wireTypeDefs> <spirit:wireTypeDef> <spirit:typeName>std_logic_vector</spirit:typeName> <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef> <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef> </spirit:wireTypeDef> </spirit:wireTypeDefs> </spirit:wire> </spirit:port> <spirit:port> <spirit:name>alu_aluc</spirit:name> <spirit:wire> <spirit:direction>out</spirit:direction> <spirit:vector> <spirit:left spirit:format="long" spirit:resolve="immediate">31</spirit:left> <spirit:right spirit:format="long" spirit:resolve="immediate">0</spirit:right> </spirit:vector> <spirit:wireTypeDefs> <spirit:wireTypeDef> <spirit:typeName>std_logic_vector</spirit:typeName> <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef> <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef> </spirit:wireTypeDef> </spirit:wireTypeDefs> </spirit:wire> </spirit:port> <spirit:port> <spirit:name>reg_we</spirit:name> <spirit:wire> <spirit:direction>out</spirit:direction> <spirit:wireTypeDefs> <spirit:wireTypeDef> <spirit:typeName>std_logic</spirit:typeName> <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef> <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef> </spirit:wireTypeDef> </spirit:wireTypeDefs> </spirit:wire> </spirit:port> <spirit:port> <spirit:name>reg_qa</spirit:name> <spirit:wire> <spirit:direction>in</spirit:direction> <spirit:vector> <spirit:left spirit:format="long" spirit:resolve="immediate">31</spirit:left> <spirit:right spirit:format="long" spirit:resolve="immediate">0</spirit:right> </spirit:vector> <spirit:wireTypeDefs> <spirit:wireTypeDef> <spirit:typeName>std_logic_vector</spirit:typeName> <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef> <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef> </spirit:wireTypeDef> </spirit:wireTypeDefs> </spirit:wire> </spirit:port> <spirit:port> <spirit:name>reg_qb</spirit:name> <spirit:wire> <spirit:direction>in</spirit:direction> <spirit:vector> <spirit:left spirit:format="long" spirit:resolve="immediate">31</spirit:left> <spirit:right spirit:format="long" spirit:resolve="immediate">0</spirit:right> </spirit:vector> <spirit:wireTypeDefs> <spirit:wireTypeDef> <spirit:typeName>std_logic_vector</spirit:typeName> <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef> <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef> </spirit:wireTypeDef> </spirit:wireTypeDefs> </spirit:wire> </spirit:port> <spirit:port> <spirit:name>reg_wn</spirit:name> <spirit:wire> <spirit:direction>out</spirit:direction> <spirit:vector> <spirit:left spirit:format="long" spirit:resolve="immediate">4</spirit:left> <spirit:right spirit:format="long" spirit:resolve="immediate">0</spirit:right> </spirit:vector> <spirit:wireTypeDefs> <spirit:wireTypeDef> <spirit:typeName>std_logic_vector</spirit:typeName> <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef> <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef> </spirit:wireTypeDef> </spirit:wireTypeDefs> </spirit:wire> </spirit:port> <spirit:port> <spirit:name>reg_rna</spirit:name> <spirit:wire> <spirit:direction>out</spirit:direction> <spirit:vector> <spirit:left spirit:format="long" spirit:resolve="immediate">4</spirit:left> <spirit:right spirit:format="long" spirit:resolve="immediate">0</spirit:right> </spirit:vector> <spirit:wireTypeDefs> <spirit:wireTypeDef> <spirit:typeName>std_logic_vector</spirit:typeName> <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef> <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef> </spirit:wireTypeDef> </spirit:wireTypeDefs> </spirit:wire> </spirit:port> <spirit:port> <spirit:name>reg_rnb</spirit:name> <spirit:wire> <spirit:direction>out</spirit:direction> <spirit:vector> <spirit:left spirit:format="long" spirit:resolve="immediate">4</spirit:left> <spirit:right spirit:format="long" spirit:resolve="immediate">0</spirit:right> </spirit:vector> <spirit:wireTypeDefs> <spirit:wireTypeDef> <spirit:typeName>std_logic_vector</spirit:typeName> <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef> <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef> </spirit:wireTypeDef> </spirit:wireTypeDefs> </spirit:wire> </spirit:port> <spirit:port> <spirit:name>reg_d</spirit:name> <spirit:wire> <spirit:direction>out</spirit:direction> <spirit:vector> <spirit:left spirit:format="long" spirit:resolve="immediate">31</spirit:left> <spirit:right spirit:format="long" spirit:resolve="immediate">0</spirit:right> </spirit:vector> <spirit:wireTypeDefs> <spirit:wireTypeDef> <spirit:typeName>std_logic_vector</spirit:typeName> <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef> <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef> </spirit:wireTypeDef> </spirit:wireTypeDefs> </spirit:wire> </spirit:port> <spirit:port> <spirit:name>con_wreg</spirit:name> <spirit:wire> <spirit:direction>in</spirit:direction> <spirit:wireTypeDefs> <spirit:wireTypeDef> <spirit:typeName>std_logic</spirit:typeName> <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef> <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef> </spirit:wireTypeDef> </spirit:wireTypeDefs> </spirit:wire> </spirit:port> <spirit:port> <spirit:name>con_regrt</spirit:name> <spirit:wire> <spirit:direction>in</spirit:direction> <spirit:wireTypeDefs> <spirit:wireTypeDef> <spirit:typeName>std_logic</spirit:typeName> <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef> <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef> </spirit:wireTypeDef> </spirit:wireTypeDefs> </spirit:wire> </spirit:port> <spirit:port> <spirit:name>con_jal</spirit:name> <spirit:wire> <spirit:direction>in</spirit:direction> <spirit:wireTypeDefs> <spirit:wireTypeDef> <spirit:typeName>std_logic</spirit:typeName> <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef> <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef> </spirit:wireTypeDef> </spirit:wireTypeDefs> </spirit:wire> </spirit:port> <spirit:port> <spirit:name>con_m2reg</spirit:name> <spirit:wire> <spirit:direction>in</spirit:direction> <spirit:wireTypeDefs> <spirit:wireTypeDef> <spirit:typeName>std_logic</spirit:typeName> <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef> <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef> </spirit:wireTypeDef> </spirit:wireTypeDefs> </spirit:wire> </spirit:port> <spirit:port> <spirit:name>con_shfit</spirit:name> <spirit:wire> <spirit:direction>in</spirit:direction> <spirit:wireTypeDefs> <spirit:wireTypeDef> <spirit:typeName>std_logic</spirit:typeName> <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef> <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef> </spirit:wireTypeDef> </spirit:wireTypeDefs> </spirit:wire> </spirit:port> <spirit:port> <spirit:name>con_aluimm</spirit:name> <spirit:wire> <spirit:direction>in</spirit:direction> <spirit:wireTypeDefs> <spirit:wireTypeDef> <spirit:typeName>std_logic</spirit:typeName> <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef> <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef> </spirit:wireTypeDef> </spirit:wireTypeDefs> </spirit:wire> </spirit:port> <spirit:port> <spirit:name>con_sext</spirit:name> <spirit:wire> <spirit:direction>in</spirit:direction> <spirit:wireTypeDefs> <spirit:wireTypeDef> <spirit:typeName>std_logic</spirit:typeName> <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef> <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef> </spirit:wireTypeDef> </spirit:wireTypeDefs> </spirit:wire> </spirit:port> <spirit:port> <spirit:name>con_wmem</spirit:name> <spirit:wire> <spirit:direction>in</spirit:direction> <spirit:wireTypeDefs> <spirit:wireTypeDef> <spirit:typeName>std_logic</spirit:typeName> <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef> <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef> </spirit:wireTypeDef> </spirit:wireTypeDefs> </spirit:wire> </spirit:port> <spirit:port> <spirit:name>con_aluc</spirit:name> <spirit:wire> <spirit:direction>in</spirit:direction> <spirit:vector> <spirit:left spirit:format="long" spirit:resolve="immediate">3</spirit:left> <spirit:right spirit:format="long" spirit:resolve="immediate">0</spirit:right> </spirit:vector> <spirit:wireTypeDefs> <spirit:wireTypeDef> <spirit:typeName>std_logic_vector</spirit:typeName> <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef> <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef> </spirit:wireTypeDef> </spirit:wireTypeDefs> </spirit:wire> </spirit:port> <spirit:port> <spirit:name>con_pcsource</spirit:name> <spirit:wire> <spirit:direction>in</spirit:direction> <spirit:vector> <spirit:left spirit:format="long" spirit:resolve="immediate">1</spirit:left> <spirit:right spirit:format="long" spirit:resolve="immediate">0</spirit:right> </spirit:vector> <spirit:wireTypeDefs> <spirit:wireTypeDef> <spirit:typeName>std_logic_vector</spirit:typeName> <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef> <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef> </spirit:wireTypeDef> </spirit:wireTypeDefs> </spirit:wire> </spirit:port> <spirit:port> <spirit:name>con_op</spirit:name> <spirit:wire> <spirit:direction>out</spirit:direction> <spirit:vector> <spirit:left spirit:format="long" spirit:resolve="immediate">5</spirit:left> <spirit:right spirit:format="long" spirit:resolve="immediate">0</spirit:right> </spirit:vector> <spirit:wireTypeDefs> <spirit:wireTypeDef> <spirit:typeName>std_logic_vector</spirit:typeName> <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef> <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef> </spirit:wireTypeDef> </spirit:wireTypeDefs> </spirit:wire> </spirit:port> <spirit:port> <spirit:name>con_func</spirit:name> <spirit:wire> <spirit:direction>out</spirit:direction> <spirit:vector> <spirit:left spirit:format="long" spirit:resolve="immediate">5</spirit:left> <spirit:right spirit:format="long" spirit:resolve="immediate">0</spirit:right> </spirit:vector> <spirit:wireTypeDefs> <spirit:wireTypeDef> <spirit:typeName>std_logic_vector</spirit:typeName> <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef> <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef> </spirit:wireTypeDef> </spirit:wireTypeDefs> </spirit:wire> </spirit:port> <spirit:port> <spirit:name>con_z</spirit:name> <spirit:wire> <spirit:direction>out</spirit:direction> <spirit:wireTypeDefs> <spirit:wireTypeDef> <spirit:typeName>std_logic</spirit:typeName> <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef> <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef> </spirit:wireTypeDef> </spirit:wireTypeDefs> </spirit:wire> </spirit:port> <spirit:port> <spirit:name>inst_do</spirit:name> <spirit:wire> <spirit:direction>in</spirit:direction> <spirit:vector> <spirit:left spirit:format="long" spirit:resolve="immediate">31</spirit:left> <spirit:right spirit:format="long" spirit:resolve="immediate">0</spirit:right> </spirit:vector> <spirit:wireTypeDefs> <spirit:wireTypeDef> <spirit:typeName>std_logic_vector</spirit:typeName> <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef> <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef> </spirit:wireTypeDef> </spirit:wireTypeDefs> </spirit:wire> </spirit:port> <spirit:port> <spirit:name>inst_a</spirit:name> <spirit:wire> <spirit:direction>out</spirit:direction> <spirit:vector> <spirit:left spirit:format="long" spirit:resolve="immediate">31</spirit:left> <spirit:right spirit:format="long" spirit:resolve="immediate">0</spirit:right> </spirit:vector> <spirit:wireTypeDefs> <spirit:wireTypeDef> <spirit:typeName>std_logic_vector</spirit:typeName> <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef> <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef> </spirit:wireTypeDef> </spirit:wireTypeDefs> </spirit:wire> </spirit:port> <spirit:port> <spirit:name>data_do</spirit:name> <spirit:wire> <spirit:direction>in</spirit:direction> <spirit:vector> <spirit:left spirit:format="long" spirit:resolve="immediate">31</spirit:left> <spirit:right spirit:format="long" spirit:resolve="immediate">0</spirit:right> </spirit:vector> <spirit:wireTypeDefs> <spirit:wireTypeDef> <spirit:typeName>std_logic_vector</spirit:typeName> <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef> <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef> </spirit:wireTypeDef> </spirit:wireTypeDefs> </spirit:wire> </spirit:port> <spirit:port> <spirit:name>data_a</spirit:name> <spirit:wire> <spirit:direction>out</spirit:direction> <spirit:vector> <spirit:left spirit:format="long" spirit:resolve="immediate">31</spirit:left> <spirit:right spirit:format="long" spirit:resolve="immediate">0</spirit:right> </spirit:vector> <spirit:wireTypeDefs> <spirit:wireTypeDef> <spirit:typeName>std_logic_vector</spirit:typeName> <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef> <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef> </spirit:wireTypeDef> </spirit:wireTypeDefs> </spirit:wire> </spirit:port> <spirit:port> <spirit:name>data_di</spirit:name> <spirit:wire> <spirit:direction>out</spirit:direction> <spirit:vector> <spirit:left spirit:format="long" spirit:resolve="immediate">31</spirit:left> <spirit:right spirit:format="long" spirit:resolve="immediate">0</spirit:right> </spirit:vector> <spirit:wireTypeDefs> <spirit:wireTypeDef> <spirit:typeName>std_logic_vector</spirit:typeName> <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef> <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef> </spirit:wireTypeDef> </spirit:wireTypeDefs> </spirit:wire> </spirit:port> <spirit:port> <spirit:name>data_we</spirit:name> <spirit:wire> <spirit:direction>out</spirit:direction> <spirit:wireTypeDefs> <spirit:wireTypeDef> <spirit:typeName>std_logic</spirit:typeName> <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef> <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef> </spirit:wireTypeDef> </spirit:wireTypeDefs> </spirit:wire> </spirit:port> <spirit:port> <spirit:name>pc_out</spirit:name> <spirit:wire> <spirit:direction>out</spirit:direction> <spirit:vector> <spirit:left spirit:format="long" spirit:resolve="immediate">31</spirit:left> <spirit:right spirit:format="long" spirit:resolve="immediate">0</spirit:right> </spirit:vector> <spirit:wireTypeDefs> <spirit:wireTypeDef> <spirit:typeName>std_logic_vector</spirit:typeName> <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef> <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef> </spirit:wireTypeDef> </spirit:wireTypeDefs> </spirit:wire> </spirit:port> </spirit:ports> </spirit:model> <spirit:fileSets> <spirit:fileSet> <spirit:name>xilinx_verilogsynthesis_view_fileset</spirit:name> <spirit:file> <spirit:name>DATAPATH.v</spirit:name> <spirit:fileType>verilogSource</spirit:fileType> <spirit:userFileType>CHECKSUM_0c6852de</spirit:userFileType> </spirit:file> </spirit:fileSet> <spirit:fileSet> <spirit:name>xilinx_verilogbehavioralsimulation_view_fileset</spirit:name> <spirit:file> <spirit:name>DATAPATH.v</spirit:name> <spirit:fileType>verilogSource</spirit:fileType> </spirit:file> </spirit:fileSet> <spirit:fileSet> <spirit:name>xilinx_xpgui_view_fileset</spirit:name> <spirit:file> <spirit:name>xgui/DATAPATH_v1_0.tcl</spirit:name> <spirit:userFileType>XGUI_VERSION_2</spirit:userFileType> <spirit:fileType>tclSource</spirit:fileType> <spirit:userFileType>CHECKSUM_f3590911</spirit:userFileType> </spirit:file> </spirit:fileSet> </spirit:fileSets> <spirit:description>DATAPATH_v1_2</spirit:description> <spirit:parameters> <spirit:parameter> <spirit:name>Component_Name</spirit:name> <spirit:value spirit:resolve="user" spirit:id="PARAM_VALUE.Component_Name" spirit:order="1">DATAPATH_v1_0</spirit:value> </spirit:parameter> </spirit:parameters> <spirit:vendorExtensions> <xilinx:coreExtensions> <xilinx:supportedFamilies> <xilinx:family xilinx:lifeCycle="Production">artix7</xilinx:family> </xilinx:supportedFamilies> <xilinx:taxonomies> <xilinx:taxonomy>/BaseIP</xilinx:taxonomy> </xilinx:taxonomies> <xilinx:displayName>DATAPATH_v1_2</xilinx:displayName> <xilinx:coreRevision>16</xilinx:coreRevision> <xilinx:coreCreationDateTime>2015-01-20T02:45:34Z</xilinx:coreCreationDateTime> <xilinx:tags> <xilinx:tag xilinx:name="xilinx.com:ip:DATAPATH:1.0_ARCHIVE_LOCATION">D:/Spira_Heaven/0-MyWorks/MIPS_CPU/DATAPATH/DATAPATH.srcs/sources_1/new</xilinx:tag> <xilinx:tag xilinx:name="xilinx.com:user:DATAPATH:1.0_ARCHIVE_LOCATION">D:/Spira_Heaven/0-MyWorks/MIPS_CPU/DATAPATH/DATAPATH.srcs/sources_1/new</xilinx:tag> <xilinx:tag xilinx:name="dtysky:user:DATAPATH:1.0_ARCHIVE_LOCATION">D:/Spira_Heaven/0-MyWorks/MIPS_CPU/DATAPATH/DATAPATH.srcs/sources_1/new</xilinx:tag> <xilinx:tag xilinx:name="dtysky:user:DATAPATH:1.1_ARCHIVE_LOCATION">D:/Spira_Heaven/0-MyWorks/MIPS_CPU</xilinx:tag> <xilinx:tag xilinx:name="dtysky:user:DATAPATH:1.2_ARCHIVE_LOCATION">D:/Spira_Heaven/0-MyWorks/MIPS_CPU</xilinx:tag> </xilinx:tags> </xilinx:coreExtensions> <xilinx:packagingInfo> <xilinx:xilinxVersion>2014.2</xilinx:xilinxVersion> <xilinx:checksum xilinx:scope="fileGroups" xilinx:value="fd273f6e"/> <xilinx:checksum xilinx:scope="ports" xilinx:value="80b87814"/> <xilinx:checksum xilinx:scope="parameters" xilinx:value="3bcb12f3"/> </xilinx:packagingInfo> </spirit:vendorExtensions> </spirit:component>
{ "content_hash": "5b77b8117c9cbc9a7a6f7ca465b5352c", "timestamp": "", "source": "github", "line_count": 640, "max_line_length": 183, "avg_line_length": 44.89375, "alnum_prop": 0.6257830989837115, "repo_name": "dtysky/SIMPLE_MIPS_CPU", "id": "bbfa3e24a1d6ffc3400af4046e23de56f43be82d", "size": "28732", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "SUB_MODULE/DATAPATH/DATAPATH.srcs/sources_1/new/component.xml", "mode": "33188", "license": "mit", "language": [ { "name": "SystemVerilog", "bytes": "31834" }, { "name": "Tcl", "bytes": "108716" }, { "name": "Verilog", "bytes": "138021" } ], "symlink_target": "" }
<div class='row'> <div class="col-md-12"> <div class="panel panel-primary family-panel"> <div class="panel-heading"> <div class="options"> <a href="javascript:;" class="panel-collapse"><i class="fa fa-chevron-up"></i></a> </div> <h4 class="panel-title">Ancestors List</h4> </div> <div class="panel-body ancestor-list"> <table class="searchResultsTable grid table table-striped table-hover tree-family" id=""> <colgroup> <col class="hidden-xs"> <col> <col> </colgroup> <thead class="hiddenHeader" style=""> <tr> <th class="hidden-xs"></th> <th class="personHeader ng-binding">Person</th> <th class="eventsHeader">Events</th> </tr> </thead> <tbody> <tr class="person"> <td class="hidden-xs ng-binding" ng-bind-html="getAncestryHtml(person)"><div class="dots"><span class="male"></span><span class="male"></span><span class="male"></span></div></td> <td> <div class="personWrapper"> <div class="nameWrapper"> <i class="icon-rounded fs-icon-male" ng-class="{'fs-icon-male': person.isMale(), 'fs-icon-female': !person.isMale()}">&nbsp;</i> <a href="" class="personCard name ng-binding" ng-click="select(person)">Bronius Paukstys</a> </div> <ul class="list-collapsed"> <li class="pid ng-binding">L851-NPH</li> </ul> </div> </td> <td class="primaryEvents"> <div class="event clearfix"> <span class="eventName hidden-xs hidden-sm">birth</span><span class="eventName visible-xs visible-sm">b.</span> <span class="eventDate ng-binding"></span> <span class="eventPlace ng-binding"><span ng-show="person.display.birthPlace">,&nbsp;</span></span> </div> <div class="event clearfix"> <span class="eventName hidden-xs hidden-sm">death</span><span class="eventName visible-xs visible-sm">d.</span> <span class="eventDate ng-binding"></span> <span class="eventPlace ng-binding"><span class="ng-hide">,&nbsp;</span></span> </div> </td> </tr> </tbody> </table> </div> </div> </div> </div>
{ "content_hash": "a753b234ed6629eddd8daa991e876199", "timestamp": "", "source": "github", "line_count": 56, "max_line_length": 193, "avg_line_length": 45.517857142857146, "alnum_prop": 0.5056885052961946, "repo_name": "rootsdev/familysearch-widgets", "id": "c1cd2bb34f1181268f616504097f79fb6e820747", "size": "2549", "binary": false, "copies": "1", "ref": "refs/heads/gh-pages", "path": "templates/listContainer.html", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "344728" }, { "name": "JavaScript", "bytes": "59643" } ], "symlink_target": "" }
Translation tool primarily designed for PrestaShop. Emphasis is put on sharing strings between versions to accomodate the fast release cycle.
{ "content_hash": "4b99110b476cb2ce8a589093c80b41ce", "timestamp": "", "source": "github", "line_count": 2, "max_line_length": 90, "avg_line_length": 71.5, "alnum_prop": 0.8391608391608392, "repo_name": "djfm/SymSlate", "id": "ce25f08e3f8f19b19589ded30ac613dba0d93599", "size": "143", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "README.md", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "6192" }, { "name": "JavaScript", "bytes": "17380" }, { "name": "PHP", "bytes": "452428" }, { "name": "Shell", "bytes": "326" } ], "symlink_target": "" }
/* SUN : Customizable colors and images */ /* ------------------------------------------------------------------------ */ /* add colors and images to roller.css */ #logobackground { background: #e77100 !important; } .bannerBox { background: url("two-banner.gif") repeat-x top; border-bottom: 2px black solid; color: #666666; } .bannerStatusBox { background: #dde6ec; color: #666666; } #footer { border: none; color: #5d7992; } h1 { color: #e77100; } h2 { color: #e77100; } h3 { color: black; } p.subtitle { color: #000000; } .subtitle span { color: #52829c; } a { color: #35556B; } a:link { color: #35556B; } a:visited { color: #35556B; } a:hover { color: #35556B; } a:active { color: #35556B; } table.rollertable th, table.rollertable th { background: #52829c; } table.rollertable td, table.rollertable tbody td { border: 1px solid #52829c; } div.centerTitle { background: #dee7ef; } div.control { background: #dee7ef; } div.controlToggle { background: url("two-togglegrey.gif") repeat-x top; } div.entriesBox { background: #e3e3e3; } div.entryTitleBox { color: #35556B; background: #dee7ef; } div.entryBox { border-bottom: 1px #999999 solid; } div.entryBoxPinned { border-bottom: 1px grey solid; } .entryDetails { color: #666666; } .entryDescription { color: black; } .yourWeblogBox { border-top: 1px solid #999; } input.searchButton { color: white; background: #e77100; } .sidebarBodyHead { background: #3d5c71; color: white; } .searchSidebarBodyHead h3 { color: black; } .sidebarBodyHead h3 { color: white; } .sidebarFade, div.sidebarBody { background: #ccdae3; color: #666666; } .searchSidebarHead { background: #d1d766; } .searchSidebarBody { background: #d1d766; } /* ------------------------------------------------------------------------ */ /* add colors and iamges to menu.css */ td.menuTabSelected { background: url("menutab-sel.gif"); /* background-color: #52829c; */ } td.menuTabUnselected { background: url("menutab-unsel.gif"); /* background-color: #bdbdbd; */ } .menuItemTable { background-color: #52829c; color: white; } td.menuTabSelected a:link, td.menuTabSelected a:visited, td.menuTabSelected a:hover, td.menuTabSelected a:active { color: white; } td.menuTabUnselected a:link, td.menuTabUnselected a:visited, td.menuTabUnselected a:hover, td.menuTabUnselected a:active { color: #52829c; } a.menuItemSelected:link, a.menuItemSelected:visited, a.menuItemSelected:hover, a.menuItemSelected:active { color: white; } a.menuItemUnselected:link, a.menuItemUnselected:visited, a.menuItemUnselected:hover, a.menuItemUnselected:active { color: white; } a.menuItemSelected:hover { color: white; text-decoration: none; } td.menuTabSelected a:hover { color: white; text-decoration: none; } /* for main menu page */ span.mm_weblog_name { color: #707277; } td.mm_table_actions { background: #fff4d4; } /* RTE editor */ .rteBack tbody tr td, .rteBack tr td, .rteDiv, .rteBack .rteImageLowered, .rteImage:active, .rteImageRaised, .rteImage:hover, .rteImageSm, .rteImage { background: #dee7ef; } .rteImage { border: 1px solid #bcc5cd; } .rteImageSm { border: 1px solid #bcc5cd; } .rteDiv { border: 1px solid #bcc5cd; }
{ "content_hash": "a281c7d462477f8db0c84a8359661ff0", "timestamp": "", "source": "github", "line_count": 176, "max_line_length": 150, "avg_line_length": 19.09090909090909, "alnum_prop": 0.6410714285714286, "repo_name": "paulnguyen/cmpe279", "id": "bdd1fb0f4dcf9617a97e0febf466de29ab4f67b3", "size": "4181", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "eclipse/Roller/WebContent/roller-ui/theme/sun/colors.css", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Assembly", "bytes": "49547" }, { "name": "C", "bytes": "210374" }, { "name": "C#", "bytes": "1614" }, { "name": "CSS", "bytes": "126587" }, { "name": "HTML", "bytes": "2152007" }, { "name": "Java", "bytes": "6777451" }, { "name": "JavaScript", "bytes": "201780" }, { "name": "Makefile", "bytes": "4405" }, { "name": "PLSQL", "bytes": "7899" }, { "name": "Shell", "bytes": "26618" }, { "name": "XSLT", "bytes": "10737" } ], "symlink_target": "" }
<?php class question_controller_api extends core_controller_api_abstract { public function index() { } public function random() { $categoryId = $this->request()->post()->get('category'); $random = factories::get()->obj('quiz_model_random_question'); $random->category($categoryId); $questions = $random->load(); $data = []; foreach ($questions as $question) { $row['question'] = $question; $random = factories::get()->obj('quiz_model_random_answer'); $random->question($question['id']); $random->valid(1); $random->invalid(3); $answers = $random->collection(); $row['answers'] = array_column($answers, 'value'); $row['valid'] = key(array_filter($answers, function($var) { return $var['is_valid'] === '1'; })); $references = factories::get()->obj('question_model_question_reference') ->collection('*', $question['id'], 'question_id'); $urls = []; foreach ($references as $reference) { $urls[] = $reference['url']; } $row['reference'] = $urls; $data[] = $row; } $this->response($data); } }
{ "content_hash": "79644caadea3a2d44a7d29d2564b2667", "timestamp": "", "source": "github", "line_count": 45, "max_line_length": 84, "avg_line_length": 30.11111111111111, "alnum_prop": 0.4789667896678967, "repo_name": "NexwayGroup/Quizz-API", "id": "0b6f7f7fc29b893666e1eb94bba883983dc62258", "size": "1355", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "app/question/controller/api.php", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "0" }, { "name": "JavaScript", "bytes": "7955" }, { "name": "PHP", "bytes": "15012870" }, { "name": "Shell", "bytes": "519" } ], "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_101) on Sun Jul 23 21:25:03 IST 2017 --> <title>YarnAssign (jarn 1.1.0 API)</title> <meta name="date" content="2017-07-23"> <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="YarnAssign (jarn 1.1.0 API)"; } } catch(err) { } //--> var methods = {"i0":10}; var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; var tableTab = "tableTab"; var activeTableTab = "activeTableTab"; </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 class="navBarCell1Rev">Class</li> <li><a href="package-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> <div class="subNav"> <ul class="navList"> <li>Prev&nbsp;Class</li> <li><a href="../../../../org/mini2Dx/yarn/operation/YarnCommand.html" title="class in org.mini2Dx.yarn.operation"><span class="typeNameLink">Next&nbsp;Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../index.html?org/mini2Dx/yarn/operation/YarnAssign.html" target="_top">Frames</a></li> <li><a href="YarnAssign.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> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li><a href="#fields.inherited.from.class.org.mini2Dx.yarn.operation.YarnOperation">Field</a>&nbsp;|&nbsp;</li> <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <!-- ======== START OF CLASS DATA ======== --> <div class="header"> <div class="subTitle">org.mini2Dx.yarn.operation</div> <h2 title="Class YarnAssign" class="title">Class YarnAssign</h2> </div> <div class="contentContainer"> <ul class="inheritance"> <li>java.lang.Object</li> <li> <ul class="inheritance"> <li><a href="../../../../org/mini2Dx/yarn/operation/YarnOperation.html" title="class in org.mini2Dx.yarn.operation">org.mini2Dx.yarn.operation.YarnOperation</a></li> <li> <ul class="inheritance"> <li>org.mini2Dx.yarn.operation.YarnAssign</li> </ul> </li> </ul> </li> </ul> <div class="description"> <ul class="blockList"> <li class="blockList"> <hr> <br> <pre>public class <span class="typeNameLabel">YarnAssign</span> extends <a href="../../../../org/mini2Dx/yarn/operation/YarnOperation.html" title="class in org.mini2Dx.yarn.operation">YarnOperation</a></pre> <div class="block">Represents an assign operation in Yarn<br> <br> Example: &lt;&lt;set $variable to 1&gt;&gt;</div> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <!-- =========== FIELD SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="field.summary"> <!-- --> </a> <h3>Field Summary</h3> <ul class="blockList"> <li class="blockList"><a name="fields.inherited.from.class.org.mini2Dx.yarn.operation.YarnOperation"> <!-- --> </a> <h3>Fields inherited from class&nbsp;org.mini2Dx.yarn.operation.<a href="../../../../org/mini2Dx/yarn/operation/YarnOperation.html" title="class in org.mini2Dx.yarn.operation">YarnOperation</a></h3> <code><a href="../../../../org/mini2Dx/yarn/operation/YarnOperation.html#operationIndex">operationIndex</a></code></li> </ul> </li> </ul> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor.summary"> <!-- --> </a> <h3>Constructor Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colOne" scope="col">Constructor and Description</th> </tr> <tr class="altColor"> <td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/mini2Dx/yarn/operation/YarnAssign.html#YarnAssign-int-int-java.lang.String-org.mini2Dx.yarn.parser.YarnParser.ValueExpressionContext-">YarnAssign</a></span>(int&nbsp;operationIndex, int&nbsp;lineNumber, java.lang.String&nbsp;variableName, <a href="../../../../org/mini2Dx/yarn/parser/YarnParser.ValueExpressionContext.html" title="class in org.mini2Dx.yarn.parser">YarnParser.ValueExpressionContext</a>&nbsp;valueExpression)</code>&nbsp;</td> </tr> </table> </li> </ul> <!-- ========== METHOD SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="method.summary"> <!-- --> </a> <h3>Method Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tr id="i0" class="altColor"> <td class="colFirst"><code>int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/mini2Dx/yarn/operation/YarnAssign.html#resume-org.mini2Dx.yarn.YarnState-java.util.List-">resume</a></span>(<a href="../../../../org/mini2Dx/yarn/YarnState.html" title="class in org.mini2Dx.yarn">YarnState</a>&nbsp;yarnState, java.util.List&lt;<a href="../../../../org/mini2Dx/yarn/YarnExecutionListener.html" title="interface in org.mini2Dx.yarn">YarnExecutionListener</a>&gt;&nbsp;listeners)</code> <div class="block">Resumes this operation</div> </td> </tr> </table> <ul class="blockList"> <li class="blockList"><a name="methods.inherited.from.class.org.mini2Dx.yarn.operation.YarnOperation"> <!-- --> </a> <h3>Methods inherited from class&nbsp;org.mini2Dx.yarn.operation.<a href="../../../../org/mini2Dx/yarn/operation/YarnOperation.html" title="class in org.mini2Dx.yarn.operation">YarnOperation</a></h3> <code><a href="../../../../org/mini2Dx/yarn/operation/YarnOperation.html#getLineNumber--">getLineNumber</a>, <a href="../../../../org/mini2Dx/yarn/operation/YarnOperation.html#getOperationIndex--">getOperationIndex</a>, <a href="../../../../org/mini2Dx/yarn/operation/YarnOperation.html#resolve-org.mini2Dx.yarn.YarnState-org.mini2Dx.yarn.parser.YarnParser.ValueExpressionContext-">resolve</a></code></li> </ul> <ul class="blockList"> <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> <!-- --> </a> <h3>Methods inherited from class&nbsp;java.lang.Object</h3> <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li> </ul> </li> </ul> </li> </ul> </div> <div class="details"> <ul class="blockList"> <li class="blockList"> <!-- ========= CONSTRUCTOR DETAIL ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor.detail"> <!-- --> </a> <h3>Constructor Detail</h3> <a name="YarnAssign-int-int-java.lang.String-org.mini2Dx.yarn.parser.YarnParser.ValueExpressionContext-"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>YarnAssign</h4> <pre>public&nbsp;YarnAssign(int&nbsp;operationIndex, int&nbsp;lineNumber, java.lang.String&nbsp;variableName, <a href="../../../../org/mini2Dx/yarn/parser/YarnParser.ValueExpressionContext.html" title="class in org.mini2Dx.yarn.parser">YarnParser.ValueExpressionContext</a>&nbsp;valueExpression)</pre> </li> </ul> </li> </ul> <!-- ============ METHOD DETAIL ========== --> <ul class="blockList"> <li class="blockList"><a name="method.detail"> <!-- --> </a> <h3>Method Detail</h3> <a name="resume-org.mini2Dx.yarn.YarnState-java.util.List-"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>resume</h4> <pre>public&nbsp;int&nbsp;resume(<a href="../../../../org/mini2Dx/yarn/YarnState.html" title="class in org.mini2Dx.yarn">YarnState</a>&nbsp;yarnState, java.util.List&lt;<a href="../../../../org/mini2Dx/yarn/YarnExecutionListener.html" title="interface in org.mini2Dx.yarn">YarnExecutionListener</a>&gt;&nbsp;listeners) throws <a href="../../../../org/mini2Dx/yarn/execution/YarnExecutionException.html" title="class in org.mini2Dx.yarn.execution">YarnExecutionException</a></pre> <div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/mini2Dx/yarn/operation/YarnOperation.html#resume-org.mini2Dx.yarn.YarnState-java.util.List-">YarnOperation</a></code></span></div> <div class="block">Resumes this operation</div> <dl> <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> <dd><code><a href="../../../../org/mini2Dx/yarn/operation/YarnOperation.html#resume-org.mini2Dx.yarn.YarnState-java.util.List-">resume</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/mini2Dx/yarn/operation/YarnOperation.html" title="class in org.mini2Dx.yarn.operation">YarnOperation</a></code></dd> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>yarnState</code> - The current <a href="../../../../org/mini2Dx/yarn/YarnState.html" title="class in org.mini2Dx.yarn"><code>YarnState</code></a></dd> <dd><code>listeners</code> - A list <a href="../../../../org/mini2Dx/yarn/execution/YarnExecutionException.html" title="class in org.mini2Dx.yarn.execution"><code>YarnExecutionException</code></a> to be notified of events</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>The index of the next operation to execute, -1 if this operation is on-going</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="../../../../org/mini2Dx/yarn/execution/YarnExecutionException.html" title="class in org.mini2Dx.yarn.execution">YarnExecutionException</a></code> - Thrown if an error occurs during execution</dd> </dl> </li> </ul> </li> </ul> </li> </ul> </div> </div> <!-- ========= END OF CLASS DATA ========= --> <!-- ======= 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 class="navBarCell1Rev">Class</li> <li><a href="package-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> <div class="subNav"> <ul class="navList"> <li>Prev&nbsp;Class</li> <li><a href="../../../../org/mini2Dx/yarn/operation/YarnCommand.html" title="class in org.mini2Dx.yarn.operation"><span class="typeNameLink">Next&nbsp;Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../index.html?org/mini2Dx/yarn/operation/YarnAssign.html" target="_top">Frames</a></li> <li><a href="YarnAssign.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> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li><a href="#fields.inherited.from.class.org.mini2Dx.yarn.operation.YarnOperation">Field</a>&nbsp;|&nbsp;</li> <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> </body> </html>
{ "content_hash": "6035a9a06982fa88b31ad444c8f46c62", "timestamp": "", "source": "github", "line_count": 323, "max_line_length": 405, "avg_line_length": 42.969040247678016, "alnum_prop": 0.658044527703725, "repo_name": "mini2Dx/jarn", "id": "7e692e006b7f44f6870f18a08da1c13950ec7042", "size": "13879", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "docs/javadoc/1.1.0/org/mini2Dx/yarn/operation/YarnAssign.html", "mode": "33188", "license": "mit", "language": [ { "name": "ANTLR", "bytes": "6510" }, { "name": "HTML", "bytes": "2943" }, { "name": "Java", "bytes": "224157" }, { "name": "Ruby", "bytes": "6525" } ], "symlink_target": "" }
title: Install layout: docwithnav --- Kubernetes 1.7 or higher clusters run the [API Aggregator](https://kubernetes.io/docs/concepts/api-extension/apiserver-aggregation/), which is a specialized proxy server that sits in front of the core API Server. Service Catalog provides an API server that sits behind the API aggregator, so you'll be using `kubectl` as normal to interact with Service Catalog. To learn more about API aggregation, please see the [Kubernetes documentation](https://kubernetes.io/docs/concepts/api-extension/apiserver-aggregation/). The rest of this document details how to: - Set up Service Catalog on your cluster - Interact with the Service Catalog API # Step 1 - Prerequisites ## Kubernetes Version Service Catalog requires a Kubernetes cluster v1.7 or later. You'll also need a [Kubernetes configuration file](https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/) installed on your host. You need this file so you can use `kubectl` and [`helm`](https://helm.sh) to communicate with the cluster. Many Kubernetes installation tools and/or cloud providers will set this configuration file up for you. Please check with your tool or provider for details. ### `kubectl` Version Most interaction with the service catalog system is achieved through the `kubectl` command line interface. As with the cluster version, Service Catalog requires `kubectl` version 1.7 or newer. First, check your version of `kubectl`: ```console kubectl version ``` Ensure that the server version and client versions are both `1.7` or above. If you need to upgrade your client, follow the [installation instructions](https://kubernetes.io/docs/tasks/kubectl/install/) to get a new `kubectl` binary. For example, run the following command to get an up-to-date binary on Mac OS: ```console curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/darwin/amd64/kubectl chmod +x ./kubectl ``` ## In-Cluster DNS You'll need a Kubernetes installation with in-cluster DNS enabled. Most popular installation methods will automatically configure in-cluster DNS for you: - [Minikube](https://github.com/kubernetes/minikube) - [`hack/local-up-cluster.sh`](https://github.com/kubernetes/kubernetes/blob/master/hack/local-up-cluster.sh) (in the Kubernetes repository) - Most cloud providers ## Helm You'll install Service Catalog with [Helm](http://helm.sh/), and you'll need v2.7.0 or newer for that. See the steps below to install. ### If You Don't Have Helm Installed If you don't have Helm installed already, [download the `helm` CLI](https://github.com/kubernetes/helm#install) and then run `helm init` (this installs Tiller, the server-side component of Helm, into your Kubernetes cluster). ### If You Already Have Helm Installed If you already have Helm installed, run `helm version` and ensure that both the client and server versions are `v2.7.0` or above. If they aren't, [install a newer version of the `helm` CLI](https://github.com/kubernetes/helm#install) and run `helm init --upgrade`. For more details on installation, see the [Helm installation instructions](https://github.com/kubernetes/helm/blob/master/docs/install.md). ### Tiller Permissions Tiller is the in-cluster server component of Helm. By default, `helm init` installs the Tiller pod into the `kube-system` namespace, and configures Tiller to use the `default` service account. Tiller will need to be configured with `cluster-admin` access to properly install Service Catalog: ```console kubectl create clusterrolebinding tiller-cluster-admin \ --clusterrole=cluster-admin \ --serviceaccount=kube-system:default ``` ## Helm Repository Setup Service Catalog is easily installed via a [Helm chart](https://github.com/kubernetes/helm/blob/master/docs/charts.md). This chart is located in a [chart repository](https://github.com/kubernetes/helm/blob/master/docs/chart_repository.md) just for Service Catalog. Add this repository to your local machine: ```console helm repo add svc-cat https://svc-catalog-charts.storage.googleapis.com ``` Then, ensure that the repository was successfully added: ```console helm search service-catalog ``` You should see the following output: ```console NAME VERSION DESCRIPTION svc-cat/catalog x,y.z service-catalog API server and controller-manag... ``` ## RBAC Your Kubernetes cluster must have [RBAC](https://kubernetes.io/docs/admin/authorization/rbac/) enabled to use Service Catalog. Like in-cluster DNS, many installation methods should enable RBAC for you. ### Minikube If you are using Minikube, start your cluster with this command: ```console minikube start --extra-config=apiserver.Authorization.Mode=RBAC ``` ### `hack/local-cluster-up.sh` If you are using the [`hack/local-up-cluster.sh`](https://github.com/kubernetes/kubernetes/blob/master/hack/local-up-cluster.sh) script in the Kubernetes core repository, start your cluster with this command: ```console AUTHORIZATION_MODE=Node,RBAC hack/local-up-cluster.sh -O ``` ### Cloud Providers Many cloud providers set up new clusters with RBAC enabled for you. Please check with your provider's documentation for details. # Step 2 - Install Service Catalog Now that your cluster and Helm are configured properly, installing Service Catalog is simple: ```console helm install svc-cat/catalog \ --name catalog --namespace catalog ``` # Installing the Service Catalog CLI Follow the appropriate instructions for your operating system to install svcat. The binary can be used by itself, or as a kubectl plugin. ## MacOS ``` curl -sLO https://download.svcat.sh/cli/latest/darwin/amd64/svcat chmod +x ./svcat mv ./svcat /usr/local/bin/ svcat version --client ``` ## Linux ``` curl -sLO https://download.svcat.sh/cli/latest/linux/amd64/svcat chmod +x ./svcat mv ./svcat /usr/local/bin/ svcat version --client ``` ## Windows The snippet below adds a directory to your PATH for the current session only. You will need to find a permanent location for it and add it to your PATH. ``` iwr 'https://download.svcat.sh/cli/latest/windows/amd64/svcat.exe' -UseBasicParsing -OutFile svcat.exe mkdir -f ~\bin $env:PATH += ";${pwd}\bin" svcat version --client ``` ## Manual 1. Download the appropriate binary for your operating system: * macOS: https://download.svcat.sh/cli/latest/darwin/amd64/svcat * Windows: https://download.svcat.sh/cli/latest/windows/amd64/svcat.exe * Linux: https://download.svcat.sh/cli/latest/linux/amd64/svcat 1. Make the binary executable. 1. Move the binary to a directory on your PATH. ## Plugin To use svcat as a plugin, run the following command after downloading: ```console $ ./svcat install plugin Plugin has been installed to ~/.kube/plugins/svcat. Run kubectl plugin svcat --help for help using the plugin. ``` When operating as a plugin, the commands are the same with the addition of the global kubectl configuration flags. One exception is that boolean flags aren't supported when running in plugin mode, so instead of using `--flag` you must specify a value `--flag=true`.
{ "content_hash": "608210cdc31abb833e035b2512983088", "timestamp": "", "source": "github", "line_count": 225, "max_line_length": 171, "avg_line_length": 32.03111111111111, "alnum_prop": 0.762730678507007, "repo_name": "kibbles-n-bytes/service-catalog", "id": "f1e96b9c6f385761e1fe74a2cc5c895293ee1a2a", "size": "7211", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "docs/install.md", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "98533" }, { "name": "Go", "bytes": "3561975" }, { "name": "HTML", "bytes": "30772" }, { "name": "JavaScript", "bytes": "34298" }, { "name": "Makefile", "bytes": "16194" }, { "name": "Python", "bytes": "2031" }, { "name": "Ruby", "bytes": "10461" }, { "name": "Shell", "bytes": "195734" }, { "name": "Smarty", "bytes": "1707" } ], "symlink_target": "" }
package org.elasticsearch.xpack.eql.plan.logical; import org.elasticsearch.xpack.ql.expression.Expression; import org.elasticsearch.xpack.ql.plan.logical.Limit; import org.elasticsearch.xpack.ql.plan.logical.LogicalPlan; import org.elasticsearch.xpack.ql.tree.NodeInfo; import org.elasticsearch.xpack.ql.tree.Source; public class Head extends LimitWithOffset { public Head(Source source, Expression limit, LogicalPlan child) { super(source, limit, child); } @Override protected NodeInfo<Limit> info() { return NodeInfo.create(this, Head::new, limit(), child()); } @Override protected Head replaceChild(LogicalPlan newChild) { return new Head(source(), limit(), newChild); } }
{ "content_hash": "b6786edd9f339f1c4c2153704b32424e", "timestamp": "", "source": "github", "line_count": 26, "max_line_length": 69, "avg_line_length": 28.423076923076923, "alnum_prop": 0.7266576454668471, "repo_name": "robin13/elasticsearch", "id": "400fc1c929d06fd03057dbad5bf47adfedb82771", "size": "991", "binary": false, "copies": "5", "ref": "refs/heads/master", "path": "x-pack/plugin/eql/src/main/java/org/elasticsearch/xpack/eql/plan/logical/Head.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "ANTLR", "bytes": "11082" }, { "name": "Batchfile", "bytes": "14049" }, { "name": "Emacs Lisp", "bytes": "3341" }, { "name": "FreeMarker", "bytes": "45" }, { "name": "Groovy", "bytes": "315863" }, { "name": "HTML", "bytes": "3399" }, { "name": "Java", "bytes": "40107206" }, { "name": "Perl", "bytes": "7271" }, { "name": "Python", "bytes": "54437" }, { "name": "Shell", "bytes": "108937" } ], "symlink_target": "" }
define( ({ _widgetLabel: "Saistītas tabulu diagrammas", // Shown as a widget label searchHeaderText: "Meklēt adresi vai atrast kartē", // Shown as a label in widget panel for search an address. addressInfowindowTitle: "Meklētais izvietojums", //Shown as title in infowindow after selecting location from map click mouseOverTooltip: "Noklikšķiniet, lai redzētu diagrammu(as)", // Tooltip for location address button errMsgNoResultsFound: "Nav atrasts neviens rezultāts", //Shown as error message when no result found at the selected/searched location errMsgNoFeaturesFound: "Nav atrasts neviens elements", //Shown as error message when no feature found at the selected/searched location for the configured chart noChatsConfigured: "Nav pieejama neviena iepriekš konfigurēta diagramma." //Shown as error message if no charts configured }) );
{ "content_hash": "9f85219324b371630913fbdc3b8f7840", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 164, "avg_line_length": 80.45454545454545, "alnum_prop": 0.7615819209039548, "repo_name": "fiskinator/WAB2.0_JBox_MutualAid", "id": "337bc8af70849ac6b3debc442c969db67e01d22e", "size": "897", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "widgets/RelatedTableCharts/nls/lv/strings.js", "mode": "33261", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "317819" }, { "name": "HTML", "bytes": "204754" }, { "name": "JavaScript", "bytes": "4721096" } ], "symlink_target": "" }
package uk.co.flax.biosolr.ontology.documents.storage.elasticsearch; import java.util.List; import java.util.Map; /** * ElasticSearch configuration * * @author mlp */ public class ESConfiguration { static final String DEFAULT_CLUSTER_NAME = "elasticsearch"; static final String NODECLIENT_KEY = "nodeClient"; static final String SERVERS_KEY = "servers"; static final String CLUSTERNAME_KEY = "clusterName"; static final String INDEX_NAME_KEY = "indexName"; static final String INDEX_TYPE_KEY = "indexType"; private boolean useNodeClient; private List<String> servers; private String clusterName = DEFAULT_CLUSTER_NAME; private String indexName; private String indexType; @SuppressWarnings("unchecked") public ESConfiguration(Map<String, Object> configuration) { for (String key : configuration.keySet()) { if (key.equals(NODECLIENT_KEY)) { useNodeClient = (boolean) configuration.get(key); } else if (key.equals(SERVERS_KEY)) { servers = (List<String>)configuration.get(key); } else if (key.equals(CLUSTERNAME_KEY)) { clusterName = (String)configuration.get(key); } else if (key.equals(INDEX_NAME_KEY)) { indexName = (String)configuration.get(key); } else if (key.equals(INDEX_TYPE_KEY)) { indexType = (String)configuration.get(key); } } } public boolean isUseNodeClient() { return useNodeClient; } public List<String> getServers() { return servers; } public String getClusterName() { return clusterName; } public String getIndexName() { return indexName; } public String getIndexType() { return indexType; } }
{ "content_hash": "22d2a58d8d509ca1b11758d8e6960a29", "timestamp": "", "source": "github", "line_count": 68, "max_line_length": 68, "avg_line_length": 23.720588235294116, "alnum_prop": 0.7160570365778053, "repo_name": "flaxsearch/BioSolr", "id": "ef2a52fee0d08686e4895add64d1dd5a0c3267d1", "size": "2233", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "spot/spot-ontology/spot-ontology-document-indexer/src/main/java/uk/co/flax/biosolr/ontology/documents/storage/elasticsearch/ESConfiguration.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "171" }, { "name": "CSS", "bytes": "2048" }, { "name": "HTML", "bytes": "22112" }, { "name": "Java", "bytes": "1209225" }, { "name": "JavaScript", "bytes": "20754" }, { "name": "Python", "bytes": "1881" }, { "name": "Shell", "bytes": "3023" } ], "symlink_target": "" }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content="Write your site description here. It will be used as your sites meta description as well!"> <title>Contact - Clean Blog</title> <link rel="canonical" href="http://chuang1blog.github.io/contact/"> <!-- Bootstrap Core CSS --> <link rel="stylesheet" href="/css/bootstrap.min.css"> <!-- Custom CSS --> <link rel="stylesheet" href="/css/clean-blog.css"> <!-- Pygments Github CSS --> <link rel="stylesheet" href="/css/syntax.css"> <!-- Custom Fonts --> <link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet" type="text/css"> <link href='http://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic' rel='stylesheet' type='text/css'> <link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'> <!-- 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/libs/html5shiv/3.7.0/html5shiv.js"></script> <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <!-- Navigation --> <nav class="navbar navbar-default navbar-custom navbar-fixed-top"> <div class="container-fluid"> <!-- Brand and toggle get grouped for better mobile display --> <div class="navbar-header page-scroll"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="/">Clean Blog</a> </div> <!-- Collect the nav links, forms, and other content for toggling --> <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> <ul class="nav navbar-nav navbar-right"> <li> <a href="/">Home</a> </li> <li> <a href="/about/">About</a> </li> <li> <a href="/contact/">Contact</a> </li> <li> </li> <li> </li> <li> </li> </ul> </div> <!-- /.navbar-collapse --> </div> <!-- /.container --> </nav> <!-- Page Header --> <header class="intro-header" style="background-image: url('//img/contact-bg.jpg')"> <div class="container"> <div class="row"> <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> <div class="site-heading"> <h1>Contact</h1> <hr class="small"> <span class="subheading">Have questions? I have answers (maybe).</span> </div> </div> </div> </div> </header> <!-- Main Content --> <div class="container"> <div class="row"> <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> <p>Want to get in touch with me? Fill out the form below to send me a message and I will try to get back to you within 24 hours!</p> <!-- Contact Form - Enter your email address on line 19 of the mail/contact_me.php file to make this form work. --> <!-- WARNING: Some web hosts do not allow emails to be sent through forms to common mail hosts like Gmail or Yahoo. It's recommended that you use a private domain email address! --> <!-- NOTE: To use the contact form, your site must be on a live web host with PHP! The form will not work locally! --> <form name="sentMessage" id="contactForm" novalidate> <div class="row control-group"> <div class="form-group col-xs-12 floating-label-form-group controls"> <label>Name</label> <input type="text" class="form-control" placeholder="Name" id="name" required data-validation-required-message="Please enter your name."> <p class="help-block text-danger"></p> </div> </div> <div class="row control-group"> <div class="form-group col-xs-12 floating-label-form-group controls"> <label>Email Address</label> <input type="email" class="form-control" placeholder="Email Address" id="email" required data-validation-required-message="Please enter your email address."> <p class="help-block text-danger"></p> </div> </div> <div class="row control-group"> <div class="form-group col-xs-12 floating-label-form-group controls"> <label>Phone Number</label> <input type="tel" class="form-control" placeholder="Phone Number" id="phone" required data-validation-required-message="Please enter your phone number."> <p class="help-block text-danger"></p> </div> </div> <div class="row control-group"> <div class="form-group col-xs-12 floating-label-form-group controls"> <label>Message</label> <textarea rows="5" class="form-control" placeholder="Message" id="message" required data-validation-required-message="Please enter a message."></textarea> <p class="help-block text-danger"></p> </div> </div> <br> <div id="success"></div> <div class="row"> <div class="form-group col-xs-12"> <button type="submit" class="btn btn-default">Send</button> </div> </div> </form> </div> </div> </div> <hr> <!-- Footer --> <footer> <div class="container"> <div class="row"> <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> <ul class="list-inline text-center"> <li> <a href="/feed.xml"> <span class="fa-stack fa-lg"> <i class="fa fa-circle fa-stack-2x"></i> <i class="fa fa-rss fa-stack-1x fa-inverse"></i> </span> </a> </li> <li> <a href="https://twitter.com/SBootstrap"> <span class="fa-stack fa-lg"> <i class="fa fa-circle fa-stack-2x"></i> <i class="fa fa-twitter fa-stack-1x fa-inverse"></i> </span> </a> </li> <li> <a href="https://www.facebook.com/IronSummitMedia"> <span class="fa-stack fa-lg"> <i class="fa fa-circle fa-stack-2x"></i> <i class="fa fa-facebook fa-stack-1x fa-inverse"></i> </span> </a> </li> <li> <a href="https://github.com/davidtmiller"> <span class="fa-stack fa-lg"> <i class="fa fa-circle fa-stack-2x"></i> <i class="fa fa-github fa-stack-1x fa-inverse"></i> </span> </a> </li> </ul> <p class="copyright text-muted">Copyright &copy; Clean Blog 2014</p> </div> </div> </div> </footer> <!-- jQuery --> <script src="/js/jquery.min.js "></script> <!-- Bootstrap Core JavaScript --> <script src="/js/bootstrap.min.js "></script> <!-- Custom Theme JavaScript --> <script src="/js/clean-blog.min.js "></script> </body> </html>
{ "content_hash": "7e2575353de211317f977b0515f2c9f1", "timestamp": "", "source": "github", "line_count": 220, "max_line_length": 181, "avg_line_length": 38.67272727272727, "alnum_prop": 0.5086976962858486, "repo_name": "chuang1blog/chuang1blog.github.io", "id": "d6ffb843211db44ba0c7a7f18bec9ff25ec68725", "size": "8508", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "_site/contact/index.html", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "57831" }, { "name": "JavaScript", "bytes": "106736" }, { "name": "PHP", "bytes": "2194" } ], "symlink_target": "" }
__author__ = 'himanshu' from models import Product """ class Product(models.Model): title = models.CharField(null=False, max_length=100) description = models.CharField(null=False) picture = models.ImageField(null=False) rating = models.IntegerField(null=False) price = models.DecimalField(null=False) coupons = models.ManyToManyField(Coupon) """ Product( title='Slingshot', description='To keep your frienemies away when you need to.', picture='slingshot.jpg', rating=4, price=14.99, ).save() Product( title='Beanie Baby', description='A timeless toy for all ages and genders', picture='beanie.jpg', rating=5, price=24.49, ).save() Product( title='White T-shirt', description='Your typical white tee - very comfortable!', picture='tshirt.jpg', rating=3, price=3.99, ).save() Product( title='Red Solo Cup', description='Better than the ones you’ll find at your typical frat party! (100)', picture='cup.jpg', rating=4, price=7.99, ).save() Product( title='Portable Apparatus for Sitting', description='Patent protected', picture='chair.jpg', rating=1, price=12.69, ).save() Product( title='Cannon', description='More effective than a slingshot', picture='cannon.jpg', rating=5, price=299.99, ).save() Product( title='Haribo Sugarless Gummy Bears', description='5 pounds of diarrhea!', picture='haribo.jpg', rating=5, price=12.99, ).save()
{ "content_hash": "2da20fc3a8ded2bf05b0f56bf97efba4", "timestamp": "", "source": "github", "line_count": 74, "max_line_length": 85, "avg_line_length": 20.472972972972972, "alnum_prop": 0.6528052805280528, "repo_name": "himanshuo/cs-4753-project", "id": "01f5964a6ee1c8a3cb32ab9b2abd34fe3f6b173c", "size": "1517", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "shopsmart/home/add_default_products.py", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "3383" }, { "name": "HTML", "bytes": "14322" }, { "name": "JavaScript", "bytes": "3785" }, { "name": "Python", "bytes": "16113" } ], "symlink_target": "" }
if (process.env.NODE_ENV !== "test") { var d4 = require("d4"); } var filter = require("lodash/filter"); var each = require("lodash/each"); var chartStyle = require("../../config/chart-style"); var cb_mixins = require("../cb-d4-mixins.js"); var help = require("../../util/helper.js"); // TODO put this in `xy-config.js` var xy_config = { lineDotsThresholdSingle: 10, lineDotsThresholdTotal: 30, maxColumnWidth: 50, axisOrient: { "left": "left", "right": "right" }, xAxisShift: 10 }; var mixin = [ { "name": "xAxis", "feature": d4.features.xAxis }, { "name": "leftAxis", "feature": d4.features.yAxis }, { "name": "bars", "feature": d4.features.groupedColumnSeries }, { "name": "lines", "feature": d4.features.lineSeries }, { "name": "circles", "feature": d4.features.circleSeries }, { "name": "rightAxis", "feature": d4.features.yAxis }, { "name": "other-bars", "feature": d4.features.groupedColumnSeries }, { "name": "other-lines", "feature": d4.features.lineSeries }, { "name": "other-circles", "feature": d4.features.circleSeries }, cb_mixins.series_label, cb_mixins.x_axis_label ]; var locationKey = { "primary":"left", "secondary":"right" }; var using = { lines: function(line,location,singleLineDotThresh,totalLinePoints) { var isPrimary = (location === "primary"); var scale = isPrimary ? this.left : this.right; line.beforeRender(function(data) { var isolated_data = []; each(data, function(d,i) { var isProperType = d.type == "line"; var isProperAxis = (d.altAxis === false && isPrimary) || (d.altAxis === true && !isPrimary); if(isProperType && isProperAxis) { d.index = i; isolated_data.push(d); totalLinePoints += d.values.length; if (d.values.length < xy_config.lineDotsThresholdSingle) { singleLineDotThresh = true; } } }); return isolated_data; }); line.x(function(d) { if (this.x.$scale == "time" || this.x.$scale == "linear") { return this.x(d[this.x.$key]); } else { return this.x(d[this.x.$key]) + this.x.rangeBand() / 2; } }); line.y(function(d){ return scale(d[scale.$key]); }); line.defined(function(d){return d.value || d.value === 0;}); line.afterRender(function() { this.container.selectAll((isPrimary ? "." : ".other-" ) + "lines g.line, .other-lines g.line") .each(function(d,i) { var index = !isNaN(d.colorIndex) ? d.colorIndex : d.index; d3.select(this).attr("data-color-index", index); d.prevIndex = index; }); }); }, bars: function(bar, location) { var isPrimary = (location === "primary"); var scale = isPrimary ? this.left : this.right; var yScaleId = (isPrimary) ? "left" : "right"; var names = []; var num_column_series = 0; bar.yScaleId(yScaleId); bar.beforeRender(function(data) { var isolated_data = []; each(data, function(d,i) { var isProperType = d.type == "column"; var isProperAxis = (d.altAxis === false && isPrimary) || (d.altAxis === true && !isPrimary); if(isProperType) { names.push(d.name); num_column_series += 1; if (isProperAxis) { d.index = i; isolated_data.push(d); } } }); this.groups.domain(names); var mapped = isolated_data.map(function(d) { return d.values.map(function(c) { c.colorIndex = d.colorIndex; c.index = d.index; return c; }); }); var merged = []; merged = [].concat.apply(merged, mapped); var parsed = d4.parsers.nestedGroup() .x("entry") .y("value") .value("value")(merged); if (isolated_data.length > 0) { var numDataPoints = isolated_data[0].values.length; var numCols = isolated_data.length; // account for the case of columns in a time series. this requires // some special positioning because a time series is continuous and // the groups cannot be placed with `x.rangeBand()` if ((this.x.$scale == "time" || this.x.$scale == "linear") && parsed.data.length > 0) { var xRange = this.x.range(); var effectiveChartWidth = xRange[1] - xRange[0]; // the size of each set of grouped bars var barGroupWidth = effectiveChartWidth / parsed.data.length; // set the range of each group to this per-group width this.groups.rangeBands([0, barGroupWidth], 0.05, 0.1); var groupRangeBand = this.groups.rangeBand(); // enforce max width if necessary if (groupRangeBand > xy_config.maxColumnWidth) { bar.width(xy_config.maxColumnWidth); // each group width needs to be reduced if we are enforcing max width barGroupWidth -= (groupRangeBand - xy_config.maxColumnWidth); } else { bar.width(this.groups.rangeBand()); } // place bars bar.x(function(d) { return this.groups(d[this.groups.$key]) - (barGroupWidth / 2); }); } else { // set outer padding of groups axis to prevent column width from // becoming too large if (numDataPoints > 6) { groupOuterPadding = 0.1; } else if (numDataPoints > 3 && numDataPoints <= 6) { groupOuterPadding = 0.4; } else { groupOuterPadding = 0.6; } this.groups.rangeRoundBands([0, this.x.rangeBand()], 0.05, groupOuterPadding); } } return parsed.data; }); bar.y(function(d){ var val = d[scale.$key]; return val > 0 ? scale(val) : scale(0); }); bar.afterRender(function() { this.container.selectAll((isPrimary ? "." : ".other-" ) + "bars .entry").selectAll("rect") .each(function(d, i) { var index = !isNaN(d.colorIndex) ? d.colorIndex : d.index; d3.select(this).attr("data-color-index", index); d.prevIndex = index; }); }); }, circles: function(circle, location) { var isPrimary = (location === "primary"); var scale = isPrimary ? this.left : this.right; var singleLineDotThresh = false; circle.beforeRender(function(data) { var isolated_data = []; // get total number of line points and check if any single one is above // threshold var totalLinePoints = data.map(function(d) { if (d.values.length < xy_config.lineDotsThresholdSingle) { singleLineDotThresh = true; } return d.values; }).reduce(function(a, b) { return a.concat(b); }).length; var totalLineDotThresh = (totalLinePoints < xy_config.lineDotsThresholdTotal); var renderLineDots = (singleLineDotThresh && totalLineDotThresh); each(data, function(d,i) { var shouldHaveDots = d.type == "scatterPlot" || (d.type == "line" && renderLineDots); var isProperAxis = (d.altAxis === false && isPrimary) || (d.altAxis === true && !isPrimary); if(shouldHaveDots && isProperAxis) { d.index = i; isolated_data.push(d); } }); return isolated_data; }); circle .cx(function(d) { if (this.x.$scale == "time" || this.x.$scale == "linear") { return this.x(d[this.x.$key]); } else { return this.x(d[this.x.$key]) + this.x.rangeBand() / 2; } }) .cy(function(d) { return d[scale.$key] !== null ? scale(d[scale.$key]) : -1000; }) .r(function() { // TODO: remove this hardcoding if (this.width > 600) { return 3; } else { return 2; } }); circle.afterRender(function() { this.container.select((isPrimary ? "." : ".other-") + "circles").selectAll("g") .each(function() { var d = d3.select(this).datum(); var index = !isNaN(d.colorIndex) ? d.colorIndex : d.index; d3.select(this).attr("data-color-index", index); }); }); } }; var cb_xy = d4.chart("cb-xy", function() { var singleLineDotThresh = false; var totalLinePoints = 0; var xyChart = d4.baseChart({ config: { axes: { x: { scale: "ordinal", roundBands: 0.1 }, left : { scale: "linear" }, right: { scale: "linear" }, groups: { scale: "ordinal", dimension: "x", roundBands: 0.1 } } } }) .mixin(mixin) .using("leftAxis", function(axis) { axis.stagger(false); axis.wrap(false); axis.scaleId("left"); axis.orient(xy_config.axisOrient.left); axis.align(xy_config.axisOrient.left); }) .using("rightAxis", function(axis) { axis.stagger(false); axis.wrap(false); axis.scaleId("right"); axis.orient(xy_config.axisOrient.right); axis.align(xy_config.axisOrient.right); }) .using("xAxis", function(axis) { axis.stagger(false); axis.afterRender(function(curAxis, data, chartArea, axisNode) { var self = this; var numColumns = filter(data, function(d) { return d.type === "column"; }).length; if (numColumns === data.length) { this.container.selectAll(".xAxis .tick").attr("data-anchor", "middle"); } if(self.x.$scale == "time") { axisNode.selectAll("text").each(function(d) { var text = d3.select(this); // We will handle this in CSS. Override d3's default settings here. text.style("text-anchor", null); var textLength = this.getComputedTextLength(); if ((self.x(d) + textLength) > self.width) { text.attr("x", function() { return self.width - (self.x(d) + textLength); }); } }); } var coords = help.transformCoords(axisNode.attr("transform")); coords[1] = coords[1] + xy_config.xAxisShift; axisNode.attr("transform","translate(" + coords + ")"); }); }) .using("x-axis-label", function(label) { label.afterRender(function(curLabel, data, chartArea){ var first_tick = this.container.selectAll(".xAxis .tick")[0][0] chartArea.selectAll(".xAxislabel").attr("dx",first_tick.getBoundingClientRect().width/-2) }) }) .y(function(y){ y.clamp(false); }) .x(function(x){ if(x.clamp) { x.clamp(false); } }) .left(function(y){ y.clamp(false); }) .right(function(y){ y.clamp(false); }) .groups(function(groups) { groups.key("name"); }) .using("lines", function(line) { using.lines.call(this, line, "primary"); }) .using("bars", function(bars) { using.bars.call(this, bars, "primary"); }) .using("circles", function(circ) { using.circles.call(this, circ, "primary"); }) .using("other-lines", function(line) { using.lines.call(this, line, "secondary"); }) .using("other-bars", function(bars) { using.bars.call(this, bars, "secondary"); }) .using("other-circles", function(circ) { using.circles.call(this, circ, "secondary"); }); return xyChart; }); module.exports = cb_xy;
{ "content_hash": "7e1ff57617345369039aa98ce77fc27c", "timestamp": "", "source": "github", "line_count": 408, "max_line_length": 97, "avg_line_length": 25.698529411764707, "alnum_prop": 0.6054363376251788, "repo_name": "SCPR/Chartbuilder", "id": "87c10ca94a6360583273caf3d0b625fcff63d6f3", "size": "10485", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/js/charts/cb-xy/draw-xy.js", "mode": "33261", "license": "mit", "language": [ { "name": "ApacheConf", "bytes": "271" }, { "name": "CSS", "bytes": "17141" }, { "name": "HTML", "bytes": "5479" }, { "name": "JavaScript", "bytes": "357952" } ], "symlink_target": "" }
// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core.IdenticalExpr -w -verify %s /* Only one expected warning per function allowed at the very end. */ int func(void) { return 0; } int func2(void) { return 0; } int funcParam(int a) { return 0; } /* '!=' operator*/ /* '!=' with float */ int checkNotEqualFloatLiteralCompare1(void) { return (5.14F != 5.14F); // no warning } int checkNotEqualFloatLiteralCompare2(void) { return (6.14F != 7.14F); // no warning } int checkNotEqualFloatDeclCompare1(void) { float f = 7.1F; float g = 7.1F; return (f != g); // no warning } int checkNotEqualFloatDeclCompare12(void) { float f = 7.1F; return (f != f); // no warning } int checkNotEqualFloatDeclCompare3(void) { float f = 7.1F; return (f != 7.1F); // no warning } int checkNotEqualFloatDeclCompare4(void) { float f = 7.1F; return (7.1F != f); // no warning } int checkNotEqualFloatDeclCompare5(void) { float f = 7.1F; int t = 7; return (t != f); // no warning } int checkNotEqualFloatDeclCompare6(void) { float f = 7.1F; int t = 7; return (f != t); // no warning } int checkNotEqualCastFloatDeclCompare11(void) { float f = 7.1F; return ((int)f != (int)f); // expected-warning {{comparison of identical expressions always evaluates to false}} } int checkNotEqualCastFloatDeclCompare12(void) { float f = 7.1F; return ((char)f != (int)f); // no warning } int checkNotEqualBinaryOpFloatCompare1(void) { int res; float f= 3.14F; res = (f + 3.14F != f + 3.14F); // no warning return (0); } int checkNotEqualBinaryOpFloatCompare2(void) { float f = 7.1F; float g = 7.1F; return (f + 3.14F != g + 3.14F); // no warning } int checkNotEqualBinaryOpFloatCompare3(void) { int res; float f= 3.14F; res = ((int)f + 3.14F != (int)f + 3.14F); // no warning return (0); } int checkNotEqualBinaryOpFloatCompare4(void) { int res; float f= 3.14F; res = ((int)f + 3.14F != (char)f + 3.14F); // no warning return (0); } int checkNotEqualNestedBinaryOpFloatCompare1(void) { int res; int t= 1; int u= 2; float f= 3.14F; res = (((int)f + (3.14F - u)*t) != ((int)f + (3.14F - u)*t)); // no warning return (0); } int checkNotEqualNestedBinaryOpFloatCompare2(void) { int res; int t= 1; int u= 2; float f= 3.14F; res = (((int)f + (u - 3.14F)*t) != ((int)f + (3.14F - u)*t)); // no warning return (0); } int checkNotEqualNestedBinaryOpFloatCompare3(void) { int res; int t= 1; int u= 2; float f= 3.14F; res = (((int)f + (u - 3.14F)*t) != ((int)f + (3.14F - u)*(f + t != f + t))); // no warning return (0); } /* end '!=' with float*/ /* '!=' with int*/ int checkNotEqualIntLiteralCompare1(void) { return (5 != 5); // expected-warning {{comparison of identical expressions always evaluates to false}} } int checkNotEqualIntLiteralCompare2(void) { return (6 != 7); // no warning } int checkNotEqualIntDeclCompare1(void) { int f = 7; int g = 7; return (f != g); // no warning } int checkNotEqualIntDeclCompare3(void) { int f = 7; return (f != 7); // no warning } int checkNotEqualIntDeclCompare4(void) { int f = 7; return (7 != f); // no warning } int checkNotEqualCastIntDeclCompare11(void) { int f = 7; return ((int)f != (int)f); // expected-warning {{comparison of identical expressions always evaluates to false}} } int checkNotEqualCastIntDeclCompare12(void) { int f = 7; return ((char)f != (int)f); // no warning } int checkNotEqualBinaryOpIntCompare1(void) { int res; int t= 1; int u= 2; int f= 4; res = (f + 4 != f + 4); // expected-warning {{comparison of identical expressions always evaluates to false}} return (0); } int checkNotEqualBinaryOpIntCompare2(void) { int f = 7; int g = 7; return (f + 4 != g + 4); // no warning } int checkNotEqualBinaryOpIntCompare3(void) { int res; int t= 1; int u= 2; int f= 4; res = ((int)f + 4 != (int)f + 4); // expected-warning {{comparison of identical expressions always evaluates to false}} return (0); } int checkNotEqualBinaryOpIntCompare4(void) { int res; int t= 1; int u= 2; int f= 4; res = ((int)f + 4 != (char)f + 4); // no warning return (0); } int checkNotEqualBinaryOpIntCompare5(void) { int res; int t= 1; int u= 2; res = (u + t != u + t); // expected-warning {{comparison of identical expressions always evaluates to false}} return (0); } int checkNotEqualNestedBinaryOpIntCompare1(void) { int res; int t= 1; int u= 2; int f= 3; res = (((int)f + (3 - u)*t) != ((int)f + (3 - u)*t)); // expected-warning {{comparison of identical expressions always evaluates to false}} return (0); } int checkNotEqualNestedBinaryOpIntCompare2(void) { int res; int t= 1; int u= 2; int f= 3; res = (((int)f + (u - 3)*t) != ((int)f + (3 - u)*t)); // no warning return (0); } int checkNotEqualNestedBinaryOpIntCompare3(void) { int res; int t= 1; int u= 2; int f= 3; res = (((int)f + (u - 3)*t) != ((int)f + (3 - u)*(t + 1 != t + 1))); // expected-warning {{comparison of identical expressions always evaluates to false}} return (0); } /* end '!=' int */ /* '!=' with int pointer */ int checkNotEqualIntPointerLiteralCompare1(void) { int* p = 0; return (p != 0); // no warning } int checkNotEqualIntPointerLiteralCompare2(void) { return (6 != 7); // no warning } int checkNotEqualIntPointerDeclCompare1(void) { int k = 3; int* f = &k; int* g = &k; return (f != g); // no warning } int checkNotEqualCastIntPointerDeclCompare11(void) { int k = 7; int* f = &k; return ((int*)f != (int*)f); // expected-warning {{comparison of identical expressions always evaluates to false}} } int checkNotEqualCastIntPointerDeclCompare12(void) { int k = 7; int* f = &k; return ((int*)((char*)f) != (int*)f); // no warning } int checkNotEqualBinaryOpIntPointerCompare1(void) { int k = 7; int res; int* f= &k; res = (f + 4 != f + 4); // expected-warning {{comparison of identical expressions always evaluates to false}} return (0); } int checkNotEqualBinaryOpIntPointerCompare2(void) { int k = 7; int* f = &k; int* g = &k; return (f + 4 != g + 4); // no warning } int checkNotEqualBinaryOpIntPointerCompare3(void) { int k = 7; int res; int* f= &k; res = ((int*)f + 4 != (int*)f + 4); // expected-warning {{comparison of identical expressions always evaluates to false}} return (0); } int checkNotEqualBinaryOpIntPointerCompare4(void) { int k = 7; int res; int* f= &k; res = ((int*)f + 4 != (int*)((char*)f) + 4); // no warning return (0); } int checkNotEqualNestedBinaryOpIntPointerCompare1(void) { int res; int k = 7; int t= 1; int* u= &k+2; int* f= &k+3; res = ((f + (3)*t) != (f + (3)*t)); // expected-warning {{comparison of identical expressions always evaluates to false}} return (0); } int checkNotEqualNestedBinaryOpIntPointerCompare2(void) { int res; int k = 7; int t= 1; int* u= &k+2; int* f= &k+3; res = (((3)*t + f) != (f + (3)*t)); // no warning return (0); } /* end '!=' int* */ /* '!=' with function*/ int checkNotEqualSameFunction() { unsigned a = 0; unsigned b = 1; int res = (a+func() != a+func()); // no warning return (0); } int checkNotEqualDifferentFunction() { unsigned a = 0; unsigned b = 1; int res = (a+func() != a+func2()); // no warning return (0); } int checkNotEqualSameFunctionSameParam() { unsigned a = 0; unsigned b = 1; int res = (a+funcParam(a) != a+funcParam(a)); // no warning return (0); } int checkNotEqualSameFunctionDifferentParam() { unsigned a = 0; unsigned b = 1; int res = (a+funcParam(a) != a+funcParam(b)); // no warning return (0); } /* end '!=' with function*/ /* end '!=' */ /* EQ operator */ int checkEqualIntPointerDeclCompare(void) { int k = 3; int* f = &k; int* g = &k; return (f == g); // no warning } int checkEqualIntPointerDeclCompare0(void) { int k = 3; int* f = &k; return (f+1 == f+1); // expected-warning {{comparison of identical expressions always evaluates to true}} } /* EQ with float*/ int checkEqualFloatLiteralCompare1(void) { return (5.14F == 5.14F); // no warning } int checkEqualFloatLiteralCompare2(void) { return (6.14F == 7.14F); // no warning } int checkEqualFloatDeclCompare1(void) { float f = 7.1F; float g = 7.1F; return (f == g); // no warning } int checkEqualFloatDeclCompare12(void) { float f = 7.1F; return (f == f); // no warning } int checkEqualFloatDeclCompare3(void) { float f = 7.1F; return (f == 7.1F); // no warning } int checkEqualFloatDeclCompare4(void) { float f = 7.1F; return (7.1F == f); // no warning } int checkEqualFloatDeclCompare5(void) { float f = 7.1F; int t = 7; return (t == f); // no warning } int checkEqualFloatDeclCompare6(void) { float f = 7.1F; int t = 7; return (f == t); // no warning } int checkEqualCastFloatDeclCompare11(void) { float f = 7.1F; return ((int)f == (int)f); // expected-warning {{comparison of identical expressions always evaluates to true}} } int checkEqualCastFloatDeclCompare12(void) { float f = 7.1F; return ((char)f == (int)f); // no warning } int checkEqualBinaryOpFloatCompare1(void) { int res; float f= 3.14F; res = (f + 3.14F == f + 3.14F); // no warning return (0); } int checkEqualBinaryOpFloatCompare2(void) { float f = 7.1F; float g = 7.1F; return (f + 3.14F == g + 3.14F); // no warning } int checkEqualBinaryOpFloatCompare3(void) { int res; float f= 3.14F; res = ((int)f + 3.14F == (int)f + 3.14F); // no warning return (0); } int checkEqualBinaryOpFloatCompare4(void) { int res; float f= 3.14F; res = ((int)f + 3.14F == (char)f + 3.14F); // no warning return (0); } int checkEqualNestedBinaryOpFloatCompare1(void) { int res; int t= 1; int u= 2; float f= 3.14F; res = (((int)f + (3.14F - u)*t) == ((int)f + (3.14F - u)*t)); // no warning return (0); } int checkEqualNestedBinaryOpFloatCompare2(void) { int res; int t= 1; int u= 2; float f= 3.14F; res = (((int)f + (u - 3.14F)*t) == ((int)f + (3.14F - u)*t)); // no warning return (0); } int checkEqualNestedBinaryOpFloatCompare3(void) { int res; int t= 1; int u= 2; float f= 3.14F; res = (((int)f + (u - 3.14F)*t) == ((int)f + (3.14F - u)*(f + t == f + t))); // no warning return (0); } /* Equal with int*/ int checkEqualIntLiteralCompare1(void) { return (5 == 5); // expected-warning {{comparison of identical expressions always evaluates to true}} } int checkEqualIntLiteralCompare2(void) { return (6 == 7); // no warning } int checkEqualIntDeclCompare1(void) { int f = 7; int g = 7; return (f == g); // no warning } int checkEqualCastIntDeclCompare11(void) { int f = 7; return ((int)f == (int)f); // expected-warning {{comparison of identical expressions always evaluates to true}} } int checkEqualCastIntDeclCompare12(void) { int f = 7; return ((char)f == (int)f); // no warning } int checkEqualIntDeclCompare3(void) { int f = 7; return (f == 7); // no warning } int checkEqualIntDeclCompare4(void) { int f = 7; return (7 == f); // no warning } int checkEqualBinaryOpIntCompare1(void) { int res; int t= 1; int u= 2; int f= 4; res = (f + 4 == f + 4); // expected-warning {{comparison of identical expressions always evaluates to true}} return (0); } int checkEqualBinaryOpIntCompare2(void) { int f = 7; int g = 7; return (f + 4 == g + 4); // no warning } int checkEqualBinaryOpIntCompare3(void) { int res; int t= 1; int u= 2; int f= 4; res = ((int)f + 4 == (int)f + 4); // expected-warning {{comparison of identical expressions always evaluates to true}} return (0); } int checkEqualBinaryOpIntCompare4(void) { int res; int t= 1; int u= 2; int f= 4; res = ((int)f + 4 == (char)f + 4); // no warning return (0); } int checkEqualBinaryOpIntCompare5(void) { int res; int t= 1; int u= 2; res = (u + t == u + t); // expected-warning {{comparison of identical expressions always evaluates to true}} return (0); } int checkEqualNestedBinaryOpIntCompare1(void) { int res; int t= 1; int u= 2; int f= 3; res = (((int)f + (3 - u)*t) == ((int)f + (3 - u)*t)); // expected-warning {{comparison of identical expressions always evaluates to true}} return (0); } int checkEqualNestedBinaryOpIntCompare2(void) { int res; int t= 1; int u= 2; int f= 3; res = (((int)f + (u - 3)*t) == ((int)f + (3 - u)*t)); // no warning return (0); } int checkEqualNestedBinaryOpIntCompare3(void) { int res; int t= 1; int u= 2; int f= 3; res = (((int)f + (u - 3)*t) == ((int)f + (3 - u)*(t + 1 == t + 1))); // expected-warning {{comparison of identical expressions always evaluates to true}} return (0); } /* '==' with function*/ int checkEqualSameFunction() { unsigned a = 0; unsigned b = 1; int res = (a+func() == a+func()); // no warning return (0); } int checkEqualDifferentFunction() { unsigned a = 0; unsigned b = 1; int res = (a+func() == a+func2()); // no warning return (0); } int checkEqualSameFunctionSameParam() { unsigned a = 0; unsigned b = 1; int res = (a+funcParam(a) == a+funcParam(a)); // no warning return (0); } int checkEqualSameFunctionDifferentParam() { unsigned a = 0; unsigned b = 1; int res = (a+funcParam(a) == a+funcParam(b)); // no warning return (0); } /* end '==' with function*/ /* end EQ int */ /* end EQ */ /* LT */ /* LT with float */ int checkLessThanFloatLiteralCompare1(void) { return (5.14F < 5.14F); // expected-warning {{comparison of identical expressions always evaluates to false}} } int checkLessThanFloatLiteralCompare2(void) { return (6.14F < 7.14F); // no warning } int checkLessThanFloatDeclCompare1(void) { float f = 7.1F; float g = 7.1F; return (f < g); // no warning } int checkLessThanFloatDeclCompare12(void) { float f = 7.1F; return (f < f); // expected-warning {{comparison of identical expressions always evaluates to false}} } int checkLessThanFloatDeclCompare3(void) { float f = 7.1F; return (f < 7.1F); // no warning } int checkLessThanFloatDeclCompare4(void) { float f = 7.1F; return (7.1F < f); // no warning } int checkLessThanFloatDeclCompare5(void) { float f = 7.1F; int t = 7; return (t < f); // no warning } int checkLessThanFloatDeclCompare6(void) { float f = 7.1F; int t = 7; return (f < t); // no warning } int checkLessThanCastFloatDeclCompare11(void) { float f = 7.1F; return ((int)f < (int)f); // expected-warning {{comparison of identical expressions always evaluates to false}} } int checkLessThanCastFloatDeclCompare12(void) { float f = 7.1F; return ((char)f < (int)f); // no warning } int checkLessThanBinaryOpFloatCompare1(void) { int res; float f= 3.14F; res = (f + 3.14F < f + 3.14F); // no warning return (0); } int checkLessThanBinaryOpFloatCompare2(void) { float f = 7.1F; float g = 7.1F; return (f + 3.14F < g + 3.14F); // no warning } int checkLessThanBinaryOpFloatCompare3(void) { int res; float f= 3.14F; res = ((int)f + 3.14F < (int)f + 3.14F); // no warning return (0); } int checkLessThanBinaryOpFloatCompare4(void) { int res; float f= 3.14F; res = ((int)f + 3.14F < (char)f + 3.14F); // no warning return (0); } int checkLessThanNestedBinaryOpFloatCompare1(void) { int res; int t= 1; int u= 2; float f= 3.14F; res = (((int)f + (3.14F - u)*t) < ((int)f + (3.14F - u)*t)); // no warning return (0); } int checkLessThanNestedBinaryOpFloatCompare2(void) { int res; int t= 1; int u= 2; float f= 3.14F; res = (((int)f + (u - 3.14F)*t) < ((int)f + (3.14F - u)*t)); // no warning return (0); } int checkLessThanNestedBinaryOpFloatCompare3(void) { int res; int t= 1; int u= 2; float f= 3.14F; res = (((int)f + (u - 3.14F)*t) < ((int)f + (3.14F - u)*(f + t < f + t))); // no warning return (0); } /* end LT with float */ /* LT with int */ int checkLessThanIntLiteralCompare1(void) { return (5 < 5); // expected-warning {{comparison of identical expressions always evaluates to false}} } int checkLessThanIntLiteralCompare2(void) { return (6 < 7); // no warning } int checkLessThanIntDeclCompare1(void) { int f = 7; int g = 7; return (f < g); // no warning } int checkLessThanIntDeclCompare3(void) { int f = 7; return (f < 7); // no warning } int checkLessThanIntDeclCompare4(void) { int f = 7; return (7 < f); // no warning } int checkLessThanIntDeclCompare5(void) { int f = 7; int t = 7; return (t < f); // no warning } int checkLessThanIntDeclCompare6(void) { int f = 7; int t = 7; return (f < t); // no warning } int checkLessThanCastIntDeclCompare11(void) { int f = 7; return ((int)f < (int)f); // expected-warning {{comparison of identical expressions always evaluates to false}} } int checkLessThanCastIntDeclCompare12(void) { int f = 7; return ((char)f < (int)f); // no warning } int checkLessThanBinaryOpIntCompare1(void) { int res; int f= 3; res = (f + 3 < f + 3); // expected-warning {{comparison of identical expressions always evaluates to false}} return (0); } int checkLessThanBinaryOpIntCompare2(void) { int f = 7; int g = 7; return (f + 3 < g + 3); // no warning } int checkLessThanBinaryOpIntCompare3(void) { int res; int f= 3; res = ((int)f + 3 < (int)f + 3); // expected-warning {{comparison of identical expressions always evaluates to false}} return (0); } int checkLessThanBinaryOpIntCompare4(void) { int res; int f= 3; res = ((int)f + 3 < (char)f + 3); // no warning return (0); } int checkLessThanNestedBinaryOpIntCompare1(void) { int res; int t= 1; int u= 2; int f= 3; res = (((int)f + (3 - u)*t) < ((int)f + (3 - u)*t)); // expected-warning {{comparison of identical expressions always evaluates to false}} return (0); } int checkLessThanNestedBinaryOpIntCompare2(void) { int res; int t= 1; int u= 2; int f= 3; res = (((int)f + (u - 3)*t) < ((int)f + (3 - u)*t)); // no warning return (0); } int checkLessThanNestedBinaryOpIntCompare3(void) { int res; int t= 1; int u= 2; int f= 3; res = (((int)f + (u - 3)*t) < ((int)f + (3 - u)*(t + u < t + u))); // expected-warning {{comparison of identical expressions always evaluates to false}} return (0); } /* end LT with int */ /* end LT */ /* GT */ /* GT with float */ int checkGreaterThanFloatLiteralCompare1(void) { return (5.14F > 5.14F); // expected-warning {{comparison of identical expressions always evaluates to false}} } int checkGreaterThanFloatLiteralCompare2(void) { return (6.14F > 7.14F); // no warning } int checkGreaterThanFloatDeclCompare1(void) { float f = 7.1F; float g = 7.1F; return (f > g); // no warning } int checkGreaterThanFloatDeclCompare12(void) { float f = 7.1F; return (f > f); // expected-warning {{comparison of identical expressions always evaluates to false}} } int checkGreaterThanFloatDeclCompare3(void) { float f = 7.1F; return (f > 7.1F); // no warning } int checkGreaterThanFloatDeclCompare4(void) { float f = 7.1F; return (7.1F > f); // no warning } int checkGreaterThanFloatDeclCompare5(void) { float f = 7.1F; int t = 7; return (t > f); // no warning } int checkGreaterThanFloatDeclCompare6(void) { float f = 7.1F; int t = 7; return (f > t); // no warning } int checkGreaterThanCastFloatDeclCompare11(void) { float f = 7.1F; return ((int)f > (int)f); // expected-warning {{comparison of identical expressions always evaluates to false}} } int checkGreaterThanCastFloatDeclCompare12(void) { float f = 7.1F; return ((char)f > (int)f); // no warning } int checkGreaterThanBinaryOpFloatCompare1(void) { int res; float f= 3.14F; res = (f + 3.14F > f + 3.14F); // no warning return (0); } int checkGreaterThanBinaryOpFloatCompare2(void) { float f = 7.1F; float g = 7.1F; return (f + 3.14F > g + 3.14F); // no warning } int checkGreaterThanBinaryOpFloatCompare3(void) { int res; float f= 3.14F; res = ((int)f + 3.14F > (int)f + 3.14F); // no warning return (0); } int checkGreaterThanBinaryOpFloatCompare4(void) { int res; float f= 3.14F; res = ((int)f + 3.14F > (char)f + 3.14F); // no warning return (0); } int checkGreaterThanNestedBinaryOpFloatCompare1(void) { int res; int t= 1; int u= 2; float f= 3.14F; res = (((int)f + (3.14F - u)*t) > ((int)f + (3.14F - u)*t)); // no warning return (0); } int checkGreaterThanNestedBinaryOpFloatCompare2(void) { int res; int t= 1; int u= 2; float f= 3.14F; res = (((int)f + (u - 3.14F)*t) > ((int)f + (3.14F - u)*t)); // no warning return (0); } int checkGreaterThanNestedBinaryOpFloatCompare3(void) { int res; int t= 1; int u= 2; float f= 3.14F; res = (((int)f + (u - 3.14F)*t) > ((int)f + (3.14F - u)*(f + t > f + t))); // no warning return (0); } /* end GT with float */ /* GT with int */ int checkGreaterThanIntLiteralCompare1(void) { return (5 > 5); // expected-warning {{comparison of identical expressions always evaluates to false}} } int checkGreaterThanIntLiteralCompare2(void) { return (6 > 7); // no warning } int checkGreaterThanIntDeclCompare1(void) { int f = 7; int g = 7; return (f > g); // no warning } int checkGreaterThanIntDeclCompare3(void) { int f = 7; return (f > 7); // no warning } int checkGreaterThanIntDeclCompare4(void) { int f = 7; return (7 > f); // no warning } int checkGreaterThanCastIntDeclCompare11(void) { int f = 7; return ((int)f > (int)f); // expected-warning {{comparison of identical expressions always evaluates to false}} } int checkGreaterThanCastIntDeclCompare12(void) { int f = 7; return ((char)f > (int)f); // no warning } int checkGreaterThanBinaryOpIntCompare1(void) { int res; int f= 3; res = (f + 3 > f + 3); // expected-warning {{comparison of identical expressions always evaluates to false}} return (0); } int checkGreaterThanBinaryOpIntCompare2(void) { int f = 7; int g = 7; return (f + 3 > g + 3); // no warning } int checkGreaterThanBinaryOpIntCompare3(void) { int res; int f= 3; res = ((int)f + 3 > (int)f + 3); // expected-warning {{comparison of identical expressions always evaluates to false}} return (0); } int checkGreaterThanBinaryOpIntCompare4(void) { int res; int f= 3; res = ((int)f + 3 > (char)f + 3); // no warning return (0); } int checkGreaterThanNestedBinaryOpIntCompare1(void) { int res; int t= 1; int u= 2; int f= 3; res = (((int)f + (3 - u)*t) > ((int)f + (3 - u)*t)); // expected-warning {{comparison of identical expressions always evaluates to false}} return (0); } int checkGreaterThanNestedBinaryOpIntCompare2(void) { int res; int t= 1; int u= 2; int f= 3; res = (((int)f + (u - 3)*t) > ((int)f + (3 - u)*t)); // no warning return (0); } int checkGreaterThanNestedBinaryOpIntCompare3(void) { int res; int t= 1; int u= 2; int f= 3; res = (((int)f + (u - 3)*t) > ((int)f + (3 - u)*(t + u > t + u))); // expected-warning {{comparison of identical expressions always evaluates to false}} return (0); } /* end GT with int */ /* end GT */ /* Checking use of identical expressions in conditional operator*/ unsigned test_unsigned(unsigned a) { unsigned b = 1; a = a > 5 ? b : b; // expected-warning {{identical expressions on both sides of ':' in conditional expression}} return a; } void test_signed() { int a = 0; a = a > 5 ? a : a; // expected-warning {{identical expressions on both sides of ':' in conditional expression}} } void test_bool(bool a) { a = a > 0 ? a : a; // expected-warning {{identical expressions on both sides of ':' in conditional expression}} } void test_float() { float a = 0; float b = 0; a = a > 5 ? a : a; // expected-warning {{identical expressions on both sides of ':' in conditional expression}} } const char *test_string() { float a = 0; return a > 5 ? "abc" : "abc"; // expected-warning {{identical expressions on both sides of ':' in conditional expression}} } void test_unsigned_expr() { unsigned a = 0; unsigned b = 0; a = a > 5 ? a+b : a+b; // expected-warning {{identical expressions on both sides of ':' in conditional expression}} } void test_signed_expr() { int a = 0; int b = 1; a = a > 5 ? a+b : a+b; // expected-warning {{identical expressions on both sides of ':' in conditional expression}} } void test_bool_expr(bool a) { bool b = 0; a = a > 0 ? a&&b : a&&b; // expected-warning {{identical expressions on both sides of ':' in conditional expression}} } void test_unsigned_expr_negative() { unsigned a = 0; unsigned b = 0; a = a > 5 ? a+b : b+a; // no warning } void test_signed_expr_negative() { int a = 0; int b = 1; a = a > 5 ? b+a : a+b; // no warning } void test_bool_expr_negative(bool a) { bool b = 0; a = a > 0 ? a&&b : b&&a; // no warning } void test_float_expr_positive() { float a = 0; float b = 0; a = a > 5 ? a+b : a+b; // expected-warning {{identical expressions on both sides of ':' in conditional expression}} } void test_expr_positive_func() { unsigned a = 0; unsigned b = 1; a = a > 5 ? a+func() : a+func(); // expected-warning {{identical expressions on both sides of ':' in conditional expression}} } void test_expr_negative_func() { unsigned a = 0; unsigned b = 1; a = a > 5 ? a+func() : a+func2(); // no warning } void test_expr_positive_funcParam() { unsigned a = 0; unsigned b = 1; a = a > 5 ? a+funcParam(b) : a+funcParam(b); // expected-warning {{identical expressions on both sides of ':' in conditional expression}} } void test_expr_negative_funcParam() { unsigned a = 0; unsigned b = 1; a = a > 5 ? a+funcParam(a) : a+funcParam(b); // no warning } void test_expr_positive_inc() { unsigned a = 0; unsigned b = 1; a = a > 5 ? a++ : a++; // expected-warning {{identical expressions on both sides of ':' in conditional expression}} } void test_expr_negative_inc() { unsigned a = 0; unsigned b = 1; a = a > 5 ? a++ : b++; // no warning } void test_expr_positive_assign() { unsigned a = 0; unsigned b = 1; a = a > 5 ? a=1 : a=1; // expected-warning {{identical expressions on both sides of ':' in conditional expression}} } void test_expr_negative_assign() { unsigned a = 0; unsigned b = 1; a = a > 5 ? a=1 : a=2; // no warning } void test_signed_nested_expr() { int a = 0; int b = 1; int c = 3; a = a > 5 ? a+b+(c+a)*(a + b*(c+a)) : a+b+(c+a)*(a + b*(c+a)); // expected-warning {{identical expressions on both sides of ':' in conditional expression}} } void test_signed_nested_expr_negative() { int a = 0; int b = 1; int c = 3; a = a > 5 ? a+b+(c+a)*(a + b*(c+a)) : a+b+(c+a)*(a + b*(a+c)); // no warning } void test_signed_nested_cond_expr_negative() { int a = 0; int b = 1; int c = 3; a = a > 5 ? (b > 5 ? 1 : 4) : (b > 5 ? 2 : 4); // no warning } void test_signed_nested_cond_expr() { int a = 0; int b = 1; int c = 3; a = a > 5 ? (b > 5 ? 1 : 4) : (b > 5 ? 4 : 4); // expected-warning {{identical expressions on both sides of ':' in conditional expression}} } void test_identical_branches1(bool b) { int i = 0; if (b) { // expected-warning {{true and false branches are identical}} ++i; } else { ++i; } } void test_identical_branches2(bool b) { int i = 0; if (b) { // expected-warning {{true and false branches are identical}} ++i; } else ++i; } void test_identical_branches3(bool b) { int i = 0; if (b) { // no warning ++i; } else { i++; } } void test_identical_branches4(bool b) { int i = 0; if (b) { // expected-warning {{true and false branches are identical}} } else { } } void test_identical_branches_break(bool b) { while (true) { if (b) // expected-warning {{true and false branches are identical}} break; else break; } } void test_identical_branches_continue(bool b) { while (true) { if (b) // expected-warning {{true and false branches are identical}} continue; else continue; } } void test_identical_branches_func(bool b) { if (b) // expected-warning {{true and false branches are identical}} func(); else func(); } void test_identical_branches_func_arguments(bool b) { if (b) // no-warning funcParam(1); else funcParam(2); } void test_identical_branches_cast1(bool b) { long v = -7; if (b) // no-warning v = (signed int) v; else v = (unsigned int) v; } void test_identical_branches_cast2(bool b) { long v = -7; if (b) // expected-warning {{true and false branches are identical}} v = (signed int) v; else v = (signed int) v; } int test_identical_branches_return_int(bool b) { int i = 0; if (b) { // expected-warning {{true and false branches are identical}} i++; return i; } else { i++; return i; } } int test_identical_branches_return_func(bool b) { if (b) { // expected-warning {{true and false branches are identical}} return func(); } else { return func(); } } void test_identical_branches_for(bool b) { int i; int j; if (b) { // expected-warning {{true and false branches are identical}} for (i = 0, j = 0; i < 10; i++) j += 4; } else { for (i = 0, j = 0; i < 10; i++) j += 4; } } void test_identical_branches_while(bool b) { int i = 10; if (b) { // expected-warning {{true and false branches are identical}} while (func()) i--; } else { while (func()) i--; } } void test_identical_branches_while_2(bool b) { int i = 10; if (b) { // no-warning while (func()) i--; } else { while (func()) i++; } } void test_identical_branches_do_while(bool b) { int i = 10; if (b) { // expected-warning {{true and false branches are identical}} do { i--; } while (func()); } else { do { i--; } while (func()); } } void test_identical_branches_if(bool b, int i) { if (b) { // expected-warning {{true and false branches are identical}} if (i < 5) i += 10; } else { if (i < 5) i += 10; } } void test_identical_bitwise1() { int a = 5 | 5; // expected-warning {{identical expressions on both sides of bitwise operator}} } void test_identical_bitwise2() { int a = 5; int b = a | a; // expected-warning {{identical expressions on both sides of bitwise operator}} } void test_identical_bitwise3() { int a = 5; int b = (a | a); // expected-warning {{identical expressions on both sides of bitwise operator}} } void test_identical_bitwise4() { int a = 4; int b = a | 4; // no-warning } void test_identical_bitwise5() { int a = 4; int b = 4; int c = a | b; // no-warning } void test_identical_bitwise6() { int a = 5; int b = a | 4 | a; // expected-warning {{identical expressions on both sides of bitwise operator}} } void test_identical_bitwise7() { int a = 5; int b = func() | func(); // no-warning } void test_identical_logical1(int a) { if (a == 4 && a == 4) // expected-warning {{identical expressions on both sides of logical operator}} ; } void test_identical_logical2(int a) { if (a == 4 || a == 5 || a == 4) // expected-warning {{identical expressions on both sides of logical operator}} ; } void test_identical_logical3(int a) { if (a == 4 || a == 5 || a == 6) // no-warning ; } void test_identical_logical4(int a) { if (a == func() || a == func()) // no-warning ; } #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wlogical-op-parentheses" void test_identical_logical5(int x, int y) { if (x == 4 && y == 5 || x == 4 && y == 6) // no-warning ; } void test_identical_logical6(int x, int y) { if (x == 4 && y == 5 || x == 4 && y == 5) // expected-warning {{identical expressions on both sides of logical operator}} ; } void test_identical_logical7(int x, int y) { // FIXME: We should warn here if (x == 4 && y == 5 || x == 4) ; } void test_identical_logical8(int x, int y) { // FIXME: We should warn here if (x == 4 || y == 5 && x == 4) ; } void test_identical_logical9(int x, int y) { // FIXME: We should warn here if (x == 4 || x == 4 && y == 5) ; } #pragma clang diagnostic pop void test_warn_chained_if_stmts_1(int x) { if (x == 1) ; else if (x == 1) // expected-warning {{expression is identical to previous condition}} ; } void test_warn_chained_if_stmts_2(int x) { if (x == 1) ; else if (x == 1) // expected-warning {{expression is identical to previous condition}} ; else if (x == 1) // expected-warning {{expression is identical to previous condition}} ; } void test_warn_chained_if_stmts_3(int x) { if (x == 1) ; else if (x == 2) ; else if (x == 1) // expected-warning {{expression is identical to previous condition}} ; } void test_warn_chained_if_stmts_4(int x) { if (x == 1) ; else if (func()) ; else if (x == 1) // expected-warning {{expression is identical to previous condition}} ; } void test_warn_chained_if_stmts_5(int x) { if (x & 1) ; else if (x & 1) // expected-warning {{expression is identical to previous condition}} ; } void test_warn_chained_if_stmts_6(int x) { if (x == 1) ; else if (x == 2) ; else if (x == 2) // expected-warning {{expression is identical to previous condition}} ; else if (x == 3) ; } void test_warn_chained_if_stmts_7(int x) { if (x == 1) ; else if (x == 2) ; else if (x == 3) ; else if (x == 2) // expected-warning {{expression is identical to previous condition}} ; else if (x == 5) ; } void test_warn_chained_if_stmts_8(int x) { if (x == 1) ; else if (x == 2) ; else if (x == 3) ; else if (x == 2) // expected-warning {{expression is identical to previous condition}} ; else if (x == 5) ; else if (x == 3) // expected-warning {{expression is identical to previous condition}} ; else if (x == 7) ; } void test_nowarn_chained_if_stmts_1(int x) { if (func()) ; else if (func()) // no-warning ; } void test_nowarn_chained_if_stmts_2(int x) { if (func()) ; else if (x == 1) ; else if (func()) // no-warning ; } void test_nowarn_chained_if_stmts_3(int x) { if (x++) ; else if (x++) // no-warning ; } void test_warn_wchar() { const wchar_t * a = 0 ? L"Warning" : L"Warning"; // expected-warning {{identical expressions on both sides of ':' in conditional expression}} } void test_nowarn_wchar() { const wchar_t * a = 0 ? L"No" : L"Warning"; } void test_nowarn_long() { int a = 0, b = 0; long c; if (0) { b -= a; c = 0; } else { // no-warning b -= a; c = 0LL; } }
{ "content_hash": "b416114ba27b50e76f81f43d3491ddf9", "timestamp": "", "source": "github", "line_count": 1532, "max_line_length": 157, "avg_line_length": 22.68211488250653, "alnum_prop": 0.6108664997553886, "repo_name": "Rapier-Foundation/rapier-script", "id": "46dd56289c4effc4ae8a8fe61b96ceacb99db1d5", "size": "34749", "binary": false, "copies": "5", "ref": "refs/heads/master", "path": "src/rapierlang/test/Analysis/identical-expressions.cpp", "mode": "33188", "license": "mit", "language": [ { "name": "AppleScript", "bytes": "1429" }, { "name": "Assembly", "bytes": "13988" }, { "name": "Batchfile", "bytes": "10286" }, { "name": "C", "bytes": "7566017" }, { "name": "C#", "bytes": "12133" }, { "name": "C++", "bytes": "39435677" }, { "name": "CMake", "bytes": "69644" }, { "name": "CSS", "bytes": "22918" }, { "name": "Cuda", "bytes": "31200" }, { "name": "Emacs Lisp", "bytes": "15377" }, { "name": "FORTRAN", "bytes": "7033" }, { "name": "Groff", "bytes": "9943" }, { "name": "HTML", "bytes": "1148463" }, { "name": "JavaScript", "bytes": "24233" }, { "name": "LLVM", "bytes": "688" }, { "name": "Limbo", "bytes": "755" }, { "name": "M", "bytes": "2529" }, { "name": "Makefile", "bytes": "93929" }, { "name": "Mathematica", "bytes": "5122" }, { "name": "Matlab", "bytes": "40309" }, { "name": "Mercury", "bytes": "1222" }, { "name": "Objective-C", "bytes": "4355070" }, { "name": "Objective-C++", "bytes": "1428214" }, { "name": "Perl", "bytes": "102454" }, { "name": "Python", "bytes": "470720" }, { "name": "Shell", "bytes": "6997" } ], "symlink_target": "" }
package org.pentaho.di.trans.steps.simplemapping; import org.pentaho.di.core.CheckResult; import org.pentaho.di.core.CheckResultInterface; import org.pentaho.di.core.Const; import org.pentaho.di.core.ObjectLocationSpecificationMethod; import org.pentaho.di.core.database.DatabaseMeta; import org.pentaho.di.core.exception.KettleException; import org.pentaho.di.core.exception.KettleStepException; import org.pentaho.di.core.exception.KettleXMLException; import org.pentaho.di.core.row.RowMetaInterface; import org.pentaho.di.core.row.ValueMetaInterface; import org.pentaho.di.core.util.Utils; import org.pentaho.di.core.variables.VariableSpace; import org.pentaho.di.core.xml.XMLHandler; import org.pentaho.di.i18n.BaseMessages; import org.pentaho.di.repository.HasRepositoryInterface; import org.pentaho.di.repository.ObjectId; import org.pentaho.di.repository.Repository; import org.pentaho.di.repository.RepositoryDirectoryInterface; import org.pentaho.di.repository.RepositoryImportLocation; import org.pentaho.di.repository.RepositoryObject; import org.pentaho.di.repository.RepositoryObjectType; import org.pentaho.di.repository.StringObjectId; import org.pentaho.di.resource.ResourceEntry; import org.pentaho.di.resource.ResourceEntry.ResourceType; import org.pentaho.di.resource.ResourceReference; import org.pentaho.di.trans.StepWithMappingMeta; import org.pentaho.di.trans.Trans; import org.pentaho.di.trans.TransMeta; import org.pentaho.di.trans.TransMeta.TransformationType; import org.pentaho.di.trans.step.StepDataInterface; import org.pentaho.di.trans.step.StepIOMeta; import org.pentaho.di.trans.step.StepIOMetaInterface; import org.pentaho.di.trans.step.StepInterface; import org.pentaho.di.trans.step.StepMeta; import org.pentaho.di.trans.step.StepMetaInterface; import org.pentaho.di.trans.steps.mapping.MappingIODefinition; import org.pentaho.di.trans.steps.mapping.MappingParameters; import org.pentaho.di.trans.steps.mapping.MappingValueRename; import org.pentaho.di.trans.steps.mappinginput.MappingInputMeta; import org.pentaho.di.trans.steps.mappingoutput.MappingOutputMeta; import org.pentaho.metastore.api.IMetaStore; import org.w3c.dom.Node; import java.util.ArrayList; import java.util.List; /** * Meta-data for the Mapping step: contains name of the (sub-)transformation to execute * * @since 22-nov-2005 * @author Matt * */ public class SimpleMappingMeta extends StepWithMappingMeta implements StepMetaInterface, HasRepositoryInterface { private static Class<?> PKG = SimpleMappingMeta.class; // for i18n purposes, needed by Translator2!! private MappingIODefinition inputMapping; private MappingIODefinition outputMapping; private MappingParameters mappingParameters; /* * This repository object is injected from the outside at runtime or at design time. It comes from either Spoon or * Trans */ private Repository repository; private IMetaStore metaStore; public SimpleMappingMeta() { super(); // allocate BaseStepMeta inputMapping = new MappingIODefinition(); outputMapping = new MappingIODefinition(); mappingParameters = new MappingParameters(); } private void checkObjectLocationSpecificationMethod() { if ( specificationMethod == null ) { // Backward compatibility // // Default = Filename // specificationMethod = ObjectLocationSpecificationMethod.FILENAME; if ( !Utils.isEmpty( fileName ) ) { specificationMethod = ObjectLocationSpecificationMethod.FILENAME; } else if ( transObjectId != null ) { specificationMethod = ObjectLocationSpecificationMethod.REPOSITORY_BY_REFERENCE; } else if ( !Utils.isEmpty( transName ) ) { specificationMethod = ObjectLocationSpecificationMethod.REPOSITORY_BY_NAME; } } } public void loadXML( Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore ) throws KettleXMLException { try { String method = XMLHandler.getTagValue( stepnode, "specification_method" ); specificationMethod = ObjectLocationSpecificationMethod.getSpecificationMethodByCode( method ); String transId = XMLHandler.getTagValue( stepnode, "trans_object_id" ); transObjectId = Utils.isEmpty( transId ) ? null : new StringObjectId( transId ); transName = XMLHandler.getTagValue( stepnode, "trans_name" ); fileName = XMLHandler.getTagValue( stepnode, "filename" ); directoryPath = XMLHandler.getTagValue( stepnode, "directory_path" ); // Backward compatibility check for object specification // checkObjectLocationSpecificationMethod(); Node mappingsNode = XMLHandler.getSubNode( stepnode, "mappings" ); if ( mappingsNode == null ) { throw new KettleXMLException( "Unable to find <mappings> element in the step XML" ); } // Read all the input mapping definitions... // Node inputNode = XMLHandler.getSubNode( mappingsNode, "input" ); Node mappingNode = XMLHandler.getSubNode( inputNode, MappingIODefinition.XML_TAG ); if ( mappingNode != null ) { inputMapping = new MappingIODefinition( mappingNode ); } else { inputMapping = new MappingIODefinition(); // empty } Node outputNode = XMLHandler.getSubNode( mappingsNode, "output" ); mappingNode = XMLHandler.getSubNode( outputNode, MappingIODefinition.XML_TAG ); if ( mappingNode != null ) { outputMapping = new MappingIODefinition( mappingNode ); } else { outputMapping = new MappingIODefinition(); // empty } // Load the mapping parameters too.. // Node mappingParametersNode = XMLHandler.getSubNode( mappingsNode, MappingParameters.XML_TAG ); mappingParameters = new MappingParameters( mappingParametersNode ); } catch ( Exception e ) { throw new KettleXMLException( BaseMessages.getString( PKG, "SimpleMappingMeta.Exception.ErrorLoadingTransformationStepFromXML" ), e ); } } public Object clone() { Object retval = super.clone(); return retval; } public String getXML() { StringBuilder retval = new StringBuilder( 300 ); retval.append( " " ).append( XMLHandler.addTagValue( "specification_method", specificationMethod == null ? null : specificationMethod .getCode() ) ); retval.append( " " ).append( XMLHandler.addTagValue( "trans_object_id", transObjectId == null ? null : transObjectId.toString() ) ); // Export a little bit of extra information regarding the reference since it doesn't really matter outside the same // repository. // if ( repository != null && transObjectId != null ) { try { RepositoryObject objectInformation = repository.getObjectInformation( transObjectId, RepositoryObjectType.TRANSFORMATION ); if ( objectInformation != null ) { transName = objectInformation.getName(); directoryPath = objectInformation.getRepositoryDirectory().getPath(); } } catch ( KettleException e ) { // Ignore object reference problems. It simply means that the reference is no longer valid. } } retval.append( " " ).append( XMLHandler.addTagValue( "trans_name", transName ) ); retval.append( " " ).append( XMLHandler.addTagValue( "filename", fileName ) ); retval.append( " " ).append( XMLHandler.addTagValue( "directory_path", directoryPath ) ); retval.append( " " ).append( XMLHandler.openTag( "mappings" ) ).append( Const.CR ); retval.append( " " ).append( XMLHandler.openTag( "input" ) ).append( Const.CR ); retval.append( inputMapping.getXML() ); retval.append( " " ).append( XMLHandler.closeTag( "input" ) ).append( Const.CR ); retval.append( " " ).append( XMLHandler.openTag( "output" ) ).append( Const.CR ); retval.append( outputMapping.getXML() ); retval.append( " " ).append( XMLHandler.closeTag( "output" ) ).append( Const.CR ); // Add the mapping parameters too // retval.append( " " ).append( mappingParameters.getXML() ).append( Const.CR ); retval.append( " " ).append( XMLHandler.closeTag( "mappings" ) ).append( Const.CR ); return retval.toString(); } public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException { String method = rep.getStepAttributeString( id_step, "specification_method" ); specificationMethod = ObjectLocationSpecificationMethod.getSpecificationMethodByCode( method ); String transId = rep.getStepAttributeString( id_step, "trans_object_id" ); transObjectId = Utils.isEmpty( transId ) ? null : new StringObjectId( transId ); transName = rep.getStepAttributeString( id_step, "trans_name" ); fileName = rep.getStepAttributeString( id_step, "filename" ); directoryPath = rep.getStepAttributeString( id_step, "directory_path" ); // Backward compatibility check for object specification // checkObjectLocationSpecificationMethod(); inputMapping = new MappingIODefinition( rep, id_step, "input_", 0 ); outputMapping = new MappingIODefinition( rep, id_step, "output_", 0 ); mappingParameters = new MappingParameters( rep, id_step ); } public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException { rep.saveStepAttribute( id_transformation, id_step, "specification_method", specificationMethod == null ? null : specificationMethod.getCode() ); rep.saveStepAttribute( id_transformation, id_step, "trans_object_id", transObjectId == null ? null : transObjectId.toString() ); rep.saveStepAttribute( id_transformation, id_step, "filename", fileName ); rep.saveStepAttribute( id_transformation, id_step, "trans_name", transName ); rep.saveStepAttribute( id_transformation, id_step, "directory_path", directoryPath ); inputMapping.saveRep( rep, metaStore, id_transformation, id_step, "input_", 0 ); outputMapping.saveRep( rep, metaStore, id_transformation, id_step, "output_", 0 ); // save the mapping parameters too // mappingParameters.saveRep( rep, metaStore, id_transformation, id_step ); } public void setDefault() { specificationMethod = ObjectLocationSpecificationMethod.FILENAME; MappingIODefinition inputDefinition = new MappingIODefinition( null, null ); inputDefinition.setMainDataPath( true ); inputDefinition.setRenamingOnOutput( true ); inputMapping = inputDefinition; MappingIODefinition outputDefinition = new MappingIODefinition( null, null ); outputDefinition.setMainDataPath( true ); outputMapping = outputDefinition; } public void getFields( RowMetaInterface row, String origin, RowMetaInterface[] info, StepMeta nextStep, VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException { // First load some interesting data... // Then see which fields get added to the row. // TransMeta mappingTransMeta = null; try { mappingTransMeta = loadMappingMeta( this, repository, metaStore, space, mappingParameters.isInheritingAllVariables() ); } catch ( KettleException e ) { throw new KettleStepException( BaseMessages.getString( PKG, "SimpleMappingMeta.Exception.UnableToLoadMappingTransformation" ), e ); } // The field structure may depend on the input parameters as well (think of parameter replacements in MDX queries // for instance) if ( mappingParameters != null && mappingTransMeta != null ) { // Just set the variables in the transformation statically. // This just means: set a number of variables or parameter values: // StepWithMappingMeta.activateParams( mappingTransMeta, mappingTransMeta, space, mappingTransMeta.listParameters(), mappingParameters.getVariable(), mappingParameters.getInputField() ); } // Keep track of all the fields that need renaming... // List<MappingValueRename> inputRenameList = new ArrayList<MappingValueRename>(); // // Before we ask the mapping outputs anything, we should teach the mapping // input steps in the sub-transformation about the data coming in... // RowMetaInterface inputRowMeta; // The row metadata, what we pass to the mapping input step // definition.getOutputStep(), is "row" // However, we do need to re-map some fields... // inputRowMeta = row.clone(); if ( !inputRowMeta.isEmpty() ) { for ( MappingValueRename valueRename : inputMapping.getValueRenames() ) { ValueMetaInterface valueMeta = inputRowMeta.searchValueMeta( valueRename.getSourceValueName() ); if ( valueMeta == null ) { throw new KettleStepException( BaseMessages.getString( PKG, "SimpleMappingMeta.Exception.UnableToFindField", valueRename.getSourceValueName() ) ); } valueMeta.setName( valueRename.getTargetValueName() ); } } // What is this mapping input step? // StepMeta mappingInputStep = mappingTransMeta.findMappingInputStep( null ); // We're certain it's a MappingInput step... // MappingInputMeta mappingInputMeta = (MappingInputMeta) mappingInputStep.getStepMetaInterface(); // Inform the mapping input step about what it's going to receive... // mappingInputMeta.setInputRowMeta( inputRowMeta ); // What values are we changing names for: already done! // mappingInputMeta.setValueRenames( null ); // Keep a list of the input rename values that need to be changed back at // the output // if ( inputMapping.isRenamingOnOutput() ) { SimpleMapping.addInputRenames( inputRenameList, inputMapping.getValueRenames() ); } StepMeta mappingOutputStep = mappingTransMeta.findMappingOutputStep( null ); // We know it's a mapping output step... MappingOutputMeta mappingOutputMeta = (MappingOutputMeta) mappingOutputStep.getStepMetaInterface(); // Change a few columns. mappingOutputMeta.setOutputValueRenames( outputMapping.getValueRenames() ); // Perhaps we need to change a few input columns back to the original? // mappingOutputMeta.setInputValueRenames( inputRenameList ); // Now we know wat's going to come out of there... // This is going to be the full row, including all the remapping, etc. // RowMetaInterface mappingOutputRowMeta = mappingTransMeta.getStepFields( mappingOutputStep ); row.clear(); row.addRowMeta( mappingOutputRowMeta ); } public String[] getInfoSteps() { return null; } public String[] getTargetSteps() { return null; } public void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta, RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space, Repository repository, IMetaStore metaStore ) { CheckResult cr; if ( prev == null || prev.size() == 0 ) { cr = new CheckResult( CheckResultInterface.TYPE_RESULT_WARNING, BaseMessages.getString( PKG, "SimpleMappingMeta.CheckResult.NotReceivingAnyFields" ), stepMeta ); remarks.add( cr ); } else { cr = new CheckResult( CheckResultInterface.TYPE_RESULT_OK, BaseMessages.getString( PKG, "SimpleMappingMeta.CheckResult.StepReceivingFields", prev.size() + "" ), stepMeta ); remarks.add( cr ); } // See if we have input streams leading to this step! if ( input.length > 0 ) { cr = new CheckResult( CheckResultInterface.TYPE_RESULT_OK, BaseMessages.getString( PKG, "SimpleMappingMeta.CheckResult.StepReceivingFieldsFromOtherSteps" ), stepMeta ); remarks.add( cr ); } else { cr = new CheckResult( CheckResultInterface.TYPE_RESULT_ERROR, BaseMessages.getString( PKG, "SimpleMappingMeta.CheckResult.NoInputReceived" ), stepMeta ); remarks.add( cr ); } } public StepInterface getStep( StepMeta stepMeta, StepDataInterface stepDataInterface, int cnr, TransMeta tr, Trans trans ) { return new SimpleMapping( stepMeta, stepDataInterface, cnr, tr, trans ); } public StepDataInterface getStepData() { return new SimpleMappingData(); } /** * @return the mappingParameters */ public MappingParameters getMappingParameters() { return mappingParameters; } /** * @param mappingParameters * the mappingParameters to set */ public void setMappingParameters( MappingParameters mappingParameters ) { this.mappingParameters = mappingParameters; } @Override public List<ResourceReference> getResourceDependencies( TransMeta transMeta, StepMeta stepInfo ) { List<ResourceReference> references = new ArrayList<ResourceReference>( 5 ); String realFilename = transMeta.environmentSubstitute( fileName ); String realTransname = transMeta.environmentSubstitute( transName ); ResourceReference reference = new ResourceReference( stepInfo ); references.add( reference ); if ( !Utils.isEmpty( realFilename ) ) { // Add the filename to the references, including a reference to this step // meta data. // reference.getEntries().add( new ResourceEntry( realFilename, ResourceType.ACTIONFILE ) ); } else if ( !Utils.isEmpty( realTransname ) ) { // Add the filename to the references, including a reference to this step // meta data. // reference.getEntries().add( new ResourceEntry( realTransname, ResourceType.ACTIONFILE ) ); references.add( reference ); } return references; } /** * @return the repository */ public Repository getRepository() { return repository; } /** * @param repository * the repository to set */ public void setRepository( Repository repository ) { this.repository = repository; } @Override public StepIOMetaInterface getStepIOMeta() { StepIOMetaInterface ioMeta = super.getStepIOMeta( false ); if ( ioMeta == null ) { ioMeta = new StepIOMeta( true, true, false, false, false, false ); setStepIOMeta( ioMeta ); } return ioMeta; } public boolean excludeFromRowLayoutVerification() { return false; } @Override public void searchInfoAndTargetSteps( List<StepMeta> steps ) { } public TransformationType[] getSupportedTransformationTypes() { return new TransformationType[] { TransformationType.Normal, }; } @Override public boolean hasRepositoryReferences() { return specificationMethod == ObjectLocationSpecificationMethod.REPOSITORY_BY_REFERENCE; } @Override public void lookupRepositoryReferences( Repository repository ) throws KettleException { // The correct reference is stored in the trans name and directory attributes... // RepositoryDirectoryInterface repositoryDirectoryInterface = RepositoryImportLocation.getRepositoryImportLocation().findDirectory( directoryPath ); transObjectId = repository.getTransformationID( transName, repositoryDirectoryInterface ); } /** * @return The objects referenced in the step, like a mapping, a transformation, a job, ... */ public String[] getReferencedObjectDescriptions() { return new String[] { BaseMessages.getString( PKG, "SimpleMappingMeta.ReferencedObject.Description" ), }; } private boolean isMapppingDefined() { return !Utils.isEmpty( fileName ) || transObjectId != null || ( !Utils.isEmpty( this.directoryPath ) && !Utils.isEmpty( transName ) ); } public boolean[] isReferencedObjectEnabled() { return new boolean[] { isMapppingDefined(), }; } @Deprecated public Object loadReferencedObject( int index, Repository rep, VariableSpace space ) throws KettleException { return loadReferencedObject( index, rep, null, space ); } /** * Load the referenced object * * @param index * the object index to load * @param rep * the repository * @param metaStore * the MetaStore to use * @param space * the variable space to use * @return the referenced object once loaded * @throws KettleException */ public Object loadReferencedObject( int index, Repository rep, IMetaStore metaStore, VariableSpace space ) throws KettleException { return loadMappingMeta( this, rep, metaStore, space ); } public IMetaStore getMetaStore() { return metaStore; } public void setMetaStore( IMetaStore metaStore ) { this.metaStore = metaStore; } public MappingIODefinition getInputMapping() { return inputMapping; } public void setInputMapping( MappingIODefinition inputMapping ) { this.inputMapping = inputMapping; } public MappingIODefinition getOutputMapping() { return outputMapping; } public void setOutputMapping( MappingIODefinition outputMapping ) { this.outputMapping = outputMapping; } }
{ "content_hash": "1c9ad33c99223adf44f308329c625a22", "timestamp": "", "source": "github", "line_count": 550, "max_line_length": 134, "avg_line_length": 38.161818181818184, "alnum_prop": 0.7139930439754157, "repo_name": "flbrino/pentaho-kettle", "id": "e85d21c3a040626fbdcabe77b865fb0f7c2c37c7", "size": "21901", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "engine/src/main/java/org/pentaho/di/trans/steps/simplemapping/SimpleMappingMeta.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "41331" }, { "name": "CSS", "bytes": "41063" }, { "name": "GAP", "bytes": "4005" }, { "name": "HTML", "bytes": "50409" }, { "name": "Java", "bytes": "42195950" }, { "name": "JavaScript", "bytes": "411580" }, { "name": "Shell", "bytes": "45279" } ], "symlink_target": "" }
FROM openjdk:8 MAINTAINER schleichardt "https://github.com/schleichardt/msct-docker-containers" #Install sbt RUN apt-get update && apt-get install -y apt-transport-https && \ echo "deb https://dl.bintray.com/sbt/debian /" | tee -a /etc/apt/sources.list.d/sbt.list && \ apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823 && \ apt-get update && apt-get install -y sbt=0.13.16 # Install node RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - RUN apt install nodejs RUN npm i yarn -g # Install phantomjs RUN wget -P /tmp https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2 && \ tar -xjf /tmp/phantomjs-1.9.8-linux-x86_64.tar.bz2 -C /tmp && \ cp /tmp/phantomjs-1.9.8-linux-x86_64/bin/phantomjs /usr/local/bin/ WORKDIR /root # Cleaning RUN \ apt-get -q autoremove && \ apt-get -q clean -y && \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \ rm -rf /var/cache/apt/*.bin
{ "content_hash": "096a5bb0f2e0a636d692f0ea33476275", "timestamp": "", "source": "github", "line_count": 28, "max_line_length": 108, "avg_line_length": 35.142857142857146, "alnum_prop": 0.6951219512195121, "repo_name": "schleichardt/msct-docker-containers", "id": "b2d880c5588bc6c2bdc76fc05bcd8bcd9f3d8842", "size": "984", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "sbt-node/Dockerfile", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Dockerfile", "bytes": "1857" } ], "symlink_target": "" }
SYNONYM #### According to The Catalogue of Life, 3rd January 2011 #### Published in null #### Original name null ### Remarks null
{ "content_hash": "59fc5b0897544bfff4d7c6681a4ce883", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 39, "avg_line_length": 10.23076923076923, "alnum_prop": 0.6917293233082706, "repo_name": "mdoering/backbone", "id": "a64fd27022102e8a7efb563642be33d1b4e306ae", "size": "194", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "life/Plantae/Rhodophyta/Florideophyceae/Corallinales/Corallinaceae/Neogoniolithon/Neogoniolithon brassica-florida/ Syn. Goniolithon notarisii/README.md", "mode": "33188", "license": "apache-2.0", "language": [], "symlink_target": "" }
<!doctype html> <html lang="fr"> <head> <title>Example: French Mobile Document</title> <meta name="description" content="Internationalization example of site structures using hreflang with canonical, mobile and AMP documents." /> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <link rel="canonical" href="<%host%>/internationalization/alternate/fr/" /> <link rel="amphtml" href="<%host%>/internationalization/alternate/fr/index.amp.html" /> <link rel="alternate" hreflang="en" href="<%host%>/internationalization/alternate/index.mobile.html" /> <link rel="alternate" hreflang="fr" href="<%host%>/internationalization/alternate/fr/index.mobile.html" /> <link rel="alternate" hreflang="ja" href="<%host%>/internationalization/alternate/ja/index.mobile.html" /> </head> <body> <h1>French Mobile Document</h1> <p>Un document mobile alternatif écrit en français.</p> <p>Autres documents connexes en français:</p> <ul> <li><a href="/internationalization/alternate/fr/index.amp.html">Le document AMP</a></li> <li><a href="/internationalization/alternate/fr/">Le document canonique</a></li> </ul> <p>Dans d'autres langues avec mobile:</p> <ul> <li><a href="/internationalization/alternate/index.mobile.html">En anglais</a></li> <li><a href="/internationalization/alternate/ja/index.mobile.html">En japonais</a></li> </ul> <p>Cette page contient les balises 'link' suivantes:</p> <pre> &lt;link rel="canonical" href="<%host%>/internationalization/alternate/fr/" /&gt; &lt;link rel="amphtml" href="<%host%>/internationalization/alternate/fr/index.amp.html" /&gt; &lt;link rel="alternate" hreflang="en" href="<%host%>/internationalization/alternate/index.mobile.html" /&gt; &lt;link rel="alternate" hreflang="fr" href="<%host%>/internationalization/alternate/fr/index.mobile.html" /&gt; &lt;link rel="alternate" hreflang="ja" href="<%host%>/internationalization/alternate/ja/index.mobile.html" /&gt; </pre> <a href="/introduction/internationalization/">Retourner à la documentation</a> </body> </html>
{ "content_hash": "5b37ddb98b50f2b305afa25ade00a35a", "timestamp": "", "source": "github", "line_count": 45, "max_line_length": 146, "avg_line_length": 48.733333333333334, "alnum_prop": 0.6858185134518924, "repo_name": "ampproject/amp-by-example", "id": "68b5fdbf98d039a657ad0e141db1ca75617b9bd9", "size": "2197", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "static/internationalization/alternate/fr/index.mobile.html", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "61961" }, { "name": "Dockerfile", "bytes": "1689" }, { "name": "Go", "bytes": "110195" }, { "name": "HTML", "bytes": "1212554" }, { "name": "JavaScript", "bytes": "245412" }, { "name": "Shell", "bytes": "3973" } ], "symlink_target": "" }
<!DOCTYPE html> <html lang="en" class="h-100"> <head> <meta charset="utf-8"> <title>{{ page.title }}</title> {% if page.description %}<meta name="description" content="{{ page.description }}">{% endif %} <meta name="author" content="{{ site.author.name }}"> <!-- Enable responsive viewport --> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <!-- Bootstrap styles --> <link href="{{ ASSET_PATH }}/bootstrap/css/bootstrap.min.css" rel="stylesheet"> <!-- Sticky Footer --> <link href="{{ ASSET_PATH }}/bootstrap/css/sticky-footer.css" rel="stylesheet"> <!-- Blog style --> <link href="{{ ASSET_PATH }}/bootstrap/css/blog.css" rel="stylesheet"> <!-- Font Awesome icons --> <link href="{{ ASSET_PATH }}/fontawesome/css/brands.min.css" rel="stylesheet"> <link href="{{ ASSET_PATH }}/fontawesome/css/fontawesome.min.css" rel="stylesheet"> <link href="{{ ASSET_PATH }}/fontawesome/css/solid.min.css" rel="stylesheet"> <!-- Academic icons --> <!-- <link href="{{ ASSET_PATH }}/academicons/css/academicons.min.css" rel="stylesheet"> --> <!-- Custom styles (tag boxes for posts) --> <link href="{{ ASSET_PATH }}/jekyll-bootstrap/css/style.css?body=1" rel="stylesheet"> <!-- atom & rss feed --> <link href="{{ BASE_PATH }}{{ site.JB.atom_path }}" type="application/atom+xml" rel="alternate" title="Sitewide ATOM Feed"> <link href="{{ BASE_PATH }}{{ site.JB.rss_path }}" type="application/rss+xml" rel="alternate" title="Sitewide RSS Feed"> </head> <body class="d-flex flex-column h-100"> <nav class="navbar navbar-expand-lg navbar-light bg-light" role="navigation"> <!-- Brand and toggle get grouped for better mobile display --> <div class="navbar-header"> <button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#jb-navbar-collapse"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="{{ HOME_PATH }}">{{ site.title }}</a> </div> <!-- Collect the nav links, forms, and other content for toggling --> <div class="navbar-collapse collapse" id="jb-navbar-collapse"> <ul class="navbar-nav"> {% assign pages_list = site.pages %} {% assign group = 'navigation' %} {% include JB/pages_list %} </ul> <!--<form class="navbar-form navbar-right" role="search">--> <!--<div class="form-group">--> <!--<input type="text" class="form-control" placeholder="Search">--> <!--</div>--> <!--<button type="submit" class="btn btn-default">Submit</button>--> <!--</form>--> </div><!-- /.navbar-collapse --> </nav> <main role="main" class="flex-shrink-0"> <div class="container"> {{ content }} </div> </main> <footer class="footer mt-auto py-3"> <div class="container"> <span class="text-muted">&copy; {{ site.time | date: '%Y' }} {{ site.author }} <a href="https://creativecommons.org/licenses/by/4.0/" target="_blank" title="CC BY">CC BY</a></span> </div> </footer> {% include JB/analytics %} <!-- Latest compiled and minified JavaScript, requires jQuery 1.x (2.x not supported in IE8) --> <!-- Placed at the end of the document so the pages load faster --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <script src="{{ ASSET_PATH }}/bootstrap/js/bootstrap.min.js"></script> </body> </html>
{ "content_hash": "fdd91ebfbff227495247cd636d532640", "timestamp": "", "source": "github", "line_count": 84, "max_line_length": 188, "avg_line_length": 44.55952380952381, "alnum_prop": 0.5874966604328079, "repo_name": "tpaskhalis/tpaskhalis.github.io", "id": "d01002452ed9748024a6a6cd574b24d5818a4f04", "size": "3743", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "_includes/themes/bootstrap/default.html", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "9094" }, { "name": "HTML", "bytes": "66720117" }, { "name": "Ruby", "bytes": "10877" } ], "symlink_target": "" }
ACCEPTED #### According to International Plant Names Index #### Published in null #### Original name null ### Remarks null
{ "content_hash": "7e0da4a9b861e1470ca418f1718fc91e", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 31, "avg_line_length": 9.692307692307692, "alnum_prop": 0.7063492063492064, "repo_name": "mdoering/backbone", "id": "b9915867905abf1281eb9f1ab98266a23424f8aa", "size": "194", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "life/Plantae/Magnoliophyta/Magnoliopsida/Caryophyllales/Montiaceae/Calandrinia/Calandrinia denticulata/Calandrinia denticulata echinata/README.md", "mode": "33188", "license": "apache-2.0", "language": [], "symlink_target": "" }
package iso20022 // Set of elements used to further detail the information related to the type of payment. type MandateTypeInformation1 struct { // Agreement under which or rules under which the mandate resides. ServiceLevel *ServiceLevel8Choice `xml:"SvcLvl,omitempty"` // User community specific instrument. // Usage: This element is used to specify a local instrument, local clearing option and/or further qualify the service or service level. LocalInstrument *LocalInstrument2Choice `xml:"LclInstrm,omitempty"` } func (m *MandateTypeInformation1) AddServiceLevel() *ServiceLevel8Choice { m.ServiceLevel = new(ServiceLevel8Choice) return m.ServiceLevel } func (m *MandateTypeInformation1) AddLocalInstrument() *LocalInstrument2Choice { m.LocalInstrument = new(LocalInstrument2Choice) return m.LocalInstrument }
{ "content_hash": "3052925aa82c3548471fb1166b914fcf", "timestamp": "", "source": "github", "line_count": 22, "max_line_length": 137, "avg_line_length": 37.63636363636363, "alnum_prop": 0.8043478260869565, "repo_name": "fgrid/iso20022", "id": "d53fc7db83a8684be72edbd73291c97a8b4c9260", "size": "828", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "MandateTypeInformation1.go", "mode": "33188", "license": "mit", "language": [ { "name": "Go", "bytes": "21383920" } ], "symlink_target": "" }
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <artifactId>brooklyn-locations-jclouds</artifactId> <packaging>jar</packaging> <name>Brooklyn Jclouds Location Targets</name> <description> Support jclouds API for provisioning cloud locations </description> <parent> <groupId>io.brooklyn</groupId> <artifactId>brooklyn-parent</artifactId> <version>0.7.0-SNAPSHOT</version> <!-- BROOKLYN_VERSION --> <relativePath>../../pom.xml</relativePath> </parent> <dependencies> <dependency> <groupId>io.brooklyn</groupId> <artifactId>brooklyn-core</artifactId> </dependency> <dependency> <groupId>${jclouds.groupId}.driver</groupId> <artifactId>jclouds-slf4j</artifactId> <version>${jclouds.version}</version> </dependency> <dependency> <groupId>${jclouds.groupId}.driver</groupId> <artifactId>jclouds-bouncycastle</artifactId> <version>${jclouds.version}</version> </dependency> <dependency> <groupId>${jclouds.groupId}.driver</groupId> <artifactId>jclouds-sshj</artifactId> </dependency> <dependency> <groupId>${jclouds.groupId}</groupId> <artifactId>jclouds-allcompute</artifactId> <version>${jclouds.version}</version> </dependency> <dependency> <groupId>${jclouds.groupId}.labs</groupId> <artifactId>abiquo</artifactId> <version>${jclouds.version}</version> </dependency> <dependency> <groupId>${jclouds.groupId}.labs</groupId> <artifactId>google-compute-engine</artifactId> <version>${jclouds.version}</version> </dependency> <dependency> <groupId>${jclouds.groupId}.labs</groupId> <artifactId>docker</artifactId> <version>${jclouds.version}</version> </dependency> <!-- these two seem needed here to prevent Eclipse IDE from getting wrong version of logback-core --> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-core</artifactId> <version>${logback.version}</version> </dependency> <!-- test dependencies --> <dependency> <groupId>${project.groupId}</groupId> <artifactId>brooklyn-test-support</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>io.brooklyn</groupId> <artifactId>brooklyn-core</artifactId> <version>${project.version}</version> <classifier>tests</classifier> <scope>test</scope> </dependency> <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-all</artifactId> <version>${mockito.version}</version> </dependency> </dependencies> </project>
{ "content_hash": "4e6b325a413096a5c7e6ed7497d44135", "timestamp": "", "source": "github", "line_count": 90, "max_line_length": 109, "avg_line_length": 37.55555555555556, "alnum_prop": 0.5866863905325443, "repo_name": "merrickjyoungibm/brooklyn", "id": "e36d5a28a6f74fd3f8b698679ceea139a224b4ec", "size": "3380", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "locations/jclouds/pom.xml", "mode": "33188", "license": "apache-2.0", "language": [], "symlink_target": "" }
<?php namespace spec\Cavis\Core\Usecase\Comment\Vote; use PHPSpec2\ObjectBehavior; class Interactor extends ObjectBehavior { /** * @param Cavis\Core\Usecase\Comment\Vote\Voter $voter */ function let($voter) { $this->beConstructedWith($voter); } function it_should_be_initializable() { $this->shouldHaveType('Cavis\Core\Usecase\Comment\Vote\Interactor'); } function it_carries_out_the_interaction_chain($voter) { $voter->authorise()->shouldBeCalled(); $voter->vote()->shouldBeCalled(); $this->interact(); } }
{ "content_hash": "b35a13b9a72eea5ac6afd2499489931c", "timestamp": "", "source": "github", "line_count": 28, "max_line_length": 76, "avg_line_length": 21.535714285714285, "alnum_prop": 0.6318407960199005, "repo_name": "Moult/cavis", "id": "f2e4b9271bfd608e3851cb3673f670d1305042d3", "size": "603", "binary": false, "copies": "3", "ref": "refs/heads/develop", "path": "spec/Cavis/Core/Usecase/Comment/Vote/Interactor.php", "mode": "33188", "license": "mit", "language": [ { "name": "PHP", "bytes": "72385" } ], "symlink_target": "" }
package rpcpb import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" emptypb "google.golang.org/protobuf/types/known/emptypb" ) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 // AllowlistsClient is the client API for Allowlists service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type AllowlistsClient interface { // ListAllowlists returns all the allowlists currently stored in LUCI Auth // service datastore. The allowlists will be returned in alphabetical order // based on their ID. ListAllowlists(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListAllowlistsResponse, error) // GetAllowlist returns Allowlist information for a requested Allowlist. GetAllowlist(ctx context.Context, in *GetAllowlistRequest, opts ...grpc.CallOption) (*Allowlist, error) } type allowlistsClient struct { cc grpc.ClientConnInterface } func NewAllowlistsClient(cc grpc.ClientConnInterface) AllowlistsClient { return &allowlistsClient{cc} } func (c *allowlistsClient) ListAllowlists(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListAllowlistsResponse, error) { out := new(ListAllowlistsResponse) err := c.cc.Invoke(ctx, "/auth.service.Allowlists/ListAllowlists", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *allowlistsClient) GetAllowlist(ctx context.Context, in *GetAllowlistRequest, opts ...grpc.CallOption) (*Allowlist, error) { out := new(Allowlist) err := c.cc.Invoke(ctx, "/auth.service.Allowlists/GetAllowlist", in, out, opts...) if err != nil { return nil, err } return out, nil } // AllowlistsServer is the server API for Allowlists service. // All implementations must embed UnimplementedAllowlistsServer // for forward compatibility type AllowlistsServer interface { // ListAllowlists returns all the allowlists currently stored in LUCI Auth // service datastore. The allowlists will be returned in alphabetical order // based on their ID. ListAllowlists(context.Context, *emptypb.Empty) (*ListAllowlistsResponse, error) // GetAllowlist returns Allowlist information for a requested Allowlist. GetAllowlist(context.Context, *GetAllowlistRequest) (*Allowlist, error) mustEmbedUnimplementedAllowlistsServer() } // UnimplementedAllowlistsServer must be embedded to have forward compatible implementations. type UnimplementedAllowlistsServer struct { } func (UnimplementedAllowlistsServer) ListAllowlists(context.Context, *emptypb.Empty) (*ListAllowlistsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListAllowlists not implemented") } func (UnimplementedAllowlistsServer) GetAllowlist(context.Context, *GetAllowlistRequest) (*Allowlist, error) { return nil, status.Errorf(codes.Unimplemented, "method GetAllowlist not implemented") } func (UnimplementedAllowlistsServer) mustEmbedUnimplementedAllowlistsServer() {} // UnsafeAllowlistsServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to AllowlistsServer will // result in compilation errors. type UnsafeAllowlistsServer interface { mustEmbedUnimplementedAllowlistsServer() } func RegisterAllowlistsServer(s grpc.ServiceRegistrar, srv AllowlistsServer) { s.RegisterService(&Allowlists_ServiceDesc, srv) } func _Allowlists_ListAllowlists_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(emptypb.Empty) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AllowlistsServer).ListAllowlists(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/auth.service.Allowlists/ListAllowlists", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AllowlistsServer).ListAllowlists(ctx, req.(*emptypb.Empty)) } return interceptor(ctx, in, info, handler) } func _Allowlists_GetAllowlist_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetAllowlistRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AllowlistsServer).GetAllowlist(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/auth.service.Allowlists/GetAllowlist", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AllowlistsServer).GetAllowlist(ctx, req.(*GetAllowlistRequest)) } return interceptor(ctx, in, info, handler) } // Allowlists_ServiceDesc is the grpc.ServiceDesc for Allowlists service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var Allowlists_ServiceDesc = grpc.ServiceDesc{ ServiceName: "auth.service.Allowlists", HandlerType: (*AllowlistsServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ListAllowlists", Handler: _Allowlists_ListAllowlists_Handler, }, { MethodName: "GetAllowlist", Handler: _Allowlists_GetAllowlist_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "go.chromium.org/luci/auth_service/api/rpcpb/allowlists.proto", }
{ "content_hash": "2c86b25541a2799244b30498da61e8b7", "timestamp": "", "source": "github", "line_count": 144, "max_line_length": 170, "avg_line_length": 38.90277777777778, "alnum_prop": 0.7656194216351303, "repo_name": "luci/luci-go", "id": "5364ca6d16ecafd24011ecaf801ce63201e0dc51", "size": "5805", "binary": false, "copies": "2", "ref": "refs/heads/main", "path": "auth_service/api/rpcpb/allowlists_grpc.pb.go", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "25460" }, { "name": "Go", "bytes": "10674259" }, { "name": "HTML", "bytes": "658081" }, { "name": "JavaScript", "bytes": "18433" }, { "name": "Makefile", "bytes": "2862" }, { "name": "Python", "bytes": "49205" }, { "name": "Shell", "bytes": "20986" }, { "name": "TypeScript", "bytes": "110221" } ], "symlink_target": "" }
use std::error::Error; use std::path::PathBuf; use docopt::Docopt; use zeus::project::ZeusProject; static USAGE: &'static str = " Athena's project build system. Usage: zeus new <path> "; #[derive(RustcDecodable, Debug)] struct Flags { arg_path: String } pub fn execute() -> Result<(), Box<Error>> { // Parse in the command line flags let flags: Flags = Docopt::new(USAGE) .and_then(|d| d.decode()) .unwrap_or_else(|e| e.exit()); // Create a new project let path = PathBuf::from(flags.arg_path); try!(ZeusProject::create(path)); return Ok(()); }
{ "content_hash": "d4e0344ddcee3c3d9f319ac1753d4147", "timestamp": "", "source": "github", "line_count": 30, "max_line_length": 45, "avg_line_length": 20, "alnum_prop": 0.6233333333333333, "repo_name": "athena-org/zeus", "id": "863e1ec65cffec5a36be0906263e8109d070fbe0", "size": "1200", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "zeuscli/src/commands/new.rs", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Rust", "bytes": "20550" } ], "symlink_target": "" }
import { defaultLatLng, defaultZoom } from '../reducers/map'; let map; export function initMapService(elementId) { return map = new google.maps.Map(document.getElementById(elementId), { center: defaultLatLng, zoom: defaultZoom }); } export function setCenter(latLng) { map.setCenter(latLng); } export function setZoom(zoom) { map.setZoom(zoom); }
{ "content_hash": "6c4c612c5d98f9b8b3d7b7baf2431c46", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 72, "avg_line_length": 20.38888888888889, "alnum_prop": 0.7193460490463215, "repo_name": "nextinnovation-corp/gacha", "id": "6b5dfb480e9b0853a67b4aead494978274c6ad06", "size": "367", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "client/services/mapService.js", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "15965" }, { "name": "HTML", "bytes": "1137" }, { "name": "JavaScript", "bytes": "100893" } ], "symlink_target": "" }
package sbt import java.io.File import java.net.URI // in all of these, the URI must be resolved and normalized before it is definitive sealed trait Reference sealed trait ResolvedReference extends Reference sealed trait BuildReference extends Reference final case object ThisBuild extends BuildReference final case class BuildRef(build: URI) extends BuildReference with ResolvedReference sealed trait ProjectReference extends Reference final case class ProjectRef(build: URI, project: String) extends ProjectReference with ResolvedReference final case class LocalProject(project: String) extends ProjectReference final case class RootProject(build: URI) extends ProjectReference final case object LocalRootProject extends ProjectReference final case object ThisProject extends ProjectReference object ProjectRef { def apply(base: File, id: String): ProjectRef = ProjectRef(IO toURI base, id) } object RootProject { /** Reference to the root project at 'base'.*/ def apply(base: File): RootProject = RootProject(IO toURI base) } object Reference { def uri(ref: Reference): Option[URI] = ref match { case RootProject(b) => Some(b) case ProjectRef(b, _) => Some(b) case BuildRef(b) => Some(b) case _ => None } implicit def uriToRef(u: URI): ProjectReference = RootProject(u) implicit def fileToRef(f: File): ProjectReference = RootProject(f) implicit def stringToReference(s: String): ProjectReference = LocalProject(s) implicit def projectToRef(p: Project): ProjectReference = LocalProject(p.id) }
{ "content_hash": "5b294abbd0d0fd2c7ef755789fa5a7e9", "timestamp": "", "source": "github", "line_count": 44, "max_line_length": 104, "avg_line_length": 34.59090909090909, "alnum_prop": 0.7877792378449409, "repo_name": "ornicar/xsbt", "id": "5089cd2188da763c40913ea010c688e00659a5ef", "size": "1583", "binary": false, "copies": "1", "ref": "refs/heads/0.10", "path": "main/Reference.scala", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "Java", "bytes": "15304" }, { "name": "Scala", "bytes": "1284881" } ], "symlink_target": "" }
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <app version="1.0"> <name>Code Fetcher</name> <version>1.0.0</version> <release_date>20150910000000</release_date> <coder>Etag</coder> <short_description>Downloads WiiRD codes</short_description> <long_description>Downloads WiiRD codes from www.geckocodes.org</long_description> </app>
{ "content_hash": "4d8289fc3fa8b4dcf399f00803eb4543", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 83, "avg_line_length": 40.44444444444444, "alnum_prop": 0.7087912087912088, "repo_name": "pvrs12/WiiCodeFetcher", "id": "f0cf4023704d014560c716166937505604c6a9ac", "size": "364", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "CodeFetcher/meta.xml", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "7957" }, { "name": "Makefile", "bytes": "5588" } ], "symlink_target": "" }
layout: post title: " Flights booked... " date: 2004-08-23 16:53:00 +0100 comments: true published: true categories: ["blog", "archives"] tags: [] alias: ["/mattsblog/archive/2004/08/23/149.aspx"] --- <!-- more --> <P>Okay. Now i've finally got organised, and I've got a bit more of an idea of what i'm going to be up to for the next&nbsp;few weeks.</P> <P>I've just booked a ticket from London to Edinburgh for the 25th, and organised a booking on the <A href="http://www.macbackpackers.com/macbackpackers/tours/jj.htm">MacBackpackers Jump-on Jump-off bus</A>, so i can wander around Scotland at leisure. I've also booked a ticket from Glasgow to Rome on September 11 <IMG class="emoticon" src="/images/emotions/emotion-8.gif"> to meet up with Old Matt.</P> <P>After that, its onto the wandering through Italy (especially Tuscany) for a while...</P>
{ "content_hash": "2391a191f901cdfb6c58bc23496e260f", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 405, "avg_line_length": 61.07142857142857, "alnum_prop": 0.7228070175438597, "repo_name": "matt-richardson/matt-richardson.github.io", "id": "348ef661f6fad273261a8b5b2190459630b739a0", "size": "859", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "_posts/2004-08-23-149.markdown", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "22438" }, { "name": "HTML", "bytes": "19577" }, { "name": "JavaScript", "bytes": "367" } ], "symlink_target": "" }
module Backend module FormsHelper def is_cover_photo?(media_content, photo) media_content.main_photo_id.present? && media_content.main_photo_id == photo.photo_id end end end
{ "content_hash": "3589a2b707fde0cbeb4665bdc2e79f7b", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 91, "avg_line_length": 27.428571428571427, "alnum_prop": 0.7083333333333334, "repo_name": "Vizzuality/grid-arendal", "id": "b99afaacf54a63a048eaada0997d75043419fdad", "size": "222", "binary": false, "copies": "1", "ref": "refs/heads/develop", "path": "backend/app/helpers/backend/forms_helper.rb", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "236064" }, { "name": "Gherkin", "bytes": "17927" }, { "name": "HTML", "bytes": "27525609" }, { "name": "JavaScript", "bytes": "135270" }, { "name": "Ruby", "bytes": "352657" } ], "symlink_target": "" }
<?php $this->add("/home:GET", function($params, $container) { $this->middleware("BEFORE", "BasicMiddleware", $container); $this->controller("HomeController", "home", $params, $container); $this->middleware("AFTER", "BasicMiddleware", $container); }); $this->run();
{ "content_hash": "d2488d81675ca069a09684f780f5b83a", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 66, "avg_line_length": 38.142857142857146, "alnum_prop": 0.6779026217228464, "repo_name": "DilawskyJordan/hydrogenframework", "id": "5738bae02c6b253104b055d25a9e00ac2a26861d", "size": "267", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/app/http/routes.php", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "22" }, { "name": "PHP", "bytes": "44623" } ], "symlink_target": "" }
// ReRap Version 0.9 // Copyright 2011 Matthew Mikolay. // // This file is part of ReRap. // // ReRap is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // ReRap is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with ReRap. If not, see <http://www.gnu.org/licenses/>. #include "exit.h" /*** Constructor ***/ Exit::Exit() { } /*** Execute this node ***/ Outcome Exit::execute() { return Outcome(S_EXIT); } /*** Destructor ***/ Exit::~Exit() { }
{ "content_hash": "2d10414e627d496f55b7ea2f71f48066", "timestamp": "", "source": "github", "line_count": 35, "max_line_length": 71, "avg_line_length": 25.685714285714287, "alnum_prop": 0.7007786429365962, "repo_name": "sergev/vak-opensource", "id": "c4a2d42e2268a285a6404012cdd7b72ef804dfc1", "size": "899", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "languages/rapira/statements/exit.cpp", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "1C Enterprise", "bytes": "389" }, { "name": "APL", "bytes": "177" }, { "name": "Ada", "bytes": "4425" }, { "name": "Assembly", "bytes": "2089449" }, { "name": "Awk", "bytes": "221" }, { "name": "BASIC", "bytes": "2604" }, { "name": "Batchfile", "bytes": "3032" }, { "name": "C", "bytes": "20925647" }, { "name": "C#", "bytes": "986" }, { "name": "C++", "bytes": "2614423" }, { "name": "CMake", "bytes": "6854" }, { "name": "COBOL", "bytes": "476314" }, { "name": "Common Lisp", "bytes": "10559" }, { "name": "D", "bytes": "15701" }, { "name": "DIGITAL Command Language", "bytes": "1965" }, { "name": "Dart", "bytes": "1266" }, { "name": "Erlang", "bytes": "377" }, { "name": "F#", "bytes": "4942" }, { "name": "Forth", "bytes": "18207" }, { "name": "Fortran", "bytes": "292582" }, { "name": "GDB", "bytes": "809" }, { "name": "Gnuplot", "bytes": "8810" }, { "name": "Go", "bytes": "84054" }, { "name": "HTML", "bytes": "257212" }, { "name": "Haskell", "bytes": "14698" }, { "name": "Java", "bytes": "246738" }, { "name": "JavaScript", "bytes": "24526" }, { "name": "Julia", "bytes": "2285" }, { "name": "Kotlin", "bytes": "1114" }, { "name": "LLVM", "bytes": "2420" }, { "name": "Lex", "bytes": "24747" }, { "name": "Limbo", "bytes": "27127" }, { "name": "M", "bytes": "441" }, { "name": "MATLAB", "bytes": "6132" }, { "name": "Makefile", "bytes": "480896" }, { "name": "Meson", "bytes": "701" }, { "name": "Modula-2", "bytes": "112" }, { "name": "Module Management System", "bytes": "8062" }, { "name": "Nim", "bytes": "399" }, { "name": "Objective-C", "bytes": "10342" }, { "name": "PHP", "bytes": "36349" }, { "name": "Pascal", "bytes": "92870" }, { "name": "Pawn", "bytes": "501" }, { "name": "Perl", "bytes": "126464" }, { "name": "Processing", "bytes": "29556" }, { "name": "Python", "bytes": "145601" }, { "name": "QMake", "bytes": "1659" }, { "name": "RPC", "bytes": "2644" }, { "name": "Roff", "bytes": "73949" }, { "name": "Ruby", "bytes": "315" }, { "name": "Rust", "bytes": "18231" }, { "name": "SWIG", "bytes": "3784" }, { "name": "Scala", "bytes": "870" }, { "name": "Scheme", "bytes": "47093" }, { "name": "Scilab", "bytes": "34671" }, { "name": "Shell", "bytes": "41264" }, { "name": "Swift", "bytes": "1486" }, { "name": "SystemVerilog", "bytes": "22907" }, { "name": "Tcl", "bytes": "57048" }, { "name": "TypeScript", "bytes": "57" }, { "name": "V", "bytes": "2495" }, { "name": "VBA", "bytes": "180" }, { "name": "VHDL", "bytes": "469591" }, { "name": "Verilog", "bytes": "1610969" }, { "name": "XProc", "bytes": "87892" }, { "name": "Yacc", "bytes": "170392" }, { "name": "sed", "bytes": "252" } ], "symlink_target": "" }
package com.pyler.xinstaller; import android.content.Context; import android.preference.SwitchPreference; import android.util.AttributeSet; import android.view.View; import android.view.ViewGroup; import android.widget.Switch; /** * Fixes bugs involving multiple SwitchPreference instances, esp. * OnPreferenceChangeListeners. * * {@see https://code.google.com/p/android/issues/detail?id=26194} */ public class CustomSwitchPreference extends SwitchPreference { /** * Construct a new SwitchPreference with the given style options. * * @param context * The Context that will style this preference * @param attrs * Style attributes that differ from the default * @param defStyle * Theme attribute defining the default style options */ public CustomSwitchPreference(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } /** * Construct a new SwitchPreference with the given style options. * * @param context * The Context that will style this preference * @param attrs * Style attributes that differ from the default */ public CustomSwitchPreference(Context context, AttributeSet attrs) { super(context, attrs); } /** * Construct a new SwitchPreference with default style options. * * @param context * The Context that will style this preference */ public CustomSwitchPreference(Context context) { super(context, null); } @Override protected void onBindView(View view) { // Clean listener before invoke SwitchPreference.onBindView ViewGroup viewGroup = (ViewGroup) view; clearListenerInViewGroup(viewGroup); super.onBindView(view); } /** * Clear listener in Switch for specify ViewGroup. * * @param viewGroup * The ViewGroup that will need to clear the listener. */ private void clearListenerInViewGroup(ViewGroup viewGroup) { if (null == viewGroup) { return; } int count = viewGroup.getChildCount(); for (int n = 0; n < count; ++n) { View childView = viewGroup.getChildAt(n); if (childView instanceof Switch) { final Switch switchView = (Switch) childView; switchView.setOnCheckedChangeListener(null); return; } else if (childView instanceof ViewGroup) { ViewGroup childGroup = (ViewGroup) childView; clearListenerInViewGroup(childGroup); } } } }
{ "content_hash": "0ffdc6f513287f357a3fba5837a6f5a1", "timestamp": "", "source": "github", "line_count": 87, "max_line_length": 69, "avg_line_length": 27.60919540229885, "alnum_prop": 0.7081598667776853, "repo_name": "easyaspi314/XInstaller", "id": "138a5d3b4078bc6900c421c3711506ee0f3e2f08", "size": "2402", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "src/com/pyler/xinstaller/CustomSwitchPreference.java", "mode": "33188", "license": "bsd-2-clause", "language": [ { "name": "HTML", "bytes": "87368" }, { "name": "Java", "bytes": "98424" } ], "symlink_target": "" }
namespace AggregateMetrics.Tests.One { using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml; using System.Xml.Serialization; /// <summary> /// ALT Perf System .perfdata compatible Xml class /// </summary> [XmlRoot(ElementName = "ScenarioResults")] public class PerfData { public ScenarioResult ScenarioResult { get; set; } [XmlIgnore] public string Name { get; set; } public string WriteXml(string dropPath) { string xmlPath = Path.Combine(dropPath, String.Format(CultureInfo.CurrentCulture, "PerfResults_{0}.perfdata", this.Name)); using (XmlTextWriter xmlTextWriter = new XmlTextWriter(xmlPath, Encoding.UTF8)) { xmlTextWriter.Formatting = Formatting.Indented; XmlSerializer serializer = new XmlSerializer(typeof(PerfData)); serializer.Serialize(xmlTextWriter, this); } return xmlPath; } } [Serializable] public class ScenarioResult { [XmlAttribute] public string Name { get; set; } public List<CounterResult> CounterResults { get; set; } } [Serializable] public class CounterResult { [XmlAttribute] public string Name { get; set; } [XmlAttribute] public string Units { get; set; } [XmlAttribute] public bool Default { get; set; } [XmlAttribute] public bool Top { get; set; } [XmlText] public string Value { get; set; } } }
{ "content_hash": "4cdc7fab861b21d629b1dbd466bf9f0a", "timestamp": "", "source": "github", "line_count": 66, "max_line_length": 134, "avg_line_length": 25.227272727272727, "alnum_prop": 0.5987987987987988, "repo_name": "frackleton/ApplicationInsights-SDK-Labs", "id": "a42ccb12c1ed170cfb7bbe3c9ebc125c44651b7e", "size": "1667", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "AggregateMetrics/AggregateMetrics.Tests/One/PerfData.cs", "mode": "33188", "license": "mit", "language": [ { "name": "Batchfile", "bytes": "548" }, { "name": "C#", "bytes": "269742" } ], "symlink_target": "" }
namespace System.IO.Compression { public enum CompressionLevel { Fastest = 1, NoCompression = 2, Optimal = 0, } public enum CompressionMode { Compress = 1, Decompress = 0, } public partial class DeflateStream : System.IO.Stream { public DeflateStream(System.IO.Stream stream, System.IO.Compression.CompressionLevel compressionLevel) { } public DeflateStream(System.IO.Stream stream, System.IO.Compression.CompressionLevel compressionLevel, bool leaveOpen) { } public DeflateStream(System.IO.Stream stream, System.IO.Compression.CompressionMode mode) { } public DeflateStream(System.IO.Stream stream, System.IO.Compression.CompressionMode mode, bool leaveOpen) { } public System.IO.Stream BaseStream { get { throw null; } } public override bool CanRead { get { throw null; } } public override bool CanSeek { get { throw null; } } public override bool CanWrite { get { throw null; } } public override long Length { get { throw null; } } public override long Position { get { throw null; } set { } } public override System.IAsyncResult BeginRead(byte[] buffer, int offset, int count, System.AsyncCallback asyncCallback, object asyncState) { throw null; } public override System.IAsyncResult BeginWrite(byte[] array, int offset, int count, System.AsyncCallback asyncCallback, object asyncState) { throw null; } public override void CopyTo(System.IO.Stream destination, int bufferSize) { } public override System.Threading.Tasks.Task CopyToAsync(System.IO.Stream destination, int bufferSize, System.Threading.CancellationToken cancellationToken) { throw null; } protected override void Dispose(bool disposing) { } public override System.Threading.Tasks.ValueTask DisposeAsync() { throw null; } public override int EndRead(System.IAsyncResult asyncResult) { throw null; } public override void EndWrite(System.IAsyncResult asyncResult) { } public override void Flush() { } public override System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken) { throw null; } public override int Read(byte[] array, int offset, int count) { throw null; } public override int Read(System.Span<byte> buffer) { throw null; } public override System.Threading.Tasks.Task<int> ReadAsync(byte[] array, int offset, int count, System.Threading.CancellationToken cancellationToken) { throw null; } public override System.Threading.Tasks.ValueTask<int> ReadAsync(System.Memory<byte> buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public override int ReadByte() { throw null; } public override long Seek(long offset, System.IO.SeekOrigin origin) { throw null; } public override void SetLength(long value) { } public override void Write(byte[] array, int offset, int count) { } public override void Write(System.ReadOnlySpan<byte> buffer) { } public override System.Threading.Tasks.Task WriteAsync(byte[] array, int offset, int count, System.Threading.CancellationToken cancellationToken) { throw null; } public override System.Threading.Tasks.ValueTask WriteAsync(System.ReadOnlyMemory<byte> buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class GZipStream : System.IO.Stream { public GZipStream(System.IO.Stream stream, System.IO.Compression.CompressionLevel compressionLevel) { } public GZipStream(System.IO.Stream stream, System.IO.Compression.CompressionLevel compressionLevel, bool leaveOpen) { } public GZipStream(System.IO.Stream stream, System.IO.Compression.CompressionMode mode) { } public GZipStream(System.IO.Stream stream, System.IO.Compression.CompressionMode mode, bool leaveOpen) { } public System.IO.Stream BaseStream { get { throw null; } } public override bool CanRead { get { throw null; } } public override bool CanSeek { get { throw null; } } public override bool CanWrite { get { throw null; } } public override long Length { get { throw null; } } public override long Position { get { throw null; } set { } } public override System.IAsyncResult BeginRead(byte[] array, int offset, int count, System.AsyncCallback asyncCallback, object asyncState) { throw null; } public override System.IAsyncResult BeginWrite(byte[] array, int offset, int count, System.AsyncCallback asyncCallback, object asyncState) { throw null; } public override void CopyTo(System.IO.Stream destination, int bufferSize) { } public override System.Threading.Tasks.Task CopyToAsync(System.IO.Stream destination, int bufferSize, System.Threading.CancellationToken cancellationToken) { throw null; } protected override void Dispose(bool disposing) { } public override System.Threading.Tasks.ValueTask DisposeAsync() { throw null; } public override int EndRead(System.IAsyncResult asyncResult) { throw null; } public override void EndWrite(System.IAsyncResult asyncResult) { } public override void Flush() { } public override System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken) { throw null; } public override int Read(byte[] array, int offset, int count) { throw null; } public override int Read(System.Span<byte> buffer) { throw null; } public override System.Threading.Tasks.Task<int> ReadAsync(byte[] array, int offset, int count, System.Threading.CancellationToken cancellationToken) { throw null; } public override System.Threading.Tasks.ValueTask<int> ReadAsync(System.Memory<byte> buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public override int ReadByte() { throw null; } public override long Seek(long offset, System.IO.SeekOrigin origin) { throw null; } public override void SetLength(long value) { } public override void Write(byte[] array, int offset, int count) { } public override void Write(System.ReadOnlySpan<byte> buffer) { } public override System.Threading.Tasks.Task WriteAsync(byte[] array, int offset, int count, System.Threading.CancellationToken cancellationToken) { throw null; } public override System.Threading.Tasks.ValueTask WriteAsync(System.ReadOnlyMemory<byte> buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class ZipArchive : System.IDisposable { public ZipArchive(System.IO.Stream stream) { } public ZipArchive(System.IO.Stream stream, System.IO.Compression.ZipArchiveMode mode) { } public ZipArchive(System.IO.Stream stream, System.IO.Compression.ZipArchiveMode mode, bool leaveOpen) { } public ZipArchive(System.IO.Stream stream, System.IO.Compression.ZipArchiveMode mode, bool leaveOpen, System.Text.Encoding entryNameEncoding) { } public System.Collections.ObjectModel.ReadOnlyCollection<System.IO.Compression.ZipArchiveEntry> Entries { get { throw null; } } public System.IO.Compression.ZipArchiveMode Mode { get { throw null; } } public System.IO.Compression.ZipArchiveEntry CreateEntry(string entryName) { throw null; } public System.IO.Compression.ZipArchiveEntry CreateEntry(string entryName, System.IO.Compression.CompressionLevel compressionLevel) { throw null; } public void Dispose() { } protected virtual void Dispose(bool disposing) { } public System.IO.Compression.ZipArchiveEntry GetEntry(string entryName) { throw null; } } public partial class ZipArchiveEntry { internal ZipArchiveEntry() { } public System.IO.Compression.ZipArchive Archive { get { throw null; } } public long CompressedLength { get { throw null; } } [System.CLSCompliantAttribute(false)] public uint Crc32 { get { throw null; } } public int ExternalAttributes { get { throw null; } set { } } public string FullName { get { throw null; } } public System.DateTimeOffset LastWriteTime { get { throw null; } set { } } public long Length { get { throw null; } } public string Name { get { throw null; } } public void Delete() { } public System.IO.Stream Open() { throw null; } public override string ToString() { throw null; } } public enum ZipArchiveMode { Create = 1, Read = 0, Update = 2, } }
{ "content_hash": "96a1ff838f2082e876e38ad99df801ee", "timestamp": "", "source": "github", "line_count": 118, "max_line_length": 219, "avg_line_length": 74.80508474576271, "alnum_prop": 0.7130395377818058, "repo_name": "ptoonen/corefx", "id": "a705e0eaf740092bd76029014c7bc90052b35ed4", "size": "9269", "binary": false, "copies": "11", "ref": "refs/heads/master", "path": "src/System.IO.Compression/ref/System.IO.Compression.cs", "mode": "33188", "license": "mit", "language": [ { "name": "1C Enterprise", "bytes": "903" }, { "name": "ASP", "bytes": "1687" }, { "name": "Batchfile", "bytes": "23817" }, { "name": "C", "bytes": "1113487" }, { "name": "C#", "bytes": "132263251" }, { "name": "C++", "bytes": "710534" }, { "name": "CMake", "bytes": "62807" }, { "name": "DIGITAL Command Language", "bytes": "26402" }, { "name": "Groovy", "bytes": "34573" }, { "name": "HTML", "bytes": "653" }, { "name": "Makefile", "bytes": "9085" }, { "name": "Objective-C", "bytes": "9948" }, { "name": "OpenEdge ABL", "bytes": "139178" }, { "name": "Perl", "bytes": "3895" }, { "name": "PowerShell", "bytes": "42677" }, { "name": "Python", "bytes": "1535" }, { "name": "Roff", "bytes": "4236" }, { "name": "Shell", "bytes": "71283" }, { "name": "Visual Basic", "bytes": "827869" }, { "name": "XSLT", "bytes": "462336" } ], "symlink_target": "" }
package com.martinet.emplitude.Schelude; import com.martinet.emplitude.Models.Lesson; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.TimeZone; import java.util.regex.Matcher; import java.util.regex.Pattern; public class ScheduleExtractor { private static SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd'T'HHmmss'Z'"); //Récupération toutes les cours par date public static List<Lesson> parse(String contenu) throws ParseException { dateFormat.setTimeZone(TimeZone.getTimeZone("Europe/France")); String[] parts = contenu.split(Pattern.quote("BEGIN:VEVENT")); String oneLesson; List<Lesson> lessons = new ArrayList<>(); for (String part : parts) { oneLesson = element(part, "DTSTART:(.)+", "DTSTART:"); if (!"".equals(oneLesson)) { lessons.add(getLesson(part)); } } return lessons.isEmpty() ? null : lessons; } //Récupere les informations d'un element private static String element(String chaine, String pattern, String split){ String res= ""; Pattern p = Pattern.compile(pattern); Matcher m = p.matcher(chaine); if(m.find()) { res = m.group(0); res = res.split(split)[1]; } return res; } //Récupere les informations d'un element multiple ligne private static String elementMulti(String chaine, String pattern, String split){ String res= ""; Pattern p = Pattern.compile(pattern, Pattern.DOTALL); Matcher m = p.matcher(chaine); if(m.find()) { res = m.group(0); res = res.split(split)[1]; } return res; } private static Lesson getLesson(String contenu) throws ParseException { String summary = element(contenu, "SUMMARY:(.)+", "SUMMARY:"); //Récupère le sommaire du cours String location = element(contenu, "LOCATION:(.)+", "LOCATION:"); //Récupère la location du cours Date endDate = dateFormat.parse(element(contenu, "DTSTART:(.)+", "DTSTART:")); //Récuperation de la date du début du cours Date beginDate = dateFormat.parse(element(contenu, "DTEND:(.)+", "DTEND:")); //Récuperation de la date de fin du cours String description = elementMulti(contenu, "DESCRIPTION:(.)+", "DESCRIPTION:"); //Récupère la description du cours Lesson lesson = new Lesson(summary, null, endDate, beginDate, null, location); if(description.contains("Matière :") || description.contains("Salle :") || description.contains("Personnel :")) { return PatternWithField.getDescription(lesson, description); } else { return PatternWithoutField.getDescription(lesson, description); } } /** * Created by martinet on 21/08/16. */ public static class PatternWithField { private final static String FIELD_DISCIPLINE = "Matière :"; private final static String FIELD_PERSONNEL = "Personnel :"; private final static String FIELD_NOTE = "Remarques :"; private final static String FIELD_GROUP = "Groupe :"; public static Lesson getDescription(Lesson lesson, String description) { String teacher = null, discipline = null; String[] splits = description.split("\\\\n"); for(String split:splits){ split=split.trim(); if(split.contains(FIELD_DISCIPLINE)) { discipline = split.replace(FIELD_DISCIPLINE, "").trim(); } if(split.contains(FIELD_NOTE)) { lesson.setNote(split.replace(FIELD_NOTE, "").trim()); } if(split.contains(FIELD_GROUP)) { lesson.setGroup(split.replace(FIELD_GROUP, "").trim()); } if(split.contains(FIELD_PERSONNEL)) { teacher = split.replace(FIELD_PERSONNEL, "").trim().replaceAll("\\\\", ""); String[] teachers = teacher.split(","); teacher =""; for(int i=0; i<teachers.length; i++) { teacher += i%2 == 0 || i == teachers.length-1 ? teachers[i] : teachers[i] + ","; } } } lesson.setPersonnel(teacher); lesson.setDiscipline(discipline); return lesson; } } /** * Created by martinet on 21/08/16. */ public static class PatternWithoutField { public static Lesson getDescription(Lesson lesson, String description) { String teacher, discipline = null; //Nettoyage du champs description String[] splits = description.split("\n"); description=""; for(String split:splits){ split=split.trim(); description +=split; } description = description.split("\\\\n[(][Exporté]")[0]; String[] fields = description.split("\\\\n"); Pattern teacherPattern = Pattern.compile("[A-Z]{3,}"); Matcher matcher; Boolean fini = false; int k = fields.length-2; teacher =fields[k+1]; //Récupère le premier prof while(k>1 && !fini){ matcher=teacherPattern.matcher(fields[k]); if(matcher.find()) { //Si il y a plusieurs prof pour le cours teacher +=", "+fields[k]; }else{ fini = true; //Pattern de récuperation de la matière teacherPattern = Pattern.compile("[A-Z]"); matcher=teacherPattern.matcher(fields[k]); if(matcher.find()) { discipline = fields[k]; }else{ discipline = fields[k-1]; } } k--; } lesson.setPersonnel(teacher); lesson.setDiscipline(discipline); return lesson; } } }
{ "content_hash": "a42f5531917f3be8fbe31937c8f8d345", "timestamp": "", "source": "github", "line_count": 163, "max_line_length": 137, "avg_line_length": 38.466257668711656, "alnum_prop": 0.5535885167464115, "repo_name": "swimaf/empli-tude", "id": "13e481e06a78fd0de0a596ab0643be1b823f711a", "size": "6290", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "app/src/main/java/com/martinet/emplitude/Schelude/ScheduleExtractor.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "195439" } ], "symlink_target": "" }
//------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:4.0.30319.18034 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ namespace AnimConverter.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); public static Settings Default { get { return defaultInstance; } } } }
{ "content_hash": "a3c562bedf6a2950706c6c50be09c180", "timestamp": "", "source": "github", "line_count": 26, "max_line_length": 151, "avg_line_length": 41.07692307692308, "alnum_prop": 0.5823970037453183, "repo_name": "RegrowthStudios/VoxelRTS", "id": "d196a9a0526730d68def4f9a3d2cc16855735831", "size": "1070", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "RTSGame/AnimConverter/Properties/Settings.Designer.cs", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C#", "bytes": "2628900" }, { "name": "FLUX", "bytes": "19012" }, { "name": "Python", "bytes": "2212" } ], "symlink_target": "" }
package org.elasticsearch.http; import org.elasticsearch.rest.RestChannel; import org.elasticsearch.rest.RestRequest; /** * */ public interface HttpServerAdapter { void dispatchRequest(RestRequest request, RestChannel channel); }
{ "content_hash": "b2888c64e611e6516373d6fd8538fb0d", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 67, "avg_line_length": 17.214285714285715, "alnum_prop": 0.7800829875518672, "repo_name": "strapdata/elassandra-test", "id": "f6d7d6ba348d6529931e4b6a61617fbc60a5d5ba", "size": "1029", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "core/src/main/java/org/elasticsearch/http/HttpServerAdapter.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "8633" }, { "name": "Emacs Lisp", "bytes": "3243" }, { "name": "Groovy", "bytes": "510" }, { "name": "HTML", "bytes": "3624" }, { "name": "Java", "bytes": "30401493" }, { "name": "Perl", "bytes": "251517" }, { "name": "Perl6", "bytes": "103207" }, { "name": "Python", "bytes": "95032" }, { "name": "Ruby", "bytes": "17776" }, { "name": "Shell", "bytes": "104621" } ], "symlink_target": "" }
<div class="body-wrap"> <div class="top-tools"> <a class="inner-link" href="#Ext.state.Provider-props"><img src="../resources/images/default/s.gif" class="item-icon icon-prop">Properties</a> <a class="inner-link" href="#Ext.state.Provider-methods"><img src="../resources/images/default/s.gif" class="item-icon icon-method">Methods</a> <a class="inner-link" href="#Ext.state.Provider-events"><img src="../resources/images/default/s.gif" class="item-icon icon-event">Events</a> <a class="bookmark" href="../docs/?class=Ext.state.Provider"><img src="../resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a> </div> <h1>Class Ext.state.Provider</h1> <table cellspacing="0"> <tr><td class="label">Package:</td><td class="hd-info">Ext.state</td></tr> <tr><td class="label">Defined In:</td><td class="hd-info"><a href="../source/state/Provider.js" target="_blank">Provider.js</a></td></tr> <tr><td class="label">Class:</td><td class="hd-info">Provider</td></tr> <tr><td class="label">Subclasses:</td><td class="hd-info"><a ext:cls="Ext.air.FileProvider" href="output/Ext.air.FileProvider.html">FileProvider</a>, <a ext:cls="Ext.state.CookieProvider" href="output/Ext.state.CookieProvider.html">CookieProvider</a></td></tr> <tr><td class="label">Extends:</td><td class="hd-info">Object</td></tr> </table> <div class="description"> Abstract base class for state provider implementations. This class provides methods for encoding and decoding <b>typed</b> variables including dates and defines the Provider interface. </div> <div class="hr"></div> <a id="Ext.state.Provider-props"></a> <h2>Public Properties</h2> <div class="no-members">This class has no public properties.</div> <a id="Ext.state.Provider-methods"></a> <h2>Public Methods</h2> <table cellspacing="0" class="member-table"> <tr> <th class="sig-header" colspan="2">Method</th> <th class="msource-header">Defined By</th> </tr> <tr class="method-row expandable"> <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td> <td class="sig"> <a id="Ext.state.Provider-clear"></a> <b>clear</b>(&nbsp;<code>String name</code>&nbsp;) : void <div class="mdesc"> <div class="short">Clears a value from the state</div> <div class="long"> Clears a value from the state <div class="mdetail-params"> <strong>Parameters:</strong> <ul><li><code>name</code> : String<div class="sub-desc">The key name</div></li> </ul> <strong>Returns:</strong> <ul> <li><code>void</code></li> </ul> </div> </div> </div> </td> <td class="msource">Provider</td> </tr> <tr class="method-row alt expandable"> <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td> <td class="sig"> <a id="Ext.state.Provider-decodeValue"></a> <b>decodeValue</b>(&nbsp;<code>String value</code>&nbsp;) : Mixed <div class="mdesc"> <div class="short">Decodes a string previously encoded with <a ext:cls="Ext.state.Provider" ext:member="encodeValue" href="output/Ext.state.Provider.html#encodeValue">encodeValue</a>.</div> <div class="long"> Decodes a string previously encoded with <a ext:cls="Ext.state.Provider" ext:member="encodeValue" href="output/Ext.state.Provider.html#encodeValue">encodeValue</a>. <div class="mdetail-params"> <strong>Parameters:</strong> <ul><li><code>value</code> : String<div class="sub-desc">The value to decode</div></li> </ul> <strong>Returns:</strong> <ul> <li><code>Mixed</code><div class="sub-desc">The decoded value</div></li> </ul> </div> </div> </div> </td> <td class="msource">Provider</td> </tr> <tr class="method-row expandable"> <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td> <td class="sig"> <a id="Ext.state.Provider-encodeValue"></a> <b>encodeValue</b>(&nbsp;<code>Mixed value</code>&nbsp;) : String <div class="mdesc"> <div class="short">Encodes a value including type information. Decode with <a ext:cls="Ext.state.Provider" ext:member="decodeValue" href="output/Ext.state.Provider.html#decodeValue">decodeValue</a>.</div> <div class="long"> Encodes a value including type information. Decode with <a ext:cls="Ext.state.Provider" ext:member="decodeValue" href="output/Ext.state.Provider.html#decodeValue">decodeValue</a>. <div class="mdetail-params"> <strong>Parameters:</strong> <ul><li><code>value</code> : Mixed<div class="sub-desc">The value to encode</div></li> </ul> <strong>Returns:</strong> <ul> <li><code>String</code><div class="sub-desc">The encoded value</div></li> </ul> </div> </div> </div> </td> <td class="msource">Provider</td> </tr> <tr class="method-row alt expandable"> <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td> <td class="sig"> <a id="Ext.state.Provider-get"></a> <b>get</b>(&nbsp;<code>String name</code>, <code>Mixed defaultValue</code>&nbsp;) : Mixed <div class="mdesc"> <div class="short">Returns the current value for a key</div> <div class="long"> Returns the current value for a key <div class="mdetail-params"> <strong>Parameters:</strong> <ul><li><code>name</code> : String<div class="sub-desc">The key name</div></li><li><code>defaultValue</code> : Mixed<div class="sub-desc">A default value to return if the key's value is not found</div></li> </ul> <strong>Returns:</strong> <ul> <li><code>Mixed</code><div class="sub-desc">The state data</div></li> </ul> </div> </div> </div> </td> <td class="msource">Provider</td> </tr> <tr class="method-row expandable"> <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td> <td class="sig"> <a id="Ext.state.Provider-set"></a> <b>set</b>(&nbsp;<code>String name</code>, <code>Mixed value</code>&nbsp;) : void <div class="mdesc"> <div class="short">Sets the value for a key</div> <div class="long"> Sets the value for a key <div class="mdetail-params"> <strong>Parameters:</strong> <ul><li><code>name</code> : String<div class="sub-desc">The key name</div></li><li><code>value</code> : Mixed<div class="sub-desc">The value to set</div></li> </ul> <strong>Returns:</strong> <ul> <li><code>void</code></li> </ul> </div> </div> </div> </td> <td class="msource">Provider</td> </tr> </table> <a id="Ext.state.Provider-events"></a> <h2>Public Events</h2> <table cellspacing="0" class="member-table"> <tr> <th class="sig-header" colspan="2">Event</th> <th class="msource-header">Defined By</th> </tr> <tr class="event-row expandable"> <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td> <td class="sig"> <a id="Ext.state.Provider-statechange"></a> <b>statechange</b> : (&nbsp;<code>Provider this</code>, <code>String key</code>, <code>String value</code>&nbsp;) <div class="mdesc"> <div class="short">Fires when a state change occurs.</div> <div class="long"> Fires when a state change occurs. <div class="mdetail-params"> <strong style="font-weight:normal;">Listeners will be called with the following arguments:</strong> <ul><li><code>this</code> : Provider<div class="sub-desc">This state provider</div></li><li><code>key</code> : String<div class="sub-desc">The state key which was changed</div></li><li><code>value</code> : String<div class="sub-desc">The encoded value for the state</div></li> </ul> </div> </div> </div> </td> <td class="msource">Provider</td> </tr> </table> </div>
{ "content_hash": "4321b5189b84c04c3fa1eb025522d6ea", "timestamp": "", "source": "github", "line_count": 157, "max_line_length": 297, "avg_line_length": 57.27388535031847, "alnum_prop": 0.5429270462633452, "repo_name": "grasscrm/gdesigner", "id": "0223492c61ffbe6f78dbe2466834e1b550dd059b", "size": "8992", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "editor/lib/sources/ext-2.0.2/docs/output/Ext.state.Provider.html", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "ASP", "bytes": "92" }, { "name": "CSS", "bytes": "443648" }, { "name": "Java", "bytes": "5464138" }, { "name": "JavaScript", "bytes": "7473190" }, { "name": "PHP", "bytes": "5127" }, { "name": "Python", "bytes": "1965" }, { "name": "Ruby", "bytes": "47049" }, { "name": "Shell", "bytes": "4096" }, { "name": "Visual Basic", "bytes": "1671" }, { "name": "XSLT", "bytes": "488471" } ], "symlink_target": "" }
package com.momia.service; import java.util.List; import com.momia.entity.TopicCrowd; public interface TopicCrowdService { public int insert(TopicCrowd topicCrowd); public void insert(String[] ids,int tid, int flag); public int update(TopicCrowd topicCrowd); public int delete(int id, int flag); public List<TopicCrowd> findTopicCrowds(int tid); }
{ "content_hash": "376b3fca1887398c23883a2c052cdccd", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 52, "avg_line_length": 19.31578947368421, "alnum_prop": 0.7574931880108992, "repo_name": "lovemomia/MomiaAdmin", "id": "6d86e594c856709004aa1e1ec6d653cf406cc0d1", "size": "367", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/main/java/com/momia/service/TopicCrowdService.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "218817" }, { "name": "HTML", "bytes": "87698" }, { "name": "Java", "bytes": "521578" }, { "name": "JavaScript", "bytes": "1510704" }, { "name": "Shell", "bytes": "2136" } ], "symlink_target": "" }
<!DOCTYPE html> <html lang="en-us"> <head> <meta charset="utf-8"> <title>Presentation: Hunting for Treasure in Django | DjangoCon in Austin, TX</title> <meta content="width=device-width, initial-scale=1.0" name="viewport"> <meta content="DjangoCon US 2015 in Austin, TX" property="og:title"/> <meta content="website" property="og:type"/> <meta content="https://2015.djangocon.us/" property="og:url"/> <meta content="DjangoCon US 2015" property="og:site_name"/> <meta content="A six-day not-for-profit by-the-community and for-the-community international conference for the Django web framework. " property="og:description"/> <meta content="https://2015.djangocon.us/site_media/static/images/djangocon-logo-thumb.png" property="og:image"/> <link href="/site_media/static/main.css" media="screen,projection" rel="stylesheet" type="text/css"/> <!-- 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="//oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> <script src="//oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script> <![endif]--> <link href="/site_media/static/images/favicon.ico" rel="shortcut icon"/> <script src="https://cdn.jsdelivr.net/jquery/1.11.2/jquery.min.js"></script> </meta></meta></head> <body class="" id=""> <div class="poster-bg"> <div class="poster-shadow"> <div class="django-sticker"></div> <!-- Fixed navbar --> <div class="navbar-wrapper"> <div class="navbar navbar-default" role="navigation"> <div class="container"> <div class="navbar-header"> <button class="navbar-toggle" data-target=".navbar-collapse" data-toggle="collapse" type="button"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="/"> <img alt="logo" class="img-responsive" src="/site_media/static/images/logo.png" width="180"> </img></a> </div> <div class="navbar-collapse collapse"> <ul class="nav navbar-nav"> <li class="dropdown "> <a class="dropdown-toggle" data-toggle="dropdown" href="/#"> About <b class="caret"></b> </a> <ul class="dropdown-menu" role="menu"> <li role="presentation"> <a href="/about/" role="menuitem">What is Djangocon?</a> </li> <li role="presentation"> <a href="/organizers/" role="menuitem">DjangoCon Organizers</a> </li> <li role="presentation"> <a href="/code_of_conduct/" role="menuitem">Code of Conduct</a> </li> <li role="presentation"> <a href="/diversity/" role="menuitem">Diversity</a> </li> <li role="presentation"> <a href="/accessibility/" role="menuitem">Accessibility</a> </li> <li role="presentation"> <a href="/financial_aid/" role="menuitem">Financial Aid</a> </li> <li role="presentation"> <a href="/childcare/" role="menuitem">Childcare</a> </li> <li role="presentation"> <a href="/volunteers/" role="menuitem">Volunteers</a> </li> <li role="presentation"> <a href="/contact/" role="menuitem">Contact Us</a> </li> </ul> </li> <li class="dropdown "> <a class="dropdown-toggle" data-toggle="dropdown" href="/#"> Schedule <b class="caret"></b> </a> <ul class="dropdown-menu" role="menu"> <li role="presentation"> <a href="/tutorials/list/" role="menuitem">Tutorial Schedule</a> </li> <li role="presentation"> <a href="/general-sessions/" role="menuitem">Talk Schedule</a> </li> <li role="presentation"> <a href="/sprints/" role="menuitem">Sprints</a> </li> <li role="presentation"> <a href="https://djangogirls.org/philadelphia/" role="menuitem">DjangoGirls Austin Workshop</a> </li> <li role="presentation"> <a href="/beginners/" role="menuitem">Beginner's Guide</a> </li> </ul> </li> <li class="dropdown "> <a class="dropdown-toggle" data-toggle="dropdown" href="/#"> Registration <b class="caret"></b> </a> <ul class="dropdown-menu" role="menu"> <li role="presentation"> <a href="/registration/" role="menuitem">Register for DjangoCon US</a> </li> <li role="presentation"> <a href="https://djangogirls.org/philadelphia/apply/" role="menuitem">Register for DjangoGirls Austin Workshop</a> </li> <li role="presentation"> <a href="https://resweb.passkey.com/go/DJANGO0915" role="menuitem">Register for Hotel Accommodations</a> </li> </ul> </li> <li class="dropdown "> <a class="dropdown-toggle" data-toggle="dropdown" href="/#"> Venue <b class="caret"></b> </a> <ul class="dropdown-menu" role="menu"> <li role="presentation"> <a href="/hotels/" role="menuitem">Hotel Accommodations</a> </li> <li role="presentation"> <a href="/travel/" role="menuitem">Travel</a> </li> <li role="presentation"> <a href="/austin/" role="menuitem">City Guide to Austin</a> </li> </ul> </li> <li class="dropdown "> <a class="dropdown-toggle" data-toggle="dropdown" href="/#"> Speaking <b class="caret"></b> </a> <ul class="dropdown-menu" role="menu"> <li role="presentation"> <a href="/speaking/cfp/" role="menuitem">Call For Proposals</a> </li> <li role="presentation"> <a href="/speaking/mentors/" role="menuitem">Speaker Mentors</a> </li> <li role="presentation"> <a href="/lightning_talks/" role="menuitem">Lightning Talks</a> </li> </ul> </li> <li class="dropdown "> <a class="dropdown-toggle" data-toggle="dropdown" href="/#"> Sponsors <b class="caret"></b> </a> <ul class="dropdown-menu" role="menu"> <li role="presentation"> <a href="/become-sponsor/" role="menuitem">Become a Sponsor</a> </li> <li role="presentation"> <a href="/sponsors/" role="menuitem">DjangoCon Sponsors</a> </li> </ul> </li> <li class=" "> <a href="/blog/"> News </a> </li> </ul> <div class="" id="capsules"> <ul class="nav navbar-nav navbar-right"> <li><a href="/account/login/">Log in</a></li> <li><a href="/account/signup/">Sign up</a></li> </ul> </div> <form action="https://2015.djangocon.us/account/logout/" id="accountLogOutForm" method="POST" style="display: none;"> <input name="csrfmiddlewaretoken" type="hidden" value="vKDUxSvBXQum2uTW0DN1QlXrjKdu8pjA"/> </form> </div> <!--/.nav-collapse --> </div> </div> </div> <div class="row small-header"> <div class="container"> <h1 class="brdp"></h1> </div> </div> <div class="row base-row"> <div class="container"> </div> </div> <div class="row base-row"> <div class="page-content container"> <h4> Monday 2:20 p.m.–2:45 p.m. </h4> <h2>Hunting for Treasure in Django</h2> <h4> <a href="/speaker/profile/7/">Sebastian Vetter</a> </h4> <dl class="dl-horizontal"> <dt><h3>Audience level:</h3></dt> <dd style="margin-bottom: 0;">Intermediate</dd> </dl> <h3>Description</h3> <div class="description"><p>We all use Django because it is a framework that simplifies the development of our web apps by providing an implementation of common patterns. Additionally, it also provides a lot of helpers around these implementations that simply our lives even more. This talk will investigate the "hidden" treasures of decorators and functions in Django's core.</p></div> <h3>Abstract</h3> <div class="abstract"><p>Django is a comprehensive web framework that provides well-defined concepts such as request, response, middleware and view that make our lives as perfectionists with deadlines much easier. What many of us are not aware of is the rich collection of utilities and tooling around these concepts that are part of the famework. Decorators, helper functions and context managers that are used internally but can make life as a developer much easier as well. </p> <ul> <li> <p>Introduction (~ 2 mins)</p> <ul> <li>A little bit about me.</li> <li>Why am I talking about this?</li> </ul> </li> <li> <p>Django's Hidden Treasures (~ 4 mins)</p> <ul> <li>The reason for this talks.</li> <li>What do I consider hidden treasures?</li> <li>Which Django modules are interesting?</li> <li>Are they documented and were do I find it?</li> </ul> </li> <li> <p>Examples of hidden treasures:</p> <ul> <li>A quick introduction of the module.</li> <li>What's a possible use case for it?</li> <li>How does it solve it?</li> <li> <p>Where is it used in the Django?</p> </li> <li> <p><code>cached_property</code> (~ 2 mins)</p> </li> <li> <p><code>import_string</code> (~ 2 mins)</p> </li> <li> <p><code>lazy</code>, <code>LazyObject</code> and <code>lazy_property</code> (~ 3 mins)</p> </li> <li> <p><code>decorators</code> module (~ 4 mins)</p> <ul> <li><code>classonlymethod</code></li> <li><code>decorator_from_middleware</code></li> <li><code>update_wrapper</code> and <code>wraps</code> (technically not Django)</li> </ul> </li> <li> <p><code>django.views</code> (~ 4 mins)</p> <ul> <li><code>debug.cleanse_setting</code></li> <li><code>decorators.debug.sensitive_parameters</code></li> <li><code>decorators.debug.sensitive_post_parameters</code></li> </ul> </li> </ul> </li> <li> <p>Wrapping up (~ 2 mins)</p> <ul> <li>Django documentation links.</li> <li>Some suggestions for further investigation.</li> </ul> </li> </ul></div> </div> </div> <div class="row" id="footer"> <div class="mainback"> <div class="turm"> <div class="outer"> <div class="inner"> <div class="container"> <div class="nail nail-bl"></div> <div class="nail nail-br"></div> <div class="col-md-6 col-centered footer-note"> <div class="contact-us">Questions? Comments?</div><a href="/contact/">Contact Us</a><br> Design + Build by <a href="https://www.lincolnloop.com">Lincoln Loop</a> <br/> Hosted on <a href="https://gondor.io">Gondor</a> <br/> Presented by <a href="https://www.defna.org">DEFNA</a> <p>©2016 DjangoCon</p> </br></div> </div> </div> </div> </div> </div> </div> </div> </div> <script charset="utf-8" src="/site_media/static/main.js" type="text/javascript"></script> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-330386-12']); _gaq.push(['_trackPageview']); _gaq.push(['_trackPageLoadTime']); // _gaq.push(['_setCustomVar', 1, 'Authentication Type', ut, 2]); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> </body> </html>
{ "content_hash": "f2281dfc82b4911686489d2b2f3e6ac5", "timestamp": "", "source": "github", "line_count": 325, "max_line_length": 386, "avg_line_length": 32.39076923076923, "alnum_prop": 0.6587821791583547, "repo_name": "djangocon/2015.djangocon.us", "id": "ce31580fb0ea0a52f6e93cf153ecf296935eaa21", "size": "10530", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "_backup/schedule/presentation/69/index.html", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "816042" }, { "name": "HTML", "bytes": "4058071" }, { "name": "JavaScript", "bytes": "830075" }, { "name": "Ruby", "bytes": "1137" } ], "symlink_target": "" }
/** * @file FWApplication.cpp * @author Sebastian Maisch <sebastian.maisch@googlemail.com> * @date 2014.01.21 * * @brief Contains the implementation of FWApplication. */ #include "FWApplication.h" #include "app/GLWindow.h" #include <glm/glm.hpp> namespace cguFrameworkApp { /** * Constructor. * @param window the primary window used for rendering */ FWApplication::FWApplication(cgu::GLWindow& window) : ApplicationBase(window, glm::vec3(0.0f, 0.0f, 10.0f)), fpsText(new cgu::ScreenText(*fontManager->GetResource("Arial"), programManager->GetResource(fontProgramID), "test", glm::vec2(static_cast<float>(window.GetWidth()) - 100.0f, 10.0f), 30.0f)) { // OpenGL stuff glCullFace(GL_BACK); glEnable(GL_CULL_FACE); glEnable(GL_DEPTH_TEST); glDepthFunc(GL_LEQUAL); glFrontFace(GL_CCW); } FWApplication::~FWApplication() { } void FWApplication::FrameMove(float, float elapsed) { static auto fps = 0.0f; static auto accumulatedElapsed = 0.0f; static auto numAvg = 0.0f; accumulatedElapsed += elapsed; numAvg += 1.0f; if (accumulatedElapsed > 0.5f) { fps = numAvg / accumulatedElapsed; accumulatedElapsed = 0.0f; numAvg = 0.0f; } std::stringstream fpsString; fpsString << fps; fpsText->SetText(fpsString.str()); cameraView->UpdateCamera(); } void FWApplication::RenderScene() { win.BatchDraw([&](cgu::GLBatchRenderTarget & rt) { glDepthMask(GL_TRUE); glEnable(GL_DEPTH_TEST); glCullFace(GL_BACK); glEnable(GL_CULL_FACE); float clearColor[4] = { 0.0f, 0.0f, 1.0f, 0.0f }; rt.Clear(static_cast<unsigned int>(cgu::ClearFlags::CF_RenderTarget) | static_cast<unsigned int>(cgu::ClearFlags::CF_Depth), clearColor, 1.0, 0); }); win.BatchDraw([&](cgu::GLBatchRenderTarget & rt) { orthoView->SetView(); // depth of for text / GUI glDepthMask(GL_FALSE); glDisable(GL_DEPTH_TEST); fpsText->Draw(); }); } bool FWApplication::HandleKeyboard(unsigned int vkCode, bool bKeyDown, cgu::BaseGLWindow* sender) { if (ApplicationBase::HandleKeyboard(vkCode, bKeyDown, sender)) return true; if (!IsRunning() || IsPaused()) return false; auto handled = false; return handled; } bool FWApplication::HandleMouseApp(unsigned int, float, cgu::BaseGLWindow*) { return false; } void FWApplication::OnResize(unsigned int width, unsigned int height) { ApplicationBase::OnResize(width, height); auto fWidth = static_cast<float> (width); // auto fHeight = static_cast<float> (height); fpsText->SetPosition(glm::vec2(fWidth - 100.0f, 10.0f)); // auto aspectRatio = fWidth / fHeight; } }
{ "content_hash": "f70fff70b132c5024ccad489ad37cced", "timestamp": "", "source": "github", "line_count": 98, "max_line_length": 157, "avg_line_length": 30.785714285714285, "alnum_prop": 0.5962877030162413, "repo_name": "dasmysh/OGLFramework_uulm", "id": "3e4f43cc8705c26528585dad68e4c24eb963dbb7", "size": "3017", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "OGLFramework_uulm/app/FWApplication.cpp", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "2536" }, { "name": "C++", "bytes": "535936" }, { "name": "Cuda", "bytes": "12606" }, { "name": "GLSL", "bytes": "6353" }, { "name": "Gnuplot", "bytes": "2301" } ], "symlink_target": "" }
ACCEPTED #### According to International Plant Names Index #### Published in null #### Original name null ### Remarks null
{ "content_hash": "5c837a0f2940f9931f629f23370e05a7", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 31, "avg_line_length": 9.692307692307692, "alnum_prop": 0.7063492063492064, "repo_name": "mdoering/backbone", "id": "2063470d3ac29186a50b8c3ce0ea258041802250", "size": "201", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "life/Plantae/Magnoliophyta/Magnoliopsida/Caryophyllales/Cactaceae/Opuntia/Opuntia galapageia/Opuntia galapageia zacana/README.md", "mode": "33188", "license": "apache-2.0", "language": [], "symlink_target": "" }
FILE(REMOVE_RECURSE "CMakeFiles/ekf_localization_node.dir/src/ekf_localization_node.cpp.o" "/home/perdziu/catkin_ws/devel/lib/robot_localization/ekf_localization_node.pdb" "/home/perdziu/catkin_ws/devel/lib/robot_localization/ekf_localization_node" ) # Per-language clean rules from dependency scanning. FOREACH(lang CXX) INCLUDE(CMakeFiles/ekf_localization_node.dir/cmake_clean_${lang}.cmake OPTIONAL) ENDFOREACH(lang)
{ "content_hash": "d59923f7cf30137f059c8ff345a0dab3", "timestamp": "", "source": "github", "line_count": 10, "max_line_length": 82, "avg_line_length": 42.9, "alnum_prop": 0.7948717948717948, "repo_name": "superdyzio/PWR-Stuff", "id": "ae0535c455b666ec98b77836831fb6d28cd7f038", "size": "429", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "AIR-ARR/Projekt Zespołowy/catkin_ws/build/robot_localization/CMakeFiles/ekf_localization_node.dir/cmake_clean.cmake", "mode": "33188", "license": "mit", "language": [ { "name": "ASP", "bytes": "17829" }, { "name": "Batchfile", "bytes": "1042" }, { "name": "C", "bytes": "2403055" }, { "name": "C#", "bytes": "625528" }, { "name": "C++", "bytes": "3066245" }, { "name": "CMake", "bytes": "983251" }, { "name": "CSS", "bytes": "218848" }, { "name": "Common Lisp", "bytes": "378578" }, { "name": "HTML", "bytes": "4999679" }, { "name": "Java", "bytes": "475300" }, { "name": "JavaScript", "bytes": "266296" }, { "name": "M", "bytes": "2385" }, { "name": "M4", "bytes": "3010" }, { "name": "Makefile", "bytes": "3734730" }, { "name": "Matlab", "bytes": "160418" }, { "name": "OCaml", "bytes": "2021" }, { "name": "PHP", "bytes": "10629" }, { "name": "Perl", "bytes": "7551" }, { "name": "PowerShell", "bytes": "31323" }, { "name": "Python", "bytes": "607184" }, { "name": "QMake", "bytes": "1211" }, { "name": "Scala", "bytes": "4781" }, { "name": "Shell", "bytes": "1550640" }, { "name": "Tcl", "bytes": "4143" }, { "name": "q", "bytes": "1050" } ], "symlink_target": "" }
package org.apache.heron.healthmgr.sensors; import java.time.Duration; import java.time.Instant; import java.util.ArrayList; import java.util.Collection; import javax.inject.Inject; import com.microsoft.dhalion.api.MetricsProvider; import com.microsoft.dhalion.core.Measurement; import com.microsoft.dhalion.core.MeasurementsTable; import org.apache.heron.healthmgr.HealthManagerMetrics; import org.apache.heron.healthmgr.HealthPolicyConfig; import org.apache.heron.healthmgr.common.PackingPlanProvider; import org.apache.heron.healthmgr.common.TopologyProvider; import static org.apache.heron.healthmgr.sensors.BaseSensor.MetricName.METRIC_BACK_PRESSURE; public class BackPressureSensor extends BaseSensor { public static final String BACKPRESSURE_SENSOR = "BackPressureSensor"; private final MetricsProvider metricsProvider; private final PackingPlanProvider packingPlanProvider; private final TopologyProvider topologyProvider; private HealthManagerMetrics publishingMetrics; @Inject public BackPressureSensor(PackingPlanProvider packingPlanProvider, TopologyProvider topologyProvider, HealthPolicyConfig policyConfig, MetricsProvider metricsProvider, HealthManagerMetrics publishingMetrics) { super(policyConfig, METRIC_BACK_PRESSURE.text(), BackPressureSensor.class.getSimpleName()); this.packingPlanProvider = packingPlanProvider; this.topologyProvider = topologyProvider; this.metricsProvider = metricsProvider; this.publishingMetrics = publishingMetrics; } /** * Computes the average (millis/sec) back-pressure caused by instances in the configured window * * @return the average value measurements */ @Override public Collection<Measurement> fetch() { publishingMetrics.executeSensorIncr(BACKPRESSURE_SENSOR); Collection<Measurement> result = new ArrayList<>(); Instant now = context.checkpoint(); String[] boltComponents = topologyProvider.getBoltNames(); Duration duration = getDuration(); for (String component : boltComponents) { String[] boltInstanceNames = packingPlanProvider.getBoltInstanceNames(component); for (String instance : boltInstanceNames) { String metric = getMetricName() + instance; Collection<Measurement> stmgrResult = metricsProvider.getMeasurements(now, duration, metric, COMPONENT_STMGR); if (stmgrResult.isEmpty()) { continue; } MeasurementsTable table = MeasurementsTable.of(stmgrResult).component(COMPONENT_STMGR); if (table.size() == 0) { continue; } double averageBp = table.type(metric).sum() / duration.getSeconds(); // The maximum value of averageBp should be 1000, i.e. 1000 millis of BP per second. Due to // a bug in Heron (Issue: 1753), this value could be higher in some cases. The following // check partially corrects the reported BP value averageBp = averageBp > 1000 ? 1000 : averageBp; Measurement measurement = new Measurement(component, instance, getMetricName(), now, averageBp); result.add(measurement); } } return result; } }
{ "content_hash": "e87394f6dea6bd30b195880eaeebf643", "timestamp": "", "source": "github", "line_count": 88, "max_line_length": 99, "avg_line_length": 37.22727272727273, "alnum_prop": 0.7219169719169719, "repo_name": "ashvina/heron", "id": "aa9d35f03a3747e42ae20c3030537fb59b7f0fe4", "size": "4084", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "heron/healthmgr/src/java/org/apache/heron/healthmgr/sensors/BackPressureSensor.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C", "bytes": "14063" }, { "name": "C++", "bytes": "1710172" }, { "name": "CSS", "bytes": "109554" }, { "name": "HCL", "bytes": "2114" }, { "name": "HTML", "bytes": "156836" }, { "name": "Java", "bytes": "4695767" }, { "name": "JavaScript", "bytes": "1112006" }, { "name": "M4", "bytes": "17941" }, { "name": "Makefile", "bytes": "1046" }, { "name": "Objective-C", "bytes": "2143" }, { "name": "Perl", "bytes": "9298" }, { "name": "Python", "bytes": "1635113" }, { "name": "Ruby", "bytes": "1930" }, { "name": "Scala", "bytes": "83215" }, { "name": "Shell", "bytes": "162792" }, { "name": "Smarty", "bytes": "528" } ], "symlink_target": "" }
module Devised extend ActiveSupport::Concern ACCOUNT_KEYS = [:email, :first_name, :gender, :last_name, :phone, :postal_code] SIGNUP_KEYS = ACCOUNT_KEYS + [:password, :password_confirmation] UPDATE_KEYS = SIGNUP_KEYS + [:current_password] protected def after_sign_in_path_for(member) dashboard_path end def after_sign_out_path_for(member) signin_path end # If you have extra params to permit, append them to the sanitizer. def configure_account_update_params devise_parameter_sanitizer.permit(:account_update, keys: UPDATE_KEYS) end def configure_permitted_parameters devise_parameter_sanitizer.permit(:sign_up, keys: SIGNUP_KEYS) devise_parameter_sanitizer.permit(:account_update, keys: UPDATE_KEYS) end # If you have extra params to permit, append them to the sanitizer. def configure_sign_up_params devise_parameter_sanitizer.permit(:sign_up, keys: SIGNUP_KEYS) end end
{ "content_hash": "4e33e2e467438fedb371f23163c33651", "timestamp": "", "source": "github", "line_count": 33, "max_line_length": 81, "avg_line_length": 29.484848484848484, "alnum_prop": 0.7050359712230215, "repo_name": "brendandixon/thegatherings", "id": "16f5f4476975f5f55fe831c21549416489996bc1", "size": "973", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "app/controllers/concerns/devised.rb", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "191931" }, { "name": "Dockerfile", "bytes": "1003" }, { "name": "HTML", "bytes": "40698" }, { "name": "JavaScript", "bytes": "170439" }, { "name": "Ruby", "bytes": "532366" }, { "name": "Shell", "bytes": "703" } ], "symlink_target": "" }
#ifndef OSRM_ENGINE_GUIDANCE_TOOLKIT_HPP_ #define OSRM_ENGINE_GUIDANCE_TOOLKIT_HPP_ #include "extractor/guidance/turn_instruction.hpp" #include "util/bearing.hpp" #include <algorithm> namespace osrm { namespace engine { namespace guidance { // Silent Turn Instructions are not to be mentioned to the outside world but inline bool isSilent(const extractor::guidance::TurnInstruction instruction) { return instruction.type == extractor::guidance::TurnType::NoTurn || instruction.type == extractor::guidance::TurnType::Suppressed || instruction.type == extractor::guidance::TurnType::StayOnRoundabout; } inline bool entersRoundabout(const extractor::guidance::TurnInstruction instruction) { return (instruction.type == extractor::guidance::TurnType::EnterRoundabout || instruction.type == extractor::guidance::TurnType::EnterRotary || instruction.type == extractor::guidance::TurnType::EnterRoundaboutIntersection || instruction.type == extractor::guidance::TurnType::EnterRoundaboutAtExit || instruction.type == extractor::guidance::TurnType::EnterRotaryAtExit || instruction.type == extractor::guidance::TurnType::EnterRoundaboutIntersectionAtExit || instruction.type == extractor::guidance::TurnType::EnterAndExitRoundabout || instruction.type == extractor::guidance::TurnType::EnterAndExitRotary || instruction.type == extractor::guidance::TurnType::EnterAndExitRotary); } inline bool leavesRoundabout(const extractor::guidance::TurnInstruction instruction) { return (instruction.type == extractor::guidance::TurnType::ExitRoundabout || instruction.type == extractor::guidance::TurnType::ExitRotary || instruction.type == extractor::guidance::TurnType::ExitRoundaboutIntersection || instruction.type == extractor::guidance::TurnType::EnterAndExitRoundabout || instruction.type == extractor::guidance::TurnType::EnterAndExitRotary || instruction.type == extractor::guidance::TurnType::EnterAndExitRoundaboutIntersection); } inline bool staysOnRoundabout(const extractor::guidance::TurnInstruction instruction) { return instruction.type == extractor::guidance::TurnType::StayOnRoundabout; } inline extractor::guidance::DirectionModifier angleToDirectionModifier(const double bearing) { if (bearing < 135) { return extractor::guidance::DirectionModifier::Right; } if (bearing <= 225) { return extractor::guidance::DirectionModifier::Straight; } return extractor::guidance::DirectionModifier::Left; } inline double angularDeviation(const double angle, const double from) { const double deviation = std::abs(angle - from); return std::min(360 - deviation, deviation); } } // namespace guidance } // namespace engine } // namespace osrm #endif /* OSRM_ENGINE_GUIDANCE_TOOLKIT_HPP_ */
{ "content_hash": "6782ef2eb266c0f5abeb9b04832f864c", "timestamp": "", "source": "github", "line_count": 76, "max_line_length": 99, "avg_line_length": 38.64473684210526, "alnum_prop": 0.7245488593803201, "repo_name": "arnekaiser/osrm-backend", "id": "f3d534f695f177c473c1ed9a0a72f95095c6f990", "size": "2937", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "include/engine/guidance/toolkit.hpp", "mode": "33188", "license": "bsd-2-clause", "language": [ { "name": "Batchfile", "bytes": "5650" }, { "name": "C++", "bytes": "1506228" }, { "name": "CMake", "bytes": "66332" }, { "name": "Gherkin", "bytes": "475337" }, { "name": "JavaScript", "bytes": "103843" }, { "name": "Lua", "bytes": "47104" }, { "name": "Makefile", "bytes": "1700" }, { "name": "Python", "bytes": "2886" }, { "name": "Shell", "bytes": "5183" } ], "symlink_target": "" }
node = S($input, "application/json") currencies = node.prop("orderDetails").prop("currencies") currencies.removeAt(-6)
{ "content_hash": "60b6eaf52a0cd1930b95b426ab6e849a", "timestamp": "", "source": "github", "line_count": 4, "max_line_length": 57, "avg_line_length": 30, "alnum_prop": 0.7333333333333333, "repo_name": "camunda/camunda-spin", "id": "6f6bcfdc7c3474042fdcd7905b9ed0ec769d91a9", "size": "120", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "dataformat-json-jackson/src/test/resources/org/camunda/spin/ruby/json/tree/JsonTreeEditListPropertyRubyTest.shouldFailRemoveAtWithNegativeIndexOutOfBounds.rb", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Groovy", "bytes": "24425" }, { "name": "Java", "bytes": "714834" }, { "name": "JavaScript", "bytes": "41714" }, { "name": "Python", "bytes": "20444" }, { "name": "Ruby", "bytes": "20491" }, { "name": "XSLT", "bytes": "299" } ], "symlink_target": "" }
package com.sajo.teamkerbell.parser.reader; import java.io.InputStream; public class EmptyReader implements ParseReader { @Override public String read(InputStream is) { return null; } }
{ "content_hash": "ae9bc57a459af1ba56d94a9066e1aaa5", "timestamp": "", "source": "github", "line_count": 10, "max_line_length": 49, "avg_line_length": 20.8, "alnum_prop": 0.7211538461538461, "repo_name": "seongahjo/Teamkerbell", "id": "4cfc989e1b3b34a7b80975e2244211ceba00185e", "size": "208", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/main/java/com/sajo/teamkerbell/parser/reader/EmptyReader.java", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "177028" }, { "name": "Java", "bytes": "317450" }, { "name": "JavaScript", "bytes": "516410" } ], "symlink_target": "" }
package com.cynigram.yashiro.ast; import com.google.common.base.Objects; import java.math.BigDecimal; import static com.google.common.base.Preconditions.checkNotNull; public class LitNode<T> extends ExprNode { public static final class Null extends LitNode<Void> { public static final Null NULL = new Null(); private Null () { super(null); } } public static final class Bool extends LitNode<Boolean> { public static final Bool TRUE = new Bool(true); public static final Bool FALSE = new Bool(false); private Bool (boolean value) { super(value); } } public static final class Dec extends LitNode<BigDecimal> { public Dec (String value) { super(new BigDecimal(value)); } } public static final class Int extends LitNode<Long> { public Int (long value) { super(value); } } public static final class Str extends LitNode<String> { public Str (String value) { super(checkNotNull(value)); } } private T value; protected LitNode (T value) { this.value = value; } public T getValue () { return this.value; } @Override public int hashCode () { return value.hashCode(); } @Override public boolean equals (Object obj) { if (obj == null) { return false; } else if (obj == this) { return true; } else if (obj.getClass() != getClass()) { return false; } LitNode<?> other = (LitNode<?>)obj; return Objects.equal(other.value, value); } @Override public String toString () { return Objects.toStringHelper(this) .add("value", value) .toString(); } }
{ "content_hash": "5cec00eec95aec80950811c084af91c4", "timestamp": "", "source": "github", "line_count": 96, "max_line_length": 64, "avg_line_length": 20.15625, "alnum_prop": 0.5410852713178295, "repo_name": "impl/yashiro", "id": "7c46f7b5e7cb792da35d16f367103f532e9d95c8", "size": "1935", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/main/java/com/cynigram/yashiro/ast/LitNode.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "152775" } ], "symlink_target": "" }
export const noUserSelect = () => ` user-select: none; `; export const noTapHighlight = () => ` -webkit-tap-highlight-color: rgba(255, 255, 255, 0) !important; `;
{ "content_hash": "9fe6ccd259e3006ddba7d207a844bb87", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 66, "avg_line_length": 24.142857142857142, "alnum_prop": 0.6390532544378699, "repo_name": "Nersent/Wexond", "id": "8fe86b3eadb95540812e3cea7127d605eaf57f25", "size": "169", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/renderer/mixins/user-selection.ts", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "19174" }, { "name": "HTML", "bytes": "1202" }, { "name": "JavaScript", "bytes": "80932" } ], "symlink_target": "" }
<?php namespace Mechpave\ImgurClient\Entity; /** * Class Album * @package Mechpave\ImgurClient\Entity */ class Album implements AlbumInterface { /** * @var string */ protected $albumId; /** * @var string */ protected $title; /** * @var string */ protected $description; /** * @var \DateTime */ protected $insertedIntoGallery; /** * @var string */ protected $cover; /** * @var int */ protected $coverWidth; /** * @var int */ protected $coverHeight; /** * @var string */ protected $accountUsername; /** * @var string */ protected $accountId; /** * @var string */ protected $privacy; /** * @var string */ protected $layout; /** * @var int */ protected $views; /** * @var string */ protected $link; /** * @var bool */ protected $favorite; /** * @var bool */ protected $nsfw; /** * @var string */ protected $section; /** * @var int */ protected $order; /** * @var string */ protected $deleteHash; /** * @var int */ protected $imagesCount; /** * @var ImageInterface[] */ protected $images; /** * @param string $id * @return AlbumInterface */ public function setAlbumId($id) { $this->albumId = $id; return $this; } /** * @return string */ public function getAlbumId() { return $this->albumId; } /** * @param string $title * @return AlbumInterface */ public function setTitle($title) { $this->title = $title; return $this; } /** * @return string */ public function getTitle() { return $this->title; } /** * @param string $description * @return AlbumInterface */ public function setDescription($description) { $this->description = $description; return $this; } /** * @return string */ public function getDescription() { return $this->description; } /** * @param \DateTime $dateTime * @return AlbumInterface */ public function setInsertedIntoGallery($dateTime) { $this->insertedIntoGallery = $dateTime; return $this; } /** * @return \DateTime */ public function getInsertedIntoGallery() { return $this->insertedIntoGallery; } /** * @param string $cover * @return AlbumInterface */ public function setCover($cover) { $this->cover = $cover; return $this; } /** * @return string */ public function getCover() { return $this->cover; } /** * @param int $coverWidth * @return AlbumInterface */ public function setCoverWidth($coverWidth) { $this->coverWidth = $coverWidth; return $this; } /** * @return int */ public function getCoverWidth() { return $this->coverWidth; } /** * @param int $coverHeight * @return AlbumInterface */ public function setCoverHeight($coverHeight) { $this->coverHeight = $coverHeight; return $this; } /** * @return int */ public function getCoverHeight() { return $this->coverHeight; } /** * @param string $accountUsername * @return AlbumInterface */ public function setAccountUsername($accountUsername) { $this->accountUsername = $accountUsername; return $this; } /** * @return string */ public function getAccountUsername() { return $this->accountUsername; } /** * @param integer $accountId * @return AlbumInterface */ public function setAccountId($accountId) { $this->accountId = $accountId; return $this; } /** * @return string */ public function getAccountId() { return $this->accountId; } /** * @param string $privacy * @return AlbumInterface */ public function setPrivacy($privacy) { $this->privacy = $privacy; return $this; } /** * @return string */ public function getPrivacy() { return $this->privacy; } /** * @param string $layout * @return AlbumInterface */ public function setLayout($layout) { $this->layout = $layout; return $this; } /** * @return string */ public function getLayout() { return $this->layout; } /** * @param int $views * @return AlbumInterface */ public function setViews($views) { $this->views = $views; return $this; } /** * @return int */ public function getViews() { return $this->views; } /** * @param string $link * @return AlbumInterface */ public function setLink($link) { $this->link = $link; return $this; } /** * @return string */ public function getLink() { return $this->link; } /** * @param bool $favorite * @return AlbumInterface */ public function setFavorite($favorite) { $this->favorite = $favorite; return $this; } /** * @return bool */ public function isFavorite() { return $this->favorite; } /** * @param bool $nsfw * @return AlbumInterface */ public function setNsfw($nsfw) { $this->nsfw = $nsfw; return $this; } /** * @return bool */ public function isNsfw() { return $this->nsfw; } /** * @param string $section * @return AlbumInterface */ public function setSection($section) { $this->section = $section; return $this; } /** * @return mixed */ public function getSection() { return $this->section; } /** * @param int $order * @return AlbumInterface */ public function setOrder($order) { $this->order = $order; return $this; } /** * @return int */ public function getOrder() { return $this->order; } /** * @param string $deleteHash * @return AlbumInterface */ public function setDeleteHash($deleteHash) { $this->deleteHash = $deleteHash; return $this; } /** * @return string */ public function getDeleteHash() { return $this->deleteHash; } /** * @param int $imagesCount * @return AlbumInterface */ public function setImagesCount($imagesCount) { $this->imagesCount = $imagesCount; return $this; } /** * @return int */ public function getImagesCount() { return $this->imagesCount; } /** * @param ImageInterface[] $images * @return AlbumInterface */ public function setImages($images) { $this->images = $images; return $this; } /** * @return ImageInterface[] */ public function getImages() { return $this->images; } }
{ "content_hash": "71a524fa526b63eca7e1b9853ddce6b4", "timestamp": "", "source": "github", "line_count": 490, "max_line_length": 56, "avg_line_length": 15.391836734693877, "alnum_prop": 0.49535932113497744, "repo_name": "mechpave/imgur-client", "id": "7ebcde7c24c2135915b461994785cc5704e4f971", "size": "7542", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/Entity/Album.php", "mode": "33188", "license": "mit", "language": [ { "name": "PHP", "bytes": "119307" } ], "symlink_target": "" }