text
stringlengths 2
1.04M
| meta
dict |
---|---|
<!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_60-ea) on Fri Nov 04 13:24:40 EDT 2016 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Uses of Class org.wildfly.swarm.config.jgroups.stack.Transport (Public javadocs 2016.11.0 API)</title>
<meta name="date" content="2016-11-04">
<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.jgroups.stack.Transport (Public javadocs 2016.11.0 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/jgroups/stack/Transport.html" title="class in org.wildfly.swarm.config.jgroups.stack">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">WildFly Swarm API, 2016.11.0</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/jgroups/stack/class-use/Transport.html" target="_top">Frames</a></li>
<li><a href="Transport.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.wildfly.swarm.config.jgroups.stack.Transport" class="title">Uses of Class<br>org.wildfly.swarm.config.jgroups.stack.Transport</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/jgroups/stack/Transport.html" title="class in org.wildfly.swarm.config.jgroups.stack">Transport</a></span><span class="tabEnd"> </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.jgroups">org.wildfly.swarm.config.jgroups</a></td>
<td class="colLast"> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="#org.wildfly.swarm.config.jgroups.stack">org.wildfly.swarm.config.jgroups.stack</a></td>
<td class="colLast"> </td>
</tr>
</tbody>
</table>
</li>
<li class="blockList">
<ul class="blockList">
<li class="blockList"><a name="org.wildfly.swarm.config.jgroups">
<!-- -->
</a>
<h3>Uses of <a href="../../../../../../../org/wildfly/swarm/config/jgroups/stack/Transport.html" title="class in org.wildfly.swarm.config.jgroups.stack">Transport</a> in <a href="../../../../../../../org/wildfly/swarm/config/jgroups/package-summary.html">org.wildfly.swarm.config.jgroups</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/jgroups/package-summary.html">org.wildfly.swarm.config.jgroups</a> that return <a href="../../../../../../../org/wildfly/swarm/config/jgroups/stack/Transport.html" title="class in org.wildfly.swarm.config.jgroups.stack">Transport</a></span><span class="tabEnd"> </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/jgroups/stack/Transport.html" title="class in org.wildfly.swarm.config.jgroups.stack">Transport</a></code></td>
<td class="colLast"><span class="typeNameLabel">Stack.StackResources.</span><code><span class="memberNameLink"><a href="../../../../../../../org/wildfly/swarm/config/jgroups/Stack.StackResources.html#transport-java.lang.String-">transport</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key)</code> </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/jgroups/package-summary.html">org.wildfly.swarm.config.jgroups</a> that return types with arguments of type <a href="../../../../../../../org/wildfly/swarm/config/jgroups/stack/Transport.html" title="class in org.wildfly.swarm.config.jgroups.stack">Transport</a></span><span class="tabEnd"> </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="http://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../../org/wildfly/swarm/config/jgroups/stack/Transport.html" title="class in org.wildfly.swarm.config.jgroups.stack">Transport</a>></code></td>
<td class="colLast"><span class="typeNameLabel">Stack.StackResources.</span><code><span class="memberNameLink"><a href="../../../../../../../org/wildfly/swarm/config/jgroups/Stack.StackResources.html#transports--">transports</a></span>()</code>
<div class="block">Get the list of Transport resources</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/jgroups/package-summary.html">org.wildfly.swarm.config.jgroups</a> with parameters of type <a href="../../../../../../../org/wildfly/swarm/config/jgroups/stack/Transport.html" title="class in org.wildfly.swarm.config.jgroups.stack">Transport</a></span><span class="tabEnd"> </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/jgroups/Stack.html" title="type parameter in Stack">T</a></code></td>
<td class="colLast"><span class="typeNameLabel">Stack.</span><code><span class="memberNameLink"><a href="../../../../../../../org/wildfly/swarm/config/jgroups/Stack.html#transport-org.wildfly.swarm.config.jgroups.stack.Transport-">transport</a></span>(<a href="../../../../../../../org/wildfly/swarm/config/jgroups/stack/Transport.html" title="class in org.wildfly.swarm.config.jgroups.stack">Transport</a> value)</code>
<div class="block">Add the Transport object to the list of subresources</div>
</td>
</tr>
</tbody>
</table>
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation">
<caption><span>Method parameters in <a href="../../../../../../../org/wildfly/swarm/config/jgroups/package-summary.html">org.wildfly.swarm.config.jgroups</a> with type arguments of type <a href="../../../../../../../org/wildfly/swarm/config/jgroups/stack/Transport.html" title="class in org.wildfly.swarm.config.jgroups.stack">Transport</a></span><span class="tabEnd"> </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/jgroups/Stack.html" title="type parameter in Stack">T</a></code></td>
<td class="colLast"><span class="typeNameLabel">Stack.</span><code><span class="memberNameLink"><a href="../../../../../../../org/wildfly/swarm/config/jgroups/Stack.html#transports-java.util.List-">transports</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../../org/wildfly/swarm/config/jgroups/stack/Transport.html" title="class in org.wildfly.swarm.config.jgroups.stack">Transport</a>> value)</code>
<div class="block">Add all Transport objects to this subresource</div>
</td>
</tr>
</tbody>
</table>
</li>
<li class="blockList"><a name="org.wildfly.swarm.config.jgroups.stack">
<!-- -->
</a>
<h3>Uses of <a href="../../../../../../../org/wildfly/swarm/config/jgroups/stack/Transport.html" title="class in org.wildfly.swarm.config.jgroups.stack">Transport</a> in <a href="../../../../../../../org/wildfly/swarm/config/jgroups/stack/package-summary.html">org.wildfly.swarm.config.jgroups.stack</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/jgroups/stack/package-summary.html">org.wildfly.swarm.config.jgroups.stack</a> with type parameters of type <a href="../../../../../../../org/wildfly/swarm/config/jgroups/stack/Transport.html" title="class in org.wildfly.swarm.config.jgroups.stack">Transport</a></span><span class="tabEnd"> </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 </code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/wildfly/swarm/config/jgroups/stack/Transport.html" title="class in org.wildfly.swarm.config.jgroups.stack">Transport</a><T extends <a href="../../../../../../../org/wildfly/swarm/config/jgroups/stack/Transport.html" title="class in org.wildfly.swarm.config.jgroups.stack">Transport</a><T>></span></code>
<div class="block">The configuration of a transport for a protocol stack.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>interface </code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/wildfly/swarm/config/jgroups/stack/TransportConsumer.html" title="interface in org.wildfly.swarm.config.jgroups.stack">TransportConsumer</a><T extends <a href="../../../../../../../org/wildfly/swarm/config/jgroups/stack/Transport.html" title="class in org.wildfly.swarm.config.jgroups.stack">Transport</a><T>></span></code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>interface </code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/wildfly/swarm/config/jgroups/stack/TransportSupplier.html" title="interface in org.wildfly.swarm.config.jgroups.stack">TransportSupplier</a><T extends <a href="../../../../../../../org/wildfly/swarm/config/jgroups/stack/Transport.html" title="class in org.wildfly.swarm.config.jgroups.stack">Transport</a>></span></code> </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/jgroups/stack/package-summary.html">org.wildfly.swarm.config.jgroups.stack</a> that return <a href="../../../../../../../org/wildfly/swarm/config/jgroups/stack/Transport.html" title="class in org.wildfly.swarm.config.jgroups.stack">Transport</a></span><span class="tabEnd"> </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/jgroups/stack/Transport.html" title="class in org.wildfly.swarm.config.jgroups.stack">Transport</a></code></td>
<td class="colLast"><span class="typeNameLabel">TransportSupplier.</span><code><span class="memberNameLink"><a href="../../../../../../../org/wildfly/swarm/config/jgroups/stack/TransportSupplier.html#get--">get</a></span>()</code>
<div class="block">Constructed instance of Transport 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/jgroups/stack/Transport.html" title="class in org.wildfly.swarm.config.jgroups.stack">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">WildFly Swarm API, 2016.11.0</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/jgroups/stack/class-use/Transport.html" target="_top">Frames</a></li>
<li><a href="Transport.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>Copyright © 2016 <a href="http://www.jboss.org">JBoss by Red Hat</a>. All rights reserved.</small></p>
</body>
</html>
| {
"content_hash": "439ed1057a147ede931fb978426d1aa6",
"timestamp": "",
"source": "github",
"line_count": 260,
"max_line_length": 537,
"avg_line_length": 60.07692307692308,
"alnum_prop": 0.6635083226632522,
"repo_name": "wildfly-swarm/wildfly-swarm-javadocs",
"id": "7884ebefa4addff16e120baa23cd912e74b41ae4",
"size": "15620",
"binary": false,
"copies": "1",
"ref": "refs/heads/gh-pages",
"path": "2016.11.0/apidocs/org/wildfly/swarm/config/jgroups/stack/class-use/Transport.html",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
package org.apache.camel.component.cbor;
public class Author {
private String name;
private String surname;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getSurname() {
return surname;
}
public void setSurname(String surname) {
this.surname = surname;
}
}
| {
"content_hash": "5f697771ae836c6f370d3b2837e689ce",
"timestamp": "",
"source": "github",
"line_count": 25,
"max_line_length": 44,
"avg_line_length": 16,
"alnum_prop": 0.605,
"repo_name": "CodeSmell/camel",
"id": "464b283eb23792e140d84979a010fda55bcf70e7",
"size": "1202",
"binary": false,
"copies": "21",
"ref": "refs/heads/master",
"path": "components/camel-cbor/src/test/java/org/apache/camel/component/cbor/Author.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Apex",
"bytes": "6521"
},
{
"name": "Batchfile",
"bytes": "2353"
},
{
"name": "CSS",
"bytes": "5472"
},
{
"name": "Elm",
"bytes": "10852"
},
{
"name": "FreeMarker",
"bytes": "8015"
},
{
"name": "Groovy",
"bytes": "20838"
},
{
"name": "HTML",
"bytes": "915679"
},
{
"name": "Java",
"bytes": "80453693"
},
{
"name": "JavaScript",
"bytes": "100326"
},
{
"name": "Makefile",
"bytes": "513"
},
{
"name": "RobotFramework",
"bytes": "8461"
},
{
"name": "Shell",
"bytes": "17295"
},
{
"name": "TSQL",
"bytes": "28835"
},
{
"name": "Tcl",
"bytes": "4974"
},
{
"name": "Thrift",
"bytes": "6979"
},
{
"name": "XQuery",
"bytes": "546"
},
{
"name": "XSLT",
"bytes": "280849"
}
],
"symlink_target": ""
} |
clang -fobjc-arc Fraction.m main.m -o main
./main
| {
"content_hash": "978401ffb619a0e600df39a992dddb05",
"timestamp": "",
"source": "github",
"line_count": 2,
"max_line_length": 42,
"avg_line_length": 25,
"alnum_prop": 0.72,
"repo_name": "guoqiao/objc",
"id": "61af3e937fc0ea160142b947ac8351d9ea4b3821",
"size": "50",
"binary": false,
"copies": "4",
"ref": "refs/heads/master",
"path": "4-multi-args/run.sh",
"mode": "33261",
"license": "mit",
"language": [
{
"name": "Objective-C",
"bytes": "9280"
},
{
"name": "Shell",
"bytes": "423"
}
],
"symlink_target": ""
} |
///<reference path="../../../android/view/animation/Animation.ts"/>
///<reference path="../../../android/view/animation/Transformation.ts"/>
module android.view.animation {
import Animation = android.view.animation.Animation;
import Transformation = android.view.animation.Transformation;
/**
* An animation that controls the alpha level of an object.
* Useful for fading things in and out. This animation ends up
* changing the alpha property of a {@link Transformation}
*
*/
export class AlphaAnimation extends Animation {
private mFromAlpha:number = 0;
private mToAlpha:number = 0;
///**
// * Constructor used when an AlphaAnimation is loaded from a resource.
// *
// * @param context Application context to use
// * @param attrs Attribute set from which to read values
// */
//constructor( context:Context, attrs:AttributeSet) {
// super(context, attrs);
// let a:TypedArray = context.obtainStyledAttributes(attrs, com.android.internal.R.styleable.AlphaAnimation);
// this.mFromAlpha = a.getFloat(com.android.internal.R.styleable.AlphaAnimation_fromAlpha, 1.0);
// this.mToAlpha = a.getFloat(com.android.internal.R.styleable.AlphaAnimation_toAlpha, 1.0);
// a.recycle();
//}
/**
* Constructor to use when building an AlphaAnimation from code
*
* @param fromAlpha Starting alpha value for the animation, where 1.0 means
* fully opaque and 0.0 means fully transparent.
* @param toAlpha Ending alpha value for the animation.
*/
constructor(fromAlpha:number, toAlpha:number) {
super();
this.mFromAlpha = fromAlpha;
this.mToAlpha = toAlpha;
}
/**
* Changes the alpha property of the supplied {@link Transformation}
*/
protected applyTransformation(interpolatedTime:number, t:Transformation):void {
const alpha:number = this.mFromAlpha;
t.setAlpha(alpha + ((this.mToAlpha - alpha) * interpolatedTime));
}
willChangeTransformationMatrix():boolean {
return false;
}
willChangeBounds():boolean {
return false;
}
/**
* @hide
*/
hasAlpha():boolean {
return true;
}
}
} | {
"content_hash": "bec8e04f69f168070712b48e6ea527df",
"timestamp": "",
"source": "github",
"line_count": 71,
"max_line_length": 116,
"avg_line_length": 31.408450704225352,
"alnum_prop": 0.6591928251121076,
"repo_name": "linfaxin/AndroidUIX",
"id": "a5f21a0b646d0625747bdfd2a6b537f5d1d9301f",
"size": "2849",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "src/android/view/animation/AlphaAnimation.ts",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "JavaScript",
"bytes": "10659216"
},
{
"name": "TypeScript",
"bytes": "4924843"
}
],
"symlink_target": ""
} |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
namespace Microsoft.UnitTests.Core.XUnit {
public enum ThreadType {
Default = 0,
UI = 1,
Background = 2
}
} | {
"content_hash": "419e7a02a8851a8fed67d2bfbaf58dfe",
"timestamp": "",
"source": "github",
"line_count": 10,
"max_line_length": 91,
"avg_line_length": 29.4,
"alnum_prop": 0.673469387755102,
"repo_name": "MikhailArkhipov/RTVS",
"id": "70ffd8ac980bb7bc9545dfc3a4f40d34e141babc",
"size": "296",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "src/UnitTests/Core/Impl/XUnit/ThreadType.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "208"
},
{
"name": "C",
"bytes": "14326"
},
{
"name": "C#",
"bytes": "8025450"
},
{
"name": "C++",
"bytes": "31801"
},
{
"name": "CMake",
"bytes": "1617"
},
{
"name": "CSS",
"bytes": "4389"
},
{
"name": "HTML",
"bytes": "8339"
},
{
"name": "M4",
"bytes": "1855"
},
{
"name": "PLSQL",
"bytes": "283"
},
{
"name": "PowerShell",
"bytes": "457"
},
{
"name": "R",
"bytes": "332447"
},
{
"name": "Rebol",
"bytes": "436"
},
{
"name": "Roff",
"bytes": "2612"
},
{
"name": "SQLPL",
"bytes": "1116"
},
{
"name": "Shell",
"bytes": "13838"
},
{
"name": "TypeScript",
"bytes": "22537"
},
{
"name": "XSLT",
"bytes": "421"
}
],
"symlink_target": ""
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/cloud/contactcenterinsights/v1/resources.proto
namespace Google\Cloud\ContactCenterInsights\V1;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* The settings resource.
*
* Generated from protobuf message <code>google.cloud.contactcenterinsights.v1.Settings</code>
*/
class Settings extends \Google\Protobuf\Internal\Message
{
/**
* Immutable. The resource name of the settings resource.
* Format:
* projects/{project}/locations/{location}/settings
*
* Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IMMUTABLE];</code>
*/
private $name = '';
/**
* Output only. The time at which the settings was created.
*
* Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
*/
private $create_time = null;
/**
* Output only. The time at which the settings were last updated.
*
* Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
*/
private $update_time = null;
/**
* A language code to be applied to each transcript segment unless the segment
* already specifies a language code. Language code defaults to "en-US" if it
* is neither specified on the segment nor here.
*
* Generated from protobuf field <code>string language_code = 4;</code>
*/
private $language_code = '';
/**
* The default TTL for newly-created conversations. If a conversation has a
* specified expiration, that value will be used instead. Changing this
* value will not change the expiration of existing conversations.
* Conversations with no expire time persist until they are deleted.
*
* Generated from protobuf field <code>.google.protobuf.Duration conversation_ttl = 5;</code>
*/
private $conversation_ttl = null;
/**
* A map that maps a notification trigger to a Pub/Sub topic. Each time a
* specified trigger occurs, Insights will notify the corresponding Pub/Sub
* topic.
* Keys are notification triggers. Supported keys are:
* * "all-triggers": Notify each time any of the supported triggers occurs.
* * "create-analysis": Notify each time an analysis is created.
* * "create-conversation": Notify each time a conversation is created.
* * "export-insights-data": Notify each time an export is complete.
* * "update-conversation": Notify each time a conversation is updated via
* UpdateConversation.
* Values are Pub/Sub topics. The format of each Pub/Sub topic is:
* projects/{project}/topics/{topic}
*
* Generated from protobuf field <code>map<string, string> pubsub_notification_settings = 6;</code>
*/
private $pubsub_notification_settings;
/**
* Default analysis settings.
*
* Generated from protobuf field <code>.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig analysis_config = 7;</code>
*/
private $analysis_config = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $name
* Immutable. The resource name of the settings resource.
* Format:
* projects/{project}/locations/{location}/settings
* @type \Google\Protobuf\Timestamp $create_time
* Output only. The time at which the settings was created.
* @type \Google\Protobuf\Timestamp $update_time
* Output only. The time at which the settings were last updated.
* @type string $language_code
* A language code to be applied to each transcript segment unless the segment
* already specifies a language code. Language code defaults to "en-US" if it
* is neither specified on the segment nor here.
* @type \Google\Protobuf\Duration $conversation_ttl
* The default TTL for newly-created conversations. If a conversation has a
* specified expiration, that value will be used instead. Changing this
* value will not change the expiration of existing conversations.
* Conversations with no expire time persist until they are deleted.
* @type array|\Google\Protobuf\Internal\MapField $pubsub_notification_settings
* A map that maps a notification trigger to a Pub/Sub topic. Each time a
* specified trigger occurs, Insights will notify the corresponding Pub/Sub
* topic.
* Keys are notification triggers. Supported keys are:
* * "all-triggers": Notify each time any of the supported triggers occurs.
* * "create-analysis": Notify each time an analysis is created.
* * "create-conversation": Notify each time a conversation is created.
* * "export-insights-data": Notify each time an export is complete.
* * "update-conversation": Notify each time a conversation is updated via
* UpdateConversation.
* Values are Pub/Sub topics. The format of each Pub/Sub topic is:
* projects/{project}/topics/{topic}
* @type \Google\Cloud\ContactCenterInsights\V1\Settings\AnalysisConfig $analysis_config
* Default analysis settings.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce();
parent::__construct($data);
}
/**
* Immutable. The resource name of the settings resource.
* Format:
* projects/{project}/locations/{location}/settings
*
* Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IMMUTABLE];</code>
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Immutable. The resource name of the settings resource.
* Format:
* projects/{project}/locations/{location}/settings
*
* Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IMMUTABLE];</code>
* @param string $var
* @return $this
*/
public function setName($var)
{
GPBUtil::checkString($var, True);
$this->name = $var;
return $this;
}
/**
* Output only. The time at which the settings was created.
*
* Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @return \Google\Protobuf\Timestamp|null
*/
public function getCreateTime()
{
return $this->create_time;
}
public function hasCreateTime()
{
return isset($this->create_time);
}
public function clearCreateTime()
{
unset($this->create_time);
}
/**
* Output only. The time at which the settings was created.
*
* Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @param \Google\Protobuf\Timestamp $var
* @return $this
*/
public function setCreateTime($var)
{
GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
$this->create_time = $var;
return $this;
}
/**
* Output only. The time at which the settings were last updated.
*
* Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @return \Google\Protobuf\Timestamp|null
*/
public function getUpdateTime()
{
return $this->update_time;
}
public function hasUpdateTime()
{
return isset($this->update_time);
}
public function clearUpdateTime()
{
unset($this->update_time);
}
/**
* Output only. The time at which the settings were last updated.
*
* Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @param \Google\Protobuf\Timestamp $var
* @return $this
*/
public function setUpdateTime($var)
{
GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
$this->update_time = $var;
return $this;
}
/**
* A language code to be applied to each transcript segment unless the segment
* already specifies a language code. Language code defaults to "en-US" if it
* is neither specified on the segment nor here.
*
* Generated from protobuf field <code>string language_code = 4;</code>
* @return string
*/
public function getLanguageCode()
{
return $this->language_code;
}
/**
* A language code to be applied to each transcript segment unless the segment
* already specifies a language code. Language code defaults to "en-US" if it
* is neither specified on the segment nor here.
*
* Generated from protobuf field <code>string language_code = 4;</code>
* @param string $var
* @return $this
*/
public function setLanguageCode($var)
{
GPBUtil::checkString($var, True);
$this->language_code = $var;
return $this;
}
/**
* The default TTL for newly-created conversations. If a conversation has a
* specified expiration, that value will be used instead. Changing this
* value will not change the expiration of existing conversations.
* Conversations with no expire time persist until they are deleted.
*
* Generated from protobuf field <code>.google.protobuf.Duration conversation_ttl = 5;</code>
* @return \Google\Protobuf\Duration|null
*/
public function getConversationTtl()
{
return $this->conversation_ttl;
}
public function hasConversationTtl()
{
return isset($this->conversation_ttl);
}
public function clearConversationTtl()
{
unset($this->conversation_ttl);
}
/**
* The default TTL for newly-created conversations. If a conversation has a
* specified expiration, that value will be used instead. Changing this
* value will not change the expiration of existing conversations.
* Conversations with no expire time persist until they are deleted.
*
* Generated from protobuf field <code>.google.protobuf.Duration conversation_ttl = 5;</code>
* @param \Google\Protobuf\Duration $var
* @return $this
*/
public function setConversationTtl($var)
{
GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
$this->conversation_ttl = $var;
return $this;
}
/**
* A map that maps a notification trigger to a Pub/Sub topic. Each time a
* specified trigger occurs, Insights will notify the corresponding Pub/Sub
* topic.
* Keys are notification triggers. Supported keys are:
* * "all-triggers": Notify each time any of the supported triggers occurs.
* * "create-analysis": Notify each time an analysis is created.
* * "create-conversation": Notify each time a conversation is created.
* * "export-insights-data": Notify each time an export is complete.
* * "update-conversation": Notify each time a conversation is updated via
* UpdateConversation.
* Values are Pub/Sub topics. The format of each Pub/Sub topic is:
* projects/{project}/topics/{topic}
*
* Generated from protobuf field <code>map<string, string> pubsub_notification_settings = 6;</code>
* @return \Google\Protobuf\Internal\MapField
*/
public function getPubsubNotificationSettings()
{
return $this->pubsub_notification_settings;
}
/**
* A map that maps a notification trigger to a Pub/Sub topic. Each time a
* specified trigger occurs, Insights will notify the corresponding Pub/Sub
* topic.
* Keys are notification triggers. Supported keys are:
* * "all-triggers": Notify each time any of the supported triggers occurs.
* * "create-analysis": Notify each time an analysis is created.
* * "create-conversation": Notify each time a conversation is created.
* * "export-insights-data": Notify each time an export is complete.
* * "update-conversation": Notify each time a conversation is updated via
* UpdateConversation.
* Values are Pub/Sub topics. The format of each Pub/Sub topic is:
* projects/{project}/topics/{topic}
*
* Generated from protobuf field <code>map<string, string> pubsub_notification_settings = 6;</code>
* @param array|\Google\Protobuf\Internal\MapField $var
* @return $this
*/
public function setPubsubNotificationSettings($var)
{
$arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
$this->pubsub_notification_settings = $arr;
return $this;
}
/**
* Default analysis settings.
*
* Generated from protobuf field <code>.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig analysis_config = 7;</code>
* @return \Google\Cloud\ContactCenterInsights\V1\Settings\AnalysisConfig|null
*/
public function getAnalysisConfig()
{
return $this->analysis_config;
}
public function hasAnalysisConfig()
{
return isset($this->analysis_config);
}
public function clearAnalysisConfig()
{
unset($this->analysis_config);
}
/**
* Default analysis settings.
*
* Generated from protobuf field <code>.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig analysis_config = 7;</code>
* @param \Google\Cloud\ContactCenterInsights\V1\Settings\AnalysisConfig $var
* @return $this
*/
public function setAnalysisConfig($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\Settings\AnalysisConfig::class);
$this->analysis_config = $var;
return $this;
}
}
| {
"content_hash": "2463de4f8f673b2347d645f7c0be6e2f",
"timestamp": "",
"source": "github",
"line_count": 383,
"max_line_length": 138,
"avg_line_length": 37.62402088772846,
"alnum_prop": 0.6505204718945177,
"repo_name": "googleapis/google-cloud-php-contact-center-insights",
"id": "ca14036b9496f130181ea8748a534628f135a768",
"size": "14410",
"binary": false,
"copies": "3",
"ref": "refs/heads/main",
"path": "src/V1/Settings.php",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "PHP",
"bytes": "266993"
},
{
"name": "Python",
"bytes": "2858"
}
],
"symlink_target": ""
} |
<!doctype html>
<html class="theme-next pisces use-motion" lang="zh-Hans">
<head>
<meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />
<link href="//fonts.googleapis.com/css?family=Monda:300,300italic,400,400italic,700,700italic|Roboto Slab:300,300italic,400,400italic,700,700italic|Lobster Two:300,300italic,400,400italic,700,700italic|PT Mono:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />
<link href="/css/main.css?v=5.1.0" rel="stylesheet" type="text/css" />
<meta name="keywords" content="Hexo, NexT" />
<link rel="alternate" href="/atom.xml" title="JohnTian's Blog" type="application/atom+xml" />
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?v=5.1.0" />
<meta name="description" content="A dog who loves open source, and would like to share knowledge about IT.">
<meta property="og:type" content="website">
<meta property="og:title" content="JohnTian's Blog">
<meta property="og:url" content="http://johntian.github.io/tags/github-server/index.html">
<meta property="og:site_name" content="JohnTian's Blog">
<meta property="og:description" content="A dog who loves open source, and would like to share knowledge about IT.">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="JohnTian's Blog">
<meta name="twitter:description" content="A dog who loves open source, and would like to share knowledge about IT.">
<script type="text/javascript" id="hexo.configurations">
var NexT = window.NexT || {};
var CONFIG = {
root: '/',
scheme: 'Pisces',
sidebar: {"position":"left","display":"post"},
fancybox: true,
motion: true,
duoshuo: {
userId: '0',
author: '博主'
},
algolia: {
applicationID: '',
apiKey: '',
indexName: '',
hits: {"per_page":10},
labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
}
};
</script>
<link rel="canonical" href="http://johntian.github.io/tags/github-server/"/>
<title> 标签: github server | JohnTian's Blog </title>
</head>
<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">
<script type="text/javascript">
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?d3fbaf1ec4867b4d654eb2c17dad7dc0";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
<div class="container one-collumn sidebar-position-left ">
<div class="headband"></div>
<header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
<div class="header-inner"><div class="site-meta ">
<div class="custom-logo-site-title">
<a href="/" class="brand" rel="start">
<span class="logo-line-before"><i></i></span>
<span class="site-title">JohnTian's Blog</span>
<span class="logo-line-after"><i></i></span>
</a>
</div>
<p class="site-subtitle">Macroworld</p>
</div>
<div class="site-nav-toggle">
<button>
<span class="btn-bar"></span>
<span class="btn-bar"></span>
<span class="btn-bar"></span>
</button>
</div>
<nav class="site-nav">
<ul id="menu" class="menu">
<li class="menu-item menu-item-home">
<a href="/" rel="section">
<i class="menu-item-icon fa fa-fw fa-home"></i> <br />
首页
</a>
</li>
<li class="menu-item menu-item-categories">
<a href="/categories" rel="section">
<i class="menu-item-icon fa fa-fw fa-th"></i> <br />
分类
</a>
</li>
<li class="menu-item menu-item-about">
<a href="/about" rel="section">
<i class="menu-item-icon fa fa-fw fa-user"></i> <br />
关于
</a>
</li>
<li class="menu-item menu-item-archives">
<a href="/archives" rel="section">
<i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
归档
</a>
</li>
<li class="menu-item menu-item-tags">
<a href="/tags" rel="section">
<i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
标签
</a>
</li>
<li class="menu-item menu-item-sitemap">
<a href="/sitemap.xml" rel="section">
<i class="menu-item-icon fa fa-fw fa-sitemap"></i> <br />
Sitemap
</a>
</li>
<li class="menu-item menu-item-commonweal">
<a href="/404.html" rel="section">
<i class="menu-item-icon fa fa-fw fa-heartbeat"></i> <br />
公益404
</a>
</li>
<li class="menu-item menu-item-search">
<a href="javascript:;" class="popup-trigger">
<i class="menu-item-icon fa fa-search fa-fw"></i> <br />
搜索
</a>
</li>
</ul>
<div class="site-search">
<div class="popup">
<span class="search-icon fa fa-search"></span>
<input type="text" id="local-search-input">
<div id="local-search-result"></div>
<span class="popup-btn-close">close</span>
</div>
</div>
</nav>
</div>
</header>
<main id="main" class="main">
<div class="main-inner">
<div class="content-wrap">
<div id="content" class="content">
<div id="posts" class="posts-collapse">
<div class="collection-title">
<h2 >
github server
<small>标签</small>
</h2>
</div>
<article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
<header class="post-header">
<h1 class="post-title">
<a class="post-title-link" href="/2016/01/28/2016-01-28-Set_up_Git_server/" itemprop="url">
<span itemprop="name">Set up Git server</span>
</a>
</h1>
<div class="post-meta">
<time class="post-time" itemprop="dateCreated"
datetime="2016-01-28T00:00:00+08:00"
content="2016-01-28" >
01-28
</time>
</div>
</header>
</article>
</div>
</div>
</div>
<div class="sidebar-toggle">
<div class="sidebar-toggle-line-wrap">
<span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
<span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
<span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
</div>
</div>
<aside id="sidebar" class="sidebar">
<div class="sidebar-inner">
<section class="site-overview sidebar-panel sidebar-panel-active">
<div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
<img class="site-author-image" itemprop="image"
src="/asset/img/dog.jpg"
alt="JohnTian" />
<p class="site-author-name" itemprop="name">JohnTian</p>
<p class="site-description motion-element" itemprop="description">A dog who loves open source, and would like to share knowledge about IT.</p>
</div>
<nav class="site-state motion-element">
<div class="site-state-item site-state-posts">
<a href="/archives">
<span class="site-state-item-count">10</span>
<span class="site-state-item-name">日志</span>
</a>
</div>
<div class="site-state-item site-state-categories">
<a href="/categories">
<span class="site-state-item-count">5</span>
<span class="site-state-item-name">分类</span>
</a>
</div>
<div class="site-state-item site-state-tags">
<a href="/tags">
<span class="site-state-item-count">16</span>
<span class="site-state-item-name">标签</span>
</a>
</div>
</nav>
<div class="feed-link motion-element">
<a href="/atom.xml" rel="alternate">
<i class="fa fa-rss"></i>
RSS
</a>
</div>
<div class="links-of-author motion-element">
<span class="links-of-author-item">
<a href="https://github.com/JohnTian" target="_blank" title="GitHub">
<i class="fa fa-fw fa-github"></i>
GitHub
</a>
</span>
<span class="links-of-author-item">
<a href="http://weibo.com/tianzhaixing2012" target="_blank" title="Weibo">
<i class="fa fa-fw fa-weibo"></i>
Weibo
</a>
</span>
<span class="links-of-author-item">
<a href="https://www.linkedin.com/in/tianzhaixing" target="_blank" title="Linkedin">
<i class="fa fa-fw fa-linkedin"></i>
Linkedin
</a>
</span>
<span class="links-of-author-item">
<a href="http://blog.csdn.net/tianzhaixing2013" target="_blank" title="Csdn">
<i class="fa fa-fw fa-globe"></i>
Csdn
</a>
</span>
</div>
</section>
</div>
</aside>
</div>
</main>
<footer id="footer" class="footer">
<div class="footer-inner">
<div class="copyright" >
©
<span itemprop="copyrightYear">2017</span>
<span class="with-love">
<i class="fa fa-heart"></i>
</span>
<span class="author" itemprop="copyrightHolder">JohnTian</span>
</div>
<div class="powered-by">
由 <a class="theme-link" href="https://hexo.io">Hexo</a> 强力驱动
</div>
<div class="theme-info">
主题 -
<a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">
NexT.Pisces
</a>
</div>
</div>
</footer>
<div class="back-to-top">
<i class="fa fa-arrow-up"></i>
</div>
</div>
<script type="text/javascript">
if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
window.Promise = null;
}
</script>
<script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
<script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
<script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
<script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
<script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
<script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
<script type="text/javascript" src="/js/src/utils.js?v=5.1.0"></script>
<script type="text/javascript" src="/js/src/motion.js?v=5.1.0"></script>
<script type="text/javascript" src="/js/src/affix.js?v=5.1.0"></script>
<script type="text/javascript" src="/js/src/schemes/pisces.js?v=5.1.0"></script>
<script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.0"></script>
<script type="text/javascript">
var duoshuoQuery = {short_name:"tianzhaixing"};
(function() {
var ds = document.createElement('script');
ds.type = 'text/javascript';ds.async = true;
ds.id = 'duoshuo-script';
ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
ds.charset = 'UTF-8';
(document.getElementsByTagName('head')[0]
|| document.getElementsByTagName('body')[0]).appendChild(ds);
})();
</script>
<script src="/lib/ua-parser-js/dist/ua-parser.min.js?v=0.7.9"></script>
<script src="/js/src/hook-duoshuo.js"></script>
<script type="text/javascript">
// Popup Window;
var isfetched = false;
// Search DB path;
var search_path = "search.xml";
if (search_path.length == 0) {
search_path = "search.xml";
}
var path = "/" + search_path;
// monitor main search box;
function proceedsearch() {
$("body").append('<div class="popoverlay">').css('overflow', 'hidden');
$('.popup').toggle();
}
// search function;
var searchFunc = function(path, search_id, content_id) {
'use strict';
$.ajax({
url: path,
dataType: "xml",
async: true,
success: function( xmlResponse ) {
// get the contents from search data
isfetched = true;
$('.popup').detach().appendTo('.header-inner');
var datas = $( "entry", xmlResponse ).map(function() {
return {
title: $( "title", this ).text(),
content: $("content",this).text(),
url: $( "url" , this).text()
};
}).get();
var $input = document.getElementById(search_id);
var $resultContent = document.getElementById(content_id);
$input.addEventListener('input', function(){
var matchcounts = 0;
var str='<ul class=\"search-result-list\">';
var keywords = this.value.trim().toLowerCase().split(/[\s\-]+/);
$resultContent.innerHTML = "";
if (this.value.trim().length > 1) {
// perform local searching
datas.forEach(function(data) {
var isMatch = false;
var content_index = [];
var data_title = data.title.trim().toLowerCase();
var data_content = data.content.trim().replace(/<[^>]+>/g,"").toLowerCase();
var data_url = decodeURIComponent(data.url);
var index_title = -1;
var index_content = -1;
var first_occur = -1;
// only match artiles with not empty titles and contents
if(data_title != '') {
keywords.forEach(function(keyword, i) {
index_title = data_title.indexOf(keyword);
index_content = data_content.indexOf(keyword);
if( index_title >= 0 || index_content >= 0 ){
isMatch = true;
if (i == 0) {
first_occur = index_content;
}
}
});
}
// show search results
if (isMatch) {
matchcounts += 1;
str += "<li><a href='"+ data_url +"' class='search-result-title'>"+ data_title +"</a>";
var content = data.content.trim().replace(/<[^>]+>/g,"");
if (first_occur >= 0) {
// cut out 100 characters
var start = first_occur - 20;
var end = first_occur + 80;
if(start < 0){
start = 0;
}
if(start == 0){
end = 50;
}
if(end > content.length){
end = content.length;
}
var match_content = content.substring(start, end);
// highlight all keywords
keywords.forEach(function(keyword){
var regS = new RegExp(keyword, "gi");
match_content = match_content.replace(regS, "<b class=\"search-keyword\">"+keyword+"</b>");
});
str += "<p class=\"search-result\">" + match_content +"...</p>"
}
str += "</li>";
}
})};
str += "</ul>";
if (matchcounts == 0) { str = '<div id="no-result"><i class="fa fa-frown-o fa-5x" /></div>' }
if (keywords == "") { str = '<div id="no-result"><i class="fa fa-search fa-5x" /></div>' }
$resultContent.innerHTML = str;
});
proceedsearch();
}
});}
// handle and trigger popup window;
$('.popup-trigger').click(function(e) {
e.stopPropagation();
if (isfetched == false) {
searchFunc(path, 'local-search-input', 'local-search-result');
} else {
proceedsearch();
};
});
$('.popup-btn-close').click(function(e){
$('.popup').hide();
$(".popoverlay").remove();
$('body').css('overflow', '');
});
$('.popup').click(function(e){
e.stopPropagation();
});
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
processEscapes: true,
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
}
});
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Queue(function() {
var all = MathJax.Hub.getAllJax(), i;
for (i=0; i < all.length; i += 1) {
all[i].SourceElement().parentNode.className += ' has-jax';
}
});
</script>
<script type="text/javascript" src="//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
</body>
</html>
<a href="https://github.com/JohnTian/JohnTian.github.io"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/e7bbb0521b397edbd5fe43e7f760759336b5e05f/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f677265656e5f3030373230302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_green_007200.png"></a>
| {
"content_hash": "7df871d51130e2348e47e6a4809aa92e",
"timestamp": "",
"source": "github",
"line_count": 812,
"max_line_length": 459,
"avg_line_length": 23.99137931034483,
"alnum_prop": 0.5072121554334993,
"repo_name": "JohnTian/JohnTian.github.io",
"id": "02784498c26237c36dabb2f789c22ec137a072a7",
"size": "19547",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "tags/github-server/index.html",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "58514"
},
{
"name": "HTML",
"bytes": "10300833"
},
{
"name": "JavaScript",
"bytes": "332344"
}
],
"symlink_target": ""
} |
namespace Minuteman
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
public class EventActivity : Activity<EventActivitySubscriptionInfo>,
IEventActivity
{
private static readonly string EventsKeyName =
typeof(EventActivity).Name;
public EventActivity() : this(new ActivitySettings())
{
}
public EventActivity(ActivitySettings settings) : base(settings)
{
}
protected override string Prefix
{
get { return EventsKeyName; }
}
public virtual async Task<long> Track(
string eventName,
ActivityTimeframe timeframe,
DateTime timestamp,
bool publishable)
{
// There are three tasks that we have to do here.
// First, we have to maintain a list of events that has
// been tracked, so that, the same event list can be
// returned in the EventName method. Next. we also have to
// maintain another list that is for time frames of the event,
// please note that we are only going to maintain
// the explicit timeframes, the Timeframes method returns the
// explicit tracked timeframes for a given event name.
// Second, increase the count for the matching timeframe. And at
// last publish the event to redis so that the subscriber can be
// notified.
Validation.ValidateEventName(eventName);
var eventsKey = GenerateKey();
var publishedEventsKey = eventsKey +
Settings.KeySeparator +
"published";
var key = GenerateKey(eventName, timeframe.ToString());
var fields = GenerateTimeframeFields(timeframe, timestamp).ToList();
var db = Settings.Db;
using (var connection = await ConnectionFactories.Open())
{
var eventTasks = new List<Task>
{
connection.Sets.Add(db, eventsKey, eventName),
connection.Sets.Add(
db,
eventsKey + Settings.KeySeparator + eventName,
timeframe.ToString())
};
if (publishable)
{
eventTasks.Add(
connection.Sets.Add(
db,
publishedEventsKey,
eventName));
}
await Task.WhenAll(eventTasks);
var fieldTasks = fields
.Select(field => connection.Hashes
.Increment(db, key, field))
.ToList();
var counts = await Task.WhenAll(fieldTasks);
var count = counts.ElementAt((int)timeframe);
if (!publishable)
{
return count;
}
var channel = eventsKey +
Settings.KeySeparator +
eventName.ToUpperInvariant();
var payload = new EventActivitySubscriptionInfo
{
EventName = eventName,
Timestamp = timestamp,
Timeframe = timeframe,
Count = counts.ElementAt((int)timeframe)
}.Serialize();
await connection.Publish(channel, payload);
return count;
}
}
public virtual async Task<long[]> Counts(
string eventName,
DateTime startTimestamp,
DateTime endTimestamp,
ActivityTimeframe timeframe)
{
Validation.ValidateEventName(eventName);
var dates = startTimestamp.Range(endTimestamp, timeframe);
var key = GenerateKey(eventName, timeframe.ToString());
var fields = dates.Select(d =>
GenerateTimeframeFields(timeframe, d)
.ElementAt((int)timeframe))
.ToArray();
string[] values;
using (var connection = await ConnectionFactories.Open())
{
values = await connection.Hashes.GetString(
Settings.Db,
key,
fields);
}
var result = values.Select(value =>
value == null ? 0L : long.Parse(value))
.ToArray();
return result;
}
internal IEnumerable<string> GenerateTimeframeFields(
ActivityTimeframe timeframe,
DateTime timestamp)
{
yield return timestamp.FormatYear();
var separator = Settings.KeySeparator;
var type = (int)timeframe;
if (type > (int)ActivityTimeframe.Year)
{
yield return timestamp.FormatYear() +
separator +
timestamp.FormatMonth();
}
if (type > (int)ActivityTimeframe.Month)
{
yield return timestamp.FormatYear() +
separator +
timestamp.FormatMonth() +
separator +
timestamp.FormatDay();
}
if (type > (int)ActivityTimeframe.Day)
{
yield return timestamp.FormatYear() +
separator +
timestamp.FormatMonth() +
separator +
timestamp.FormatDay() +
separator +
timestamp.FormatHour();
}
if (type > (int)ActivityTimeframe.Hour)
{
yield return timestamp.FormatYear() +
separator +
timestamp.FormatMonth() +
separator +
timestamp.FormatDay() +
separator +
timestamp.FormatHour() +
separator +
timestamp.FormatMinute();
}
if (type > (int)ActivityTimeframe.Minute)
{
yield return timestamp.FormatYear() +
separator +
timestamp.FormatMonth() +
separator +
timestamp.FormatDay() +
separator +
timestamp.FormatHour() +
separator +
timestamp.FormatMinute() +
separator +
timestamp.FormatSecond();
}
}
}
} | {
"content_hash": "651f70e0be31343e231d0a3662321d92",
"timestamp": "",
"source": "github",
"line_count": 207,
"max_line_length": 80,
"avg_line_length": 32.90338164251208,
"alnum_prop": 0.47951842607546613,
"repo_name": "kazimanzurrashid/MinutemanDotNet",
"id": "1b2f38c2280544dd0826028cadd4dd1b58b6e3b9",
"size": "6813",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Source/Minuteman/EventActivity.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ASP",
"bytes": "104"
},
{
"name": "C#",
"bytes": "98217"
},
{
"name": "CSS",
"bytes": "208173"
},
{
"name": "JavaScript",
"bytes": "932767"
}
],
"symlink_target": ""
} |
'use strict';
angular.module('gc.appHeaderBackController', [])
.controller('AppHeaderBackController', [
'$scope', '$window',
function AppHeaderBackController($scope, $window) {
$scope.navigateBack = function navigateBack() {
$window.history.back();
};
}
]);
| {
"content_hash": "e159abc62462b6f54ffebb4b611c1bff",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 53,
"avg_line_length": 21.615384615384617,
"alnum_prop": 0.6654804270462633,
"repo_name": "gocardless/ng-gc-components",
"id": "9f1293bb867f5eae9d6f9a190921d6a5c8e99124",
"size": "281",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "ng-gc-app-header-back-directive/app-header-back-controller.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "HTML",
"bytes": "30301"
},
{
"name": "JavaScript",
"bytes": "206449"
}
],
"symlink_target": ""
} |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.5.0_06) on Wed Nov 07 11:45:47 NZDT 2007 -->
<TITLE>
Deprecated List
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="Deprecated List";
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Deprecated</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV
NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="index.html?deprecated-list.html" target="_top"><B>FRAMES</B></A>
<A HREF="deprecated-list.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<CENTER>
<H2>
<B>Deprecated API</B></H2>
</CENTER>
<HR SIZE="4" NOSHADE>
<B>Contents</B><UL>
</UL>
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Deprecated</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV
NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="index.html?deprecated-list.html" target="_top"><B>FRAMES</B></A>
<A HREF="deprecated-list.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>
| {
"content_hash": "008b96eae83982010626a7a5e7fa7b43",
"timestamp": "",
"source": "github",
"line_count": 142,
"max_line_length": 143,
"avg_line_length": 35.07746478873239,
"alnum_prop": 0.6330054205982735,
"repo_name": "taolee/XmlDataAnalysisToolsets",
"id": "5748e3970bd0719dad5ffd3e3f672be7960e3c90",
"size": "4981",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "DataAnalysis_SoftwareEngineering/bugc/kea-5.0_full/doc/deprecated-list.html",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "Batchfile",
"bytes": "7088"
},
{
"name": "CSS",
"bytes": "1202"
},
{
"name": "HTML",
"bytes": "921796"
},
{
"name": "Java",
"bytes": "2218958"
},
{
"name": "Matlab",
"bytes": "1504"
},
{
"name": "Python",
"bytes": "27983"
},
{
"name": "Scala",
"bytes": "3144"
}
],
"symlink_target": ""
} |
package com.chilliworks.chillisource.colladaparserutils.colladadata;
public class ColladaUserProperties
{
public String mstrData;
public ColladaUserProperties()
{
mstrData = new String();
}
}
| {
"content_hash": "41c6f05950ca598044ed35986acfe82e",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 68,
"avg_line_length": 15.692307692307692,
"alnum_prop": 0.7745098039215687,
"repo_name": "fjpavm/ChilliSource",
"id": "1604d798f4641647733934c65281ed42b53c8c77",
"size": "1450",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Projects/Tools/ColladaParserUtils/src/com/chilliworks/chillisource/colladaparserutils/colladadata/ColladaUserProperties.java",
"mode": "33261",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "5393929"
},
{
"name": "C++",
"bytes": "8315164"
},
{
"name": "Java",
"bytes": "1552606"
},
{
"name": "Makefile",
"bytes": "19619"
},
{
"name": "Objective-C",
"bytes": "525950"
},
{
"name": "Objective-C++",
"bytes": "250983"
},
{
"name": "Python",
"bytes": "26743"
}
],
"symlink_target": ""
} |
EpLibrary.cs
============
#### Visual C# Utility Library ####
DESCRIPTION
-----------
EpLibrary.cs is a Visual C# utility library that supports to develop an application easier under a [MIT License](http://opensource.org/licenses/mit-license.php).
You will no longer have to create the basic functionalities over and over again.
EpLibrary.cs supports Visual C# 2012.
Source can be downloaded at [EpLibrary](http://github.com/juhgiyo/eplibrary.cs)
Nuget Package
------------
[Nuget Package](https://www.nuget.org/packages/EpLibrary.cs/)
FEATURES
--------
* Math Framework
1. Prime Number Operation
* Container Framework
1. ThreadSafeQueue
2. ThreadSafePQueue
3. PriorityQueue
4. Pair
5. Triple
* FileSystem Framework
1. Folder Operation
2. Properties File Operation
3. Text File Operation
4. Binary File Operation
5. Log Writer
* System Framework
1. Console Operation
2. DateTime Operation
3. Endian Operation
4. Registry Operation
* Thread System
1. Simple Thread Scheduler
2. Thread Class
3. Worker Thread System
* Lock Framework
1. Mutex
2. NoLock
3. InterlockedEx
4. EventEx
* Other Frameworks
1. Singleton Holder
2. WebRequestEx
3. Crypt
4. CmdLineOptions
USAGE
-----
To find the usage examples, please see the [wiki page](https://github.com/juhgiyo/EpLibrary.cs/wiki).
LICENSE
-------
[The MIT License](http://opensource.org/licenses/mit-license.php)
Copyright (c) 2014 Woong Gyu La <[[email protected]](mailto:[email protected])>
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.
| {
"content_hash": "06b7792faea79f029cdec028f620c414",
"timestamp": "",
"source": "github",
"line_count": 92,
"max_line_length": 161,
"avg_line_length": 27.532608695652176,
"alnum_prop": 0.7520726411369917,
"repo_name": "juhgiyo/EpLibrary.cs",
"id": "9db38d0eefd0328bd8a10213a78c21a34c1a44a9",
"size": "2533",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "README.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "1710751"
},
{
"name": "Smalltalk",
"bytes": "6398"
}
],
"symlink_target": ""
} |
/*
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
*/
#ifndef _SAMD21J16A_
#define _SAMD21J16A_
/**
* \ingroup SAMD21_definitions
* \addtogroup SAMD21J16A_definitions SAMD21J16A definitions
* This file defines all structures and symbols for SAMD21J16A:
* - registers and bitfields
* - peripheral base address
* - peripheral ID
* - PIO definitions
*/
/*@{*/
#ifdef __cplusplus
extern "C" {
#endif
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
#include <stdint.h>
#ifndef __cplusplus
typedef volatile const uint32_t RoReg; /**< Read only 32-bit register (volatile const unsigned int) */
typedef volatile const uint16_t RoReg16; /**< Read only 16-bit register (volatile const unsigned int) */
typedef volatile const uint8_t RoReg8; /**< Read only 8-bit register (volatile const unsigned int) */
#else
typedef volatile uint32_t RoReg; /**< Read only 32-bit register (volatile const unsigned int) */
typedef volatile uint16_t RoReg16; /**< Read only 16-bit register (volatile const unsigned int) */
typedef volatile uint8_t RoReg8; /**< Read only 8-bit register (volatile const unsigned int) */
#endif
typedef volatile uint32_t WoReg; /**< Write only 32-bit register (volatile unsigned int) */
typedef volatile uint16_t WoReg16; /**< Write only 16-bit register (volatile unsigned int) */
typedef volatile uint32_t WoReg8; /**< Write only 8-bit register (volatile unsigned int) */
typedef volatile uint32_t RwReg; /**< Read-Write 32-bit register (volatile unsigned int) */
typedef volatile uint16_t RwReg16; /**< Read-Write 16-bit register (volatile unsigned int) */
typedef volatile uint8_t RwReg8; /**< Read-Write 8-bit register (volatile unsigned int) */
#define CAST(type, value) ((type *)(value))
#define REG_ACCESS(type, address) (*(type*)(address)) /**< C code: Register value */
#else
#define CAST(type, value) (value)
#define REG_ACCESS(type, address) (address) /**< Assembly code: Register address */
#endif
/* ************************************************************************** */
/** CMSIS DEFINITIONS FOR SAMD21J16A */
/* ************************************************************************** */
/** \defgroup SAMD21J16A_cmsis CMSIS Definitions */
/*@{*/
/** Interrupt Number Definition */
typedef enum IRQn
{
/****** Cortex-M0+ Processor Exceptions Numbers ******************************/
NonMaskableInt_IRQn = -14,/**< 2 Non Maskable Interrupt */
HardFault_IRQn = -13,/**< 3 Cortex-M0+ Hard Fault Interrupt */
SVCall_IRQn = -5, /**< 11 Cortex-M0+ SV Call Interrupt */
PendSV_IRQn = -2, /**< 14 Cortex-M0+ Pend SV Interrupt */
SysTick_IRQn = -1, /**< 15 Cortex-M0+ System Tick Interrupt */
/****** SAMD21J16A-specific Interrupt Numbers ***********************/
PM_IRQn = 0, /**< 0 SAMD21J16A Power Manager (PM) */
SYSCTRL_IRQn = 1, /**< 1 SAMD21J16A System Control (SYSCTRL) */
WDT_IRQn = 2, /**< 2 SAMD21J16A Watchdog Timer (WDT) */
RTC_IRQn = 3, /**< 3 SAMD21J16A Real-Time Counter (RTC) */
EIC_IRQn = 4, /**< 4 SAMD21J16A External Interrupt Controller (EIC) */
NVMCTRL_IRQn = 5, /**< 5 SAMD21J16A Non-Volatile Memory Controller (NVMCTRL) */
DMAC_IRQn = 6, /**< 6 SAMD21J16A Direct Memory Access Controller (DMAC) */
USB_IRQn = 7, /**< 7 SAMD21J16A Universal Serial Bus (USB) */
EVSYS_IRQn = 8, /**< 8 SAMD21J16A Event System Interface (EVSYS) */
SERCOM0_IRQn = 9, /**< 9 SAMD21J16A Serial Communication Interface 0 (SERCOM0) */
SERCOM1_IRQn = 10, /**< 10 SAMD21J16A Serial Communication Interface 1 (SERCOM1) */
SERCOM2_IRQn = 11, /**< 11 SAMD21J16A Serial Communication Interface 2 (SERCOM2) */
SERCOM3_IRQn = 12, /**< 12 SAMD21J16A Serial Communication Interface 3 (SERCOM3) */
SERCOM4_IRQn = 13, /**< 13 SAMD21J16A Serial Communication Interface 4 (SERCOM4) */
SERCOM5_IRQn = 14, /**< 14 SAMD21J16A Serial Communication Interface 5 (SERCOM5) */
TCC0_IRQn = 15, /**< 15 SAMD21J16A Timer Counter Control 0 (TCC0) */
TCC1_IRQn = 16, /**< 16 SAMD21J16A Timer Counter Control 1 (TCC1) */
TCC2_IRQn = 17, /**< 17 SAMD21J16A Timer Counter Control 2 (TCC2) */
TC3_IRQn = 18, /**< 18 SAMD21J16A Basic Timer Counter 3 (TC3) */
TC4_IRQn = 19, /**< 19 SAMD21J16A Basic Timer Counter 4 (TC4) */
TC5_IRQn = 20, /**< 20 SAMD21J16A Basic Timer Counter 5 (TC5) */
TC6_IRQn = 21, /**< 21 SAMD21J16A Basic Timer Counter 6 (TC6) */
TC7_IRQn = 22, /**< 22 SAMD21J16A Basic Timer Counter 7 (TC7) */
ADC_IRQn = 23, /**< 23 SAMD21J16A Analog Digital Converter (ADC) */
AC_IRQn = 24, /**< 24 SAMD21J16A Analog Comparators (AC) */
DAC_IRQn = 25, /**< 25 SAMD21J16A Digital Analog Converter (DAC) */
PTC_IRQn = 26, /**< 26 SAMD21J16A Peripheral Touch Controller (PTC) */
I2S_IRQn = 27, /**< 27 SAMD21J16A Inter-IC Sound Interface (I2S) */
PERIPH_COUNT_IRQn = 28 /**< Number of peripheral IDs */
} IRQn_Type;
typedef struct _DeviceVectors
{
/* Stack pointer */
void* pvStack;
/* Cortex-M handlers */
void* pfnReset_Handler;
void* pfnNMI_Handler;
void* pfnHardFault_Handler;
void* pfnReservedM12;
void* pfnReservedM11;
void* pfnReservedM10;
void* pfnReservedM9;
void* pfnReservedM8;
void* pfnReservedM7;
void* pfnReservedM6;
void* pfnSVC_Handler;
void* pfnReservedM4;
void* pfnReservedM3;
void* pfnPendSV_Handler;
void* pfnSysTick_Handler;
/* Peripheral handlers */
void* pfnPM_Handler; /* 0 Power Manager */
void* pfnSYSCTRL_Handler; /* 1 System Control */
void* pfnWDT_Handler; /* 2 Watchdog Timer */
void* pfnRTC_Handler; /* 3 Real-Time Counter */
void* pfnEIC_Handler; /* 4 External Interrupt Controller */
void* pfnNVMCTRL_Handler; /* 5 Non-Volatile Memory Controller */
void* pfnDMAC_Handler; /* 6 Direct Memory Access Controller */
void* pfnUSB_Handler; /* 7 Universal Serial Bus */
void* pfnEVSYS_Handler; /* 8 Event System Interface */
void* pfnSERCOM0_Handler; /* 9 Serial Communication Interface 0 */
void* pfnSERCOM1_Handler; /* 10 Serial Communication Interface 1 */
void* pfnSERCOM2_Handler; /* 11 Serial Communication Interface 2 */
void* pfnSERCOM3_Handler; /* 12 Serial Communication Interface 3 */
void* pfnSERCOM4_Handler; /* 13 Serial Communication Interface 4 */
void* pfnSERCOM5_Handler; /* 14 Serial Communication Interface 5 */
void* pfnTCC0_Handler; /* 15 Timer Counter Control 0 */
void* pfnTCC1_Handler; /* 16 Timer Counter Control 1 */
void* pfnTCC2_Handler; /* 17 Timer Counter Control 2 */
void* pfnTC3_Handler; /* 18 Basic Timer Counter 3 */
void* pfnTC4_Handler; /* 19 Basic Timer Counter 4 */
void* pfnTC5_Handler; /* 20 Basic Timer Counter 5 */
void* pfnTC6_Handler; /* 21 Basic Timer Counter 6 */
void* pfnTC7_Handler; /* 22 Basic Timer Counter 7 */
void* pfnADC_Handler; /* 23 Analog Digital Converter */
void* pfnAC_Handler; /* 24 Analog Comparators */
void* pfnDAC_Handler; /* 25 Digital Analog Converter */
void* pfnPTC_Handler; /* 26 Peripheral Touch Controller */
void* pfnI2S_Handler; /* 27 Inter-IC Sound Interface */
} DeviceVectors;
/* Cortex-M0+ processor handlers */
void Reset_Handler ( void );
void NMI_Handler ( void );
void HardFault_Handler ( void );
void SVC_Handler ( void );
void PendSV_Handler ( void );
void SysTick_Handler ( void );
/* Peripherals handlers */
void PM_Handler ( void );
void SYSCTRL_Handler ( void );
void WDT_Handler ( void );
void RTC_Handler ( void );
void EIC_Handler ( void );
void NVMCTRL_Handler ( void );
void DMAC_Handler ( void );
void USB_Handler ( void );
void EVSYS_Handler ( void );
void SERCOM0_Handler ( void );
void SERCOM1_Handler ( void );
void SERCOM2_Handler ( void );
void SERCOM3_Handler ( void );
void SERCOM4_Handler ( void );
void SERCOM5_Handler ( void );
void TCC0_Handler ( void );
void TCC1_Handler ( void );
void TCC2_Handler ( void );
void TC3_Handler ( void );
void TC4_Handler ( void );
void TC5_Handler ( void );
void TC6_Handler ( void );
void TC7_Handler ( void );
void ADC_Handler ( void );
void AC_Handler ( void );
void DAC_Handler ( void );
void PTC_Handler ( void );
void I2S_Handler ( void );
/*
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
*/
#define LITTLE_ENDIAN 1
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
#define __MPU_PRESENT 0 /*!< MPU present or not */
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */
#define __VTOR_PRESENT 1 /*!< VTOR present or not */
#define __Vendor_SysTickConfig 0 /*!< Set to 1 if different SysTick Config is used */
/**
* \brief CMSIS includes
*/
#include <core_cm0plus.h>
#if !defined DONT_USE_CMSIS_INIT
#include "system_samd21.h"
#endif /* DONT_USE_CMSIS_INIT */
/*@}*/
/* ************************************************************************** */
/** SOFTWARE PERIPHERAL API DEFINITION FOR SAMD21J16A */
/* ************************************************************************** */
/** \defgroup SAMD21J16A_api Peripheral Software API */
/*@{*/
#include "component/ac.h"
#include "component/adc.h"
#include "component/dac.h"
#include "component/dmac.h"
#include "component/dsu.h"
#include "component/eic.h"
#include "component/evsys.h"
#include "component/gclk.h"
#include "component/hmatrixb.h"
#include "component/i2s.h"
#include "component/mtb.h"
#include "component/nvmctrl.h"
#include "component/pac.h"
#include "component/pm.h"
#include "component/port.h"
#include "component/rtc.h"
#include "component/sercom.h"
#include "component/sysctrl.h"
#include "component/tc.h"
#include "component/tcc.h"
#include "component/usb.h"
#include "component/wdt.h"
/*@}*/
/* ************************************************************************** */
/** REGISTERS ACCESS DEFINITIONS FOR SAMD21J16A */
/* ************************************************************************** */
/** \defgroup SAMD21J16A_reg Registers Access Definitions */
/*@{*/
#include "instance/ac.h"
#include "instance/adc.h"
#include "instance/dac.h"
#include "instance/dmac.h"
#include "instance/dsu.h"
#include "instance/eic.h"
#include "instance/evsys.h"
#include "instance/gclk.h"
#include "instance/sbmatrix.h"
#include "instance/i2s.h"
#include "instance/mtb.h"
#include "instance/nvmctrl.h"
#include "instance/pac0.h"
#include "instance/pac1.h"
#include "instance/pac2.h"
#include "instance/pm.h"
#include "instance/port.h"
#include "instance/rtc.h"
#include "instance/sercom0.h"
#include "instance/sercom1.h"
#include "instance/sercom2.h"
#include "instance/sercom3.h"
#include "instance/sercom4.h"
#include "instance/sercom5.h"
#include "instance/sysctrl.h"
#include "instance/tc3.h"
#include "instance/tc4.h"
#include "instance/tc5.h"
#include "instance/tc6.h"
#include "instance/tc7.h"
#include "instance/tcc0.h"
#include "instance/tcc1.h"
#include "instance/tcc2.h"
#include "instance/usb.h"
#include "instance/wdt.h"
/*@}*/
/* ************************************************************************** */
/** PERIPHERAL ID DEFINITIONS FOR SAMD21J16A */
/* ************************************************************************** */
/** \defgroup SAMD21J16A_id Peripheral Ids Definitions */
/*@{*/
// Peripheral instances on HPB0 bridge
#define ID_PAC0 0 /**< \brief Peripheral Access Controller 0 (PAC0) */
#define ID_PM 1 /**< \brief Power Manager (PM) */
#define ID_SYSCTRL 2 /**< \brief System Control (SYSCTRL) */
#define ID_GCLK 3 /**< \brief Generic Clock Generator (GCLK) */
#define ID_WDT 4 /**< \brief Watchdog Timer (WDT) */
#define ID_RTC 5 /**< \brief Real-Time Counter (RTC) */
#define ID_EIC 6 /**< \brief External Interrupt Controller (EIC) */
// Peripheral instances on HPB1 bridge
#define ID_PAC1 32 /**< \brief Peripheral Access Controller 1 (PAC1) */
#define ID_DSU 33 /**< \brief Device Service Unit (DSU) */
#define ID_NVMCTRL 34 /**< \brief Non-Volatile Memory Controller (NVMCTRL) */
#define ID_PORT 35 /**< \brief Port Module (PORT) */
#define ID_DMAC 36 /**< \brief Direct Memory Access Controller (DMAC) */
#define ID_USB 37 /**< \brief Universal Serial Bus (USB) */
#define ID_MTB 38 /**< \brief Cortex-M0+ Micro-Trace Buffer (MTB) */
#define ID_SBMATRIX 39 /**< \brief HSB Matrix (SBMATRIX) */
// Peripheral instances on HPB2 bridge
#define ID_PAC2 64 /**< \brief Peripheral Access Controller 2 (PAC2) */
#define ID_EVSYS 65 /**< \brief Event System Interface (EVSYS) */
#define ID_SERCOM0 66 /**< \brief Serial Communication Interface 0 (SERCOM0) */
#define ID_SERCOM1 67 /**< \brief Serial Communication Interface 1 (SERCOM1) */
#define ID_SERCOM2 68 /**< \brief Serial Communication Interface 2 (SERCOM2) */
#define ID_SERCOM3 69 /**< \brief Serial Communication Interface 3 (SERCOM3) */
#define ID_SERCOM4 70 /**< \brief Serial Communication Interface 4 (SERCOM4) */
#define ID_SERCOM5 71 /**< \brief Serial Communication Interface 5 (SERCOM5) */
#define ID_TCC0 72 /**< \brief Timer Counter Control 0 (TCC0) */
#define ID_TCC1 73 /**< \brief Timer Counter Control 1 (TCC1) */
#define ID_TCC2 74 /**< \brief Timer Counter Control 2 (TCC2) */
#define ID_TC3 75 /**< \brief Basic Timer Counter 3 (TC3) */
#define ID_TC4 76 /**< \brief Basic Timer Counter 4 (TC4) */
#define ID_TC5 77 /**< \brief Basic Timer Counter 5 (TC5) */
#define ID_TC6 78 /**< \brief Basic Timer Counter 6 (TC6) */
#define ID_TC7 79 /**< \brief Basic Timer Counter 7 (TC7) */
#define ID_ADC 80 /**< \brief Analog Digital Converter (ADC) */
#define ID_AC 81 /**< \brief Analog Comparators (AC) */
#define ID_DAC 82 /**< \brief Digital Analog Converter (DAC) */
#define ID_PTC 83 /**< \brief Peripheral Touch Controller (PTC) */
#define ID_I2S 84 /**< \brief Inter-IC Sound Interface (I2S) */
#define ID_PERIPH_COUNT 85 /**< \brief Number of peripheral IDs */
/*@}*/
/* ************************************************************************** */
/** BASE ADDRESS DEFINITIONS FOR SAMD21J16A */
/* ************************************************************************** */
/** \defgroup SAMD21J16A_base Peripheral Base Address Definitions */
/*@{*/
#if defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)
#define AC (0x42004400UL) /**< \brief (AC) APB Base Address */
#define ADC (0x42004000UL) /**< \brief (ADC) APB Base Address */
#define DAC (0x42004800UL) /**< \brief (DAC) APB Base Address */
#define DMAC (0x41004800UL) /**< \brief (DMAC) APB Base Address */
#define DSU (0x41002000UL) /**< \brief (DSU) APB Base Address */
#define EIC (0x40001800UL) /**< \brief (EIC) APB Base Address */
#define EVSYS (0x42000400UL) /**< \brief (EVSYS) APB Base Address */
#define GCLK (0x40000C00UL) /**< \brief (GCLK) APB Base Address */
#define SBMATRIX (0x41007000UL) /**< \brief (SBMATRIX) APB Base Address */
#define I2S (0x42005000UL) /**< \brief (I2S) APB Base Address */
#define MTB (0x41006000UL) /**< \brief (MTB) APB Base Address */
#define NVMCTRL (0x41004000UL) /**< \brief (NVMCTRL) APB Base Address */
#define NVMCTRL_CAL (0x00800000UL) /**< \brief (NVMCTRL) CAL Base Address */
#define NVMCTRL_LOCKBIT (0x00802000UL) /**< \brief (NVMCTRL) LOCKBIT Base Address */
#define NVMCTRL_OTP1 (0x00806000UL) /**< \brief (NVMCTRL) OTP1 Base Address */
#define NVMCTRL_OTP2 (0x00806008UL) /**< \brief (NVMCTRL) OTP2 Base Address */
#define NVMCTRL_OTP4 (0x00806020UL) /**< \brief (NVMCTRL) OTP4 Base Address */
#define NVMCTRL_TEMP_LOG (0x00806030UL) /**< \brief (NVMCTRL) TEMP_LOG Base Address */
#define NVMCTRL_USER (0x00804000UL) /**< \brief (NVMCTRL) USER Base Address */
#define PAC0 (0x40000000UL) /**< \brief (PAC0) APB Base Address */
#define PAC1 (0x41000000UL) /**< \brief (PAC1) APB Base Address */
#define PAC2 (0x42000000UL) /**< \brief (PAC2) APB Base Address */
#define PM (0x40000400UL) /**< \brief (PM) APB Base Address */
#define PORT (0x41004400UL) /**< \brief (PORT) APB Base Address */
#define PORT_IOBUS (0x60000000UL) /**< \brief (PORT) IOBUS Base Address */
#define RTC (0x40001400UL) /**< \brief (RTC) APB Base Address */
#define SERCOM0 (0x42000800UL) /**< \brief (SERCOM0) APB Base Address */
#define SERCOM1 (0x42000C00UL) /**< \brief (SERCOM1) APB Base Address */
#define SERCOM2 (0x42001000UL) /**< \brief (SERCOM2) APB Base Address */
#define SERCOM3 (0x42001400UL) /**< \brief (SERCOM3) APB Base Address */
#define SERCOM4 (0x42001800UL) /**< \brief (SERCOM4) APB Base Address */
#define SERCOM5 (0x42001C00UL) /**< \brief (SERCOM5) APB Base Address */
#define SYSCTRL (0x40000800UL) /**< \brief (SYSCTRL) APB Base Address */
#define TC3 (0x42002C00UL) /**< \brief (TC3) APB Base Address */
#define TC4 (0x42003000UL) /**< \brief (TC4) APB Base Address */
#define TC5 (0x42003400UL) /**< \brief (TC5) APB Base Address */
#define TC6 (0x42003800UL) /**< \brief (TC6) APB Base Address */
#define TC7 (0x42003C00UL) /**< \brief (TC7) APB Base Address */
#define TCC0 (0x42002000UL) /**< \brief (TCC0) APB Base Address */
#define TCC1 (0x42002400UL) /**< \brief (TCC1) APB Base Address */
#define TCC2 (0x42002800UL) /**< \brief (TCC2) APB Base Address */
#define USB (0x41005000UL) /**< \brief (USB) APB Base Address */
#define WDT (0x40001000UL) /**< \brief (WDT) APB Base Address */
#else
#define AC ((Ac *)0x42004400UL) /**< \brief (AC) APB Base Address */
#define AC_INST_NUM 1 /**< \brief (AC) Number of instances */
#define AC_INSTS { AC } /**< \brief (AC) Instances List */
#define ADC ((Adc *)0x42004000UL) /**< \brief (ADC) APB Base Address */
#define ADC_INST_NUM 1 /**< \brief (ADC) Number of instances */
#define ADC_INSTS { ADC } /**< \brief (ADC) Instances List */
#define DAC ((Dac *)0x42004800UL) /**< \brief (DAC) APB Base Address */
#define DAC_INST_NUM 1 /**< \brief (DAC) Number of instances */
#define DAC_INSTS { DAC } /**< \brief (DAC) Instances List */
#define DMAC ((Dmac *)0x41004800UL) /**< \brief (DMAC) APB Base Address */
#define DMAC_INST_NUM 1 /**< \brief (DMAC) Number of instances */
#define DMAC_INSTS { DMAC } /**< \brief (DMAC) Instances List */
#define DSU ((Dsu *)0x41002000UL) /**< \brief (DSU) APB Base Address */
#define DSU_INST_NUM 1 /**< \brief (DSU) Number of instances */
#define DSU_INSTS { DSU } /**< \brief (DSU) Instances List */
#define EIC ((Eic *)0x40001800UL) /**< \brief (EIC) APB Base Address */
#define EIC_INST_NUM 1 /**< \brief (EIC) Number of instances */
#define EIC_INSTS { EIC } /**< \brief (EIC) Instances List */
#define EVSYS ((Evsys *)0x42000400UL) /**< \brief (EVSYS) APB Base Address */
#define EVSYS_INST_NUM 1 /**< \brief (EVSYS) Number of instances */
#define EVSYS_INSTS { EVSYS } /**< \brief (EVSYS) Instances List */
#define GCLK ((Gclk *)0x40000C00UL) /**< \brief (GCLK) APB Base Address */
#define GCLK_INST_NUM 1 /**< \brief (GCLK) Number of instances */
#define GCLK_INSTS { GCLK } /**< \brief (GCLK) Instances List */
#define SBMATRIX ((Hmatrixb *)0x41007000UL) /**< \brief (SBMATRIX) APB Base Address */
#define HMATRIXB_INST_NUM 1 /**< \brief (HMATRIXB) Number of instances */
#define HMATRIXB_INSTS { SBMATRIX } /**< \brief (HMATRIXB) Instances List */
#define I2S ((I2s *)0x42005000UL) /**< \brief (I2S) APB Base Address */
#define I2S_INST_NUM 1 /**< \brief (I2S) Number of instances */
#define I2S_INSTS { I2S } /**< \brief (I2S) Instances List */
#define MTB ((Mtb *)0x41006000UL) /**< \brief (MTB) APB Base Address */
#define MTB_INST_NUM 1 /**< \brief (MTB) Number of instances */
#define MTB_INSTS { MTB } /**< \brief (MTB) Instances List */
#define NVMCTRL ((Nvmctrl *)0x41004000UL) /**< \brief (NVMCTRL) APB Base Address */
#define NVMCTRL_CAL (0x00800000UL) /**< \brief (NVMCTRL) CAL Base Address */
#define NVMCTRL_LOCKBIT (0x00802000UL) /**< \brief (NVMCTRL) LOCKBIT Base Address */
#define NVMCTRL_OTP1 (0x00806000UL) /**< \brief (NVMCTRL) OTP1 Base Address */
#define NVMCTRL_OTP2 (0x00806008UL) /**< \brief (NVMCTRL) OTP2 Base Address */
#define NVMCTRL_OTP4 (0x00806020UL) /**< \brief (NVMCTRL) OTP4 Base Address */
#define NVMCTRL_TEMP_LOG (0x00806030UL) /**< \brief (NVMCTRL) TEMP_LOG Base Address */
#define NVMCTRL_USER (0x00804000UL) /**< \brief (NVMCTRL) USER Base Address */
#define NVMCTRL_INST_NUM 1 /**< \brief (NVMCTRL) Number of instances */
#define NVMCTRL_INSTS { NVMCTRL } /**< \brief (NVMCTRL) Instances List */
#define PAC0 ((Pac *)0x40000000UL) /**< \brief (PAC0) APB Base Address */
#define PAC1 ((Pac *)0x41000000UL) /**< \brief (PAC1) APB Base Address */
#define PAC2 ((Pac *)0x42000000UL) /**< \brief (PAC2) APB Base Address */
#define PAC_INST_NUM 3 /**< \brief (PAC) Number of instances */
#define PAC_INSTS { PAC0, PAC1, PAC2 } /**< \brief (PAC) Instances List */
#define PM ((Pm *)0x40000400UL) /**< \brief (PM) APB Base Address */
#define PM_INST_NUM 1 /**< \brief (PM) Number of instances */
#define PM_INSTS { PM } /**< \brief (PM) Instances List */
#define PORT ((Port *)0x41004400UL) /**< \brief (PORT) APB Base Address */
#define PORT_IOBUS ((Port *)0x60000000UL) /**< \brief (PORT) IOBUS Base Address */
#define PORT_INST_NUM 1 /**< \brief (PORT) Number of instances */
#define PORT_INSTS { PORT } /**< \brief (PORT) Instances List */
#define PTC_GCLK_ID 34
#define PTC_INST_NUM 1 /**< \brief (PTC) Number of instances */
#define PTC_INSTS { PTC } /**< \brief (PTC) Instances List */
#define RTC ((Rtc *)0x40001400UL) /**< \brief (RTC) APB Base Address */
#define RTC_INST_NUM 1 /**< \brief (RTC) Number of instances */
#define RTC_INSTS { RTC } /**< \brief (RTC) Instances List */
#define SERCOM0 ((Sercom *)0x42000800UL) /**< \brief (SERCOM0) APB Base Address */
#define SERCOM1 ((Sercom *)0x42000C00UL) /**< \brief (SERCOM1) APB Base Address */
#define SERCOM2 ((Sercom *)0x42001000UL) /**< \brief (SERCOM2) APB Base Address */
#define SERCOM3 ((Sercom *)0x42001400UL) /**< \brief (SERCOM3) APB Base Address */
#define SERCOM4 ((Sercom *)0x42001800UL) /**< \brief (SERCOM4) APB Base Address */
#define SERCOM5 ((Sercom *)0x42001C00UL) /**< \brief (SERCOM5) APB Base Address */
#define SERCOM_INST_NUM 6 /**< \brief (SERCOM) Number of instances */
#define SERCOM_INSTS { SERCOM0, SERCOM1, SERCOM2, SERCOM3, SERCOM4, SERCOM5 } /**< \brief (SERCOM) Instances List */
#define SYSCTRL ((Sysctrl *)0x40000800UL) /**< \brief (SYSCTRL) APB Base Address */
#define SYSCTRL_INST_NUM 1 /**< \brief (SYSCTRL) Number of instances */
#define SYSCTRL_INSTS { SYSCTRL } /**< \brief (SYSCTRL) Instances List */
#define TC3 ((Tc *)0x42002C00UL) /**< \brief (TC3) APB Base Address */
#define TC4 ((Tc *)0x42003000UL) /**< \brief (TC4) APB Base Address */
#define TC5 ((Tc *)0x42003400UL) /**< \brief (TC5) APB Base Address */
#define TC6 ((Tc *)0x42003800UL) /**< \brief (TC6) APB Base Address */
#define TC7 ((Tc *)0x42003C00UL) /**< \brief (TC7) APB Base Address */
#define TC_INST_NUM 5 /**< \brief (TC) Number of instances */
#define TC_INSTS { TC3, TC4, TC5, TC6, TC7 } /**< \brief (TC) Instances List */
#define TCC0 ((Tcc *)0x42002000UL) /**< \brief (TCC0) APB Base Address */
#define TCC1 ((Tcc *)0x42002400UL) /**< \brief (TCC1) APB Base Address */
#define TCC2 ((Tcc *)0x42002800UL) /**< \brief (TCC2) APB Base Address */
#define TCC_INST_NUM 3 /**< \brief (TCC) Number of instances */
#define TCC_INSTS { TCC0, TCC1, TCC2 } /**< \brief (TCC) Instances List */
#define USB ((Usb *)0x41005000UL) /**< \brief (USB) APB Base Address */
#define USB_INST_NUM 1 /**< \brief (USB) Number of instances */
#define USB_INSTS { USB } /**< \brief (USB) Instances List */
#define WDT ((Wdt *)0x40001000UL) /**< \brief (WDT) APB Base Address */
#define WDT_INST_NUM 1 /**< \brief (WDT) Number of instances */
#define WDT_INSTS { WDT } /**< \brief (WDT) Instances List */
#endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
/*@}*/
/* ************************************************************************** */
/** PORT DEFINITIONS FOR SAMD21J16A */
/* ************************************************************************** */
/** \defgroup SAMD21J16A_port PORT Definitions */
/*@{*/
#include "pio/samd21j16a.h"
/*@}*/
/* ************************************************************************** */
/** MEMORY MAPPING DEFINITIONS FOR SAMD21J16A */
/* ************************************************************************** */
#define FLASH_SIZE 0x10000UL /* 64 kB */
#define FLASH_PAGE_SIZE 64
#define FLASH_NB_OF_PAGES 1024
#define FLASH_USER_PAGE_SIZE 64
#define HMCRAMC0_SIZE 0x2000UL /* 8 kB */
#define FLASH_ADDR (0x00000000UL) /**< FLASH base address */
#define FLASH_USER_PAGE_ADDR (0x00800000UL) /**< FLASH_USER_PAGE base address */
#define HMCRAMC0_ADDR (0x20000000UL) /**< HMCRAMC0 base address */
#define DSU_DID_RESETVALUE 0x10010002UL
#define EIC_EXTINT_NUM 16
#define PORT_GROUPS 2
/* ************************************************************************** */
/** ELECTRICAL DEFINITIONS FOR SAMD21J16A */
/* ************************************************************************** */
#ifdef __cplusplus
}
#endif
/*@}*/
#endif /* SAMD21J16A_H */
| {
"content_hash": "88e5f5481908138eac9b1d525e3d9799",
"timestamp": "",
"source": "github",
"line_count": 537,
"max_line_length": 121,
"avg_line_length": 55.374301675977655,
"alnum_prop": 0.5359496906107075,
"repo_name": "MDob/Audio-Spectrum-Analyzer",
"id": "084d47f8cd4c1d9da43613f5990e8d6b5fb8304c",
"size": "31490",
"binary": false,
"copies": "4",
"ref": "refs/heads/master",
"path": "audio-spectrum-analyzer/src/ASF/sam0/utils/cmsis/samd21/include/samd21j16a.h",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "5160211"
},
{
"name": "C++",
"bytes": "200915"
},
{
"name": "Makefile",
"bytes": "96619"
}
],
"symlink_target": ""
} |
from ccxt.base.exchange import Exchange
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import AuthenticationError
from ccxt.base.errors import PermissionDenied
from ccxt.base.errors import AccountNotEnabled
from ccxt.base.errors import AccountSuspended
from ccxt.base.errors import ArgumentsRequired
from ccxt.base.errors import BadRequest
from ccxt.base.errors import BadSymbol
from ccxt.base.errors import InsufficientFunds
from ccxt.base.errors import InvalidOrder
from ccxt.base.errors import OrderNotFound
from ccxt.base.errors import CancelPending
from ccxt.base.errors import RateLimitExceeded
from ccxt.base.errors import OnMaintenance
from ccxt.base.decimal_to_precision import TICK_SIZE
class novadax(Exchange):
def describe(self):
return self.deep_extend(super(novadax, self).describe(), {
'id': 'novadax',
'name': 'NovaDAX',
'countries': ['BR'], # Brazil
# 60 requests per second = 1000ms / 60 = 16.6667ms between requests(public endpoints, limited by IP address)
# 20 requests per second => cost = 60 / 20 = 3(private endpoints, limited by API Key)
'rateLimit': 16.6667,
'version': 'v1',
# new metainfo interface
'has': {
'CORS': None,
'spot': True,
'margin': False,
'swap': False,
'future': False,
'option': False,
'addMargin': False,
'cancelOrder': True,
'createOrder': True,
'createReduceOnlyOrder': False,
'createStopLimitOrder': True,
'createStopMarketOrder': True,
'createStopOrder': True,
'fetchAccounts': True,
'fetchBalance': True,
'fetchBorrowRate': False,
'fetchBorrowRateHistories': False,
'fetchBorrowRateHistory': False,
'fetchBorrowRates': False,
'fetchBorrowRatesPerSymbol': False,
'fetchClosedOrders': True,
'fetchDeposits': True,
'fetchFundingHistory': False,
'fetchFundingRate': False,
'fetchFundingRateHistory': False,
'fetchFundingRates': False,
'fetchIndexOHLCV': False,
'fetchLeverage': False,
'fetchLeverageTiers': False,
'fetchMarkets': True,
'fetchMarkOHLCV': False,
'fetchMyTrades': True,
'fetchOHLCV': True,
'fetchOpenInterestHistory': False,
'fetchOpenOrders': True,
'fetchOrder': True,
'fetchOrderBook': True,
'fetchOrders': True,
'fetchOrderTrades': True,
'fetchPosition': False,
'fetchPositions': False,
'fetchPositionsRisk': False,
'fetchPremiumIndexOHLCV': False,
'fetchTicker': True,
'fetchTickers': True,
'fetchTime': True,
'fetchTrades': True,
'fetchTradingFee': False,
'fetchTradingFees': False,
'fetchTransactions': True,
'fetchWithdrawals': True,
'reduceMargin': False,
'setLeverage': False,
'setMarginMode': False,
'setPositionMode': False,
'transfer': True,
'withdraw': True,
},
'timeframes': {
'1m': 'ONE_MIN',
'5m': 'FIVE_MIN',
'15m': 'FIFTEEN_MIN',
'30m': 'HALF_HOU',
'1h': 'ONE_HOU',
'1d': 'ONE_DAY',
'1w': 'ONE_WEE',
'1M': 'ONE_MON',
},
'urls': {
'logo': 'https://user-images.githubusercontent.com/1294454/92337550-2b085500-f0b3-11ea-98e7-5794fb07dd3b.jpg',
'api': {
'public': 'https://api.novadax.com',
'private': 'https://api.novadax.com',
},
'www': 'https://www.novadax.com.br',
'doc': [
'https://doc.novadax.com/pt-BR/',
],
'fees': 'https://www.novadax.com.br/fees-and-limits',
'referral': 'https://www.novadax.com.br/?s=ccxt',
},
'api': {
'public': {
'get': {
'common/symbol': 1.2,
'common/symbols': 1.2,
'common/timestamp': 1.2,
'market/tickers': 1.2,
'market/ticker': 1.2,
'market/depth': 1.2,
'market/trades': 1.2,
'market/kline/history': 1.2,
},
},
'private': {
'get': {
'orders/get': 3,
'orders/list': 3,
'orders/fill': 3,
'orders/fills': 3,
'account/getBalance': 3,
'account/subs': 3,
'account/subs/balance': 3,
'account/subs/transfer/record': 3,
'wallet/query/deposit-withdraw': 3,
},
'post': {
'orders/create': 3,
'orders/cancel': 3,
'account/withdraw/coin': 3,
'account/subs/transfer': 3,
},
},
},
'fees': {
'trading': {
'tierBased': False,
'percentage': True,
'taker': self.parse_number('0.005'),
'maker': self.parse_number('0.0025'),
},
},
'requiredCredentials': {
'apiKey': True,
'secret': True,
},
'precisionMode': TICK_SIZE,
'exceptions': {
'exact': {
'A99999': ExchangeError, # 500 Failed Internal error
# 'A10000': ExchangeError, # 200 Success Successful request
'A10001': BadRequest, # 400 Params error Parameter is invalid
'A10002': ExchangeError, # 404 Api not found API used is irrelevant
'A10003': AuthenticationError, # 403 Authentication failed Authentication is failed
'A10004': RateLimitExceeded, # 429 Too many requests Too many requests are made
'A10005': PermissionDenied, # 403 Kyc required Need to complete KYC firstly
'A10006': AccountSuspended, # 403 Customer canceled Account is canceled
'A10007': AccountNotEnabled, # 400 Account not exist Sub account does not exist
'A10011': BadSymbol, # 400 Symbol not exist Trading symbol does not exist
'A10012': BadSymbol, # 400 Symbol not trading Trading symbol is temporarily not available
'A10013': OnMaintenance, # 503 Symbol maintain Trading symbol is in maintain
'A30001': OrderNotFound, # 400 Order not found Queried order is not found
'A30002': InvalidOrder, # 400 Order amount is too small Order amount is too small
'A30003': InvalidOrder, # 400 Order amount is invalid Order amount is invalid
'A30004': InvalidOrder, # 400 Order value is too small Order value is too small
'A30005': InvalidOrder, # 400 Order value is invalid Order value is invalid
'A30006': InvalidOrder, # 400 Order price is invalid Order price is invalid
'A30007': InsufficientFunds, # 400 Insufficient balance The balance is insufficient
'A30008': InvalidOrder, # 400 Order was closed The order has been executed
'A30009': InvalidOrder, # 400 Order canceled The order has been cancelled
'A30010': CancelPending, # 400 Order cancelling The order is being cancelled
'A30011': InvalidOrder, # 400 Order price too high The order price is too high
'A30012': InvalidOrder, # 400 Order price too low The order price is too low
'A40004': InsufficientFunds, # {"code":"A40004","data":[],"message":"sub account balance Insufficient"}
},
'broad': {
},
},
'options': {
'fetchOHLCV': {
'volume': 'amount', # 'amount' for base volume or 'vol' for quote volume
},
'transfer': {
'fillResponseFromRequest': True,
},
},
})
def fetch_time(self, params={}):
"""
fetches the current integer timestamp in milliseconds from the exchange server
:param dict params: extra parameters specific to the novadax api endpoint
:returns int: the current integer timestamp in milliseconds from the exchange server
"""
response = self.publicGetCommonTimestamp(params)
#
# {
# "code":"A10000",
# "data":1599090512080,
# "message":"Success"
# }
#
return self.safe_integer(response, 'data')
def fetch_markets(self, params={}):
"""
retrieves data on all markets for novadax
:param dict params: extra parameters specific to the exchange api endpoint
:returns [dict]: an array of objects representing market data
"""
response = self.publicGetCommonSymbols(params)
#
# {
# "code":"A10000",
# "data":[
# {
# "amountPrecision":8,
# "baseCurrency":"BTC",
# "minOrderAmount":"0.001",
# "minOrderValue":"25",
# "pricePrecision":2,
# "quoteCurrency":"BRL",
# "status":"ONLINE",
# "symbol":"BTC_BRL",
# "valuePrecision":2
# },
# ],
# "message":"Success"
# }
#
result = []
data = self.safe_value(response, 'data', [])
for i in range(0, len(data)):
market = data[i]
baseId = self.safe_string(market, 'baseCurrency')
quoteId = self.safe_string(market, 'quoteCurrency')
id = self.safe_string(market, 'symbol')
base = self.safe_currency_code(baseId)
quote = self.safe_currency_code(quoteId)
status = self.safe_string(market, 'status')
result.append({
'id': id,
'symbol': base + '/' + quote,
'base': base,
'quote': quote,
'settle': None,
'baseId': baseId,
'quoteId': quoteId,
'settleId': None,
'type': 'spot',
'spot': True,
'margin': False,
'swap': False,
'future': False,
'option': False,
'active': (status == 'ONLINE'),
'contract': False,
'linear': None,
'inverse': None,
'contractSize': None,
'expiry': None,
'expiryDatetime': None,
'strike': None,
'optionType': None,
'precision': {
'amount': self.parse_number(self.parse_precision(self.safe_string(market, 'amountPrecision'))),
'price': self.parse_number(self.parse_precision(self.safe_string(market, 'pricePrecision'))),
'cost': self.parse_number(self.parse_precision(self.safe_string(market, 'valuePrecision'))),
},
'limits': {
'leverage': {
'min': None,
'max': None,
},
'amount': {
'min': self.safe_number(market, 'minOrderAmount'),
'max': None,
},
'price': {
'min': None,
'max': None,
},
'cost': {
'min': self.safe_number(market, 'minOrderValue'),
'max': None,
},
},
'info': market,
})
return result
def parse_ticker(self, ticker, market=None):
#
# fetchTicker, fetchTickers
#
# {
# "ask":"61946.1",
# "baseVolume24h":"164.41930186",
# "bid":"61815",
# "high24h":"64930.72",
# "lastPrice":"61928.41",
# "low24h":"61156.32",
# "open24h":"64512.46",
# "quoteVolume24h":"10308157.95",
# "symbol":"BTC_BRL",
# "timestamp":1599091115090
# }
#
timestamp = self.safe_integer(ticker, 'timestamp')
marketId = self.safe_string(ticker, 'symbol')
symbol = self.safe_symbol(marketId, market, '_')
open = self.safe_string(ticker, 'open24h')
last = self.safe_string(ticker, 'lastPrice')
baseVolume = self.safe_string(ticker, 'baseVolume24h')
quoteVolume = self.safe_string(ticker, 'quoteVolume24h')
return self.safe_ticker({
'symbol': symbol,
'timestamp': timestamp,
'datetime': self.iso8601(timestamp),
'high': self.safe_string(ticker, 'high24h'),
'low': self.safe_string(ticker, 'low24h'),
'bid': self.safe_string(ticker, 'bid'),
'bidVolume': None,
'ask': self.safe_string(ticker, 'ask'),
'askVolume': None,
'vwap': None,
'open': open,
'close': last,
'last': last,
'previousClose': None,
'change': None,
'percentage': None,
'average': None,
'baseVolume': baseVolume,
'quoteVolume': quoteVolume,
'info': ticker,
}, market)
def fetch_ticker(self, symbol, params={}):
"""
fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
:param str symbol: unified symbol of the market to fetch the ticker for
:param dict params: extra parameters specific to the novadax api endpoint
:returns dict: a `ticker structure <https://docs.ccxt.com/en/latest/manual.html#ticker-structure>`
"""
self.load_markets()
market = self.market(symbol)
request = {
'symbol': market['id'],
}
response = self.publicGetMarketTicker(self.extend(request, params))
#
# {
# "code":"A10000",
# "data":{
# "ask":"61946.1",
# "baseVolume24h":"164.41930186",
# "bid":"61815",
# "high24h":"64930.72",
# "lastPrice":"61928.41",
# "low24h":"61156.32",
# "open24h":"64512.46",
# "quoteVolume24h":"10308157.95",
# "symbol":"BTC_BRL",
# "timestamp":1599091115090
# },
# "message":"Success"
# }
#
data = self.safe_value(response, 'data', {})
return self.parse_ticker(data, market)
def fetch_tickers(self, symbols=None, params={}):
"""
fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
:param [str]|None symbols: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
:param dict params: extra parameters specific to the novadax api endpoint
:returns dict: an array of `ticker structures <https://docs.ccxt.com/en/latest/manual.html#ticker-structure>`
"""
self.load_markets()
symbols = self.market_symbols(symbols)
response = self.publicGetMarketTickers(params)
#
# {
# "code":"A10000",
# "data":[
# {
# "ask":"61879.36",
# "baseVolume24h":"164.40955092",
# "bid":"61815",
# "high24h":"64930.72",
# "lastPrice":"61820.04",
# "low24h":"61156.32",
# "open24h":"64624.19",
# "quoteVolume24h":"10307493.92",
# "symbol":"BTC_BRL",
# "timestamp":1599091291083
# },
# ],
# "message":"Success"
# }
#
data = self.safe_value(response, 'data', [])
result = {}
for i in range(0, len(data)):
ticker = self.parse_ticker(data[i])
symbol = ticker['symbol']
result[symbol] = ticker
return self.filter_by_array(result, 'symbol', symbols)
def fetch_order_book(self, symbol, limit=None, params={}):
"""
fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
:param str symbol: unified symbol of the market to fetch the order book for
:param int|None limit: the maximum amount of order book entries to return
:param dict params: extra parameters specific to the novadax api endpoint
:returns dict: A dictionary of `order book structures <https://docs.ccxt.com/en/latest/manual.html#order-book-structure>` indexed by market symbols
"""
self.load_markets()
market = self.market(symbol)
request = {
'symbol': market['id'],
}
if limit is not None:
request['limit'] = limit # default 10, max 20
response = self.publicGetMarketDepth(self.extend(request, params))
#
# {
# "code":"A10000",
# "data":{
# "asks":[
# ["0.037159","0.3741"],
# ["0.037215","0.2706"],
# ["0.037222","1.8459"],
# ],
# "bids":[
# ["0.037053","0.3857"],
# ["0.036969","0.8101"],
# ["0.036953","1.5226"],
# ],
# "timestamp":1599280414448
# },
# "message":"Success"
# }
#
data = self.safe_value(response, 'data', {})
timestamp = self.safe_integer(data, 'timestamp')
return self.parse_order_book(data, market['symbol'], timestamp, 'bids', 'asks')
def parse_trade(self, trade, market=None):
#
# public fetchTrades
#
# {
# "amount":"0.0632",
# "price":"0.037288",
# "side":"BUY",
# "timestamp":1599279694576
# }
#
# private fetchOrderTrades
#
# {
# "id": "608717046691139584",
# "orderId": "608716957545402368",
# "symbol": "BTC_BRL",
# "side": "BUY",
# "amount": "0.0988",
# "price": "45514.76",
# "fee": "0.0000988 BTC",
# "feeAmount": "0.0000988",
# "feeCurrency": "BTC",
# "role": "MAKER",
# "timestamp": 1565171053345
# }
#
# private fetchMyTrades(same endpoint as fetchOrderTrades)
#
# {
# "id": "608717046691139584",
# "orderId": "608716957545402368",
# "symbol": "BTC_BRL",
# "side": "BUY",
# "amount": "0.0988",
# "price": "45514.76",
# "fee": "0.0000988 BTC",
# "feeAmount": "0.0000988",
# "feeCurrency": "BTC",
# "role": "MAKER",
# "timestamp": 1565171053345
# }
#
id = self.safe_string(trade, 'id')
orderId = self.safe_string(trade, 'orderId')
timestamp = self.safe_integer(trade, 'timestamp')
side = self.safe_string_lower(trade, 'side')
priceString = self.safe_string(trade, 'price')
amountString = self.safe_string(trade, 'amount')
marketId = self.safe_string(trade, 'symbol')
symbol = self.safe_symbol(marketId, market, '_')
takerOrMaker = self.safe_string_lower(trade, 'role')
feeString = self.safe_string(trade, 'fee')
fee = None
if feeString is not None:
feeCurrencyId = self.safe_string(trade, 'feeCurrency')
feeCurrencyCode = self.safe_currency_code(feeCurrencyId)
fee = {
'cost': self.safe_string(trade, 'feeAmount'),
'currency': feeCurrencyCode,
}
return self.safe_trade({
'id': id,
'order': orderId,
'timestamp': timestamp,
'datetime': self.iso8601(timestamp),
'symbol': symbol,
'type': None,
'side': side,
'price': priceString,
'amount': amountString,
'cost': None,
'takerOrMaker': takerOrMaker,
'fee': fee,
'info': trade,
}, market)
def fetch_trades(self, symbol, since=None, limit=None, params={}):
"""
get the list of most recent trades for a particular symbol
:param str symbol: unified symbol of the market to fetch trades for
:param int|None since: timestamp in ms of the earliest trade to fetch
:param int|None limit: the maximum amount of trades to fetch
:param dict params: extra parameters specific to the novadax api endpoint
:returns [dict]: a list of `trade structures <https://docs.ccxt.com/en/latest/manual.html?#public-trades>`
"""
self.load_markets()
market = self.market(symbol)
request = {
'symbol': market['id'],
}
if limit is not None:
request['limit'] = limit # default 100
response = self.publicGetMarketTrades(self.extend(request, params))
#
# {
# "code":"A10000",
# "data":[
# {"amount":"0.0632","price":"0.037288","side":"BUY","timestamp":1599279694576},
# {"amount":"0.0052","price":"0.03715","side":"SELL","timestamp":1599276606852},
# {"amount":"0.0058","price":"0.037188","side":"SELL","timestamp":1599275187812},
# ],
# "message":"Success"
# }
#
data = self.safe_value(response, 'data', [])
return self.parse_trades(data, market, since, limit)
def fetch_ohlcv(self, symbol, timeframe='1m', since=None, limit=None, params={}):
"""
fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
:param str symbol: unified symbol of the market to fetch OHLCV data for
:param str timeframe: the length of time each candle represents
:param int|None since: timestamp in ms of the earliest candle to fetch
:param int|None limit: the maximum amount of candles to fetch
:param dict params: extra parameters specific to the novadax api endpoint
:returns [[int]]: A list of candles ordered as timestamp, open, high, low, close, volume
"""
self.load_markets()
market = self.market(symbol)
request = {
'symbol': market['id'],
'unit': self.timeframes[timeframe],
}
duration = self.parse_timeframe(timeframe)
now = self.seconds()
if limit is None:
limit = 3000 # max
if since is None:
request['from'] = now - limit * duration
request['to'] = now
else:
startFrom = int(since / 1000)
request['from'] = startFrom
request['to'] = self.sum(startFrom, limit * duration)
response = self.publicGetMarketKlineHistory(self.extend(request, params))
#
# {
# "code": "A10000",
# "data": [
# {
# "amount": 8.25709100,
# "closePrice": 62553.20,
# "count": 29,
# "highPrice": 62592.87,
# "lowPrice": 62553.20,
# "openPrice": 62554.23,
# "score": 1602501480,
# "symbol": "BTC_BRL",
# "vol": 516784.2504067500
# }
# ],
# "message": "Success"
# }
#
data = self.safe_value(response, 'data', [])
return self.parse_ohlcvs(data, market, timeframe, since, limit)
def parse_ohlcv(self, ohlcv, market=None):
#
# {
# "amount": 8.25709100,
# "closePrice": 62553.20,
# "count": 29,
# "highPrice": 62592.87,
# "lowPrice": 62553.20,
# "openPrice": 62554.23,
# "score": 1602501480,
# "symbol": "BTC_BRL",
# "vol": 516784.2504067500
# }
#
options = self.safe_value(self.options, 'fetchOHLCV', {})
volumeField = self.safe_string(options, 'volume', 'amount') # or vol
return [
self.safe_timestamp(ohlcv, 'score'),
self.safe_number(ohlcv, 'openPrice'),
self.safe_number(ohlcv, 'highPrice'),
self.safe_number(ohlcv, 'lowPrice'),
self.safe_number(ohlcv, 'closePrice'),
self.safe_number(ohlcv, volumeField),
]
def parse_balance(self, response):
data = self.safe_value(response, 'data', [])
result = {
'info': response,
'timestamp': None,
'datetime': None,
}
for i in range(0, len(data)):
balance = data[i]
currencyId = self.safe_string(balance, 'currency')
code = self.safe_currency_code(currencyId)
account = self.account()
account['total'] = self.safe_string(balance, 'balance')
account['free'] = self.safe_string(balance, 'available')
account['used'] = self.safe_string(balance, 'hold')
result[code] = account
return self.safe_balance(result)
def fetch_balance(self, params={}):
"""
query for balance and get the amount of funds available for trading or funds locked in orders
:param dict params: extra parameters specific to the novadax api endpoint
:returns dict: a `balance structure <https://docs.ccxt.com/en/latest/manual.html?#balance-structure>`
"""
self.load_markets()
response = self.privateGetAccountGetBalance(params)
#
# {
# "code": "A10000",
# "data": [
# {
# "available": "1.23",
# "balance": "0.23",
# "currency": "BTC",
# "hold": "1"
# }
# ],
# "message": "Success"
# }
#
return self.parse_balance(response)
def create_order(self, symbol, type, side, amount, price=None, params={}):
"""
create a trade order
:param str symbol: unified symbol of the market to create an order in
:param str type: 'market' or 'limit'
:param str side: 'buy' or 'sell'
:param float amount: how much of currency you want to trade in units of base currency
:param float|None price: the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
:param dict params: extra parameters specific to the novadax api endpoint
:returns dict: an `order structure <https://docs.ccxt.com/en/latest/manual.html#order-structure>`
"""
self.load_markets()
market = self.market(symbol)
uppercaseType = type.upper()
uppercaseSide = side.upper()
request = {
'symbol': market['id'],
'side': uppercaseSide, # or SELL
# 'amount': self.amount_to_precision(symbol, amount),
# "price": "1234.5678", # required for LIMIT and STOP orders
# 'operator': '' # for stop orders, can be found in order introduction
# 'stopPrice': self.price_to_precision(symbol, stopPrice),
# 'accountId': '...', # subaccount id, optional
}
stopPrice = self.safe_value_2(params, 'triggerPrice', 'stopPrice')
if stopPrice is None:
if (uppercaseType == 'STOP_LIMIT') or (uppercaseType == 'STOP_MARKET'):
raise ArgumentsRequired(self.id + ' createOrder() requires a stopPrice parameter for ' + uppercaseType + ' orders')
else:
if uppercaseType == 'LIMIT':
uppercaseType = 'STOP_LIMIT'
elif uppercaseType == 'MARKET':
uppercaseType = 'STOP_MARKET'
defaultOperator = 'LTE' if (uppercaseSide == 'BUY') else 'GTE'
request['operator'] = self.safe_string(params, 'operator', defaultOperator)
request['stopPrice'] = self.price_to_precision(symbol, stopPrice)
params = self.omit(params, ['triggerPrice', 'stopPrice'])
if (uppercaseType == 'LIMIT') or (uppercaseType == 'STOP_LIMIT'):
request['price'] = self.price_to_precision(symbol, price)
request['amount'] = self.amount_to_precision(symbol, amount)
elif (uppercaseType == 'MARKET') or (uppercaseType == 'STOP_MARKET'):
if uppercaseSide == 'SELL':
request['amount'] = self.amount_to_precision(symbol, amount)
elif uppercaseSide == 'BUY':
value = self.safe_number(params, 'value')
createMarketBuyOrderRequiresPrice = self.safe_value(self.options, 'createMarketBuyOrderRequiresPrice', True)
if createMarketBuyOrderRequiresPrice:
if price is not None:
if value is None:
value = amount * price
elif value is None:
raise InvalidOrder(self.id + " createOrder() requires the price argument with market buy orders to calculate total order cost(amount to spend), where cost = amount * price. Supply a price argument to createOrder() call if you want the cost to be calculated for you from price and amount, or, alternatively, add .options['createMarketBuyOrderRequiresPrice'] = False and supply the total cost value in the 'amount' argument or in the 'value' extra parameter(the exchange-specific behaviour)")
else:
value = amount if (value is None) else value
request['value'] = self.cost_to_precision(symbol, value)
request['type'] = uppercaseType
response = self.privatePostOrdersCreate(self.extend(request, params))
#
# {
# "code": "A10000",
# "data": {
# "amount": "0.001",
# "averagePrice": null,
# "filledAmount": "0",
# "filledFee": "0",
# "filledValue": "0",
# "id": "870613508008464384",
# "operator": "GTE",
# "price": "210000",
# "side": "BUY",
# "status": "SUBMITTED",
# "stopPrice": "211000",
# "symbol": "BTC_BRL",
# "timestamp": 1627612035528,
# "type": "STOP_LIMIT",
# "value": "210"
# },
# "message": "Success"
# }
#
data = self.safe_value(response, 'data', {})
return self.parse_order(data, market)
def cancel_order(self, id, symbol=None, params={}):
"""
cancels an open order
:param str id: order id
:param str|None symbol: not used by novadax cancelOrder()
:param dict params: extra parameters specific to the novadax api endpoint
:returns dict: An `order structure <https://docs.ccxt.com/en/latest/manual.html#order-structure>`
"""
self.load_markets()
request = {
'id': id,
}
response = self.privatePostOrdersCancel(self.extend(request, params))
#
# {
# "code": "A10000",
# "data": {
# "result": True
# },
# "message": "Success"
# }
#
data = self.safe_value(response, 'data', {})
return self.parse_order(data)
def fetch_order(self, id, symbol=None, params={}):
"""
fetches information on an order made by the user
:param str|None symbol: not used by novadax fetchOrder
:param dict params: extra parameters specific to the novadax api endpoint
:returns dict: An `order structure <https://docs.ccxt.com/en/latest/manual.html#order-structure>`
"""
self.load_markets()
request = {
'id': id,
}
response = self.privateGetOrdersGet(self.extend(request, params))
#
# {
# "code": "A10000",
# "data": {
# "id": "608695623247466496",
# "symbol": "BTC_BRL",
# "type": "MARKET",
# "side": "SELL",
# "price": null,
# "averagePrice": "0",
# "amount": "0.123",
# "filledAmount": "0",
# "value": null,
# "filledValue": "0",
# "filledFee": "0",
# "status": "REJECTED",
# "timestamp": 1565165945588
# },
# "message": "Success"
# }
#
data = self.safe_value(response, 'data', {})
return self.parse_order(data)
def fetch_orders(self, symbol=None, since=None, limit=None, params={}):
"""
fetches information on multiple orders made by the user
:param str|None symbol: unified market symbol of the market orders were made in
:param int|None since: the earliest time in ms to fetch orders for
:param int|None limit: the maximum number of orde structures to retrieve
:param dict params: extra parameters specific to the novadax api endpoint
:returns [dict]: a list of `order structures <https://docs.ccxt.com/en/latest/manual.html#order-structure>`
"""
self.load_markets()
request = {
# 'symbol': market['id'],
# 'status': 'SUBMITTED,PROCESSING', # SUBMITTED, PROCESSING, PARTIAL_FILLED, CANCELING, FILLED, CANCELED, REJECTED
# 'fromId': '...', # order id to begin with
# 'toId': '...', # order id to end up with
# 'fromTimestamp': since,
# 'toTimestamp': self.milliseconds(),
# 'limit': limit, # default 100, max 100
}
market = None
if symbol is not None:
market = self.market(symbol)
request['symbol'] = market['id']
if limit is not None:
request['limit'] = limit # default 100, max 100
if since is not None:
request['fromTimestamp'] = since
response = self.privateGetOrdersList(self.extend(request, params))
#
# {
# "code": "A10000",
# "data": [
# {
# "id": "608695678650028032",
# "symbol": "BTC_BRL",
# "type": "MARKET",
# "side": "SELL",
# "price": null,
# "averagePrice": "0",
# "amount": "0.123",
# "filledAmount": "0",
# "value": null,
# "filledValue": "0",
# "filledFee": "0",
# "status": "REJECTED",
# "timestamp": 1565165958796
# },
# ],
# "message": "Success"
# }
#
data = self.safe_value(response, 'data', [])
return self.parse_orders(data, market, since, limit)
def fetch_open_orders(self, symbol=None, since=None, limit=None, params={}):
"""
fetch all unfilled currently open orders
:param str|None symbol: unified market symbol
:param int|None since: the earliest time in ms to fetch open orders for
:param int|None limit: the maximum number of open orders structures to retrieve
:param dict params: extra parameters specific to the novadax api endpoint
:returns [dict]: a list of `order structures <https://docs.ccxt.com/en/latest/manual.html#order-structure>`
"""
request = {
'status': 'SUBMITTED,PROCESSING,PARTIAL_FILLED,CANCELING',
}
return self.fetch_orders(symbol, since, limit, self.extend(request, params))
def fetch_closed_orders(self, symbol=None, since=None, limit=None, params={}):
"""
fetches information on multiple closed orders made by the user
:param str|None symbol: unified market symbol of the market orders were made in
:param int|None since: the earliest time in ms to fetch orders for
:param int|None limit: the maximum number of orde structures to retrieve
:param dict params: extra parameters specific to the novadax api endpoint
:returns [dict]: a list of `order structures <https://docs.ccxt.com/en/latest/manual.html#order-structure>`
"""
request = {
'status': 'FILLED,CANCELED,REJECTED',
}
return self.fetch_orders(symbol, since, limit, self.extend(request, params))
def fetch_order_trades(self, id, symbol=None, since=None, limit=None, params={}):
"""
fetch all the trades made from a single order
:param str id: order id
:param str|None symbol: unified market symbol
:param int|None since: the earliest time in ms to fetch trades for
:param int|None limit: the maximum number of trades to retrieve
:param dict params: extra parameters specific to the novadax api endpoint
:returns [dict]: a list of `trade structures <https://docs.ccxt.com/en/latest/manual.html#trade-structure>`
"""
self.load_markets()
request = {
'id': id,
}
response = self.privateGetOrdersFill(self.extend(request, params))
market = None
if symbol is not None:
market = self.market(symbol)
data = self.safe_value(response, 'data', [])
#
# {
# "code": "A10000",
# "data": [
# {
# "id": "608717046691139584",
# "orderId": "608716957545402368",
# "symbol": "BTC_BRL",
# "side": "BUY",
# "amount": "0.0988",
# "price": "45514.76",
# "fee": "0.0000988 BTC",
# "feeAmount": "0.0000988",
# "feeCurrency": "BTC",
# "role": "MAKER",
# "timestamp": 1565171053345
# },
# ],
# "message": "Success"
# }
#
return self.parse_trades(data, market, since, limit)
def parse_order_status(self, status):
statuses = {
'SUBMITTED': 'open',
'PROCESSING': 'open',
'PARTIAL_FILLED': 'open',
'CANCELING': 'open',
'FILLED': 'closed',
'CANCELED': 'canceled',
'REJECTED': 'rejected',
}
return self.safe_string(statuses, status, status)
def parse_order(self, order, market=None):
#
# createOrder, fetchOrders, fetchOrder
#
# {
# "amount": "0.001",
# "averagePrice": null,
# "filledAmount": "0",
# "filledFee": "0",
# "filledValue": "0",
# "id": "870613508008464384",
# "operator": "GTE",
# "price": "210000",
# "side": "BUY",
# "status": "SUBMITTED",
# "stopPrice": "211000",
# "symbol": "BTC_BRL",
# "timestamp": 1627612035528,
# "type": "STOP_LIMIT",
# "value": "210"
# }
#
# cancelOrder
#
# {
# "result": True
# }
#
id = self.safe_string(order, 'id')
amount = self.safe_string(order, 'amount')
price = self.safe_string(order, 'price')
cost = self.safe_string_2(order, 'filledValue', 'value')
type = self.safe_string_lower(order, 'type')
side = self.safe_string_lower(order, 'side')
status = self.parse_order_status(self.safe_string(order, 'status'))
timestamp = self.safe_integer(order, 'timestamp')
average = self.safe_string(order, 'averagePrice')
filled = self.safe_string(order, 'filledAmount')
fee = None
feeCost = self.safe_number(order, 'filledFee')
if feeCost is not None:
fee = {
'cost': feeCost,
'currency': None,
}
marketId = self.safe_string(order, 'symbol')
symbol = self.safe_symbol(marketId, market, '_')
stopPrice = self.safe_number(order, 'stopPrice')
return self.safe_order({
'id': id,
'clientOrderId': None,
'info': order,
'timestamp': timestamp,
'datetime': self.iso8601(timestamp),
'lastTradeTimestamp': None,
'symbol': symbol,
'type': type,
'timeInForce': None,
'postOnly': None,
'side': side,
'price': price,
'stopPrice': stopPrice,
'amount': amount,
'cost': cost,
'average': average,
'filled': filled,
'remaining': None,
'status': status,
'fee': fee,
'trades': None,
}, market)
def transfer(self, code, amount, fromAccount, toAccount, params={}):
"""
transfer currency internally between wallets on the same account
:param str code: unified currency code
:param float amount: amount to transfer
:param str fromAccount: account to transfer from
:param str toAccount: account to transfer to
:param dict params: extra parameters specific to the novadax api endpoint
:returns dict: a `transfer structure <https://docs.ccxt.com/en/latest/manual.html#transfer-structure>`
"""
self.load_markets()
currency = self.currency(code)
if fromAccount != 'main' and toAccount != 'main':
raise ExchangeError(self.id + ' transfer() supports transfers between main account and subaccounts only')
# master-transfer-in = from master account to subaccount
# master-transfer-out = from subaccount to master account
type = 'master-transfer-in' if (fromAccount == 'main') else 'master-transfer-out'
request = {
'transferAmount': self.currency_to_precision(code, amount),
'currency': currency['id'],
'subId': toAccount if (type == 'master-transfer-in') else fromAccount,
'transferType': type,
}
response = self.privatePostAccountSubsTransfer(self.extend(request, params))
#
# {
# "code":"A10000",
# "message":"Success",
# "data":40
# }
#
transfer = self.parse_transfer(response, currency)
transferOptions = self.safe_value(self.options, 'transfer', {})
fillResponseFromRequest = self.safe_value(transferOptions, 'fillResponseFromRequest', True)
if fillResponseFromRequest:
transfer['fromAccount'] = fromAccount
transfer['toAccount'] = toAccount
transfer['amount'] = amount
return transfer
def parse_transfer(self, transfer, currency=None):
#
# {
# "code":"A10000",
# "message":"Success",
# "data":40
# }
#
id = self.safe_string(transfer, 'data')
status = self.safe_string(transfer, 'message')
currencyCode = self.safe_currency_code(None, currency)
return {
'info': transfer,
'id': id,
'amount': None,
'code': currencyCode, # kept here for backward-compatibility, but will be removed soon
'currency': currencyCode,
'fromAccount': None,
'toAccount': None,
'timestamp': None,
'datetime': None,
'status': status,
}
def parse_transfer_status(self, status):
statuses = {
'SUCCESS': 'pending',
}
return self.safe_string(statuses, status, 'failed')
def withdraw(self, code, amount, address, tag=None, params={}):
"""
make a withdrawal
:param str code: unified currency code
:param float amount: the amount to withdraw
:param str address: the address to withdraw to
:param str|None tag:
:param dict params: extra parameters specific to the novadax api endpoint
:returns dict: a `transaction structure <https://docs.ccxt.com/en/latest/manual.html#transaction-structure>`
"""
tag, params = self.handle_withdraw_tag_and_params(tag, params)
self.load_markets()
currency = self.currency(code)
request = {
'code': currency['id'],
'amount': self.currency_to_precision(code, amount),
'wallet': address,
}
if tag is not None:
request['tag'] = tag
response = self.privatePostAccountWithdrawCoin(self.extend(request, params))
#
# {
# "code":"A10000",
# "data": "DR123",
# "message":"Success"
# }
#
return self.parse_transaction(response, currency)
def fetch_accounts(self, params={}):
"""
fetch all the accounts associated with a profile
:param dict params: extra parameters specific to the novadax api endpoint
:returns dict: a dictionary of `account structures <https://docs.ccxt.com/en/latest/manual.html#account-structure>` indexed by the account type
"""
response = self.privateGetAccountSubs(params)
#
# {
# "code": "A10000",
# "data": [
# {
# "subId": "CA648856083527372800",
# "state": "Normal",
# "subAccount": "003",
# "subIdentify": "003"
# }
# ],
# "message": "Success"
# }
#
data = self.safe_value(response, 'data', [])
result = []
for i in range(0, len(data)):
account = data[i]
accountId = self.safe_string(account, 'subId')
type = self.safe_string(account, 'subAccount')
result.append({
'id': accountId,
'type': type,
'currency': None,
'info': account,
})
return result
def fetch_deposits(self, code=None, since=None, limit=None, params={}):
"""
fetch all deposits made to an account
:param str|None code: unified currency code
:param int|None since: the earliest time in ms to fetch deposits for
:param int|None limit: the maximum number of deposits structures to retrieve
:param dict params: extra parameters specific to the novadax api endpoint
:returns [dict]: a list of `transaction structures <https://docs.ccxt.com/en/latest/manual.html#transaction-structure>`
"""
request = {
'type': 'coin_in',
}
return self.fetch_transactions(code, since, limit, self.extend(request, params))
def fetch_withdrawals(self, code=None, since=None, limit=None, params={}):
"""
fetch all withdrawals made from an account
:param str|None code: unified currency code
:param int|None since: the earliest time in ms to fetch withdrawals for
:param int|None limit: the maximum number of withdrawals structures to retrieve
:param dict params: extra parameters specific to the novadax api endpoint
:returns [dict]: a list of `transaction structures <https://docs.ccxt.com/en/latest/manual.html#transaction-structure>`
"""
request = {
'type': 'coin_out',
}
return self.fetch_transactions(code, since, limit, self.extend(request, params))
def fetch_transactions(self, code=None, since=None, limit=None, params={}):
"""
fetch history of deposits and withdrawals
:param str|None code: unified currency code for the currency of the transactions, default is None
:param int|None since: timestamp in ms of the earliest transaction, default is None
:param int|None limit: max number of transactions to return, default is None
:param dict params: extra parameters specific to the novadax api endpoint
:returns dict: a list of `transaction structure <https://docs.ccxt.com/en/latest/manual.html#transaction-structure>`
"""
self.load_markets()
request = {
# 'currency': currency['id'],
# 'type': 'coin_in', # 'coin_out'
# 'direct': 'asc', # 'desc'
# 'size': limit, # default 100
# 'start': id, # offset id
}
currency = None
if code is not None:
currency = self.currency(code)
request['currency'] = currency['id']
if limit is not None:
request['size'] = limit
response = self.privateGetWalletQueryDepositWithdraw(self.extend(request, params))
#
# {
# "code": "A10000",
# "data": [
# {
# "id": "DR562339304588709888",
# "type": "COIN_IN",
# "currency": "XLM",
# "chain": "XLM",
# "address": "GCUTK7KHPJC3ZQJ3OMWWFHAK2OXIBRD4LNZQRCCOVE7A2XOPP2K5PU5Q",
# "addressTag": "1000009",
# "amount": 1.0,
# "state": "SUCCESS",
# "txHash": "39210645748822f8d4ce673c7559aa6622e6e9cdd7073bc0fcae14b1edfda5f4",
# "createdAt": 1554113737000,
# "updatedAt": 1601371273000
# }
# ],
# "message": "Success"
# }
#
data = self.safe_value(response, 'data', [])
return self.parse_transactions(data, currency, since, limit)
def parse_transaction_status(self, status):
# Pending the record is wait broadcast to chain
# x/M confirming the comfirming state of tx, the M is total confirmings needed
# SUCCESS the record is success full
# FAIL the record failed
parts = status.split(' ')
status = self.safe_string(parts, 1, status)
statuses = {
'Pending': 'pending',
'confirming': 'pending',
'SUCCESS': 'ok',
'FAIL': 'failed',
}
return self.safe_string(statuses, status, status)
def parse_transaction(self, transaction, currency=None):
#
# withdraw
#
# {
# "code":"A10000",
# "data": "DR123",
# "message":"Success"
# }
#
# fetchTransactions
#
# {
# "id": "DR562339304588709888",
# "type": "COIN_IN",
# "currency": "XLM",
# "chain": "XLM",
# "address": "GCUTK7KHPJC3ZQJ3OMWWFHAK2OXIBRD4LNZQRCCOVE7A2XOPP2K5PU5Q",
# "addressTag": "1000009",
# "amount": 1.0,
# "state": "SUCCESS",
# "txHash": "39210645748822f8d4ce673c7559aa6622e6e9cdd7073bc0fcae14b1edfda5f4",
# "createdAt": 1554113737000,
# "updatedAt": 1601371273000
# }
#
id = self.safe_string_2(transaction, 'id', 'data')
type = self.safe_string(transaction, 'type')
if type == 'COIN_IN':
type = 'deposit'
elif type == 'COIN_OUT':
type = 'withdraw'
amount = self.safe_number(transaction, 'amount')
address = self.safe_string(transaction, 'address')
tag = self.safe_string(transaction, 'addressTag')
txid = self.safe_string(transaction, 'txHash')
timestamp = self.safe_integer(transaction, 'createdAt')
updated = self.safe_integer(transaction, 'updatedAt')
currencyId = self.safe_string(transaction, 'currency')
code = self.safe_currency_code(currencyId, currency)
status = self.parse_transaction_status(self.safe_string(transaction, 'state'))
network = self.safe_string(transaction, 'chain')
return {
'info': transaction,
'id': id,
'currency': code,
'amount': amount,
'network': network,
'address': address,
'addressTo': address,
'addressFrom': None,
'tag': tag,
'tagTo': tag,
'tagFrom': None,
'status': status,
'type': type,
'updated': updated,
'txid': txid,
'timestamp': timestamp,
'datetime': self.iso8601(timestamp),
'fee': None,
}
def fetch_my_trades(self, symbol=None, since=None, limit=None, params={}):
"""
fetch all trades made by the user
:param str|None symbol: unified market symbol
:param int|None since: the earliest time in ms to fetch trades for
:param int|None limit: the maximum number of trades structures to retrieve
:param dict params: extra parameters specific to the novadax api endpoint
:returns [dict]: a list of `trade structures <https://docs.ccxt.com/en/latest/manual.html#trade-structure>`
"""
self.load_markets()
request = {
# 'orderId': id, # Order ID, string
# 'symbol': market['id'], # The trading symbol, like BTC_BRL, string
# 'fromId': fromId, # Search fill id to begin with, string
# 'toId': toId, # Search fill id to end up with, string
# 'fromTimestamp': since, # Search order fill time to begin with, in milliseconds, string
# 'toTimestamp': self.milliseconds(), # Search order fill time to end up with, in milliseconds, string
# 'limit': limit, # The number of fills to return, default 100, max 100, string
# 'accountId': subaccountId, # Sub account ID, if not informed, the fills will be return under master account, string
}
market = None
if symbol is not None:
market = self.market(symbol)
request['symbol'] = market['id']
if limit is not None:
request['limit'] = limit
if since is not None:
request['fromTimestamp'] = since
response = self.privateGetOrdersFills(self.extend(request, params))
#
# {
# "code": "A10000",
# "data": [
# {
# "id": "608717046691139584",
# "orderId": "608716957545402368",
# "symbol": "BTC_BRL",
# "side": "BUY",
# "amount": "0.0988",
# "price": "45514.76",
# "fee": "0.0000988 BTC",
# "feeAmount": "0.0000988",
# "feeCurrency": "BTC",
# "role": "MAKER",
# "timestamp": 1565171053345
# },
# ],
# "message": "Success"
# }
#
data = self.safe_value(response, 'data', [])
return self.parse_trades(data, market, since, limit)
def sign(self, path, api='public', method='GET', params={}, headers=None, body=None):
request = '/' + self.version + '/' + self.implode_params(path, params)
url = self.urls['api'][api] + request
query = self.omit(params, self.extract_params(path))
if api == 'public':
if query:
url += '?' + self.urlencode(query)
elif api == 'private':
self.check_required_credentials()
timestamp = str(self.milliseconds())
headers = {
'X-Nova-Access-Key': self.apiKey,
'X-Nova-Timestamp': timestamp,
}
queryString = None
if method == 'POST':
body = self.json(query)
queryString = self.hash(self.encode(body), 'md5')
headers['Content-Type'] = 'application/json'
else:
if query:
url += '?' + self.urlencode(query)
queryString = self.urlencode(self.keysort(query))
auth = method + "\n" + request + "\n" + queryString + "\n" + timestamp # eslint-disable-line quotes
headers['X-Nova-Signature'] = self.hmac(self.encode(auth), self.encode(self.secret))
return {'url': url, 'method': method, 'body': body, 'headers': headers}
def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
if response is None:
return
#
# {"code":"A10003","data":[],"message":"Authentication failed, Invalid accessKey."}
#
errorCode = self.safe_string(response, 'code')
if errorCode != 'A10000':
message = self.safe_string(response, 'message')
feedback = self.id + ' ' + body
self.throw_exactly_matched_exception(self.exceptions['exact'], errorCode, feedback)
self.throw_broadly_matched_exception(self.exceptions['broad'], message, feedback)
raise ExchangeError(feedback) # unknown message
| {
"content_hash": "27f52842665adbc1440d6cb7798ea3e8",
"timestamp": "",
"source": "github",
"line_count": 1419,
"max_line_length": 514,
"avg_line_length": 42.68851303735025,
"alnum_prop": 0.4993974411886092,
"repo_name": "ccxt/ccxt",
"id": "9a4a071c079f657007adc480a908e122c0aa48bd",
"size": "60756",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "python/ccxt/novadax.py",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Dockerfile",
"bytes": "1724"
},
{
"name": "HTML",
"bytes": "246"
},
{
"name": "JavaScript",
"bytes": "11619228"
},
{
"name": "PHP",
"bytes": "10272973"
},
{
"name": "Python",
"bytes": "9037496"
},
{
"name": "Shell",
"bytes": "6887"
}
],
"symlink_target": ""
} |
<?php
namespace Magento\Setup\Test\Unit\Controller;
use \Magento\Setup\Controller\Index;
class IndexTest extends \PHPUnit_Framework_TestCase
{
public function testIndexAction()
{
/** @var $controller Index */
$controller = new Index();
$viewModel = $controller->indexAction();
$this->assertInstanceOf('Zend\View\Model\ViewModel', $viewModel);
$this->assertFalse($viewModel->terminate());
}
}
| {
"content_hash": "407f1f7dca566051d8a8d1677a998965",
"timestamp": "",
"source": "github",
"line_count": 18,
"max_line_length": 73,
"avg_line_length": 24.88888888888889,
"alnum_prop": 0.6607142857142857,
"repo_name": "enettolima/magento-training",
"id": "0aa0daa6576fa2cfd67b07fbb6e3cc8ca2411f2d",
"size": "546",
"binary": false,
"copies": "4",
"ref": "refs/heads/master",
"path": "magento2ce/setup/src/Magento/Setup/Test/Unit/Controller/IndexTest.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ApacheConf",
"bytes": "22648"
},
{
"name": "CSS",
"bytes": "3382928"
},
{
"name": "HTML",
"bytes": "8749335"
},
{
"name": "JavaScript",
"bytes": "7355635"
},
{
"name": "PHP",
"bytes": "58607662"
},
{
"name": "Perl",
"bytes": "10258"
},
{
"name": "Shell",
"bytes": "41887"
},
{
"name": "XSLT",
"bytes": "19889"
}
],
"symlink_target": ""
} |
/*---Top Bar---*/
.sfTopbar{background:url(../images/top-bar-bg.gif) repeat-x top #006c95; border-bottom:1px solid #fff;padding:8px 0; position:fixed;left:0px; top:0px; width:100%; z-index:3000; }
.sfTopbar ul { float:right; margin:0; padding:0;}
.sfTopbar ul li{ float:left; margin:0 10px; padding:0; list-style:none; color:#fff; font:11px Arial, Helvetica, sans-serif;}
.sfTopbar ul li a{ font:11px Arial, Helvetica, sans-serif; color:#e6f1f5; text-decoration:none;}
.sfTopbar ul li a:hover{ text-decoration:underline; }
.sfTopbar ul li p{ margin:0; padding:0; }
.sfTopbar ul.left { float:left;}
.sfTopbar ul.left li img, .sfTopbar ul.left li a, .sfTopbar ul.left li span{ float:left; }
.sfTopbar ul.left li img{ margin:0 5px 0 0;}
.sfTopbar ul.left li.sfDashBoard{background:url(../images/dashboard.png) no-repeat 0 50%; padding:0 0 0 22px;}
.sfTopbar ul.right li{ margin:0 10px 0 0; padding:0;}
.sfTopbar ul.right li a{ padding:0 0 0 20px;}
.sfTopbar ul.right li.preview{ background:url(../images/preview.png) no-repeat 0 50%;}
.sfTopbar ul.right li.myaccount{ background:url(../images/admin-icon.png) no-repeat 0 50%;}
.sfTopbar ul.right li.logout{ background:url(../images/logout.png) no-repeat 0 50%;}
/* sticky bar cpanel */
#divCpanel{ float:right; width:80px;}
#topnav a.signin {background:#0792c6; font:bold 12px Arial, Helvetica, sans-serif; color:#fff; padding:5px 10px; position:relative;}
#signin_menu { display:none; z-index:777; position:absolute; right:14px; top:27px; background:#0792c6; -moz-box-shadow: 5px 5px 5px #5b5b5b; -webkit-box-shadow: 5px 5px 5px #5b5b5b; box-shadow: 5px 5px 5px #5b5b5b; }
#divCpanel fieldset{ width:230px; border:none; -webkit-border-radius: 0; -moz-border-radius: 0; border-radius: 0; margin:0; padding:5px 0;}
#divCpanel li{ position:relative; float:none; width:210px; }
#divCpanel p{ clear:both; margin:0; padding:6px 10px; overflow:hidden; }
#divCpanel label{ font:normal 11px Arial, Helvetica, sans-serif; color:#fff; float:left; width:60px; padding:3px 0;}
#divCpanel select{ font:normal 11px Arial, Helvetica, sans-serif; background:#fff; border:1px solid #fff; padding:2px 3px; border:none; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; float:left; width:115px; color:#666;}
#divCpanel p input.sfBtn{ margin:0 0 0 60px; cursor:pointer; border:1px solid #087aa3; background:url(../../../../images/btn-bg.gif) repeat-x;text-align:center; font:bold 11px Arial, Helvetica, sans-serif; color:#fff; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; padding:2px 10px; box-shadow:inset 0 1px 0 rgba(255,255,255,0.5);}
#divCpanel p input.sfBtn:hover{background:url(../../../../images/btn-bg-hover.gif) repeat-x;}
#divCpanel p.sfMode{ padding:0; margin:0;}
#divCpanel p.sfMode strong{ display:block; padding:0 4px 3px 10px; color:#fff; font:bold 12px Arial, Helvetica, sans-serif; margin:0 0 5px 0; background:url(../images/seperator1.jpg) repeat-x bottom;}
#divCpanel li strong.sfSeperator1{margin:0 0 5px 0; background:url(../images/seperator1.jpg) repeat-x bottom; font:bold 12px Arial, Helvetica, sans-serif; color:#fff; display:block; padding:3px 0 3px 11px;}
#divCpanel p.sfMode input{ margin:0 0 0 8px; padding:0; float:none; }
#divCpanel p.sfMode label{ width:auto; margin:0; padding:0; float:none;}
/* edit mode*/
/* edit mode*/
.sfLayoutmode{border:1px solid #dbdbdb; position:relative; -webkit-box-shadow: 1px 0px 5px 0px #ccc; -moz-box-shadow: 1px 0px 5px 0px #ccc; box-shadow: 1px 0px 5px 0px #ccc; margin:3px 0; min-height:22px;}
.sfLogged{ position:relative; }
.sfUsermoduletitle, .sfModule .sfModuleControl{ display:none; }
.sfLayoutmode .sfUsermoduletitle, .sfLogged .sfModuleControl{ display:block; }
.sfLayoutmode span.sfUsermoduletitle{border:1px solid #fff; position:absolute; left:-1px; top:-1px; padding:0 10px; color:#666; font:bold 11px/22px Arial, Helvetica, sans-serif; height:22px; text-shadow: 1px 1px 0 #fff; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; z-index:666; text-transform:uppercase;
background: #ffffff; /* Old browsers */
background: -moz-linear-gradient(top, #ffffff 0%, #f6f6f6 47%, #ededed 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(47%,#f6f6f6), color-stop(100%,#ededed)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #ffffff 0%,#f6f6f6 47%,#ededed 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #ffffff 0%,#f6f6f6 47%,#ededed 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #ffffff 0%,#f6f6f6 47%,#ededed 100%); /* IE10+ */
background: linear-gradient(top, #ffffff 0%,#f6f6f6 47%,#ededed 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#ededed',GradientType=0 ); /* IE6-9 */ -webkit-box-shadow: 1px 0px 5px 0px #666;
-moz-box-shadow: 1px 0px 5px 0px #666; box-shadow: 1px 0px 5px 0px #666; }
.sfLogged .sfPosition{ border:1px solid #bebebe; position:absolute; right:0; top:0; background:#fff; padding:0 5px; color:#666; font:11px/16px Arial, Helvetica, sans-serif; height:16px; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; z-index:666; text-transform:lowercase; }
.sfLayoutmode .sfModule .sfPosition{ opacity:0.5; }
.sfLayoutmode:hover .sfModule .sfPosition{ opacity:1; }
.sfLogged .sfModuleControl{ position:absolute; left:5px; top:5px; background:#fff; padding:3px 5px; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; -moz-box-shadow: 0px 0px 5px #5b5b5b; -webkit-box-shadow: 0px 0px 5px #5b5b5b; box-shadow: 0px 0px 5px #5b5b5b; height:20px; width:20px; z-index:999; /*-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; filter: alpha(opacity=50); -khtml-opacity: 0.50; -moz-opacity: 0.50; opacity: 0.50;*/ }
.sfLogged .sfModuleControl a{background:url(../images/edit-icon.png) no-repeat 0 0; padding:0 0 0 20px; height:16px; width:16px; display:inline-block;}
.sfLogged .sfLogged{}
/*---Message Wrapper---*/
.sfMessage{ background:#bbdcf3; padding:10px 5px 10px 40px; margin:10px 0; border-bottom:1px solid #fff; overflow:hidden; font: bold 12px/20px Arial, Helvetica, sans-serif; color:#444; text-shadow:1px 1px 0 rgba(255,255,255,.5); -moz-box-shadow: 0px 2px 3px #e5e5e5; -webkit-box-shadow: 0px 2px 3px #e5e5e5; box-shadow: 0px 2px 3px #e5e5e5; position:relative; }
.sfMessage img{ padding:0 10px 0 0}
.sfAlertmsg, .sfNoticemsg{background:url(../images/notification.png) no-repeat 10px 50% #f1eabf; border-bottom:1px solid #fff; color:#b39c0f; }
.sfErrormsg{background:url(../images/error.png) no-repeat 10px 50% #e9c6c6; border-bottom:1px solid #fff; color:#ad3435; }
.sfSuccessmsg{background:url(../images/success.png) no-repeat 10px 50% #ccf3d2; border-bottom:1px solid #fff; color:#6fae67; }
.sfMessage img.delete{ position:absolute; right:5px; top:10px; cursor:pointer;}
.sfMessage .sfMessagetitle { font:bold 12px/30px Arial, Helvetica, sans-serif; color:#e98002; padding:12px 10px 6px 0; color:#000; height:32px; }
.sfMessage .sfCustommessage, .cssClassAlert .cssClassDetailMessage { font:bold 11px/18px Arial, Helvetica, sans-serif; color:#000; text-align:justify; }
.sfErrormsg .sfMessagetitle { font:bold 12px/30px Arial, Helvetica, sans-serif; color:#fff; padding:12px 10px 6px 0;}
.sfErrormsg .sfCustomMessage, .sfErrormsg .sfDetailmessage { font:bold 11px Arial, Helvetica, sans-serif; color:#5e5e5e; text-align:justify; }
.sfSuccess .sfMessagetitle { font:bold 12px Arial, Helvetica, sans-serif; color:#000; padding:12px 10px 6px 0;height:32px; }
.sfSuccess .sfCustommessage { font:bold 11px/18px Arial, Helvetica, sans-serif; color:#fff; }
.sfSuccess .sfDetailmessage { font:11px/18px Arial, Helvetica, sans-serif; color:#82dcff; text-align:justify; }
/* tool tip */
#tooltip { position: absolute; z-index: 3000; border: 4px solid #7db9df; background-color: #eee; padding: 5px; border-radius:4px;}
/* screen width */
.sfNarrow .sfInnerwrapper{ width:768px; margin:0 auto;}
.sfWide .sfInnerwrapper{ width:980px; margin:0 auto;}
.sfFluid .sfInnerwrapper{ width:95%; margin:0 auto;}
.sfNarrow > div { min-width:768px; }
.sfWide > div { min-width:980px; } | {
"content_hash": "659b8b07e1f48392566d2b985d02bd70",
"timestamp": "",
"source": "github",
"line_count": 90,
"max_line_length": 480,
"avg_line_length": 91.37777777777778,
"alnum_prop": 0.7332198443579766,
"repo_name": "SageFrame/SageFrame",
"id": "6d3bb5204fb705c1d94075e340113fea292e6097",
"size": "8224",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "SageFrame/Administrator/Templates/Default/css/core.css",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ASP",
"bytes": "1554707"
},
{
"name": "ApacheConf",
"bytes": "768"
},
{
"name": "C#",
"bytes": "4514389"
},
{
"name": "CSS",
"bytes": "805481"
},
{
"name": "ColdFusion",
"bytes": "7712"
},
{
"name": "HTML",
"bytes": "466859"
},
{
"name": "JavaScript",
"bytes": "4646118"
},
{
"name": "PHP",
"bytes": "5655"
},
{
"name": "Perl",
"bytes": "4746"
}
],
"symlink_target": ""
} |
<div class="col-lg-6 col-md-6 col-sm-12" ng-controller="courseCtrl as courses">
<!-- course-box -->
<div class="box box-primary" ng-repeat="course in courses.courses" ng-if="$index <= courses.courses.length/2">
<div class="box-header with-border">
<h4 class="box-title">
{{ course.courseCode }} - {{ course.courseName }}
</h4>
<div class="box-tools pull-right">
<button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
<button class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
</div>
</div>
<div class="box-body">
{{ course.description }}
</div>
<div class="box-footer"><a href="course.html" class="btn btn-sm btn-primary btn-flat pull-right">See More</a>
</div>
</div>
<!-- /course-box -->
</div>
<div class="col-lg-6 col-md-6 col-sm-12" ng-controller="courseCtrl as courses">
<!-- course-box -->
<div class="box box-primary" ng-repeat="course in courses.courses" ng-if="$index > courses.courses.length/2">
<div class="box-header with-border">
<h4 class="box-title">
{{ course.courseCode }} - {{ course.courseName }}
</h4>
<div class="box-tools pull-right">
<button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
<button class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
</div>
</div>
<div class="box-body">
{{ course.description }}
</div>
<div class="box-footer"><a href="course.html" class="btn btn-sm btn-primary btn-flat pull-right">See More</a>
</div>
</div>
<!-- /course-box -->
</div>
| {
"content_hash": "b42512d5d01cf0f7d6ecd63306c7b9d6",
"timestamp": "",
"source": "github",
"line_count": 47,
"max_line_length": 113,
"avg_line_length": 36.42553191489362,
"alnum_prop": 0.5992990654205608,
"repo_name": "IEEEDTU/OnCourse",
"id": "819f5d08139fc08874001ee0b459d18e1813f62d",
"size": "1712",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "faculty/course/course-panel.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "831651"
},
{
"name": "HTML",
"bytes": "3397162"
},
{
"name": "JavaScript",
"bytes": "3232239"
},
{
"name": "PHP",
"bytes": "3841"
}
],
"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 Thu Dec 05 05:02:12 MST 2019 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Uses of Interface org.wildfly.swarm.config.transactions.log_store.TransactionsConsumer (BOM: * : All 2.6.0.Final API)</title>
<meta name="date" content="2019-12-05">
<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 Interface org.wildfly.swarm.config.transactions.log_store.TransactionsConsumer (BOM: * : All 2.6.0.Final 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/transactions/log_store/TransactionsConsumer.html" title="interface in org.wildfly.swarm.config.transactions.log_store">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.6.0.Final</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/transactions/log_store/class-use/TransactionsConsumer.html" target="_top">Frames</a></li>
<li><a href="TransactionsConsumer.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 Interface org.wildfly.swarm.config.transactions.log_store.TransactionsConsumer" class="title">Uses of Interface<br>org.wildfly.swarm.config.transactions.log_store.TransactionsConsumer</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/transactions/log_store/TransactionsConsumer.html" title="interface in org.wildfly.swarm.config.transactions.log_store">TransactionsConsumer</a></span><span class="tabEnd"> </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.transactions">org.wildfly.swarm.config.transactions</a></td>
<td class="colLast"> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="#org.wildfly.swarm.config.transactions.log_store">org.wildfly.swarm.config.transactions.log_store</a></td>
<td class="colLast"> </td>
</tr>
</tbody>
</table>
</li>
<li class="blockList">
<ul class="blockList">
<li class="blockList"><a name="org.wildfly.swarm.config.transactions">
<!-- -->
</a>
<h3>Uses of <a href="../../../../../../../org/wildfly/swarm/config/transactions/log_store/TransactionsConsumer.html" title="interface in org.wildfly.swarm.config.transactions.log_store">TransactionsConsumer</a> in <a href="../../../../../../../org/wildfly/swarm/config/transactions/package-summary.html">org.wildfly.swarm.config.transactions</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/transactions/package-summary.html">org.wildfly.swarm.config.transactions</a> with parameters of type <a href="../../../../../../../org/wildfly/swarm/config/transactions/log_store/TransactionsConsumer.html" title="interface in org.wildfly.swarm.config.transactions.log_store">TransactionsConsumer</a></span><span class="tabEnd"> </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/transactions/LogStore.html" title="type parameter in LogStore">T</a></code></td>
<td class="colLast"><span class="typeNameLabel">LogStore.</span><code><span class="memberNameLink"><a href="../../../../../../../org/wildfly/swarm/config/transactions/LogStore.html#transactions-java.lang.String-org.wildfly.swarm.config.transactions.log_store.TransactionsConsumer-">transactions</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> childKey,
<a href="../../../../../../../org/wildfly/swarm/config/transactions/log_store/TransactionsConsumer.html" title="interface in org.wildfly.swarm.config.transactions.log_store">TransactionsConsumer</a> consumer)</code>
<div class="block">Create and configure a Transactions object to the list of subresources</div>
</td>
</tr>
</tbody>
</table>
</li>
<li class="blockList"><a name="org.wildfly.swarm.config.transactions.log_store">
<!-- -->
</a>
<h3>Uses of <a href="../../../../../../../org/wildfly/swarm/config/transactions/log_store/TransactionsConsumer.html" title="interface in org.wildfly.swarm.config.transactions.log_store">TransactionsConsumer</a> in <a href="../../../../../../../org/wildfly/swarm/config/transactions/log_store/package-summary.html">org.wildfly.swarm.config.transactions.log_store</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/transactions/log_store/package-summary.html">org.wildfly.swarm.config.transactions.log_store</a> that return <a href="../../../../../../../org/wildfly/swarm/config/transactions/log_store/TransactionsConsumer.html" title="interface in org.wildfly.swarm.config.transactions.log_store">TransactionsConsumer</a></span><span class="tabEnd"> </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>default <a href="../../../../../../../org/wildfly/swarm/config/transactions/log_store/TransactionsConsumer.html" title="interface in org.wildfly.swarm.config.transactions.log_store">TransactionsConsumer</a><<a href="../../../../../../../org/wildfly/swarm/config/transactions/log_store/TransactionsConsumer.html" title="type parameter in TransactionsConsumer">T</a>></code></td>
<td class="colLast"><span class="typeNameLabel">TransactionsConsumer.</span><code><span class="memberNameLink"><a href="../../../../../../../org/wildfly/swarm/config/transactions/log_store/TransactionsConsumer.html#andThen-org.wildfly.swarm.config.transactions.log_store.TransactionsConsumer-">andThen</a></span>(<a href="../../../../../../../org/wildfly/swarm/config/transactions/log_store/TransactionsConsumer.html" title="interface in org.wildfly.swarm.config.transactions.log_store">TransactionsConsumer</a><<a href="../../../../../../../org/wildfly/swarm/config/transactions/log_store/TransactionsConsumer.html" title="type parameter in TransactionsConsumer">T</a>> after)</code> </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/transactions/log_store/package-summary.html">org.wildfly.swarm.config.transactions.log_store</a> with parameters of type <a href="../../../../../../../org/wildfly/swarm/config/transactions/log_store/TransactionsConsumer.html" title="interface in org.wildfly.swarm.config.transactions.log_store">TransactionsConsumer</a></span><span class="tabEnd"> </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>default <a href="../../../../../../../org/wildfly/swarm/config/transactions/log_store/TransactionsConsumer.html" title="interface in org.wildfly.swarm.config.transactions.log_store">TransactionsConsumer</a><<a href="../../../../../../../org/wildfly/swarm/config/transactions/log_store/TransactionsConsumer.html" title="type parameter in TransactionsConsumer">T</a>></code></td>
<td class="colLast"><span class="typeNameLabel">TransactionsConsumer.</span><code><span class="memberNameLink"><a href="../../../../../../../org/wildfly/swarm/config/transactions/log_store/TransactionsConsumer.html#andThen-org.wildfly.swarm.config.transactions.log_store.TransactionsConsumer-">andThen</a></span>(<a href="../../../../../../../org/wildfly/swarm/config/transactions/log_store/TransactionsConsumer.html" title="interface in org.wildfly.swarm.config.transactions.log_store">TransactionsConsumer</a><<a href="../../../../../../../org/wildfly/swarm/config/transactions/log_store/TransactionsConsumer.html" title="type parameter in TransactionsConsumer">T</a>> after)</code> </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/transactions/log_store/TransactionsConsumer.html" title="interface in org.wildfly.swarm.config.transactions.log_store">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.6.0.Final</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/transactions/log_store/class-use/TransactionsConsumer.html" target="_top">Frames</a></li>
<li><a href="TransactionsConsumer.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>Copyright © 2019 <a href="http://www.jboss.org">JBoss by Red Hat</a>. All rights reserved.</small></p>
</body>
</html>
| {
"content_hash": "246b8a5fd2d0998f5de992701168e295",
"timestamp": "",
"source": "github",
"line_count": 206,
"max_line_length": 706,
"avg_line_length": 61.029126213592235,
"alnum_prop": 0.6757079223671651,
"repo_name": "wildfly-swarm/wildfly-swarm-javadocs",
"id": "5b4c7c101dfb7f3bbaebaa9b1e2dbd44469a6440",
"size": "12572",
"binary": false,
"copies": "1",
"ref": "refs/heads/gh-pages",
"path": "2.6.0.Final/apidocs/org/wildfly/swarm/config/transactions/log_store/class-use/TransactionsConsumer.html",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>evenementen</artifactId>
<groupId>nl.tkp.evenementen</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>evenementen-app</artifactId>
<name>Evenementen applicatie</name>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>18.0</version>
</dependency>
<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>${cucumber.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>${cucumber.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
| {
"content_hash": "1d3883158e088633b9ebc85390b6b550",
"timestamp": "",
"source": "github",
"line_count": 61,
"max_line_length": 108,
"avg_line_length": 32.868852459016395,
"alnum_prop": 0.572568578553616,
"repo_name": "JacHub/JHavaServices",
"id": "8d01b9474bcb0dbca2ffdf9a40bc9f5c9f5143f8",
"size": "2005",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "evenementen-app/pom.xml",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Cucumber",
"bytes": "1678"
},
{
"name": "Java",
"bytes": "6001"
}
],
"symlink_target": ""
} |
"""Unit tests for the write transform."""
import logging
import unittest
import apache_beam as beam
from apache_beam.io import iobase
from apache_beam.testing.test_pipeline import TestPipeline
from apache_beam.testing.util import assert_that, is_empty
from apache_beam.transforms.ptransform import PTransform
class _TestSink(iobase.Sink):
TEST_INIT_RESULT = 'test_init_result'
def __init__(self, return_init_result=True, return_write_results=True):
self.return_init_result = return_init_result
self.return_write_results = return_write_results
def initialize_write(self):
if self.return_init_result:
return _TestSink.TEST_INIT_RESULT
def finalize_write(self, init_result, writer_results):
self.init_result_at_finalize = init_result
self.write_results_at_finalize = writer_results
def open_writer(self, init_result, uid):
writer = _TestWriter(init_result, uid, self.return_write_results)
return writer
class _TestWriter(iobase.Writer):
STATE_UNSTARTED, STATE_WRITTEN, STATE_CLOSED = 0, 1, 2
TEST_WRITE_RESULT = 'test_write_result'
def __init__(self, init_result, uid, return_write_results=True):
self.state = _TestWriter.STATE_UNSTARTED
self.init_result = init_result
self.uid = uid
self.write_output = []
self.return_write_results = return_write_results
def close(self):
assert self.state in (
_TestWriter.STATE_WRITTEN, _TestWriter.STATE_UNSTARTED)
self.state = _TestWriter.STATE_CLOSED
if self.return_write_results:
return _TestWriter.TEST_WRITE_RESULT
def write(self, value):
if self.write_output:
assert self.state == _TestWriter.STATE_WRITTEN
else:
assert self.state == _TestWriter.STATE_UNSTARTED
self.state = _TestWriter.STATE_WRITTEN
self.write_output.append(value)
class WriteToTestSink(PTransform):
def __init__(self, return_init_result=True, return_write_results=True):
self.return_init_result = return_init_result
self.return_write_results = return_write_results
self.last_sink = None
self.label = 'write_to_test_sink'
def expand(self, pcoll):
self.last_sink = _TestSink(return_init_result=self.return_init_result,
return_write_results=self.return_write_results)
return pcoll | beam.io.Write(self.last_sink)
class WriteTest(unittest.TestCase):
DATA = ['some data', 'more data', 'another data', 'yet another data']
def _run_write_test(self,
data,
return_init_result=True,
return_write_results=True):
write_to_test_sink = WriteToTestSink(return_init_result,
return_write_results)
with TestPipeline() as p:
result = p | beam.Create(data) | write_to_test_sink | beam.Map(list)
assert_that(result, is_empty())
sink = write_to_test_sink.last_sink
self.assertIsNotNone(sink)
def test_write(self):
self._run_write_test(WriteTest.DATA)
def test_write_with_empty_pcollection(self):
data = []
self._run_write_test(data)
def test_write_no_init_result(self):
self._run_write_test(WriteTest.DATA, return_init_result=False)
def test_write_no_write_results(self):
self._run_write_test(WriteTest.DATA, return_write_results=False)
if __name__ == '__main__':
logging.getLogger().setLevel(logging.INFO)
unittest.main()
| {
"content_hash": "a113a11e9176841b8a80afd0cc76762b",
"timestamp": "",
"source": "github",
"line_count": 109,
"max_line_length": 78,
"avg_line_length": 31.174311926605505,
"alnum_prop": 0.6839317245438493,
"repo_name": "yk5/beam",
"id": "50f0debb0a704d267fc0c390e189ec8934bd6701",
"size": "4182",
"binary": false,
"copies": "7",
"ref": "refs/heads/master",
"path": "sdks/python/apache_beam/transforms/write_ptransform_test.py",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Groovy",
"bytes": "50057"
},
{
"name": "Java",
"bytes": "11703716"
},
{
"name": "Protocol Buffer",
"bytes": "55082"
},
{
"name": "Python",
"bytes": "2856021"
},
{
"name": "Shell",
"bytes": "44966"
}
],
"symlink_target": ""
} |
"""Classes related to Rivendell Artists.
Artist uses sqlalchemy to represent a single artist and various
aspects about it as used in the Scheduler.
"""
from sqlalchemy import Column
from sqlalchemy import Integer
from sqlalchemy import Unicode
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
Base = declarative_base()
class Artist(Base):
"""An artist.
Contains a single artist and its related scheduling information,
such as the "age" to calculate "artist separation" for
the generated merge file. Maintains a persistent list of artists
and the number of units ago each was last scheduled.
"""
__tablename__ = 'artists'
name = Column(Unicode(34), primary_key=True)
age = Column(Integer, default=1)
def __repr__(self):
"""Represent ourself to the world."""
return f"'{self.name}':{self.age}"
def reset(self):
"""Reset age to 0. This happens when the artist gets scheduled."""
self.age = 1
def __add__(self, value):
"""Increment the age counter for the named artist."""
self.age = self.age + value
return self
def __iadd__(self, value):
"""In-place increment (+=) of age counter for the named artist."""
self.age += value
return self
def __sub__(self, value):
"""Decrement the artist's age counter."""
self.age = self.age - value
return self
def __isub__(self, value):
"""In-place decrement (-=) of artist's age counter."""
self.age -= value
return self
class Artists():
"""The collection of all artists."""
def __init__(self, method, location, separation):
"""Make a group of artists.
:param method: The database backend method (sqlite, mysql,
etc.).
:param location: The location of the backend database.
:param separation: The integer value representing the number
of "units" that must transpire before an artist may be
scheduled.
"""
self.method = method
self.location = location
self.separation = separation
self.engine = create_engine(method + '://' + location, echo=False)
session = sessionmaker(bind=self.engine)
self.session = session()
Base.metadata.create_all(self.engine)
@property
def all(self):
"""Read the data source and return all the rows a dictionary."""
return {a.name: a.age for a in self.session.query(Artist).all()}
def add(self, artist):
"""Add this artist to the list."""
try:
new_artist = Artist(name=artist.lower(), age=1)
self.session.add(new_artist)
#self.session.commit()
except:
print("Artist: ERROR: unable to add new artist '{a}'."
.format(a=artist))
return False
return True
def bump(self, artist):
"""Increment the age counter for all artists in the list.
Then reset the counter for 'artist' to 1 since this is the artist
we are scheduling.
"""
for one_of_all_artists in self.session.query(Artist).all():
one_of_all_artists += 1
if artist is None:
artist = 'xx-missing-artist-xx'
this_artist = self.session.query(Artist).filter_by(name=artist.lower()).first()
if this_artist is None:
self.add(artist)
else:
this_artist.reset()
def ok_to_schedule(self, artist):
"""Whether it's OK to schedule this artist.
Has this artist been scheduled more recently than "separation"
units?
"""
if artist is None:
artist = 'xx-missing-artist-xx'
a = self.session.query(Artist).filter_by(name=artist.lower()).first()
if a is None:
# Apparently we have not yet seen this artist.
if not self.add(artist):
return False
return True
if a.age < self.separation:
return False
return True
| {
"content_hash": "1d7cc295b6d216554851ad27b6c3ae9b",
"timestamp": "",
"source": "github",
"line_count": 138,
"max_line_length": 87,
"avg_line_length": 30.028985507246375,
"alnum_prop": 0.6037644787644788,
"repo_name": "opensourceradio/ram",
"id": "eda170784051902cc3630adb43e4b6f9e861d7a1",
"size": "4144",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "usr/local/bin/btd_sched/artist.py",
"mode": "33188",
"license": "bsd-2-clause",
"language": [
{
"name": "Perl",
"bytes": "62318"
},
{
"name": "Python",
"bytes": "55373"
},
{
"name": "Shell",
"bytes": "443379"
}
],
"symlink_target": ""
} |
package org.activiti.standalone.testing;
/**
* This test is explicitly empty.
*
* The purpose of this test is to make sure that ActivitiRule works with tests methods that are defined in a parent class.
*
* When running the test suite over this class, JUnit will execute the test from {@link ActivitiRuleJunit4Test}. This means that the code in {@link org.activiti.engine.impl.test.TestHelper} needs to
* be able to find the test method even when it's not declared on the test class itself.
*
* Specifically, {@link org.activiti.engine.impl.test.TestHelper} needs to call getMethod() rather than getDeclaredMethod() since the method is declared in a parent of the actual test class.
*/
public class ActivitiRuleJunit4SubclassTest extends ActivitiRuleJunit4Test {
}
| {
"content_hash": "dba285705e743374d5d586c5f4cb196f",
"timestamp": "",
"source": "github",
"line_count": 15,
"max_line_length": 198,
"avg_line_length": 51.86666666666667,
"alnum_prop": 0.7737789203084833,
"repo_name": "stefan-ziel/Activiti",
"id": "a12367824470822cf2ae43ef501e504508f1d57c",
"size": "778",
"binary": false,
"copies": "3",
"ref": "refs/heads/6.x-c",
"path": "modules/activiti-engine/src/test/java/org/activiti/standalone/testing/ActivitiRuleJunit4SubclassTest.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "166"
},
{
"name": "CSS",
"bytes": "292473"
},
{
"name": "HTML",
"bytes": "774326"
},
{
"name": "Java",
"bytes": "20888915"
},
{
"name": "JavaScript",
"bytes": "8873337"
},
{
"name": "PLSQL",
"bytes": "1426"
},
{
"name": "PLpgSQL",
"bytes": "4868"
},
{
"name": "Shell",
"bytes": "8194"
}
],
"symlink_target": ""
} |
#region License
// PH.NLogging - AssemblyInfo.cs
//
//
// Copyright (c) 2015, Paolo Innocenti - paonath
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// 3. Neither the name of PH.NLogging nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
//
#endregion
using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("PH.NLogging.Services.Contracts")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("PH")]
[assembly: AssemblyProduct("PH.NLogging.Services.Contracts")]
[assembly: AssemblyCopyright("Copyright © paonath 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("5106f178-0e2d-411b-b261-8b3e90bcf7ee")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
//[assembly: AssemblyVersion("0.1.*")]
//[assembly: AssemblyVersion("1.0.0.0")]
//[assembly: AssemblyFileVersion("1.0.0.0")] | {
"content_hash": "370f1bc21994212fd27cb6596ef6af0b",
"timestamp": "",
"source": "github",
"line_count": 76,
"max_line_length": 84,
"avg_line_length": 40.421052631578945,
"alnum_prop": 0.7506510416666666,
"repo_name": "paonath/PH.NLoggin",
"id": "4f65db9d88b025a80997f32b9401627d5afe45ae",
"size": "3075",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "PH.NLogging/PH.NLogging.Services.Contracts/Properties/AssemblyInfo.cs",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "C#",
"bytes": "22799"
}
],
"symlink_target": ""
} |
from django.conf.urls import include, url
from django.contrib import admin
urlpatterns = [
url(r'^instavent/', include('weekend.urls', namespace='instavent')),
url(r'^admin/', include(admin.site.urls)),
]
| {
"content_hash": "3d291ef8c1ab3ae175291054d04d48dc",
"timestamp": "",
"source": "github",
"line_count": 7,
"max_line_length": 72,
"avg_line_length": 30.571428571428573,
"alnum_prop": 0.705607476635514,
"repo_name": "ecatkins/week6weekend",
"id": "4f38bc441e45841cc56228e5e655c66d4e242d7b",
"size": "214",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "project/project/urls.py",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "2374"
},
{
"name": "HTML",
"bytes": "2539"
},
{
"name": "JavaScript",
"bytes": "3399"
},
{
"name": "Python",
"bytes": "14118"
}
],
"symlink_target": ""
} |
package goyaml
import (
"errors"
"fmt"
"reflect"
"runtime"
"strings"
"sync"
)
func handleErr(err *error) {
if r := recover(); r != nil {
if _, ok := r.(runtime.Error); ok {
panic(r)
} else if _, ok := r.(*reflect.ValueError); ok {
panic(r)
} else if _, ok := r.(externalPanic); ok {
panic(r)
} else if s, ok := r.(string); ok {
*err = errors.New("YAML error: " + s)
} else if e, ok := r.(error); ok {
*err = e
} else {
panic(r)
}
}
}
// Objects implementing the goyaml.Setter interface will receive the YAML
// tag and value via the SetYAML method during unmarshaling, rather than
// being implicitly assigned by the goyaml machinery. If setting the value
// works, the method should return true. If it returns false, the given
// value will be omitted from maps and slices.
type Setter interface {
SetYAML(tag string, value interface{}) bool
}
// Objects implementing the goyaml.Getter interface will get the GetYAML()
// method called when goyaml is requested to marshal the given value, and
// the result of this method will be marshaled in place of the actual object.
type Getter interface {
GetYAML() (tag string, value interface{})
}
// Unmarshal decodes the first document found within the in byte slice
// and assigns decoded values into the object pointed by out.
//
// Maps, pointers to structs and ints, etc, may all be used as out values.
// If an internal pointer within a struct is not initialized, goyaml
// will initialize it if necessary for unmarshalling the provided data,
// but the struct provided as out must not be a nil pointer.
//
// The type of the decoded values and the type of out will be considered,
// and Unmarshal() will do the best possible job to unmarshal values
// appropriately. It is NOT considered an error, though, to skip values
// because they are not available in the decoded YAML, or if they are not
// compatible with the out value. To ensure something was properly
// unmarshaled use a map or compare against the previous value for the
// field (usually the zero value).
//
// Struct fields are only unmarshalled if they are exported (have an
// upper case first letter), and will be unmarshalled using the field
// name lowercased by default. When custom field names are desired, the
// tag value may be used to tweak the name. Everything before the first
// comma in the field tag will be used as the name. The values following
// the comma are used to tweak the marshalling process (see Marshal).
//
// For example:
//
// type T struct {
// F int "a,omitempty"
// B int
// }
// var T t
// goyaml.Unmarshal([]byte("a: 1\nb: 2"), &t)
//
func Unmarshal(in []byte, out interface{}) (err error) {
defer handleErr(&err)
d := newDecoder()
p := newParser(in)
defer p.destroy()
node := p.parse()
if node != nil {
d.unmarshal(node, reflect.ValueOf(out))
}
return nil
}
// Marshal serializes the value provided into a YAML document. The structure
// of the generated document will reflect the structure of the value itself.
// Maps, pointers to structs and ints, etc, may all be used as the in value.
//
// In the case of struct values, only exported fields will be serialized.
// The lowercased field name is used as the key for each exported field,
// but this behavior may be changed using the respective field tag.
// The tag may also contain flags to tweak the marshalling behavior for
// the field. The tag formats accepted are:
//
// "[<key>][,<flag1>[,<flag2>]]"
//
// `(...) yaml:"[<key>][,<flag1>[,<flag2>]]" (...)`
//
// The following flags are currently supported:
//
// omitempty Only include the field if it's not set to the zero
// value for the type or to empty slices or maps.
// Does not apply to zero valued structs.
//
// flow Marshal using a flow style (useful for structs,
// sequences and maps.
//
// For example:
//
// type T struct {
// F int "a,omitempty"
// B int
// }
// goyaml.Marshal(&T{B: 2}) // Returns "b: 2\n"
// goyaml.Marshal(&T{F: 1}} // Returns "a: 1\nb: 0\n"
//
func Marshal(in interface{}) (out []byte, err error) {
defer handleErr(&err)
e := newEncoder()
defer e.destroy()
e.marshal("", reflect.ValueOf(in))
e.finish()
out = e.out
return
}
// --------------------------------------------------------------------------
// Maintain a mapping of keys to structure field indexes
// The code in this section was copied from gobson.
type structFields struct {
Map map[string]fieldInfo
List []fieldInfo
}
type fieldInfo struct {
Key string
Num int
OmitEmpty bool
Flow bool
}
var fieldMap = make(map[string]*structFields)
var fieldMapMutex sync.RWMutex
type externalPanic string
func (e externalPanic) String() string {
return string(e)
}
func getStructFields(st reflect.Type) (*structFields, error) {
path := st.PkgPath()
name := st.Name()
fullName := path + "." + name
fieldMapMutex.RLock()
fields, found := fieldMap[fullName]
fieldMapMutex.RUnlock()
if found {
return fields, nil
}
n := st.NumField()
fieldsMap := make(map[string]fieldInfo)
fieldsList := make([]fieldInfo, n)
for i := 0; i != n; i++ {
field := st.Field(i)
if field.PkgPath != "" {
continue // Private field
}
info := fieldInfo{Num: i}
tag := field.Tag.Get("yaml")
if tag == "" && strings.Index(string(field.Tag), ":") < 0 {
tag = string(field.Tag)
}
// XXX Drop this after a few releases.
if s := strings.Index(tag, "/"); s >= 0 {
recommend := tag[:s]
for _, c := range tag[s+1:] {
switch c {
case 'c':
recommend += ",omitempty"
case 'f':
recommend += ",flow"
default:
msg := fmt.Sprintf("Unsupported flag %q in tag %q of type %s", string([]byte{uint8(c)}), tag, st)
panic(externalPanic(msg))
}
}
msg := fmt.Sprintf("Replace tag %q in field %s of type %s by %q", tag, field.Name, st, recommend)
panic(externalPanic(msg))
}
fields := strings.Split(tag, ",")
if len(fields) > 1 {
for _, flag := range fields[1:] {
switch flag {
case "omitempty":
info.OmitEmpty = true
case "flow":
info.Flow = true
default:
msg := fmt.Sprintf("Unsupported flag %q in tag %q of type %s", flag, tag, st)
panic(externalPanic(msg))
}
}
tag = fields[0]
}
if tag != "" {
info.Key = tag
} else {
info.Key = strings.ToLower(field.Name)
}
if _, found = fieldsMap[info.Key]; found {
msg := "Duplicated key '" + info.Key + "' in struct " + st.String()
return nil, errors.New(msg)
}
fieldsList[len(fieldsMap)] = info
fieldsMap[info.Key] = info
}
fields = &structFields{fieldsMap, fieldsList[:len(fieldsMap)]}
if fullName != "." {
fieldMapMutex.Lock()
fieldMap[fullName] = fields
fieldMapMutex.Unlock()
}
return fields, nil
}
func isZero(v reflect.Value) bool {
switch v.Kind() {
case reflect.String:
return len(v.String()) == 0
case reflect.Interface, reflect.Ptr:
return v.IsNil()
case reflect.Slice:
return v.Len() == 0
case reflect.Map:
return v.Len() == 0
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
return v.Int() == 0
case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
return v.Uint() == 0
case reflect.Bool:
return !v.Bool()
}
return false
}
| {
"content_hash": "751be1bc3c2a5df0ce2dd45597c13f2d",
"timestamp": "",
"source": "github",
"line_count": 264,
"max_line_length": 102,
"avg_line_length": 28.068181818181817,
"alnum_prop": 0.6462887989203778,
"repo_name": "soundcloud/goyaml",
"id": "518ddeb8a26bac2e3c5ae60d3c488efefc4d5311",
"size": "7607",
"binary": false,
"copies": "6",
"ref": "refs/heads/master",
"path": "goyaml.go",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "332327"
},
{
"name": "C++",
"bytes": "441"
},
{
"name": "Go",
"bytes": "44240"
},
{
"name": "Objective-C",
"bytes": "28826"
}
],
"symlink_target": ""
} |
package com.vinkel.remindmewheniamthere.utils;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonObject;
import com.google.gson.JsonPrimitive;
import com.vinkel.remindmewheniamthere.utils.base.IJsonParser;
import java.lang.reflect.Type;
public class JsonParser implements IJsonParser {
@Override
public String toJson(Object src) {
Gson gson = new Gson();
String json = gson.toJson(src);
return json;
}
@Override
public <T> T fromJson(String json, Type classOfT) {
GsonBuilder builder = new GsonBuilder();
Gson gson = builder.create();
T result = gson.fromJson(json, classOfT);
return result;
}
@Override
public <T> T[] fromJsonArray(String json, Type arrayClassOfT) {
GsonBuilder builder = new GsonBuilder();
Gson gson = builder.create();
T[] result = gson.fromJson(json, arrayClassOfT);
return result;
}
@Override
public String getDirectMember(String json, String memberName) {
com.google.gson.JsonParser jsonParser = new com.google.gson.JsonParser();
JsonObject parent = jsonParser
.parse(json)
.getAsJsonObject();
JsonObject member = parent.getAsJsonObject(memberName);
return member.toString();
}
public String getDirectSimpleMember(String json, String memberName) {
com.google.gson.JsonParser jsonParser = new com.google.gson.JsonParser();
JsonObject parent = jsonParser
.parse(json)
.getAsJsonObject();
JsonPrimitive primitive = parent.getAsJsonPrimitive(memberName);
return primitive.toString();
}
}
| {
"content_hash": "63d1c56c74c6b64c9e1928658ee75e64",
"timestamp": "",
"source": "github",
"line_count": 61,
"max_line_length": 77,
"avg_line_length": 26.229508196721312,
"alnum_prop": 0.714375,
"repo_name": "Team-Vinkel2/Remind-me-when-I-am-there",
"id": "6dd1f1c988bb149f5af7a36d1233b5e8eaa8e0c0",
"size": "1600",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "RemindMeWhenIAmThere/app/src/main/java/com/vinkel/remindmewheniamthere/utils/JsonParser.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Java",
"bytes": "166722"
}
],
"symlink_target": ""
} |
package com.glatthar.authorizer.repository;
import com.glatthar.authorizer.model.dto.JpaClient;
public interface InMemoryClientRepository extends ClientRepository<JpaClient> {
}
| {
"content_hash": "1de4556f11c6c14d38779f1794464a8d",
"timestamp": "",
"source": "github",
"line_count": 6,
"max_line_length": 79,
"avg_line_length": 30,
"alnum_prop": 0.85,
"repo_name": "t0bst4r/authorizer",
"id": "2a682c12dad45a4da554d2607db8020e8a01b935",
"size": "180",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "authorizer-data/in-memory/src/main/java/com/glatthar/authorizer/repository/InMemoryClientRepository.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Java",
"bytes": "51921"
}
],
"symlink_target": ""
} |
package VMOMI::EventFilterSpecByTime;
use parent 'VMOMI::DynamicData';
use strict;
use warnings;
our @class_ancestors = (
'DynamicData',
);
our @class_members = (
['beginTime', undef, 0, 1],
['endTime', undef, 0, 1],
);
sub get_class_ancestors {
return @class_ancestors;
}
sub get_class_members {
my $class = shift;
my @super_members = $class->SUPER::get_class_members();
return (@super_members, @class_members);
}
1;
| {
"content_hash": "2dc361f3534452561fb26a805609dec5",
"timestamp": "",
"source": "github",
"line_count": 26,
"max_line_length": 59,
"avg_line_length": 17.46153846153846,
"alnum_prop": 0.6409691629955947,
"repo_name": "stumpr/p5-vmomi",
"id": "2dcab254a8e8bfde2a9f3f415e660e4e920b3e4f",
"size": "454",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "lib/VMOMI/EventFilterSpecByTime.pm",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Perl",
"bytes": "2084415"
}
],
"symlink_target": ""
} |
#![allow(unused_assignments)]
use super::{Async, Future, Complete, Cancel, AsyncError};
use syncbox::atomic::{self, AtomicU64, Ordering};
use std::cell::UnsafeCell;
use std::sync::Arc;
use std::{fmt, u32};
pub fn select<S: Select<E>, E: Send + 'static>(asyncs: S) -> Future<(u32, S), E> {
let (complete, res) = Future::pair();
// Don't do any work until the consumer registers interest in the completed
// value.
complete.receive(move |res| {
if let Ok(complete) = res {
asyncs.select(complete);
}
});
res
}
pub trait Select<E: Send + 'static> : Send + 'static {
fn select(self, complete: Complete<(u32, Self), E>);
}
// ## Flow
//
// * - Start in initial state, in a loop register a ready callback on each async.
// - Place Cancel into slot
// - Attempt to inc callbacks registered
// - If fail, remove Cancel & Cancel callback
// - Success: Place async in val storage
//
// - Ready callback will:
// - Attempt to transition from Init state -> Won state.
// - If success, become responsible for canceling callbacks registered
// according to state val (place successfully canceled vals into
// async store)
// - Place async in vals storage
//
//
// ## TODO
//
// - On selection failure, cancel all other pending futures. This will only
// matter if / when interest cancellation gets proxied up.
//
// - Switch to associated types over Index & Error
// Blocked: rust-lang/rust#21664
trait Values<S: Select<E>, E> {
type Tokens: Send + 'static;
fn consume(&mut self) -> S;
fn cancel_callbacks(&mut self, selected: u32, up_to: u32, tokens: &mut Self::Tokens) -> u32;
}
struct Selection<V: Values<S, E>, S: Select<E>, E: Send + 'static> {
core: Arc<UnsafeCell<Core<V, S, E>>>,
}
unsafe impl<V: Values<S, E>, S: Select<E>, E: Send + 'static> Sync for Selection<V, S, E> {}
unsafe impl<V: Values<S, E>, S: Select<E>, E: Send + 'static> Send for Selection<V, S, E> {}
// This implementation is very unsafe
impl<V: Values<S, E>, S: Select<E>, E: Send + 'static> Selection<V, S, E> {
/// Create a new Selection instance
fn new(vals: V,
tokens: V::Tokens,
remaining: u32,
complete: Complete<(u32, S), E>) -> Selection<V, S, E> {
let core = Arc::new(UnsafeCell::new(Core {
vals: vals,
tokens: tokens,
complete: Some(complete),
state: AtomicState::new(remaining),
}));
Selection { core: core }
}
fn async_ready<A: Async<Error=E>>(&self, async: A, index: u32, slot: &mut Option<A>) {
let mut handled = 1;
debug!("selection async ready; index={}; is_err={}", index, async.is_err());
// Attempt to "win" the selection process
let (win, prev, curr) = self.core().state.try_win(index, async.is_err());
if win {
// Deregister all callbacks that have been registered up to now
handled += self.core_mut().vals.cancel_callbacks(
index, prev.callbacks_registered(), &mut self.core_mut().tokens);
debug!("async val won select; handled={}", handled);
if async.is_err() {
debug!("first realized async val is error");
let complete = self.core_mut().complete.take()
.expect("result future previously completed");
if let Err(AsyncError::Failed(e)) = async.expect() {
debug!("execution error");
complete.fail(e);
}
// If cancellation error, don't do anything
return;
}
}
// The selection has already errored out, there is no need to track
// anything further
if curr.is_err() {
return;
}
// Stash async value
*slot = Some(async);
self.dec_remaining(handled, curr);
}
// Track that a callback was just registered on an async value.
fn track_callback<A: Async>(&self,
cancel: A::Cancel,
aref: &mut Option<A>,
cref: &mut Option<A::Cancel>) -> bool {
// Store the cancel token
*cref = Some(cancel);
// Increment the registered callback count, if success, then there
// isn't anything else to do.
let (success, curr) = self.core().state.inc_callbacks_registered();
if !success {
// Select is done, cancel the callback that was just
// registered
let cancel = cref.take().expect("cancel token not present");
// Attempt to cancel the callback
if let Some(async) = cancel.cancel() {
// Store off the async
*aref = Some(async);
self.dec_remaining(1, curr);
return false;
}
}
// Successfully tracked the callback
return true;
}
// Track async values that have moved to the ready state
fn dec_remaining(&self, count: u32, mut curr: State) {
if count == 0 {
debug!("dec_remaining -- nothing to do");
return;
}
// Decrement the remaining count by the number of successfully
// canceled callbacks
curr = self.core().state.dec_remaining(count, curr);
debug!("dec_remaining -- performed dec; state={:?}", curr);
// TODO: This should not be in the win condition
if curr.remaining() == 0 {
// Last remaining async acquired, complete future
self.complete(curr);
}
}
fn complete(&self, curr: State) {
// Use an Acquire fence to ensure that all async values are loaded into
// memory
atomic::fence(Ordering::Acquire);
let core = self.core_mut();
// Get the completer
let complete = core.complete.take().expect("result future previously completed");
// And complete the select
complete.complete((curr.selected(), core.vals.consume()));
}
fn core(&self) -> &Core<V, S, E> {
use std::mem;
unsafe { mem::transmute(self.core.get()) }
}
fn core_mut(&self) -> &mut Core<V, S, E> {
use std::mem;
unsafe { mem::transmute(self.core.get()) }
}
}
impl<V: Values<S, E>, S: Select<E>, E: Send + 'static> Selection<V, S, E> {
fn clone(&self) -> Selection<V, S, E> {
Selection { core: self.core.clone() }
}
}
struct Core<V: Values<S, E>, S: Select<E>, E: Send + 'static> {
vals: V,
tokens: V::Tokens,
complete: Option<Complete<(u32, S), E>>,
state: AtomicState,
}
/*
*
* ===== Macro helpers =====
*
*/
macro_rules! expr {
($e: expr) => { $e };
}
macro_rules! components {
($selection:ident, $pending:ident, $handled:ident, ($async:ident, $id:tt)) => {{
if $pending {
let s = $selection.clone();
let c = $async.ready(move |a| {
s.async_ready(a, expr!($id), expr!(&mut s.core_mut().vals.$id))
});
let core = $selection.core_mut();
$pending = $selection.track_callback(
c, expr!(&mut core.vals.$id), expr!(&mut core.tokens.$id));
} else {
expr!($selection.core_mut().vals.$id) = Some($async);
$handled += 1;
}
}};
($selection:ident, $pending:ident, $handled:ident, ($async:ident, $id:tt), $($rest:tt),+) => {{
components!($selection, $pending, $handled, ($async, $id));
components!($selection, $pending, $handled, $($rest),*);
}};
}
macro_rules! tuple_select {
($count:expr, $complete:ident, $vals:expr, $tokens:expr, $(($async:ident, $id:tt)),+) => {{
// Create the selection
let selection = Selection::new($vals, $tokens, $count, $complete);
let mut pending = true;
let mut handled = 0;
components!(selection, pending, handled, $(($async, $id)),*);
// Components
if handled > 0 {
selection.dec_remaining(handled, selection.core().state.load(Ordering::Relaxed));
}
}}
}
macro_rules! cancel_callbacks {
($s:ident, $selected:ident, $up_to:ident, $tokens:ident, $ret:ident, $i:tt) => {{
{
let i = expr!($i);
if $selected != i && $up_to >= i+1 {
let cancel = expr!($tokens.$i.take().expect("cancel token missing"));
if let Some(async) = cancel.cancel() {
expr!($s.$i) = Some(async);
$ret += 1;
}
}
}
}};
($s:ident, $selected:ident, $up_to:ident, $tokens:ident, $ret:ident, $i:tt, $($rest:tt),+) => {{
cancel_callbacks!($s, $selected, $up_to, $tokens, $ret, $i);
cancel_callbacks!($s, $selected, $up_to, $tokens, $ret, $($rest),*);
}};
}
/*
*
* ===== State =====
*
*/
struct AtomicState {
atomic: AtomicU64,
}
impl AtomicState {
fn new(remaining: u32) -> AtomicState {
let init = State::new(remaining);
AtomicState { atomic: AtomicU64::new(init.as_u64()) }
}
fn load(&self, order: Ordering) -> State {
State::load(self.atomic.load(order))
}
fn compare_and_swap(&self, old: State, new: State, order: Ordering) -> State {
let actual = self.atomic.compare_and_swap(old.as_u64(), new.as_u64(), order);
State::load(actual)
}
fn try_win(&self, index: u32, err: bool) -> (bool, State, State) {
let mut curr = self.load(Ordering::Relaxed);
loop {
if curr.is_won() {
return (false, curr, curr);
}
let next = if err {
curr.as_err()
} else {
curr.as_won(index)
};
let actual = self.compare_and_swap(curr, next, Ordering::Acquire);
if actual == curr {
return (true, curr, next);
}
curr = actual;
}
}
fn inc_callbacks_registered(&self) -> (bool, State) {
let mut curr = self.load(Ordering::Relaxed);
loop {
if curr.is_won() {
return (false, curr);
}
let next = curr.inc_callbacks_registered();
let actual = self.compare_and_swap(curr, next, Ordering::Release);
if actual == curr {
return (true, next);
}
curr = actual;
}
}
fn dec_remaining(&self, count: u32, mut curr: State) -> State {
loop {
assert!(curr.remaining() >= count, "curr={}; count={}", curr.remaining(), count);
let next = curr.dec_remaining(count);
let actual = self.compare_and_swap(curr, next, Ordering::Release);
if actual == curr {
debug!("dec_remaining -- transitioned state; from={:?}; to={:?}", curr, next);
return next;
}
curr = actual;
}
}
}
/*
* == State u64 ==
*
* 1 bit: Won (0: init, 1: won)
* 1 bit: Error
* 31 bits:
* - Remaining Async vals being waited on
*
* 31 bits:
* - init: Callbacks registered
* - Won: Index that won
*/
#[derive(Copy, Clone, PartialEq, Eq)]
struct State {
val: u64,
}
impl fmt::Debug for State {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
if self.is_won() {
write!(fmt, "State[won={}; err={}; selected={}; remaining={}]",
true, self.is_err(), self.selected(), self.remaining())
} else {
write!(fmt, "State[won={}; err={}; callbacks={}; remaining={}]",
false, false, self.callbacks_registered(), self.remaining())
}
}
}
const WON_MASK: u64 = 1;
const ERR_MASK: u64 = 1 << 1;
const REM_MASK: u64 = (1 << 31) - 1;
impl State {
fn new(remaining: u32) -> State {
assert!(remaining <= (u32::MAX >> 1));
State { val: (remaining as u64) << 2 }
}
fn load(val: u64) -> State {
State { val: val }
}
fn is_won(&self) -> bool {
self.val & WON_MASK == WON_MASK
}
fn as_won(&self, index: u32) -> State {
assert!(index <= (u32::MAX >> 1));
let val = WON_MASK | ((index as u64) << 33)
| (self.val & (REM_MASK << 2))
;
State { val: val }
}
fn is_err(&self) -> bool {
self.val & ERR_MASK == ERR_MASK
}
fn as_err(&self) -> State {
let val = WON_MASK | ERR_MASK
| (self.val & (REM_MASK << 2))
;
State { val: val }
}
fn callbacks_registered(&self) -> u32 {
assert!(!self.is_won());
self.most_significant_u31()
}
fn inc_callbacks_registered(&self) -> State {
assert!(!self.is_won());
State { val: self.val + (1 << 33) }
}
fn selected(&self) -> u32 {
assert!(self.is_won());
self.most_significant_u31()
}
fn remaining(&self) -> u32 {
((self.val >> 2) & REM_MASK) as u32
}
fn dec_remaining(&self, count: u32) -> State {
State { val: self.val - ((count as u64) << 2) }
}
fn most_significant_u31(&self) -> u32 {
(self.val >> 33) as u32
}
fn as_u64(&self) -> u64 {
self.val
}
}
/*
*
* ===== Select for Tuples =====
*
*/
impl<A1: Async<Error=E>, A2: Async<Error=E>, E: Send + 'static> Select<E> for (A1, A2) {
fn select(self, complete: Complete<(u32, (A1, A2)), E>) {
let (a1, a2) = self;
tuple_select!(
2, complete,
(None, None),
(None, None),
(a1, 0), (a2, 1));
}
}
impl<A1: Async<Error=E>, A2: Async<Error=E>, E> Values<(A1, A2), E> for (Option<A1>, Option<A2>)
where E: Send + 'static {
type Tokens = (Option<A1::Cancel>, Option<A2::Cancel>);
fn consume(&mut self) -> (A1, A2) {
(self.0.take().unwrap(), self.1.take().unwrap())
}
fn cancel_callbacks(&mut self,
selected: u32,
up_to: u32,
tokens: &mut (Option<A1::Cancel>, Option<A2::Cancel>)) -> u32 {
let mut ret = 0;
cancel_callbacks!(
self, selected, up_to, tokens, ret,
0, 1);
ret
}
}
impl<A1: Async<Error=E>, A2: Async<Error=E>, A3: Async<Error=E>, E: Send + 'static> Select<E> for (A1, A2, A3) {
fn select(self, complete: Complete<(u32, (A1, A2, A3)), E>) {
let (a1, a2, a3) = self;
tuple_select!(
3, complete,
(None, None, None),
(None, None, None),
(a1, 0), (a2, 1), (a3, 2));
}
}
impl<A1: Async<Error=E>, A2: Async<Error=E>, A3: Async<Error=E>, E> Values<(A1, A2, A3), E> for (Option<A1>, Option<A2>, Option<A3>)
where E: Send + 'static {
type Tokens = (Option<A1::Cancel>, Option<A2::Cancel>, Option<A3::Cancel>);
fn consume(&mut self) -> (A1, A2, A3) {
(self.0.take().unwrap(), self.1.take().unwrap(), self.2.take().unwrap())
}
fn cancel_callbacks(&mut self,
selected: u32,
up_to: u32,
tokens: &mut (Option<A1::Cancel>, Option<A2::Cancel>, Option<A3::Cancel>)) -> u32 {
let mut ret = 0;
cancel_callbacks!(
self, selected, up_to, tokens, ret,
0, 1, 2);
ret
}
}
| {
"content_hash": "b0e6dc9e4249a037b6378e2cb4f94f86",
"timestamp": "",
"source": "github",
"line_count": 554,
"max_line_length": 132,
"avg_line_length": 28.1101083032491,
"alnum_prop": 0.5141591215565402,
"repo_name": "seanmonstar/eventual",
"id": "353ce9c4c35172c0b1eb4907b30cf868c6ec24bf",
"size": "15573",
"binary": false,
"copies": "5",
"ref": "refs/heads/master",
"path": "src/select.rs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Rust",
"bytes": "167258"
},
{
"name": "Shell",
"bytes": "373"
}
],
"symlink_target": ""
} |
require_relative '../../test_helper'
require 'landrush/action/common'
require 'landrush/action/teardown'
module Landrush
module Action
describe Teardown do
it 'calls the next app in the chain' do
env = fake_environment
app = ->(e) { e[:called] = true }
teardown = Teardown.new(app, env)
teardown.call(env)
env[:called].must_equal true
end
it "clears the machine's hostname => ip address" do
app = proc {}
env = fake_environment
teardown = Teardown.new(app, env)
Store.hosts.set('somehost.vagrant.test', '1.2.3.4')
teardown.call(env)
assert_nil Store.hosts.get('somehost.vagrant.test')
end
it 'removes the machine as a dependent VM' do
app = proc {}
env = fake_environment
teardown = Teardown.new(app, env)
DependentVMs.add('somehost.vagrant.test')
teardown.call(env)
DependentVMs.list.must_equal []
end
it 'stops the landrush server when there are no dependent machines left' do
app = proc {}
env = fake_environment
teardown = Teardown.new(app, env)
Server.start
teardown.call(env)
Server.status.must_equal :stopped
end
it 'leaves the landrush server when other dependent vms exist' do
app = proc {}
env = fake_environment
teardown = Teardown.new(app, env)
DependentVMs.add('otherhost.vagrant.test')
Server.working_dir = File.join(env[:home_path], 'data', 'landrush')
Server.gems_dir = env[:gems_path].to_s + '/gems'
Server.start
teardown.call(env)
Server.status.must_equal :running
end
it 'leaves static entries when other dependent vms exist' do
app = proc {}
env = fake_environment
teardown = Teardown.new(app, env)
DependentVMs.add('otherhost.vagrant.test')
fake_static_entry(env, 'static.vagrant.test', '3.4.5.6')
teardown.call(env)
Store.hosts.get('static.vagrant.test').must_equal '3.4.5.6'
end
it "leaves the server alone if it's not running" do
app = proc {}
env = fake_environment
teardown = Teardown.new(app, env)
teardown.call(env)
Server.status.must_equal :stopped
end
it 'does nothing when landrush is disabled' do
# somewhat unrealistic since this entry shouldn't be there if it was
# disabled in the first place, but oh well
Store.hosts.set('somehost.vagrant.test', '1.2.3.4')
app = proc {}
env = fake_environment
teardown = Teardown.new(app, env)
env[:machine].config.landrush.disable
teardown.call(env)
Store.hosts.get('somehost.vagrant.test').must_equal '1.2.3.4'
end
end
end
end
| {
"content_hash": "7a63c9d20d1f7f354253c6b28dea33f4",
"timestamp": "",
"source": "github",
"line_count": 106,
"max_line_length": 81,
"avg_line_length": 26.971698113207548,
"alnum_prop": 0.6016089541797831,
"repo_name": "phinze/landrush",
"id": "1fb04639ef3b2b1c906fa81ca020b2a9a91f24af",
"size": "2859",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "test/landrush/action/teardown_test.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Ruby",
"bytes": "52963"
}
],
"symlink_target": ""
} |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_21) on Fri Dec 02 11:53:58 IST 2011 -->
<TITLE>
Uses of Class com.invient.vaadin.charts.InvientChartsConfig.Position
</TITLE>
<META NAME="date" CONTENT="2011-12-02">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Class com.invient.vaadin.charts.InvientChartsConfig.Position";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../com/invient/vaadin/charts/InvientChartsConfig.Position.html" title="class in com.invient.vaadin.charts"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV
NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?com/invient/vaadin/charts//class-useInvientChartsConfig.Position.html" target="_top"><B>FRAMES</B></A>
<A HREF="InvientChartsConfig.Position.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<CENTER>
<H2>
<B>Uses of Class<br>com.invient.vaadin.charts.InvientChartsConfig.Position</B></H2>
</CENTER>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
Packages that use <A HREF="../../../../../com/invient/vaadin/charts/InvientChartsConfig.Position.html" title="class in com.invient.vaadin.charts">InvientChartsConfig.Position</A></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><A HREF="#com.invient.vaadin.charts"><B>com.invient.vaadin.charts</B></A></TD>
<TD> </TD>
</TR>
</TABLE>
<P>
<A NAME="com.invient.vaadin.charts"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
Uses of <A HREF="../../../../../com/invient/vaadin/charts/InvientChartsConfig.Position.html" title="class in com.invient.vaadin.charts">InvientChartsConfig.Position</A> in <A HREF="../../../../../com/invient/vaadin/charts/package-summary.html">com.invient.vaadin.charts</A></FONT></TH>
</TR>
</TABLE>
<P>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../com/invient/vaadin/charts/package-summary.html">com.invient.vaadin.charts</A> that return <A HREF="../../../../../com/invient/vaadin/charts/InvientChartsConfig.Position.html" title="class in com.invient.vaadin.charts">InvientChartsConfig.Position</A></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../../com/invient/vaadin/charts/InvientChartsConfig.Position.html" title="class in com.invient.vaadin.charts">InvientChartsConfig.Position</A></CODE></FONT></TD>
<TD><CODE><B>InvientChartsConfig.Legend.</B><B><A HREF="../../../../../com/invient/vaadin/charts/InvientChartsConfig.Legend.html#getPosition()">getPosition</A></B>()</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../../com/invient/vaadin/charts/InvientChartsConfig.Position.html" title="class in com.invient.vaadin.charts">InvientChartsConfig.Position</A></CODE></FONT></TD>
<TD><CODE><B>InvientChartsConfig.Credit.</B><B><A HREF="../../../../../com/invient/vaadin/charts/InvientChartsConfig.Credit.html#getPosition()">getPosition</A></B>()</CODE>
<BR>
</TD>
</TR>
</TABLE>
<P>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../com/invient/vaadin/charts/package-summary.html">com.invient.vaadin.charts</A> with parameters of type <A HREF="../../../../../com/invient/vaadin/charts/InvientChartsConfig.Position.html" title="class in com.invient.vaadin.charts">InvientChartsConfig.Position</A></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B>InvientChartsConfig.Legend.</B><B><A HREF="../../../../../com/invient/vaadin/charts/InvientChartsConfig.Legend.html#setPosition(com.invient.vaadin.charts.InvientChartsConfig.Position)">setPosition</A></B>(<A HREF="../../../../../com/invient/vaadin/charts/InvientChartsConfig.Position.html" title="class in com.invient.vaadin.charts">InvientChartsConfig.Position</A> position)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B>InvientChartsConfig.Credit.</B><B><A HREF="../../../../../com/invient/vaadin/charts/InvientChartsConfig.Credit.html#setPosition(com.invient.vaadin.charts.InvientChartsConfig.Position)">setPosition</A></B>(<A HREF="../../../../../com/invient/vaadin/charts/InvientChartsConfig.Position.html" title="class in com.invient.vaadin.charts">InvientChartsConfig.Position</A> position)</CODE>
<BR>
</TD>
</TR>
</TABLE>
<P>
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../com/invient/vaadin/charts/InvientChartsConfig.Position.html" title="class in com.invient.vaadin.charts"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV
NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?com/invient/vaadin/charts//class-useInvientChartsConfig.Position.html" target="_top"><B>FRAMES</B></A>
<A HREF="InvientChartsConfig.Position.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>
| {
"content_hash": "4eb73a727ceb666c697dd70fd9555fb1",
"timestamp": "",
"source": "github",
"line_count": 212,
"max_line_length": 400,
"avg_line_length": 49.094339622641506,
"alnum_prop": 0.6503651037663336,
"repo_name": "shahrzadmn/InvientCharts",
"id": "66a0452978a1de90d17035276b7d573101a1ea30",
"size": "10408",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "doc/com/invient/vaadin/charts/class-use/InvientChartsConfig.Position.html",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "1141"
},
{
"name": "Java",
"bytes": "833583"
},
{
"name": "JavaScript",
"bytes": "32438"
}
],
"symlink_target": ""
} |
package container;
/**
* Interface of FIFO queue.
*/
public interface Queue<E> extends Iterable<E> {
/**
* Insert an item at the end of the queue.
* @param item the element to be added
*/
public abstract void offer(E item);
/**
* Remove and return the element at the begining of the queue.
* @return the element removed
* @throws EmptyQueueException If the queue is empty.
*/
public abstract E poll();
/**
* Return the element at the begining of the queue without removing it.
* @return the element retrived
* @throws EmptyQueueException if the queue is empty
*/
public abstract E peek();
/**
* Check if the queue is empty.
* @return true if it is empty, or else false
*/
public abstract boolean isEmpty();
/**
* Return the number of elements in the queue.
* @return the number of elements in the queue.
*/
public abstract int size();
}
class EmptyQueueException extends RuntimeException {
public EmptyQueueException() {
super();
}
} | {
"content_hash": "f3f0800dd131f16c8327199750b6c88d",
"timestamp": "",
"source": "github",
"line_count": 49,
"max_line_length": 75,
"avg_line_length": 22.183673469387756,
"alnum_prop": 0.6274149034038639,
"repo_name": "Shell-CC/MyCollection",
"id": "949b98136840f44967f467e93341a72fcde966ea",
"size": "1087",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "src/container/Queue.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "90122"
}
],
"symlink_target": ""
} |
var baseToString = require('../internal/baseToString');
/**
* Used to match `RegExp` special characters.
* See this [article on `RegExp` characters](http://www.regular-expressions.info/characters.html#special)
* for more details.
*/
var reRegExpChars = /[.*+?^${}()|[\]\/\\]/g,
reHasRegExpChars = RegExp(reRegExpChars.source);
/**
* Escapes the `RegExp` special characters "\", "^", "$", ".", "|", "?", "*",
* "+", "(", ")", "[", "]", "{" and "}" in `string`.
*
* @static
* @memberOf _
* @category String
* @param {string} [string=''] The string to escape.
* @returns {string} Returns the escaped string.
* @example
*
* _.escapeRegExp('[lodash](https://lodash.com/)');
* // => '\[lodash\]\(https://lodash\.com/\)'
*/
function escapeRegExp(string) {
string = baseToString(string);
return (string && reHasRegExpChars.test(string))
? string.replace(reRegExpChars, '\\$&')
: string;
}
module.exports = escapeRegExp;
| {
"content_hash": "1c96818f26fc702dc57be963dd90722d",
"timestamp": "",
"source": "github",
"line_count": 32,
"max_line_length": 105,
"avg_line_length": 30.625,
"alnum_prop": 0.5877551020408164,
"repo_name": "CoderHam/WebScraper",
"id": "920360e8251976b9e1c7de958d7d816e72da925c",
"size": "980",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "node_modules/webdriverio/node_modules/archiver/node_modules/lodash/string/escapeRegExp.js",
"mode": "33261",
"license": "apache-2.0",
"language": [
{
"name": "HTML",
"bytes": "1070"
},
{
"name": "JavaScript",
"bytes": "6347"
}
],
"symlink_target": ""
} |
<?php
namespace crawlerests\frontend\classes;
use luya\crawler\frontend\classes\CrawlPage;
use Symfony\Component\DomCrawler\Crawler;
class CrawlPageTest extends \PHPUnit_Framework_TestCase
{
public $object;
protected function setUp()
{
$this->app = new \luya\Boot();
$this->app->setConfigArray([
'id' => 'testenv',
'siteTitle' => 'Luya Tests',
'remoteToken' => 'testtoken',
'basePath' => dirname(__DIR__),
]);
$this->app->mockOnly = true;
$this->app->setBaseYiiFile(__DIR__.'/../../../vendor/yiisoft/yii2/Yii.php');
$this->app->applicationWeb();
$this->object = new CrawlPage(['baseUrl' => 'http://localhost', 'pageUrl' => 'http://localhost', 'verbose' => false, 'useH1' => false]);
$this->object->setCrawler(new Crawler(file_get_contents('tests/data/luyaio.html')));
}
public function testCrawlerLinks()
{
$this->assertSame(149, count($this->object->getLinks()));
}
public function testLanguage()
{
$this->assertSame('en', $this->object->getLanguageInfo());
}
public function testTitle()
{
$this->assertSame('Title Tag', $this->object->getTitle());
}
public function testTitleH1()
{
$this->assertSame('Guide', $this->object->getTitleH1());
}
public function testFalseCrawlerTitle()
{
$this->assertFalse($this->object->getTitleCrawlerTag());
}
public function testGetGroup()
{
$this->assertSame('grp', $this->object->getGroup());
}
public function testSuccessCrawlerTitle()
{
$this->object->setCrawler(new Crawler(file_get_contents('tests/data/titletest.html')));
$this->assertSame('Crawler Title', $this->object->getTitleCrawlerTag());
$this->assertSame('Heading 1', CrawlPage::cleanupString($this->object->getCrawlerHtml()));
$this->assertSame('Heading 1 Title', $this->object->getContent());
}
public function testRemoveScriptTagsInContent()
{
$this->object->setCrawler(new Crawler('1<script>2</script>3'));
$this->assertSame('<p>13</p>', $this->object->getCrawlerHtml());
}
public function testGetMetaDescription()
{
$this->object->setCrawler(new Crawler(file_get_contents('tests/data/metatest.html')));
$this->assertSame('a', $this->object->getMetaDescription());
}
public function testGetMetaKeywords()
{
$this->object->setCrawler(new Crawler(file_get_contents('tests/data/metatest.html')));
$this->assertSame('c d', $this->object->getMetaKeywords());
}
public function testGetTitleTag()
{
$this->object->setCrawler(new Crawler(file_get_contents('tests/data/metatest.html')));
$this->assertSame('Title', $this->object->getTitleTag());
}
public function testHtmlEncoding()
{
$this->object->setCrawler(new Crawler(file_get_contents('tests/data/htmlencode.html')));
$this->assertSame('Öffnungszeiten öffnungszeiten Öffnungszeiten öffnungszeiten', $this->object->getContent());
}
}
| {
"content_hash": "c173af3e84e2e132d7f1ec36bf403c2b",
"timestamp": "",
"source": "github",
"line_count": 103,
"max_line_length": 144,
"avg_line_length": 31.631067961165048,
"alnum_prop": 0.6015960712093309,
"repo_name": "nandes2062/luya",
"id": "326fd02f7e52b81ed526fae507dd5e2039746efd",
"size": "3258",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "modules/crawler/tests/frontend/classes/CrawlPageTest.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "382244"
},
{
"name": "HTML",
"bytes": "45192"
},
{
"name": "JavaScript",
"bytes": "258589"
},
{
"name": "PHP",
"bytes": "2645927"
},
{
"name": "Shell",
"bytes": "3345"
}
],
"symlink_target": ""
} |
#ifndef __fovis_fovis_hpp__
#define __fovis_fovis_hpp__
#include "visual_odometry.hpp"
#include "primesense_depth.hpp"
#include "stereo_depth.hpp"
#include "depth_image.hpp"
/**
* \defgroup FovisCore Fovis core
* \brief Core data structures and algorithms
*/
/**
* \defgroup DepthSources Depth sources
* \brief Classes for specific depth sources (e.g., stereo, Kinect)
*/
/**
* Fovis major version number. Use this to check which version of fovis you
* have.
*/
#define FOVIS_MAJOR_VERSION 1
/**
* Fovis minor version number.
*/
#define FOVIS_MINOR_VERSION 0
/**
* Fovis micro version number.
*/
#define FOVIS_MICRO_VERISON 0
#endif
| {
"content_hash": "638c35dbfe893d61343f68ededaa49a4",
"timestamp": "",
"source": "github",
"line_count": 36,
"max_line_length": 76,
"avg_line_length": 18.194444444444443,
"alnum_prop": 0.6977099236641221,
"repo_name": "adpopescu/trackingAlgorithm",
"id": "a12bacfaa83190e6b927d6da75f13f012f130f7f",
"size": "655",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "RealPDT/fovis/fovis.hpp",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "Batchfile",
"bytes": "1584"
},
{
"name": "C",
"bytes": "2009284"
},
{
"name": "C++",
"bytes": "3765062"
},
{
"name": "CMake",
"bytes": "14651"
},
{
"name": "Cuda",
"bytes": "63917"
},
{
"name": "Matlab",
"bytes": "1711"
},
{
"name": "Shell",
"bytes": "2364"
}
],
"symlink_target": ""
} |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>User agent detail - SIE-S66/54 UP.Browser/7.0.2.2.d.1.100(GUI) MMP/2.0 Profile/MIDP-2.0 Configuration/CLDC-1.1</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/css/materialize.min.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="../circle.css" rel="stylesheet">
</head>
<body>
<div class="container">
<div class="section">
<h1 class="header center orange-text">User agent detail</h1>
<div class="row center">
<h5 class="header light">
SIE-S66/54 UP.Browser/7.0.2.2.d.1.100(GUI) MMP/2.0 Profile/MIDP-2.0 Configuration/CLDC-1.1
</h5>
</div>
</div>
<div class="section">
<table class="striped"><tr><th></th><th colspan="3">General</th><th colspan="5">Device</th><th colspan="3">Bot</th><th colspan="2"></th></tr><tr><th>Provider</th><th>Browser</th><th>Engine</th><th>OS</th><th>Brand</th><th>Model</th><th>Type</th><th>Is mobile</th><th>Is touch</th><th>Is bot</th><th>Name</th><th>Type</th><th>Parse time</th><th>Actions</th></tr><tr><th colspan="14" class="green lighten-3">Test suite</th></tr><tr><td>UAParser<br /><small>v0.5.0.2</small><br /><small>vendor/thadafinser/uap-core/tests/test_device.yaml</small></td><td> </td><td><i class="material-icons">close</i></td><td> </td><td style="border-left: 1px solid #555">Siemens</td><td>S66</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-cfed3005-df48-4fa8-bf03-4f6ef8988f59">Detail</a>
<!-- Modal Structure -->
<div id="modal-cfed3005-df48-4fa8-bf03-4f6ef8988f59" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>UAParser result detail</h4>
<p><pre><code class="php">Array
(
[user_agent_string] => SIE-S66/54 UP.Browser/7.0.2.2.d.1.100(GUI) MMP/2.0 Profile/MIDP-2.0 Configuration/CLDC-1.1
[family] => Siemens S66
[brand] => Siemens
[model] => S66
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><th colspan="14" class="green lighten-3">Providers</th></tr><tr><td>BrowscapFull<br /><small>6014</small><br /></td><td>Openwave Mobile Browser 7.0</td><td> </td><td> </td><td style="border-left: 1px solid #555"></td><td></td><td>Mobile Phone</td><td>yes</td><td></td><td style="border-left: 1px solid #555"></td><td></td><td></td><td>0.014</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-47a9cd06-e213-4882-bc34-db6aed664223">Detail</a>
<!-- Modal Structure -->
<div id="modal-47a9cd06-e213-4882-bc34-db6aed664223" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>BrowscapFull result detail</h4>
<p><pre><code class="php">stdClass Object
(
[browser_name_regex] => /^.* up\.browser\/7\.0.*$/
[browser_name_pattern] => * up.browser/7.0*
[parent] => Openwave Mobile Browser 7.0
[comment] => Openwave Mobile Browser
[browser] => Openwave Mobile Browser
[browser_type] => Browser
[browser_bits] => 0
[browser_maker] => Myriad Group
[browser_modus] => unknown
[version] => 7.0
[majorver] => 7
[minorver] => 0
[platform] => unknown
[platform_version] => unknown
[platform_description] => unknown
[platform_bits] => 0
[platform_maker] => unknown
[alpha] =>
[beta] =>
[win16] =>
[win32] =>
[win64] =>
[frames] => 1
[iframes] => 1
[tables] => 1
[cookies] => 1
[backgroundsounds] =>
[javascript] => 1
[vbscript] =>
[javaapplets] =>
[activexcontrols] =>
[ismobiledevice] => 1
[istablet] =>
[issyndicationreader] =>
[crawler] =>
[isfake] =>
[isanonymized] =>
[ismodified] =>
[cssversion] => 0
[aolversion] => 0
[device_name] => general Mobile Phone
[device_maker] => unknown
[device_type] => Mobile Phone
[device_pointing_method] => unknown
[device_code_name] => general Mobile Phone
[device_brand_name] => unknown
[renderingengine_name] => unknown
[renderingengine_version] => unknown
[renderingengine_description] => unknown
[renderingengine_maker] => unknown
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>BrowscapLite<br /><small>6014</small><br /></td>
<td colspan="12" class="center-align red lighten-1">
<strong>No result found</strong>
</td>
</tr><tr><td>BrowscapPhp<br /><small>6014</small><br /></td><td>Openwave Mobile Browser 7.0</td><td><i class="material-icons">close</i></td><td> </td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>Mobile Phone</td><td>yes</td><td></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.034</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-ad0041a2-b0f4-43f6-a70d-cad1443caa68">Detail</a>
<!-- Modal Structure -->
<div id="modal-ad0041a2-b0f4-43f6-a70d-cad1443caa68" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>BrowscapPhp result detail</h4>
<p><pre><code class="php">stdClass Object
(
[browser_name_regex] => /^.* up\.browser\/7\.0.*$/
[browser_name_pattern] => * up.browser/7.0*
[parent] => Openwave Mobile Browser 7.0
[comment] => Openwave Mobile Browser
[browser] => Openwave Mobile Browser
[browser_type] => unknown
[browser_bits] => 0
[browser_maker] => Myriad Group
[browser_modus] => unknown
[version] => 7.0
[majorver] => 7
[minorver] => 0
[platform] => unknown
[platform_version] => unknown
[platform_description] => unknown
[platform_bits] => 0
[platform_maker] => unknown
[alpha] => false
[beta] => false
[win16] => false
[win32] => false
[win64] => false
[frames] => false
[iframes] => false
[tables] => false
[cookies] => false
[backgroundsounds] => false
[javascript] => false
[vbscript] => false
[javaapplets] => false
[activexcontrols] => false
[ismobiledevice] => 1
[istablet] =>
[issyndicationreader] => false
[crawler] =>
[isfake] => false
[isanonymized] => false
[ismodified] => false
[cssversion] => 0
[aolversion] => 0
[device_name] => unknown
[device_maker] => unknown
[device_type] => Mobile Phone
[device_pointing_method] => unknown
[device_code_name] => unknown
[device_brand_name] => unknown
[renderingengine_name] => unknown
[renderingengine_version] => unknown
[renderingengine_description] => unknown
[renderingengine_maker] => unknown
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>DonatjUAParser<br /><small>v0.5.1</small><br /></td><td>SIE-S66 54</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-15fbc1f0-2615-4d42-b5d9-a30dd647b050">Detail</a>
<!-- Modal Structure -->
<div id="modal-15fbc1f0-2615-4d42-b5d9-a30dd647b050" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>DonatjUAParser result detail</h4>
<p><pre><code class="php">Array
(
[platform] =>
[browser] => SIE-S66
[version] => 54
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>JenssegersAgent<br /><small>v2.3.3</small><br /></td><td> </td><td><i class="material-icons">close</i></td><td>JavaOS </td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>yes</td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-b85a2b91-6a55-4436-a82c-1ea0d46e2e51">Detail</a>
<!-- Modal Structure -->
<div id="modal-b85a2b91-6a55-4436-a82c-1ea0d46e2e51" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>JenssegersAgent result detail</h4>
<p><pre><code class="php">Array
(
[browserName] =>
[browserVersion] =>
[osName] => JavaOS
[osVersion] =>
[deviceModel] => GenericPhone
[isMobile] => 1
[isRobot] =>
[botName] =>
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>NeutrinoApiCom<br /><small></small><br /></td><td>Openwave Mobile Browser 7.0.2.2.d.1.100</td><td><i class="material-icons">close</i></td><td> </td><td style="border-left: 1px solid #555">Siemens</td><td>S66</td><td>mobile-browser</td><td>yes</td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.20901</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-8c2a7a4e-3fbf-4df2-8d61-5e730422f67b">Detail</a>
<!-- Modal Structure -->
<div id="modal-8c2a7a4e-3fbf-4df2-8d61-5e730422f67b" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>NeutrinoApiCom result detail</h4>
<p><pre><code class="php">stdClass Object
(
[mobile_screen_height] => 176
[is_mobile] => 1
[type] => mobile-browser
[mobile_brand] => Siemens
[mobile_model] => S66
[version] => 7.0.2.2.d.1.100
[is_android] =>
[browser_name] => Openwave Mobile Browser
[operating_system_family] => unknown
[operating_system_version] =>
[is_ios] =>
[producer] => Openwave Systems Inc.
[operating_system] => unknown
[mobile_screen_width] => 132
[mobile_browser] => Openwave Mobile Browser
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>PiwikDeviceDetector<br /><small>3.6.1</small><br /></td><td>Openwave Mobile Browser 7.0</td><td> </td><td> </td><td style="border-left: 1px solid #555">Siemens</td><td>S66</td><td>smartphone</td><td>yes</td><td></td><td style="border-left: 1px solid #555"></td><td></td><td></td><td>0.004</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-4a941d34-a8d3-4914-9724-346f60ad7046">Detail</a>
<!-- Modal Structure -->
<div id="modal-4a941d34-a8d3-4914-9724-346f60ad7046" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>PiwikDeviceDetector result detail</h4>
<p><pre><code class="php">Array
(
[client] => Array
(
[type] => browser
[name] => Openwave Mobile Browser
[short_name] => OV
[version] => 7.0
[engine] =>
)
[operatingSystem] => Array
(
)
[device] => Array
(
[brand] => SI
[brandName] => Siemens
[model] => S66
[device] => 1
[deviceName] => smartphone
)
[bot] =>
[extra] => Array
(
[isBot] =>
[isBrowser] => 1
[isFeedReader] =>
[isMobileApp] =>
[isPIM] =>
[isLibrary] =>
[isMediaPlayer] =>
[isCamera] =>
[isCarBrowser] =>
[isConsole] =>
[isFeaturePhone] =>
[isPhablet] =>
[isPortableMediaPlayer] =>
[isSmartDisplay] =>
[isSmartphone] => 1
[isTablet] =>
[isTV] =>
[isDesktop] =>
[isMobile] => 1
[isTouchEnabled] =>
)
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>SinergiBrowserDetector<br /><small>6.0.1</small><br /></td>
<td colspan="12" class="center-align red lighten-1">
<strong>No result found</strong>
</td>
</tr><tr><td>UAParser<br /><small>v3.4.5</small><br /></td><td>UP.Browser 7.0.2</td><td><i class="material-icons">close</i></td><td> </td><td style="border-left: 1px solid #555">Siemens</td><td>S66</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.003</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-3160e405-8a8f-46dd-8f47-5115f06462d2">Detail</a>
<!-- Modal Structure -->
<div id="modal-3160e405-8a8f-46dd-8f47-5115f06462d2" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>UAParser result detail</h4>
<p><pre><code class="php">UAParser\Result\Client Object
(
[ua] => UAParser\Result\UserAgent Object
(
[major] => 7
[minor] => 0
[patch] => 2
[family] => UP.Browser
)
[os] => UAParser\Result\OperatingSystem Object
(
[major] =>
[minor] =>
[patch] =>
[patchMinor] =>
[family] => Other
)
[device] => UAParser\Result\Device Object
(
[brand] => Siemens
[model] => S66
[family] => Siemens S66
)
[originalUserAgent] => SIE-S66/54 UP.Browser/7.0.2.2.d.1.100(GUI) MMP/2.0 Profile/MIDP-2.0 Configuration/CLDC-1.1
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>UserAgentApiCom<br /><small></small><br /></td><td> </td><td> </td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>Mobile</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.15301</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-afeb05fb-26b9-4509-b8ac-0c604a9e97d6">Detail</a>
<!-- Modal Structure -->
<div id="modal-afeb05fb-26b9-4509-b8ac-0c604a9e97d6" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>UserAgentApiCom result detail</h4>
<p><pre><code class="php">stdClass Object
(
[platform_name] => Siemens
[platform_version] => 66
[platform_type] => Mobile
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>UserAgentStringCom<br /><small></small><br /></td>
<td colspan="12" class="center-align red lighten-1">
<strong>No result found</strong>
</td>
</tr><tr><td>WhatIsMyBrowserCom<br /><small></small><br /></td><td>Openwave Mobile Browser 7.0.2.2.d.1.100</td><td> </td><td> </td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0.23501</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-5fc1ff22-a74d-481b-9ad1-fcfde73ded9c">Detail</a>
<!-- Modal Structure -->
<div id="modal-5fc1ff22-a74d-481b-9ad1-fcfde73ded9c" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>WhatIsMyBrowserCom result detail</h4>
<p><pre><code class="php">stdClass Object
(
[operating_system_name] =>
[simple_sub_description_string] =>
[simple_browser_string] => Openwave Mobile Browser 7
[browser_version] => 7
[extra_info] => Array
(
)
[operating_platform] =>
[extra_info_table] => Array
(
)
[layout_engine_name] =>
[detected_addons] => Array
(
)
[operating_system_flavour_code] =>
[hardware_architecture] =>
[operating_system_flavour] =>
[operating_system_frameworks] => Array
(
)
[browser_name_code] => openwave-mobile-browser
[operating_system_version] =>
[simple_operating_platform_string] =>
[is_abusive] =>
[layout_engine_version] =>
[browser_capabilities] => Array
(
[0] => MIDP v2.0
[1] => CLDC v1.1
[2] => MMP v2.0
)
[operating_platform_vendor_name] =>
[operating_system] =>
[operating_system_version_full] =>
[operating_platform_code] =>
[browser_name] => Openwave Mobile Browser
[operating_system_name_code] =>
[user_agent] => SIE-S66/54 UP.Browser/7.0.2.2.d.1.100(GUI) MMP/2.0 Profile/MIDP-2.0 Configuration/CLDC-1.1
[browser_version_full] => 7.0.2.2.d.1.100
[browser] => Openwave Mobile Browser 7
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>WhichBrowser<br /><small>v2.0.18</small><br /></td><td>Openwave 7.0</td><td> </td><td> </td><td style="border-left: 1px solid #555">Siemens</td><td>S66</td><td>mobile:feature</td><td>yes</td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.002</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-083a336f-5d73-4505-84f3-c5fc9bb78652">Detail</a>
<!-- Modal Structure -->
<div id="modal-083a336f-5d73-4505-84f3-c5fc9bb78652" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>WhichBrowser result detail</h4>
<p><pre><code class="php">Array
(
[browser] => Array
(
[name] => Openwave
[version] => 7.0
[type] => browser
)
[device] => Array
(
[type] => mobile
[subtype] => feature
[manufacturer] => Siemens
[model] => S66
)
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>Woothee<br /><small>v1.2.0</small><br /></td>
<td colspan="12" class="center-align red lighten-1">
<strong>No result found</strong>
</td>
</tr><tr><td>Wurfl<br /><small>1.7.1.0</small><br /></td><td>Java Applet </td><td><i class="material-icons">close</i></td><td> </td><td style="border-left: 1px solid #555">Siemens</td><td>S66</td><td>Feature Phone</td><td>yes</td><td></td><td style="border-left: 1px solid #555"></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0.023</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-a2bedf8c-4a95-42a7-96c5-aaf233b2ac50">Detail</a>
<!-- Modal Structure -->
<div id="modal-a2bedf8c-4a95-42a7-96c5-aaf233b2ac50" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>Wurfl result detail</h4>
<p><pre><code class="php">Array
(
[virtual] => Array
(
[is_android] => false
[is_ios] => false
[is_windows_phone] => false
[is_app] => false
[is_full_desktop] => false
[is_largescreen] => false
[is_mobile] => true
[is_robot] => false
[is_smartphone] => false
[is_touchscreen] => false
[is_wml_preferred] => false
[is_xhtmlmp_preferred] => true
[is_html_preferred] => false
[advertised_device_os] =>
[advertised_device_os_version] =>
[advertised_browser] => Java Applet
[advertised_browser_version] =>
[complete_device_name] => Siemens S66
[device_name] => Siemens S66
[form_factor] => Feature Phone
[is_phone] => true
[is_app_webview] => false
)
[all] => Array
(
[brand_name] => Siemens
[model_name] => S66
[unique] => true
[ununiqueness_handler] =>
[is_wireless_device] => true
[device_claims_web_support] => false
[has_qwerty_keyboard] => false
[can_skip_aligned_link_row] => true
[uaprof] => http://communication-market.siemens.de/portal/UAProf/UAP.aspx?device=S66
[uaprof2] =>
[uaprof3] =>
[nokia_series] => 0
[nokia_edition] => 0
[device_os] =>
[mobile_browser] => Openwave Mobile Browser
[mobile_browser_version] => 7
[device_os_version] =>
[pointing_method] =>
[release_date] => 2005_january
[marketing_name] =>
[model_extra_info] =>
[nokia_feature_pack] => 0
[can_assign_phone_number] => true
[is_tablet] => false
[manufacturer_name] =>
[is_bot] => false
[is_google_glass] => false
[proportional_font] => true
[built_in_back_button_support] => true
[card_title_support] => false
[softkey_support] => true
[table_support] => true
[numbered_menus] => true
[menu_with_select_element_recommended] => true
[menu_with_list_of_links_recommended] => false
[icons_on_menu_items_support] => true
[break_list_of_links_with_br_element_recommended] => false
[access_key_support] => true
[wrap_mode_support] => true
[times_square_mode_support] => true
[deck_prefetch_support] => true
[elective_forms_recommended] => false
[wizards_recommended] => true
[image_as_link_support] => false
[insert_br_element_after_widget_recommended] => false
[wml_can_display_images_and_text_on_same_line] => false
[wml_displays_image_in_center] => false
[opwv_wml_extensions_support] => true
[wml_make_phone_call_string] => wtai://wp/mc;
[chtml_display_accesskey] => false
[emoji] => false
[chtml_can_display_images_and_text_on_same_line] => false
[chtml_displays_image_in_center] => false
[imode_region] => none
[chtml_make_phone_call_string] => tel:
[chtml_table_support] => false
[xhtml_honors_bgcolor] => false
[xhtml_supports_forms_in_table] => false
[xhtml_support_wml2_namespace] => false
[xhtml_autoexpand_select] => true
[xhtml_select_as_dropdown] => false
[xhtml_select_as_radiobutton] => false
[xhtml_select_as_popup] => false
[xhtml_display_accesskey] => false
[xhtml_supports_invisible_text] => true
[xhtml_supports_inline_input] => true
[xhtml_supports_monospace_font] => true
[xhtml_supports_table_for_layout] => true
[xhtml_supports_css_cell_table_coloring] => true
[xhtml_format_as_css_property] => true
[xhtml_format_as_attribute] => true
[xhtml_nowrap_mode] => true
[xhtml_marquee_as_css_property] => true
[xhtml_readable_background_color1] => #99CCFF
[xhtml_readable_background_color2] => #FFFFFF
[xhtml_allows_disabled_form_elements] => true
[xhtml_document_title_support] => true
[xhtml_preferred_charset] => iso8859
[opwv_xhtml_extensions_support] => true
[xhtml_make_phone_call_string] => wtai://wp/mc;
[xhtmlmp_preferred_mime_type] => application/vnd.wap.xhtml+xml
[xhtml_table_support] => true
[xhtml_send_sms_string] => smsto:
[xhtml_send_mms_string] => none
[xhtml_file_upload] => supported
[cookie_support] => true
[accept_third_party_cookie] => false
[xhtml_supports_iframe] => none
[xhtml_avoid_accesskeys] => false
[xhtml_can_embed_video] => none
[ajax_support_javascript] => false
[ajax_manipulate_css] => false
[ajax_support_getelementbyid] => false
[ajax_support_inner_html] => false
[ajax_xhr_type] => none
[ajax_manipulate_dom] => false
[ajax_support_events] => false
[ajax_support_event_listener] => false
[ajax_preferred_geoloc_api] => none
[xhtml_support_level] => 3
[preferred_markup] => html_wi_oma_xhtmlmp_1_0
[wml_1_1] => true
[wml_1_2] => true
[wml_1_3] => true
[html_wi_w3_xhtmlbasic] => true
[html_wi_oma_xhtmlmp_1_0] => true
[html_wi_imode_html_1] => true
[html_wi_imode_html_2] => true
[html_wi_imode_html_3] => true
[html_wi_imode_html_4] => false
[html_wi_imode_html_5] => false
[html_wi_imode_htmlx_1] => true
[html_wi_imode_htmlx_1_1] => false
[html_wi_imode_compact_generic] => true
[html_web_3_2] => false
[html_web_4_0] => false
[voicexml] => false
[multipart_support] => true
[total_cache_disable_support] => false
[time_to_live_support] => true
[resolution_width] => 132
[resolution_height] => 176
[columns] => 18
[max_image_width] => 132
[max_image_height] => 156
[rows] => 8
[physical_screen_width] => 27
[physical_screen_height] => 27
[dual_orientation] => false
[density_class] => 1.0
[wbmp] => true
[bmp] => true
[epoc_bmp] => false
[gif_animated] => true
[jpg] => true
[png] => true
[tiff] => false
[transparent_png_alpha] => false
[transparent_png_index] => false
[svgt_1_1] => true
[svgt_1_1_plus] => false
[greyscale] => false
[gif] => true
[colors] => 65536
[webp_lossy_support] => false
[webp_lossless_support] => false
[post_method_support] => true
[basic_authentication_support] => true
[empty_option_value_support] => false
[emptyok] => false
[nokia_voice_call] => false
[wta_voice_call] => true
[wta_phonebook] => false
[wta_misc] => false
[wta_pdc] => false
[https_support] => true
[phone_id_provided] => false
[max_data_rate] => 9
[wifi] => false
[sdio] => false
[vpn] => false
[has_cellular_radio] => true
[max_deck_size] => 13000
[max_url_length_in_requests] => 256
[max_url_length_homepage] => 0
[max_url_length_bookmark] => 0
[max_url_length_cached_page] => 0
[max_no_of_connection_settings] => 0
[max_no_of_bookmarks] => 0
[max_length_of_username] => 0
[max_length_of_password] => 0
[max_object_size] => 0
[downloadfun_support] => false
[directdownload_support] => true
[inline_support] => true
[oma_support] => true
[ringtone] => true
[ringtone_3gpp] => false
[ringtone_midi_monophonic] => true
[ringtone_midi_polyphonic] => true
[ringtone_imelody] => true
[ringtone_digiplug] => false
[ringtone_compactmidi] => false
[ringtone_mmf] => false
[ringtone_rmf] => false
[ringtone_xmf] => false
[ringtone_amr] => true
[ringtone_awb] => false
[ringtone_aac] => false
[ringtone_wav] => true
[ringtone_mp3] => false
[ringtone_spmidi] => true
[ringtone_qcelp] => false
[ringtone_voices] => 40
[ringtone_df_size_limit] => 512000
[ringtone_directdownload_size_limit] => 512000
[ringtone_inline_size_limit] => 512000
[ringtone_oma_size_limit] => 0
[wallpaper] => true
[wallpaper_max_width] => 0
[wallpaper_max_height] => 0
[wallpaper_preferred_width] => 0
[wallpaper_preferred_height] => 0
[wallpaper_resize] => stretch
[wallpaper_wbmp] => true
[wallpaper_bmp] => true
[wallpaper_gif] => true
[wallpaper_jpg] => true
[wallpaper_png] => true
[wallpaper_tiff] => false
[wallpaper_greyscale] => false
[wallpaper_colors] => 16
[wallpaper_df_size_limit] => 512000
[wallpaper_directdownload_size_limit] => 512000
[wallpaper_inline_size_limit] => 512000
[wallpaper_oma_size_limit] => 0
[screensaver] => true
[screensaver_max_width] => 0
[screensaver_max_height] => 0
[screensaver_preferred_width] => 0
[screensaver_preferred_height] => 0
[screensaver_resize] => stretch
[screensaver_wbmp] => true
[screensaver_bmp] => true
[screensaver_gif] => true
[screensaver_jpg] => true
[screensaver_png] => true
[screensaver_greyscale] => false
[screensaver_colors] => 16
[screensaver_df_size_limit] => 512000
[screensaver_directdownload_size_limit] => 512000
[screensaver_inline_size_limit] => 512000
[screensaver_oma_size_limit] => 0
[picture] => true
[picture_max_width] => 0
[picture_max_height] => 0
[picture_preferred_width] => 0
[picture_preferred_height] => 0
[picture_resize] => stretch
[picture_wbmp] => true
[picture_bmp] => true
[picture_gif] => true
[picture_jpg] => true
[picture_png] => true
[picture_greyscale] => false
[picture_colors] => 16
[picture_df_size_limit] => 512000
[picture_directdownload_size_limit] => 512000
[picture_inline_size_limit] => 512000
[picture_oma_size_limit] => 0
[video] => true
[oma_v_1_0_forwardlock] => true
[oma_v_1_0_combined_delivery] => true
[oma_v_1_0_separate_delivery] => true
[streaming_video] => false
[streaming_3gpp] => true
[streaming_mp4] => false
[streaming_mov] => false
[streaming_video_size_limit] => 0
[streaming_real_media] => none
[streaming_flv] => false
[streaming_3g2] => false
[streaming_vcodec_h263_0] => -1
[streaming_vcodec_h263_3] => -1
[streaming_vcodec_mpeg4_sp] => -1
[streaming_vcodec_mpeg4_asp] => -1
[streaming_vcodec_h264_bp] => -1
[streaming_acodec_amr] => none
[streaming_acodec_aac] => none
[streaming_wmv] => none
[streaming_preferred_protocol] => rtsp
[streaming_preferred_http_protocol] => none
[wap_push_support] => true
[connectionless_service_indication] => true
[connectionless_service_load] => true
[connectionless_cache_operation] => true
[connectionoriented_unconfirmed_service_indication] => true
[connectionoriented_unconfirmed_service_load] => true
[connectionoriented_unconfirmed_cache_operation] => true
[connectionoriented_confirmed_service_indication] => true
[connectionoriented_confirmed_service_load] => true
[connectionoriented_confirmed_cache_operation] => true
[utf8_support] => true
[ascii_support] => false
[iso8859_support] => false
[expiration_date] => true
[j2me_cldc_1_0] => true
[j2me_cldc_1_1] => true
[j2me_midp_1_0] => true
[j2me_midp_2_0] => true
[doja_1_0] => false
[doja_1_5] => false
[doja_2_0] => false
[doja_2_1] => false
[doja_2_2] => false
[doja_3_0] => false
[doja_3_5] => false
[doja_4_0] => false
[j2me_jtwi] => true
[j2me_mmapi_1_0] => false
[j2me_mmapi_1_1] => false
[j2me_wmapi_1_0] => true
[j2me_wmapi_1_1] => false
[j2me_wmapi_2_0] => false
[j2me_btapi] => false
[j2me_3dapi] => false
[j2me_locapi] => true
[j2me_nokia_ui] => false
[j2me_motorola_lwt] => false
[j2me_siemens_color_game] => false
[j2me_siemens_extension] => false
[j2me_heap_size] => 1572864
[j2me_max_jar_size] => 358400
[j2me_storage_size] => 11534336
[j2me_max_record_store_size] => 0
[j2me_screen_width] => 130
[j2me_screen_height] => 130
[j2me_canvas_width] => 0
[j2me_canvas_height] => 0
[j2me_bits_per_pixel] => 16
[j2me_audio_capture_enabled] => false
[j2me_video_capture_enabled] => false
[j2me_photo_capture_enabled] => false
[j2me_capture_image_formats] => none
[j2me_http] => false
[j2me_https] => false
[j2me_socket] => false
[j2me_udp] => false
[j2me_serial] => false
[j2me_gif] => false
[j2me_gif89a] => false
[j2me_jpg] => false
[j2me_png] => false
[j2me_bmp] => false
[j2me_bmp3] => false
[j2me_wbmp] => false
[j2me_midi] => true
[j2me_wav] => true
[j2me_amr] => true
[j2me_mp3] => false
[j2me_mp4] => false
[j2me_imelody] => false
[j2me_rmf] => false
[j2me_au] => false
[j2me_aac] => false
[j2me_realaudio] => false
[j2me_xmf] => false
[j2me_wma] => false
[j2me_3gpp] => false
[j2me_h263] => false
[j2me_svgt] => false
[j2me_mpeg4] => false
[j2me_realvideo] => false
[j2me_real8] => false
[j2me_realmedia] => false
[j2me_left_softkey_code] => 1
[j2me_right_softkey_code] => 4
[j2me_middle_softkey_code] => 0
[j2me_select_key_code] => 0
[j2me_return_key_code] => 0
[j2me_clear_key_code] => 0
[j2me_datefield_no_accepts_null_date] => false
[j2me_datefield_broken] => false
[receiver] => true
[sender] => true
[mms_max_size] => 307200
[mms_max_height] => 480
[mms_max_width] => 640
[built_in_recorder] => false
[built_in_camera] => true
[mms_jpeg_baseline] => true
[mms_jpeg_progressive] => false
[mms_gif_static] => true
[mms_gif_animated] => false
[mms_png] => true
[mms_bmp] => true
[mms_wbmp] => true
[mms_amr] => true
[mms_wav] => true
[mms_midi_monophonic] => true
[mms_midi_polyphonic] => true
[mms_midi_polyphonic_voices] => 0
[mms_spmidi] => true
[mms_mmf] => false
[mms_mp3] => false
[mms_evrc] => false
[mms_qcelp] => false
[mms_ota_bitmap] => false
[mms_nokia_wallpaper] => false
[mms_nokia_operatorlogo] => false
[mms_nokia_3dscreensaver] => false
[mms_nokia_ringingtone] => false
[mms_rmf] => false
[mms_xmf] => false
[mms_symbian_install] => false
[mms_jar] => false
[mms_jad] => false
[mms_vcard] => true
[mms_vcalendar] => true
[mms_wml] => false
[mms_wbxml] => false
[mms_wmlc] => false
[mms_video] => true
[mms_mp4] => true
[mms_3gpp] => true
[mms_3gpp2] => false
[mms_max_frame_rate] => 0
[nokiaring] => false
[picturemessage] => false
[operatorlogo] => false
[largeoperatorlogo] => false
[callericon] => false
[nokiavcard] => false
[nokiavcal] => false
[sckl_ringtone] => false
[sckl_operatorlogo] => false
[sckl_groupgraphic] => false
[sckl_vcard] => false
[sckl_vcalendar] => false
[text_imelody] => false
[ems] => true
[ems_variablesizedpictures] => true
[ems_imelody] => true
[ems_odi] => false
[ems_upi] => false
[ems_version] => 0
[siemens_ota] => true
[siemens_logo_width] => 128
[siemens_logo_height] => 80
[siemens_screensaver_width] => 101
[siemens_screensaver_height] => 50
[gprtf] => false
[sagem_v1] => false
[sagem_v2] => false
[panasonic] => false
[sms_enabled] => true
[wav] => true
[mmf] => false
[smf] => false
[mld] => false
[midi_monophonic] => true
[midi_polyphonic] => true
[sp_midi] => true
[rmf] => false
[xmf] => false
[compactmidi] => false
[digiplug] => false
[nokia_ringtone] => false
[imelody] => true
[au] => false
[amr] => true
[awb] => false
[aac] => false
[mp3] => false
[voices] => 40
[qcelp] => false
[evrc] => false
[flash_lite_version] =>
[fl_wallpaper] => false
[fl_screensaver] => false
[fl_standalone] => false
[fl_browser] => false
[fl_sub_lcd] => false
[full_flash_support] => false
[css_supports_width_as_percentage] => true
[css_border_image] => none
[css_rounded_corners] => none
[css_gradient] => none
[css_spriting] => false
[css_gradient_linear] => none
[is_transcoder] => false
[transcoder_ua_header] => user-agent
[rss_support] => false
[pdf_support] => false
[progressive_download] => false
[playback_vcodec_h263_0] => 10
[playback_vcodec_h263_3] => -1
[playback_vcodec_mpeg4_sp] => -1
[playback_vcodec_mpeg4_asp] => -1
[playback_vcodec_h264_bp] => -1
[playback_real_media] => none
[playback_3gpp] => true
[playback_3g2] => false
[playback_mp4] => true
[playback_mov] => false
[playback_acodec_amr] => nb
[playback_acodec_aac] => none
[playback_df_size_limit] => 0
[playback_directdownload_size_limit] => 0
[playback_inline_size_limit] => 0
[playback_oma_size_limit] => 0
[playback_acodec_qcelp] => false
[playback_wmv] => none
[hinted_progressive_download] => false
[html_preferred_dtd] => xhtml_mp1
[viewport_supported] => false
[viewport_width] =>
[viewport_userscalable] =>
[viewport_initial_scale] =>
[viewport_maximum_scale] =>
[viewport_minimum_scale] =>
[mobileoptimized] => false
[handheldfriendly] => false
[canvas_support] => none
[image_inlining] => false
[is_smarttv] => false
[is_console] => false
[nfc_support] => false
[ux_full_desktop] => false
[jqm_grade] => none
[is_sencha_touch_ok] => false
)
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>Zsxsoft<br /><small>1.3</small><br /></td><td>Openwave Mobile Browser 7.0.2.2.d.1.100</td><td><i class="material-icons">close</i></td><td> </td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0.001</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-5d43e024-b46c-44f6-8914-529b05569bc2">Detail</a>
<!-- Modal Structure -->
<div id="modal-5d43e024-b46c-44f6-8914-529b05569bc2" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>Zsxsoft result detail</h4>
<p><pre><code class="php">Array
(
[browser] => Array
(
[link] => http://www.openwave.com/
[title] => Openwave Mobile Browser 7.0.2.2.d.1.100
[code] => openwave
[version] => 7.0.2.2.d.1.100
[name] => Openwave Mobile Browser
[image] => img/16/browser/openwave.png
)
[os] => Array
(
[link] =>
[name] =>
[version] =>
[code] => null
[x64] =>
[title] =>
[type] => os
[dir] => os
[image] => img/16/os/null.png
)
[device] => Array
(
[link] => #
[title] => Unknown
[code] => null
[dir] => browser
[type] => os
[image] => img/16/browser/null.png
)
[platform] => Array
(
[link] => #
[title] => Unknown
[code] => null
[dir] => browser
[type] => os
[image] => img/16/browser/null.png
)
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr></table>
</div>
<div class="section">
<h1 class="header center orange-text">About this comparison</h1>
<div class="row center">
<h5 class="header light">
The primary goal of this project is simple<br />
I wanted to know which user agent parser is the most accurate in each part - device detection, bot detection and so on...<br />
<br />
The secondary goal is to provide a source for all user agent parsers to improve their detection based on this results.<br />
<br />
You can also improve this further, by suggesting ideas at <a href="https://github.com/ThaDafinser/UserAgentParserComparison">ThaDafinser/UserAgentParserComparison</a><br />
<br />
The comparison is based on the abstraction by <a href="https://github.com/ThaDafinser/UserAgentParser">ThaDafinser/UserAgentParser</a>
</h5>
</div>
</div>
<div class="card">
<div class="card-content">
Comparison created <i>2016-05-10 08:04:05</i> | by
<a href="https://github.com/ThaDafinser">ThaDafinser</a>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/js/materialize.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/list.js/1.2.0/list.min.js"></script>
<script>
$(document).ready(function(){
// the "href" attribute of .modal-trigger must specify the modal ID that wants to be triggered
$('.modal-trigger').leanModal();
});
</script>
</body>
</html> | {
"content_hash": "930c4f1203b9f6e02fdc10df009463fe",
"timestamp": "",
"source": "github",
"line_count": 1185,
"max_line_length": 958,
"avg_line_length": 40.0253164556962,
"alnum_prop": 0.5297069365380561,
"repo_name": "ThaDafinser/UserAgentParserComparison",
"id": "4cbc08a5d1e4aaf96a845c67f569ae4d4141ee30",
"size": "47431",
"binary": false,
"copies": "1",
"ref": "refs/heads/gh-pages",
"path": "v5/user-agent-detail/a1/3a/a13ab981-1b70-4391-99c9-e0fe9bb16847.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "HTML",
"bytes": "2060859160"
}
],
"symlink_target": ""
} |
/* jshint maxdepth:7*/
steal('can/util/can.js', function (can) {
// The following is from jQuery
var isArrayLike = function(obj){
// The `in` check is from jQuery’s fix for an iOS 8 64-bit JIT object length bug:
// https://github.com/jquery/jquery/pull/2185
// When passing a non-object (e.g. boolean) can.each fails where it previously did nothing.
// https://github.com/canjs/canjs/issues/1989
var length = obj && typeof obj !== 'boolean' &&
typeof obj !== 'number' &&
"length" in obj && obj.length;
// var length = "length" in obj && obj.length;
return typeof arr !== "function" &&
( length === 0 || typeof length === "number" && length > 0 && ( length - 1 ) in obj );
};
can.each = function (elements, callback, context) {
var i = 0,
key,
len,
item;
if (elements) {
if ( isArrayLike(elements) ) {
if(can.List && elements instanceof can.List ) {
for (len = elements.attr("length"); i < len; i++) {
item = elements.attr(i);
if (callback.call(context || item, item, i, elements) === false) {
break;
}
}
} else {
for (len = elements.length; i < len; i++) {
item = elements[i];
if (callback.call(context || item, item, i, elements) === false) {
break;
}
}
}
} else if (typeof elements === "object") {
if (can.Map && elements instanceof can.Map || elements === can.route) {
var keys = can.Map.keys(elements);
for(i =0, len = keys.length; i < len; i++) {
key = keys[i];
item = elements.attr(key);
if (callback.call(context || item, item, key, elements) === false) {
break;
}
}
} else {
for (key in elements) {
if (elements.hasOwnProperty(key) && callback.call(context || elements[key], elements[key], key, elements) === false) {
break;
}
}
}
}
}
return elements;
};
return can;
});
| {
"content_hash": "edf90eec0846137121b7194c34f50604",
"timestamp": "",
"source": "github",
"line_count": 66,
"max_line_length": 124,
"avg_line_length": 28.954545454545453,
"alnum_prop": 0.564625850340136,
"repo_name": "Psykoral/canjs",
"id": "a10bf1fe2737350c84fbe64627252f0f1ee995f0",
"size": "1913",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "util/array/each.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "819635"
},
{
"name": "HTML",
"bytes": "377866"
},
{
"name": "JavaScript",
"bytes": "3608410"
},
{
"name": "Ruby",
"bytes": "886"
},
{
"name": "Shell",
"bytes": "535"
}
],
"symlink_target": ""
} |
package com.redhatkeynote.score;
public enum Status {
ONSTAGE,
OPEN,
CLOSED;
public Status getValue() {
return this;
}
}
| {
"content_hash": "aabe157b6c823adf8e603f994f66a47a",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 32,
"avg_line_length": 11.76923076923077,
"alnum_prop": 0.5947712418300654,
"repo_name": "npatel2012/score-server",
"id": "d7eee6772b2a767a8c580a54791c67f18f6abe8e",
"size": "153",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "score/src/main/java/com/redhatkeynote/score/Status.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "52864"
},
{
"name": "Shell",
"bytes": "304"
}
],
"symlink_target": ""
} |
<?php
namespace Kanboard\Formatter;
use Kanboard\Core\Filter\FormatterInterface;
/**
* Class ProjectApiFormatter
*
* @package Kanboard\Formatter
*/
class ProjectApiFormatter extends BaseFormatter implements FormatterInterface
{
protected $project = null;
public function withProject($project)
{
$this->project = $project;
return $this;
}
/**
* Apply formatter
*
* @access public
* @return mixed
*/
public function format()
{
if (! empty($this->project)) {
$this->project['url'] = array(
'board' => $this->helper->url->to('BoardViewController', 'show', array('project_id' => $this->project['id']), '', true),
'list' => $this->helper->url->to('TaskListController', 'show', array('project_id' => $this->project['id']), '', true),
);
}
return $this->project;
}
}
| {
"content_hash": "44f65b2d2eef456d41a6df7583e8c5d4",
"timestamp": "",
"source": "github",
"line_count": 39,
"max_line_length": 136,
"avg_line_length": 23.641025641025642,
"alnum_prop": 0.56941431670282,
"repo_name": "patoi/kanboard",
"id": "5521d57c2f35bd2cc1b943bf627b19690063248a",
"size": "922",
"binary": false,
"copies": "12",
"ref": "refs/heads/master",
"path": "app/Formatter/ProjectApiApiFormatter.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ApacheConf",
"bytes": "953"
},
{
"name": "CSS",
"bytes": "41917"
},
{
"name": "JavaScript",
"bytes": "118745"
},
{
"name": "Makefile",
"bytes": "5577"
},
{
"name": "PHP",
"bytes": "5317387"
},
{
"name": "Shell",
"bytes": "1057"
}
],
"symlink_target": ""
} |
<?php
namespace CakeDC\Users\Test\App\Controller;
use Cake\Controller\Controller;
/**
* This is a placeholder class.
* Create the same file in app/Controller/AppController.php
*
* Add your application-wide methods in the class below, your controllers
* will inherit them.
*
*/
class AppController extends Controller
{
public function initialize()
{
parent::initialize();
$this->loadComponent('Flash');
// $this->loadComponent('CakeDC/Users.UsersAuth');
$this->loadComponent('RequestHandler');
}
}
| {
"content_hash": "6122d59c1cb7efe0586e5790f482bf60",
"timestamp": "",
"source": "github",
"line_count": 24,
"max_line_length": 73,
"avg_line_length": 22.958333333333332,
"alnum_prop": 0.6842105263157895,
"repo_name": "1906sam/mini-bank-project",
"id": "5899a4e411f301d29437e20c857b2eda73854043",
"size": "551",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "vendor/cakedc/users/tests/App/Controller/AppController.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ApacheConf",
"bytes": "433"
},
{
"name": "Batchfile",
"bytes": "834"
},
{
"name": "CSS",
"bytes": "291286"
},
{
"name": "JavaScript",
"bytes": "1625414"
},
{
"name": "PHP",
"bytes": "391654"
},
{
"name": "Shell",
"bytes": "1457"
}
],
"symlink_target": ""
} |
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
public class InstantiateWithMethodMissingTest {
@Rule
public ExpectedException thrown = ExpectedException.none();
@Test
public void shouldThrowError() throws Exception {
thrown.expect(AbstractMethodError.class);
thrown.expectMessage("anotherMethod");
InstantiateWithMethodMissing.main(new String[0]);
}
}
| {
"content_hash": "e27755c180165d5f018a6262913a47f7",
"timestamp": "",
"source": "github",
"line_count": 16,
"max_line_length": 61,
"avg_line_length": 26.125,
"alnum_prop": 0.7751196172248804,
"repo_name": "pettermahlen/missinglink",
"id": "4209c6bf11c84f7675d136fe9765b6327d852fcf",
"size": "418",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "maven-plugin/src/it/instantiate-with-method-missing/src/test/java/InstantiateWithMethodMissingTest.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "157614"
},
{
"name": "Shell",
"bytes": "1026"
}
],
"symlink_target": ""
} |
package com.zjw.mobilesafe;
import java.lang.reflect.Method;
import java.util.List;
import android.app.Activity;
import android.content.pm.ApplicationInfo;
import android.content.pm.IPackageDataObserver;
import android.content.pm.IPackageStatsObserver;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.PackageStats;
import android.os.Bundle;
import android.os.RemoteException;
import android.text.format.Formatter;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
public class ClearCacheActivity extends Activity {
private ProgressBar pBar;
private TextView tv_stats;
private PackageManager pm;
private LinearLayout ll_content;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_clearcache);
pBar = (ProgressBar) findViewById(R.id.pb1);
tv_stats = (TextView) findViewById(R.id.tv_stats);
ll_content = (LinearLayout) findViewById(R.id.ll_content);
scanCache();
}
private void scanCache() {
pm = getPackageManager();
new Thread(new Runnable() {
@Override
public void run() {
Method getPackageSizeInfoMethod = null;
// ͨ¹ý²é¿´Ô´Â룺ÎÒÃǵÃÖªpackageManagerÏÂÓÐÒ»¸ö±»ÏµÍ³Òþ²ØµÄ·½·¨£¬Í¨¹ý¸Ã·½·¨¿ÉÒÔ»ñµÃ»º´æÐÅÏ¢
Method[] methods = PackageManager.class.getMethods();
for (Method method : methods) {
if ("getPackageSizeInfo".equals(method.getName())) {
getPackageSizeInfoMethod = method;
break;
}
// System.out.println(method.getName());
}
List<PackageInfo> installedPackages = pm.getInstalledPackages(0);
pBar.setMax(installedPackages.size());
int count = 0;
for (PackageInfo info : installedPackages) {
// ΪÁË»ñÈ¡packageManagerÏÂgetPackageSizeInfoÕâÒ»Òþ²Ø·½·¨
// public void getPackageSizeInfo(String packageName,
// IPackageStatsObserver observer)
try {
getPackageSizeInfoMethod.invoke(pm, info.packageName, new MyPackageStatsObserver());
Thread.sleep(50);//Õâһ˯¾õÂß¼Ó¦·ÅÔÚÉÏÒ»´úÂëÏÂÃæ
} catch (Exception e) {
e.printStackTrace();
}
count++;
pBar.setProgress(count);
}
runOnUiThread(new Runnable() {
@Override
public void run() {
tv_stats.setText("ɨÃèÍê³É");
}
});
}
}).start();
}
private class MyPackageStatsObserver extends IPackageStatsObserver.Stub {
@Override
public void onGetStatsCompleted(PackageStats pStats, boolean succeeded) throws RemoteException {
final long cacheSize = pStats.cacheSize;
// long codeSize = pStats.codeSize;
// long dataSize = pStats.dataSize;
final String packageName = pStats.packageName;
final ApplicationInfo applicationInfo;
try {
applicationInfo = pm.getApplicationInfo(packageName, 0);
runOnUiThread(new Runnable() {
@Override
public void run() {
tv_stats.setText("ÕýÔÚɨÃ軺´æ¡¡" + applicationInfo.loadLabel(pm));
if (cacheSize > 0) {
// TextView tv = new TextView(getApplicationContext());
// tv.setText("Ãû³Æ£º" + applicationInfo.loadLabel(pm) + ";»º´æ£º"
// + Formatter.formatFileSize(getApplicationContext(), cacheSize));
// tv.setTextColor(Color.BLACK);
View view = View.inflate(getApplicationContext(), R.layout.item_cache, null);
TextView tv_cache_name = (TextView) view.findViewById(R.id.tv_cache_name);
TextView tv_cache_size = (TextView) view.findViewById(R.id.tv_cache_size);
ImageView iv_delete = (ImageView) view.findViewById(R.id.iv_delede);
tv_cache_name.setText("Ãû³Æ£º"+applicationInfo.loadLabel(pm));
tv_cache_size.setText("»º´æ£º"+Formatter.formatFileSize(getApplicationContext(), cacheSize));
iv_delete.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// public abstract void deleteApplicationCacheFiles(String packageName,IPackageDataObserver observer);
try {
Method method = PackageManager.class.getMethod("deleteApplicationCacheFiles", String.class, IPackageDataObserver.class);
method.invoke(pm, packageName, new MyPackageDataObserver());
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
});
ll_content.addView(view, 0);
}
}
});
} catch (NameNotFoundException e) {
e.printStackTrace();
}
}
}
/**
*´Ë·½·¨ÐèÒªÓÐϵͳӦÓõÄȨÏÞ£¬Òò´Ë×Ô¼ºÊµÊ©²»ÁË£»»á±¨´í¡£Ö»ÓнèÓÃϵͳ³ÌÐò²ÅÄÜÓá£
*10-10 20:08:29.580: current process has android.permission.DELETE_CACHE_FILES.
*/
private class MyPackageDataObserver extends IPackageDataObserver.Stub{
@Override
public void onRemoveCompleted(String packageName, boolean succeeded) throws RemoteException {
System.out.println(packageName + succeeded);
}
}
public void clearAll(View view) {
//deleteApplicationCacheFilesÇå³ý»º´æ·½·¨²»ÄÜÓã¬Ö»ÄÜÓÃϵͳbug£¬ÉêÇë´óÄڴ棬±ÆÆÈϵͳ»ØÊÕ»º´æ¿Õ¼ä
// public abstract void freeStorageAndNotify(long freeStorageSize, IPackageDataObserver observer);
Method[] methods = PackageManager.class.getMethods();
for (Method method : methods) {
if(method.getName().equals("freeStorageAndNotify")){
try {
method.invoke(pm, Integer.MAX_VALUE, new MyPackageDataObserver());
} catch (Exception e) {
e.printStackTrace();
}
return;
}
}
}
}
| {
"content_hash": "82e1cd26586599a990c0997d5e1277bf",
"timestamp": "",
"source": "github",
"line_count": 169,
"max_line_length": 130,
"avg_line_length": 33.70414201183432,
"alnum_prop": 0.7011938202247191,
"repo_name": "jj4856951/MobileSafe",
"id": "ad91b8edba4f7dc35e779dc7c68dd15d9aabd7b9",
"size": "5696",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/com/zjw/mobilesafe/ClearCacheActivity.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "144385"
}
],
"symlink_target": ""
} |
#pragma once
#include <aws/chime-sdk-media-pipelines/ChimeSDKMediaPipelines_EXPORTS.h>
#include <aws/chime-sdk-media-pipelines/model/AudioArtifactsConfiguration.h>
#include <aws/chime-sdk-media-pipelines/model/VideoArtifactsConfiguration.h>
#include <aws/chime-sdk-media-pipelines/model/ContentArtifactsConfiguration.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace ChimeSDKMediaPipelines
{
namespace Model
{
/**
* <p>The configuration for the artifacts.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/chime-sdk-media-pipelines-2021-07-15/ArtifactsConfiguration">AWS
* API Reference</a></p>
*/
class AWS_CHIMESDKMEDIAPIPELINES_API ArtifactsConfiguration
{
public:
ArtifactsConfiguration();
ArtifactsConfiguration(Aws::Utils::Json::JsonView jsonValue);
ArtifactsConfiguration& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The configuration for the audio artifacts.</p>
*/
inline const AudioArtifactsConfiguration& GetAudio() const{ return m_audio; }
/**
* <p>The configuration for the audio artifacts.</p>
*/
inline bool AudioHasBeenSet() const { return m_audioHasBeenSet; }
/**
* <p>The configuration for the audio artifacts.</p>
*/
inline void SetAudio(const AudioArtifactsConfiguration& value) { m_audioHasBeenSet = true; m_audio = value; }
/**
* <p>The configuration for the audio artifacts.</p>
*/
inline void SetAudio(AudioArtifactsConfiguration&& value) { m_audioHasBeenSet = true; m_audio = std::move(value); }
/**
* <p>The configuration for the audio artifacts.</p>
*/
inline ArtifactsConfiguration& WithAudio(const AudioArtifactsConfiguration& value) { SetAudio(value); return *this;}
/**
* <p>The configuration for the audio artifacts.</p>
*/
inline ArtifactsConfiguration& WithAudio(AudioArtifactsConfiguration&& value) { SetAudio(std::move(value)); return *this;}
/**
* <p>The configuration for the video artifacts.</p>
*/
inline const VideoArtifactsConfiguration& GetVideo() const{ return m_video; }
/**
* <p>The configuration for the video artifacts.</p>
*/
inline bool VideoHasBeenSet() const { return m_videoHasBeenSet; }
/**
* <p>The configuration for the video artifacts.</p>
*/
inline void SetVideo(const VideoArtifactsConfiguration& value) { m_videoHasBeenSet = true; m_video = value; }
/**
* <p>The configuration for the video artifacts.</p>
*/
inline void SetVideo(VideoArtifactsConfiguration&& value) { m_videoHasBeenSet = true; m_video = std::move(value); }
/**
* <p>The configuration for the video artifacts.</p>
*/
inline ArtifactsConfiguration& WithVideo(const VideoArtifactsConfiguration& value) { SetVideo(value); return *this;}
/**
* <p>The configuration for the video artifacts.</p>
*/
inline ArtifactsConfiguration& WithVideo(VideoArtifactsConfiguration&& value) { SetVideo(std::move(value)); return *this;}
/**
* <p>The configuration for the content artifacts.</p>
*/
inline const ContentArtifactsConfiguration& GetContent() const{ return m_content; }
/**
* <p>The configuration for the content artifacts.</p>
*/
inline bool ContentHasBeenSet() const { return m_contentHasBeenSet; }
/**
* <p>The configuration for the content artifacts.</p>
*/
inline void SetContent(const ContentArtifactsConfiguration& value) { m_contentHasBeenSet = true; m_content = value; }
/**
* <p>The configuration for the content artifacts.</p>
*/
inline void SetContent(ContentArtifactsConfiguration&& value) { m_contentHasBeenSet = true; m_content = std::move(value); }
/**
* <p>The configuration for the content artifacts.</p>
*/
inline ArtifactsConfiguration& WithContent(const ContentArtifactsConfiguration& value) { SetContent(value); return *this;}
/**
* <p>The configuration for the content artifacts.</p>
*/
inline ArtifactsConfiguration& WithContent(ContentArtifactsConfiguration&& value) { SetContent(std::move(value)); return *this;}
private:
AudioArtifactsConfiguration m_audio;
bool m_audioHasBeenSet;
VideoArtifactsConfiguration m_video;
bool m_videoHasBeenSet;
ContentArtifactsConfiguration m_content;
bool m_contentHasBeenSet;
};
} // namespace Model
} // namespace ChimeSDKMediaPipelines
} // namespace Aws
| {
"content_hash": "89614722825802b6a427dfcd67bed4fc",
"timestamp": "",
"source": "github",
"line_count": 145,
"max_line_length": 132,
"avg_line_length": 32.08275862068965,
"alnum_prop": 0.6908856405846947,
"repo_name": "cedral/aws-sdk-cpp",
"id": "597a8012944b731c4d79a06899bb3472e771dfc7",
"size": "4771",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "aws-cpp-sdk-chime-sdk-media-pipelines/include/aws/chime-sdk-media-pipelines/model/ArtifactsConfiguration.h",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "C",
"bytes": "294220"
},
{
"name": "C++",
"bytes": "428637022"
},
{
"name": "CMake",
"bytes": "862025"
},
{
"name": "Dockerfile",
"bytes": "11688"
},
{
"name": "HTML",
"bytes": "7904"
},
{
"name": "Java",
"bytes": "352201"
},
{
"name": "Python",
"bytes": "106761"
},
{
"name": "Shell",
"bytes": "10891"
}
],
"symlink_target": ""
} |
I18n_data_en = {
"brand" : "SHINE",
"title_dashboard" : "Dashboard",
"title_system" : "System",
"title_home" : "Home",
"title_login" : "Login",
"title_notice" : "Notice",
"title_qna" : "QnA",
"title_connection" : "Connection",
"title_account" : "Account",
"title_category" : "Category",
"title_post" : "Post",
"title_comments" : "Comments",
"title_notifications" : "Notifications",
"title_preference" : "Preference",
"title_mail_reset_password" : "Password Reset",
"title_reset_password" : "Password Reset",
"title_mail_verify_email" : "Welcome to Brandname",
"title_verify_email" : "Email Title here",
"title_user_list" : "User List",
"title_new_message" : "New Message",
"title_list" : "List",
"title_edit" : "Edit",
"command_sign_in" : "Sign in",
"command_sign_out" : "Sign out",
"command_sign_up" : "Sign up",
"command_new" : "New",
"command_register" : "Register",
"command_edit" : "Edit",
"command_update" : "Update",
"command_remove" : "Remove",
"command_save" : "Save",
"command_ok" : "OK",
"command_cancel" : "Cancel",
"command_yes" : "Yes",
"command_no" : "No",
"command_back" : "Back",
"command_close" : "Close",
"command_search" : "Search",
"command_load_more" : "Load More",
"label_no" : "No",
"label_total_count" : "Total count",
"label_created_at" : "Created time",
"label_updated_at" : "Updated time",
"label_connected_at" : "Connected time",
"label_last_login_at" : "Last login time",
"label_account" : "Account",
"label_oauth_account" : "OAuth account",
"label_ip_address" : "IP address",
"label_username" : "Username",
"label_email" : "Email address",
"label_password" : "Password",
"label_title" : "Title",
"label_content" : "Content",
"label_state" : "State",
"label_price" : "Price",
"label_brand" : "Brand",
"label_carname" : "Car Name",
"label_model" : "Model",
"label_detail" : "Detail Model",
"label_author" : "Author",
"label_like" : "Like",
"label_comment" : "Comment",
"label_permission_read" : "Permission READ",
"label_permission_write" : "Permission WRITE",
"label_theme" : "Theme",
"label_phone" : "Phone",
"label_address" : "Address",
"label_terms_of_use" : "Terms of Use",
"label_privacy_policy" : "Privacy Policy",
"label_connect_us" : "Connect with us",
"label_contact_info" : "Contact Information",
"label_unsubscribe" : "Unsubscription",
"label_connections_count" : "Connections count",
"label_facebook_login" : "Facebook Login",
"label_meetup_login" : "Meetup Login",
"label_site" : "Site",
"label_load_more" : "Load more",
"label_system_general" : "General",
"label_system_accounts" : "Accounts",
"label_system_uploads" : "Uploads",
"label_name" : "Name",
"label_logo" : "Logo Image",
"label_cloudinary_setup" : "Cloudinary setup",
"label_cloudinary_name" : "cloudName",
"label_cloudinary_key" : "API key",
"label_cloudinary_secret" : "API secret",
"label_categories" : "Categories",
"label_list" : "List",
"label_view" : "View",
"label_new" : "New",
"label_edit" : "Edit",
"label_page_not_found" : "Page Not Found",
"label_go_home" : "Move to Home",
"text_sign_in" : "Sign in",
"text_input_email" : "Input Email address",
"text_input_password" : "Input password",
"text_notification_new_comment" : "A new comment registered for {0}'s blog",
"text_company_phone" : "Company Phone Number",
"text_company_address" : "Company Address",
"text_reset_password" : "Password Reset",
"text_verify_email" : "You just signed up. Click this link to validate your email address : ",
"text_connection_alarm" : "Disconnected. Waiting connection...",
"text_page_not_found" : "Page Not Found.",
"error_access_denied" : "Access denied",
"error_invalid_type" : "Input data type is invalid",
"error_input_required" : "Input value is required",
"error_input_out_of_range" : "Input value is out of range",
// home
"label_home" : "Home",
// profile
"label_profile" : "Profile",
"label_profile_edit_email" : "Edit email address",
"label_profile_edit_password" : "Change password",
"label_profile_edit_name" : "Edit name",
// about
"label_about" : "About",
"label_about_version" : "Version",
// post
"label_post" : "Post",
"label_new_post" : "New Post",
"text_no_posts" : "There is no post registered.",
};
| {
"content_hash": "88e4706bf93610c5b1656a6863712c7e",
"timestamp": "",
"source": "github",
"line_count": 134,
"max_line_length": 108,
"avg_line_length": 44.6044776119403,
"alnum_prop": 0.46059896269031286,
"repo_name": "shine-js/shine-react",
"id": "2e7e70f82e3864bcbf72184ac86596ee862e271e",
"size": "5977",
"binary": false,
"copies": "1",
"ref": "refs/heads/devel",
"path": "apps/front/shared/0/lib/i18n/i18n_en.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "319920"
},
{
"name": "HTML",
"bytes": "5792"
},
{
"name": "JavaScript",
"bytes": "459226"
},
{
"name": "Shell",
"bytes": "2576"
}
],
"symlink_target": ""
} |

An alternative `Prelude`.
| {
"content_hash": "1bb168756b6d902fa349fe3d0537a625",
"timestamp": "",
"source": "github",
"line_count": 4,
"max_line_length": 40,
"avg_line_length": 17.25,
"alnum_prop": 0.6956521739130435,
"repo_name": "bitemyapp/prelim",
"id": "384fbde4c6d93debad1250f405e74c6edfcae42d",
"size": "79",
"binary": false,
"copies": "1",
"ref": "refs/heads/prelim",
"path": "README.md",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "Haskell",
"bytes": "7509"
}
],
"symlink_target": ""
} |
package com.exlibris.dps;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for sipStatusInfo complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="sipStatusInfo">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="module" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="stage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="status" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "sipStatusInfo", propOrder = {
"module",
"stage",
"status"
})
public class SipStatusInfo {
protected String module;
protected String stage;
protected String status;
/**
* Gets the value of the module property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getModule() {
return module;
}
/**
* Sets the value of the module property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setModule(String value) {
this.module = value;
}
/**
* Gets the value of the stage property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getStage() {
return stage;
}
/**
* Sets the value of the stage property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setStage(String value) {
this.stage = value;
}
/**
* Gets the value of the status property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getStatus() {
return status;
}
/**
* Sets the value of the status property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setStatus(String value) {
this.status = value;
}
}
| {
"content_hash": "68992241c79ac65390c207e7fa294672",
"timestamp": "",
"source": "github",
"line_count": 114,
"max_line_length": 100,
"avg_line_length": 22.06140350877193,
"alnum_prop": 0.5538767395626243,
"repo_name": "ExLibrisGroup/Rosetta.dps-sdk-projects",
"id": "9e74c2ac43791b531f17415b7901bf6357a8b4ca",
"size": "2515",
"binary": false,
"copies": "17",
"ref": "refs/heads/master",
"path": "4.1/dps-sdk-deposit/src/com/exlibris/dps/SipStatusInfo.java",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "Java",
"bytes": "4697410"
},
{
"name": "Shell",
"bytes": "297"
}
],
"symlink_target": ""
} |
[](https://travis-ci.org/getbitpocket/bitpocket-mobile-app) [](https://gitter.im/getbitpocket/bitpocket-mobile-app?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [](https://david-dm.org/getbitpocket/bitpocket-mobile-app)
# BitPocket
Enabling Bitcoin Payments at the Point of Sale.
## Screenshots
<table>
<tr align="center">
<td><img height="450" src="https://cloud.githubusercontent.com/assets/5379359/25747451/d32e55e6-31a7-11e7-8d89-188e97484174.png" alt="BitPocket - Request Payment"></td>
<td><img height="450" src="https://cloud.githubusercontent.com/assets/5379359/25736967/7852a4a6-3175-11e7-9749-b94b86005f36.png" alt="BitPocket - Manage Accounts"></td>
<td><img height="450" src="https://cloud.githubusercontent.com/assets/5379359/25736984/8f12d9fe-3175-11e7-895b-335342e3db89.png" alt="BitPocket - Transaction History"></td>
</tr>
</table>
## Main features
- Multiple accounts
- BIP32 HD Keys
- Testnet support
- Support for different currencies
- i18n support
## Development setup
BitPocket is an App based on the Ionic/Cordova Frameworks. Therefore a couple of node modules are required to get started. In order to setup your environment the following global node modules need to be installed: `npm i cordova ionic -g`
After successful installation of the required global modules, do a `npm i` inside the project folder to gather all local module dependencies. Additionally, some cordova plugins are required also. `ionic state reset --plugin` does the trick here.
- `ionic serve` can be used to test the app locally in the browser, however not all networking features are available.
- `ionic run (android|ios)` can be used to test the app on a connected device
- `ionic emulate (android|ios)` can be used to test the app on a emulator/simulator
## Testing
BitPocket is developed alongside unit and e2e testing. Test can be run:
- `npm run test:unit` for unit tests
- `npm run test:e2e` for e2e tests
## Translations
- [English](https://github.com/getbitpocket/bitpocket-mobile-app/blob/master/src/assets/i18n/en.json)
- [German](https://github.com/getbitpocket/bitpocket-mobile-app/blob/master/src/assets/i18n/de.json)
- [Polish](https://github.com/getbitpocket/bitpocket-mobile-app/blob/master/src/assets/i18n/pl.json) | {
"content_hash": "b0e3a3213499ab06eecdff9939fef5fe",
"timestamp": "",
"source": "github",
"line_count": 47,
"max_line_length": 553,
"avg_line_length": 55.191489361702125,
"alnum_prop": 0.7698535080956053,
"repo_name": "getbitpocket/bitpocket-mobile-app",
"id": "ff204ea249a2def754ae05bea7a58d97fe604ac7",
"size": "2594",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "README.md",
"mode": "33188",
"license": "bsd-2-clause",
"language": [
{
"name": "CSS",
"bytes": "12441"
},
{
"name": "HTML",
"bytes": "28851"
},
{
"name": "JavaScript",
"bytes": "6964"
},
{
"name": "TypeScript",
"bytes": "802356"
}
],
"symlink_target": ""
} |
Resource Type Graph
========
This project is a POC, **do NOT submit issues**, it is unlikely I will ever contribute anything to it anymore. | {
"content_hash": "e91625b4ac1e6cca5349b4c60680cb27",
"timestamp": "",
"source": "github",
"line_count": 4,
"max_line_length": 110,
"avg_line_length": 35,
"alnum_prop": 0.7214285714285714,
"repo_name": "oa-platform/RT-Graph",
"id": "280baada45e7a8bc2a4910443455b30fedca7a53",
"size": "140",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "README.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "206"
},
{
"name": "JavaScript",
"bytes": "5481"
},
{
"name": "PHP",
"bytes": "1991"
}
],
"symlink_target": ""
} |
full::node::node(){}
full::node::node(float aScore, int nHor, int nVer, bool isSGap, bool isEGap)
{
this->_isStart = isSGap;
this->_isEnd = isEGap;
this->_isGap = false;
//This is the score to be added during dynamic programming.
this->_score = aScore;
//The greatest dynScore is kept during dynamic programming:
//Therefore, the MIN dynScore will always be replaced
this->_dynScore = -std::numeric_limits<float>::max();
this->_horizontalIndex = nHor;
this->_verticalIndex = nVer;
}
void full::node::matchCheck(node *p){
if (this->_score + p->_dynScore > this->_dynScore){
this->_dynScore = this->_score + p->_dynScore;
this->_isGap = false;
this->parent = p;
}
}
void full::node::gapCheck(node *p, float aDynScore){
if (aDynScore+p->_dynScore > _dynScore){
this->_dynScore = aDynScore + p->_dynScore;
this->_isGap = true;
this->parent = p;
}
}
full::node::~node()
{
}
| {
"content_hash": "cd3356e0a4f320759c8f0f1251699e22",
"timestamp": "",
"source": "github",
"line_count": 37,
"max_line_length": 76,
"avg_line_length": 24.35135135135135,
"alnum_prop": 0.6614872364039955,
"repo_name": "ibharvey/sequenceAlignment",
"id": "1d57609feb3a535c186d729ef6e39207a27cf3c1",
"size": "940",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "sequenceAlignment/sequenceAlignment/node.cpp",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "31309"
},
{
"name": "C++",
"bytes": "45867"
},
{
"name": "Objective-C",
"bytes": "611"
},
{
"name": "Python",
"bytes": "1512"
}
],
"symlink_target": ""
} |
layout: documentation
---
### Request Readers
Comming soon... For now see the [getting started guide](getting-started).
### Next: [Value Mappers](value-mappers) | {
"content_hash": "f9c11f356dc060cf26970c5a95ee6b60",
"timestamp": "",
"source": "github",
"line_count": 8,
"max_line_length": 73,
"avg_line_length": 20.375,
"alnum_prop": 0.7177914110429447,
"repo_name": "mikeobrien/graphite",
"id": "bec00c3229accb1cb6e174a0c681f660211ddd95",
"size": "167",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "docs/request-readers.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ASP",
"bytes": "102"
},
{
"name": "C#",
"bytes": "1680458"
},
{
"name": "CSS",
"bytes": "3042"
},
{
"name": "HTML",
"bytes": "27041"
},
{
"name": "JavaScript",
"bytes": "5212"
}
],
"symlink_target": ""
} |
<!--
Copyright 2005-2008 Adobe Systems Incorporated
Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt
or a copy at http://stlab.adobe.com/licenses.html)
Some files are held under additional license.
Please see "http://stlab.adobe.com/licenses.html" for more information.
-->
<!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" lang="en" xml:lang="en">
<head>
<TITLE>Adobe Software Technology Lab: iota.hpp Source File</TITLE>
<META HTTP-EQUIV="content-type" CONTENT="text/html;charset=ISO-8859-1"/>
<LINK TYPE="text/css" REL="stylesheet" HREF="adobe_source.css"/>
<LINK REL="alternate" TITLE="stlab.adobe.com RSS" HREF="http://sourceforge.net/export/rss2_projnews.php?group_id=132417&rss_fulltext=1" TYPE="application/rss+xml"/>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
</head>
<body>
<div id='content'>
<table><tr>
<td colspan='5'>
<div id='opensource_banner'>
<table style='width: 100%; padding: 5px;'><tr>
<td align='left'>
<a href='index.html' style='border: none'><img src='stlab2007.jpg' alt="stlab.adobe.com"/></a>
</td>
<td align='right'>
<a href='http://www.adobe.com' style='border: none'><img src='adobe_hlogo.gif' alt="Adobe Systems Incorporated"/></a>
</td>
</tr></table>
</div>
</td></tr><tr>
<td valign="top">
<div id='navtable' height='100%'>
<div style='margin: 5px'>
<h4>Documentation</h4>
<a href="group__asl__overview.html">Overview</a><br/>
<a href="asl_readme.html">Building ASL</a><br/>
<a href="asl_toc.html">Documentation</a><br/>
<a href="http://stlab.adobe.com/wiki/index.php/Supplementary_ASL_Documentation">Library Wiki Docs</a><br/>
<a href="asl_indices.html">Indices</a><br/>
<a href="http://stlab.adobe.com/perforce/">Browse Perforce</a><br/>
<h4>More Info</h4>
<a href="asl_release_notes.html">Release Notes</a><br/>
<a href="http://stlab.adobe.com/wiki/">Wiki</a><br/>
<a href="asl_search.html">Site Search</a><br/>
<a href="licenses.html">License</a><br/>
<a href="success_stories.html">Success Stories</a><br/>
<a href="asl_contributors.html">Contributors</a><br/>
<h4>Media</h4>
<a href="http://sourceforge.net/project/showfiles.php?group_id=132417&package_id=145420">Download</a><br/>
<a href="asl_download_perforce.html">Perforce Depots</a><br/>
<h4>Support</h4>
<a href="http://sourceforge.net/projects/adobe-source/">ASL SourceForge Home</a><br/>
<a href="http://sourceforge.net/mail/?group_id=132417">Mailing Lists</a><br/>
<a href="http://sourceforge.net/forum/?group_id=132417">Discussion Forums</a><br/>
<a href="http://sourceforge.net/tracker/?atid=724218&group_id=132417&func=browse">Report Bugs</a><br/>
<a href="http://sourceforge.net/tracker/?atid=724221&group_id=132417&func=browse">Suggest Features</a><br/>
<a href="asl_contributing.html">Contribute to ASL</a><br/>
<h4>RSS</h4>
<a href="http://sourceforge.net/export/rss2_projnews.php?group_id=132417">Short-text news</a><br/>
<a href="http://sourceforge.net/export/rss2_projnews.php?group_id=132417&rss_fulltext=1">Full-text news</a><br/>
<a href="http://sourceforge.net/export/rss2_projfiles.php?group_id=132417">File releases</a><br/>
<h4>Other Adobe Projects</h4>
<a href="http://sourceforge.net/adobe/">Open @ Adobe</a><br/>
<a href="http://opensource.adobe.com/">Adobe Open Source</a><br/>
<a href="http://labs.adobe.com/">Adobe Labs</a><br/>
<a href="http://stlab.adobe.com/amg/">Adobe Media Gallery</a><br/>
<a href="http://stlab.adobe.com/performance/">C++ Benchmarks</a><br/>
<h4>Other Resources</h4>
<a href="http://boost.org">Boost</a><br/>
<a href="http://www.riaforge.com/">RIAForge</a><br/>
<a href="http://www.sgi.com/tech/stl">SGI STL</a><br/>
</div>
</div>
</td>
<td id='maintable' width="100%" valign="top">
<!-- End Header -->
<!-- Generated by Doxygen 1.7.2 -->
<div class="header">
<div class="headertitle">
<h1>iota.hpp</h1> </div>
</div>
<div class="contents">
<a href="iota_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment"></span>
<a name="l00006"></a>00006
<a name="l00007"></a>00007 <span class="comment">/*************************************************************************************************/</span>
<a name="l00008"></a>00008
<a name="l00009"></a>00009 <span class="preprocessor">#ifndef ADOBE_ALGORITHM_IOTA_HPP</span>
<a name="l00010"></a>00010 <span class="preprocessor"></span><span class="preprocessor">#define ADOBE_ALGORITHM_IOTA_HPP</span>
<a name="l00011"></a>00011 <span class="preprocessor"></span>
<a name="l00012"></a>00012 <span class="preprocessor">#include <<a class="code" href="config_8hpp.html">adobe/config.hpp</a>></span>
<a name="l00013"></a>00013
<a name="l00014"></a>00014 <span class="preprocessor">#include <<a class="code" href="functional_8hpp.html">adobe/functional.hpp</a>></span>
<a name="l00015"></a>00015
<a name="l00016"></a>00016 <span class="preprocessor">#include <boost/range/begin.hpp></span>
<a name="l00017"></a>00017 <span class="preprocessor">#include <boost/range/end.hpp></span>
<a name="l00018"></a>00018
<a name="l00019"></a>00019 <span class="preprocessor">#include <algorithm></span>
<a name="l00020"></a>00020
<a name="l00021"></a>00021 <span class="comment">/*************************************************************************************************/</span>
<a name="l00022"></a>00022
<a name="l00023"></a>00023 <span class="keyword">namespace </span>adobe {
<a name="l00024"></a>00024
<a name="l00025"></a>00025 <span class="comment">/*************************************************************************************************/</span>
<a name="l00045"></a>00045 <span class="comment">/*************************************************************************************************/</span>
<a name="l00051"></a>00051 <span class="keyword">template</span> <<span class="keyword">class</span> ForwardIterator, <span class="keyword">class</span> T>
<a name="l00052"></a><a class="code" href="group__iota.html#ga08de889f66ad00b0f6ce085dc3f61e4c">00052</a> <span class="keywordtype">void</span> <a class="code" href="group__iota.html#ga08de889f66ad00b0f6ce085dc3f61e4c" title="iota implementation">iota</a> (ForwardIterator first, ForwardIterator last, <span class="keyword">const</span> T& value)
<a name="l00053"></a>00053 {
<a name="l00054"></a>00054 <a class="code" href="group__generate.html#gaa13023bd917a487dede58dfa29a2accf" title="generate implementation">std::generate</a>(first, last, <a class="code" href="structadobe_1_1sequence__t.html" title="A function object for sequence generation within a domain.">adobe::sequence_t<T></a>(value));
<a name="l00055"></a>00055 }
<a name="l00056"></a>00056
<a name="l00062"></a>00062 <span class="keyword">template</span> <<span class="keyword">class</span> ForwardRange, <span class="keyword">class</span> T>
<a name="l00063"></a><a class="code" href="group__iota.html#gac5ddc9340c3f9ea9903557279505b1a5">00063</a> <span class="keywordtype">void</span> <a class="code" href="group__iota.html#ga08de889f66ad00b0f6ce085dc3f61e4c" title="iota implementation">iota</a> (ForwardRange& range, <span class="keyword">const</span> T& value)
<a name="l00064"></a>00064 {
<a name="l00065"></a>00065 <a class="code" href="group__iota.html#ga08de889f66ad00b0f6ce085dc3f61e4c" title="iota implementation">adobe::iota</a>(boost::begin(range), boost::end(range), value);
<a name="l00066"></a>00066 }
<a name="l00067"></a>00067
<a name="l00068"></a>00068 <span class="comment">/*************************************************************************************************/</span>
<a name="l00069"></a>00069
<a name="l00070"></a>00070 } <span class="comment">// namespace adobe</span>
<a name="l00071"></a>00071
<a name="l00072"></a>00072 <span class="comment">/*************************************************************************************************/</span>
<a name="l00073"></a>00073
<a name="l00074"></a>00074 <span class="preprocessor">#endif</span>
<a name="l00075"></a>00075 <span class="preprocessor"></span>
<a name="l00076"></a>00076 <span class="comment">/*************************************************************************************************/</span>
</pre></div></div>
</div>
<!-- Begin Footer -->
</td></tr>
</table>
</div> <!-- content -->
<div class='footerdiv'>
<div id='footersub'>
<ul>
<li><a href="http://www.adobe.com/go/gftray_foot_aboutadobe">Company</a> | </li>
<li><a href="http://www.adobe.com/go/gftray_foot_privacy_security">Online Privacy Policy</a> | </li>
<li><a href="http://www.adobe.com/go/gftray_foot_terms">Terms of Use</a> | </li>
<li><a href="http://www.adobe.com/go/gftray_foot_contact_adobe">Contact Us</a> | </li>
<li><a href="http://www.adobe.com/go/gftray_foot_accessibility">Accessibility</a> | </li>
<li><a href="http://www.adobe.com/go/gftray_foot_report_piracy">Report Piracy</a> | </li>
<li><a href="http://www.adobe.com/go/gftray_foot_permissions_trademarks">Permissions & Trademarks</a> | </li>
<li><a href="http://www.adobe.com/go/gftray_foot_product_license_agreements">Product License Agreements</a> | </li>
<li><a href="http://www.adobe.com/go/gftray_foot_feedback">Send Feedback</a></li>
</ul>
<div>
<p>Copyright © 2006-2007 Adobe Systems Incorporated.</p>
<p>Use of this website signifies your agreement to the <a href="http://www.adobe.com/go/gftray_foot_terms">Terms of Use</a> and <a href="http://www.adobe.com/go/gftray_foot_privacy_security">Online Privacy Policy</a>.</p>
<p>Search powered by <a href="http://www.google.com/" target="new">Google</a></p>
</div>
</div>
</div>
<script type="text/javascript">
_uacct = "UA-396569-1";
urchinTracker();
</script>
</body>
</html>
| {
"content_hash": "b058c6650dbc179c8dbd756bc8ef087b",
"timestamp": "",
"source": "github",
"line_count": 176,
"max_line_length": 350,
"avg_line_length": 60.19886363636363,
"alnum_prop": 0.6098159509202454,
"repo_name": "brycelelbach/asl",
"id": "dc01ae054f94fea5cf0bbff3c204bfd16cd9585e",
"size": "11009",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "documentation/html/iota_8hpp_source.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C++",
"bytes": "1846467"
},
{
"name": "Perl",
"bytes": "167978"
},
{
"name": "Shell",
"bytes": "3594"
}
],
"symlink_target": ""
} |
layout: post
title: Tweets
date: 2019-06-18
summary: These are the tweets for June 18, 2019.
categories:
---
| {
"content_hash": "242a6075a6894fde85bb3a12caf76b23",
"timestamp": "",
"source": "github",
"line_count": 7,
"max_line_length": 48,
"avg_line_length": 15.714285714285714,
"alnum_prop": 0.7272727272727273,
"repo_name": "alexlitel/congresstweets",
"id": "7433fd98b61f934d193075c1d32544216747e01e",
"size": "114",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "_posts/2019-06-18--tweets.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "HTML",
"bytes": "16982"
},
{
"name": "Ruby",
"bytes": "2102"
},
{
"name": "SCSS",
"bytes": "25903"
}
],
"symlink_target": ""
} |
#ifndef __ARCH_BOARD_BOARD_H
#define __ARCH_BOARD_BOARD_H
/************************************************************************************
* Included Files
************************************************************************************/
/************************************************************************************
* Definitions
************************************************************************************/
/* Clocking *************************************************************************/
/* RCC settings */
#define SYSCON_RCC_XTAL SYSCON_RCC_XTAL8000KHZ /* Eagle100 on-board crystall is 8.00 MHz */
#define XTAL_FREQUENCY 8000000
/* Oscillator source is the main oscillator (not internal, internal/4, 30KHz or
* 30KHz from hibernate module) */
#define SYSCON_RCC_OSCSRC SYSCON_RCC_OSCSRC_MOSC
#define SYSCON_RCC2_OSCSRC SYSCON_RCC2_OSCSRC2_MOSC
#define OSCSRC_FREQUENCY XTAL_FREQUENCY
/* Use system divider = 4; this corresponds to a system clock frequency
* of (400 / 2) / 4 = 50MHz
*/
#define TIVA_SYSDIV 4
#define SYSCLK_FREQUENCY 50000000 /* 50MHz */
/* Other RCC settings:
*
* - Main and internal oscillators enabled.
* - PLL and sys dividers not bypassed
* - PLL not powered down
* - No auto-clock gating reset
*/
#define TIVA_RCC_VALUE (SYSCON_RCC_OSCSRC | SYSCON_RCC_XTAL | SYSCON_RCC_USESYSDIV | SYSCON_RCC_SYSDIV(TIVA_SYSDIV))
/* RCC2 settings -- RCC2 not used. Other RCC2 settings
*
* - PLL and sys dividers not bypassed.
* - PLL not powered down
* - Not using RCC2
*/
#define TIVA_RCC2_VALUE (SYSCON_RCC2_OSCSRC | SYSCON_RCC2_SYSDIV(TIVA_SYSDIV))
/* LED definitions ******************************************************************/
/* The LMS38962 Eval Kit has only one user LED: Port F, Bit 0. Below is the mapping of this
* single LED. From this single LED, we can get the following information:
*
* OFF Steady: The system has failed to boot to the point of enabling interrupts
* ON Steady: The systems has enabled interrupts, but none have been received
* Dull glow: The system is taking interrupts
* Slow blinking: The system has panicked
*/
/* ON OFF */
#define LED_STARTED 0 /* OFF OFF */
#define LED_HEAPALLOCATE 1 /* OFF OFF */
#define LED_IRQSENABLED 2 /* ON ON */
#define LED_STACKCREATED 3 /* ON ON */
#define LED_INIRQ 4 /* ON OFF */
#define LED_SIGNAL 5 /* ON OFF */
#define LED_ASSERTION 6 /* ON OFF */
#define LED_PANIC 7 /* ON OFF */
/************************************************************************************
* Public Function Prototypes
************************************************************************************/
#ifndef __ASSEMBLY__
/************************************************************************************
* Name: tiva_boardinitialize
*
* Description:
* All Stellaris architectures must provide the following entry point. This entry
* point is called early in the intitialization -- after all memory has been
* configured and mapped but before any devices have been initialized.
*
************************************************************************************/
void tiva_boardinitialize(void);
#endif /* __ASSEMBLY__ */
#endif /* __ARCH_BOARD_BOARD_H */
| {
"content_hash": "c8404a599d136fc585e75604bced670e",
"timestamp": "",
"source": "github",
"line_count": 93,
"max_line_length": 116,
"avg_line_length": 36.516129032258064,
"alnum_prop": 0.5008833922261484,
"repo_name": "Paregov/hexadiv",
"id": "8a1384d91a0ecdbe9018df4be3182c715690895d",
"size": "5250",
"binary": false,
"copies": "9",
"ref": "refs/heads/master",
"path": "edno/software/nuttx/configs/lm3s8962-ek/include/board.h",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Assembly",
"bytes": "975534"
},
{
"name": "C",
"bytes": "57806490"
},
{
"name": "C++",
"bytes": "1024028"
},
{
"name": "CSS",
"bytes": "1959"
},
{
"name": "Makefile",
"bytes": "1095758"
},
{
"name": "Objective-C",
"bytes": "1556450"
},
{
"name": "PHP",
"bytes": "469"
},
{
"name": "Pascal",
"bytes": "132"
},
{
"name": "Perl",
"bytes": "4037"
},
{
"name": "Python",
"bytes": "6080"
},
{
"name": "Shell",
"bytes": "983571"
},
{
"name": "Visual Basic",
"bytes": "8382"
}
],
"symlink_target": ""
} |
package alluxio.network.protocol.databuffer;
import com.google.common.base.Preconditions;
import io.netty.channel.DefaultFileRegion;
import java.io.File;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
/**
* A DataBuffer with the underlying data being a {@link FileChannel}.
*/
public final class DataFileChannel implements DataBuffer {
private final File mFile;
private final long mOffset;
private final long mLength;
/**
*
* @param file The file
* @param offset The offset into the FileChannel
* @param length The length of the data to read
*/
public DataFileChannel(File file, long offset, long length) {
mFile = Preconditions.checkNotNull(file);
mOffset = offset;
mLength = length;
}
@Override
public Object getNettyOutput() {
return new DefaultFileRegion(mFile, mOffset, mLength);
}
@Override
public long getLength() {
return mLength;
}
@Override
public ByteBuffer getReadOnlyByteBuffer() {
throw new UnsupportedOperationException(
"DataFileChannel#getReadOnlyByteBuffer is not implemented.");
}
@Override
public void readBytes(byte[] dst, int dstIndex, int length) {
throw new UnsupportedOperationException("DataFileChannel#readBytes is not implemented.");
}
@Override
public int readableBytes() {
throw new UnsupportedOperationException("DataFileChannel#readableBytes is not implemented.");
}
@Override
public void release() {
// Nothing we need to release explicitly, let GC take care of all objects.
}
}
| {
"content_hash": "9477f04ad487c143ce5d4c1bf59b663c",
"timestamp": "",
"source": "github",
"line_count": 62,
"max_line_length": 97,
"avg_line_length": 25.032258064516128,
"alnum_prop": 0.7287371134020618,
"repo_name": "WilliamZapata/alluxio",
"id": "6c035ec5fde8a97fa2b123342d52a197b0736d32",
"size": "2064",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "core/common/src/main/java/alluxio/network/protocol/databuffer/DataFileChannel.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "HTML",
"bytes": "599"
},
{
"name": "Java",
"bytes": "5937942"
},
{
"name": "JavaScript",
"bytes": "1079"
},
{
"name": "Protocol Buffer",
"bytes": "13901"
},
{
"name": "Python",
"bytes": "11471"
},
{
"name": "Roff",
"bytes": "5796"
},
{
"name": "Ruby",
"bytes": "23034"
},
{
"name": "Shell",
"bytes": "107187"
},
{
"name": "Thrift",
"bytes": "31935"
}
],
"symlink_target": ""
} |
require_relative 'client/chunk'
require_relative 'client/chunk_header'
require 'socket'
require 'timeout'
module Nailgun
class Client
DEFAULTS = {
hostname: 'localhost',
port: 2113,
stdin: nil,
stdout: STDOUT,
stderr: STDERR,
env: ENV,
dir: Dir.pwd
}.freeze
CHUNK_HEADER_LEN = 5
TIMEOUT = 5
TimeoutError = Class.new(StandardError)
SocketFailedError = Class.new(StandardError)
ConnectFailedError = Class.new(StandardError)
UnexpectedChunktypeError = Class.new(StandardError)
ServerExceptionError = Class.new(StandardError)
ConnectionBrokenError = Class.new(StandardError)
BadArgumentsError = Class.new(StandardError)
OtherError = Class.new(StandardError)
EXIT_CODE_EXCEPTIONS = {
999 => SocketFailedError,
998 => ConnectFailedError,
997 => UnexpectedChunktypeError,
996 => ServerExceptionError,
995 => ConnectionBrokenError,
994 => BadArgumentsError
}.freeze
CHUNK_TYPES = {
stdin: '0',
stdout: '1',
stderr: '2',
stdin_eof: '.',
arg: 'A',
env: 'E',
dir: 'D',
cmd: 'C',
exit: 'X'
}.freeze
attr_reader :opts, :socket
# Public: Convinience method to instantiate and run the command
#
# command - see #run
# args - see #run
# opts = {} - see #initialize
#
# Returns the duplicated String.
def self.run(command, args, opts = {})
self.new(opts).run(command, args)
end
# Public: Initialize a Client.
#
# opts = {} - a Hash of options to override the defaults in DEFAULTS
def initialize(opts = {})
@opts = DEFAULTS.merge(opts)
@socket = TCPSocket.new(*@opts.values_at(:hostname, :port))
if block_given?
yield self
@socket.close
return nil
end
end
# Public: Run a command on the Client instance
#
# command - the command string
# *args - any arguments to send
def run(command, *args)
receive_loop # start the loop
send_args args.flatten
send_env opts[:env]
send_dir opts[:dir]
send_command command
send_stdin opts[:stdin]
receive_loop.join
return nil
end
# Public: Start the receiver loop Thread, memoize it, and return the Thread
#
# Returns the Thread object, whose value will eventually be the exit status from the Nailgun
# server
def receive_loop
@loop ||= Thread.new {
catch(:exit) do
loop { receive_chunk }
end
}
end
# Public: Explicitly close the TCPSocket
def close!
socket.close
end
private
# Private: Send the argument chunks
#
# *args - an Array of the arguments to send
def send_args(*args)
args.flatten.each do |arg|
send_chunk :arg, arg
end
end
# Private: Send the environment vars.
#
# env - a Hash in the format of Ruby's ENV constant
def send_env(env)
env.each do |var|
send_chunk :env, var.join(?=)
end
end
# Private: Send the working directory
#
# dir - the working directory
def send_dir(dir)
send_chunk :dir, dir.to_s
end
# Private: Send the command to be run
#
# command - the Nail command (usually a Java class name)
def send_command(command)
send_chunk :cmd, command
end
# Private: Send the STDIN stream for the Nail to read from.
#
# io = nil - an IO of the stdin stream to send.
def send_stdin(io = nil)
unless io.nil?
begin
send_chunk :stdin, io.read(2048)
end until io.eof?
io.close
end
send_chunk :stdin_eof
end
# Private: Send a chunk. Used by the higher-level methods
#
# type - the chunk type
# content = nil - the actual content
def send_chunk(type, content = nil)
chunk = Chunk.new(type, content).to_s
socket.write chunk
end
# Private: get the next chunk from the socket, and then determine what to do with it.
def receive_chunk
Timeout.timeout(TIMEOUT, TimeoutError) do
length, type = receive_header
if length > 0
content = socket.read(length)
end
handle_chunk(type, content)
end
end
# Private: Block while waiting for a header for the next chunk
#
# Returns [length, type]
def receive_header
socket.read(CHUNK_HEADER_LEN).unpack('NA')
end
# Private: Determine what to do with the received chunk
#
# type - chunk type
# content - chunk content
def handle_chunk(type, content)
case t = CHUNK_TYPES.key(type)
when :stdout, :stderr
opts[t].write content
when :exit
socket.close
handle_exit(content.to_i)
else
raise UnexpectedChunktypeError.new([type, content].join(?;))
end
end
def handle_exit(code)
if code == 0
throw :exit
elsif ex = EXIT_CODE_EXCEPTIONS[code]
raise ex.new
else
raise OtherError.new(code.to_s)
end
end
end
end | {
"content_hash": "8b8cd04f842fc8f6f55bdeee75e668e1",
"timestamp": "",
"source": "github",
"line_count": 216,
"max_line_length": 96,
"avg_line_length": 24.36574074074074,
"alnum_prop": 0.5850275508265248,
"repo_name": "rtlong/nailgun-ruby",
"id": "bca581fc5fbbfddea9adebb710eb68f69adeb440",
"size": "5263",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "lib/nailgun/client.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Ruby",
"bytes": "6805"
}
],
"symlink_target": ""
} |
<HTML><HEAD>
<TITLE>Review for Johnny Mnemonic (1995)</TITLE>
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/ramr.css">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1 ALIGN="CENTER" CLASS="title"><A HREF="/Title?0113481">Johnny Mnemonic (1995)</A></H1><H3 ALIGN=CENTER>reviewed by<BR><A HREF="/ReviewsBy?James+Berardinelli">James Berardinelli</A></H3><HR WIDTH="40%" SIZE="4">
<PRE> JOHNNY MNEMONIC
A film review by James Berardinelli
Copyright 1995 James Berardinelli</PRE>
<PRE>RATING (0 TO 10): 3.7 </PRE>
<P>U.S. Availability: wide release 5/26/95
Running Length: 1:38
MPAA Classification: R (Violence, profanity, mature themes)
Theatrical Aspect Ratio: 1.85:1 </P>
<P>Cast: Keanu Reeves, Dina Meyer, Ice-T, Takeshi, Dolph Lundgren
Director: Robert Longo
Producer: Don Carmody
Screenplay: William Gibson based on his story
Cinematography: Francois Protat
Music: Brad Fiedel
U.S. Distributor: TriStar Pictures </P>
<P> JOHNNY MNEMONIC has an interesting premise: it's the second decade
of the twenty-first century and information espionage has become so
commonplace that human "couriers" are used to transport electronic data.
These couriers have implants hardwired into their brains to accommodate
uploading and downloading gigabytes, and they get paid handsomely for
their services. Meanwhile, the world is in the grip of a mysterious
ailment called Nerve Attenuation Syndrome, which threatens half the
population with neural seizures. </P>
<P> Unfortunately, once you get beyond this background, the film has
little to offer aside from a second-rate cast, a dumb story, and cheesy
special effects. Computer-generated visuals a la THE LAWNMOWER MAN
aren't nearly as stunning or interesting as director Robert Longo thinks
they are. Aside from being relatively easy to create (most theaters use
this sort of thing in their self-promotional material), they get dull
pretty quickly. Alas, that doesn't prevent Longo from overusing them ad
nauseam. Apparently, he spent his entire effects budget on these,
because several blue screen shots look embarrassingly fake. </P>
<P> Keanu Reeves, an actor of exceptionally limited scope, plays the
title character with about as much wattage as a pen flashlight. Reeves
alternates between understated and over-the-top with alarming
regularity, creating several unintentionally hilarious moments. As
evidence of how poor this performance is, consider that Dolph Lundgren,
as a bionic villain, acts circles around Reeves. That's right, I said
Dolph Lundgren. </P>
<P> Johnny's head capacity is 80 gigabytes, but he uses a "doubler" to
raise it to 160. Nevertheless, on his latest job, a group of scientists
have downloaded twice that, leading to a potentially-deadly "leakage"
situation--if Johnny doesn't get the information out of his head in 24
hours, his brain will explode. The problem is, a group of yakuza
(Japanese mobsters) are after him, because what he's carrying is worth a
whole lot of money. So Johnny's on the run through the decaying,
futuristic city of Newark, New Jersey, with no download code, and a
protector (Dina Meyer) who's only sticking with him until he comes up
with the cash to pay her off, or until she falls in love with him
(whichever comes first--you guess the answer). </P>
<P> Clearly, JOHNNY MNEMONIC is trying to be a BLADE RUNNER for the
'90s, using cyber-space as its playground. The main problem is the
script, which is as dumb as action stories get. Just because a film
takes place in a futuristic setting doesn't mean that all logic and
coherence have to go out the window. Above all, why should we care
whether Johnny's head explodes when Reeves' performance fails to spark
any empathy for his character? JOHNNY MNEMONIC is brash, flashy, and
loud, but it lacks a few key ingredients--namely heart, soul, and
intelligence. </P>
<P>- James Berardinelli (<A HREF="mailto:[email protected]">[email protected]</A>) </P>
<HR><P CLASS=flush><SMALL>The review above was posted to the
<A HREF="news:rec.arts.movies.reviews">rec.arts.movies.reviews</A> newsgroup (<A HREF="news:de.rec.film.kritiken">de.rec.film.kritiken</A> for German reviews).<BR>
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.<BR>
Please direct comments/criticisms of the review to relevant newsgroups.<BR>
Broken URLs inthe reviews are the responsibility of the author.<BR>
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
</SMALL></P>
<P ALIGN=CENTER>Related links: <A HREF="/Reviews/">index of all rec.arts.movies.reviews reviews</A></P>
</P></BODY></HTML>
| {
"content_hash": "31cd09887d5e250b01b3f39173f0ed20",
"timestamp": "",
"source": "github",
"line_count": 81,
"max_line_length": 213,
"avg_line_length": 61.18518518518518,
"alnum_prop": 0.7391041162227603,
"repo_name": "xianjunzhengbackup/code",
"id": "9ade65f27c73eae3910b9cf4077aabcf323490d4",
"size": "4956",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "data science/machine_learning_for_the_web/chapter_4/movie/3673.html",
"mode": "33261",
"license": "mit",
"language": [
{
"name": "BitBake",
"bytes": "113"
},
{
"name": "BlitzBasic",
"bytes": "256"
},
{
"name": "CSS",
"bytes": "49827"
},
{
"name": "HTML",
"bytes": "157006325"
},
{
"name": "JavaScript",
"bytes": "14029"
},
{
"name": "Jupyter Notebook",
"bytes": "4875399"
},
{
"name": "Mako",
"bytes": "2060"
},
{
"name": "Perl",
"bytes": "716"
},
{
"name": "Python",
"bytes": "874414"
},
{
"name": "R",
"bytes": "454"
},
{
"name": "Shell",
"bytes": "3984"
}
],
"symlink_target": ""
} |
class CreateUsers < ActiveRecord::Migration
def self.up
create_table :users do |t|
t.string :name
t.string :email
t.integer :facebook_uid
t.string :facebook_session_key
t.string :persistence_token
t.timestamps
end
end
def self.down
drop_table :users
end
end
| {
"content_hash": "17d138bf50731ca0937bde248cc2e1dd",
"timestamp": "",
"source": "github",
"line_count": 17,
"max_line_length": 43,
"avg_line_length": 18.823529411764707,
"alnum_prop": 0.634375,
"repo_name": "causes/stars-causes",
"id": "66f81790616c83730c06548bb4696444c58728db",
"size": "320",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "db/migrate/20100302102511_create_users.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "26879"
},
{
"name": "JavaScript",
"bytes": "33538"
},
{
"name": "Ruby",
"bytes": "36461"
}
],
"symlink_target": ""
} |
require 'spec_helper'
describe ActiveModel::Pusher::RecordEventRecognizer do
before do
@recognizer = ActiveModel::Pusher::RecordEventRecognizer
end
it 'recognizes :created event' do
@recognizer.new(CreatedAlien.new).event.should == :created
end
it 'recognizes :updated event' do
@recognizer.new(UpdatedAlien.new).event.should == :updated
end
it 'recognizes :destroyed event' do
@recognizer.new(DestroyedAlien.new).event.should == :destroyed
end
it 'returns nil when event cannot be recognized' do
@recognizer.new(Class.new).event.should be_nil
end
end | {
"content_hash": "5d0636b4cc1b0a34b6bc3fba5f599d0f",
"timestamp": "",
"source": "github",
"line_count": 23,
"max_line_length": 66,
"avg_line_length": 25.91304347826087,
"alnum_prop": 0.7365771812080537,
"repo_name": "AlexanderZaytsev/active_model_pusher",
"id": "c47a2bbc658f90a4df9e20fbfaa35805ae01c4a7",
"size": "596",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "spec/active_model_pusher/record_event_recognizer.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Ruby",
"bytes": "12915"
}
],
"symlink_target": ""
} |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.4.2_05) on Thu Sep 30 22:16:17 GMT+01:00 2004 -->
<TITLE>
MultipartHttpServletRequest (Spring Framework)
</TITLE>
<META NAME="keywords" CONTENT="org.springframework.web.multipart.MultipartHttpServletRequest interface">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="MultipartHttpServletRequest (Spring Framework)";
}
</SCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/MultipartHttpServletRequest.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../org/springframework/web/multipart/MultipartFile.html" title="interface in org.springframework.web.multipart"><B>PREV CLASS</B></A>
<A HREF="../../../../org/springframework/web/multipart/MultipartResolver.html" title="interface in org.springframework.web.multipart"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A>
<A HREF="MultipartHttpServletRequest.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.springframework.web.multipart</FONT>
<BR>
Interface MultipartHttpServletRequest</H2>
<DL>
<DT><B>All Superinterfaces:</B> <DD>javax.servlet.http.HttpServletRequest, javax.servlet.ServletRequest</DD>
</DL>
<DL>
<DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../../org/springframework/web/multipart/support/AbstractMultipartHttpServletRequest.html" title="class in org.springframework.web.multipart.support">AbstractMultipartHttpServletRequest</A></DD>
</DL>
<HR>
<DL>
<DT>public interface <B>MultipartHttpServletRequest</B><DT>extends javax.servlet.http.HttpServletRequest</DL>
<P>
Interface which provides additional methods for dealing with multipart
content within a servlet request, allowing to access uploaded files.
Implementations also need to override the standard ServletRequest
methods for parameter access, making multipart parameters available.
<p>A concrete implementation is DefaultMultipartHttpServletRequest. As an
intermediate step, AbstractMultipartHttpServletRequest can be subclassed.
<P>
<P>
<DL>
<DT><B>Since:</B></DT>
<DD>29-Sep-2003</DD>
<DT><B>Author:</B></DT>
<DD>Juergen Hoeller, Trevor D. Cook</DD>
<DT><B>See Also:</B><DD><A HREF="../../../../org/springframework/web/multipart/MultipartResolver.html" title="interface in org.springframework.web.multipart"><CODE>MultipartResolver</CODE></A>,
<A HREF="../../../../org/springframework/web/multipart/MultipartFile.html" title="interface in org.springframework.web.multipart"><CODE>MultipartFile</CODE></A>,
<CODE>ServletRequest.getParameter(java.lang.String)</CODE>,
<CODE>ServletRequest.getParameterNames()</CODE>,
<CODE>ServletRequest.getParameterMap()</CODE>,
<A HREF="../../../../org/springframework/web/multipart/support/DefaultMultipartHttpServletRequest.html" title="class in org.springframework.web.multipart.support"><CODE>DefaultMultipartHttpServletRequest</CODE></A>,
<A HREF="../../../../org/springframework/web/multipart/support/AbstractMultipartHttpServletRequest.html" title="class in org.springframework.web.multipart.support"><CODE>AbstractMultipartHttpServletRequest</CODE></A></DL>
<HR>
<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Field Summary</B></FONT></TD>
</TR>
</TABLE>
<A NAME="fields_inherited_from_class_javax.servlet.http.HttpServletRequest"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Fields inherited from interface javax.servlet.http.HttpServletRequest</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH</CODE></TD>
</TR>
</TABLE>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../org/springframework/web/multipart/MultipartFile.html" title="interface in org.springframework.web.multipart">MultipartFile</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/springframework/web/multipart/MultipartHttpServletRequest.html#getFile(java.lang.String)">getFile</A></B>(java.lang.String name)</CODE>
<BR>
Return the contents plus description of an uploaded file in this request,
or null if it does not exist.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.util.Map</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/springframework/web/multipart/MultipartHttpServletRequest.html#getFileMap()">getFileMap</A></B>()</CODE>
<BR>
Return a Map of the multipart files contained in this request.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.util.Iterator</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/springframework/web/multipart/MultipartHttpServletRequest.html#getFileNames()">getFileNames</A></B>()</CODE>
<BR>
Return an Iterator of String objects containing the parameter names of the
multipart files contained in this request. </TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_javax.servlet.http.HttpServletRequest"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from interface javax.servlet.http.HttpServletRequest</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole</CODE></TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_javax.servlet.ServletRequest"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from interface javax.servlet.ServletRequest</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocale, getLocales, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="getFileNames()"><!-- --></A><H3>
getFileNames</H3>
<PRE>
public java.util.Iterator <B>getFileNames</B>()</PRE>
<DL>
<DD>Return an Iterator of String objects containing the parameter names of the
multipart files contained in this request. These are the field names of
the form (like with normal parameters), not the original file names.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the names of the files</DL>
</DD>
</DL>
<HR>
<A NAME="getFile(java.lang.String)"><!-- --></A><H3>
getFile</H3>
<PRE>
public <A HREF="../../../../org/springframework/web/multipart/MultipartFile.html" title="interface in org.springframework.web.multipart">MultipartFile</A> <B>getFile</B>(java.lang.String name)</PRE>
<DL>
<DD>Return the contents plus description of an uploaded file in this request,
or null if it does not exist.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - a String specifying the parameter name of the multipart file
<DT><B>Returns:</B><DD>the uploaded content in the form of a MultipartFile object</DL>
</DD>
</DL>
<HR>
<A NAME="getFileMap()"><!-- --></A><H3>
getFileMap</H3>
<PRE>
public java.util.Map <B>getFileMap</B>()</PRE>
<DL>
<DD>Return a Map of the multipart files contained in this request.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>a map containing the parameter names as keys, and the
MultipartFile objects as values<DT><B>See Also:</B><DD><A HREF="../../../../org/springframework/web/multipart/MultipartFile.html" title="interface in org.springframework.web.multipart"><CODE>MultipartFile</CODE></A></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/MultipartHttpServletRequest.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../org/springframework/web/multipart/MultipartFile.html" title="interface in org.springframework.web.multipart"><B>PREV CLASS</B></A>
<A HREF="../../../../org/springframework/web/multipart/MultipartResolver.html" title="interface in org.springframework.web.multipart"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A>
<A HREF="MultipartHttpServletRequest.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
<i>Copyright (C) 2003-2004 The Spring Framework Project.</i>
</BODY>
</HTML>
| {
"content_hash": "134a7b63fe6353d4c62183b52abc9a1b",
"timestamp": "",
"source": "github",
"line_count": 336,
"max_line_length": 445,
"avg_line_length": 45.63988095238095,
"alnum_prop": 0.6755787414411477,
"repo_name": "dachengxi/spring1.1.1_source",
"id": "7122820d284ff1812c06341731b4c5d4bb13c2bd",
"size": "15335",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "docs/api/org/springframework/web/multipart/MultipartHttpServletRequest.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "163"
},
{
"name": "FreeMarker",
"bytes": "8024"
},
{
"name": "HTML",
"bytes": "34675"
},
{
"name": "Java",
"bytes": "5934573"
}
],
"symlink_target": ""
} |
#ifndef SOUNDIO_DUMMY_HPP
#define SOUNDIO_DUMMY_HPP
#include "soundio_private.h"
#include "os.h"
#include "atomics.hpp"
#include "ring_buffer.hpp"
int soundio_dummy_init(struct SoundIoPrivate *si);
struct SoundIoDummy {
SoundIoOsMutex *mutex;
SoundIoOsCond *cond;
bool devices_emitted;
};
struct SoundIoDeviceDummy { };
struct SoundIoOutStreamDummy {
struct SoundIoOsThread *thread;
struct SoundIoOsCond *cond;
atomic_flag abort_flag;
double period_duration;
int buffer_frame_count;
int frames_left;
int write_frame_count;
struct SoundIoRingBuffer ring_buffer;
double playback_start_time;
atomic_flag clear_buffer_flag;
SoundIoChannelArea areas[SOUNDIO_MAX_CHANNELS];
};
struct SoundIoInStreamDummy {
struct SoundIoOsThread *thread;
struct SoundIoOsCond *cond;
atomic_flag abort_flag;
double period_duration;
int frames_left;
int read_frame_count;
int buffer_frame_count;
struct SoundIoRingBuffer ring_buffer;
SoundIoChannelArea areas[SOUNDIO_MAX_CHANNELS];
};
#endif
| {
"content_hash": "3eabd65813e825b8b349e6588c378b3f",
"timestamp": "",
"source": "github",
"line_count": 47,
"max_line_length": 51,
"avg_line_length": 22.74468085106383,
"alnum_prop": 0.7287184284377923,
"repo_name": "davidgranstrom/libsoundio",
"id": "4100a86b64b18ad417c51e1e306ecc173c93ed3b",
"size": "1215",
"binary": false,
"copies": "10",
"ref": "refs/heads/master",
"path": "src/dummy.hpp",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "57247"
},
{
"name": "C++",
"bytes": "459247"
},
{
"name": "CMake",
"bytes": "13236"
}
],
"symlink_target": ""
} |
/**
@module ember
*/
/**
Like `find`, but throws an error if the element selector returns no results.
Example:
```javascript
var $el = findWithAssert('.doesnt-exist'); // throws error
```
With the `context` param:
```javascript
var $el = findWithAssert('.selector-id', '.parent-element-class'); // assert will pass
```
@method findWithAssert
@param {String} selector jQuery selector string for finding an element within
the DOM
@param {String} [context] (optional) jQuery selector that will limit the
selector argument to find only within the context's children
@return {Object} jQuery object representing the results of the query
@throws {Error} throws error if jQuery object returned has a length of 0
@public
*/
export default function findWithAssert(app, selector, context) {
let $el = app.testHelpers.find(selector, context);
if ($el.length === 0) {
throw new Error('Element ' + selector + ' not found.');
}
return $el;
}
| {
"content_hash": "180a2ff65913f5aaa174cdf396bc4c5d",
"timestamp": "",
"source": "github",
"line_count": 34,
"max_line_length": 88,
"avg_line_length": 28.764705882352942,
"alnum_prop": 0.696319018404908,
"repo_name": "jasonmit/ember.js",
"id": "408f8e162bac0088e8e89c4ea3834e6791bee79c",
"size": "978",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "packages/ember-testing/lib/helpers/find_with_assert.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "HTML",
"bytes": "8228"
},
{
"name": "JavaScript",
"bytes": "3405320"
},
{
"name": "Ruby",
"bytes": "1848"
},
{
"name": "Shell",
"bytes": "3466"
},
{
"name": "TypeScript",
"bytes": "249784"
}
],
"symlink_target": ""
} |
class Camera
{
protected:
cameraData camData;
public:
Camera();
virtual ~Camera();
void init();
void tick(float dt);
void lookAt_Track(vec3* target, float distance);
void lookAt_Pan(vec3* target);
// Getters and Setters
cameraData* getCameraData() { return &camData; }
};
#endif // __CAMERA_H__
| {
"content_hash": "129c8c199c5de83da6cbdcb95879bb51",
"timestamp": "",
"source": "github",
"line_count": 20,
"max_line_length": 51,
"avg_line_length": 16.05,
"alnum_prop": 0.6573208722741433,
"repo_name": "NickPollard/Manta",
"id": "74fdb1031206d7d989b3963d0b91d0757c92f7ec",
"size": "364",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/camera.h",
"mode": "33261",
"license": "bsd-3-clause",
"language": [
{
"name": "C++",
"bytes": "91195"
}
],
"symlink_target": ""
} |
require 'data_mapper'
require 'dm-validations'
require "#{File.dirname(__FILE__)}/user"
require "#{File.dirname(__FILE__)}/weapon"
require "#{File.dirname(__FILE__)}/victim"
require "#{File.dirname(__FILE__)}/killer"
require "#{File.dirname(__FILE__)}/match"
DataMapper::Logger.new($stdout, :info)
DataMapper.setup(:default, "sqlite://#{File.dirname(__FILE__)}/quake_parks.db")
DataMapper.finalize
| {
"content_hash": "19e3682f36360d61c0c0ba714626e957",
"timestamp": "",
"source": "github",
"line_count": 14,
"max_line_length": 79,
"avg_line_length": 28.714285714285715,
"alnum_prop": 0.6865671641791045,
"repo_name": "RodrigoMNardi/quake_arena",
"id": "591aa2e06f3751b6e58ec029b9b88f7c0372d87e",
"size": "402",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "database/database.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "1629"
},
{
"name": "HTML",
"bytes": "13349"
},
{
"name": "Ruby",
"bytes": "39282"
}
],
"symlink_target": ""
} |
#include <aws/s3/model/Protocol.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace S3
{
namespace Model
{
namespace ProtocolMapper
{
static const int http_HASH = HashingUtils::HashString("http");
static const int https_HASH = HashingUtils::HashString("https");
Protocol GetProtocolForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == http_HASH)
{
return Protocol::http;
}
else if (hashCode == https_HASH)
{
return Protocol::https;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<Protocol>(hashCode);
}
return Protocol::NOT_SET;
}
Aws::String GetNameForProtocol(Protocol enumValue)
{
switch(enumValue)
{
case Protocol::http:
return "http";
case Protocol::https:
return "https";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return "";
}
}
} // namespace ProtocolMapper
} // namespace Model
} // namespace S3
} // namespace Aws
| {
"content_hash": "6c35880b402eb32fb3e5ba3227bbe1bf",
"timestamp": "",
"source": "github",
"line_count": 67,
"max_line_length": 92,
"avg_line_length": 25.686567164179106,
"alnum_prop": 0.5740848343986055,
"repo_name": "chiaming0914/awe-cpp-sdk",
"id": "86d269395c9742ea74d3b208bebb80433e81511d",
"size": "2294",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "aws-cpp-sdk-s3/source/model/Protocol.cpp",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "C",
"bytes": "2313"
},
{
"name": "C++",
"bytes": "98158533"
},
{
"name": "CMake",
"bytes": "437471"
},
{
"name": "HTML",
"bytes": "4471"
},
{
"name": "Java",
"bytes": "239297"
},
{
"name": "Python",
"bytes": "72827"
},
{
"name": "Shell",
"bytes": "2803"
}
],
"symlink_target": ""
} |
import './polyfills/objectAssign';
export { LogEventLevel } from './logEvent';
export { Logger } from './logger';
export { ConsoleSink } from './consoleSink';
export { BatchedSink } from './batchedSink';
export { DynamicLevelSwitch } from './dynamicLevelSwitch';
import { LoggerConfiguration } from './loggerConfiguration';
export declare function configure(): LoggerConfiguration;
export { LoggerConfiguration };
| {
"content_hash": "377c48603bd9704140e83c03439a86b4",
"timestamp": "",
"source": "github",
"line_count": 9,
"max_line_length": 60,
"avg_line_length": 47,
"alnum_prop": 0.7375886524822695,
"repo_name": "structured-log/structured-log",
"id": "5d43749303b389f4981a20ca82ed986a7c134863",
"size": "423",
"binary": false,
"copies": "1",
"ref": "refs/heads/dev",
"path": "dist/index.d.ts",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "JavaScript",
"bytes": "547"
},
{
"name": "TypeScript",
"bytes": "97175"
}
],
"symlink_target": ""
} |
Installs an iptables-based firewall for Linux.
Supports both IPv4 (`iptables`) and IPv6 (`ip6tables`).
This firewall aims for simplicity over complexity, and only opens a few specific ports for incoming traffic (configurable through Ansible variables).
If you have a rudimentary knowledge of `iptables` and/or firewalls in general, this role should be a good starting point for a secure system firewall.
After the role is run, a `firewall` init service will be available on the server.
You can use `service firewall [start|stop|restart|status]` to control the firewall.
## Requirements
None.
## Role Variables
Available variables are listed below, along with default values (see `defaults/main.yaml`):
firewall_state: started
firewall_enabled_at_boot: true
Controls the state of the firewall service; whether it should be running (`firewall_state`) and/or enabled on system boot (`firewall_enabled_at_boot`).
firewall_flush_rules_and_chains: true
Whether to flush all rules and chains whenever the firewall is restarted.
Set this to `false` if there are other processes managing iptables (e.g. Docker).
firewall_allowed_tcp_ports:
- "22"
- "80"
...
firewall_allowed_udp_ports: []
A list of TCP or UDP ports (respectively) to open to incoming traffic.
firewall_forwarded_tcp_ports:
- { src: "22", dest: "2222" }
- { src: "80", dest: "8080" }
firewall_forwarded_udp_ports: []
Forward `src` port to `dest` port, either TCP or UDP (respectively).
firewall_additional_rules: []
firewall_ip6_additional_rules: []
Any additional (custom) rules to be added to the firewall (in the same format you would add them via command line, e.g. `iptables [rule]`/`ip6tables [rule]`).
A few examples of how this could be used:
# Allow only the IP 167.89.89.18 to access port 4949 (Munin).
firewall_additional_rules:
- "iptables -A INPUT -p tcp --dport 4949 -s 167.89.89.18 -j ACCEPT"
# Allow only the IP 214.192.48.21 to access port 3306 (MySQL).
firewall_additional_rules:
- "iptables -A INPUT -p tcp --dport 3306 -s 214.192.48.21 -j ACCEPT"
See [Iptables Essentials: Common Firewall Rules and Commands](https://www.digitalocean.com/community/tutorials/iptables-essentials-common-firewall-rules-and-commands) for more examples.
firewall_log_dropped_packets: true
Whether to log dropped packets to syslog (messages will be prefixed with "Dropped by firewall: ").
firewall_disable_firewalld: false
firewall_disable_ufw: false
Set to `true` to disable firewalld (installed by default on RHEL/CentOS) or ufw (installed by default on Ubuntu), respectively.
firewall_enable_ipv6: true
Set to `false` to disable configuration of ip6tables (for example, if your `GRUB_CMDLINE_LINUX` contains `ipv6.disable=1`).
## Dependencies
None.
## Example Playbook
- hosts: server
vars_files:
- vars/main.yaml
roles:
- { role: setup-firewall }
*Inside `vars/main.yaml`*:
firewall_allowed_tcp_ports:
- "22"
- "25"
- "80"
## TODO
- Make outgoing ports more configurable.
- Make other firewall features (like logging) configurable.
## License
MIT / BSD
## Author Information
This role was created in 2014 by [Jeff Geerling](https://www.jeffgeerling.com/), author of [Ansible for DevOps](https://www.ansiblefordevops.com/).
| {
"content_hash": "8e20a3b338bc4222be0ce95f4ffe87c3",
"timestamp": "",
"source": "github",
"line_count": 102,
"max_line_length": 185,
"avg_line_length": 33.245098039215684,
"alnum_prop": 0.712179298142141,
"repo_name": "DBrianKimmel/PyHouse-ansible",
"id": "818e95dc6bd4aa0d9129978a62c9fb214969aeae",
"size": "3434",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "roles/setup_firewall/README.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "JavaScript",
"bytes": "11154"
},
{
"name": "Ruby",
"bytes": "879"
},
{
"name": "Shell",
"bytes": "19483"
}
],
"symlink_target": ""
} |
<!DOCTYPE html>
<html>
<?php
require('side_menu.html');
?>
</section>
<!-- /.sidebar -->
</aside>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
Lab Patient's Record
<small>Cash Sheet of the Patient</small>
</h1>
<ol class="breadcrumb">
<li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
<li class="active">Dashboard</li>
</ol>
</section>
<!-- Main content -->
<section class="content">
<!-- Small boxes (Stat box) -->
<div class="row">
<div class="box box-primary">
<!-- form start -->
<?php
if(isset($suc)&&!empty($suc)){
?><div class="alert alert-success alert-dismissable">
<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
<strong>Success!  </strong> Information Added Successfully.
</div><?php
}?>
<div class="box-body">
<center>
<!--<h4 style="color:blue">If New Patient..</h4>
<input type="radio" name="group1" value="Click" onClick="JavaScript:radio_input('lab_component')">-->
<h4 style="color:blue">If Referred Patient...</h4>
<input type="radio" name="group1" value="off" onClick="JavaScript:radio_input('lab_components')">
<!-- <h4 style="color:blue">Lab Technician...</h4>
<input type="radio" name="group1" value="off" onClick="JavaScript:radio_input('lab_component1')">-->
</center>
</div><!-- /.box-body -->
</div><!-- /.box -->
</div>
</section><!-- /.content -->
</div><!-- /.content-wrapper
<footer class="main-footer">
<div class="pull-right hidden-xs">
<b>Version</b> 2.3.0
</div>
<strong>Copyright © 2017 .</strong> All rights reserved.
</footer>-->
<!-- Add the sidebar's background. This div must be placed
immediately after the control sidebar -->
</div><!-- ./wrapper -->
<!-- jQuery 2.1.4 -->
<script src="<?php echo base_url();?>plugins/jQuery/jQuery-2.1.4.min.js"></script>
<!-- jQuery UI 1.11.4 -->
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-3-typeahead/4.0.2/bootstrap3-typeahead.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" />
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-multiselect/0.9.13/js/bootstrap-multiselect.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-multiselect/0.9.13/css/bootstrap-multiselect.css" />-->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" />
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.15/css/dataTables.bootstrap.min.css" />
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.3.1/css/buttons.dataTables.min.css" />
<script type="text/javascript" src="https://cdn.datatables.net/1.10.15/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/1.10.15/js/dataTables.bootstrap.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/buttons/1.3.1/js/dataTables.buttons.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.print.min.js"></script>
<script src="https://code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script>
<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
<script>
$(document).ready(function(){
$("#id").keyup(function(){
var m=$(this).val();
$.ajax({
type: "POST",
url: "<?php echo site_url('Add_details/search_lab_pat');?>",
data:{
keyword:m
},
success: function(data){
$("#suggesstion-box").show();
$("#suggesstion-box").html(data);
$("#id").css("background","#FFF");
}
});
});
});
function selectDrug(val) {
$("#id").val(val);
$("#suggesstion-box").hide();
}
/***************/
$(document).ready(function (){
$.ajax({
type: 'post',
url: "<?php echo site_url('Fetch/notification');?>",
success: function (response) {
$( '#notification_count').html(response);
if(response=="OK")
{
return true;
}
else
{
return false;
}
}
});
});
$(document).ready(function (){
var phc = $('#21').val();
$.ajax({
type: 'post',
url: "<?php echo site_url('Fetch/notification1');?>",
data:{
p:phc,
},
success: function (response) {
$( '#notification_count1').html(response);
if(response=="OK")
{
return true;
}
else
{
return false;
}
}
});
});
function radio_input(url)
{
// Re-direct the browser to the url value
window.location.href = url
}
</script>
<!-- Bootstrap 3.3.5-->
<script src="<?php echo base_url();?>bootstrap/js/bootstrap.min.js"></script>
<!-- Morris.js charts -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
<!--<script src="<?php echo base_url();?>plugins/morris/morris.min.js"></script>-->
<!-- Sparkline -->
<script src="<?php echo base_url();?>plugins/sparkline/jquery.sparkline.min.js"></script>
<!-- jvectormap -->
<script src="<?php echo base_url();?>plugins/jvectormap/jquery-jvectormap-1.2.2.min.js"></script>
<script src="<?php echo base_url();?>plugins/jvectormap/jquery-jvectormap-world-mill-en.js"></script>
<!-- jQuery Knob Chart -->
<script src="<?php echo base_url();?>plugins/knob/jquery.knob.js"></script>
<!-- daterangepicker -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.2/moment.min.js"></script>
<script src="<?php echo base_url();?>plugins/daterangepicker/daterangepicker.js"></script>
<!-- datepicker -->
<script src="<?php echo base_url();?>plugins/datepicker/bootstrap-datepicker.js"></script>
<!-- Bootstrap WYSIHTML5 -->
<script src="<?php echo base_url();?>plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js"></script>
<!-- Slimscroll -->
<script src="<?php echo base_url();?>plugins/slimScroll/jquery.slimscroll.min.js"></script>
<!-- FastClick -->
<script src="<?php echo base_url();?>plugins/fastclick/fastclick.min.js"></script>
<!-- AdminLTE App -->
<script src="<?php echo base_url();?>dist/js/app.min.js"></script>
<!-- AdminLTE dashboard demo (This is only for demo purposes) -->
<!--<script src="<?php echo base_url();?>dist/js/pages/dashboard.js"></script>-->
<!-- AdminLTE for demo purposes -->
<script src="<?php echo base_url();?>dist/js/demo.js"></script>
<style>
.frmSearch {border: 1px solid #a8d4b1;background-color:#A2C6D7;margin: 2px 0px;padding:5px;border-radius:4px;}
#search-list{float:left;list-style:none;margin-top:-3px;padding:0;position: absolute;}
#search-list li{padding: 10px; background: white; border-bottom: #bbb9b9 1px solid;}
#search-list li:hover{background:YELLOW;cursor: pointer;}
#search-box{padding: 10px;border: #a8d4b1 1px solid;border-radius:4px;}
</style>
</body>
</html>
| {
"content_hash": "3d5e4e18e3b006727682349cb7222e7b",
"timestamp": "",
"source": "github",
"line_count": 207,
"max_line_length": 140,
"avg_line_length": 38.009661835748794,
"alnum_prop": 0.5718098627351297,
"repo_name": "punithsr27/PHC",
"id": "7a2eebbab85bd8b09116564978332ae0b5b645a4",
"size": "7869",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "application/views/new/choice.php",
"mode": "33261",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "392846"
},
{
"name": "HTML",
"bytes": "11742758"
},
{
"name": "JavaScript",
"bytes": "2295710"
},
{
"name": "PHP",
"bytes": "3060515"
},
{
"name": "Perl",
"bytes": "3327"
},
{
"name": "Shell",
"bytes": "15521"
}
],
"symlink_target": ""
} |
ACCEPTED
#### According to
Index Fungorum
#### Published in
null
#### Original name
Humaria peckii House
### Remarks
null | {
"content_hash": "7aa4ed591e23317d12b249f94f497575",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 20,
"avg_line_length": 9.615384615384615,
"alnum_prop": 0.704,
"repo_name": "mdoering/backbone",
"id": "cd07b4b171e3bfd35d3a1ed8f48ef14fdc8c4030",
"size": "179",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "life/Fungi/Ascomycota/Pezizomycetes/Pezizales/Pyronemataceae/Leucoloma/Leucoloma peckii/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
if [ "$#" -ne 2 ]; then
echo "Distributed and decentralized workflow execution test using the HyperFlow REST API."
echo
echo "Usage:"
echo "1. Run the 1st HyperFlow server: hflow start-server ( -> runs on port1)"
echo "2. Run the 2nd HyperFlow server: hflow start-server ( -> runs on port2)"
echo "3. Then run this script:"
echo " cd examples/DistributedPingPong"
echo " ./run.sh <port1> <port2>"
exit
fi
# URIs:
# {appfactory1} http://localhost:{port1}/apps
# {appfactory2} http://localhost:{port2}/apps
# {app1} http://localhost:{port1}/apps/{appId1}
# {app2} http://localhost:{port2}/apps/{appId2}
# REST-based protocol is as follows ('<...>' denotes the content of a message body):
# 1) POST {appfactory1} <Wf_RemotePing.json> ==> create Pinger instance, returns URI {app1}.
# 2) POST {appfactory2} <Wf_RemotePong.json> ==> create Ponger instance, returns URI {app2}.
# 3) PUT {app1}/sigs/Pong/remotesinks <{app2}> ==> connects signal "Pong" from app1 to app2.
# 4) PUT {app2}/sigs/Ping/remotesinks <{app1}> ==> connects signal "Ping" from app2 to app1.
# 5) POST {app1} <signal data> ==> sends the initial signal to Pinger to start the Ping-Pong.
appfact1="http://localhost:$1/apps"
appfact2="http://localhost:$2/apps"
echo $appfact1
echo $appfact2
# 1)
#path1="$HFLOW_PATH/examples/DistributedPingPong/Wf_RemotePing.json"
path1="./Wf_RemotePing.json"
echo $path1
app1=`curl -v -X POST -d @$path1 $appfact1 --header "Content-Type:application/json" 2>&1 | grep Location | cut -f 3 -d' '`
app1uri="http://localhost:$1"$app1
# 2)
#path2="$HFLOW_PATH/examples/DistributedPingPong/Wf_RemotePong.json"
path2="./Wf_RemotePong.json"
app2=`curl -v -X POST -d @$path2 $appfact2 --header "Content-Type:application/json" 2>&1 | grep Location | cut -f 3 -d' '`
app2uri="http://localhost:$2"$app2
# 3)
curl -v -X PUT -d "[{ \"uri\": \"$app2uri\" }]" $app1uri/sigs/Pong/remotesinks --header "Content-Type:application/json"
# 4)
curl -v -X PUT -d "[{ \"uri\": \"$app1uri\" }]" $app2uri/sigs/Ping/remotesinks --header "Content-Type:application/json"
# 5)
curl -X POST -d '{ "name": "Ping", "data": [0] }' $app1uri --header "Content-Type:application/json"
| {
"content_hash": "6dbced666c07ac8fc2c4303dc341c645",
"timestamp": "",
"source": "github",
"line_count": 51,
"max_line_length": 122,
"avg_line_length": 43.23529411764706,
"alnum_prop": 0.6716553287981859,
"repo_name": "dice-cyfronet/hyperflow",
"id": "4e94e5405600005cef20e11c1e7e9b2f369e0ba4",
"size": "2216",
"binary": false,
"copies": "1",
"ref": "refs/heads/develop",
"path": "examples/DistributedPingPong/run.sh",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "6664"
},
{
"name": "HTML",
"bytes": "9972"
},
{
"name": "JavaScript",
"bytes": "276405"
},
{
"name": "Shell",
"bytes": "1061"
}
],
"symlink_target": ""
} |
using namespace SpaceLabyrinthDX12;
ApplicationDX12DeviceResources::ApplicationDX12DeviceResources(const std::shared_ptr<DX::DeviceResources>& deviceResources) :
m_deviceResources(deviceResources)
{
}
| {
"content_hash": "0e1cc697f9e5e952842247d3cc038cd8",
"timestamp": "",
"source": "github",
"line_count": 6,
"max_line_length": 125,
"avg_line_length": 33.833333333333336,
"alnum_prop": 0.8472906403940886,
"repo_name": "ThomasBates/Turbo2",
"id": "fc157eff5d8c71ba61b6e8f0fd04d9289ed4c9df",
"size": "266",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Turbo2 Game Studio/Library/ApplicationDX12/ApplicationDX12DeviceResources.cpp",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ASP",
"bytes": "107"
},
{
"name": "C",
"bytes": "129"
},
{
"name": "C#",
"bytes": "206888"
},
{
"name": "C++",
"bytes": "349228"
},
{
"name": "CSS",
"bytes": "13188"
},
{
"name": "HLSL",
"bytes": "1183"
},
{
"name": "JavaScript",
"bytes": "281"
},
{
"name": "Makefile",
"bytes": "5541"
}
],
"symlink_target": ""
} |
"use strict";
/**
* @fileOverview Provides a parser for IMAP line based commands
* @author Andris Reinman
*/
var Stream = require("stream").Stream,
utillib = require("util");
// expose to the world
module.exports = IMAPLineParser;
/**
* Creates a reusable parser for parsing. It is a writable stream for piping
* data directly in.
*
* @constructor
*/
function IMAPLineParser(){
Stream.call(this);
this.writable = true;
this._init();
}
utillib.inherits(IMAPLineParser, Stream);
/**
* Possible states the parser can be in (Finite State Machine)
*/
IMAPLineParser.prototype.states = {
DEFAULT: 0x1,
ATOM: 0x2,
QUOTED: 0x3
};
/**
* Possible types for data nodes
*/
IMAPLineParser.prototype.types = {
STRING: 0x1, // regular string, default
GROUP: 0x2, // parentheses group (a b c)
PARAMS: 0x3, // value params BODY[PARAM1 PARAM2]
PARTIAL: 0x4, // Partial length indicator BODY[]<from.to>
LITERAL: 0x5 // {123} literal string
};
// PUBLIC METHODS
/**
* Appends a chunk for parsing
*
* @param {Buffer|String} chunk Data to be appended to the parse string
* @return {Boolean} Always returns true
*/
IMAPLineParser.prototype.write = function(chunk){
chunk = (chunk || "").toString("binary");
this._currentLine += chunk;
this._parseLine(chunk);
return true;
};
/**
* If a literal occurs ({123}\r\n) do not parse it, since the length is known.
* Just add it separately and it will included as the node value instead of
* length property.
*
* @param {Buffer|String} chunk Data to be appended to the literal string value
*/
IMAPLineParser.prototype.writeLiteral = function(chunk){
if(!this.currentNode.value){
this.currentNode.value = "";
}
if(this.currentNode.type != this.types.LITERAL){
//this.currentNode.literal = this.currentNode.value;
this.currentNode.value = "";
//this.currentNode.type = this.types.LITERAL;
}
this.currentNode.value += (chunk || "").toString("binary");
};
/**
* Finishes current parsing and reesets internal variables. Emits 'line' event
* with the parsed data
*
* @param {Buffer|String} chunk Data to be appended to the parse string
*/
IMAPLineParser.prototype.end = function(chunk){
if(chunk && chunk.length){
this.write(chunk);
}
if(this.currentNode.value){
if(this._state == this.states.ATOM || this._state==this.states.QUOTED){
if(this._state == this.states.ATOM && this.currentNode.value == "NIL"){
this.currentNode.value = null;
}
this._branch.childNodes.push(this.currentNode);
}
}
setImmediate(this.emit.bind(this, "log", this._currentLine));
setImmediate(this.emit.bind(this, "line", this.finalize()));
this._init();
};
/**
* Generates a structured object with the data currently known. Useful if you
* need to check parse status in the middle of the process
*
* @return {Array} Parsed data
*/
IMAPLineParser.prototype.finalize = function(){
var tree = [];
this._nodeWalker(this._parseTree.childNodes, tree);
return tree;
};
// PRIVATE METHODS
/**
* Resets all internal variables and creates a new parse tree
*/
IMAPLineParser.prototype._init = function(){
/**
* Current state the parser is in
* @private
*/
this._state = this.states.DEFAULT;
/**
* Which quote symbol is used for current quoted string
* @private
*/
this._quoteMark = '';
/**
* Is the current character escaped by \
* @private
*/
this._escapedChar = false;
/**
* Parse tree to hold the parsed data structure
* @private
*/
this._parseTree = {
childNodes: []
};
/**
* Active branch, by default it's the tree itselt
* @private
*/
this._branch = this._parseTree;
/**
* Hold the original line data
* @private
*/
this._currentLine = "";
/**
* Starting node
* @private
*/
this.currentNode = {
parentNode: this._branch,
value: "",
childNodes: []
};
};
/**
* Parses the data currently known, continues from the previous state.
* This is a token based parser. Special characters are space, backslash,
* quotes, (), [] and <>. After every character the parseTree is updated.
*
* @param {String} line Data to be parsed
*/
IMAPLineParser.prototype._parseLine = function(line){
// LIST and XLIST compatible with the last spec
if( ( line.indexOf('* LIST') === 0 || line.indexOf('* LSUB') === 0 ) && line[ line.length - 1 ] !== '"' ){
line = line.split(' ');
line[ line.length - 1 ] = '"' + line[ line.length - 1 ] + '"';
line = line.join(' ');
// METADATA spec
}else if( line.indexOf('* METADATA') === 0 ){
line = line.split(' ');
if( line[ 2 ][ 0 ] !== '"' ){
line[ 2 ] = '"' + line[ 2 ] + '"';
}
line = line.join(' ');
}
var i=0, curchar;
while(i < line.length){
curchar = line.charAt(i);
// Check all characters one by one
switch(curchar){
// Handle whitespace
case " ":
case "\t":
if(this._state == this.states.QUOTED){
this.currentNode.value += curchar;
}else if(this._state == this.states.ATOM && this._escapedChar){
this.currentNode.value += curchar;
}else if(this._state == this.states.ATOM){
this._addToBranch();
this._state = this.states.DEFAULT;
this._createNode();
}
break;
// Backspace is for escaping in quoted strings
case '\\':
if(this._escapedChar || this._state == this.states.ATOM){
this.currentNode.value += curchar;
}else if(this._state == this.states.QUOTED){
if( line.charAt(i+1) === this._quoteMark || this._state == this.states.QUOTED){
this._escapedChar = true;
// This is a modified copy the default case
}else if(this._state == this.states.ATOM){
this.currentNode.value += curchar;
this.currentNode.value += line.charAt(++i);
}
}else if(this._state == this.states.DEFAULT){
this._state = this.states.ATOM;
this._createNode(curchar);
}
break;
// Handle quotes, remember the quote type to allow other unescaped quotes
case '"':
case "'":
if(this._escapedChar || (this._state == this.states.QUOTED && this._quoteMark != curchar)){
this.currentNode.value += curchar;
}else if(this._state == this.states.DEFAULT){
this._quoteMark = curchar;
this._state = this.states.QUOTED;
this._createNode();
}else if(this._state == this.states.QUOTED){
this._addToBranch();
this._state = this.states.DEFAULT;
this._createNode();
}else if(this._state == this.states.ATOM ){
if( i === 0 || [ ' ', '\t', '"', "'", '[', '(', '<' ].indexOf( line.charAt(i-1) ) > -1 ){
this._addToBranch();
this._quoteMark = curchar;
this._state = this.states.QUOTED;
this._createNode();
// This is a modified copy the default case
}else if(this._state == this.states.ATOM || this._state == this.states.QUOTED){
this.currentNode.value += curchar;
}
}
break;
// Handle different group types
case "[":
case "(":
case "<":
if(this._escapedChar || this._state==this.states.QUOTED){
this.currentNode.value += curchar;
break;
}
if(this._state == this.states.ATOM){
this._addToBranch();
}
// () gets a separate node, [] uses last node as parent
if(this._state == this.states.ATOM && curchar == "["){
this._branch = this._branch.lastNode || this._parseTree;
this._branch.type = this.types.PARAMS;
if(!this._branch.childNodes){
this._branch.childNodes = [];
}
}else{
// create new empty node
this._createNode(false);
switch(curchar){
case "(":
this.currentNode.type = this.types.GROUP;
break;
case "<":
this.currentNode.type = this.types.PARTIAL;
break;
case "[":
this.currentNode.type = this.types.PARAMS;
break;
}
this._addToBranch();
this._branch = this.currentNode || this._parseTree;
if(!this._branch.childNodes){
this._branch.childNodes = [];
}
}
this._state = this.states.DEFAULT;
this._createNode();
break;
case "]":
case ")":
case ">":
if(this._escapedChar || this._state==this.states.QUOTED){
this.currentNode.value += curchar;
break;
}
if(this._state == this.states.ATOM){
this._addToBranch();
}
this._state = this.states.DEFAULT;
this._branch = this._branch.parentNode || this._branch;
if(!this._branch.childNodes){
this._branch.childNodes = [];
}
this._createNode();
break;
// Add to existing string or create a new atom
default:
if(this._state == this.states.ATOM || this._state == this.states.QUOTED){
this.currentNode.value += curchar;
}else{
this._state = this.states.ATOM;
this._createNode(curchar);
}
}
// cancel escape if it didn't happen
if(this._escapedChar && curchar != "\\"){
this._escapedChar = false;
}
i++;
}
};
/**
* Pushes current node to the active branch
*/
IMAPLineParser.prototype._addToBranch = function(){
if(this._state == this.states.ATOM && this.currentNode.value == "NIL"){
this.currentNode.value = null;
}
this._branch.childNodes.push(this.currentNode);
this._branch.lastNode = this.currentNode;
};
/**
* Creates a new empty node
*
* @param {String} [defaultValue] If specified will be used as node.value value
*/
IMAPLineParser.prototype._createNode = function(defaultValue){
this.lastNode = this.currentNode;
this.currentNode = {};
if(defaultValue !== false){
this.currentNode.value = defaultValue || "";
}
this.currentNode.parentNode = this._branch;
};
/**
* Recursive function to walk the parseTree and generate structured output object
*
* @param {Array} branch Current branch to check
* @param {Array} local Output object node to append the data to
*/
IMAPLineParser.prototype._nodeWalker = function(branch, local){
var node, i, len, curnode, prevpos, literalLength;
for(i=0, len = branch.length; i<len; i++){
node = branch[i];
if((typeof node.value == "string" || node.value === null) && !node.type){
local.push(node.value);
}else if(node.type == this.types.LITERAL){
literalLength = node.literal.match(/\{(\d+)\}/);
literalLength = literalLength && Number(literalLength[1]) || 0;
curnode = {
literal: literalLength,
value: node.value
};
local.push(curnode);
}else if(node.type == this.types.PARTIAL){
prevpos = local.length - 1;
if(prevpos<0){
curnode = {};
}else{
curnode = local[prevpos];
if(typeof curnode != "object" || Array.isArray(curnode)){
curnode = {
value: curnode
};
}
}
local.splice(prevpos, 1, curnode);
curnode.partial = [];
if(node.childNodes.length == 1 && typeof node.childNodes[0].value == "string"){
curnode.partial = node.childNodes[0].value.split(".").map(Number);
}else{
this._nodeWalker(node.childNodes, curnode.partial);
}
}else if(node.type == this.types.PARAMS){
if(!node.childNodes.length){
local.push(node.value);
}else{
curnode = {};
if(typeof node.value != "undefined"){
curnode.value = node.value;
}
local.push(curnode);
curnode.params = [];
this._nodeWalker(node.childNodes, curnode.params);
}
}else if(node.type == this.types.GROUP){
curnode = [];
local.push(curnode);
this._nodeWalker(node.childNodes, curnode);
}
}
};
| {
"content_hash": "73d45e31ce9ce01b0fe31eed9c5c8fb1",
"timestamp": "",
"source": "github",
"line_count": 463,
"max_line_length": 110,
"avg_line_length": 30.138228941684666,
"alnum_prop": 0.5093879891070661,
"repo_name": "javiergarmon/inbox",
"id": "7a9ca7dcf2b32cfb529849094563d90f2d22aa62",
"size": "13956",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "lib/lineparser.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "JavaScript",
"bytes": "139683"
}
],
"symlink_target": ""
} |
/**************************************************//**
@file include/pars0opt.h
Simple SQL optimizer
Created 12/21/1997 Heikki Tuuri
*******************************************************/
#ifndef pars0opt_h
#define pars0opt_h
#include "univ.i"
#include "que0types.h"
#include "usr0types.h"
#include "pars0sym.h"
#include "dict0types.h"
#include "row0sel.h"
/*******************************************************************//**
Optimizes a select. Decides which indexes to tables to use. The tables
are accessed in the order that they were written to the FROM part in the
select statement. */
UNIV_INTERN
void
opt_search_plan(
/*============*/
sel_node_t* sel_node); /*!< in: parsed select node */
/*******************************************************************//**
Looks for occurrences of the columns of the table in the query subgraph and
adds them to the list of columns if an occurrence of the same column does not
already exist in the list. If the column is already in the list, puts a value
indirection to point to the occurrence in the column list, except if the
column occurrence we are looking at is in the column list, in which case
nothing is done. */
UNIV_INTERN
void
opt_find_all_cols(
/*==============*/
ibool copy_val, /*!< in: if TRUE, new found columns are
added as columns to copy */
dict_index_t* index, /*!< in: index to use */
sym_node_list_t* col_list, /*!< in: base node of a list where
to add new found columns */
plan_t* plan, /*!< in: plan or NULL */
que_node_t* exp); /*!< in: expression or condition */
/********************************************************************//**
Prints info of a query plan. */
UNIV_INTERN
void
opt_print_query_plan(
/*=================*/
sel_node_t* sel_node); /*!< in: select node */
#ifndef UNIV_NONINL
#include "pars0opt.ic"
#endif
#endif
| {
"content_hash": "e7324be8f93e415c73e9a9fbfa061011",
"timestamp": "",
"source": "github",
"line_count": 59,
"max_line_length": 77,
"avg_line_length": 31.23728813559322,
"alnum_prop": 0.5670103092783505,
"repo_name": "jonzobrist/Percona-Server-5.1",
"id": "42d956068f8f938f72ea76d05ecdc55c8f3d6438",
"size": "2690",
"binary": false,
"copies": "40",
"ref": "refs/heads/master",
"path": "Percona-Server/storage/innodb_plugin/include/pars0opt.h",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "Assembly",
"bytes": "63359"
},
{
"name": "C",
"bytes": "21629542"
},
{
"name": "C#",
"bytes": "186518"
},
{
"name": "C++",
"bytes": "26608206"
},
{
"name": "JavaScript",
"bytes": "34135"
},
{
"name": "Objective-C",
"bytes": "73098"
},
{
"name": "Perl",
"bytes": "2396066"
},
{
"name": "Puppet",
"bytes": "447114"
},
{
"name": "Python",
"bytes": "1181762"
},
{
"name": "R",
"bytes": "34454"
},
{
"name": "Racket",
"bytes": "2416"
},
{
"name": "Scilab",
"bytes": "7740"
},
{
"name": "Shell",
"bytes": "1287942"
}
],
"symlink_target": ""
} |
using Demic.Enums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Demic.Classes
{
class MedicPlayer : Player
{
public override PlayerRole Role
{
get { return PlayerRole.MEDIC; }
}
public MedicPlayer()
{
}
}
}
| {
"content_hash": "28ee2cf40ea4f6c36f2cdda63013e540",
"timestamp": "",
"source": "github",
"line_count": 22,
"max_line_length": 44,
"avg_line_length": 16.545454545454547,
"alnum_prop": 0.6098901098901099,
"repo_name": "BeastNaylor/Demic",
"id": "7fa51a3852c03e122abf47499fd31321b3a938ee",
"size": "366",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Demic/Classes/MedicPlayer.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "43520"
}
],
"symlink_target": ""
} |
#if !defined(FINALFART_H)
/*
TODO(ornitorrincco): Services that the platform layer provides to the game
*/
/*
Note(ornitorrincco): Services that the game provides to the platform layer.
(Thus may expand in the future - spund on separate thread, etc.)
*/
// FOUR THINGS - timing, controller/keyboard input, bitmap buffer yo use, sound buffer to use
struct game_offscreen_buffer{
//NOTE(ornitorrincco): Pixels are always 32-bits wide, Memory Order BB GG RR XX
void *Memory;
int Width;
int Height;
int Pitch;
};
struct game_sound_output_buffer{
int SamplesPerSecond;
int SampleCount;
int16 *Samples;
};
internal void
GameUpdateAndRender(game_offscreen_buffer *Buffer, int BlueOffset, int GreenOffset,
game_sound_output_buffer *SoundBuffer);
#define FINALFART_H
#endif | {
"content_hash": "e72c96f87e3afaf3c6cdcc33a4483c6f",
"timestamp": "",
"source": "github",
"line_count": 31,
"max_line_length": 93,
"avg_line_length": 26.548387096774192,
"alnum_prop": 0.7193195625759417,
"repo_name": "ornitorrincco/graphics",
"id": "6be5f5b17083697cd4fa6e921a800ec1c7cfd6ec",
"size": "823",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "win32_api/example11.5/finalfart.h",
"mode": "33188",
"license": "bsd-2-clause",
"language": [
{
"name": "C",
"bytes": "30016"
},
{
"name": "C++",
"bytes": "170184"
},
{
"name": "Python",
"bytes": "3341"
}
],
"symlink_target": ""
} |
<?php
/**
* Webservice XmlRpc adapter
*
* @category Mage
* @package Mage_Api
* @author Magento Core Team <[email protected]>
*/
class Mage_Api_Model_Server_Adapter_Xmlrpc
extends Varien_Object
implements Mage_Api_Model_Server_Adapter_Interface
{
/**
* XmlRpc Server
*
* @var Zend_XmlRpc_Server
*/
protected $_xmlRpc = null;
/**
* Set handler class name for webservice
*
* @param string $handler
* @return Mage_Api_Model_Server_Adapter_Xmlrpc
*/
public function setHandler($handler)
{
$this->setData('handler', $handler);
return $this;
}
/**
* Retrive handler class name for webservice
*
* @return string
*/
public function getHandler()
{
return $this->getData('handler');
}
/**
* Set webservice api controller
*
* @param Mage_Api_Controller_Action $controller
* @return Mage_Api_Model_Server_Adapter_Xmlrpc
*/
public function setController(Mage_Api_Controller_Action $controller)
{
$this->setData('controller', $controller);
return $this;
}
/**
* Retrive webservice api controller. If no controller have been set - emulate it by the use of Varien_Object
*
* @return Mage_Api_Controller_Action|Varien_Object
*/
public function getController()
{
$controller = $this->getData('controller');
if (null === $controller) {
$controller = new Varien_Object(
array('request' => Mage::app()->getRequest(), 'response' => Mage::app()->getResponse())
);
$this->setData('controller', $controller);
}
return $controller;
}
/**
* Run webservice
*
* @return Mage_Api_Model_Server_Adapter_Xmlrpc
*/
public function run()
{
$apiConfigCharset = Mage::getStoreConfig("api/config/charset");
$this->_xmlRpc = new Zend_XmlRpc_Server();
$this->_xmlRpc->setEncoding($apiConfigCharset)
->setClass($this->getHandler());
$this->getController()->getResponse()
->clearHeaders()
->setHeader('Content-Type','text/xml; charset='.$apiConfigCharset)
->setBody($this->_xmlRpc->handle());
return $this;
}
/**
* Dispatch webservice fault
*
* @param int $code
* @param string $message
*/
public function fault($code, $message)
{
throw new Zend_XmlRpc_Server_Exception($message, $code);
}
} // Class Mage_Api_Model_Server_Adapter_Xmlrpc End
| {
"content_hash": "68229b5e96ad14467cf51397b8213ab9",
"timestamp": "",
"source": "github",
"line_count": 104,
"max_line_length": 113,
"avg_line_length": 26.278846153846153,
"alnum_prop": 0.5550676911818514,
"repo_name": "almadaocta/lordbike-production",
"id": "6a5c158888a0c6bd7aa6fafff86da2f567c62fc4",
"size": "3708",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "errors/includes/src/Mage_Api_Model_Server_Adapter_Xmlrpc.php",
"mode": "33261",
"license": "mit",
"language": [
{
"name": "ActionScript",
"bytes": "20744"
},
{
"name": "ApacheConf",
"bytes": "6510"
},
{
"name": "Batchfile",
"bytes": "1053"
},
{
"name": "C",
"bytes": "25531"
},
{
"name": "CSS",
"bytes": "2695575"
},
{
"name": "HTML",
"bytes": "7607119"
},
{
"name": "JavaScript",
"bytes": "4942446"
},
{
"name": "Makefile",
"bytes": "266"
},
{
"name": "PHP",
"bytes": "111927807"
},
{
"name": "Perl",
"bytes": "1124"
},
{
"name": "PowerShell",
"bytes": "1042"
},
{
"name": "Roff",
"bytes": "1009"
},
{
"name": "Ruby",
"bytes": "298"
},
{
"name": "Shell",
"bytes": "2118"
},
{
"name": "XSLT",
"bytes": "2135"
}
],
"symlink_target": ""
} |
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.adobe.myconference.app.MainActivity" >
<item android:id="@+id/action_settings"
android:title="@string/action_settings"
android:orderInCategory="100"
app:showAsAction="never" />
</menu>
| {
"content_hash": "ff17fe8eefd69289c78ad79c71d26537",
"timestamp": "",
"source": "github",
"line_count": 9,
"max_line_length": 64,
"avg_line_length": 45.333333333333336,
"alnum_prop": 0.6911764705882353,
"repo_name": "arumsey/android-managed-content",
"id": "b4320e2db7a7e501550113562093ebe0e484eae2",
"size": "408",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "platforms/android/conference-app-aem/res/menu/main.xml",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "198890"
},
{
"name": "C#",
"bytes": "101013"
},
{
"name": "C++",
"bytes": "53100"
},
{
"name": "CSS",
"bytes": "13765"
},
{
"name": "Erlang",
"bytes": "326"
},
{
"name": "HTML",
"bytes": "13019"
},
{
"name": "Java",
"bytes": "445061"
},
{
"name": "JavaScript",
"bytes": "490464"
},
{
"name": "Objective-C",
"bytes": "209684"
},
{
"name": "Shell",
"bytes": "568"
}
],
"symlink_target": ""
} |
<!DOCTYPE html>
<html>
<head>
<title>500 Error</title>
<link type="text/css" rel="stylesheet" href="/stylesheets/main.css" />
</head>
<body>
<div id="error">
<p>500 Error: We're sorry, a server error has occurred.</br>
Return to the <a href="/">main page</a>.</p>
</div>
<div id="footer">
<p><a href="/about">About</a></br>
persistent-cal is managed by Danny Hermes.</br>
Please contact [email protected] for any questions.</p>
</div>
</body>
</html>
| {
"content_hash": "301f784662a5663a5e43e9d352a5ce37",
"timestamp": "",
"source": "github",
"line_count": 18,
"max_line_length": 74,
"avg_line_length": 29,
"alnum_prop": 0.5842911877394636,
"repo_name": "dhermes/persistent-cal-golang",
"id": "efc92d3ed77fef658885d4ddc2149751a6548637",
"size": "522",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "templates/500.html",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "1321"
},
{
"name": "Go",
"bytes": "10290"
},
{
"name": "HTML",
"bytes": "5756"
},
{
"name": "JavaScript",
"bytes": "5048"
}
],
"symlink_target": ""
} |
runtest() {
export GEMFIRE_BUILD=$1
export GEMFIRE=$GEMFIRE_BUILD/product
export LD_LIBRARY_PATH=$GEMFIRE/../hidden/lib:$GEMFIRE/lib
export JTESTS=$GEMFIRE/../tests/classes
export CLASSPATH=$GEMFIRE/lib/gemfire.jar:$JTESTS
export JAVA_HOME=/export/gcm/where/jdk/1.6.0_17/x86_64.linux
echo "Running $2 with $3..."
echo ""
$JAVA_HOME/bin/java -server \
-classpath $CLASSPATH:$GEMFIRE/../product-gfxd/lib/gemfirexd.jar -DGEMFIRE=$GEMFIRE -DJTESTS=$JTESTS \
-DprovideRegressionSummary=false -DnukeHungTest=true -DmoveRemoteDirs=true \
-DnumTimesToRun=1 -DtestFileName=$2 -DlocalConf=$3 \
batterytest.BatteryTest
echo "Saving test results to $4..."
echo ""
mkdir $4
/bin/mv *-*-* $4
/bin/mv batterytest.log batterytest.bt oneliner.txt $4
/bin/cp my.cnf config.ini $4
/bin/cp $2 $3 $4
}
#-------------------------------------------------------------------------------
if [ -z "$1" ]
then
echo "No gemfire build was specified."
exit 0
fi
runtest $1 p2p.gfe.bt p2p.local.conf p2p.gfe
runtest $1 p2p.gfxd.bt p2p.local.conf p2p.gfxd
runtest $1 peerClient.gfe.bt peerClient.local.conf peerClient.gfe
runtest $1 peerClient.gfxd.bt peerClient.local.conf peerClient.gfxd
runtest $1 thinClient.gfe.bt thinClient.local.conf thinClient.gfe
runtest $1 thinClient.gfxd.bt thinClient.local.conf thinClient.gfxd
./startup.sh
runtest $1 thinClient.mysqlc.bt thinClient.local.conf thinClient.mysqlc
./shutdown.sh
| {
"content_hash": "a3a8a54a39f3cf4daeb33fd7e98c4e83",
"timestamp": "",
"source": "github",
"line_count": 40,
"max_line_length": 106,
"avg_line_length": 37.2,
"alnum_prop": 0.6727150537634409,
"repo_name": "gemxd/gemfirexd-oss",
"id": "c63cd5aa1d3158068ceab5c43b21c50545bdce46",
"size": "1499",
"binary": false,
"copies": "6",
"ref": "refs/heads/master",
"path": "tests/sql/src/main/java/cacheperf/comparisons/gemfirexd/largeobject/Suites/largeobject01/run.sh",
"mode": "33261",
"license": "apache-2.0",
"language": [
{
"name": "AGS Script",
"bytes": "90653"
},
{
"name": "Assembly",
"bytes": "962433"
},
{
"name": "Batchfile",
"bytes": "30248"
},
{
"name": "C",
"bytes": "311620"
},
{
"name": "C#",
"bytes": "1352292"
},
{
"name": "C++",
"bytes": "2030283"
},
{
"name": "CSS",
"bytes": "54987"
},
{
"name": "Gnuplot",
"bytes": "3125"
},
{
"name": "HTML",
"bytes": "8609160"
},
{
"name": "Java",
"bytes": "118027963"
},
{
"name": "JavaScript",
"bytes": "33027"
},
{
"name": "Makefile",
"bytes": "18443"
},
{
"name": "Mathematica",
"bytes": "92588"
},
{
"name": "Objective-C",
"bytes": "1069"
},
{
"name": "PHP",
"bytes": "581417"
},
{
"name": "PLSQL",
"bytes": "86549"
},
{
"name": "PLpgSQL",
"bytes": "33847"
},
{
"name": "Pascal",
"bytes": "808"
},
{
"name": "Perl",
"bytes": "196843"
},
{
"name": "Python",
"bytes": "12796"
},
{
"name": "Ruby",
"bytes": "1380"
},
{
"name": "SQLPL",
"bytes": "219147"
},
{
"name": "Shell",
"bytes": "533575"
},
{
"name": "SourcePawn",
"bytes": "22351"
},
{
"name": "Thrift",
"bytes": "33033"
},
{
"name": "XSLT",
"bytes": "67112"
}
],
"symlink_target": ""
} |
using System;
using Microsoft.SPOT.Hardware;
namespace Toolbox.NETMF.Hardware
{
/// <summary>.NETMF 4.2 AnalogInput wrapper</summary>
public class IntegratedADC : IADCPort
{
/// <summary>Reference to the ADC port</summary>
private AnalogInput _port;
/// <summary>Defines a ADC pin</summary>
/// <param name="AnalogChannel">The analog channel channel the pin is connected to</param>
public IntegratedADC(Cpu.AnalogChannel AnalogChannel)
{
this._port = new AnalogInput(AnalogChannel);
}
/// <summary>Reads out a value between 0 and 1</summary>
public override double AnalogRead()
{
return this._port.Read();
}
/// <summary>Disposes the ADC object</summary>
public override void Dispose()
{
this._port.Dispose();
}
}
}
| {
"content_hash": "cfd1828647736700d264a09b9fdbfc80",
"timestamp": "",
"source": "github",
"line_count": 32,
"max_line_length": 98,
"avg_line_length": 27.90625,
"alnum_prop": 0.6002239641657335,
"repo_name": "JakeLardinois/NetMF.Toolbox",
"id": "da0bdbb953fad69d1e2090c0189b69a905d74612",
"size": "1526",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Framework/Hardware.Core/IntegratedADC.cs",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "10344"
},
{
"name": "C#",
"bytes": "579329"
},
{
"name": "NSIS",
"bytes": "13310"
}
],
"symlink_target": ""
} |
#ifndef _ASN_H_
#define _ASN_H_
#include "ctypes.h"
typedef CUnswType AsnIdType;
typedef CUnswType AsnLanguageType;
typedef CUnslType AsnTagType;
typedef CIntsType AsnLengthType;
#define asnLengthIndef ((AsnLengthType) -1)
typedef CUnssType AsnIndexType;
typedef CIntlType AsnNumberType;
typedef enum AsnStatusTag {
asnStatusOk,
asnStatusAccept,
asnStatusReject,
asnStatusBad
} AsnStatusType;
typedef enum AsnClassTag {
asnClassUniversal,
asnClassApplication,
asnClassContext,
asnClassPrivate
} AsnClassType;
typedef enum AsnTypeTag {
asnTypeNone,
asnTypeInteger,
asnTypeOctetString,
asnTypeObjectId,
asnTypeSequence,
asnTypeSequenceOf,
asnTypeNull,
asnTypeAny
} AsnTypeType;
CVoidType asnInit (void);
AsnIdType asnNew (AsnLanguageType language);
AsnIdType asnUnsl (AsnClassType cls, AsnTagType tag, CUnslType value);
AsnIdType asnIntl (AsnClassType cls, AsnTagType tag, CIntlType value);
AsnIdType asnOctetString (AsnClassType cls, AsnTagType tag, CBytePtrType value, AsnLengthType n);
AsnIdType asnObjectId (AsnClassType cls, AsnTagType tag, CBytePtrType value, AsnLengthType n);
AsnIdType asnSequence (AsnClassType cls, AsnTagType tag, AsnTypeType type);
AsnStatusType asnDecode (AsnIdType asn, CByteType x);
AsnStatusType asnAppend (AsnIdType head, AsnIdType item);
AsnLengthType asnEncode (AsnIdType asn, CBytePtrType cp, AsnLengthType n);
AsnNumberType asnNumber (CBytePtrType cp, AsnLengthType n);
AsnLengthType asnContents (AsnIdType asn, CBytePtrType cp, AsnLengthType n);
#ifdef INLINE
#include <asndefs.h>
#define asnTag(asn) (asnTagDef (asn))
#define asnType(asn) (asnTypeDef (asn))
#define asnClass(asn) (asnClassDef (asn))
#define asnLength(asn) (asnLengthDef (asn))
#define asnConstructor(asn) (asnConstructorDef (asn))
#define asnNegative(cp, n) (asnNegativeDef(cp, n))
#define asnNonZero(cp, n) (asnNonZeroDef(cp, n))
#define asnSons(asn) (asnSonsDef (asn))
#define asnComponent(asn, i) (asnComponentDef (asn, i))
#define asnFree(asn) (asnFreeDef (asn))
#define asnValue(asn) (asnValueDef (asn))
#else /* INLINE */
AsnTypeType asnType (AsnIdType asn);
AsnTagType asnTag (AsnIdType asn);
AsnClassType asnClass (AsnIdType asn);
AsnLengthType asnLength (AsnIdType asn);
CBoolType asnConstructor (AsnIdType asn);
CBoolType asnNegative (CBytePtrType cp, AsnLengthType n);
CBoolType asnNonZero (CBytePtrType cp, AsnLengthType n);
AsnIndexType asnSons (AsnIdType asn);
AsnIdType asnComponent (AsnIdType asn, AsnIndexType i);
AsnIdType asnFree (AsnIdType asn);
CBytePtrType asnValue (AsnIdType asn);
#endif /* INLINE */
#endif /* _ASN_H_ */
| {
"content_hash": "9e9c0b4ef8979f5674825256278fcc97",
"timestamp": "",
"source": "github",
"line_count": 99,
"max_line_length": 97,
"avg_line_length": 26.95959595959596,
"alnum_prop": 0.766579243162233,
"repo_name": "impedimentToProgress/UCI-BlueChip",
"id": "a999398c7ce368ab657a84299b7a4e17f41ac968",
"size": "2669",
"binary": false,
"copies": "11",
"ref": "refs/heads/master",
"path": "snapgear_linux/user/snmpd/snmplib/asn.h",
"mode": "33261",
"license": "mit",
"language": [
{
"name": "AGS Script",
"bytes": "25338"
},
{
"name": "ASP",
"bytes": "4526"
},
{
"name": "Ada",
"bytes": "1075367"
},
{
"name": "Assembly",
"bytes": "2137017"
},
{
"name": "Awk",
"bytes": "133306"
},
{
"name": "Bison",
"bytes": "399484"
},
{
"name": "BlitzBasic",
"bytes": "101509"
},
{
"name": "C",
"bytes": "288543995"
},
{
"name": "C++",
"bytes": "7495614"
},
{
"name": "CSS",
"bytes": "2128"
},
{
"name": "Clojure",
"bytes": "3747"
},
{
"name": "Common Lisp",
"bytes": "239683"
},
{
"name": "Elixir",
"bytes": "790"
},
{
"name": "Emacs Lisp",
"bytes": "45827"
},
{
"name": "Erlang",
"bytes": "171340"
},
{
"name": "GAP",
"bytes": "3002"
},
{
"name": "Groff",
"bytes": "4517911"
},
{
"name": "Groovy",
"bytes": "26513"
},
{
"name": "HTML",
"bytes": "8141161"
},
{
"name": "Java",
"bytes": "481441"
},
{
"name": "JavaScript",
"bytes": "339345"
},
{
"name": "Logos",
"bytes": "16160"
},
{
"name": "M",
"bytes": "2443"
},
{
"name": "Makefile",
"bytes": "1309237"
},
{
"name": "Max",
"bytes": "3812"
},
{
"name": "Nemerle",
"bytes": "966202"
},
{
"name": "Objective-C",
"bytes": "376270"
},
{
"name": "OpenEdge ABL",
"bytes": "69290"
},
{
"name": "PHP",
"bytes": "11533"
},
{
"name": "PLSQL",
"bytes": "8464"
},
{
"name": "Pascal",
"bytes": "54420"
},
{
"name": "Perl",
"bytes": "6498220"
},
{
"name": "Perl6",
"bytes": "4155"
},
{
"name": "Prolog",
"bytes": "62574"
},
{
"name": "Python",
"bytes": "24287"
},
{
"name": "QMake",
"bytes": "8619"
},
{
"name": "R",
"bytes": "25999"
},
{
"name": "Ruby",
"bytes": "31311"
},
{
"name": "SAS",
"bytes": "15573"
},
{
"name": "Scala",
"bytes": "1506"
},
{
"name": "Scilab",
"bytes": "23534"
},
{
"name": "Shell",
"bytes": "6951414"
},
{
"name": "Smalltalk",
"bytes": "2661"
},
{
"name": "Stata",
"bytes": "7930"
},
{
"name": "Tcl",
"bytes": "1518344"
},
{
"name": "TeX",
"bytes": "1574651"
},
{
"name": "UnrealScript",
"bytes": "20822"
},
{
"name": "VHDL",
"bytes": "37384578"
},
{
"name": "Verilog",
"bytes": "376626"
},
{
"name": "Visual Basic",
"bytes": "180"
},
{
"name": "XS",
"bytes": "24500"
},
{
"name": "XSLT",
"bytes": "5872"
}
],
"symlink_target": ""
} |
require "easy_diff"
module Crowbar
module Client
module Command
module Node
#
# Implementation for the node powercycle command
#
class Powercycle < Base
def request
@request ||= Request::Node::Powercycle.new(
args.easy_merge(
action: :powercycle
)
)
end
def execute
request.process do |request|
case request.code
when 200
say "Successfully triggered powercycle for #{args.name}"
when 404
err "Node does not exist"
else
err request.parsed_response["error"]
end
end
end
end
end
end
end
end
| {
"content_hash": "43c3fe38a7b5943b21aaad3d065d44d0",
"timestamp": "",
"source": "github",
"line_count": 35,
"max_line_length": 72,
"avg_line_length": 22.97142857142857,
"alnum_prop": 0.47139303482587064,
"repo_name": "crowbar/crowbar-client",
"id": "e3e3f77bbba2ce9519b3985a0b6b2033b9aabe5e",
"size": "1389",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "lib/crowbar/client/command/node/powercycle.rb",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Ruby",
"bytes": "624959"
}
],
"symlink_target": ""
} |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_06) on Mon May 04 14:55:35 CEST 2009 -->
<TITLE>
ch.ethz.mxquery.query.impl
</TITLE>
<META NAME="date" CONTENT="2009-05-04">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="ch.ethz.mxquery.query.impl";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../ch/ethz/mxquery/query/package-summary.html"><B>PREV PACKAGE</B></A>
<A HREF="../../../../../ch/ethz/mxquery/query/optimizer/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?ch/ethz/mxquery/query/impl/package-summary.html" target="_top"><B>FRAMES</B></A>
<A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<H2>
Package ch.ethz.mxquery.query.impl
</H2>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Class Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../../ch/ethz/mxquery/query/impl/CompilerImpl.html" title="class in ch.ethz.mxquery.query.impl">CompilerImpl</A></B></TD>
<TD> </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../../ch/ethz/mxquery/query/impl/PreparedStatementImpl.html" title="class in ch.ethz.mxquery.query.impl">PreparedStatementImpl</A></B></TD>
<TD> </TD>
</TR>
</TABLE>
<P>
<DL>
</DL>
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../ch/ethz/mxquery/query/package-summary.html"><B>PREV PACKAGE</B></A>
<A HREF="../../../../../ch/ethz/mxquery/query/optimizer/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?ch/ethz/mxquery/query/impl/package-summary.html" target="_top"><B>FRAMES</B></A>
<A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich
</BODY>
</HTML>
| {
"content_hash": "d75ede69bc061d297283164f0765325d",
"timestamp": "",
"source": "github",
"line_count": 159,
"max_line_length": 176,
"avg_line_length": 40.75471698113208,
"alnum_prop": 0.6166666666666667,
"repo_name": "dayler/MXQueryDemo",
"id": "08d23a8c551400395dfe7b89b4770edc92f2e374",
"size": "6480",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "doc/mxquery/javadoc/ch/ethz/mxquery/query/impl/package-summary.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "1391"
},
{
"name": "Java",
"bytes": "23741"
}
],
"symlink_target": ""
} |
/* LICENSE_BEGIN
MIT License
SPDX:MIT
https://spdx.org/licenses/MIT
See LICENSE.txt file in the top level directory.
LICENSE_END */
#include <cassert>
#include <iostream>
#include <ifaddrs.h>
#include <net/if.h>
#include <sys/types.h>
#include "zed5/core/base/base.h"
#include "zed5/core/base/posixerror.h"
#include "zed5/core/io/fd.h"
#include "zed5/core/io/socketfd.h"
#include "zed5/core/io/socketio.h"
#include "zed5/core/net/socketaddress.h"
namespace org {
namespace zed5 {
using core::Fd;
using core::InetSocketAddress;
using core::PosixError;
using core::SocketAddress;
using core::SocketFd;
using core::SocketIO;
namespace experimental {
void IPProtoNoneTest() {
Fd sender_fd;
SocketFd sender_sock(sender_fd);
SocketIO sender_io(sender_sock);
CHECK(sender_io.make(AF_INET6, SOCK_DGRAM, IPPROTO_NONE).ok());
}
} // namespace experimental
} // namespace zed5
} // namespace org
int main(int argc, char** argv, char** env) {
UNUSED(argc);
UNUSED(argv);
UNUSED(env);
std::cout << "BEGIN" << std::endl;
org::zed5::experimental::IPProtoNoneTest();
std::cout << "END" << std::endl;
return 0;
}
| {
"content_hash": "1d3096d6f700c9d6f7ed95a6b28eb191",
"timestamp": "",
"source": "github",
"line_count": 60,
"max_line_length": 67,
"avg_line_length": 19.583333333333332,
"alnum_prop": 0.6791489361702128,
"repo_name": "ekline/zed5",
"id": "1268a18e7a72e8fcbf18e30f15687e9e96bf1640",
"size": "1175",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/experimental/sockets/ipproto_none_test.cc",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "1137"
},
{
"name": "C++",
"bytes": "1172917"
},
{
"name": "Makefile",
"bytes": "13144"
},
{
"name": "Python",
"bytes": "71694"
}
],
"symlink_target": ""
} |
declare namespace Bokeh {
interface ViewOptions<ModelType extends Model> {
model: ModelType;
id?: string;
el?: HTMLElement | JQuery;
}
class BokehView<ModelType extends Model> {
constructor(options?: ViewOptions<ModelType>);
model: ModelType;
id: string;
el: HTMLElement;
$el: JQuery;
render(): this;
remove(): this;
}
type View<ModelType extends Model> = BokehView<ModelType>;
}
| {
"content_hash": "0db0b940cd15c401fa24bf34c7c71859",
"timestamp": "",
"source": "github",
"line_count": 21,
"max_line_length": 62,
"avg_line_length": 22.714285714285715,
"alnum_prop": 0.59958071278826,
"repo_name": "ptitjano/bokeh",
"id": "8e31b0ae026903cb5b2a92ea026785c36de99444",
"size": "477",
"binary": false,
"copies": "7",
"ref": "refs/heads/master",
"path": "bokehjs/src/coffee/api/typings/views.d.ts",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "Batchfile",
"bytes": "1710"
},
{
"name": "CSS",
"bytes": "406989"
},
{
"name": "CoffeeScript",
"bytes": "1073573"
},
{
"name": "HTML",
"bytes": "45510"
},
{
"name": "JavaScript",
"bytes": "12173"
},
{
"name": "Jupyter Notebook",
"bytes": "3981"
},
{
"name": "Makefile",
"bytes": "1161"
},
{
"name": "Python",
"bytes": "2083050"
},
{
"name": "Shell",
"bytes": "15584"
},
{
"name": "TypeScript",
"bytes": "25843"
}
],
"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="">
<meta name="author" content="">
<title>Creative - Start Bootstrap Theme</title>
<!-- Añadido css-->
<!-- Bootstrap Core CSS -->
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom Fonts -->
<link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href='https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Merriweather:400,300,300italic,400italic,700,700italic,900,900italic' rel='stylesheet' type='text/css'>
<!-- Plugin CSS -->
<link href="vendor/magnific-popup/magnific-popup.css" rel="stylesheet">
<!-- Theme CSS -->
<link href="css/creative.min.css" rel="stylesheet">
<!-- 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 id="page-top">
<nav id="mainNav" class="navbar navbar-default navbar-fixed-top">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span> Menu <i class="fa fa-bars"></i>
</button>
<a class="navbar-brand page-scroll" href="#page-top">Start Bootstrap</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 class="page-scroll" href="#about">About</a>
</li>
<li>
<a class="page-scroll" href="#services">Services</a>
</li>
<li>
<a class="page-scroll" href="#portfolio">Portfolio</a>
</li>
<li>
<a class="page-scroll" href="#contact">Contact</a>
</li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container-fluid -->
</nav>
<header>
<div class="header-content">
<div class="header-content-inner">
<h1 id="homeHeading">Your Favorite Source of Free Bootstrap Themes</h1>
<hr>
<p>Start Bootstrap can help you build better websites using the Bootstrap CSS framework! Just download your template and start going, no strings attached!</p>
<a href="#about" class="btn btn-primary btn-xl page-scroll">Find Out More</a>
</div>
</div>
</header>
<section class="bg-primary" id="about">
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 text-center">
<h2 class="section-heading">We've got what you need!</h2>
<hr class="light">
<p class="text-faded">Start Bootstrap has everything you need to get your new website up and running in no time! All of the templates and themes on Start Bootstrap are open source, free to download, and easy to use. No strings attached!</p>
<a href="#services" class="page-scroll btn btn-default btn-xl sr-button">Get Started!</a>
</div>
</div>
</div>
</section>
<section id="services">
<div class="container">
<div class="row">
<div class="col-lg-12 text-center">
<h2 class="section-heading">At Your Service</h2>
<hr class="primary">
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-lg-3 col-md-6 text-center">
<div class="service-box">
<i class="fa fa-4x fa-diamond text-primary sr-icons"></i>
<h3>Sturdy Templates</h3>
<p class="text-muted">Our templates are updated regularly so they don't break.</p>
</div>
</div>
<div class="col-lg-3 col-md-6 text-center">
<div class="service-box">
<i class="fa fa-4x fa-paper-plane text-primary sr-icons"></i>
<h3>Ready to Ship</h3>
<p class="text-muted">You can use this theme as is, or you can make changes!</p>
</div>
</div>
<div class="col-lg-3 col-md-6 text-center">
<div class="service-box">
<i class="fa fa-4x fa-newspaper-o text-primary sr-icons"></i>
<h3>Up to Date</h3>
<p class="text-muted">We update dependencies to keep things fresh.</p>
</div>
</div>
<div class="col-lg-3 col-md-6 text-center">
<div class="service-box">
<i class="fa fa-4x fa-heart text-primary sr-icons"></i>
<h3>Made with Love</h3>
<p class="text-muted">You have to make your websites with love these days!</p>
</div>
</div>
</div>
</div>
</section>
<section class="no-padding" id="portfolio">
<div class="container-fluid">
<div class="row no-gutter popup-gallery">
<div class="col-lg-4 col-sm-6">
<a href="img/portfolio/fullsize/1.jpg" class="portfolio-box">
<img src="img/portfolio/thumbnails/1.jpg" class="img-responsive" alt="">
<div class="portfolio-box-caption">
<div class="portfolio-box-caption-content">
<div class="project-category text-faded">
Category
</div>
<div class="project-name">
Project Name
</div>
</div>
</div>
</a>
</div>
<div class="col-lg-4 col-sm-6">
<a href="img/portfolio/fullsize/2.jpg" class="portfolio-box">
<img src="img/portfolio/thumbnails/2.jpg" class="img-responsive" alt="">
<div class="portfolio-box-caption">
<div class="portfolio-box-caption-content">
<div class="project-category text-faded">
Category
</div>
<div class="project-name">
Project Name
</div>
</div>
</div>
</a>
</div>
<div class="col-lg-4 col-sm-6">
<a href="img/portfolio/fullsize/3.jpg" class="portfolio-box">
<img src="img/portfolio/thumbnails/3.jpg" class="img-responsive" alt="">
<div class="portfolio-box-caption">
<div class="portfolio-box-caption-content">
<div class="project-category text-faded">
Category
</div>
<div class="project-name">
Project Name
</div>
</div>
</div>
</a>
</div>
<div class="col-lg-4 col-sm-6">
<a href="img/portfolio/fullsize/4.jpg" class="portfolio-box">
<img src="img/portfolio/thumbnails/4.jpg" class="img-responsive" alt="">
<div class="portfolio-box-caption">
<div class="portfolio-box-caption-content">
<div class="project-category text-faded">
Category
</div>
<div class="project-name">
Project Name
</div>
</div>
</div>
</a>
</div>
<div class="col-lg-4 col-sm-6">
<a href="img/portfolio/fullsize/5.jpg" class="portfolio-box">
<img src="img/portfolio/thumbnails/5.jpg" class="img-responsive" alt="">
<div class="portfolio-box-caption">
<div class="portfolio-box-caption-content">
<div class="project-category text-faded">
Category
</div>
<div class="project-name">
Project Name
</div>
</div>
</div>
</a>
</div>
<div class="col-lg-4 col-sm-6">
<a href="img/portfolio/fullsize/6.jpg" class="portfolio-box">
<img src="img/portfolio/thumbnails/6.jpg" class="img-responsive" alt="">
<div class="portfolio-box-caption">
<div class="portfolio-box-caption-content">
<div class="project-category text-faded">
Category
</div>
<div class="project-name">
Project Name
</div>
</div>
</div>
</a>
</div>
</div>
</div>
</section>
<aside class="bg-dark">
<div class="container text-center">
<div class="call-to-action">
<h2>Free Download at Start Bootstrap!</h2>
<a href="http://startbootstrap.com/template-overviews/creative/" class="btn btn-default btn-xl sr-button">Download Now!</a>
</div>
</div>
</aside>
<section id="contact">
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 text-center">
<h2 class="section-heading">Let's Get In Touch!</h2>
<hr class="primary">
<p>Ready to start your next project with us? That's great! Give us a call or send us an email and we will get back to you as soon as possible!</p>
</div>
<div class="col-lg-4 col-lg-offset-2 text-center">
<i class="fa fa-phone fa-3x sr-contact"></i>
<p>123-456-6789</p>
</div>
<div class="col-lg-4 text-center">
<i class="fa fa-envelope-o fa-3x sr-contact"></i>
<p><a href="mailto:[email protected]">[email protected]</a></p>
</div>
</div>
</div>
</section>
<!-- jQuery -->
<script src="vendor/jquery/jquery.min.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="vendor/bootstrap/js/bootstrap.min.js"></script>
<!-- Plugin JavaScript -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script>
<script src="vendor/scrollreveal/scrollreveal.min.js"></script>
<script src="vendor/magnific-popup/jquery.magnific-popup.min.js"></script>
<!-- Theme JavaScript -->
<script src="js/creative.min.js"></script>
</body>
</html>
| {
"content_hash": "4a3fcaaf3d9650f24b6c7edf1d5089b7",
"timestamp": "",
"source": "github",
"line_count": 281,
"max_line_length": 260,
"avg_line_length": 46.08896797153025,
"alnum_prop": 0.4600416956219597,
"repo_name": "pacogomezarnal2/cursoGit",
"id": "639d793fece8eb8e6866cdfa05b7604cc6a613f1",
"size": "12952",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "index.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "18439"
},
{
"name": "HTML",
"bytes": "12952"
},
{
"name": "JavaScript",
"bytes": "4910"
}
],
"symlink_target": ""
} |
from appengine.memcache.guestbook import main
from tests import DatastoreTestbedCase
import webapp2
class TestHandlers(DatastoreTestbedCase):
def test_hello(self):
# Build a request object passing the URI path to be tested.
# You can also pass headers, query arguments etc.
request = webapp2.Request.blank('/')
# Get a response for that request.
response = request.get_response(main.app)
# Let's check if the response is correct.
self.assertEqual(response.status_int, 200)
| {
"content_hash": "fba96662218962f768877fcc7d6fb38b",
"timestamp": "",
"source": "github",
"line_count": 16,
"max_line_length": 67,
"avg_line_length": 33.5625,
"alnum_prop": 0.7001862197392924,
"repo_name": "EricYangzhiHong/python-docs-samples",
"id": "b9747929d070e49769b230bd4df3ec938bd1cc9b",
"size": "1157",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "appengine/memcache/guestbook/tests/test_guestbook.py",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Python",
"bytes": "141289"
}
],
"symlink_target": ""
} |
module Azure::Relay::Mgmt::V2017_04_01
module Models
#
# Defines values for SkuTier
#
module SkuTier
Standard = "Standard"
end
end
end
| {
"content_hash": "0c12cf939dc7fb11e33e7eacf172de27",
"timestamp": "",
"source": "github",
"line_count": 10,
"max_line_length": 38,
"avg_line_length": 16.5,
"alnum_prop": 0.6181818181818182,
"repo_name": "Azure/azure-sdk-for-ruby",
"id": "b1048afc6285eab703316768986f390882d4b62f",
"size": "329",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "management/azure_mgmt_relay/lib/2017-04-01/generated/azure_mgmt_relay/models/sku_tier.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Ruby",
"bytes": "345216400"
},
{
"name": "Shell",
"bytes": "305"
}
],
"symlink_target": ""
} |
/** A chain represents a list of unresolved jumps. Jump locations
* are sorted in decreasing order.
*/
public static class Chain {
/** The position of the jump instruction.
*/
public final int pc;
/** The machine state after the jump instruction.
* Invariant: all elements of a chain list have the same stacksize
* and compatible stack and register contents.
*/
Code.State state;
/** The next jump in the list.
*/
public final Chain next;
/** Construct a chain from its jump position, stacksize, previous
* chain, and machine state.
*/
public Chain(int pc, Chain next, Code.State state) {
DEBUG.P(this,"Chain(3)");
DEBUG.P("pc="+pc);
DEBUG.P("next="+next);
DEBUG.P("state="+state);
this.pc = pc;
this.next = next;
this.state = state;
DEBUG.P(0,this,"Chain(3)");
}
//我加上的
public String toString() {
return "Chain(pc="+pc+(next!=null?" next="+next:"")+")";
}
} | {
"content_hash": "17fadc644c5b4f889aac0e5aa105b22c",
"timestamp": "",
"source": "github",
"line_count": 40,
"max_line_length": 69,
"avg_line_length": 24.125,
"alnum_prop": 0.6207253886010363,
"repo_name": "codefollower/Open-Source-Research",
"id": "ad24906d294174709898309e28e280a60353cce5",
"size": "973",
"binary": false,
"copies": "4",
"ref": "refs/heads/master",
"path": "Javac2007/流程/jvm/18Code/Chain.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Assembly",
"bytes": "146130"
},
{
"name": "C",
"bytes": "1175615"
},
{
"name": "C++",
"bytes": "52932465"
},
{
"name": "CSS",
"bytes": "13948"
},
{
"name": "D",
"bytes": "90195"
},
{
"name": "Java",
"bytes": "32377266"
},
{
"name": "JavaScript",
"bytes": "39651"
},
{
"name": "Objective-C",
"bytes": "18238"
},
{
"name": "Shell",
"bytes": "276979"
},
{
"name": "XSLT",
"bytes": "351083"
}
],
"symlink_target": ""
} |
#ifndef __TURN_SERVER__
#define __TURN_SERVER__
#include "ns_turn_utils.h"
#include "ns_turn_session.h"
#ifdef __cplusplus
extern "C" {
#endif
//////////// defines //////////////
#define TURN_SESSION_ID_FACTOR (1000000000000000LL)
//////////// ALTERNATE-SERVER /////////////
struct _turn_server_addrs_list {
ioa_addr *addrs;
volatile size_t size;
turn_mutex m;
};
typedef struct _turn_server_addrs_list turn_server_addrs_list_t;
void init_turn_server_addrs_list(turn_server_addrs_list_t *l);
////////// RFC 5780 ///////////////////////
typedef int (*get_alt_addr_cb)(ioa_addr *addr, ioa_addr *alt_addr);
typedef int (*send_message_cb)(ioa_engine_handle e, ioa_network_buffer_handle nbh, ioa_addr *origin, ioa_addr *destination);
//////////////////////////////////////////
extern int TURN_MAX_ALLOCATE_TIMEOUT;
extern int TURN_MAX_ALLOCATE_TIMEOUT_STUN_ONLY;
typedef u08bits turnserver_id;
enum _MESSAGE_TO_RELAY_TYPE {
RMT_UNKNOWN = 0,
RMT_SOCKET,
RMT_CB_SOCKET,
RMT_MOBILE_SOCKET,
RMT_CANCEL_SESSION
};
typedef enum _MESSAGE_TO_RELAY_TYPE MESSAGE_TO_RELAY_TYPE;
struct socket_message {
ioa_socket_handle s;
ioa_net_data nd;
int can_resume;
};
typedef enum {
DONT_FRAGMENT_UNSUPPORTED=0,
DONT_FRAGMENT_SUPPORTED,
DONT_FRAGMENT_SUPPORT_EMULATED
} dont_fragment_option_t;
struct _turn_turnserver;
typedef struct _turn_turnserver turn_turnserver;
typedef void (*get_username_resume_cb)(int success, int oauth, int max_session_time, hmackey_t hmackey, st_password_t pwd, turn_turnserver *server, u64bits ctxkey, ioa_net_data *in_buffer);
typedef u08bits *(*get_user_key_cb)(turnserver_id id, turn_credential_type ct, int in_oauth, int *out_oauth, u08bits *uname, u08bits *realm, get_username_resume_cb resume, ioa_net_data *in_buffer, u64bits ctxkey, int *postpone_reply);
typedef int (*check_new_allocation_quota_cb)(u08bits *username, int oauth, u08bits *realm);
typedef void (*release_allocation_quota_cb)(u08bits *username, int oauth, u08bits *realm);
typedef int (*send_socket_to_relay_cb)(turnserver_id id, u64bits cid, stun_tid *tid, ioa_socket_handle s, int message_integrity, MESSAGE_TO_RELAY_TYPE rmt, ioa_net_data *nd, int can_resume);
typedef int (*send_turn_session_info_cb)(struct turn_session_info *tsi);
typedef band_limit_t (*allocate_bps_cb)(band_limit_t bps, int positive);
struct _turn_turnserver {
turnserver_id id;
turnsession_id session_id_counter;
ur_map *sessions_map;
turn_time_t ctime;
ioa_engine_handle e;
int verbose;
int fingerprint;
int rfc5780;
vintp check_origin;
vintp stale_nonce;
vintp stun_only;
vintp no_stun;
vintp secure_stun;
SHATYPE shatype;
turn_credential_type ct;
get_alt_addr_cb alt_addr_cb;
send_message_cb sm_cb;
dont_fragment_option_t dont_fragment;
int (*disconnect)(ts_ur_super_session*);
get_user_key_cb userkeycb;
check_new_allocation_quota_cb chquotacb;
release_allocation_quota_cb raqcb;
int external_ip_set;
ioa_addr external_ip;
vintp no_loopback_peers;
vintp no_multicast_peers;
send_turn_session_info_cb send_turn_session_info;
/* RFC 6062 ==>> */
vintp no_udp_relay;
vintp no_tcp_relay;
ur_map *tcp_relay_connections;
send_socket_to_relay_cb send_socket_to_relay;
/* <<== RFC 6062 */
/* Alternate servers ==>> */
turn_server_addrs_list_t *alternate_servers_list;
size_t as_counter;
turn_server_addrs_list_t *tls_alternate_servers_list;
size_t tls_as_counter;
turn_server_addrs_list_t *aux_servers_list;
int self_udp_balance;
/* White/black listing of address ranges */
ip_range_list_t* ip_whitelist;
ip_range_list_t* ip_blacklist;
/* Mobility */
vintp mobility;
ur_map *mobile_connections_map;
/* Server relay */
int server_relay;
/* Bandwidth draft: */
allocate_bps_cb allocate_bps_func;
/* oAuth: */
int oauth;
const char* oauth_server_name;
};
///////////////////////////////////////////
void init_turn_server(turn_turnserver* server,
turnserver_id id, int verbose,
ioa_engine_handle e,
turn_credential_type ct,
int stun_port,
int fingerprint,
dont_fragment_option_t dont_fragment,
get_user_key_cb userkeycb,
check_new_allocation_quota_cb chquotacb,
release_allocation_quota_cb raqcb,
ioa_addr *external_addr,
vintp check_origin,
vintp no_tcp_relay,
vintp no_udp_relay,
vintp stale_nonce,
vintp stun_only,
vintp no_stun,
turn_server_addrs_list_t *alternate_servers_list,
turn_server_addrs_list_t *tls_alternate_servers_list,
turn_server_addrs_list_t *aux_servers_list,
int self_udp_balance,
vintp no_multicast_peers,
vintp no_loopback_peers,
ip_range_list_t* ip_whitelist,
ip_range_list_t* ip_blacklist,
send_socket_to_relay_cb send_socket_to_relay,
vintp secure_stun,
SHATYPE shatype,
vintp mobility,
int server_relay,
send_turn_session_info_cb send_turn_session_info,
allocate_bps_cb allocate_bps_func,
int oauth,
const char* oauth_server_name);
ioa_engine_handle turn_server_get_engine(turn_turnserver *s);
////////// RFC 5780 ///////////////////////
void set_rfc5780(turn_turnserver *server, get_alt_addr_cb cb, send_message_cb smcb);
///////////////////////////////////////////
int open_client_connection_session(turn_turnserver* server, struct socket_message *sm);
int shutdown_client_connection(turn_turnserver *server, ts_ur_super_session *ss, int force, const char* reason);
void set_disconnect_cb(turn_turnserver* server, int (*disconnect)(ts_ur_super_session*));
int turnserver_accept_tcp_client_data_connection(turn_turnserver *server, tcp_connection_id tcid, stun_tid *tid, ioa_socket_handle s, int message_integrity, ioa_net_data *nd, int can_resume);
int report_turn_session_info(turn_turnserver *server, ts_ur_super_session *ss, int force_invalid);
turn_time_t get_turn_server_time(turn_turnserver *server);
void turn_cancel_session(turn_turnserver *server, turnsession_id sid);
///////////////////////////////////////////
#ifdef __cplusplus
}
#endif
#endif //__TURN_SERVER__
| {
"content_hash": "bf971be5d1a8b3c908ce2203e1407787",
"timestamp": "",
"source": "github",
"line_count": 204,
"max_line_length": 234,
"avg_line_length": 30.029411764705884,
"alnum_prop": 0.6793992817499184,
"repo_name": "michalliu/coturn",
"id": "3506e617f2f0155143d2251a0c3123a5acd83166",
"size": "7694",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/server/ns_turn_server.h",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "C",
"bytes": "1188628"
},
{
"name": "C++",
"bytes": "44973"
},
{
"name": "Emacs Lisp",
"bytes": "1388"
},
{
"name": "Perl",
"bytes": "2160"
},
{
"name": "Shell",
"bytes": "90768"
}
],
"symlink_target": ""
} |
package com.google.refine.browsing.facets;
import java.util.Properties;
import org.json.JSONException;
import org.json.JSONObject;
import org.json.JSONWriter;
import com.google.refine.browsing.FilteredRecords;
import com.google.refine.browsing.FilteredRows;
import com.google.refine.browsing.RecordFilter;
import com.google.refine.browsing.RowFilter;
import com.google.refine.browsing.filters.AnyRowRecordFilter;
import com.google.refine.browsing.filters.ExpressionNumberComparisonRowFilter;
import com.google.refine.browsing.util.ExpressionBasedRowEvaluable;
import com.google.refine.browsing.util.ExpressionNumericValueBinner;
import com.google.refine.browsing.util.NumericBinIndex;
import com.google.refine.browsing.util.NumericBinRecordIndex;
import com.google.refine.browsing.util.NumericBinRowIndex;
import com.google.refine.browsing.util.RowEvaluable;
import com.google.refine.expr.Evaluable;
import com.google.refine.expr.MetaParser;
import com.google.refine.expr.ParsingException;
import com.google.refine.model.Column;
import com.google.refine.model.Project;
import com.google.refine.util.JSONUtilities;
public class RangeFacet implements Facet {
/*
* Configuration, from the client side
*/
protected String _name; // name of facet
protected String _expression; // expression to compute numeric value(s) per row
protected String _columnName; // column to base expression on, if any
protected double _from; // the numeric selection
protected double _to;
protected boolean _selectNumeric; // whether the numeric selection applies, default true
protected boolean _selectNonNumeric;
protected boolean _selectBlank;
protected boolean _selectError;
/*
* Derived configuration data
*/
protected int _cellIndex;
protected Evaluable _eval;
protected String _errorMessage;
protected boolean _selected; // false if we're certain that all rows will match
// and there isn't any filtering to do
/*
* Computed data, to return to the client side
*/
protected double _min;
protected double _max;
protected double _step;
protected int[] _baseBins;
protected int[] _bins;
protected int _baseNumericCount;
protected int _baseNonNumericCount;
protected int _baseBlankCount;
protected int _baseErrorCount;
protected int _numericCount;
protected int _nonNumericCount;
protected int _blankCount;
protected int _errorCount;
public RangeFacet() {
}
protected static final String MIN = "min";
protected static final String MAX = "max";
protected static final String TO = "to";
protected static final String FROM = "from";
@Override
public void write(JSONWriter writer, Properties options)
throws JSONException {
writer.object();
writer.key("name"); writer.value(_name);
writer.key("expression"); writer.value(_expression);
writer.key("columnName"); writer.value(_columnName);
if (_errorMessage != null) {
writer.key("error"); writer.value(_errorMessage);
} else {
if (!Double.isInfinite(_min) && !Double.isInfinite(_max)) {
writer.key(MIN); writer.value(_min);
writer.key(MAX); writer.value(_max);
writer.key("step"); writer.value(_step);
writer.key("bins"); writer.array();
for (int b : _bins) {
writer.value(b);
}
writer.endArray();
writer.key("baseBins"); writer.array();
for (int b : _baseBins) {
writer.value(b);
}
writer.endArray();
writer.key(FROM); writer.value(_from);
writer.key(TO); writer.value(_to);
} else {
writer.key("error"); writer.value("No numeric value present.");
}
writer.key("baseNumericCount"); writer.value(_baseNumericCount);
writer.key("baseNonNumericCount"); writer.value(_baseNonNumericCount);
writer.key("baseBlankCount"); writer.value(_baseBlankCount);
writer.key("baseErrorCount"); writer.value(_baseErrorCount);
writer.key("numericCount"); writer.value(_numericCount);
writer.key("nonNumericCount"); writer.value(_nonNumericCount);
writer.key("blankCount"); writer.value(_blankCount);
writer.key("errorCount"); writer.value(_errorCount);
}
writer.endObject();
}
@Override
public void initializeFromJSON(Project project, JSONObject o) throws JSONException {
_name = o.getString("name");
_expression = o.getString("expression");
_columnName = o.getString("columnName");
if (_columnName.length() > 0) {
Column column = project.columnModel.getColumnByName(_columnName);
if (column != null) {
_cellIndex = column.getCellIndex();
} else {
_errorMessage = "No column named " + _columnName;
}
} else {
_cellIndex = -1;
}
try {
_eval = MetaParser.parse(_expression);
} catch (ParsingException e) {
_errorMessage = e.getMessage();
}
if (o.has(FROM) || o.has(TO)) {
_from = o.has(FROM) ? o.getDouble(FROM) : _min;
_to = o.has(TO) ? o.getDouble(TO) : _max;
_selected = true;
}
_selectNumeric = JSONUtilities.getBoolean(o, "selectNumeric", true);
_selectNonNumeric = JSONUtilities.getBoolean(o, "selectNonNumeric", true);
_selectBlank = JSONUtilities.getBoolean(o, "selectBlank", true);
_selectError = JSONUtilities.getBoolean(o, "selectError", true);
if (!_selectNumeric || !_selectNonNumeric || !_selectBlank || !_selectError) {
_selected = true;
}
}
@Override
public RowFilter getRowFilter(Project project) {
if (_eval != null && _errorMessage == null && _selected) {
return new ExpressionNumberComparisonRowFilter(
getRowEvaluable(project), _selectNumeric, _selectNonNumeric, _selectBlank, _selectError) {
@Override
protected boolean checkValue(double d) {
return d >= _from && d < _to;
};
};
} else {
return null;
}
}
@Override
public RecordFilter getRecordFilter(Project project) {
RowFilter rowFilter = getRowFilter(project);
return rowFilter == null ? null : new AnyRowRecordFilter(rowFilter);
}
@Override
public void computeChoices(Project project, FilteredRows filteredRows) {
if (_eval != null && _errorMessage == null) {
RowEvaluable rowEvaluable = getRowEvaluable(project);
Column column = project.columnModel.getColumnByCellIndex(_cellIndex);
String key = "numeric-bin:row-based:" + _expression;
NumericBinIndex index = (NumericBinIndex) column.getPrecompute(key);
if (index == null) {
index = new NumericBinRowIndex(project, rowEvaluable);
column.setPrecompute(key, index);
}
retrieveDataFromBaseBinIndex(index);
ExpressionNumericValueBinner binner =
new ExpressionNumericValueBinner(rowEvaluable, index);
filteredRows.accept(project, binner);
retrieveDataFromBinner(binner);
}
}
@Override
public void computeChoices(Project project, FilteredRecords filteredRecords) {
if (_eval != null && _errorMessage == null) {
RowEvaluable rowEvaluable = getRowEvaluable(project);
Column column = project.columnModel.getColumnByCellIndex(_cellIndex);
String key = "numeric-bin:record-based:" + _expression;
NumericBinIndex index = (NumericBinIndex) column.getPrecompute(key);
if (index == null) {
index = new NumericBinRecordIndex(project, rowEvaluable);
column.setPrecompute(key, index);
}
retrieveDataFromBaseBinIndex(index);
ExpressionNumericValueBinner binner =
new ExpressionNumericValueBinner(rowEvaluable, index);
filteredRecords.accept(project, binner);
retrieveDataFromBinner(binner);
}
}
protected RowEvaluable getRowEvaluable(Project project) {
return new ExpressionBasedRowEvaluable(_columnName, _cellIndex, _eval);
}
protected void retrieveDataFromBaseBinIndex(NumericBinIndex index) {
_min = index.getMin();
_max = index.getMax();
_step = index.getStep();
_baseBins = index.getBins();
_baseNumericCount = index.getNumericRowCount();
_baseNonNumericCount = index.getNonNumericRowCount();
_baseBlankCount = index.getBlankRowCount();
_baseErrorCount = index.getErrorRowCount();
if (_selected) {
_from = Math.max(_from, _min);
_to = Math.min(_to, _max);
} else {
_from = _min;
_to = _max;
}
}
protected void retrieveDataFromBinner(ExpressionNumericValueBinner binner) {
_bins = binner.bins;
_numericCount = binner.numericCount;
_nonNumericCount = binner.nonNumericCount;
_blankCount = binner.blankCount;
_errorCount = binner.errorCount;
}
}
| {
"content_hash": "46ab22ade73a11335e103e30267db25b",
"timestamp": "",
"source": "github",
"line_count": 269,
"max_line_length": 110,
"avg_line_length": 37.25650557620818,
"alnum_prop": 0.5967870684494113,
"repo_name": "DTL-FAIRData/FAIRifier",
"id": "10669b35e1c10d31c96289523affec991d272c1e",
"size": "11526",
"binary": false,
"copies": "5",
"ref": "refs/heads/master",
"path": "main/src/com/google/refine/browsing/facets/RangeFacet.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ApacheConf",
"bytes": "169"
},
{
"name": "Batchfile",
"bytes": "4771"
},
{
"name": "CSS",
"bytes": "134159"
},
{
"name": "HTML",
"bytes": "333450"
},
{
"name": "Java",
"bytes": "3514431"
},
{
"name": "JavaScript",
"bytes": "967765"
},
{
"name": "PHP",
"bytes": "8799"
},
{
"name": "Ruby",
"bytes": "2559"
},
{
"name": "Shell",
"bytes": "28836"
}
],
"symlink_target": ""
} |
Digicert-issuer Helm chart
--------------------------
Installs the [digicert-issuer](https://github.com/sapcc/digicert-issuer), an external issuer to be used with the cert-manager.
| {
"content_hash": "c85795b130ddd4ebf0b8748c975a7c98",
"timestamp": "",
"source": "github",
"line_count": 4,
"max_line_length": 126,
"avg_line_length": 45.5,
"alnum_prop": 0.6758241758241759,
"repo_name": "sapcc/helm-charts",
"id": "11b3741b75b237ca51c45ca554386879792cca88",
"size": "182",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "system/digicert-issuer/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Dockerfile",
"bytes": "191"
},
{
"name": "Go",
"bytes": "6528"
},
{
"name": "HTML",
"bytes": "12841"
},
{
"name": "Lua",
"bytes": "9598"
},
{
"name": "Makefile",
"bytes": "1231"
},
{
"name": "Mustache",
"bytes": "72269"
},
{
"name": "Open Policy Agent",
"bytes": "10481"
},
{
"name": "Python",
"bytes": "720"
},
{
"name": "Shell",
"bytes": "105156"
},
{
"name": "Smarty",
"bytes": "1281213"
}
],
"symlink_target": ""
} |
package com.navercorp.pinpoint.common.server.bo.codec.strategy;
import com.navercorp.pinpoint.common.buffer.AutomaticBuffer;
import com.navercorp.pinpoint.common.buffer.Buffer;
import com.navercorp.pinpoint.common.buffer.FixedBuffer;
import org.junit.Assert;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
/**
* @author HyunGil Jeong
*/
public abstract class EncodingStrategyTestBase {
protected static final int NUM_TEST_VALUES = 20;
private static final Random RANDOM = new Random();
public <T> void testStrategy(List<T> expectedValues, EncodingStrategy<T> strategy) {
Buffer encodeBuffer = new AutomaticBuffer();
strategy.encodeValues(encodeBuffer, expectedValues);
Buffer decodeBuffer = new FixedBuffer(encodeBuffer.getBuffer());
List<T> actualValues = strategy.decodeValues(decodeBuffer, expectedValues.size());
Assert.assertEquals(expectedValues, actualValues);
}
public List<Short> createRandomShorts(int numTestValues, boolean unsigned) {
List<Short> values = new ArrayList<Short>(numTestValues);
for (int i = 0; i < numTestValues; ++i) {
if (unsigned) {
values.add((short) RANDOM.nextInt(Short.MAX_VALUE));
} else {
boolean positive = RANDOM.nextInt(2) % 2 == 0 ? true : false;
values.add((short) (RANDOM.nextInt(Short.MAX_VALUE) * (positive ? 1 : -1)));
}
}
return values;
}
public List<Integer> createRandomIntegers(int numTestValues, boolean unsigned) {
List<Integer> values = new ArrayList<Integer>(numTestValues);
for (int i = 0; i < numTestValues; ++i) {
if (unsigned) {
values.add(RANDOM.nextInt(Integer.MAX_VALUE));
} else {
values.add(RANDOM.nextInt());
}
}
return values;
}
public List<Long> createRandomLongs(int numTestValues, boolean unsigned) {
List<Long> values = new ArrayList<Long>(numTestValues);
for (int i = 0; i < numTestValues; ++i) {
long value = RANDOM.nextLong();
if (unsigned) {
value = Math.abs(value);
}
values.add(value);
}
return values;
}
}
| {
"content_hash": "db3d28ba7e3d43ba585b2ec8c7ecb148",
"timestamp": "",
"source": "github",
"line_count": 67,
"max_line_length": 92,
"avg_line_length": 34.55223880597015,
"alnum_prop": 0.6259179265658747,
"repo_name": "87439247/pinpoint",
"id": "cbada76088ccbc74054203731374b5a8463ecc63",
"size": "2909",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "commons-server/src/test/java/com/navercorp/pinpoint/common/server/bo/codec/strategy/EncodingStrategyTestBase.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "27926"
},
{
"name": "CSS",
"bytes": "152843"
},
{
"name": "CoffeeScript",
"bytes": "10124"
},
{
"name": "Groovy",
"bytes": "1423"
},
{
"name": "HTML",
"bytes": "617702"
},
{
"name": "Java",
"bytes": "10215988"
},
{
"name": "JavaScript",
"bytes": "4772603"
},
{
"name": "Makefile",
"bytes": "5246"
},
{
"name": "PLSQL",
"bytes": "4156"
},
{
"name": "Python",
"bytes": "3523"
},
{
"name": "Ruby",
"bytes": "943"
},
{
"name": "Shell",
"bytes": "37964"
},
{
"name": "Thrift",
"bytes": "10003"
}
],
"symlink_target": ""
} |
window.addEventListener('DOMContentLoaded', function () {
'use strict';
var image = window.createCropperImage();
image.newCropper = new Cropper(image, {
strict: false,
built: function () {
var cropper = this.cropper;
QUnit.test('methods.reset', function (assert) {
var canvasData = cropper.getCanvasData();
var cropBoxData = cropper.getCropBoxData();
cropper.setCanvasData({
top: canvasData.top + 10,
width: canvasData.width - 10
});
assert.notDeepEqual(cropper.getCanvasData(), canvasData);
cropper.setCropBoxData({
left: cropBoxData.left + 10,
height: cropBoxData.height - 10
});
assert.notDeepEqual(cropper.getCropBoxData(), cropBoxData);
cropper.reset();
assert.deepEqual(cropper.getCanvasData(), canvasData);
assert.deepEqual(cropper.getCropBoxData(), cropBoxData);
});
}
});
});
| {
"content_hash": "703d261e6c08fe05aee8651bf6b42e62",
"timestamp": "",
"source": "github",
"line_count": 39,
"max_line_length": 67,
"avg_line_length": 24.692307692307693,
"alnum_prop": 0.616822429906542,
"repo_name": "vinnymac/cropperjs",
"id": "e911f9182bf4267779d026ed13e0640cf88e8c42",
"size": "963",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "test/methods/reset.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "19226"
},
{
"name": "HTML",
"bytes": "27298"
},
{
"name": "JavaScript",
"bytes": "324996"
}
],
"symlink_target": ""
} |
namespace novus
{
class IntersectionTests;
class CollisionDetector;
class RigidBody;
class CollisionPrimitive
{
friend class IntersectionTests;
friend class CollisionDetector;
public:
RigidBody* body;
//Offset relative to the rigidbody
Matrix4 offset;
void CalculateInternals();
Vector3 getAxis(unsigned int index) const
{
return Vector3(mTransform[index]);
}
const Matrix4& getTransform() const
{
return mTransform;
}
protected:
//The combined transform of the rigidbody and offset
Matrix4 mTransform;
};
class CollisionSphere : public CollisionPrimitive
{
public:
float radius;
};
class CollisionPlane
{
public:
Vector3 direction;
//Vector3 origin;
float offset;
};
class CollisionBox : public CollisionPrimitive
{
public:
Vector3 halfSize;
};
}
#endif | {
"content_hash": "85bcca1a274a15790f612776270b0058",
"timestamp": "",
"source": "github",
"line_count": 61,
"max_line_length": 53,
"avg_line_length": 13,
"alnum_prop": 0.7604035308953342,
"repo_name": "LeifNode/Novus-Engine",
"id": "cc0db57c9520386ce32e2200a78b34a057315e31",
"size": "1214",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Novus-Engine/src/Physics/CollisionPrimitives.h",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "1544937"
},
{
"name": "C++",
"bytes": "1156268"
},
{
"name": "Objective-C",
"bytes": "1602"
}
],
"symlink_target": ""
} |
package org.apache.pulsar.proxy.server;
import inet.ipaddr.IPAddress;
import inet.ipaddr.IPAddressString;
import inet.ipaddr.ipv4.IPv4Address;
import inet.ipaddr.ipv6.IPv6Address;
import io.netty.resolver.AddressResolver;
import java.net.InetSocketAddress;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.StringTokenizer;
import java.util.concurrent.CompletableFuture;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import lombok.extern.slf4j.Slf4j;
import org.apache.pulsar.common.util.FutureUtil;
import org.apache.pulsar.common.util.netty.NettyFutureUtil;
@Slf4j
public class BrokerProxyValidator {
private static final String SEPARATOR = "\\s*,\\s*";
private static final String ALLOW_ANY = "*";
private final int[] allowedTargetPorts;
private final boolean allowAnyTargetPort;
private final List<IPAddress> allowedIPAddresses;
private final boolean allowAnyIPAddress;
private final AddressResolver<InetSocketAddress> inetSocketAddressResolver;
private final List<Pattern> allowedHostNames;
private final boolean allowAnyHostName;
public BrokerProxyValidator(AddressResolver<InetSocketAddress> inetSocketAddressResolver, String allowedHostNames,
String allowedIPAddresses, String allowedTargetPorts) {
this.inetSocketAddressResolver = inetSocketAddressResolver;
List<String> allowedHostNamesStrings = parseCommaSeparatedConfigValue(allowedHostNames);
if (allowedHostNamesStrings.contains(ALLOW_ANY)) {
this.allowAnyHostName = true;
this.allowedHostNames = Collections.emptyList();
} else {
this.allowAnyHostName = false;
this.allowedHostNames = allowedHostNamesStrings.stream()
.map(BrokerProxyValidator::parseWildcardPattern).collect(Collectors.toList());
}
List<String> allowedIPAddressesStrings = parseCommaSeparatedConfigValue(allowedIPAddresses);
if (allowedIPAddressesStrings.contains(ALLOW_ANY)) {
allowAnyIPAddress = true;
this.allowedIPAddresses = Collections.emptyList();
} else {
allowAnyIPAddress = false;
this.allowedIPAddresses = allowedIPAddressesStrings.stream().map(IPAddressString::new)
.filter(ipAddressString -> {
if (ipAddressString.isValid()) {
return true;
} else {
throw new IllegalArgumentException("Invalid IP address filter '" + ipAddressString + "'",
ipAddressString.getAddressStringException());
}
}).map(IPAddressString::getAddress)
.filter(Objects::nonNull)
.collect(Collectors.toList());
}
List<String> allowedTargetPortsStrings = parseCommaSeparatedConfigValue(allowedTargetPorts);
if (allowedTargetPortsStrings.contains(ALLOW_ANY)) {
allowAnyTargetPort = true;
this.allowedTargetPorts = new int[0];
} else {
allowAnyTargetPort = false;
this.allowedTargetPorts =
allowedTargetPortsStrings.stream().mapToInt(Integer::parseInt).toArray();
}
}
private static Pattern parseWildcardPattern(String wildcardPattern) {
String regexPattern =
Collections.list(new StringTokenizer(wildcardPattern, "*", true))
.stream()
.map(String::valueOf)
.map(token -> {
if ("*".equals(token)) {
return ".*";
} else {
return Pattern.quote(token);
}
}).collect(Collectors.joining());
return Pattern.compile(
"^" + regexPattern + "$",
Pattern.CASE_INSENSITIVE);
}
private static List<String> parseCommaSeparatedConfigValue(String configValue) {
return Arrays.stream(configValue.split(SEPARATOR)).map(String::trim).filter(s -> s.length() > 0)
.collect(Collectors.toList());
}
public CompletableFuture<InetSocketAddress> resolveAndCheckTargetAddress(String hostAndPort) {
int pos = hostAndPort.lastIndexOf(':');
String host = hostAndPort.substring(0, pos);
int port = Integer.parseInt(hostAndPort.substring(pos + 1));
if (!isPortAllowed(port)) {
return FutureUtil.failedFuture(
new TargetAddressDeniedException("Given port in '" + hostAndPort + "' isn't allowed."));
} else if (!isHostAllowed(host)) {
return FutureUtil.failedFuture(
new TargetAddressDeniedException("Given host in '" + hostAndPort + "' isn't allowed."));
} else {
return NettyFutureUtil.toCompletableFuture(
inetSocketAddressResolver.resolve(InetSocketAddress.createUnresolved(host, port)))
.thenCompose(resolvedAddress -> {
CompletableFuture<InetSocketAddress> result = new CompletableFuture<>();
if (isIPAddressAllowed(resolvedAddress)) {
result.complete(resolvedAddress);
} else {
result.completeExceptionally(new TargetAddressDeniedException(
"The IP address of the given host and port '" + hostAndPort + "' isn't allowed."));
}
return result;
});
}
}
private boolean isPortAllowed(int port) {
if (allowAnyTargetPort) {
return true;
}
for (int allowedPort : allowedTargetPorts) {
if (allowedPort == port) {
return true;
}
}
return false;
}
private boolean isIPAddressAllowed(InetSocketAddress resolvedAddress) {
if (allowAnyIPAddress) {
return true;
}
byte[] addressBytes = resolvedAddress.getAddress().getAddress();
IPAddress candidateAddress =
addressBytes.length == 4 ? new IPv4Address(addressBytes) : new IPv6Address(addressBytes);
for (IPAddress allowedAddress : allowedIPAddresses) {
if (allowedAddress.contains(candidateAddress)) {
return true;
}
}
return false;
}
private boolean isHostAllowed(String host) {
if (allowAnyHostName) {
return true;
}
boolean matched = false;
for (Pattern allowedHostName : allowedHostNames) {
if (allowedHostName.matcher(host).matches()) {
matched = true;
break;
}
}
return matched;
}
}
| {
"content_hash": "68d69e5d516ccc09bf503cd33af04530",
"timestamp": "",
"source": "github",
"line_count": 164,
"max_line_length": 119,
"avg_line_length": 42.951219512195124,
"alnum_prop": 0.6000851788756388,
"repo_name": "yahoo/pulsar",
"id": "ab44e163bad92e80da40571747e643a7c204002f",
"size": "7852",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/BrokerProxyValidator.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "C",
"bytes": "77960"
},
{
"name": "C++",
"bytes": "736937"
},
{
"name": "CMake",
"bytes": "9092"
},
{
"name": "HTML",
"bytes": "29382"
},
{
"name": "Java",
"bytes": "5371040"
},
{
"name": "Protocol Buffer",
"bytes": "15090"
},
{
"name": "Python",
"bytes": "91802"
},
{
"name": "Shell",
"bytes": "47717"
}
],
"symlink_target": ""
} |
package io.apiman.test.integration.runner.handlers.entity;
import io.apiman.test.integration.runner.annotations.entity.Api;
import io.apiman.test.integration.runner.handlers.FieldAnnotationHandler;
import io.apiman.test.integration.runner.handlers.HandlerMap;
import io.apiman.test.integration.runner.restclients.entity.APIs;
import io.apiman.manager.api.beans.apis.ApiBean;
import io.apiman.manager.api.beans.apis.NewApiBean;
import io.apiman.manager.api.beans.orgs.OrganizationBean;
import java.lang.reflect.Field;
/**
* @author jcechace
*/
public class ApiAnnotationHandler extends FieldAnnotationHandler<Api, NewApiBean> {
public ApiAnnotationHandler(Object instance, Class<Api> annotationClass, HandlerMap handlerMap) {
super(instance, annotationClass, handlerMap);
}
@Override
public NewApiBean newBeanFromAnnotation(Api annotation) {
String name = uniqueName(annotation.name());
NewApiBean bean = new NewApiBean();
bean.setName(name);
bean.setDescription(description(name));
return bean;
}
private ApiBean createBean(Api annotation, Field field) {
NewApiBean bean = newBeanFromAnnotation(annotation);
OrganizationBean org = getStoredEntity(OrganizationBean.class, annotation.organization(), field);
APIs client = (APIs) new APIs(org).create(bean);
return client.getBean();
}
@Override
public void processField(Field field, Api annotation) throws IllegalAccessException {
ApiBean bean = createBean(annotation, field);
setField(field, ApiBean.class, bean);
}
}
| {
"content_hash": "850750647c480c4f0662c70b87ed0a91",
"timestamp": "",
"source": "github",
"line_count": 48,
"max_line_length": 105,
"avg_line_length": 33.6875,
"alnum_prop": 0.7390228818800247,
"repo_name": "apiman/apiman-test",
"id": "e155135ce635e3355a6cf902824e07102aba5ecb",
"size": "2212",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "apiman-it-commons/src/main/java/io/apiman/test/integration/runner/handlers/entity/ApiAnnotationHandler.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Groovy",
"bytes": "1779"
},
{
"name": "Java",
"bytes": "888888"
}
],
"symlink_target": ""
} |
var datepicker_spawner = null
var calendarpicker_spawner = null
var units = {
w: 'week',
d: 'day',
M: 'month',
y: 'year'
}
function fixupPicker(obj) {
obj.addEventListener("focus", function(event){
$('html').on('hide.bs.dropdown', function (e) {
return false;
});
});
obj.addEventListener("blur", function(event){
$('html').unbind('hide.bs.dropdown')
});
}
// makeSelect: Creates a <select> object with options
function makeSelect(options, id, selval) {
var sel = document.createElement('select')
sel.addEventListener("focus", function(event){
$('html').on('hide.bs.dropdown', function (e) {
return false;
});
});
sel.addEventListener("blur", function(event){
$('html').unbind('hide.bs.dropdown')
});
sel.setAttribute("name", id)
sel.setAttribute("id", id)
// For each options element, create it in the DOM
for (var key in options) {
var opt = document.createElement('option')
// Hash or array?
if (typeof key == "string") {
opt.setAttribute("value", key)
// Option is selected by default?
if (key == selval) {
opt.setAttribute("selected", "selected")
}
} else {
// Option is selected by default?
if (options[key] == selval) {
opt.setAttribute("selected", "selected")
}
}
opt.text = options[key]
sel.appendChild(opt)
}
return sel
}
// splitDiv: Makes a split div with 2 elements,
// and puts div2 into the right column,
// and 'name' as text in the left one.
function splitDiv(id, name, div2) {
var div = document.createElement('div')
var subdiv = document.createElement('div')
var radio = document.createElement('input')
radio.setAttribute("type", "radio")
radio.setAttribute("name", "datepicker_radio")
radio.setAttribute("value", name)
radio.setAttribute("id", "datepicker_radio_" + id)
radio.setAttribute("onclick", "calcTimespan('"+ id + "')")
var label = document.createElement('label')
label.innerHTML = " " + name + ": "
label.setAttribute("for", "datepicker_radio_" + id)
subdiv.appendChild(radio)
subdiv.appendChild(label)
subdiv.style.float = "left"
div2.style.float = "left"
subdiv.style.width = "120px"
subdiv.style.height = "48px"
div2.style.height = "48px"
div2.style.width = "250px"
div.appendChild(subdiv)
div.appendChild(div2)
return div
}
// calcTimespan: Calculates the value and representational text
// for the datepicker choice and puts it in the datepicker's
// spawning input/select element.
function calcTimespan(what) {
var wat = ""
var tval = ""
// Less than N units ago?
if (what == 'lt') {
// Get unit and how many units
var N = document.getElementById('datepicker_lti').value
var unit = document.getElementById('datepicker_lts').value
var unitt = units[unit]
if (parseInt(N) != 1) {
unitt += "s"
}
// If this makes sense, construct a humanly readable and a computer version
// of the timespan
if (N.length > 0) {
wat = "Less than " + N + " " + unitt + " ago"
tval = "lte=" + N + unit
}
}
// More than N units ago?
if (what == 'mt') {
// As above, get unit and no of units.
var N = document.getElementById('datepicker_mti').value
var unit = document.getElementById('datepicker_mts').value
var unitt = units[unit]
if (parseInt(N) != 1) {
unitt += "s"
}
// construct timespan val + description
if (N.length > 0) {
wat = "More than " + N + " " + unitt + " ago"
tval = "gte=" + N + unit
}
}
// Date range?
if (what == 'cd') {
// Get From and To values
var f = document.getElementById('datepicker_cfrom').value
var t = document.getElementById('datepicker_cto').value
// construct timespan val + description if both from and to are valid
if (f.length > 0 && t.length > 0) {
wat = "From " + f + " to " + t
tval = "dfr=" + f + "|dto=" + t
}
}
// If we calc'ed a value and spawner exists, update its key/val
if (datepicker_spawner && what && wat.length > 0) {
document.getElementById('datepicker_radio_' + what).checked = true
if (datepicker_spawner.options) {
datepicker_spawner.options[0].value = tval
datepicker_spawner.options[0].text = wat
} else if (datepicker_spawner.value) {
datepicker_spawner.value = wat
datepicker_spawner.setAttribute("data", tval)
}
}
}
// datePicker: spawns a date picker with various
// timespan options right next to the parent caller.
function datePicker(parent, seedPeriod) {
datepicker_spawner = parent
var div = document.getElementById('datepicker_popup')
// If the datepicker object doesn't exist, spawn it
if (!div) {
div = document.createElement('div')
var id = parseInt(Math.random() * 10000).toString(16)
div.setAttribute("id", "datepicker_popup")
div.setAttribute("class", "datepicker")
}
// Reset the contents of the datepicker object
div.innerHTML = ""
div.style.display = "block"
// Position the datepicker next to whatever called it
var bb = parent.getBoundingClientRect()
div.style.top = (bb.bottom + 8) + "px"
div.style.left = (bb.left + 32) + "px"
// -- Less than N $units ago
var ltdiv = document.createElement('div')
var lti = document.createElement('input')
lti.setAttribute("id", "datepicker_lti")
lti.style.width = "48px"
lti.setAttribute("onkeyup", "calcTimespan('lt')")
lti.setAttribute("onblur", "calcTimespan('lt')")
ltdiv.appendChild(lti)
var lts = makeSelect({
'd': "Day(s)",
'w': 'Week(s)',
'M': "Month(s)",
'y': "Year(s)"
}, 'datepicker_lts', 'm')
lts.setAttribute("onchange", "calcTimespan('lt')")
ltdiv.appendChild(lts)
ltdiv.appendChild(document.createTextNode(' ago'))
div.appendChild(splitDiv('lt', 'Less than', ltdiv))
// -- More than N $units ago
var mtdiv = document.createElement('div')
var mti = document.createElement('input')
mti.style.width = "48px"
mti.setAttribute("id", "datepicker_mti")
mti.setAttribute("onkeyup", "calcTimespan('mt')")
mti.setAttribute("onblur", "calcTimespan('mt')")
mtdiv.appendChild(mti)
var mts = makeSelect({
'd': "Day(s)",
'w': 'Week(s)',
'M': "Month(s)",
'y': "Year(s)"
}, 'datepicker_mts', 'm')
mtdiv.appendChild(mts)
mts.setAttribute("onchange", "calcTimespan('mt')")
mtdiv.appendChild(document.createTextNode(' ago'))
div.appendChild(splitDiv('mt', 'More than', mtdiv))
// -- Calendar timespan
// This is just two text fields, the calendarPicker sub-plugin populates them
var cdiv = document.createElement('div')
var cfrom = document.createElement('input')
cfrom.style.width = "90px"
cfrom.setAttribute("id", "datepicker_cfrom")
cfrom.setAttribute("onfocus", "showCalendarPicker(this)")
cfrom.setAttribute("onchange", "calcTimespan('cd')")
cdiv.appendChild(document.createTextNode('From: '))
cdiv.appendChild(cfrom)
var cto = document.createElement('input')
cto.style.width = "90px"
cto.setAttribute("id", "datepicker_cto")
cto.setAttribute("onfocus", "showCalendarPicker(this)")
cto.setAttribute("onchange", "calcTimespan('cd')")
cdiv.appendChild(document.createTextNode('To: '))
cdiv.appendChild(cto)
div.appendChild(splitDiv('cd', 'Date range', cdiv))
// -- Magic button that sends the timespan back to the caller
var okay = document.createElement('input')
okay.setAttribute("type", "button")
okay.setAttribute("value", "Okay")
okay.setAttribute("onclick", "setDatepickerDate()")
div.appendChild(okay)
parent.parentNode.appendChild(div)
document.body.setAttribute("onclick", "")
window.setTimeout(function() { document.body.setAttribute("onclick", "blurDatePicker(event)") }, 200)
lti.focus()
// This is for recalcing the set options if spawned from a
// select/input box with an existing value derived from an
// earlier call to datePicker
var ptype = ""
var pvalue = parent.hasAttribute("data") ? parent.getAttribute("data") : parent.value
if (pvalue.search(/=|-/) != -1) {
// Less than N units ago?
if (pvalue.match(/lte/)) {
var m = pvalue.match(/lte=(\d+)([dMyw])/)
ptype = 'lt'
if (m) {
document.getElementById('datepicker_lti').value = m[1]
var sel = document.getElementById('datepicker_lts')
for (var i in sel.options) {
if (parseInt(i) >= 0) {
if (sel.options[i].value == m[2]) {
sel.options[i].selected = "selected"
} else {
sel.options[i].selected = null
}
}
}
}
}
// More than N units ago?
if (pvalue.match(/gte/)) {
ptype = 'mt'
var m = pvalue.match(/gte=(\d+)([dMyw])/)
if (m) {
document.getElementById('datepicker_mti').value = m[1]
var sel = document.getElementById('datepicker_mts')
// Go through the unit values, select the one we use
for (var i in sel.options) {
if (parseInt(i) >= 0) {
if (sel.options[i].value == m[2]) {
sel.options[i].selected = "selected"
} else {
sel.options[i].selected = null
}
}
}
}
}
// Date range?
if (pvalue.match(/dfr/)) {
ptype = 'cd'
// Make sure we have both a dfr and a dto here, catch them
var mf = pvalue.match(/dfr=(\d+-\d+-\d+)/)
var mt = pvalue.match(/dto=(\d+-\d+-\d+)/)
if (mf && mt) {
// easy peasy, just set two text fields!
document.getElementById('datepicker_cfrom').value = mf[1]
document.getElementById('datepicker_cto').value = mt[1]
}
}
// Month??
if (pvalue.match(/(\d{4})-(\d+)/)) {
ptype = 'cd'
// Make sure we have both a dfr and a dto here, catch them
var m = pvalue.match(/(\d{4})-(\d+)/)
if (m.length == 3) {
// easy peasy, just set two text fields!
var dfrom = new Date(parseInt(m[1]),parseInt(m[2])-1,1, 0, 0, 0)
var dto = new Date(parseInt(m[1]),parseInt(m[2]),0, 23, 59, 59)
document.getElementById('datepicker_cfrom').value = m[0] + "-" + dfrom.getDate()
document.getElementById('datepicker_cto').value = m[0] + "-" + dto.getDate()
}
}
calcTimespan(ptype)
}
}
function datePickerValue(seedPeriod) {
// This is for recalcing the set options if spawned from a
// select/input box with an existing value derived from an
// earlier call to datePicker
var ptype = ""
var rv = seedPeriod
if (seedPeriod && seedPeriod.search && seedPeriod.search(/=|-/) != -1) {
// Less than N units ago?
if (seedPeriod.match(/lte/)) {
var m = seedPeriod.match(/lte=(\d+)([dMyw])/)
ptype = 'lt'
var unitt = units[m[2]]
if (parseInt(m[1]) != 1) {
unitt += "s"
}
rv = "Less than " + m[1] + " " + unitt + " ago"
}
// More than N units ago?
if (seedPeriod.match(/gte/)) {
ptype = 'mt'
var m = seedPeriod.match(/gte=(\d+)([dMyw])/)
var unitt = units[m[2]]
if (parseInt(m[1]) != 1) {
unitt += "s"
}
rv = "More than " + m[1] + " " + unitt + " ago"
}
// Date range?
if (seedPeriod.match(/dfr/)) {
ptype = 'cd'
var mf = seedPeriod.match(/dfr=(\d+-\d+-\d+)/)
var mt = seedPeriod.match(/dto=(\d+-\d+-\d+)/)
if (mf && mt) {
rv = "From " + mf[1] + " to " + mt[1]
}
}
// Month??
if (seedPeriod.match(/^(\d+)-(\d+)$/)) {
ptype = 'mr' // just a made up thing...(month range)
var mr = seedPeriod.match(/(\d+)-(\d+)/)
if (mr) {
dfrom = new Date(parseInt(mr[1]),parseInt(mr[2])-1,1, 0, 0, 0)
rv = months[dfrom.getMonth()] + ', ' + mr[1]
}
}
}
return rv
}
function datePickerDouble(seedPeriod) {
// This basically takes a date-arg and doubles it backwards
// so >=3M becomes =>6M etc. Also returns the cutoff for
// the original date and the span in days of the original
var ptype = ""
var rv = seedPeriod
var dbl = seedPeriod
var tspan = 1
var dfrom = new Date()
var dto = new Date()
// datepicker range?
if (seedPeriod && seedPeriod.search && seedPeriod.search(/=/) != -1) {
// Less than N units ago?
if (seedPeriod.match(/lte/)) {
var m = seedPeriod.match(/lte=(\d+)([dMyw])/)
ptype = 'lt'
rv = "<" + m[1] + m[2] + " ago"
dbl = "lte=" + (parseInt(m[1])*2) + m[2]
// N months ago
if (m[2] == "M") {
dfrom.setMonth(dfrom.getMonth()-parseInt(m[1]), dfrom.getDate())
}
// N days ago
if (m[2] == "d") {
dfrom.setDate(dfrom.getDate()-parseInt(m[1]))
}
// N years ago
if (m[2] == "y") {
dfrom.setYear(dfrom.getFullYear()-parseInt(m[1]))
}
// N weeks ago
if (m[2] == "w") {
dfrom.setDate(dfrom.getDate()-(parseInt(m[1])*7))
}
// Calc total duration in days for this time span
tspan = parseInt((dto.getTime() - dfrom.getTime() + 5000) / (1000*86400))
}
// More than N units ago?
if (seedPeriod.match(/gte/)) {
ptype = 'mt'
var m = seedPeriod.match(/gte=(\d+)([dMyw])/)
rv = ">" + m[1] + m[2] + " ago"
dbl = "gte=" + (parseInt(m[1])*2) + m[2]
tspan = parseInt(parseInt(m[1]) * 30.4)
dfrom = null
// Months
if (m[2] == "M") {
dto.setMonth(dto.getMonth()-parseInt(m[1]), dto.getDate())
}
// Days
if (m[2] == "d") {
dto.setDate(dto.getDate()-parseInt(m[1]))
}
// Years
if (m[2] == "y") {
dto.setYear(dto.getFullYear()-parseInt(m[1]))
}
// Weeks
if (m[2] == "w") {
dto.setDate(dto.getDate()-(parseInt(m[1])*7))
}
// Can't really figure out a timespan for this, so...null!
// This also sort of invalidates use on the trend page, but meh..
tspan = null
}
// Date range?
if (seedPeriod.match(/dfr/)) {
ptype = 'cd'
// Find from and to
var mf = seedPeriod.match(/dfr=(\d+)-(\d+)-(\d+)/)
var mt = seedPeriod.match(/dto=(\d+)-(\d+)-(\d+)/)
if (mf && mt) {
rv = "from " + mf[1] + " to " + mt[1]
// Starts at 00:00:00 on from date
dfrom = new Date(parseInt(mf[1]),parseInt(mf[2])-1,parseInt(mf[3]), 0, 0, 0)
// Ends at 23:59:59 on to date
dto = new Date(parseInt(mt[1]),parseInt(mt[2])-1,parseInt(mt[3]), 23, 59, 59)
// Get duration in days, add 5 seconds to we can floor the value and get an integer
tspan = parseInt((dto.getTime() - dfrom.getTime() + 5000) / (1000*86400))
// double the distance
var dpast = new Date(dfrom)
dpast.setDate(dpast.getDate() - tspan)
dbl = seedPeriod.replace(/dfr=[^|]+/, "dfr=" + (dpast.getFullYear()) + '-' + (dpast.getMonth()+1) + '-' + dpast.getDate())
} else {
tspan = 0
}
}
}
// just N days?
else if (parseInt(seedPeriod).toString() == seedPeriod.toString()) {
tspan = parseInt(seedPeriod)
dfrom.setDate(dfrom.getDate() - tspan)
dbl = "lte=" + (tspan*2) + "d"
}
// Specific month?
else if (seedPeriod.match(/^(\d+)-(\d+)$/)) {
// just a made up thing...(month range)
ptype = 'mr'
var mr = seedPeriod.match(/(\d+)-(\d+)/)
if (mr) {
rv = seedPeriod
// Same as before, start at 00:00:00
dfrom = new Date(parseInt(mr[1]),parseInt(mr[2])-1,1, 0, 0, 0)
// end at 23:59:59
dto = new Date(parseInt(mr[1]),parseInt(mr[2]),0, 23, 59, 59)
// B-A, add 5 seconds so we can floor the no. of days into an integer neatly
tspan = parseInt((dto.getTime() - dfrom.getTime() + 5000) / (1000*86400))
// Double timespan
var dpast = new Date(dfrom)
dpast.setDate(dpast.getDate() - tspan)
dbl = "dfr=" + (dpast.getFullYear()) + '-' + (dpast.getMonth()+1) + '-' + dpast.getDate() + "|dto=" + (dto.getFullYear()) + '-' + (dto.getMonth()+1) + '-' + dto.getDate()
} else {
tspan = 0
}
}
return [dbl, dfrom, dto, tspan]
}
// set date in caller and hide datepicker again.
function setDatepickerDate() {
calcTimespan()
blurDatePicker()
}
// findParent: traverse DOM and see if we can find a parent to 'el'
// called 'name'. This is used for figuring out whether 'el' has
// lost focus or not.
function findParent(el, name) {
if (el.getAttribute && el.getAttribute("id") == name) {
return true
}
if (el.parentNode && el.parentNode.getAttribute) {
if (el.parentNode.getAttribute("id") != name) {
return findParent(el.parentNode, name)
} else {
return true
}
} else {
return false;
}
}
// function for hiding the date picker
function blurDatePicker(evt) {
var es = evt ? (evt.target || evt.srcElement) : null;
if ((!es || !es.parentNode || (!findParent(es, "datepicker_popup") && !findParent(es, "calendarpicker_popup"))) && !(es ? es : "null").toString().match(/javascript:void/)) {
document.getElementById('datepicker_popup').style.display = "none"
$('html').trigger('hide.bs.dropdown')
}
}
// draws the actual calendar inside a calendarPicker object
function drawCalendarPicker(obj, date) {
obj.focus()
// Default to NOW for calendar.
var now = new Date()
// if called with an existing date (YYYY-MM-DD),
// convert it to a JS date object and use that for
// rendering the calendar
if (date) {
var ar = date.split(/-/)
now = new Date(ar[0],parseInt(ar[1])-1,ar[2])
}
var days = ['Mon','Tue','Wed','Thu','Fri','Sat','Sun']
var mat = now
// Go to first day of the month
mat.setDate(1)
obj.innerHTML = "<h3>" + months[mat.getMonth()] + ", " + mat.getFullYear() + ":</h3>"
var tm = mat.getMonth()
// -- Nav buttons --
// back-a-year button
var a = document.createElement('a')
fixupPicker(a)
a.setAttribute("onclick", "drawCalendarPicker(this.parentNode, '" + (mat.getFullYear()-1) + '-' + (mat.getMonth()+1) + '-' + mat.getDate() + "');")
a.setAttribute("href", "javascript:void(0);")
a.innerHTML = "≪"
obj.appendChild(a)
// back-a-month button
a = document.createElement('a')
fixupPicker(a)
a.setAttribute("onclick", "drawCalendarPicker(this.parentNode, '" + mat.getFullYear() + '-' + (mat.getMonth()) + '-' + mat.getDate() + "');")
a.setAttribute("href", "javascript:void(0);")
a.innerHTML = "<"
obj.appendChild(a)
// forward-a-month button
a = document.createElement('a')
fixupPicker(a)
a.setAttribute("onclick", "drawCalendarPicker(this.parentNode, '" + mat.getFullYear() + '-' + (mat.getMonth()+2) + '-' + mat.getDate() + "');")
a.setAttribute("href", "javascript:void(0);")
a.innerHTML = ">"
obj.appendChild(a)
// forward-a-year button
a = document.createElement('a')
fixupPicker(a)
a.setAttribute("onclick", "drawCalendarPicker(this.parentNode, '" + (mat.getFullYear()+1) + '-' + (mat.getMonth()+1) + '-' + mat.getDate() + "');")
a.setAttribute("href", "javascript:void(0);")
a.innerHTML = "≫"
obj.appendChild(a)
obj.appendChild(document.createElement('br'))
// Table containing the dates of the selected month
var table = document.createElement('table')
table.setAttribute("border", "1")
table.style.margin = "0 auto"
// Add header day names
var tr = document.createElement('tr');
for (var m in days) {
var td = document.createElement('th')
td.innerHTML = days[m]
tr.appendChild(td)
}
table.appendChild(tr)
// Until we hit the first day in a month, add blank days
tr = document.createElement('tr');
var weekday = mat.getDay()
if (weekday == 0) {
weekday = 7
}
weekday--;
for (var i = 0; i < weekday; i++) {
var td = document.createElement('td')
tr.appendChild(td)
}
// While still in this month, add day then increment date by 1 day.
while (mat.getMonth() == tm) {
weekday = mat.getDay()
if (weekday == 0) {
weekday = 7
}
weekday--;
if (weekday == 0) {
table.appendChild(tr)
tr = document.createElement('tr');
}
td = document.createElement('td')
// onclick for setting the calendarPicker's parent to this val.
td.setAttribute("onclick", "setCalendarDate('" + mat.getFullYear() + '-' + (mat.getMonth()+1) + '-' + mat.getDate() + "');")
td.innerHTML = mat.getDate()
mat.setDate(mat.getDate()+1)
tr.appendChild(td)
}
table.appendChild(tr)
obj.appendChild(table)
}
// callback for datePicker; sets the cd value to what date was picked
function setCalendarDate(what) {
$('html').on('hide.bs.dropdown', function (e) {
return false;
});
setTimeout(function() { $('html').unbind('hide.bs.dropdown');}, 250);
calendarpicker_spawner.value = what
var div = document.getElementById('calendarpicker_popup')
div.parentNode.focus()
div.style.display = "none"
calcTimespan('cd')
}
// caller for when someone clicks on a calendarPicker enabled field
function showCalendarPicker(parent, seedDate) {
calendarpicker_spawner = parent
// If supplied with a YYYY-MM-DD date, use this to seed the calendar
if (!seedDate) {
var m = parent.value.match(/(\d+-\d+(-\d+)?)/)
if (m) {
seedDate = m[1]
}
}
// Show or create the calendar object
var div = document.getElementById('calendarpicker_popup')
if (!div) {
div = document.createElement('div')
div.setAttribute("id", "calendarpicker_popup")
div.setAttribute("class", "calendarpicker")
document.getElementById('datepicker_popup').appendChild(div)
div.innerHTML = "Calendar goes here..."
}
div.style.display = "block"
var bb = parent.getBoundingClientRect()
// Align with the calling object, slightly below
div.style.top = (bb.bottom + 8) + "px"
div.style.left = (bb.right - 32) + "px"
drawCalendarPicker(div, seedDate)
} | {
"content_hash": "5c83fe898361d662d8d16c0dc876c572",
"timestamp": "",
"source": "github",
"line_count": 724,
"max_line_length": 182,
"avg_line_length": 34.12292817679558,
"alnum_prop": 0.5270188221007893,
"repo_name": "rbowen/ponymail",
"id": "30ba568225289887270b74297280a329e1272611",
"size": "25481",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "site/js/dev/ponymail_datepicker.js",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "19204"
},
{
"name": "HTML",
"bytes": "26933"
},
{
"name": "JavaScript",
"bytes": "338533"
},
{
"name": "Lua",
"bytes": "95899"
},
{
"name": "Shell",
"bytes": "1037"
}
],
"symlink_target": ""
} |
<!DOCTYPE html>
<html xmlns:msxsl="urn:schemas-microsoft-com:xslt">
<head>
<meta content="en-us" http-equiv="Content-Language" />
<meta content="text/html; charset=utf-16" http-equiv="Content-Type" />
<title _locid="PortabilityAnalysis0">.NET Portability Report</title>
<style>
/* Body style, for the entire document */
body {
background: #F3F3F4;
color: #1E1E1F;
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
padding: 0;
margin: 0;
}
/* Header1 style, used for the main title */
h1 {
padding: 10px 0px 10px 10px;
font-size: 21pt;
background-color: #E2E2E2;
border-bottom: 1px #C1C1C2 solid;
color: #201F20;
margin: 0;
font-weight: normal;
}
/* Header2 style, used for "Overview" and other sections */
h2 {
font-size: 18pt;
font-weight: normal;
padding: 15px 0 5px 0;
margin: 0;
}
/* Header3 style, used for sub-sections, such as project name */
h3 {
font-weight: normal;
font-size: 15pt;
margin: 0;
padding: 15px 0 5px 0;
background-color: transparent;
}
h4 {
font-weight: normal;
font-size: 12pt;
margin: 0;
padding: 0 0 0 0;
background-color: transparent;
}
/* Color all hyperlinks one color */
a {
color: #1382CE;
}
/* Paragraph text (for longer informational messages) */
p {
font-size: 10pt;
}
/* Table styles */
table {
border-spacing: 0 0;
border-collapse: collapse;
font-size: 10pt;
}
table th {
background: #E7E7E8;
text-align: left;
text-decoration: none;
font-weight: normal;
padding: 3px 6px 3px 6px;
}
table td {
vertical-align: top;
padding: 3px 6px 5px 5px;
margin: 0px;
border: 1px solid #E7E7E8;
background: #F7F7F8;
}
.NoBreakingChanges {
color: darkgreen;
font-weight:bold;
}
.FewBreakingChanges {
color: orange;
font-weight:bold;
}
.ManyBreakingChanges {
color: red;
font-weight:bold;
}
.BreakDetails {
margin-left: 30px;
}
.CompatMessage {
font-style: italic;
font-size: 10pt;
}
.GoodMessage {
color: darkgreen;
}
/* Local link is a style for hyperlinks that link to file:/// content, there are lots so color them as 'normal' text until the user mouse overs */
.localLink {
color: #1E1E1F;
background: #EEEEED;
text-decoration: none;
}
.localLink:hover {
color: #1382CE;
background: #FFFF99;
text-decoration: none;
}
/* Center text, used in the over views cells that contain message level counts */
.textCentered {
text-align: center;
}
/* The message cells in message tables should take up all avaliable space */
.messageCell {
width: 100%;
}
/* Padding around the content after the h1 */
#content {
padding: 0px 12px 12px 12px;
}
/* The overview table expands to width, with a max width of 97% */
#overview table {
width: auto;
max-width: 75%;
}
/* The messages tables are always 97% width */
#messages table {
width: 97%;
}
/* All Icons */
.IconSuccessEncoded, .IconInfoEncoded, .IconWarningEncoded, .IconErrorEncoded {
min-width: 18px;
min-height: 18px;
background-repeat: no-repeat;
background-position: center;
}
/* Success icon encoded */
.IconSuccessEncoded {
/* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */
/* [---XsltValidateInternal-Base64EncodedImage:IconSuccess#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABPElEQVR4Xp1Tv0vDUBi8FqeA4NpBcBLcWnQSApncOnTo4FSnjP0DsnXpH5CxiwbHDg4Zuj4oOEXiJgiC4FDcCkLWmIMc1Pfw+eMgQ77v3Xf3Pe51YKGqqisAEwCR1TIAsiAIblSo6xrdHeJR85Xle3mdmCQKb0PsfqyxxzM8K15HZADl/H5+sHpZwYfxyRjTs+kWwKBx8yoHd2mRiuzF8mkJniWH/13u3Fjrs/EdhsdDFHGB/DLXEJBDLh1MWPAhPo1BLB4WX5yQywHR+m3tVe/t97D52CB/ziG0nIgD/qDuYg8WuCcVZ2YGwlJ3YDugkpR/VNcAEx6GEKhERSr71FuO4YCM4XBdwKvecjIlkSnsO0Hyp/GxSeJAdzBKzpOtnPwyyiPdAZhpZptT04tU+zk7s8czeges//s5C5+CwqrR4/gw+AAAAABJRU5ErkJggg==);
}
/* Information icon encoded */
.IconInfoEncoded {
/* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */
/* [---XsltValidateInternal-Base64EncodedImage:IconInformation#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABHElEQVR4Xs2TsUoDQRRF7wwoziokjZUKadInhdhukR9YP8DMX1hYW+QvdsXa/QHBbcXC7W0CamWTQnclFutceIQJwwaWNLlwm5k5d94M76mmaeCrrmsLYOocY12FcxZFUeozCqKqqgYA8uevv1H6VuPxcwlfk5N92KHBxfFeCSAxxswlYAW/Xr989x/mv9gkhtyMDhcAxgzRsp7flj8B/HF1RsMXq+NZMkopaHe7lbKxQUEIGbKsYNoGn969060hZBkQex/W8oRQwsQaW2o3Ago2SVcJUzAgY3N0lTCZZm+zPS8HB51gMmS1DEYyOz9acKO1D8JWTlafKIMxdhvlfdyT94Vv5h7P8Ky7nQzACmhvKq3zk3PjW9asz9D/1oigecsioooAAAAASUVORK5CYII=);
}
/* Warning icon encoded */
.IconWarningEncoded {
/* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */
/* [---XsltValidateInternal-Base64EncodedImage:IconWarning#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAx0lEQVR4XpWSMQ7CMAxFf4xAyBMLCxMrO8dhaBcuwdCJS3RJBw7SA/QGTCxdWJgiQYWKXJWKIXHIlyw5lqr34tQgEOdcBsCOx5yZK3hCCKdYXneQkh4pEfqzLfu+wVDSyyzFoJjfz9NB+pAF+eizx2Vruts0k15mPgvS6GYvpVtQhB61IB/dk6AF6fS4Ben0uIX5odtFe8Q/eW1KvFeH4e8khT6+gm5B+t3juyDt7n0jpe+CANTd+oTUjN/U3yVaABnSUjFz/gFq44JaVSCXeQAAAABJRU5ErkJggg==);
}
/* Error icon encoded */
.IconErrorEncoded {
/* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */
/* [---XsltValidateInternal-Base64EncodedImage:IconError#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABQElEQVR4XqWTvUoEQRCE6wYPZUA80AfwAQz23uCMjA7MDRQEIzPBVEyNTQUFIw00vcQTTMzuAh/AxEQQT8HF/3G/oGGnEUGuoNnd6qoZuqltyKEsyzVJq5I6rnUp6SjGeGhESikzzlc1eL7opfuVbrqbU1Zw9NCgtQMaZpY0eNnaaL2fHusvTK5vKu7sjSS1Y4y3QUA6K3e3Mau5UFDyMP7tYF9o8cAHZv68vipoIJg971PZIZ5HiwdvYGGvFVFHmGmZ2MxwmQYPXubPl9Up0tfoMQGetXd6mRbvhBw+boZ6WF7Mbv1+GsHRk0fQmPAH1GfmZirbCfDJ61tw3Px8/8pZsPAG4jlVhcPgZ7adwNWBB68lkRQWFiTgFlbnLY3DGGM7izIJIyT/jjIvEJw6fdJTc6krDzh6aMwMP9bvDH4ADSsa9uSWVJkAAAAASUVORK5CYII=);
}
</style>
</head>
<body>
<h1 _locid="PortabilityReport">.NET Portability Report</h1>
<div id="content">
<div id="submissionId" style="font-size:8pt;">
<p>
<i>
Submission Id
98079f9a-47d5-4c33-8a8e-267cf332fe5d
</i>
</p>
</div>
<h2 _locid="SummaryTitle">
<a name="Portability Summary"></a>Portability Summary
</h2>
<div id="summary">
<table>
<tbody>
<tr>
<th>Assembly</th>
<th>ASP.NET 5,Version=v1.0</th>
<th>Windows,Version=v8.1</th>
<th>.NET Framework,Version=v4.6</th>
<th>Windows Phone,Version=v8.1</th>
</tr>
<tr>
<td><strong><a href="#codestuffers.MvvmCross.Plugins.UserInteraction">codestuffers.MvvmCross.Plugins.UserInteraction</a></strong></td>
<td class="text-center">100.00 %</td>
<td class="text-center">100.00 %</td>
<td class="text-center">100.00 %</td>
<td class="text-center">100.00 %</td>
</tr>
</tbody>
</table>
</div>
<div id="details">
</div>
</div>
</body>
</html> | {
"content_hash": "7854c334e5a92b57960ab8586e1b1144",
"timestamp": "",
"source": "github",
"line_count": 240,
"max_line_length": 562,
"avg_line_length": 40.44583333333333,
"alnum_prop": 0.5757700628412485,
"repo_name": "kuhlenh/port-to-core",
"id": "14bcab2e71d3d0e51f502ee452b09f3a11900819",
"size": "9707",
"binary": false,
"copies": "1",
"ref": "refs/heads/gh-pages",
"path": "Reports/co/codestuffers.mvvmcross.userinteraction.0.1.2/codestuffers.MvvmCross.Plugins.UserInteraction-wp8.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "HTML",
"bytes": "2323514650"
}
],
"symlink_target": ""
} |
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Colony Navigator 3</string>
<string name="preferences">Preferences</string>
<string name="search">Search</string>
<string name="visited">Visited</string>
<string name="active">Active</string>
<string name="layers">Layers</string>
<string name="my_location">Show my location</string>
<string name="edit_colony">Edit colony information</string>
<string name="save_action">OK</string>
<string name="cancel_action">Cancel</string>
<string name="title_activity_update">Update</string>
<string name="hello_world">Hello world!</string>
<string name="ok">OK</string>
<string name="updating">Updating…</string>
<string name="temp_status_text">Update status</string>
<string name="title_activity_update_check">UpdateCheckActivity</string>
<string name="checking_for_updates">Checking for updates…</string>
<string name="check_for_updates">Check for updates</string>
</resources>
| {
"content_hash": "51d81925fb2f65fb31731a9e24e0947e",
"timestamp": "",
"source": "github",
"line_count": 23,
"max_line_length": 76,
"avg_line_length": 44.78260869565217,
"alnum_prop": 0.6970873786407767,
"repo_name": "samcrow/ColonyNavigator3",
"id": "841f1e8c36732b5d621a17348c787f1dc029d24c",
"size": "1030",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "res/values/strings.xml",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Java",
"bytes": "113579"
}
],
"symlink_target": ""
} |
namespace Serenity.Services
{
public class SaveRequestHandler<TRow> : SaveRequestHandler<TRow, SaveRequest<TRow>, SaveResponse>,
ISaveHandler<TRow>
where TRow : class, IRow, IIdRow, new()
{
public SaveRequestHandler(IRequestContext context)
: base(context)
{
}
}
}
| {
"content_hash": "14cae5e1c0a6aed860908eb4e22711dc",
"timestamp": "",
"source": "github",
"line_count": 12,
"max_line_length": 102,
"avg_line_length": 28.5,
"alnum_prop": 0.6052631578947368,
"repo_name": "volkanceylan/Serenity",
"id": "c78e5c7841505e0b2b8e43d25a2932457deb4156",
"size": "344",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/Serenity.Net.Services/RequestHandlers/Save/SaveRequestHandlerT.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "1592"
},
{
"name": "C#",
"bytes": "3328213"
},
{
"name": "CSS",
"bytes": "198506"
},
{
"name": "HTML",
"bytes": "2818"
},
{
"name": "JavaScript",
"bytes": "638940"
},
{
"name": "Roff",
"bytes": "11586"
},
{
"name": "Shell",
"bytes": "287"
},
{
"name": "Smalltalk",
"bytes": "290"
},
{
"name": "TSQL",
"bytes": "1592"
},
{
"name": "TypeScript",
"bytes": "804757"
},
{
"name": "XSLT",
"bytes": "17702"
}
],
"symlink_target": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.