text stringlengths 2 1.04M | meta dict |
|---|---|
package sample.data.jpa.domain;
import java.io.Serializable;
import java.util.Date;
public class ReviewDetails implements Serializable {
private static final long serialVersionUID = 1L;
private Rating rating;
private Date checkInDate;
private TripType tripType;
private String title;
private String details;
public ReviewDetails() {
}
public Rating getRating() {
return this.rating;
}
public void setRating(Rating rating) {
this.rating = rating;
}
public Date getCheckInDate() {
return this.checkInDate;
}
public void setCheckInDate(Date checkInDate) {
this.checkInDate = checkInDate;
}
public TripType getTripType() {
return this.tripType;
}
public void setTripType(TripType tripType) {
this.tripType = tripType;
}
public String getTitle() {
return this.title;
}
public void setTitle(String title) {
this.title = title;
}
public String getDetails() {
return this.details;
}
public void setDetails(String details) {
this.details = details;
}
}
| {
"content_hash": "5540d539ae08c800cf0b1cc4d38b274e",
"timestamp": "",
"source": "github",
"line_count": 65,
"max_line_length": 52,
"avg_line_length": 15.6,
"alnum_prop": 0.7268244575936884,
"repo_name": "lburgazzoli/spring-boot",
"id": "7379701f515461cebdc5d85f6a6a96d90f8047f4",
"size": "1635",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "spring-boot-samples/spring-boot-sample-data-jpa/src/main/java/sample/data/jpa/domain/ReviewDetails.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "6954"
},
{
"name": "CSS",
"bytes": "5769"
},
{
"name": "FreeMarker",
"bytes": "2134"
},
{
"name": "Groovy",
"bytes": "49512"
},
{
"name": "HTML",
"bytes": "69689"
},
{
"name": "Java",
"bytes": "11602150"
},
{
"name": "JavaScript",
"bytes": "37789"
},
{
"name": "Ruby",
"bytes": "1307"
},
{
"name": "Shell",
"bytes": "27916"
},
{
"name": "Smarty",
"bytes": "3276"
},
{
"name": "XSLT",
"bytes": "34105"
}
],
"symlink_target": ""
} |
$(document).ready(function() {
var menuToggle = $('#js-centered-navigation-mobile-menu').unbind();
$('#js-centered-navigation-menu').removeClass("show");
menuToggle.on('click', function(e) {
e.preventDefault();
$('#js-centered-navigation-menu').slideToggle(function(){
if($('#js-centered-navigation-menu').is(':hidden')) {
$('#js-centered-navigation-menu').removeAttr('style');
}
});
});
});
| {
"content_hash": "5fe95ae391f475770311cdeba1bf6c01",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 71,
"avg_line_length": 36.38461538461539,
"alnum_prop": 0.5623678646934461,
"repo_name": "aquarimeter/aquarimeter-web",
"id": "320ec6fa044769ef5648922fa47241040e5fb1c6",
"size": "1230",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "app/assets/javascripts/application.js",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "87109"
},
{
"name": "CoffeeScript",
"bytes": "339"
},
{
"name": "HTML",
"bytes": "18943"
},
{
"name": "JavaScript",
"bytes": "436187"
},
{
"name": "Ruby",
"bytes": "121351"
}
],
"symlink_target": ""
} |
using System;
public static partial class Extensions
{
/// <summary>
/// A T extension method to determines whether the object is equal to any of the provided values.
/// </summary>
/// <param name="this">The object to be compared.</param>
/// <param name="values">The value list to compare with the object.</param>
/// <returns>true if the values list contains the object, else false.</returns>
/// ###
/// <typeparam name="T">Generic type parameter.</typeparam>
public static bool In(this UInt16 @this, params UInt16[] values)
{
return Array.IndexOf(values, @this) != -1;
}
} | {
"content_hash": "e8353f3e986b0d64686de2f4f30bebe6",
"timestamp": "",
"source": "github",
"line_count": 17,
"max_line_length": 105,
"avg_line_length": 37.294117647058826,
"alnum_prop": 0.6451104100946372,
"repo_name": "mario-loza/Z.ExtensionMethods",
"id": "b9865b849fee420db08ad0bdcc7be1e47c663093",
"size": "1018",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "src/Z.Core/System.UInt16/_CoreObject/UInt16.In.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "2220012"
},
{
"name": "Visual Basic",
"bytes": "1418004"
}
],
"symlink_target": ""
} |
if ( typeof state4 === 'undefined'){
state4 = "block";
}
state4 == "block" ? state4 = "none" : state4 = "block";
var myJavaScript = "$('.dots:contains(\x22....\x22)').closest('.leaflet-marker-icon').css('display','" + state4 + "');";
var scriptTag = document.createElement("script");
scriptTag.innerHTML = myJavaScript;
document.head.appendChild(scriptTag); | {
"content_hash": "e134270a6152e9701faac56934df28fb",
"timestamp": "",
"source": "github",
"line_count": 8,
"max_line_length": 121,
"avg_line_length": 44.875,
"alnum_prop": 0.6685236768802229,
"repo_name": "DemonKart/GymhuntrRaids",
"id": "0d7a02dc2afca8b85a34494c2e87b8882d1960f4",
"size": "404",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "javascripts/show4.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "290"
},
{
"name": "HTML",
"bytes": "503"
},
{
"name": "JavaScript",
"bytes": "4563"
}
],
"symlink_target": ""
} |
import base64
import functools
def httpbasic(method):
"""
Thanks Kevin Kelley <kelleyk@kelleyk.net> 2011
http://kelleyk.com/post/7362319243/easy-basic-http-authentication-with-tornado
"""
@functools.wraps(method)
def wrapper(self, *args, **kwargs):
auth_header = self.request.headers.get('Authorization')
if auth_header is None or not auth_header.startswith('Basic '):
self.set_status(401)
self.set_header('WWW-Authenticate', 'Basic realm=Restricted')
self.finish()
return None
else:
auth_decoded = base64.decodestring(auth_header[6:])
username, password = auth_decoded.split(':', 2)
kwargs['user'], kwargs['pass'] = username, password
return method(self, *args, **kwargs)
return wrapper
def unauthorized(method):
"""
Temporary decorator to disable access to endpoints
"""
@functools.wraps(method)
def wrapper(self, *args, **kwargs):
self.set_status(403)
self.write("Unavailable")
self.finish()
return None
return wrapper
| {
"content_hash": "fa71eecccd72979d869af7ef6e68390b",
"timestamp": "",
"source": "github",
"line_count": 36,
"max_line_length": 82,
"avg_line_length": 31.38888888888889,
"alnum_prop": 0.6185840707964602,
"repo_name": "gabalese/py-clave",
"id": "811602b3c446221bd724c31a5c639a8bc2b46ec1",
"size": "1130",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "controllers/authorization.py",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Python",
"bytes": "52115"
}
],
"symlink_target": ""
} |
基本知識:學會如何編輯(edit),剖析(parse),驗證 (validate) 與轉換 (transform) XML 標記文件。
- 剖析(parse):
- 驗證 (validate) : against certain DTD/ Schema(xsl)
## 例子
老莎的十四行
```xml
<?xml version="1.0"?>
<!DOCTYPE sonnet SYSTEM "sonnet.dtd">
<sonnet type="Shakespearean">
<author>
<last-name>Shakespeare</last-name>
<first-name>William</first-name>
<nationality>British</nationality>
<year-of-birth>1564</year-of-birth>
<year-of-death>1616</year-of-death>
</author>
<title>Sonnet 130</title>
<lines>
<line>My mistress' eyes are nothing like the sun,</line>
<line>Coral is far more red than her lips red.</line>
<line>If snow be white, why then her breasts are dun,</line>
<line>If hairs be wires, black wires grow on her head.</line>
<line>I have seen roses damasked, red and white,</line>
<line>But no such roses see I in her cheeks.</line>
<line>And in some perfumes is there more delight</line>
<line>Than in the breath that from my mistress reeks.</line>
<line>I love to hear her speak, yet well I know</line>
<line>That music hath a far more pleasing sound.</line>
<line>I grant I never saw a goddess go,</line>
<line>My mistress when she walks, treads on the ground.</line>
<line>And yet, by Heaven, I think my love as rare</line>
<line>As any she belied with false compare.</line>
</lines>
</sonnet>
```
## 剖析器
- XML parser 用來 parse and validate XML。
- 免費的有很多,可用 [Apache Software Foundation’s Xerces-Java XML parser](http://xerces.apache.org/xerces2-j/)。因為可以從指令列使用。
- 直接用 [`GATE`](https://gate.ac.uk/)
---
## 參考
- [W3School](http://www.w3schools.com) 有許多練習
- (Tidwell 2002). Introduction to XML .
- (Wilcock, 2009). Linguistic annotation and text analytics. | {
"content_hash": "a1ee48bf6a80ad5923904250b6538fef",
"timestamp": "",
"source": "github",
"line_count": 58,
"max_line_length": 114,
"avg_line_length": 30.17241379310345,
"alnum_prop": 0.6708571428571428,
"repo_name": "loperntu/ladsbook",
"id": "49932e89e4e7521a674a55f2a327e22574e8d87d",
"size": "1920",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "xml_tutorial.md",
"mode": "33188",
"license": "mit",
"language": [],
"symlink_target": ""
} |
package initDb
import (
"database/sql"
"encoding/xml"
"reflect"
"testing"
"github.com/davecgh/go-spew/spew"
_ "github.com/go-sql-driver/mysql"
"github.com/murder-hobos/murder-hobos/model"
)
func TestXMLSpell_ToDbSpell(t *testing.T) {
type fields struct {
XMLName xml.Name
Name string
Level string
School string
Ritual string
Time string
Range string
Components string
Duration string
Classes string
Texts []string
}
tests := []struct {
name string
fields fields
want model.Spell
wantErr bool
}{
{
"Zone of truth. Should work.",
fields{
Name: "Zone of Truth",
Level: "2",
School: "EN",
Ritual: "",
Time: "1 action",
Range: "60 feet",
Components: "V, S, M",
Duration: "10 minutes",
Classes: "Bard, Cleric, Paladin, Paladin (Devotion), Paladin (Crown)",
Texts: []string{"You create a magical zone that guards against deception in a 15-foot-radius sphere centered on a point of your choice within range. Until the spell ends, a creature that enters the spell's area for the first time on a turn or starts its turn there must make a Charisma saving throw. On a failed save, a creature can't speak a deliberate lie while in the radius. You know whether each creature succeeds or fails on its saving throw.",
"",
"An affected creature is aware of the spell and can thus avoid answering questions to which it would normally respond with a lie. Such creatures can be evasive in its answers as long as it remains within the boundaries of the truth.",
},
},
model.Spell{
Name: "Zone of Truth",
Level: "2",
School: "Enchantment",
CastTime: "1 action",
Duration: "10 minutes",
Range: "60 feet",
Verbal: true,
Somatic: true,
Material: true,
MaterialDesc: sql.NullString{
String: "",
Valid: false,
},
Concentration: false,
Ritual: false,
Description: "You create a magical zone that guards against deception in a 15-foot-radius sphere centered on a point of your choice within range. Until the spell ends, a creature that enters the spell's area for the first time on a turn or starts its turn there must make a Charisma saving throw. On a failed save, a creature can't speak a deliberate lie while in the radius. You know whether each creature succeeds or fails on its saving throw.<br/><br/>An affected creature is aware of the spell and can thus avoid answering questions to which it would normally respond with a lie. Such creatures can be evasive in its answers as long as it remains within the boundaries of the truth.",
SourceID: PHBid,
},
false,
},
{
"Absorb Elements. Should be EE.",
fields{
Name: "Absorb Elements (EE)",
Level: "1",
School: "A",
Ritual: "",
Time: "1 reaction, which you take when you take acid, cold, fire, lightning, or thunder damage",
Range: "",
Components: "S",
Duration: "1 round",
Classes: "Druid, Ranger, Wizard, Fighter (Eldritch Knight)",
Texts: []string{"The spell captures some of the incoming energy, lessening its effect on you and storing it for your next melee attack. You have resistance to the triggering damage type until the start of your next turn. Also, the first time you hit with a melee attack on your next turn, the target takes an extra 1d6 damage of the triggering type, and the spell ends.",
"",
"At Higher Levels: When you cast this spell using a spell slot of 2nd level or higher, the extra damage increases by 1d6 for each slot level above 1st.",
"",
"This spell can be found in the Elemental Evil Player's Companion",
},
},
model.Spell{
Name: "Absorb Elements",
Level: "1",
School: "Abjuration",
CastTime: "1 reaction, which you take when you take acid, cold, fire, lightning, or thunder damage",
Duration: "1 round",
Range: "",
Verbal: false,
Somatic: true,
Material: false,
MaterialDesc: sql.NullString{
String: "",
Valid: false,
},
Concentration: false,
Ritual: false,
Description: "The spell captures some of the incoming energy, lessening its effect on you and storing it for your next melee attack. You have resistance to the triggering damage type until the start of your next turn. Also, the first time you hit with a melee attack on your next turn, the target takes an extra 1d6 damage of the triggering type, and the spell ends.<br/><br/>At Higher Levels: When you cast this spell using a spell slot of 2nd level or higher, the extra damage increases by 1d6 for each slot level above 1st.<br/><br/>This spell can be found in the Elemental Evil Player's Companion",
SourceID: EEid,
},
false,
},
}
for _, tt := range tests {
x := XMLSpell{
Name: tt.fields.Name,
Level: tt.fields.Level,
School: tt.fields.School,
Ritual: tt.fields.Ritual,
Time: tt.fields.Time,
Range: tt.fields.Range,
Components: tt.fields.Components,
Duration: tt.fields.Duration,
Classes: tt.fields.Classes,
Texts: tt.fields.Texts,
}
got, err := x.ToDbSpell()
if (err != nil) != tt.wantErr {
t.Errorf("%q. XMLSpell.ToDbSpell() error = %v, wantErr %v", tt.name, err, tt.wantErr)
continue
}
if !reflect.DeepEqual(got, tt.want) {
spew.Dump(got, tt.want)
t.Errorf("%q. XMLSpell.ToDbSpell() = %v, want %v", tt.name, got, tt.want)
}
}
}
func TestXMLSpell_ParseClasses(t *testing.T) {
type fields struct {
Name string
Level string
School string
Ritual string
Time string
Range string
Components string
Duration string
Classes string
Texts []string
}
tests := []struct {
name string
fields fields
want []model.Class
want1 bool
}{
{
"3 classes",
fields{
Classes: "Cleric, Cleric (Arcana), Druid",
},
[]model.Class{
model.Class{
ID: 2,
Name: "Cleric",
BaseClass: sql.NullInt64{
Int64: 0,
Valid: false,
},
},
model.Class{
ID: 3,
Name: "Cleric (Arcana)",
BaseClass: sql.NullInt64{
Int64: 2,
Valid: true,
},
},
model.Class{
ID: 12,
Name: "Druid",
BaseClass: sql.NullInt64{
Int64: 0,
Valid: false,
},
},
},
true,
},
{
"No classes",
fields{},
[]model.Class{},
false,
},
{
"One class",
fields{
Classes: "Bard",
},
[]model.Class{
model.Class{
ID: 1,
Name: "Bard",
BaseClass: sql.NullInt64{
Int64: 0,
Valid: false,
},
},
},
true,
},
{
"Absorb Elements (EE)",
fields{
Classes: "Druid, Ranger, Wizard, Fighter (Eldritch Knight)",
},
[]model.Class{
model.Class{
ID: 12,
Name: "Druid",
BaseClass: sql.NullInt64{
Int64: 0,
Valid: false,
},
},
model.Class{
ID: 27,
Name: "Ranger",
BaseClass: sql.NullInt64{
Int64: 0,
Valid: false,
},
},
model.Class{
ID: 34,
Name: "Wizard",
BaseClass: sql.NullInt64{
Int64: 0,
Valid: false,
},
},
model.Class{
ID: 36,
Name: "Fighter (Eldritch Knight)",
BaseClass: sql.NullInt64{
Int64: 35,
Valid: true,
},
},
},
true,
},
}
for _, tt := range tests {
x := &XMLSpell{
Name: tt.fields.Name,
Level: tt.fields.Level,
School: tt.fields.School,
Ritual: tt.fields.Ritual,
Time: tt.fields.Time,
Range: tt.fields.Range,
Components: tt.fields.Components,
Duration: tt.fields.Duration,
Classes: tt.fields.Classes,
Texts: tt.fields.Texts,
}
got, got1 := x.ParseClasses()
if !reflect.DeepEqual(got, tt.want) {
t.Errorf("%q. XMLSpell.ParseClasses() got = %v, want %v", tt.name, got, tt.want)
}
if got1 != tt.want1 {
t.Errorf("%q. XMLSpell.ParseClasses() got1 = %v, want %v", tt.name, got1, tt.want1)
}
}
}
func TestXMLSpell_parseComponents(t *testing.T) {
type fields struct {
Name string
Level string
School string
Ritual string
Time string
Range string
Components string
Duration string
Classes string
Texts []string
}
tests := []struct {
name string
fields fields
want components
}{
{
"V",
fields{Components: "V"},
components{Verb: true, Som: false, Mat: false, Matdesc: sql.NullString{
String: "",
Valid: false},
},
},
{
"V, S",
fields{Components: "V, S"},
components{Verb: true, Som: true, Mat: false, Matdesc: sql.NullString{
String: "",
Valid: false},
},
},
{
"V, S, M",
fields{Components: "V, S, M"},
components{Verb: true, Som: true, Mat: true, Matdesc: sql.NullString{
String: "",
Valid: false},
},
},
{
"V, S, M (text)",
fields{Components: "V, S, M (a jade circlet worth at least 1,500 gp, which you must place on your head before you cast the spell)"},
components{Verb: true, Som: true, Mat: true, Matdesc: sql.NullString{
String: "A jade circlet worth at least 1,500 gp, which you must place on your head before you cast the spell",
Valid: true},
},
},
{
"S",
fields{Components: "S"},
components{Verb: false, Som: true, Mat: false, Matdesc: sql.NullString{
String: "",
Valid: false},
},
},
{
"V, M (text)",
fields{Components: "V, M (bat fur and a drop of pitch or piece of coal)"},
components{Verb: true, Som: false, Mat: true, Matdesc: sql.NullString{
String: "Bat fur and a drop of pitch or piece of coal",
Valid: true},
},
},
{
"S, M",
fields{Components: "S, M"},
components{Verb: false, Som: true, Mat: true, Matdesc: sql.NullString{
String: "",
Valid: false},
},
},
{
"S, M (text)",
fields{Components: "S, M (a glowing stick of incense or a crystal vial filled with phosphorescent material)"},
components{Verb: false, Som: true, Mat: true, Matdesc: sql.NullString{
String: "A glowing stick of incense or a crystal vial filled with phosphorescent material",
Valid: true},
},
},
}
for _, tt := range tests {
x := &XMLSpell{
Name: tt.fields.Name,
Level: tt.fields.Level,
School: tt.fields.School,
Ritual: tt.fields.Ritual,
Time: tt.fields.Time,
Range: tt.fields.Range,
Components: tt.fields.Components,
Duration: tt.fields.Duration,
Classes: tt.fields.Classes,
Texts: tt.fields.Texts,
}
if got := x.parseComponents(); !reflect.DeepEqual(got, tt.want) {
t.Errorf("%q. XMLSpell.parseComponents() = %v, want %v", tt.name, got, tt.want)
}
}
}
| {
"content_hash": "d20f78d8f4a68ce7eed355ebd49641d9",
"timestamp": "",
"source": "github",
"line_count": 380,
"max_line_length": 702,
"avg_line_length": 28.597368421052632,
"alnum_prop": 0.6113002668629797,
"repo_name": "murder-hobos/murder-hobos",
"id": "c4989909a60598cb61762da1050ac6e1debf4efb",
"size": "10867",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "db/initDb/parser_test.go",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "3551"
},
{
"name": "Go",
"bytes": "76007"
},
{
"name": "HTML",
"bytes": "28580"
},
{
"name": "JavaScript",
"bytes": "1379"
}
],
"symlink_target": ""
} |
=================================================================
Build Murano Application Definition Archive from hello_world CSAR
=================================================================
In order to build a Murano application definition archive from the hello_world
CSAR and the corresponding logo and manifest files, from inside the hello_world
folder run following commands:
1. Download archive from https://github.com/openstack/heat-translator/raw/0.4.0/translator/tests/data/csar_hello_world.zip
2. Rename it to 'csar.zip'
3. *zip csar_helloworld_murano_package.zip csar.zip logo.png manifest.yaml*
The resulting file *csar_helloworld_murano_package.zip* is the application
definition archive that can be imported into the Murano application catalog.
| {
"content_hash": "aac8574340c30d735369743d2f364128",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 122,
"avg_line_length": 59.07692307692308,
"alnum_prop": 0.67578125,
"repo_name": "openstack/murano",
"id": "35cc3025616f717b4614a59d1cb817d8d81a9bb3",
"size": "768",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "contrib/plugins/murano_heat-translator_plugin/sample/hello_world/README.rst",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Mako",
"bytes": "2026"
},
{
"name": "PowerShell",
"bytes": "2966"
},
{
"name": "Python",
"bytes": "1817159"
},
{
"name": "Shell",
"bytes": "37531"
}
],
"symlink_target": ""
} |
{% load i18n %}
{% load core_tags %}
{% load privacy_tags %}
{% load gravatar %}
<!-- BEGIN project bar -->
<div id="project_bar" class="project-bar">
<div class="wrapper">
{% if project.has_good_build %}
<div class="project-view-docs">
<a href="{{ project.get_docs_url }}">{% trans "View Docs" %}</a>
</div>
{% endif %}
<div class="project-title">
<h1>
<span class="project-breadcrumb quiet">
{% block project-breadcrumb %}
<a href="{% url "projects_dashboard" %}">{% trans "Projects" %}</a> >
{% endblock %}
</span>
<a href="{{ project.get_absolute_url }}">{{ project }}</a>
</h1>
</div>
<div class="options">
{% if not project.has_valid_webhook and request.user|is_admin:project %}
<p class="build-failure">
{% url "projects_integrations" project.slug as integrations_url %}
{% blocktrans %}
This repository doesn't have a valid webhook set up,
commits won't trigger new builds for this project.
{% endblocktrans %}
<br>
{% blocktrans %}
See <a href='{{ integrations_url }}'>your project integrations</a> for more information.
{% endblocktrans %}
</p>
{% endif %}
{% if project.skip %}
<p class="build-failure">
{% blocktrans %}
Your project is currently disabled for abuse of the system.
Please make sure it isn't using unreasonable amounts of resources or triggering lots of builds in a short amount of time.
Please <a href="https://github.com/rtfd/readthedocs.org/issues">file a ticket</a> to get your project re-enabled.
{% endblocktrans %}
</p>
<br>
{% endif %}
<ul>
<li class="{{ overview_active }}"><a href="{{ project.get_absolute_url }}">{% trans "Overview" %}</a></li>
<li class="{{ downloads_active }}"><a href="{% url "project_downloads" project.slug %}" rel="nofollow,noindex">{% trans "Downloads" %}</a></li>
<li class="{{ search_active }}"><a href="{% url "elastic_project_search" project.slug %}" rel="nofollow,noindex">{% trans "Search" %}</a></li>
<li class="{{ builds_active }}"><a href="{{ project.get_builds_url }}">{% trans "Builds" %}</a></li>
<li class="{{ versions_active }}"><a href="{% url "project_version_list" project.slug %}">{% trans "Versions" %}</a></li>
{% comment %}
{% if request.user.is_authenticated %}
<li class="{{ tools_active }}"><a href="{% url 'project_embed' project.slug %}">{% trans "Tools" %}</a></li>
{% endif %}
{% endcomment %}
{% if request.user|is_admin:project %}
<!-- <li class="{{ comments_active }}"><a href="{% url "projects_comments_moderation" project.slug %}">{% trans "Comments" %}</a></li> -->
<li class="{{ edit_active }} project-admin"><a href="{% url "projects_edit" project.slug %}"><i class="gear"></i>{% trans "Admin" %}</a></li>
{% endif %}
</ul>
</div>
</div>
</div>
<!-- END project bar -->
| {
"content_hash": "fcfe4c6780c834619724ece566742ed5",
"timestamp": "",
"source": "github",
"line_count": 80,
"max_line_length": 151,
"avg_line_length": 38.9375,
"alnum_prop": 0.550561797752809,
"repo_name": "pombredanne/readthedocs.org",
"id": "1224442eed43f243c2ef1e403779ee9699c76d79",
"size": "3115",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "readthedocs/templates/core/project_bar_base.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "4515"
},
{
"name": "CSS",
"bytes": "66514"
},
{
"name": "HTML",
"bytes": "205587"
},
{
"name": "JavaScript",
"bytes": "444672"
},
{
"name": "Makefile",
"bytes": "4594"
},
{
"name": "Python",
"bytes": "1175310"
}
],
"symlink_target": ""
} |
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="auto" package="com.yourcompany.ColorTestApp">
<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="28" />
<application android:label="ColorTestApp"></application>
</manifest> | {
"content_hash": "7f6f360d85573c3726701a41847a707e",
"timestamp": "",
"source": "github",
"line_count": 5,
"max_line_length": 139,
"avg_line_length": 64,
"alnum_prop": 0.765625,
"repo_name": "KSemenenko/ColorThief",
"id": "af6643699e94772622bb55260f3c9c15ff3c94eb",
"size": "322",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "ColorTestApp/ColorTestApp.Droid/Properties/AndroidManifest.xml",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "87"
},
{
"name": "C#",
"bytes": "97660"
}
],
"symlink_target": ""
} |
package io.realm.entities.migration;
import io.realm.RealmObject;
import io.realm.annotations.PrimaryKey;
import io.realm.migration.MigrationPrimaryKey;
// Class used to test what happens if you rename a primary field in a migration.
public class MigrationFieldRenamed extends RealmObject implements MigrationPrimaryKey {
public static String CLASS_NAME = "MigrationFieldRenamed";
public static long DEFAULT_FIELDS_COUNT = 5;
public static long DEFAULT_PRIMARY_INDEX = 2;
public static String FIELD_PRIMARY = "fieldRenamedPrimary";
private Byte fieldFirst;
private Short fieldSecond;
// PK is placed in the middle to check if prior/posterior fields' removal is properly reflected
// during migration step. The MigrationPrimaryKey interface' PK field name is `fieldPrimary`.
@PrimaryKey
private String fieldRenamedPrimary;
private Integer fieldFourth;
private Long fieldFifth;
public void setFieldFirst(Byte fieldFirst) {
this.fieldFirst = fieldFirst;
}
public Byte getFieldFirst() {
return this.fieldFirst;
}
public void setFieldSecond(Short fieldSecond) {
this.fieldSecond = fieldSecond;
}
public Short getFieldSecond() {
return this.fieldSecond;
}
public void setFieldRenamedPrimary(String fieldRenamedPrimary) {
this.fieldRenamedPrimary = fieldRenamedPrimary;
}
public String getFieldRenamedPrimary() {
return this.fieldRenamedPrimary;
}
public void setFieldFourth(Integer fieldFourth) {
this.fieldFourth = fieldFourth;
}
public Integer getFieldFourth() {
return this.fieldFourth;
}
public void setFieldFifth(Long fieldFifth) {
this.fieldFifth = fieldFifth;
}
public Long getFieldFifth() {
return this.fieldFifth;
}
}
| {
"content_hash": "aa6b8936baab1278fef68172040c0f6e",
"timestamp": "",
"source": "github",
"line_count": 67,
"max_line_length": 99,
"avg_line_length": 27.567164179104477,
"alnum_prop": 0.7146724417975094,
"repo_name": "weiwenqiang/GitHub",
"id": "7f03c819a4a517d164c84ca0b5c8961eaa212eda",
"size": "2436",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "expert/realm-java/realm/realm-library/src/androidTest/java/io/realm/entities/migration/MigrationFieldRenamed.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "87"
},
{
"name": "C",
"bytes": "42062"
},
{
"name": "C++",
"bytes": "12137"
},
{
"name": "CMake",
"bytes": "202"
},
{
"name": "CSS",
"bytes": "75087"
},
{
"name": "Clojure",
"bytes": "12036"
},
{
"name": "FreeMarker",
"bytes": "21704"
},
{
"name": "Groovy",
"bytes": "55083"
},
{
"name": "HTML",
"bytes": "61549"
},
{
"name": "Java",
"bytes": "42222825"
},
{
"name": "JavaScript",
"bytes": "216823"
},
{
"name": "Kotlin",
"bytes": "24319"
},
{
"name": "Makefile",
"bytes": "19490"
},
{
"name": "Perl",
"bytes": "280"
},
{
"name": "Prolog",
"bytes": "1030"
},
{
"name": "Python",
"bytes": "13032"
},
{
"name": "Scala",
"bytes": "310450"
},
{
"name": "Shell",
"bytes": "27802"
}
],
"symlink_target": ""
} |
(function() {
var method;
var noop = function () {};
var methods = [
'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error',
'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',
'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd',
'timeline', 'timelineEnd', 'timeStamp', 'trace', 'warn'
];
var length = methods.length;
var console = (window.console = window.console || {});
while (length--) {
method = methods[length];
// Only stub undefined methods.
if (!console[method]) {
console[method] = noop;
}
}
}());
// Place any jQuery/helper plugins in here.
$(document).ready(function () {
$('body').addClass('js');
var $menulink = $('.menu-link'),
$wrap = $('#wrap');
$menulink.click(function() {
$menulink.toggleClass('active');
$wrap.toggleClass('active');
return false;
});
});
| {
"content_hash": "b71ea2aa44c5334cf89bc5b72a6ef135",
"timestamp": "",
"source": "github",
"line_count": 36,
"max_line_length": 76,
"avg_line_length": 27.11111111111111,
"alnum_prop": 0.5317622950819673,
"repo_name": "Loonz206/boiler",
"id": "3acaca56f38ccb0539e2067d05d7e6461841e491",
"size": "1035",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/js/plugins.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "414730"
},
{
"name": "HTML",
"bytes": "5554"
},
{
"name": "JavaScript",
"bytes": "1718658"
}
],
"symlink_target": ""
} |
/**
*
* 日 期:12-5-29
*/
package com.appleframework.rest.impl;
import com.appleframework.rest.request.RestRequestMessageConverter;
import org.springframework.core.convert.TypeDescriptor;
import org.testng.annotations.Test;
import static org.testng.Assert.*;
/**
* @author 陈雄华
* @version 1.0
*/
public class RestRequestMessageConverterTest {
@Test
public void testConvertOfXmlFormat() throws Exception {
TypeDescriptor addrTypeDescriptor = TypeDescriptor.valueOf(Addresss.class);
TypeDescriptor strTypeDescriptor = TypeDescriptor.valueOf(String.class);
RestRequestMessageConverter converter = new RestRequestMessageConverter();
String addressStr = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
"<address zoneCode=\"001\" doorCode=\"002\">\n" +
" <streets>\n" +
" <street no=\"001\" name=\"street1\"/>\n" +
" <street no=\"002\" name=\"street2\"/>\n" +
" </streets>\n" +
"</address>";
Object destObj = converter.convert(addressStr, strTypeDescriptor, addrTypeDescriptor);
assertTrue(destObj instanceof Addresss);
Addresss addresss = (Addresss) destObj;
assertEquals(addresss.getZoneCode(), "001");
assertEquals(addresss.getDoorCode(), "002");
assertEquals(addresss.getStreets().size(), 2);
}
@Test
public void testConvertOfJsonFormat() throws Exception {
TypeDescriptor addrTypeDescriptor = TypeDescriptor.valueOf(Addresss.class);
TypeDescriptor strTypeDescriptor = TypeDescriptor.valueOf(String.class);
RestRequestMessageConverter converter = new RestRequestMessageConverter();
String addressStr = "{\"zoneCode\":\"001\",\"doorCode\":\"002\",\"streets\":[{\"no\":\"001\",\"name\":\"street1\"}]}";
Object destObj = converter.convert(addressStr, strTypeDescriptor, addrTypeDescriptor);
assertTrue(destObj instanceof Addresss);
Addresss addresss = (Addresss) destObj;
assertEquals(addresss.getZoneCode(), "001");
assertEquals(addresss.getDoorCode(), "002");
assertNotNull(addresss.getStreets());
assertEquals(addresss.getStreets().size(), 1);
}
}
| {
"content_hash": "73da3364a48a01e551ac99a3dc410ab7",
"timestamp": "",
"source": "github",
"line_count": 55,
"max_line_length": 126,
"avg_line_length": 41.03636363636364,
"alnum_prop": 0.6544085068675233,
"repo_name": "xushaomin/apple-rest",
"id": "d3e95b0d97ef0376a9437de53f18cd90b4a45e94",
"size": "2269",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/test/java/com/appleframework/rest/impl/RestRequestMessageConverterTest.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "226149"
}
],
"symlink_target": ""
} |
Updated for NetBSD [9.2](https://netbsd.org/releases/formal-9/NetBSD-9.2.html).
This guide describes how to build particld, command-line utilities, and GUI on NetBSD.
## Preparation
### 1. Install Required Dependencies
Install the required dependencies the usual way you [install software on NetBSD](https://www.netbsd.org/docs/guide/en/chap-boot.html#chap-boot-pkgsrc).
The example commands below use `pkgin`.
```bash
pkgin install autoconf automake libtool pkg-config git gmake boost libevent
```
NetBSD currently ships with an older version of `gcc` than is needed to build. You should upgrade your `gcc` and then pass this new version to the configure script.
For example, grab `gcc9`:
```
pkgin install gcc9
```
Then, when configuring, pass the following:
```bash
./configure
...
CC="/usr/pkg/gcc9/bin/gcc" \
CXX="/usr/pkg/gcc9/bin/g++" \
...
```
See [dependencies.md](dependencies.md) for a complete overview.
### 2. Clone Particl Repo
Clone the Bitcoin Core repository to a directory. All build scripts and commands will run from this directory.
```bash
git clone https://github.com/particl/particl-core.git
```
### 3. Install Optional Dependencies
#### Wallet Dependencies
It is not necessary to build wallet functionality to run bitcoind or the GUI.
###### Descriptor Wallet Support
`sqlite3` is required to enable support for [descriptor wallets](https://github.com/bitcoin/bitcoin/blob/master/doc/descriptors.md).
```bash
pkgin install sqlite3
```
###### Legacy Wallet Support
`db4` is required to enable support for legacy wallets.
```bash
pkgin install db4
```
#### GUI Dependencies
Bitcoin Core includes a GUI built with the cross-platform Qt Framework. To compile the GUI, we need to install `qt5`.
```bash
pkgin install qt5
```
The GUI can encode addresses in a QR Code. To build in QR support for the GUI, install `qrencode`.
```bash
pkgin install qrencode
```
#### Test Suite Dependencies
There is an included test suite that is useful for testing code changes when developing.
To run the test suite (recommended), you will need to have Python 3 installed:
```bash
pkgin install python37
```
### Building Bitcoin Core
**Note**: Use `gmake` (the non-GNU `make` will exit with an error).
### 1. Configuration
There are many ways to configure Bitcoin Core. Here is an example that
explicitly disables the wallet and GUI:
```bash
./autogen.sh
./configure --without-wallet --with-gui=no \
CPPFLAGS="-I/usr/pkg/include" \
MAKE=gmake
```
For a full list of configuration options, see the output of `./configure --help`
### 2. Compile
Build and run the tests:
```bash
gmake # use "-j N" here for N parallel jobs
gmake check # Run tests if Python 3 is available
```
| {
"content_hash": "5065eb0684f04a966a9494c1255f08f3",
"timestamp": "",
"source": "github",
"line_count": 114,
"max_line_length": 164,
"avg_line_length": 24.026315789473685,
"alnum_prop": 0.7269076305220884,
"repo_name": "tecnovert/particl-core",
"id": "c29670cf0e6a13f03897f2cff3468d1c81ee0890",
"size": "2761",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "doc/build-netbsd.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Assembly",
"bytes": "28178"
},
{
"name": "Batchfile",
"bytes": "13"
},
{
"name": "C",
"bytes": "2889723"
},
{
"name": "C++",
"bytes": "13218778"
},
{
"name": "CMake",
"bytes": "29182"
},
{
"name": "Cap'n Proto",
"bytes": "1256"
},
{
"name": "Dockerfile",
"bytes": "1740"
},
{
"name": "HTML",
"bytes": "21833"
},
{
"name": "Java",
"bytes": "541"
},
{
"name": "M4",
"bytes": "229063"
},
{
"name": "Makefile",
"bytes": "159386"
},
{
"name": "Objective-C++",
"bytes": "5486"
},
{
"name": "Python",
"bytes": "3388224"
},
{
"name": "QMake",
"bytes": "1276"
},
{
"name": "Sage",
"bytes": "59728"
},
{
"name": "Scheme",
"bytes": "26427"
},
{
"name": "Shell",
"bytes": "190057"
}
],
"symlink_target": ""
} |
<?php
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as BaseVerifier;
class VerifyCsrfToken extends BaseVerifier
{
/**
* The URIs that should be excluded from CSRF verification.
*
* @var array
*/
protected $except = [
'login',
'positions',
'users',
];
}
| {
"content_hash": "1d5c782d565ed4ad687dd1d21abbc603",
"timestamp": "",
"source": "github",
"line_count": 19,
"max_line_length": 74,
"avg_line_length": 18.68421052631579,
"alnum_prop": 0.6281690140845071,
"repo_name": "ssinucodt/apitest",
"id": "609e99c41319f5daf888e1836da4ab7da3b78395",
"size": "355",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "app/Http/Middleware/VerifyCsrfToken.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ApacheConf",
"bytes": "356"
},
{
"name": "HTML",
"bytes": "36148"
},
{
"name": "JavaScript",
"bytes": "33923"
},
{
"name": "PHP",
"bytes": "496469"
}
],
"symlink_target": ""
} |
BrainCodeMobi Hackathon software
| {
"content_hash": "7bcd96754b36b14ac15c03b2c41212bd",
"timestamp": "",
"source": "github",
"line_count": 1,
"max_line_length": 32,
"avg_line_length": 33,
"alnum_prop": 0.9090909090909091,
"repo_name": "hoppingeagle/snapbuyer-backend",
"id": "5d15698c9ddbe2fcecc22b40b6b40c8ca956bf0a",
"size": "53",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ApacheConf",
"bytes": "356"
},
{
"name": "CSS",
"bytes": "131116"
},
{
"name": "HTML",
"bytes": "11567"
},
{
"name": "JavaScript",
"bytes": "503"
},
{
"name": "PHP",
"bytes": "134630"
}
],
"symlink_target": ""
} |
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
namespace WPF.ManipulationDemo.Simple.Controls
{
// This class was implemented from https://blogs.msdn.microsoft.com/llobo/2009/12/21/wpf-manipulation-basics/
/// <summary>
/// Interaction logic for TouchControl.xaml
/// </summary>
public partial class TouchControl : UserControl
{
private TransformGroup transformGroup;
private TranslateTransform translation;
private ScaleTransform scale;
private RotateTransform rotation;
public TouchControl()
{
InitializeComponent();
transformGroup = new TransformGroup();
translation = new TranslateTransform(0, 0);
scale = new ScaleTransform(1, 1);
rotation = new RotateTransform(0);
transformGroup.Children.Add(rotation);
transformGroup.Children.Add(scale);
transformGroup.Children.Add(translation);
BasicRect.RenderTransform = transformGroup;
}
protected override void OnManipulationStarting(ManipulationStartingEventArgs e)
{
e.ManipulationContainer = this;
}
protected override void OnManipulationDelta(ManipulationDeltaEventArgs e)
{
// the center never changes in this sample, although we always compute it.
Point center = new Point(
BasicRect.RenderSize.Width / 2.0, BasicRect.RenderSize.Height / 2.0);
// apply the rotation at the center of the rectangle if it has changed
rotation.CenterX = center.X;
rotation.CenterY = center.Y;
rotation.Angle += e.DeltaManipulation.Rotation;
// Scale is always uniform, by definition, so the x and y will always have the same magnitude
scale.CenterX = center.X;
scale.CenterY = center.Y;
scale.ScaleX *= e.DeltaManipulation.Scale.X;
scale.ScaleY *= e.DeltaManipulation.Scale.Y;
// apply translation
translation.X += e.DeltaManipulation.Translation.X;
translation.Y += e.DeltaManipulation.Translation.Y;
}
}
}
| {
"content_hash": "bd8e45f4e33b65d41f75dd4cc76910a4",
"timestamp": "",
"source": "github",
"line_count": 66,
"max_line_length": 113,
"avg_line_length": 34.166666666666664,
"alnum_prop": 0.6385809312638581,
"repo_name": "ahoefling/wpf.manipulation.demo",
"id": "dde55a35f0bbf0284e1a496568f19a474743c1e0",
"size": "2257",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "WPF.ManipulationDemo.Simple/Controls/TouchControl.xaml.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "13363"
}
],
"symlink_target": ""
} |
typedef struct sk_modalres sk_modalres;
#line 32 "modalres.org"
#line 53 "modalres.org"
void sk_modalres_init(sk_modalres *mr, int sr);
#line 148 "modalres.org"
void sk_modalres_freq(sk_modalres *mr, SKFLT freq);
#line 180 "modalres.org"
void sk_modalres_q(sk_modalres *mr, SKFLT q);
#line 212 "modalres.org"
SKFLT sk_modalres_tick(sk_modalres *mr, SKFLT in);
#line 41 "modalres.org"
#ifdef SK_MODALRES_PRIV
#line 73 "modalres.org"
struct sk_modalres {
#line 86 "modalres.org"
SKFLT x;
SKFLT y[2];
#line 103 "modalres.org"
SKFLT b1;
SKFLT a1;
SKFLT a2;
#line 120 "modalres.org"
int sr;
#line 135 "modalres.org"
SKFLT s;
#line 161 "modalres.org"
SKFLT freq;
SKFLT pfreq;
#line 198 "modalres.org"
SKFLT q;
SKFLT pq;
#line 75 "modalres.org"
};
#line 44 "modalres.org"
#endif
#endif
| {
"content_hash": "5c97ffb12f09cb69355b5ac0bcf7187f",
"timestamp": "",
"source": "github",
"line_count": 37,
"max_line_length": 51,
"avg_line_length": 21.08108108108108,
"alnum_prop": 0.7217948717948718,
"repo_name": "PaulBatchelor/Soundpipe",
"id": "9325bb6c9af72064ca70d2cb185761486b8f7c8d",
"size": "915",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "tangled/modalres.h",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "931816"
},
{
"name": "C++",
"bytes": "12818"
},
{
"name": "Gnuplot",
"bytes": "205"
},
{
"name": "Go",
"bytes": "866"
},
{
"name": "Lua",
"bytes": "189774"
},
{
"name": "Makefile",
"bytes": "9652"
},
{
"name": "Shell",
"bytes": "1852"
}
],
"symlink_target": ""
} |
declare namespace googletag {
type SingleSizeArray = number[];
type NamedSize = string | string[];
type SingleSize = SingleSizeArray | NamedSize;
type MultiSize = SingleSize[];
type GeneralSize = SingleSize | MultiSize;
type SizeMapping = GeneralSize[];
type SizeMappingArray = SizeMapping[];
interface CommandArray {
push(f: () => void): number;
}
interface Service {
addEventListener(
eventType: "slotRenderEnded",
listener: (event: events.SlotRenderEndedEvent) => void
): Service;
addEventListener(
eventType: "slotRequested",
listener: (event: events.SlotRequestedEvent) => void
): Service;
addEventListener(
eventType: "slotResponseReceived",
listener: (event: events.SlotResponseReceived) => void
): Service;
addEventListener(
eventType: "slotVisibilityChanged",
listener: (event: events.SlotVisibilityChangedEvent) => void
): Service;
addEventListener(
eventType: string,
listener: (event: events.Event) => void
): Service;
getSlots(): Slot[];
}
interface CompanionAdsService extends Service {
enableSyncLoading(): void;
setRefreshUnfilledSlots(value: boolean): void;
}
interface ContentService extends Service {
setContent(slot: Slot, content: string): void;
}
interface LazyLoadOptionsConfig {
fetchMarginPercent?: number;
renderMarginPercent?: number;
mobileScaling?: number;
}
interface ResponseInformation {
advertiserId: string;
campaignId: string;
creativeId?: number;
creativeTemplateId?: number;
lineItemId?: number;
}
interface SafeFrameConfig {
allowOverlayExpansion?: boolean;
allowPushExpansion?: boolean;
sandbox?: boolean;
}
interface Googletag {
apiReady: boolean;
cmd: CommandArray;
companionAds(): CompanionAdsService;
content(): ContentService;
defineOutOfPageSlot(adUnitPath: string, opt_div?: string): Slot;
defineSlot(adUnitPath: string, size: GeneralSize, opt_div?: string): Slot;
destroySlots(opt_slots?: Slot[]): boolean;
disablePublisherConsole(): void;
display(divOrSlot?: string | Element | Slot): void;
enableServices(): void;
getVersion(): string;
openConsole(opt_div?: string): void;
pubads(): PubAdsService;
pubadsReady: boolean;
setAdIframeTitle(title: string): void;
sizeMapping(): SizeMappingBuilder;
}
interface Slot {
addService(service: Service): Slot;
clearCategoryExclusions(): Slot;
clearTargeting(opt_key?: string): Slot;
defineSizeMapping(sizeMapping: SizeMappingArray): Slot;
get(key: string): string | null;
getAdUnitPath(): string;
getAttributeKeys(): string[];
getCategoryExclusions(): string[];
getResponseInformation(): ResponseInformation;
getSlotElementId(): string;
getTargeting(key: string): string[];
getTargetingKeys(): string[];
set(key: string, value: string): Slot;
setCategoryExclusion(categoryExclusion: string): Slot;
setClickUrl(value: string): Slot;
setCollapseEmptyDiv(collapse: boolean, opt_collapseBeforeAdFetch?: boolean): Slot;
setForceSafeFrame(forceSafeFrame: boolean): Slot;
setSafeFrameConfig(config: SafeFrameConfig): Slot;
setTargeting(key: string, value: string | string[]): Slot;
}
interface PassbackSlot {
display(): void;
get(key: string): string;
set(key: string, value: string): PassbackSlot;
setClickUrl(url: string): PassbackSlot;
setForceSafeFrame(forceSafeFrame: boolean): PassbackSlot;
setTagForChildDirectedTreatment(value: number): PassbackSlot;
setTagForUnderAgeOfConsent(value: number): PassbackSlot;
setTargeting(key: string, value: string | string[]): PassbackSlot;
updateTargetingFromMap(map: object): PassbackSlot;
}
interface PubAdsService extends Service {
clear(opt_slots?: Slot[]): boolean;
clearCategoryExclusions(): PubAdsService;
clearTagForChildDirectedTreatment(): PubAdsService;
clearTargeting(opt_key?: string): PubAdsService;
collapseEmptyDivs(opt_collapseBeforeAdFetch?: boolean): boolean;
defineOutOfPagePassback(adUnitPath: string): PassbackSlot;
definePassback(adUnitPath: string, size: GeneralSize): PassbackSlot;
disableInitialLoad(): void;
display(adUnitPath: string, size: GeneralSize, opt_div?: string | Element, opt_clickUrl?: string): Slot;
enableAsyncRendering(): boolean;
enableLazyLoad(opt_config?: LazyLoadOptionsConfig): void;
enableSingleRequest(): boolean;
enableSyncRendering(): boolean;
enableVideoAds(): void;
get(key: string): string | null;
getAttributeKeys(): string[];
getTargeting(key: string): string[];
getTargetingKeys(): string[];
refresh(opt_slots?: Slot[], opt_options?: {changeCorrelator: boolean}): void;
set(key: string, value: string): PubAdsService;
setCategoryExclusion(categoryExclusion: string): PubAdsService;
setCentering(centerAds: boolean): void;
setCookieOptions(cookieOptions: number): PubAdsService;
setForceSafeFrame(forceSafeFrame: boolean): PubAdsService;
setLocation(latitudeOrAddress: string | number, opt_longitude?: number, opt_radius?: number): PubAdsService;
setPublisherProvidedId(ppid: string): PubAdsService;
setRequestNonPersonalizedAds(nonPersonalizedAds: 0 | 1): PubAdsService;
setSafeFrameConfig(config: SafeFrameConfig): PubAdsService;
setTagForChildDirectedTreatment(value: number): PubAdsService;
setTagForUnderAgeOfConsent(opt_value?: number): PubAdsService;
setTargeting(key: string, value: string | string[]): PubAdsService;
setVideoContent(videoContentId: string, videoCmsId: string): void;
updateCorrelator(): PubAdsService;
setPrivacySettings(settings: { restrictDataProcessing: boolean }): Slot;
}
interface SizeMappingBuilder {
addSize(viewportSize: SingleSizeArray, slotSize: GeneralSize): SizeMappingBuilder;
build(): SizeMappingArray;
}
namespace events {
interface Event {
serviceName: string;
slot: Slot;
}
// tslint:disable-next-line:no-empty-interface
interface ImpressionViewableEvent extends Event {}
// tslint:disable-next-line:no-empty-interface
interface SlotOnloadEvent extends Event {}
interface SlotRenderEndedEvent extends Event {
advertiserId?: number;
creativeId?: number;
isEmpty: boolean;
lineItemId?: number;
size: number[] | string;
sourceAgnosticCreativeId?: number;
sourceAgnosticLineItemId?: number;
}
// tslint:disable-next-line:no-empty-interface
interface SlotRequestedEvent extends Event {}
// tslint:disable-next-line:no-empty-interface
interface SlotResponseReceived extends Event {}
interface SlotVisibilityChangedEvent extends Event {
inViewPercentage: number;
}
}
}
declare let googletag: googletag.Googletag;
| {
"content_hash": "6428a7fd2bed11a0cc007779c1ea1605",
"timestamp": "",
"source": "github",
"line_count": 202,
"max_line_length": 116,
"avg_line_length": 37.554455445544555,
"alnum_prop": 0.6530450830477195,
"repo_name": "dsebastien/DefinitelyTyped",
"id": "3bf798396ef1883d6d81c05a51f26062cad57abd",
"size": "8155",
"binary": false,
"copies": "14",
"ref": "refs/heads/master",
"path": "types/doubleclick-gpt/index.d.ts",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CoffeeScript",
"bytes": "15"
},
{
"name": "HTML",
"bytes": "308"
},
{
"name": "Protocol Buffer",
"bytes": "678"
},
{
"name": "TypeScript",
"bytes": "20293816"
}
],
"symlink_target": ""
} |
require_relative 'request.rb'
module Bter
class Public
include Request
METHODS = ['pairs', 'ticker', 'tickers', 'depth', 'marketinfo', 'markelist', 'trade']
METHODS.each do |method|
define_method(method) do |pair=nil, tid=nil|
public_request(method, pair, tid)
end
end
alias_method :info, :marketinfo
alias_method :details, :markelist
alias_method :trades, :trade
alias_method :history, :trade
end
end
| {
"content_hash": "24a02493727e7c6d8845844813138e80",
"timestamp": "",
"source": "github",
"line_count": 20,
"max_line_length": 90,
"avg_line_length": 23.45,
"alnum_prop": 0.6396588486140725,
"repo_name": "zisismaras/bter-ruby",
"id": "0442cfed2a0f33b3f38d964b4840f5fddc35d88c",
"size": "469",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "lib/bter/public.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Ruby",
"bytes": "11787"
}
],
"symlink_target": ""
} |
#include <cmath>
#include <algorithm>
namespace plaisio {
Beam::Beam(Material _material, std::shared_ptr<Node> _start, std::shared_ptr<Node> _end) : material(_material), start(_start), end(_end)
, angle(dz(), dx()), coordSystem(angle, angle + math::Angle { M_PI/2 }, start->x, start->z)
, forces(), moments(), uniformForces() {}
double Beam::dx() const {
return end->x - start->x;
}
double Beam::dz() const {
return end->z - start->z;
}
void Beam::addForce(const Force& f) {
auto localF = f.inCoordSystem(coordSystem);
for(auto& force: forces) {
if(force.x == localF.x && force.z == localF.z) {
force = force + localF;
} else {
forces.push_back(localF);
}
}
}
void Beam::addMoment(const Moment& m) {
auto localM = m.inCoordSystem(coordSystem);
for(auto& moment: moments) {
if(moment.x == localM.x && moment.z == localM.z) {
moment = moment + localM;
} else {
moments.push_back(localM);
}
}
}
void Beam::addUniformForce(const UniformForce& uf) {
// Don't try anything too tricky here
// We could try to find the parts where we have two uniform forces and add them into one + split if we have different lengths
// But I don't think it's worth the trouble
uniformForces.push_back(uf);
}
Beam Beam::reverse() const {
Beam b = { material, end, start };
for(const auto& force: forces) {
b.addForce(force);
}
for(const auto& moment: moments) {
b.addMoment(moment);
}
for(const auto& uf: uniformForces) {
b.addUniformForce(uf);
}
return b;
}
bool Beam::operator == (const Beam& other) const {
return start == other.start && end == other.end && angle == other.angle && coordSystem == other.coordSystem
&& forces == other.forces && moments == other.moments && uniformForces == other.uniformForces;
}
}
| {
"content_hash": "b5c15682fdc8abfb401667b0ef7b0504",
"timestamp": "",
"source": "github",
"line_count": 71,
"max_line_length": 155,
"avg_line_length": 32.63380281690141,
"alnum_prop": 0.5006473888649116,
"repo_name": "shamanas/plaisio",
"id": "3ef9726ebcd9d9928e38b6b8605d0beefe7cfcc9",
"size": "2375",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "source/Beam.cpp",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C++",
"bytes": "24780"
},
{
"name": "Shell",
"bytes": "312"
}
],
"symlink_target": ""
} |
class StorageStatus(object):
def __init__(self):
self.operationPerformed = None
self.indexOfAppend = None
def getOperationPerformed(self):
return self.operationPerformed
def setOperationPerformed(self, operationPerformed):
self.operationPerformed = operationPerformed
def getIndexOfAppend(self):
return self.indexOfAppend
def setIndexOfAppend(self, indexOfAppend):
self.indexOfAppend = indexOfAppend
| {
"content_hash": "b20c1b9cbaef7211c15f4b121b6fb81e",
"timestamp": "",
"source": "github",
"line_count": 18,
"max_line_length": 56,
"avg_line_length": 26.333333333333332,
"alnum_prop": 0.7088607594936709,
"repo_name": "mjames-upc/python-awips",
"id": "98782b0268238680f53bb1f8e9704d244c6b1595",
"size": "545",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "dynamicserialize/dstypes/com/raytheon/uf/common/datastorage/StorageStatus.py",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "C",
"bytes": "27192"
},
{
"name": "Python",
"bytes": "714011"
}
],
"symlink_target": ""
} |
::
:: Copyright 2014-2022 Real Logic Limited.
::
:: Licensed under the Apache License, Version 2.0 (the "License");
:: you may not use this file except in compliance with the License.
:: You may obtain a copy of the License at
::
:: https://www.apache.org/licenses/LICENSE-2.0
::
:: Unless required by applicable law or agreed to in writing, software
:: distributed under the License is distributed on an "AS IS" BASIS,
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
:: See the License for the specific language governing permissions and
:: limitations under the License.
::
@echo off
set "DIR=%~dp0"
call "%DIR%\run-java" ^
-Dagrona.disable.bounds.checks=true ^
-Daeron.sample.messageLength=32 ^
-Daeron.ipc.mtu.length=8k ^
%JVM_OPTS% io.aeron.samples.EmbeddedExclusiveIpcThroughput %* | {
"content_hash": "fbba50a0fb187aaa975ed55a55b9f38a",
"timestamp": "",
"source": "github",
"line_count": 24,
"max_line_length": 75,
"avg_line_length": 34.708333333333336,
"alnum_prop": 0.7298919567827131,
"repo_name": "mikeb01/Aeron",
"id": "8991467a03e070dde6ff9b78fd689de11fed8711",
"size": "833",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "aeron-samples/scripts/embedded-exclusive-ipc-throughput.cmd",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "41480"
},
{
"name": "C",
"bytes": "2135180"
},
{
"name": "C++",
"bytes": "2826597"
},
{
"name": "CMake",
"bytes": "81425"
},
{
"name": "Dockerfile",
"bytes": "2186"
},
{
"name": "Java",
"bytes": "7084749"
},
{
"name": "Shell",
"bytes": "65347"
}
],
"symlink_target": ""
} |
/* $NetBSD: postscreen_endpt.c,v 1.1.1.2 2014/07/06 19:27:54 tron Exp $ */
/*++
/* NAME
/* postscreen_endpt 3
/* SUMMARY
/* look up connection endpoint information
/* SYNOPSIS
/* #include <postscreen.h>
/*
/* void psc_endpt_lookup(smtp_client_stream, lookup_done)
/* VSTREAM *smtp_client_stream;
/* void (*lookup_done)(status, smtp_client_stream,
/* smtp_client_addr, smtp_client_port,
/* smtp_server_addr, smtp_server_port)
/* int status;
/* MAI_HOSTADDR_STR *smtp_client_addr;
/* MAI_SERVPORT_STR *smtp_client_port;
/* MAI_HOSTADDR_STR *smtp_server_addr;
/* MAI_SERVPORT_STR *smtp_server_port;
/* DESCRIPTION
/* psc_endpt_lookup() looks up remote and local connection
/* endpoint information, either through local system calls,
/* or through an adapter for an up-stream proxy protocol.
/*
/* The following summarizes what the postscreen(8) server
/* expects from a proxy protocol adapter routine.
/* .IP \(bu
/* Accept the same arguments as psc_endpt_lookup().
/* .IP \(bu
/* Validate protocol, address and port syntax. Permit only
/* protocols that are configured with the main.cf:inet_protocols
/* setting.
/* .IP \(bu
/* Convert IPv4-in-IPv6 address syntax to IPv4 syntax when
/* both IPv6 and IPv4 support are enabled with main.cf:inet_protocols.
/* .IP \(bu
/* Log a clear warning message that explains why a request
/* fails.
/* .IP \(bu
/* Never talk to the remote SMTP client.
/* .PP
/* Arguments:
/* .IP client_stream
/* A brand-new stream that is connected to the remote client.
/* .IP lookup
/* Call-back routine that reports the result status, address
/* and port information. The result status is -1 in case of
/* error, 0 in case of success.
/* LICENSE
/* .ad
/* .fi
/* The Secure Mailer license must be distributed with this software.
/* AUTHOR(S)
/* Wietse Venema
/* IBM T.J. Watson Research
/* P.O. Box 704
/* Yorktown Heights, NY 10598, USA
/*--*/
/* System library. */
#include <sys_defs.h>
#include <string.h>
#ifdef STRCASECMP_IN_STRINGS_H
#include <strings.h>
#endif
/* Utility library. */
#include <msg.h>
#include <myaddrinfo.h>
#include <vstream.h>
#include <inet_proto.h>
/* Global library. */
#include <mail_params.h>
#include <haproxy_srvr.h>
/* Application-specific. */
#include <postscreen.h>
#include <postscreen_haproxy.h>
static INET_PROTO_INFO *proto_info;
/* psc_sockaddr_to_hostaddr - transform endpoint address and port to string */
static int psc_sockaddr_to_hostaddr(struct sockaddr * addr_storage,
SOCKADDR_SIZE addr_storage_len,
MAI_HOSTADDR_STR *addr_buf,
MAI_SERVPORT_STR *port_buf,
int socktype)
{
int aierr;
if ((aierr = sockaddr_to_hostaddr(addr_storage, addr_storage_len,
addr_buf, port_buf, socktype)) == 0
&& strncasecmp("::ffff:", addr_buf->buf, 7) == 0
&& strchr((char *) proto_info->sa_family_list, AF_INET) != 0)
memmove(addr_buf->buf, addr_buf->buf + 7,
sizeof(addr_buf->buf) - 7);
return (aierr);
}
/* psc_endpt_local_lookup - look up local system connection information */
static void psc_endpt_local_lookup(VSTREAM *smtp_client_stream,
PSC_ENDPT_LOOKUP_FN lookup_done)
{
struct sockaddr_storage addr_storage;
SOCKADDR_SIZE addr_storage_len = sizeof(addr_storage);
int status;
MAI_HOSTADDR_STR smtp_client_addr;
MAI_SERVPORT_STR smtp_client_port;
MAI_HOSTADDR_STR smtp_server_addr;
MAI_SERVPORT_STR smtp_server_port;
int aierr;
/*
* Look up the remote SMTP client address and port.
*/
if (getpeername(vstream_fileno(smtp_client_stream), (struct sockaddr *)
& addr_storage, &addr_storage_len) < 0) {
msg_warn("getpeername: %m -- dropping this connection");
status = -1;
}
/*
* Convert the remote SMTP client address and port to printable form for
* logging and access control.
*/
else if ((aierr = psc_sockaddr_to_hostaddr(
(struct sockaddr *) & addr_storage,
addr_storage_len, &smtp_client_addr,
&smtp_client_port, SOCK_STREAM)) != 0) {
msg_warn("cannot convert client address/port to string: %s"
" -- dropping this connection",
MAI_STRERROR(aierr));
status = -1;
}
/*
* Look up the local SMTP server address and port.
*/
else if (getsockname(vstream_fileno(smtp_client_stream),
(struct sockaddr *) & addr_storage,
&addr_storage_len) < 0) {
msg_warn("getsockname: %m -- dropping this connection");
status = -1;
}
/*
* Convert the local SMTP server address and port to printable form for
* logging.
*/
else if ((aierr = psc_sockaddr_to_hostaddr(
(struct sockaddr *) & addr_storage,
addr_storage_len, &smtp_server_addr,
&smtp_server_port, SOCK_STREAM)) != 0) {
msg_warn("cannot convert server address/port to string: %s"
" -- dropping this connection",
MAI_STRERROR(aierr));
status = -1;
} else {
status = 0;
}
lookup_done(status, smtp_client_stream,
&smtp_client_addr, &smtp_client_port,
&smtp_server_addr, &smtp_server_port);
}
/*
* Lookup table for available proxy protocols.
*/
typedef struct {
const char *name;
void (*endpt_lookup) (VSTREAM *, PSC_ENDPT_LOOKUP_FN);
} PSC_ENDPT_LOOKUP_INFO;
static const PSC_ENDPT_LOOKUP_INFO psc_endpt_lookup_info[] = {
NOPROXY_PROTO_NAME, psc_endpt_local_lookup,
HAPROXY_PROTO_NAME, psc_endpt_haproxy_lookup,
0,
};
/* psc_endpt_lookup - look up connection endpoint information */
void psc_endpt_lookup(VSTREAM *smtp_client_stream,
PSC_ENDPT_LOOKUP_FN notify)
{
const PSC_ENDPT_LOOKUP_INFO *pp;
if (proto_info == 0)
proto_info = inet_proto_info();
for (pp = psc_endpt_lookup_info; /* see below */ ; pp++) {
if (pp->name == 0)
msg_fatal("unsupported %s value: %s",
VAR_PSC_UPROXY_PROTO, var_psc_uproxy_proto);
if (strcmp(var_psc_uproxy_proto, pp->name) == 0) {
pp->endpt_lookup(smtp_client_stream, notify);
return;
}
}
}
| {
"content_hash": "6269ca74741b20d18b15aa9b251195a2",
"timestamp": "",
"source": "github",
"line_count": 208,
"max_line_length": 78,
"avg_line_length": 28.72596153846154,
"alnum_prop": 0.6582426778242678,
"repo_name": "execunix/vinos",
"id": "5c23098fe305a047b4c2321c30f3d34a2d306fb9",
"size": "5975",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "external/ibm-public/postfix/dist/src/postscreen/postscreen_endpt.c",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
var fodder_grade = {
3: [25, 50, 100, 200, 400],
4: [12, 25, 50, 100, 200],
5: [7, 12, 25, 50, 100],
6: [1, 7, 12, 25, 50]
};
var gold_cost = {
3: 2750,
4: 4500,
5: 6750,
6: 9500
};
var element_grade = {
3: [50, 100],
4: [25, 50, 100],
5: [12.5, 25, 50, 100],
6: [6.25, 12.5, 25, 50, 100]
};
jQuery.fn.extend({
create_container: function(id) {
var that = $(this);
var s = '<div class="row">'
+ '<div class="col-xs-4">'
+ '<div class="btn-group btn-block small-pad">'
+ '<button type="button" class="btn btn-primary btn-block dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">'
+ '<strong>Calculate Power Up</strong> '
+ ' '
+ '<span class="caret"></span>'
+ '</button>'
+ '<ul class="dropdown-menu">'
+ '<li><a href="#" data-init=3>From 3 <span class="glyphicon glyphicon-star"></span></a></li>'
+ '<li><a href="#" data-init=4>From 4 <span class="glyphicon glyphicon-star"></span></a></li>'
+ '<li><a href="#" data-init=5>From 5 <span class="glyphicon glyphicon-star"></span></a></li>'
+ '<li><a href="#" data-init=6>Only 6 <span class="glyphicon glyphicon-star"></span></a></li>'
+ '<li role="separator" class="divider"></li>'
+ '<li><a href="#" data-init=-1>Reset</a></li>'
+ '</ul>'
+ '</div>'
+ '</div>'
+ '<div class="col-xs-8">'
+ '<div class="input-group small-pad">'
+ '<span class="input-group-addon">Gold</span>'
+ '<span class="input-group-addon cumulative-gold-cost">0</span>'
+ '</div>'
+ '<div class="input-group small-pad cumulative-fodders">'
+ '<span class="input-group-addon">Fodders</span>'
+ '<span class="input-group-addon cfc cfc-1" data-grade=1>0</span>'
+ '<span class="input-group-addon cfc cfc-2" data-grade=2>0</span>'
+ '<span class="input-group-addon cfc cfc-3" data-grade=3>0</span>'
+ '<span class="input-group-addon cfc cfc-4" data-grade=4>0</span>'
+ '<span class="input-group-addon cfc cfc-5" data-grade=5>0</span>'
+ '</div>'
+ '<div class="input-group cumulative-elementals">'
+ '<span class="input-group-addon">Elementals</span>'
+ '<span class="input-group-addon cec cec-2" data-grade=2>0</span>'
+ '<span class="input-group-addon cec cec-3" data-grade=3>0</span>'
+ '<span class="input-group-addon cec cec-4" data-grade=4>0</span>'
+ '<span class="input-group-addon cec cec-5" data-grade=5>0</span>'
+ '</div>'
+ '</div>'
+ '</div>'
+ '</div>'
+ '<br />'
+ '<div id="' + id + '" class="scrolling"></div>';
$(this).append(s);
for (var i = 3; i <= 6; i++) {
that.find('#' + id).create_grade(id, i);
$('#' + id + '-' + i).hide();
}
//that.find('#' + id).create_dependency_message(id).hide();
$(this).find('a[data-init]').on('click', function() {
var init = parseInt($(this).attr('data-init'));
if (init == -1) {
$('#' + id).reset();
} else {
for (var i = 3; i < init; i++) {
$('#' + id + '-' + i).fadeOut();
}
that.find('input[data-value]').trigger('change');
$('#' + id + '-' + init).fadeIn();
if (init == 6) {
that.find('.list-group[data-grade=99]').hide();
}
}
})
that.activate_cumulatives_tooltip();
},
activate_cumulatives_tooltip: function() {
_activate_cumulatives_tooltip($(this));
},
reset: function() {
_reset($(this));
},
create_dependency_message: function(id) {
return _create_dependency_message($(this), id);
},
create_grade: function(id, grade) {
var s = '<ul class="list-group" id="' + id + '-' + grade + '" data-grade=' + grade + '>'
+ '<li class="list-group-item active"><strong>'
+ 'Power Up ' + grade + ' <span class="glyphicon glyphicon-star"></span>'
+ '</strong></li>'
+ '<li class="list-group-item">'
+ this.create_power_up_bar('a' + '-' + grade)
+ '</li>'
+ '<li class="list-group-item">'
+ '<div class="row">'
+ '<div class="col-xs-8">'
+ this.create_fodder_staging('c' + '-' + grade)
+ '</div>'
+ '<div class="col-xs-4">'
+ this.create_gold_cost_tracker('d' + '-' + grade)
+ '</div>'
+ '</div>'
+ '<div class="clearfix"></div>'
+ '</li>';
if (grade < 6) {
s += '<li class="list-group-item list-group-item-warning">'
+ '<div class="row">'
+ '<div class="col-xs-4">'
+ '<strong>Elementals</strong>'
+ '<br />'
+ grade + ' <span class="glyphicon glyphicon-star"></span> needed'
+ '</div>'
// + '</li>'
// + '<li class="list-group-item">'
+ '<div class="col-xs-8">'
+ this.create_element_bar('b' + '-' + grade)
+ '</div>'
+ '</div>'
+ '</li>'
+ '<li class="list-group-item">'
+ this.create_element_staging('e' + '-' + grade, grade)
+ '</li>'
}
s += '</ul>';
$(this).append(s);
$('#a-' + grade).activate_power_up_slider();
$('#b-' + grade).activate_element_slider();
$('#c-' + grade).activate_fodder_controls($('#a-' + grade), grade);
if (grade < 6) {
$('#e-' + grade).activate_element_controls($('#b-' + grade), grade);
}
},
create_gold_cost_tracker: function(id) {
return _create_gold_cost_tracker(id);
},
create_fodder_staging: function(id) {
return _create_fodder_staging(id);
},
create_power_up_bar: function(id) {
return _create_power_up_bar(id);
},
create_element_bar: function(id) {
return _create_element_bar(id);
},
create_element_staging: function(id, grade) {
return _create_element_staging(id, grade);
},
activate_fodder_controls: function(el, grade) {
_activate_fodder_controls($(this), el, grade);
},
activate_element_controls: function(el, grade) {
_activate_element_controls($(this), el, grade);
},
activate_element_slider: function() {
var text_id = $(this).selector;
_activate_element_slider($(text_id), $(text_id + '-text'));
},
activate_power_up_slider: function(text_id, max_id) {
var text_id = $(this).selector;
_activate_power_up_slider($(this), $(text_id + '-text'), $(text_id + '-max'));
},
add: function(value) {
return _add($(this), value);
},
subtract: function(value) {
return _add($(this), -value);
},
set: function(value) {
return _set($(this), value);
}
})
function _activate_cumulatives_tooltip(el) {
el.find('.cfc').each(function() {
var that = $(this);
that.tooltip({
title: 'Cumulative ' + that.attr('data-grade') + ' <span class="glyphicon glyphicon-star"></span> Fodders',
container: 'body',
html: true
});
})
el.find('.cec').each(function() {
var that = $(this);
that.tooltip({
title: 'Cumulative ' + that.attr('data-grade') + ' <span class="glyphicon glyphicon-star"></span> Elementals',
container: 'body',
html: true
});
})
}
function _create_dependency_message(el, id) {
var s = '<ul class="list-group" id="' + id + '-' + 99 + '" data-grade=99>'
+ '<li class="list-group-item list-group-item-warning">'
+ '<div class="row">'
+ '<div class="col-xs-1">'
+ '<span class="glyphicon glyphicon-exclamation-sign"></span>'
+ '</div>'
+ '<div class="col-xs-11">'
+ 'Power up and add Elementals in previous grade first to unlock further upgrade'
+ '</div>'
+ '</div>'
+ '</li>'
+ '</ul>';
el.append(s);
return $('#' + id + '-' + 99);
}
function _create_element_staging(id, grade) {
var u = new Array();
for (var i = 2; i <= grade; i++) {
u.push('<div class="btn-group small-pad col-xs-6">' + _create_element_button(i) + '</div>');
}
var s = u.join('');
return '<div id="' + id + '">' + s + '</div><div class="clearfix"></div>';
}
function _create_element_button(grade) {
var s = '<button type="button" class="btn btn-default" disabled>'
+ '<strong>' + grade + ' </strong>'
+ '<span class="glyphicon glyphicon-star"></span>'
+ '</button>'
+ '<button type="button" class="btn btn-success element-subtract">'
+ '<span class="glyphicon glyphicon-minus"></span>'
+ '</button>'
+ '<button type="button" class="btn element-count" data-grade=' + grade + ' disabled>0</button>'
+ '<button type="button" class="btn btn-success element-add">'
+ '<span class="glyphicon glyphicon-plus"></span>'
+ '</button>';
return s;
}
function _create_gold_cost_tracker(id) {
var s = '';
s += '<ul class="list-group">'
+ '<li class="list-group-item text-center"><strong>Gold Cost</strong></li>'
+ '<li class="list-group-item text-center gold-cost-text">0</li>'
+ '</ul>'
return s;
}
function _create_fodder_staging(id) {
var u = new Array();
$.each([1,2,3,4], function(i, x) {
u.push('<div class="btn-group small-pad">' + _create_fodder_button(x) + '</div>');
});
var s = u.join('<br />');
return '<div id="' + id + '">' + s + '</div>';
}
function _create_fodder_button(grade) {
var s = '<button type="button" class="btn btn-default" disabled><strong>' + grade + '</strong> <span class="glyphicon glyphicon-star"></span></button> '
+ '<button type="button" class="btn btn-success fodder-subtract"><span class="glyphicon glyphicon-minus"></span></button>'
+ '<button type="button" class="btn fodder-count" data-grade=' + grade + ' disabled>0</button>'
+ '<button type="button" class="btn btn-success fodder-add"><span class="glyphicon glyphicon-plus"></span></button>'
+ '<button type="button" class="btn fodder-cost" disabled>0</button>';
return s;
}
function _activate_element_controls(el, _slider_el, grade) {
el.find('.element-subtract').on('click', function() {
_update_element_count($(this), -1, grade, _slider_el);
_update_element_meter(el, _slider_el, grade);
});
el.find('.element-add').on('click', function() {
_update_element_count($(this), 1, grade, _slider_el);
_update_element_meter(el, _slider_el, grade);
});
_update_element_meter(el, _slider_el, grade);
}
function _activate_fodder_controls(el, _slider_el, grade) {
el.find('.fodder-subtract').on('click', function() {
_update_fodder_count($(this), -1, grade, _slider_el);
_update_fodder_meter(el, _slider_el, grade);
});
el.find('.fodder-add').on('click', function() {
_update_fodder_count($(this), 1, grade, _slider_el);
_update_fodder_meter(el, _slider_el, grade);
})
_update_fodder_meter(el, _slider_el, grade);
}
function _evaluate_dependency(el) {
var list_group = el.parent().parent();
var fodder_progress = parseInt(list_group.find('input.fodder-bar').bootstrapSlider('getValue')[1]);
var element_progress = parseInt(list_group.find('input.element-bar').bootstrapSlider('getValue'));
var stop_at = list_group.parent().find('[data-grade=99]');
var grade = parseInt(list_group.attr('data-grade'));
console.log('grade: ' + list_group.attr('data-grade'));
console.log(fodder_progress + ':' + element_progress);
if (fodder_progress >= 500 && element_progress >= 100) {
//if (grade < 6) {
list_group.next().show();
//} else {
//list_group.next().fadeOut();
//}
} else {
//list_group.nextAll().fadeOut();
list_group.nextUntil(stop_at).fadeOut();
if (!stop_at.is(':visible')) {
stop_at.show();
}
}
if (list_group.parent().find('.list-group[data-grade=6]').is(':visible')) {
stop_at.hide();
} else {
if (!stop_at.is(':visible')) {
stop_at.show();
}
}
//list_group.parent().find('[data-grade=99]').fadeIn();
// console.log(list_group.parent().find('.list-group:visible[data-grade=6]'));
// if (list_group.parent().find('.list-group[data-grade=6]:visible').length == 0) {
// console.log('not visible');
// if (!list_group.is(':visible')) {
// list_group.fadeIn();
// }
// } else { // grade 6 is visible, hide
// console.log('visible');
// if (list_group.is(':visible')) {
// list_group.fadeOut();
// }
// }
}
function _update_element_meter(el, _slider_el, grade) {
var sum = 0;
var cost = 0;
el.find('.element-count').each(function(i, x) {
sum += parseInt($(this).text()) * element_grade[grade][i];
});
_slider_el.set(sum);
if (sum >= 100) {
$.each(el.find('.element-add'), function() {
$(this).prop('disabled', true);
});
$.each(el.find('.element-subtract'), function() {
var that = $(this);
if (parseInt(that.parent().find('.element-count').text()) == 0) {
that.prop('disabled', true);
} else {
that.prop('disabled', false);
}
});
} else if (sum <= 0) {
$.each(el.find('.element-subtract'), function() {
$(this).prop('disabled', true);
});
$.each(el.find('.element-add'), function() {
$(this).prop('disabled', false);
})
} else {
$.each(el.find('.element-add'), function() {
$(this).prop('disabled', false);
});
$.each(el.find('.element-subtract'), function() {
var that = $(this);
if (parseInt(that.parent().find('.element-count').text()) == 0) {
that.prop('disabled', true);
} else {
that.prop('disabled', false);
}
});
}
_update_cumulatives(el);
}
function _update_cumulatives(el) {
var target_eles = el.parent().parent().parent().parent().find('.cumulative-elementals');
var target_gold = el.parent().parent().parent().parent().parent().parent().find('.cumulative-gold-cost');
var target_fodders = el.parent().parent().parent().parent().parent().parent().find('.cumulative-fodders');
var source_eles = el.parent().parent().parent().parent().parent().find('.element-count:visible');
var source_gold = el.parent().parent().parent().parent().parent().find('.gold-cost-text:visible');
var source_fodders = el.parent().parent().parent().parent().parent().find('.fodder-count:visible');
var result_eles = {
2: 0, 3: 0, 4: 0, 5: 0
};
var result_fodders = {
1: 0, 2: 0, 3: 0, 4: 0, 5: 0
};
var result_gold = 0;
source_eles.each(function() {
var grade = parseInt($(this).attr('data-grade'));
var count = parseInt($(this).text());
result_eles[grade] += count;
});
source_gold.each(function() {
result_gold += parseInt($(this).attr('data-value'));
});
source_fodders.each(function() {
var grade = parseInt($(this).attr('data-grade'));
var count = parseInt($(this).text());
result_fodders[grade] += count;
});
$.each(result_eles, function(i, x) {
target_eles.find('.cec-' + i).text(result_eles[i]);
})
target_gold.text(result_gold.toLocaleString());
$.each(result_fodders, function(i, x) {
target_fodders.find('.cfc-' + i).text(result_fodders[i]);
})
}
function _update_fodder_meter(el, _slider_el, grade) {
var sum = 0;
var cost = 0;
el.find('.fodder-count').each(function(i, x) {
sum += parseInt($(this).text()) * fodder_grade[grade][i];
});
el.find('.fodder-cost').each(function(i, x) {
var val = parseInt($(this).attr('data-value'));
if (isNaN(val)) {
return true;
}
cost += val;
})
el.parent().parent().find('.gold-cost-text').text(cost.toLocaleString());
el.parent().parent().find('.gold-cost-text').attr('data-value', cost);
_slider_el.set(sum);
if (sum >= 500) {
$.each(el.find('.fodder-add'), function() {
$(this).prop('disabled', true);
});
$.each(el.find('.fodder-subtract'), function() {
var that = $(this);
if (parseInt(that.parent().find('.fodder-count').text()) == 0) {
that.prop('disabled', true);
} else {
that.prop('disabled', false);
}
});
} else if (sum <= 0) {
$.each(el.find('.fodder-subtract'), function() {
$(this).prop('disabled', true);
});
$.each(el.find('.fodder-add'), function() {
$(this).prop('disabled', false);
})
} else {
$.each(el.find('.fodder-add'), function() {
$(this).prop('disabled', false);
});
$.each(el.find('.fodder-subtract'), function() {
var that = $(this);
if (parseInt(that.parent().find('.fodder-count').text()) == 0) {
that.prop('disabled', true);
} else {
that.prop('disabled', false);
}
});
}
_update_cumulatives(el);
}
function _update_element_count(el, x, grade, _slider_el) {
var target = el.parent().find('.element-count');
var value = parseInt(target.text());
var is_exceeded = _slider_el.bootstrapSlider('getValue') >= 100 ? true : false;
target.text((value == 0 && x < 0) || (is_exceeded && x > 0) ? value : value + x);
}
function _update_fodder_count(el, x, grade, _slider_el) {
var target = el.parent().find('.fodder-count');
var cost = el.parent().find('.fodder-cost');
var value = parseInt(target.text());
var is_exceeded = _slider_el.bootstrapSlider('getValue')[0] >= 500 ? true : false;
target.text((value == 0 && x < 0) || (is_exceeded && x > 0) ? value : value + x);
cost.text((parseInt(target.text()) * gold_cost[grade]).toLocaleString());
cost.attr('data-value', parseInt(target.text()) * gold_cost[grade])
}
function _set(el, value) {
if (el.bootstrapSlider('getAttribute', 'range')) {
el.bootstrapSlider('setValue', [parseFloat(value),
parseFloat(value) * 1.5]
, false
, true);
_alert_exceeding(el.parent().parent().find('.power-ups-group').first().find('.exceed-warning').first(), parseFloat(value) > 500);
_alert_exceeding(el.parent().parent().find('.power-ups-group').first().find('.exceed-warning').last(), parseFloat(value) * 1.5 > 500);
} else {
el.bootstrapSlider('setValue', parseFloat(value), false, true);
_alert_exceeding(el, value > 100);
}
}
function _alert_exceeding(el, _bool) {
if (_bool) {
el.parent().find('.exceed-warning').html('<span class="glyphicon glyphicon-exclamation-sign"></span>');
} else {
el.parent().find('.exceed-warning').html('');
}
}
function _add(el, value) {
if (el.bootstrapSlider('getAttribute', 'range')) {
var current_value = el.bootstrapSlider('getValue')[0];
el.bootstrapSlider('setValue', [parseFloat(current_value + value),
parseFloat(current_value + value) * 1.5]
, false
, true);
} else {
var current_value = el.bootstrapSlider('getValue');
el.bootstrapSlider('setValue', parseFloat(current_value + value), false, true);
}
return el.bootstrapSlider('getValue');
}
function _create_element_bar(id) {
return '<input id="' + id + '" type="text" class="element-bar" />'
+ '<ul class="pagination power-ups-group">'
+ '<li>'
+ '<span id="' + id + '-text"> '
+ '<span class="value"></span>'
+ '<span class="exceed-warning"></span>'
+ '</span>'
+ '</li>'
+ '</ul>';
}
function _create_power_up_bar(id) {
return '<input id="' + id + '" type="text" class="fodder-bar" />'
+ '<ul class="pagination power-ups-group">'
+ '<li>'
+ '<span id="' + id + '-text"> '
+ '<span class="value"></span>'
+ '<span class="exceed-warning"></span>'
+ '</span>'
+ '</li>'
+ '<li>'
+ '<span id="' + id + '-max"> '
+ '<span class="value"></span>'
+ '<span class="exceed-warning"></span>'
+ '</span>'
+ '</li>'
+ '</ul>';
}
function _activate_element_slider(el, _el_text) {
$(el).bootstrapSlider({
ticks: [0, 100],
ticks_labels: [0, 100],
value: 0
});
var el_text = $(_el_text).find('.value');
$(el).bootstrapSlider('disable');
$(el).on('change', function(evt) {
if (evt.value == undefined) {
} else {
$(el_text).html(_element_string(evt.value.newValue));
// element-slider is 2-levels deeper than fodder-slider is
_evaluate_dependency($(el).parent().parent());
}
});
$(el_text).html(_element_string($(el).bootstrapSlider('getValue')));
}
function _activate_power_up_slider(el, _el_text, _el_max) {
$(el).bootstrapSlider({
ticks: [0, 100, 200, 300, 400, 500],
ticks_labels: [0, 1, 2, 3, 4, 5],
value: [0, 0],
range: true
});
var el_text = $(_el_text).find('.value');
var el_max = $(_el_max).find('.value');
$(el).bootstrapSlider('disable');
$(el).on('change', function(evt) {
if (evt.value == undefined) {
} else {
$(el_text).html(_power_up_string(evt.value.newValue[0]));
$(el_max).html(_power_up_string(evt.value.newValue[1]));
if (evt.value.newValue[0] >= 500) {
$(el_text).parent().addClass('active');
} else {
$(el_text).parent().removeClass('active');
}
if (evt.value.newValue[1] >= 500) {
$(el_max).parent().addClass('active');
} else {
$(el_max).parent().removeClass('active');
}
}
_evaluate_dependency($(el));
});
$(el_text).html(_power_up_string($(el).bootstrapSlider('getValue')[0]));
$(el_max).html(_power_up_string($(el).bootstrapSlider('getValue')[1]));
}
function _power_up_string(value) {
var power = parseInt(value / 100);
var progress = value % 100;
return '<strong>+' + power + '</strong> ' + progress + '%';
}
function _element_string(value) {
return '<strong>' + value + '</strong> %';
}
function _reset(el) {
//console.log(el);
el.find('.btn-group').each(function() {
var group = $(this);
var fodder_count = group.find('.fodder-count');
var element_count = group.find('.element-count');
if (fodder_count.length > 0) {
var count = parseInt(fodder_count.text());
for (var i = 0; i < count; i++) {
group.find('.fodder-subtract').trigger('click');
}
}
if (element_count.length > 0) {
var count = parseInt(element_count.text());
for (var i = 0; i < count; i++) {
group.find('.element-subtract').trigger('click');
}
}
});
} | {
"content_hash": "d3bde12d0b4e4d1aad1faf954b1f45b4",
"timestamp": "",
"source": "github",
"line_count": 744,
"max_line_length": 158,
"avg_line_length": 31.030913978494624,
"alnum_prop": 0.5338069043184476,
"repo_name": "gbudiman/skdb",
"id": "3c5a3a3709d6f3c7d26ce60b9779e43e43f78481",
"size": "23234",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "app/assets/javascripts/power_ups.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "3379"
},
{
"name": "HTML",
"bytes": "57148"
},
{
"name": "JavaScript",
"bytes": "49696"
},
{
"name": "Ruby",
"bytes": "139523"
}
],
"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_65) on Mon Dec 23 09:52:33 EST 2013 -->
<TITLE>
JAXPUtils (Apache Ant API)
</TITLE>
<META NAME="date" CONTENT="2013-12-23">
<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="JAXPUtils (Apache Ant API)";
}
}
</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="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</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-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/apache/tools/ant/util/JavaEnvUtils.html" title="class in org.apache.tools.ant.util"><B>PREV CLASS</B></A>
<A HREF="../../../../../org/apache/tools/ant/util/KeepAliveInputStream.html" title="class in org.apache.tools.ant.util"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?org/apache/tools/ant/util/JAXPUtils.html" target="_top"><B>FRAMES</B></A>
<A HREF="JAXPUtils.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 | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <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.apache.tools.ant.util</FONT>
<BR>
Class JAXPUtils</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.tools.ant.util.JAXPUtils</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>JAXPUtils</B><DT>extends java.lang.Object</DL>
</PRE>
<P>
Collection of helper methods that retrieve a ParserFactory or
Parsers and Readers.
<p>This class will create only a single factory instance.</p>
<P>
<P>
<DL>
<DT><B>Since:</B></DT>
<DD>Ant 1.5</DD>
</DL>
<HR>
<P>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/JAXPUtils.html#JAXPUtils()">JAXPUtils</A></B>()</CODE>
<BR>
</TD>
</TR>
</TABLE>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static javax.xml.parsers.DocumentBuilder</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/JAXPUtils.html#getDocumentBuilder()">getDocumentBuilder</A></B>()</CODE>
<BR>
Returns a newly created DocumentBuilder.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static org.xml.sax.XMLReader</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/JAXPUtils.html#getNamespaceXMLReader()">getNamespaceXMLReader</A></B>()</CODE>
<BR>
Returns a newly created SAX 2 XMLReader, which is namespace aware</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static javax.xml.parsers.SAXParserFactory</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/JAXPUtils.html#getNSParserFactory()">getNSParserFactory</A></B>()</CODE>
<BR>
Returns the parser factory to use to create namespace aware parsers.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static org.xml.sax.Parser</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/JAXPUtils.html#getParser()">getParser</A></B>()</CODE>
<BR>
Returns a newly created SAX 1 Parser, using the default parser
factory.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static javax.xml.parsers.SAXParserFactory</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/JAXPUtils.html#getParserFactory()">getParserFactory</A></B>()</CODE>
<BR>
Returns the parser factory to use.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/JAXPUtils.html#getSystemId(java.io.File)">getSystemId</A></B>(java.io.File file)</CODE>
<BR>
This is a best attempt to provide a URL.toExternalForm() from
a file URL.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static org.xml.sax.XMLReader</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/JAXPUtils.html#getXMLReader()">getXMLReader</A></B>()</CODE>
<BR>
Returns a newly created SAX 2 XMLReader, using the default parser
factory.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static javax.xml.parsers.SAXParserFactory</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/JAXPUtils.html#newParserFactory()">newParserFactory</A></B>()</CODE>
<BR>
Returns a new parser factory instance.</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="JAXPUtils()"><!-- --></A><H3>
JAXPUtils</H3>
<PRE>
public <B>JAXPUtils</B>()</PRE>
<DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="getParserFactory()"><!-- --></A><H3>
getParserFactory</H3>
<PRE>
public static javax.xml.parsers.SAXParserFactory <B>getParserFactory</B>()
throws <A HREF="../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></PRE>
<DL>
<DD>Returns the parser factory to use. Only one parser factory is
ever created by this method and is then cached for future use.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>a SAXParserFactory to use.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></CODE> - on error.<DT><B>Since:</B></DT>
<DD>Ant 1.5</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="getNSParserFactory()"><!-- --></A><H3>
getNSParserFactory</H3>
<PRE>
public static javax.xml.parsers.SAXParserFactory <B>getNSParserFactory</B>()
throws <A HREF="../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></PRE>
<DL>
<DD>Returns the parser factory to use to create namespace aware parsers.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>a SAXParserFactory to use which supports manufacture of
namespace aware parsers.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></CODE> - on error.<DT><B>Since:</B></DT>
<DD>Ant 1.6</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="newParserFactory()"><!-- --></A><H3>
newParserFactory</H3>
<PRE>
public static javax.xml.parsers.SAXParserFactory <B>newParserFactory</B>()
throws <A HREF="../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></PRE>
<DL>
<DD>Returns a new parser factory instance.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the parser factory.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></CODE> - on error.<DT><B>Since:</B></DT>
<DD>Ant 1.5</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="getParser()"><!-- --></A><H3>
getParser</H3>
<PRE>
public static org.xml.sax.Parser <B>getParser</B>()
throws <A HREF="../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></PRE>
<DL>
<DD>Returns a newly created SAX 1 Parser, using the default parser
factory.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>a SAX 1 Parser.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></CODE> - on error.<DT><B>Since:</B></DT>
<DD>Ant 1.5</DD>
<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/tools/ant/util/JAXPUtils.html#getParserFactory()"><CODE>getParserFactory()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getXMLReader()"><!-- --></A><H3>
getXMLReader</H3>
<PRE>
public static org.xml.sax.XMLReader <B>getXMLReader</B>()
throws <A HREF="../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></PRE>
<DL>
<DD>Returns a newly created SAX 2 XMLReader, using the default parser
factory.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>a SAX 2 XMLReader.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></CODE> - on error.<DT><B>Since:</B></DT>
<DD>Ant 1.5</DD>
<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/tools/ant/util/JAXPUtils.html#getParserFactory()"><CODE>getParserFactory()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getNamespaceXMLReader()"><!-- --></A><H3>
getNamespaceXMLReader</H3>
<PRE>
public static org.xml.sax.XMLReader <B>getNamespaceXMLReader</B>()
throws <A HREF="../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></PRE>
<DL>
<DD>Returns a newly created SAX 2 XMLReader, which is namespace aware
<P>
<DD><DL>
<DT><B>Returns:</B><DD>a SAX 2 XMLReader.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></CODE> - on error.<DT><B>Since:</B></DT>
<DD>Ant 1.6</DD>
<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/tools/ant/util/JAXPUtils.html#getParserFactory()"><CODE>getParserFactory()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getSystemId(java.io.File)"><!-- --></A><H3>
getSystemId</H3>
<PRE>
public static java.lang.String <B>getSystemId</B>(java.io.File file)</PRE>
<DL>
<DD>This is a best attempt to provide a URL.toExternalForm() from
a file URL. Some parsers like Crimson choke on uri that are made of
backslashed paths (ie windows) as it is does not conform
URI specifications.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>file</CODE> - the file to create the system id from.
<DT><B>Returns:</B><DD>the systemid corresponding to the given file.<DT><B>Since:</B></DT>
<DD>Ant 1.5.2</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="getDocumentBuilder()"><!-- --></A><H3>
getDocumentBuilder</H3>
<PRE>
public static javax.xml.parsers.DocumentBuilder <B>getDocumentBuilder</B>()
throws <A HREF="../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></PRE>
<DL>
<DD>Returns a newly created DocumentBuilder.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>a DocumentBuilder.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></CODE> - on error.<DT><B>Since:</B></DT>
<DD>Ant 1.6</DD>
</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=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="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</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-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/apache/tools/ant/util/JavaEnvUtils.html" title="class in org.apache.tools.ant.util"><B>PREV CLASS</B></A>
<A HREF="../../../../../org/apache/tools/ant/util/KeepAliveInputStream.html" title="class in org.apache.tools.ant.util"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?org/apache/tools/ant/util/JAXPUtils.html" target="_top"><B>FRAMES</B></A>
<A HREF="JAXPUtils.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 | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>
| {
"content_hash": "783665a1a56ed8738c771c5fbce9fa74",
"timestamp": "",
"source": "github",
"line_count": 465,
"max_line_length": 196,
"avg_line_length": 40.376344086021504,
"alnum_prop": 0.6268974700399468,
"repo_name": "adriancmiranda/flash-compiler",
"id": "905ddd10792554a5173efcdee6b91825424adfcc",
"size": "18775",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "ApacheFlexSDK4/ant/manual/api/org/apache/tools/ant/util/JAXPUtils.html",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ActionScript",
"bytes": "33714531"
},
{
"name": "Batchfile",
"bytes": "65217"
},
{
"name": "C",
"bytes": "52818"
},
{
"name": "CSS",
"bytes": "576224"
},
{
"name": "HTML",
"bytes": "51021362"
},
{
"name": "Java",
"bytes": "190833"
},
{
"name": "JavaScript",
"bytes": "599657"
},
{
"name": "Objective-C",
"bytes": "79911"
},
{
"name": "Perl",
"bytes": "9844"
},
{
"name": "Python",
"bytes": "3299"
},
{
"name": "R",
"bytes": "1782"
},
{
"name": "Shell",
"bytes": "149532"
},
{
"name": "Visual Basic",
"bytes": "3122"
},
{
"name": "XSLT",
"bytes": "977241"
}
],
"symlink_target": ""
} |
HedyNet
=======
This is the repository for a makerspace management system for Seattle Attic.
It is written in Django, with a default setup of Django/Apache/MySQL.
Installation
============
This set up requires certain environment variables to be set. The list
can be found in the HedyNet/HedyNet/wsgi.py file.
Best practices involve using virtualenv. Then, one can:
pip install -r requirements/local.txt
To install the necessary Python dependencies. The virtualenv environment
will also need those environment variables to be set in this environment file:
bin/postactivate
Additionally, in order to compile the SCSS into CSS, Ruby is required with the
following gems installed:
gem install zurb-foundation
gem install compass
If you are using apache, there is an example config in HedyNet/apache.
Collecting Static Files
=======================
Do these commands from the base HedyNet directory.
First, one can use Django's collectstatic:
./manage.py collectstatic
Then in the HedyNet directory, one can use:
compass compile
To do a single compile, or:
compass watch
To continually watch the SCSS files for changes and recompile.
| {
"content_hash": "d923707cf0181e8980ed5671eea30c4b",
"timestamp": "",
"source": "github",
"line_count": 48,
"max_line_length": 78,
"avg_line_length": 24.604166666666668,
"alnum_prop": 0.7502116850127011,
"repo_name": "SeattleAttic/HedyNet",
"id": "612c10767b7c1e3e792fcf32ef4b849bb128a9d8",
"size": "1181",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "382271"
},
{
"name": "HTML",
"bytes": "93617"
},
{
"name": "JavaScript",
"bytes": "623"
},
{
"name": "Python",
"bytes": "88382"
},
{
"name": "Ruby",
"bytes": "897"
}
],
"symlink_target": ""
} |
namespace Microsoft.Azure.Management.Network.Models
{
using Microsoft.Rest;
using Microsoft.Rest.Serialization;
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// Probe of the application gateway.
/// </summary>
[Rest.Serialization.JsonTransformation]
public partial class ApplicationGatewayProbe : SubResource
{
/// <summary>
/// Initializes a new instance of the ApplicationGatewayProbe class.
/// </summary>
public ApplicationGatewayProbe()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the ApplicationGatewayProbe class.
/// </summary>
/// <param name="id">Resource ID.</param>
/// <param name="protocol">The protocol used for the probe. Possible
/// values are 'Http' and 'Https'. Possible values include: 'Http',
/// 'Https'</param>
/// <param name="host">Host name to send the probe to.</param>
/// <param name="path">Relative path of probe. Valid path starts from
/// '/'. Probe is sent to
/// <Protocol>://<host>:<port><path></param>
/// <param name="interval">The probing interval in seconds. This is the
/// time interval between two consecutive probes. Acceptable values are
/// from 1 second to 86400 seconds.</param>
/// <param name="timeout">The probe timeout in seconds. Probe marked as
/// failed if valid response is not received with this timeout period.
/// Acceptable values are from 1 second to 86400 seconds.</param>
/// <param name="unhealthyThreshold">The probe retry count. Backend
/// server is marked down after consecutive probe failure count reaches
/// UnhealthyThreshold. Acceptable values are from 1 second to
/// 20.</param>
/// <param name="pickHostNameFromBackendHttpSettings">Whether the host
/// header should be picked from the backend http settings. Default
/// value is false.</param>
/// <param name="minServers">Minimum number of servers that are always
/// marked healthy. Default value is 0.</param>
/// <param name="match">Criterion for classifying a healthy probe
/// response.</param>
/// <param name="provisioningState">Provisioning state of the backend
/// http settings resource. Possible values are: 'Updating',
/// 'Deleting', and 'Failed'.</param>
/// <param name="name">Name of the probe that is unique within an
/// Application Gateway.</param>
/// <param name="etag">A unique read-only string that changes whenever
/// the resource is updated.</param>
/// <param name="type">Type of the resource.</param>
public ApplicationGatewayProbe(string id = default(string), string protocol = default(string), string host = default(string), string path = default(string), int? interval = default(int?), int? timeout = default(int?), int? unhealthyThreshold = default(int?), bool? pickHostNameFromBackendHttpSettings = default(bool?), int? minServers = default(int?), ApplicationGatewayProbeHealthResponseMatch match = default(ApplicationGatewayProbeHealthResponseMatch), string provisioningState = default(string), string name = default(string), string etag = default(string), string type = default(string))
: base(id)
{
Protocol = protocol;
Host = host;
Path = path;
Interval = interval;
Timeout = timeout;
UnhealthyThreshold = unhealthyThreshold;
PickHostNameFromBackendHttpSettings = pickHostNameFromBackendHttpSettings;
MinServers = minServers;
Match = match;
ProvisioningState = provisioningState;
Name = name;
Etag = etag;
Type = type;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets the protocol used for the probe. Possible values are
/// 'Http' and 'Https'. Possible values include: 'Http', 'Https'
/// </summary>
[JsonProperty(PropertyName = "properties.protocol")]
public string Protocol { get; set; }
/// <summary>
/// Gets or sets host name to send the probe to.
/// </summary>
[JsonProperty(PropertyName = "properties.host")]
public string Host { get; set; }
/// <summary>
/// Gets or sets relative path of probe. Valid path starts from '/'.
/// Probe is sent to
/// &lt;Protocol&gt;://&lt;host&gt;:&lt;port&gt;&lt;path&gt;
/// </summary>
[JsonProperty(PropertyName = "properties.path")]
public string Path { get; set; }
/// <summary>
/// Gets or sets the probing interval in seconds. This is the time
/// interval between two consecutive probes. Acceptable values are from
/// 1 second to 86400 seconds.
/// </summary>
[JsonProperty(PropertyName = "properties.interval")]
public int? Interval { get; set; }
/// <summary>
/// Gets or sets the probe timeout in seconds. Probe marked as failed
/// if valid response is not received with this timeout period.
/// Acceptable values are from 1 second to 86400 seconds.
/// </summary>
[JsonProperty(PropertyName = "properties.timeout")]
public int? Timeout { get; set; }
/// <summary>
/// Gets or sets the probe retry count. Backend server is marked down
/// after consecutive probe failure count reaches UnhealthyThreshold.
/// Acceptable values are from 1 second to 20.
/// </summary>
[JsonProperty(PropertyName = "properties.unhealthyThreshold")]
public int? UnhealthyThreshold { get; set; }
/// <summary>
/// Gets or sets whether the host header should be picked from the
/// backend http settings. Default value is false.
/// </summary>
[JsonProperty(PropertyName = "properties.pickHostNameFromBackendHttpSettings")]
public bool? PickHostNameFromBackendHttpSettings { get; set; }
/// <summary>
/// Gets or sets minimum number of servers that are always marked
/// healthy. Default value is 0.
/// </summary>
[JsonProperty(PropertyName = "properties.minServers")]
public int? MinServers { get; set; }
/// <summary>
/// Gets or sets criterion for classifying a healthy probe response.
/// </summary>
[JsonProperty(PropertyName = "properties.match")]
public ApplicationGatewayProbeHealthResponseMatch Match { get; set; }
/// <summary>
/// Gets or sets provisioning state of the backend http settings
/// resource. Possible values are: 'Updating', 'Deleting', and
/// 'Failed'.
/// </summary>
[JsonProperty(PropertyName = "properties.provisioningState")]
public string ProvisioningState { get; set; }
/// <summary>
/// Gets or sets name of the probe that is unique within an Application
/// Gateway.
/// </summary>
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }
/// <summary>
/// Gets or sets a unique read-only string that changes whenever the
/// resource is updated.
/// </summary>
[JsonProperty(PropertyName = "etag")]
public string Etag { get; set; }
/// <summary>
/// Gets or sets type of the resource.
/// </summary>
[JsonProperty(PropertyName = "type")]
public string Type { get; set; }
}
}
| {
"content_hash": "f8514340e204324930f38eac5f89149b",
"timestamp": "",
"source": "github",
"line_count": 176,
"max_line_length": 600,
"avg_line_length": 45.09659090909091,
"alnum_prop": 0.6125740204107345,
"repo_name": "jamestao/azure-sdk-for-net",
"id": "8b964cd675589e988384530657986aa557509746",
"size": "8290",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/SDKs/Network/Management.Network/Generated/Models/ApplicationGatewayProbe.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "15346"
},
{
"name": "C#",
"bytes": "143185818"
},
{
"name": "HTML",
"bytes": "191432"
},
{
"name": "JavaScript",
"bytes": "7875"
},
{
"name": "PowerShell",
"bytes": "110163"
},
{
"name": "Shell",
"bytes": "32470"
}
],
"symlink_target": ""
} |
<?php
namespace Oktolab\MediaBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\Extension\Core\Type\IntegerType;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Bprs\AssetBundle\Form\Type\AssetType;
use Oktolab\MediaBundle\Entity\Media;
class MediaType extends AbstractType
{
private $trans;
public function __construct($trans)
{
$this->trans = $trans;
}
/**
* @param FormBuilderInterface $builder
* @param array $options
*/
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add(
'quality',
TextType::class,
[
'label' => 'oktolab_media_quality_label',
'attr' => [
'placeholder' => 'oktolab_media_media_quality_placeholder'
]
]
)
->add('status', ChoiceType::class, [
'choices' => [
$this->trans->transchoice('oktolab_media.media_status_choice', Media::OKTOLAB_MEDIA_STATUS_MEDIA_TOPROGRESS) => Media::OKTOLAB_MEDIA_STATUS_MEDIA_TOPROGRESS,
$this->trans->transchoice('oktolab_media.media_status_choice', Media::OKTOLAB_MEDIA_STATUS_MEDIA_INPROGRESS) => Media::OKTOLAB_MEDIA_STATUS_MEDIA_INPROGRESS,
$this->trans->transchoice('oktolab_media.media_status_choice', Media::OKTOLAB_MEDIA_STATUS_MEDIA_FINISHED) => Media::OKTOLAB_MEDIA_STATUS_MEDIA_FINISHED
]
])
->add('public', CheckboxType::class, ['required' => false, 'label' => 'oktolab_media_public_label'])
->add('sortNumber', IntegerType::class, ['label' => 'oktolab_media_sortNumber_label'])
->add('progress', IntegerType::class, ['label' => 'oktolab_media_progress_label'])
->add('asset', AssetType::class, ['label' => 'oktolab_media_asset_label']);
}
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
$resolver->setDefaults([
'data_class' => 'Oktolab\MediaBundle\Entity\Media'
]);
}
public function getName()
{
return 'oktolab_media_mediatype';
}
}
| {
"content_hash": "df466e27c8a3ec06794b5d266df0d9ce",
"timestamp": "",
"source": "github",
"line_count": 65,
"max_line_length": 177,
"avg_line_length": 38.49230769230769,
"alnum_prop": 0.6191047162270183,
"repo_name": "OKTOTV/OktolabMediaBundle",
"id": "e0f44915b836a172a56e15663c64813835976f7c",
"size": "2502",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Form/MediaType.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "HTML",
"bytes": "86657"
},
{
"name": "PHP",
"bytes": "285780"
}
],
"symlink_target": ""
} |
<?php
namespace ZfcUserTest\Authentication\Adapter;
use ZfcUserTest\Authentication\Adapter\TestAsset\AbstractAdapterExtension;
class AbstractAdapterTest extends \PHPUnit_Framework_TestCase
{
/**
* The object to be tested.
*
* @var adapter
*/
protected $adapter;
public function setUp()
{
$adapter = new AbstractAdapterExtension();
$this->adapter = $adapter;
}
/**
* @covers ZfcUser\Authentication\Adapter\AbstractAdapter::getStorage
*/
public function testGetStorageWithoutStorageSet()
{
$this->assertInstanceOf('Zend\Authentication\Storage\Session', $this->adapter->getStorage());
}
/**
* @covers ZfcUser\Authentication\Adapter\AbstractAdapter::getStorage
* @covers ZfcUser\Authentication\Adapter\AbstractAdapter::setStorage
*/
public function testSetGetStorage()
{
$storage = new \Zend\Authentication\Storage\Session('ZfcUser');
$storage->write('zfcUser');
$this->adapter->setStorage($storage);
$this->assertInstanceOf('Zend\Authentication\Storage\Session', $this->adapter->getStorage());
$this->assertSame('zfcUser', $this->adapter->getStorage()->read());
}
/**
* @covers ZfcUser\Authentication\Adapter\AbstractAdapter::isSatisfied
*/
public function testIsSatisfied()
{
$this->assertFalse($this->adapter->isSatisfied());
}
public function testSetSatisfied()
{
$result = $this->adapter->setSatisfied();
$this->assertInstanceOf('ZfcUser\Authentication\Adapter\AbstractAdapter', $result);
$this->assertTrue($this->adapter->isSatisfied());
$result = $this->adapter->setSatisfied(false);
$this->assertInstanceOf('ZfcUser\Authentication\Adapter\AbstractAdapter', $result);
$this->assertFalse($this->adapter->isSatisfied());
}
}
| {
"content_hash": "9fe4c305b318fb79ace87f549e981cee",
"timestamp": "",
"source": "github",
"line_count": 62,
"max_line_length": 101,
"avg_line_length": 30.5,
"alnum_prop": 0.6631411951348493,
"repo_name": "Hawa-Abdo/ZfcUser",
"id": "10da4df63b1b0027860407a8f56601761eaa60d1",
"size": "1891",
"binary": false,
"copies": "1",
"ref": "refs/heads/2.x",
"path": "tests/ZfcUserTest/Authentication/Adapter/AbstractAdapterTest.php",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "HTML",
"bytes": "3438"
},
{
"name": "PHP",
"bytes": "340338"
}
],
"symlink_target": ""
} |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.eas.client.forms.menu;
import com.eas.client.forms.HasChildren;
import com.eas.client.forms.HasComponentEvents;
import com.eas.client.forms.components.rt.HasGroup;
import com.eas.client.forms.HasJsName;
import com.eas.client.forms.HasJsValue;
import static com.eas.client.forms.HasJsValue.JS_VALUE_JSDOC;
import com.eas.client.forms.Widget;
import com.eas.client.forms.containers.ButtonGroup;
import com.eas.client.forms.events.ActionEvent;
import com.eas.client.forms.events.ComponentEvent;
import com.eas.client.forms.events.MouseEvent;
import com.eas.client.forms.components.rt.VRadioButtonMenuItem;
import com.eas.client.forms.events.rt.ControlEventsIProxy;
import com.eas.client.forms.layouts.MarginLayout;
import com.eas.design.Undesignable;
import com.eas.script.AlreadyPublishedException;
import com.eas.script.EventMethod;
import com.eas.script.HasPublished;
import com.eas.script.NoPublisherException;
import com.eas.script.ScriptFunction;
import com.eas.script.Scripts;
import java.awt.Color;
import java.awt.Cursor;
import java.awt.Font;
import java.awt.event.FocusEvent;
import java.awt.event.KeyEvent;
import javax.swing.JComponent;
import javax.swing.JMenu;
import javax.swing.JPopupMenu;
import jdk.nashorn.api.scripting.JSObject;
import jdk.nashorn.internal.runtime.JSType;
/**
*
* @author mg
*/
public class RadioMenuItem extends VRadioButtonMenuItem implements HasJsValue, HasPublished, HasComponentEvents, HasGroup, HasJsName, Widget {
protected ButtonGroup group;
public RadioMenuItem(String aText, boolean aSelected) {
this(aText, aSelected, null);
}
private static final String CONSTRUCTOR_JSDOC = ""
+ "/**\n"
+ "* An implementation of a radio button menu item.\n"
+ "* @param text the text of the component (optional).\n"
+ "* @param selected <code>true</code> if selected (optional).\n"
+ "* @param actionPerformed On action performed function (optional).\n"
+ "*/";
@ScriptFunction(jsDoc = CONSTRUCTOR_JSDOC, params = {"text", "selected", "actionPerformed"})
public RadioMenuItem(String aText, boolean aSelected, JSObject aActionPerformedHandler) {
super(aText, aSelected);
setOnActionPerformed(aActionPerformedHandler);
}
public RadioMenuItem(String aText) {
this(aText, false);
}
public RadioMenuItem() {
this(null, false);
}
@ScriptFunction(name = "value", jsDoc = JS_VALUE_JSDOC)
@Undesignable
@Override
public Object getJsValue() {
return super.getValue();
}
@ScriptFunction
@Override
public void setJsValue(Object aValue) {
setValue(aValue != null ? JSType.toBoolean(aValue) : null);
}
@Override
public Boolean getValue() {
return super.getValue();
}
@Override
public void setValue(Boolean aValue) {
super.setValue(aValue);
}
@ScriptFunction(jsDoc = JS_NAME_DOC)
@Override
public String getName() {
return super.getName();
}
@ScriptFunction(jsDoc = GET_NEXT_FOCUSABLE_COMPONENT_JSDOC)
@Override
public JComponent getNextFocusableComponent() {
return (JComponent) super.getNextFocusableComponent();
}
@ScriptFunction
@Override
public void setNextFocusableComponent(JComponent aValue) {
super.setNextFocusableComponent(aValue);
}
protected String errorMessage;
@ScriptFunction(jsDoc = ERROR_JSDOC)
@Override
public String getError() {
return errorMessage;
}
@ScriptFunction
@Override
public void setError(String aValue) {
errorMessage = aValue;
}
@ScriptFunction(jsDoc = BACKGROUND_JSDOC)
@Override
public Color getBackground() {
return super.getBackground();
}
@ScriptFunction
@Override
public void setBackground(Color aValue) {
super.setBackground(aValue);
}
@ScriptFunction(jsDoc = FOREGROUND_JSDOC)
@Override
public Color getForeground() {
return super.getForeground();
}
@ScriptFunction
@Override
public void setForeground(Color aValue) {
super.setForeground(aValue);
}
@ScriptFunction(jsDoc = VISIBLE_JSDOC)
@Override
public boolean getVisible() {
return super.isVisible();
}
@ScriptFunction
@Override
public void setVisible(boolean aValue) {
super.setVisible(aValue);
}
@ScriptFunction(jsDoc = FOCUSABLE_JSDOC)
@Override
public boolean getFocusable() {
return super.isFocusable();
}
@ScriptFunction
@Override
public void setFocusable(boolean aValue) {
super.setFocusable(aValue);
}
@ScriptFunction(jsDoc = ENABLED_JSDOC)
@Override
public boolean getEnabled() {
return super.isEnabled();
}
@ScriptFunction
@Override
public void setEnabled(boolean aValue) {
super.setEnabled(aValue);
}
@ScriptFunction(jsDoc = TOOLTIP_TEXT_JSDOC)
@Override
public String getToolTipText() {
return super.getToolTipText();
}
@ScriptFunction
@Override
public void setToolTipText(String aValue) {
super.setToolTipText(aValue);
}
@ScriptFunction(jsDoc = OPAQUE_TEXT_JSDOC)
@Override
public boolean getOpaque() {
return super.isOpaque();
}
@ScriptFunction
@Override
public void setOpaque(boolean aValue) {
super.setOpaque(aValue);
}
@ScriptFunction(jsDoc = COMPONENT_POPUP_MENU_JSDOC)
@Override
public JPopupMenu getComponentPopupMenu() {
return super.getComponentPopupMenu();
}
@ScriptFunction
@Override
public void setComponentPopupMenu(JPopupMenu aMenu) {
super.setComponentPopupMenu(aMenu);
}
@ScriptFunction(jsDoc = FONT_JSDOC)
@Override
public Font getFont() {
return super.getFont();
}
@ScriptFunction
@Override
public void setFont(Font aFont) {
super.setFont(aFont);
}
@ScriptFunction(jsDoc = CURSOR_JSDOC)
@Override
public Cursor getCursor() {
return super.getCursor();
}
@ScriptFunction
@Override
public void setCursor(Cursor aCursor) {
super.setCursor(aCursor);
}
@ScriptFunction(jsDoc = LEFT_JSDOC)
@Override
public int getLeft() {
return super.getLocation().x;
}
@ScriptFunction
@Override
public void setLeft(int aValue) {
if (super.getParent() != null && super.getParent().getLayout() instanceof MarginLayout) {
MarginLayout.ajustLeft(this, aValue);
}
super.setLocation(aValue, getTop());
}
@ScriptFunction(jsDoc = TOP_JSDOC)
@Override
public int getTop() {
return super.getLocation().y;
}
@ScriptFunction
@Override
public void setTop(int aValue) {
if (super.getParent() != null && super.getParent().getLayout() instanceof MarginLayout) {
MarginLayout.ajustTop(this, aValue);
}
super.setLocation(getLeft(), aValue);
}
@ScriptFunction(jsDoc = WIDTH_JSDOC)
@Override
public int getWidth() {
return super.getWidth();
}
@ScriptFunction
@Override
public void setWidth(int aValue) {
Widget.setWidth(this, aValue);
}
@ScriptFunction(jsDoc = HEIGHT_JSDOC)
@Override
public int getHeight() {
return super.getHeight();
}
@ScriptFunction
@Override
public void setHeight(int aValue) {
Widget.setHeight(this, aValue);
}
@ScriptFunction(jsDoc = FOCUS_JSDOC)
@Override
public void focus() {
super.requestFocus();
}
@Override
public String toString() {
return String.format("%s [%s]", super.getName() != null ? super.getName() : "", getClass().getSimpleName());
}
// Native API
@ScriptFunction(jsDoc = NATIVE_COMPONENT_JSDOC)
@Override
public JComponent getComponent() {
return this;
}
@ScriptFunction(jsDoc = NATIVE_ELEMENT_JSDOC)
@Override
public Object getElement() {
return null;
}
@ScriptFunction(name = "parent", jsDoc = PARENT_JSDOC)
@Override
public Widget getParentWidget() {
java.awt.Container parent = super.getParent();
if (parent instanceof JPopupMenu && ((JPopupMenu) parent).getInvoker() instanceof JMenu) {
parent = (java.awt.Container) ((JPopupMenu) parent).getInvoker();
}
return parent instanceof HasChildren ? (Widget) parent : null;
}
private static final String TEXT_JSDOC = ""
+ "/**\n"
+ "* The menu item text.\n"
+ "*/";
@ScriptFunction(jsDoc = TEXT_JSDOC)
@Override
public String getText() {
return super.getText();
}
@Override
public void setText(String aValue) {
super.setText(aValue);
}
private static final String SELECTED_JSDOC = ""
+ "/**\n"
+ "* <code>true</code> if the menu item is selected.\n"
+ "*/";
@ScriptFunction(jsDoc = SELECTED_JSDOC)
public boolean getSelected() {
return super.isSelected();
}
@ScriptFunction
@Override
public void setSelected(boolean aValue) {
super.setSelected(aValue);
if (!aValue && super.isSelected() && group != null) {
group.clearSelection();
super.setSelected(aValue);
}
}
@ScriptFunction(jsDoc = ""
+ "/**\n"
+ " * The ButtonGroup this component belongs to.\n"
+ " */")
@Override
public ButtonGroup getButtonGroup() {
return group;
}
@ScriptFunction
@Override
public void setButtonGroup(ButtonGroup aGroup) {
if (group != aGroup) {
if (group != null) {
group.remove(this);
}
group = aGroup;
if (group != null) {
group.add(this);
}
}
}
protected JSObject published;
@Override
public JSObject getPublished() {
if (published == null) {
JSObject publisher = Scripts.getSpace().getPublisher(this.getClass().getName());
if (publisher == null || !publisher.isFunction()) {
throw new NoPublisherException();
}
published = (JSObject) publisher.call(null, new Object[]{this});
}
return published;
}
@Override
public void setPublished(JSObject aValue) {
if (published != null) {
throw new AlreadyPublishedException();
}
published = aValue;
}
protected ControlEventsIProxy eventsProxy = new ControlEventsIProxy(this);
@ScriptFunction(jsDoc = ON_MOUSE_CLICKED_JSDOC)
@EventMethod(eventClass = MouseEvent.class)
@Undesignable
@Override
public JSObject getOnMouseClicked() {
return eventsProxy.getHandlers().get(ControlEventsIProxy.mouseClicked);
}
@ScriptFunction
@Override
public void setOnMouseClicked(JSObject aValue) {
eventsProxy.getHandlers().put(ControlEventsIProxy.mouseClicked, aValue);
}
@ScriptFunction(jsDoc = ON_MOUSE_DRAGGED_JSDOC)
@EventMethod(eventClass = MouseEvent.class)
@Undesignable
@Override
public JSObject getOnMouseDragged() {
return eventsProxy.getHandlers().get(ControlEventsIProxy.mouseDragged);
}
@ScriptFunction
@Override
public void setOnMouseDragged(JSObject aValue) {
eventsProxy.getHandlers().put(ControlEventsIProxy.mouseDragged, aValue);
}
@ScriptFunction(jsDoc = ON_MOUSE_ENTERED_JSDOC)
@EventMethod(eventClass = MouseEvent.class)
@Undesignable
@Override
public JSObject getOnMouseEntered() {
return eventsProxy.getHandlers().get(ControlEventsIProxy.mouseEntered);
}
@ScriptFunction
@Override
public void setOnMouseEntered(JSObject aValue) {
eventsProxy.getHandlers().put(ControlEventsIProxy.mouseEntered, aValue);
}
@ScriptFunction(jsDoc = ON_MOUSE_EXITED_JSDOC)
@EventMethod(eventClass = MouseEvent.class)
@Undesignable
@Override
public JSObject getOnMouseExited() {
return eventsProxy.getHandlers().get(ControlEventsIProxy.mouseExited);
}
@ScriptFunction
@Override
public void setOnMouseExited(JSObject aValue) {
eventsProxy.getHandlers().put(ControlEventsIProxy.mouseExited, aValue);
}
@ScriptFunction(jsDoc = ON_MOUSE_MOVED_JSDOC)
@EventMethod(eventClass = MouseEvent.class)
@Undesignable
@Override
public JSObject getOnMouseMoved() {
return eventsProxy.getHandlers().get(ControlEventsIProxy.mouseMoved);
}
@ScriptFunction
@Override
public void setOnMouseMoved(JSObject aValue) {
eventsProxy.getHandlers().put(ControlEventsIProxy.mouseMoved, aValue);
}
@ScriptFunction(jsDoc = ON_MOUSE_PRESSED_JSDOC)
@EventMethod(eventClass = MouseEvent.class)
@Undesignable
@Override
public JSObject getOnMousePressed() {
return eventsProxy.getHandlers().get(ControlEventsIProxy.mousePressed);
}
@ScriptFunction
@Override
public void setOnMousePressed(JSObject aValue) {
eventsProxy.getHandlers().put(ControlEventsIProxy.mousePressed, aValue);
}
@ScriptFunction(jsDoc = ON_MOUSE_RELEASED_JSDOC)
@EventMethod(eventClass = MouseEvent.class)
@Undesignable
@Override
public JSObject getOnMouseReleased() {
return eventsProxy.getHandlers().get(ControlEventsIProxy.mouseReleased);
}
@ScriptFunction
@Override
public void setOnMouseReleased(JSObject aValue) {
eventsProxy.getHandlers().put(ControlEventsIProxy.mouseReleased, aValue);
}
@ScriptFunction(jsDoc = ON_MOUSE_WHEEL_MOVED_JSDOC)
@EventMethod(eventClass = MouseEvent.class)
@Undesignable
@Override
public JSObject getOnMouseWheelMoved() {
return eventsProxy.getHandlers().get(ControlEventsIProxy.mouseWheelMoved);
}
@ScriptFunction
@Override
public void setOnMouseWheelMoved(JSObject aValue) {
eventsProxy.getHandlers().put(ControlEventsIProxy.mouseWheelMoved, aValue);
}
@ScriptFunction(jsDoc = ON_ACTION_PERFORMED_JSDOC)
@EventMethod(eventClass = ActionEvent.class)
@Undesignable
@Override
public JSObject getOnActionPerformed() {
return eventsProxy.getHandlers().get(ControlEventsIProxy.actionPerformed);
}
@ScriptFunction
@Override
public void setOnActionPerformed(JSObject aValue) {
eventsProxy.getHandlers().put(ControlEventsIProxy.actionPerformed, aValue);
}
@ScriptFunction(jsDoc = ON_COMPONENT_HIDDEN_JSDOC)
@EventMethod(eventClass = ComponentEvent.class)
@Undesignable
@Override
public JSObject getOnComponentHidden() {
return eventsProxy.getHandlers().get(ControlEventsIProxy.componentHidden);
}
@ScriptFunction
@Override
public void setOnComponentHidden(JSObject aValue) {
eventsProxy.getHandlers().put(ControlEventsIProxy.componentHidden, aValue);
}
@ScriptFunction(jsDoc = ON_COMPONENT_MOVED_JSDOC)
@EventMethod(eventClass = ComponentEvent.class)
@Undesignable
@Override
public JSObject getOnComponentMoved() {
return eventsProxy.getHandlers().get(ControlEventsIProxy.componentMoved);
}
@ScriptFunction
@Override
public void setOnComponentMoved(JSObject aValue) {
eventsProxy.getHandlers().put(ControlEventsIProxy.componentMoved, aValue);
}
@ScriptFunction(jsDoc = ON_COMPONENT_RESIZED_JSDOC)
@EventMethod(eventClass = ComponentEvent.class)
@Undesignable
@Override
public JSObject getOnComponentResized() {
return eventsProxy.getHandlers().get(ControlEventsIProxy.componentResized);
}
@ScriptFunction
@Override
public void setOnComponentResized(JSObject aValue) {
eventsProxy.getHandlers().put(ControlEventsIProxy.componentResized, aValue);
}
@ScriptFunction(jsDoc = ON_COMPONENT_SHOWN_JSDOC)
@EventMethod(eventClass = ComponentEvent.class)
@Undesignable
@Override
public JSObject getOnComponentShown() {
return eventsProxy.getHandlers().get(ControlEventsIProxy.componentShown);
}
@ScriptFunction
@Override
public void setOnComponentShown(JSObject aValue) {
eventsProxy.getHandlers().put(ControlEventsIProxy.componentShown, aValue);
}
@ScriptFunction(jsDoc = ON_FOCUS_GAINED_JSDOC)
@EventMethod(eventClass = FocusEvent.class)
@Undesignable
@Override
public JSObject getOnFocusGained() {
return eventsProxy.getHandlers().get(ControlEventsIProxy.focusGained);
}
@ScriptFunction
@Override
public void setOnFocusGained(JSObject aValue) {
eventsProxy.getHandlers().put(ControlEventsIProxy.focusGained, aValue);
}
@ScriptFunction(jsDoc = ON_FOCUS_LOST_JSDOC)
@EventMethod(eventClass = FocusEvent.class)
@Undesignable
@Override
public JSObject getOnFocusLost() {
return eventsProxy != null ? eventsProxy.getHandlers().get(ControlEventsIProxy.focusLost) : null;
}
@ScriptFunction
@Override
public void setOnFocusLost(JSObject aValue) {
eventsProxy.getHandlers().put(ControlEventsIProxy.focusLost, aValue);
}
@ScriptFunction(jsDoc = ON_KEY_PRESSED_JSDOC)
@EventMethod(eventClass = KeyEvent.class)
@Undesignable
@Override
public JSObject getOnKeyPressed() {
return eventsProxy.getHandlers().get(ControlEventsIProxy.keyPressed);
}
@ScriptFunction
@Override
public void setOnKeyPressed(JSObject aValue) {
eventsProxy.getHandlers().put(ControlEventsIProxy.keyPressed, aValue);
}
@ScriptFunction(jsDoc = ON_KEY_RELEASED_JSDOC)
@EventMethod(eventClass = KeyEvent.class)
@Undesignable
@Override
public JSObject getOnKeyReleased() {
return eventsProxy.getHandlers().get(ControlEventsIProxy.keyReleased);
}
@ScriptFunction
@Override
public void setOnKeyReleased(JSObject aValue) {
eventsProxy.getHandlers().put(ControlEventsIProxy.keyReleased, aValue);
}
@ScriptFunction(jsDoc = ON_KEY_TYPED_JSDOC)
@EventMethod(eventClass = KeyEvent.class)
@Undesignable
@Override
public JSObject getOnKeyTyped() {
return eventsProxy.getHandlers().get(ControlEventsIProxy.keyTyped);
}
@ScriptFunction
@Override
public void setOnKeyTyped(JSObject aValue) {
eventsProxy.getHandlers().put(ControlEventsIProxy.keyTyped, aValue);
}
}
| {
"content_hash": "30623e428812db3e46b15ee3bc306ce7",
"timestamp": "",
"source": "github",
"line_count": 670,
"max_line_length": 142,
"avg_line_length": 29.029850746268657,
"alnum_prop": 0.6463753213367609,
"repo_name": "vadimv/PlatypusJS",
"id": "806fac4b0f7a56a9fe8b28c7cc851a18b75b4a5f",
"size": "19450",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "application/src/components/Forms/src/com/eas/client/forms/menu/RadioMenuItem.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "3413"
},
{
"name": "HTML",
"bytes": "38738"
},
{
"name": "IDL",
"bytes": "14970"
},
{
"name": "Java",
"bytes": "10715977"
},
{
"name": "JavaScript",
"bytes": "1347452"
},
{
"name": "Pascal",
"bytes": "5482"
},
{
"name": "Pure Data",
"bytes": "125"
},
{
"name": "Shell",
"bytes": "2193"
}
],
"symlink_target": ""
} |
#ifndef P_EXTRACT_CLIPS_H
#define P_EXTRACT_CLIPS_H
#include <QVariantMap>
bool p_extract_clips(QStringList timeseries_list, QString event_times, const QList<int>& channels, QString clips_out, const QVariantMap& params);
bool p_mv_extract_clips(QStringList timeseries_list, QString firings, const QList<int>& channels, QString clips_out, const QVariantMap& params);
bool p_mv_extract_clips_features(QString timeseries, QString firings, QString features_out, int clip_size, int num_features, int subtract_mean);
#endif // P_EXTRACT_CLIPS_H
| {
"content_hash": "fcdb7824b62aebc0350569814ca33807",
"timestamp": "",
"source": "github",
"line_count": 14,
"max_line_length": 145,
"avg_line_length": 39,
"alnum_prop": 0.7802197802197802,
"repo_name": "magland/mountainsort",
"id": "d290aee9c6106cc36659bf232d3314599d4b78df",
"size": "1171",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "packages/ms3/p_extract_clips.h",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "48061"
},
{
"name": "C++",
"bytes": "399822"
},
{
"name": "HTML",
"bytes": "35229"
},
{
"name": "M",
"bytes": "202"
},
{
"name": "Makefile",
"bytes": "22010"
},
{
"name": "Matlab",
"bytes": "73323"
},
{
"name": "Python",
"bytes": "91814"
},
{
"name": "QMake",
"bytes": "2029"
},
{
"name": "Shell",
"bytes": "2808"
}
],
"symlink_target": ""
} |
<?php
/**
* Snippet Russian lexicon topic
*
* @language ru
* @package modx
* @subpackage lexicon
*/
$_lang['snippet'] = 'Сниппет';
$_lang['snippets_available'] = 'Сниппеты доступные вам для включения в вашу страницу';
$_lang['snippet_code'] = 'Код сниппета (php)';
$_lang['snippet_delete_confirm'] = 'Вы уверены, что хотите удалить этот сниппет?';
$_lang['snippet_desc'] = 'Описание';
$_lang['snippet_desc_category'] = 'Категория к которой принадлежит этот сниппет.';
$_lang['snippet_desc_description'] = 'Краткое описание сниппета.';
$_lang['snippet_desc_name'] = 'Название сниппета. Сниппет будет доступен через тег [[ИмяСниппета]].';
$_lang['snippet_duplicate_confirm'] = 'Вы уверены, что хотите сделать копию этого сниппета?';
$_lang['snippet_duplicate_error'] = 'Произошла ошибка в процессе копирования сниппета.';
$_lang['snippet_err_create'] = 'Произошла ошибка в процессе создания сниппета.';
$_lang['snippet_err_delete'] = 'Произошла ошибка при попытке удалить сниппет.';
$_lang['snippet_err_duplicate'] = 'Произошла ошибка при попытке копировать сниппет.';
$_lang['snippet_err_exists_name'] = 'Сниппет с именем «[[+name]]» уже существует.';
$_lang['snippet_err_invalid_name'] = 'Такое имя сниппета недопустимо.';
$_lang['snippet_err_locked'] = 'Этот сниппет заблокирован для редактирования.';
$_lang['snippet_err_nf'] = 'Сниппет не найден!';
$_lang['snippet_err_ns'] = 'Сниппет не указан.';
$_lang['snippet_err_ns_name'] = 'Пожалуйста введие имя сниппета.';
$_lang['snippet_err_remove'] = 'Произошла ошибка при удалении сниппета.';
$_lang['snippet_err_save'] = 'Произошла ошибка в процессе сохранения сниппета.';
$_lang['snippet_execonsave'] = 'Запустить сниппет после сохранения.';
$_lang['snippet_lock'] = 'Заблокировать сниппет для редактирования';
$_lang['snippet_lock_msg'] = 'Пользователи должны иметь атрибут edit_locked для того что бы редактировать этот сниппет.';
$_lang['snippet_management_msg'] = 'Здесь вы можете выбрать какой сниппет вы желаете редактировать.';
$_lang['snippet_msg'] = 'Здесь вы можете создать/редактировать сниппеты. Помните, сниппеты — это «сырой» PHP код, и если вы собираетесь делать вывод из сниппета, который будет в определенном месте шаблона, вам необходимо вернуть значение из сниппета.';
$_lang['snippet_name'] = 'Имя сниппета';
$_lang['snippet_new'] = 'Новый сниппет';
$_lang['snippet_properties'] = 'Свойства по умолчанию';
$_lang['snippet_title'] = 'Создать/редактировать сниппет';
$_lang['snippet_untitled'] = 'Безымянный сниппет';
$_lang['snippets'] = 'Сниппеты'; | {
"content_hash": "11454466d4dfe181be092e759591f581",
"timestamp": "",
"source": "github",
"line_count": 40,
"max_line_length": 252,
"avg_line_length": 63.125,
"alnum_prop": 0.7227722772277227,
"repo_name": "timsvoice/great_green_sources",
"id": "c9a16ea5a00a13980070c3940793c58824715d09",
"size": "3652",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "core/lexicon/ru/snippet.inc.php",
"mode": "33261",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "718852"
},
{
"name": "Java",
"bytes": "11903"
},
{
"name": "JavaScript",
"bytes": "1641637"
},
{
"name": "PHP",
"bytes": "13315560"
},
{
"name": "Perl",
"bytes": "25276"
}
],
"symlink_target": ""
} |
function tabularViewQuery(job, onDone) {
var queryNode = job.queryNode;
queryNode["limit"] = 500;
var addPath = function(path, valuesAreNative) {
if (path.length > 0) {
var queryNode2 = extendQueryNodeWithPath(queryNode, path);
if (valuesAreNative) {
queryNode2["value"] = null;
} else {
if (!("name" in queryNode2)) {
queryNode2["name"] = null;
}
if (!("id" in queryNode2)) {
queryNode2["id"] = null;
}
}
}
};
if (job.hasRowColor) {
addPath(job.rowColorPath, job.rowColorValuesAreNative);
var rowColorNodeIterator = createForwardPathIterator(job.rowColorPath);
}
for (var i = 0; i < job.columnConfigs.length; i++) {
var columnConfig = job.columnConfigs[i];
if ("path" in columnConfig) {
addPath(columnConfig.path, columnConfig.valuesAreNative);
columnConfig.nodeIterator = createForwardPathIterator(columnConfig.path);
}
}
var gotRestrictedItems = function(o) {
var rows = [];
var rowColorKeys = job.rowColorKeys;
job.hasRowColorKeys = false;
var processRow = function(itemNode) {
var row = {
cells: []
};
if (job.hasRowColor) {
var colorNode = null;
rowColorNodeIterator(itemNode,
function(node) {
colorNode = node;
}
);
if (colorNode != null) {
var key = "name" in colorNode ? colorNode.name : colorNode.value;
var color = job.colorCoder.getColorForKey(key);
rowColorKeys[key] = true;
job.hasRowColorKeys = true;
row.color = color;
}
}
for (var c = 0; c < job.columnConfigs.length; c++) {
var columnConfig = job.columnConfigs[c];
var cell = { values: [] };
if ("nodeIterator" in columnConfig) {
var valueNodeVisitor = function(valueNode) {
if ("name" in valueNode) {
cell.values.push({ name: valueNode.name, id: valueNode.id });
} else {
cell.values.push({ value: valueNode.value });
}
};
columnConfig.nodeIterator(itemNode, valueNodeVisitor);
}
row.cells.push(cell);
}
rows.push(row);
};
for (var i = 0; i < o.result.length; i++) {
var itemNode = o.result[i];
processRow(itemNode);
}
onDone(rows);
};
JsonpQueue.queryOne([queryNode], gotRestrictedItems, genericErrorHandler);
};
function tabularViewSort(rows, columnIndex, sortAscending, valueType) {
var stringComparator = function(a, b) {
return a.sortKey.localeCompare(b.sortKey);
};
var numericComparator = function(a, b) {
return a.sortKey - b.sortKey;
};
var sortKeyGenerator;
var sortKeyDefault;
var sortKeyComparator;
if (valueType in SchemaUtil.nativeTypes) {
switch (valueType) {
case '/type/int':
case '/type/float':
sortKeyGenerator = function(valueEntry) {
if (valueEntry != null) {
try {
var n = parseFloat(valueEntry.value);
if (!isNaN(n)) {
return n;
}
} catch (e) {}
}
return null;
};
sortKeyDefault = Number.NEGATIVE_INFINITY;
sortKeyComparator = numericComparator;
break;
case '/type/boolean':
sortKeyGenerator = function(valueEntry) {
if (valueEntry != null) {
if ("value" in valueEntry) {
if (typeof valueEntry.value == "boolean") {
return valueEntry.value ? 1 : 0;
} else {
var s = valueEntry.value.toString().toLowerCase();
if (s == "true") {
return 1;
} else if (s == "false") {
return 0;
}
}
}
}
return null;
};
sortKeyDefault = -1;
sortKeyComparator = numericComparator;
break;
default:
sortKeyGenerator = function(valueEntry) {
if (valueEntry != null) {
if ("value" in valueEntry) {
var s = valueEntry.value.toString().toLowerCase();
return s;
}
}
return null;
};
sortKeyDefault = "";
sortKeyComparator = stringComparator;
}
} else {
sortKeyGenerator = function(valueEntry) {
if (valueEntry != null) {
if ("name" in valueEntry) {
var s = valueEntry.name.toLowerCase();
return s;
}
}
return null;
};
sortKeyDefault = "";
sortKeyComparator = stringComparator;
}
for (var i = 0; i < rows.length; i++) {
var row = rows[i];
var cell = row.cells[columnIndex];
var values = cell.values;
var sortKey = null;
for (var v = 0; sortKey == null && v < values.length; v++) {
sortKey = sortKeyGenerator(values[v]);
}
row.sortKey = (sortKey == null) ? sortKeyDefault : sortKey;
}
var comparator = sortAscending ? sortKeyComparator : function(a, b) { return sortKeyComparator(b, a); };
rows.sort(comparator);
};
function tabularViewRender(div, job, rows, settings) {
div.innerHTML = "";
if (rows.length == 0) {
return;
}
var table = document.createElement("table");
table.className = "tabular-view-table";
//table.setAttribute("border", "1");
table.setAttribute("cellspacing", "0");
table.setAttribute("width", "100%");
div.appendChild(table);
var columnCount = job.columnConfigs.length + (settings.editable ? 1 : 0);
/*
* Create table header and edit rows
*/
var trHead = table.insertRow(0);
var trEdit = table.insertRow(1);
var tdEdit = trEdit.insertCell(0);
tdEdit.setAttribute("colspan", columnCount);
tdEdit.className = "tabular-view-header-editing-container";
trEdit.style.display = "none";
var revertEditingUI = function() {
var cells = trHead.cells;
for (var i = 0; i < cells.length; i++) {
cells[i].className = "tabular-view-header-cell";
}
trEdit.style.display = "none";
};
var createColumnHeader = function(columnConfig, c) {
var td = trHead.insertCell(c);
td.className = "tabular-view-header-cell";
if (c > 0 && settings.editable) {
var img = SimileAjax.Graphics.createTranslucentImage(baseUrl + "images/close-button.png", "middle");
img.className = "tabular-view-header-remove-button";
img.onclick = function() { settings.onRemoveColumn(img, c); }
td.appendChild(img);
var aEditColumn = document.createElement("a");
aEditColumn.className = "action tabular-view-header-edit-button";
aEditColumn.href = "javascript:{}";
aEditColumn.innerHTML = "edit";
aEditColumn.onclick = function() {
revertEditingUI();
trEdit.style.display = "";
td.className = "tabular-view-header-cell tabular-view-header-editing";
settings.onEditColumn(aEditColumn, c, tdEdit, revertEditingUI);
};
td.appendChild(aEditColumn);
}
var spanLabel = document.createElement("span");
spanLabel.className = "tabular-view-header-label";
spanLabel.appendChild(document.createTextNode("label" in columnConfig ? columnConfig.label : "?"));
if (c == job.sortColumnIndex) {
var imgSort = SimileAjax.Graphics.createTranslucentImage(
baseUrl + (job.sortColumnAscending ? "images/up-arrow.png" : "images/down-arrow.png"), "middle");
spanLabel.appendChild(imgSort);
}
spanLabel.onclick = function() {
settings.onSortColumn(c);
};
td.appendChild(spanLabel);
};
for (var c = 0; c < job.columnConfigs.length; c++) {
var columnConfig = job.columnConfigs[c];
createColumnHeader(columnConfig, c);
}
if (settings.editable) {
var tdAdd = trHead.insertCell(job.columnConfigs.length);
tdAdd.className = "tabular-view-header-cell";
tdAdd.setAttribute("width", "1%");
var aAddColumn = document.createElement("a");
aAddColumn.className = "action";
aAddColumn.href = "javascript:{}";
aAddColumn.innerHTML = "add";
aAddColumn.onclick = function() {
revertEditingUI();
trEdit.style.display = "";
tdAdd.className = "tabular-view-header-cell tabular-view-header-editing";
settings.onAddColumn(aAddColumn, tdEdit, revertEditingUI);
};
tdAdd.appendChild(aAddColumn);
}
/*
* Create table data rows
*/
var createTopicValue = function(valueEntry) {
var a = document.createElement("a");
a.href = ParallaxConfig.corpusBaseUrl + "view" + valueEntry.id;
a.appendChild(document.createTextNode(valueEntry.name));
$(a).click(function(evt) {
Logging.log("tabular-view-to-topic", { "id" : valueEntry.id });
settings.onFocus(valueEntry.id, valueEntry.name);
evt.preventDefault();
});
return a;
};
var createValue = function(valueEntry) {
if ("name" in valueEntry) {
return createTopicValue(valueEntry);
} else {
return document.createTextNode(valueEntry.value);
}
};
for (var r = 0; r < rows.length; r++) {
var row = rows[r];
var tr = table.insertRow(r + 2);
if ("color" in row) {
tr.style.backgroundColor = row.color;
}
var cells = row.cells;
for (var c = 0; c < cells.length; c++) {
var cell = cells[c];
var td = tr.insertCell(c);
td.className = "tabular-view-data-cell";
var values = cell.values;
if (values.length == 0) {
td.innerHTML = " ";
} else if (values.length == 1) {
td.appendChild(createValue(values[0]));
} else {
var ol = document.createElement("ol");
td.appendChild(ol);
for (var v = 0; v < values.length; v++) {
var value = values[v];
var li = document.createElement("li");
ol.appendChild(li);
li.appendChild(createValue(value));
}
}
}
}
};
| {
"content_hash": "73363878814e0a0345f8beb88fd9aa83",
"timestamp": "",
"source": "github",
"line_count": 337,
"max_line_length": 113,
"avg_line_length": 35.28486646884273,
"alnum_prop": 0.49264149356656295,
"repo_name": "hostilefork/hack2unify",
"id": "07381b2e0930274cc37565857f1549bde90d4b35",
"size": "11891",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/scripts/views/tabular-view/tabular-view-worker.js",
"mode": "33188",
"license": "bsd-2-clause",
"language": [
{
"name": "JavaScript",
"bytes": "369357"
}
],
"symlink_target": ""
} |
package org.unitime.timetable.server.admin;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.core.LoggerContext;
import org.apache.logging.log4j.core.config.LoggerConfig;
import org.hibernate.Session;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Service;
import org.unitime.localization.impl.Localization;
import org.unitime.timetable.ApplicationProperties;
import org.unitime.timetable.gwt.resources.GwtMessages;
import org.unitime.timetable.gwt.shared.SimpleEditInterface;
import org.unitime.timetable.gwt.shared.SimpleEditInterface.Field;
import org.unitime.timetable.gwt.shared.SimpleEditInterface.FieldType;
import org.unitime.timetable.gwt.shared.SimpleEditInterface.Flag;
import org.unitime.timetable.gwt.shared.SimpleEditInterface.ListItem;
import org.unitime.timetable.gwt.shared.SimpleEditInterface.PageName;
import org.unitime.timetable.gwt.shared.SimpleEditInterface.Record;
import org.unitime.timetable.model.ApplicationConfig;
import org.unitime.timetable.security.SessionContext;
import org.unitime.timetable.security.rights.Right;
import org.unitime.timetable.solver.service.SolverServerService;
/**
* @author Tomas Muller
*/
@Service("gwtAdminTable[type=logging]")
public class Loggers implements AdminTable {
protected static final GwtMessages MESSAGES = Localization.create(GwtMessages.class);
@Autowired SolverServerService solverServerService;
@Override
public PageName name() {
return new PageName(MESSAGES.pageLoggingLevel(), MESSAGES.pageLoggingLevels());
}
@Override
@PreAuthorize("checkPermission('ApplicationConfig')")
public SimpleEditInterface load(SessionContext context, Session hibSession) {
List<ListItem> levels = new ArrayList<ListItem>();
levels.add(new ListItem(Level.ALL.name(), MESSAGES.levelAll()));
levels.add(new ListItem(Level.TRACE.name(), MESSAGES.levelTrace()));
levels.add(new ListItem(Level.DEBUG.name(), MESSAGES.levelDebug()));
levels.add(new ListItem(Level.INFO.name(), MESSAGES.levelInfo()));
levels.add(new ListItem(Level.WARN.name(), MESSAGES.levelWarning()));
levels.add(new ListItem(Level.ERROR.name(), MESSAGES.levelError()));
levels.add(new ListItem(Level.FATAL.name(), MESSAGES.levelFatal()));
levels.add(new ListItem(Level.OFF.name(), MESSAGES.levelOff()));
SimpleEditInterface data = new SimpleEditInterface(
new Field(MESSAGES.fieldLogger(), FieldType.text, 400, 1024, Flag.UNIQUE),
new Field(MESSAGES.fieldLevel(), FieldType.list, 100, levels, Flag.NOT_EMPTY));
data.setSortBy(0, 1);
long id = 0;
SimpleEditInterface.Record root = data.addRecord(id++, false);
root.setField(0, " root", false);
root.setField(1, LogManager.getRootLogger().getLevel().name());
LoggerContext cx = LoggerContext.getContext(false);
for (Map.Entry<String, LoggerConfig> e: cx.getConfiguration().getLoggers().entrySet()) {
String name = e.getKey();
Level level = e.getValue().getLevel();
if (level == null || name.isEmpty()) continue;
ApplicationConfig config = ApplicationConfig.getConfig("log4j.logger." + name);
SimpleEditInterface.Record record = data.addRecord(id++, ApplicationProperties.getDefaultProperties().getProperty("log4j.logger." + name) == null && config != null);
record.setField(0, name, false);
record.setField(1, level.name());
}
data.setEditable(context.hasPermission(Right.ApplicationConfig));
return data;
}
@Override
@PreAuthorize("checkPermission('ApplicationConfig')")
public void save(SimpleEditInterface data, SessionContext context, Session hibSession) {
Map<String, SimpleEditInterface.Record> records = new HashMap<String, SimpleEditInterface.Record>();
for (Record r: data.getRecords()) {
if (r.isEmpty()) continue;
boolean root = r.getUniqueId() != null && r.getUniqueId() == 0;
if (root) {
update(r, context, hibSession);
} else {
records.put(r.getField(0), r);
}
}
LoggerContext cx = LoggerContext.getContext(false);
for (Map.Entry<String, LoggerConfig> e: cx.getConfiguration().getLoggers().entrySet()) {
String name = e.getKey();
Level level = e.getValue().getLevel();
if (level == null || name.isEmpty()) continue;
Record r = records.get(name);
if (r == null)
delete(name, context, hibSession);
else
update(r, context, hibSession);
}
for (Record r: data.getNewRecords())
save(r, context, hibSession);
}
@Override
@PreAuthorize("checkPermission('ApplicationConfig')")
public void save(Record record, SessionContext context, Session hibSession) {
update(record, context, hibSession);
record.setUniqueId(System.currentTimeMillis());
}
@Override
@PreAuthorize("checkPermission('ApplicationConfig')")
public void update(Record record, SessionContext context, Session hibSession) {
boolean root = record.getUniqueId() != null && record.getUniqueId() == 0;
Level level = Level.getLevel(record.getField(1));
solverServerService.setLoggingLevel(root ? null : record.getField(0), level == null ? null : level.name());
record.setUniqueId(root ? 0 : System.currentTimeMillis());
String defaultValue = ApplicationProperties.getDefaultProperties().getProperty(root ? "log4j.rootLogger" : "log4j.logger." + record.getField(0));
if (defaultValue != null && defaultValue.indexOf(',') > 0)
defaultValue = defaultValue.substring(0, defaultValue.indexOf(',')).trim();
ApplicationConfig config = ApplicationConfig.getConfig(root ? "log4j.logger.root" : "log4j.logger." + record.getField(0));
if (level.toString().equalsIgnoreCase(defaultValue)) {
if (config != null)
hibSession.delete(config);
} else {
if (config == null) {
config = new ApplicationConfig();
config.setKey(root ? "log4j.logger.root" : "log4j.logger." + record.getField(0));
config.setDescription(MESSAGES.descriptionLoggingLevelFor(record.getField(0)));
}
config.setValue(level.toString());
hibSession.saveOrUpdate(config);
}
}
@Override
@PreAuthorize("checkPermission('ApplicationConfig')")
public void delete(Record record, SessionContext context, Session hibSession) {
boolean root = record.getUniqueId() != null && record.getUniqueId() == 0;
solverServerService.setLoggingLevel(root ? null : record.getField(0), null);
ApplicationConfig config = ApplicationConfig.getConfig(root ? "log4j.logger.root" : "log4j.logger." + record.getField(0));
if (config != null)
hibSession.delete(config);
}
protected void delete(String name, SessionContext context, Session hibSession) {
boolean root = " root".equals(name);
solverServerService.setLoggingLevel(root ? null : name, null);
ApplicationConfig config = ApplicationConfig.getConfig(root ? "log4j.logger.root" : "log4j.logger." + name);
if (config != null)
hibSession.delete(config);
}
}
| {
"content_hash": "f1b575741a7db669b3829512c663e167",
"timestamp": "",
"source": "github",
"line_count": 166,
"max_line_length": 168,
"avg_line_length": 42.33734939759036,
"alnum_prop": 0.7470119521912351,
"repo_name": "UniTime/unitime",
"id": "d1cda5e8ff0846ed73b75099732565f3e32a27ee",
"size": "7832",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "JavaSource/org/unitime/timetable/server/admin/Loggers.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "199417"
},
{
"name": "FreeMarker",
"bytes": "48795"
},
{
"name": "HTML",
"bytes": "48"
},
{
"name": "Java",
"bytes": "27876192"
},
{
"name": "JavaScript",
"bytes": "446284"
}
],
"symlink_target": ""
} |
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<include layout="@layout/home_item_title"/>
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerItem"
android:layout_width="match_parent"
android:layout_height="match_parent">
</android.support.v7.widget.RecyclerView>
</LinearLayout> | {
"content_hash": "ed1f1ae7c885edf684352c826edd862b",
"timestamp": "",
"source": "github",
"line_count": 14,
"max_line_length": 72,
"avg_line_length": 38.785714285714285,
"alnum_prop": 0.6648250460405156,
"repo_name": "zzhbug/BlackMovie",
"id": "b10cf89dba5d01605b15443adb678ae690ba58c1",
"size": "543",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "app/src/main/res/layout/home_movie_item.xml",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "221061"
}
],
"symlink_target": ""
} |
package org.cleanas2.cmd.system;
import org.cleanas2.cmd.CommandBase;
import org.cleanas2.cmd.CommandResult;
import org.cleanas2.common.annotation.Command;
/**
* @author Andrew Backer {@literal awbacker@gmail.com / andrew.backer@powere2e.com}
*/
@Command(name = "exit", description = "Exits the AS2 Server")
public class ExitCommand extends CommandBase {
@Override
public CommandResult run(String... params) {
CommandResult cr = new CommandResult();
cr.terminateService = true;
return cr;
}
}
| {
"content_hash": "df005c2dbfcc7cda56879d84314a5b37",
"timestamp": "",
"source": "github",
"line_count": 18,
"max_line_length": 83,
"avg_line_length": 29.61111111111111,
"alnum_prop": 0.7148217636022514,
"repo_name": "awbacker/clean-as2",
"id": "fa44801f51cdb558fd488a585d75807a0d203343",
"size": "533",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "server/src/main/java/org/cleanas2/cmd/system/ExitCommand.java",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "Java",
"bytes": "483959"
},
{
"name": "Shell",
"bytes": "5621"
}
],
"symlink_target": ""
} |
============
Installing
============
Requirements
============
* Python 3.6+
* libmemcached 1.0.8 or later (latest tested is 1.0.18)
* zlib (required for compression support)
* libsasl2 (required for authentication support)
Building
========
Like any Python package, use ``setup.py``::
$ python setup.py install --with-libmemcached=/opt/local
You only need to specify ``--with-libmemcached`` if libmemcached is not
available on your C compiler's include and library path. This is the case if
you use MacPorts or something like that.
So for example, if one were to use MacPorts to install libmemcached, your
libmemcached would end up in ``/opt/local``, hence
``--with-libmemcached=/opt/local``.
Using ``pip`` you achieve the same thing as follows::
pip install pylibmc --install-option="--with-libmemcached=/opt/local"
Note that `/usr/local` is typically on the library search path. If it is not,
you'd probably want to fix that instead.
Homebrew and MacOS
------------------
brew install libmemcached
pip install pylibmc
| {
"content_hash": "e479153835667022edbce7032412a15b",
"timestamp": "",
"source": "github",
"line_count": 39,
"max_line_length": 77,
"avg_line_length": 26.923076923076923,
"alnum_prop": 0.6980952380952381,
"repo_name": "lericson/pylibmc",
"id": "cfa427420b07179910306f621ccf92aeb28e2da2",
"size": "1050",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "docs/install.rst",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "C",
"bytes": "104093"
},
{
"name": "Python",
"bytes": "56297"
},
{
"name": "Shell",
"bytes": "494"
}
],
"symlink_target": ""
} |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Graphics</title>
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Sans:400,700,400italic,700italic">
<link rel="stylesheet" href="../../build/cssgrids/cssgrids-min.css">
<link rel="stylesheet" href="../assets/css/main.css">
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
<link rel="shortcut icon" type="image/png" href="../assets/favicon.png">
<script src="../../build/yui/yui-min.js"></script>
</head>
<body>
<!--
<a href="https://github.com/yui/yui3"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a>
-->
<div id="doc">
<div id="hd">
<h1><img src="http://yuilibrary.com/img/yui-logo.png"></h1>
</div>
<a href="#toc" class="jump">Jump to Table of Contents</a>
<h1>Graphics</h1>
<div class="yui3-g">
<div class="yui3-u-3-4">
<div id="main">
<div class="content"><div class="intro" style="min-height: 184px;">
<p>
<img src="../assets/graphics/img/ship.png" alt="Screencapture of ship drawn with Graphics" style="border: 1px solid #bfbfbf; float:right; height:150px; margin: 0 0 8px 8px; width:275px;">
The Graphics module provides a JavaScript API for creating shapes in a variety of formats across a <a href="http://developer.yahoo.com/yui/articles/gbs">browser test baseline</a>. Based on device and browser capabilities, Graphics leverages SVG, HTML Canvas and VML to render its graphical elements.
</p>
<p>
The Graphics module features a <code>Graphic</code> class that allows you to easily create and manage shapes. Currently, a <code>Graphic</code> instance can be used to create predifined shapes and free-form polygons with fill and stroke properties.
</p>
</div>
<h2 id="getting-started">Getting Started</h2>
<p>
To include the source files for Graphics and its dependencies, first load
the YUI seed file if you haven't already loaded it.
</p>
<pre class="code prettyprint"><script src="http://yui.yahooapis.com/3.17.2/build/yui/yui-min.js"></script></pre>
<p>
Next, create a new YUI instance for your application and populate it with the
modules you need by specifying them as arguments to the <code>YUI().use()</code> method.
YUI will automatically load any dependencies required by the modules you
specify.
</p>
<pre class="code prettyprint"><script>
// Create a new YUI instance and populate it with the required modules.
YUI().use('graphics', function (Y) {
// Graphics is available and ready for use. Add implementation
// code here.
});
</script></pre>
<p>
For more information on creating YUI instances and on the
<a href="http://yuilibrary.com/yui/docs/api/classes/YUI.html#method_use"><code>use()</code> method</a>, see the
documentation for the <a href="../yui/index.html">YUI Global Object</a>.
</p>
<h2 id="using">Using the Graphics module</h2>
<p>The <code>Graphic</code> class acts a factory and container for shapes. You need at least one <code>Graphic</code> instance to create shapes for your application.</p>
<h3 id="instantiating">Instantiating A Graphic instance</h3>
<p>All you need to instantiate a Graphic instance is an HTML element in which to render. Alternatively, you can attach your instance to the body of your page.</p>
<h4 id="css">CSS</h4>
<pre class="code prettyprint">#mygraphiccontainer {
width: 600px;
height: 400px;
}</pre>
<h4 id="html">HTML</h4>
<pre class="code prettyprint"><div id="mygraphiccontainer"></div></pre>
<h4 id="javascript">JavaScript</h4>
<pre class="code prettyprint">// Instantiate a graphic instance
var mygraphic = new Y.Graphic({
render: "#mygraphiccontainer"
});</pre>
<p>By default, <code>Graphic</code> will size to its parent container. The API also provides the option of explicitly setting its <code>width</code> and <code>height</code> attributes. Additionally, the Graphic class provides an <code>autoSize</code> attribute. When set to true, the Graphic instance will expand to fit its contents.
<h3 id="creating-shapes">Creating shapes</h3>
<p>Shapes are created using the <code>addShape</code> method. The <code>addShape</code> method takes a config parameter that defines the shape and its properties. When creating a shape, the shape is determined by the <code>type</code>
attribute. The <code>Graphics</code> module includes four pre-defined shapes. They can be created by passing a <code>String</code> reference.</p>
<table>
<tr>
<th>key</th>
<th>shape</th>
</tr>
<tr>
<td>circle</td>
<td>Y.Circle</td>
</tr>
<tr>
<td>ellipse</td>
<td>Y.Ellipse</td>
</tr>
<tr>.
<td>rect</td>
<td>Y.Rect</td>
</tr>
<tr>
<td>path</td>
<td>Y.Path</td>
</tr>
</table>
<p>Alternatively, you can create your own custom class and pass it directly through the <code>type</code> attribute.</p>
<p>The below code would create a 300x200 rectangle with a blue fill and a red border.</p>
<pre class="code prettyprint">var mygraphic = new Y.Graphic({render:"#mygraphiccontainer"}),
myrect = mygraphic.addShape({
type: "rect",
width: 300,
height: 200,
fill: {
color: "#0000ff"
},
stroke: {
weight: 2,
color: "#ff0000"
},
x: 50,
y: 100
});</pre>
<p>This code would create an instance of a custom shape that you have created.</p>
<pre class="code prettyprint">var mygraphic = new Y.Graphic({render:"#mygraphiccontainer"}),
myrect = mygraphic.addShape({
type: Y.MyCustomShape,
width: 300,
height: 200,
fill: {
color: "#0000ff"
},
stroke: {
weight: 2,
color: "#ff0000"
},
x: 50,
y: 100
});</pre>
<h3 id="path-drawing-tool">Path Drawing Tool</h3>
<!-- doesn't contain the header because it may be h3 or h2 -->
<p>
<div style="float:right; margin: 6px 0 8px 8px;">
<a href="graphics-path-tool.html">
<img style="border: 1px solid #bfbfbf; height:149px; width:395px;" alt="Screen capture of Graphics path tool" src="../assets/graphics/img/path-tool-capture.png">
</a>
<div>
<a href="graphics-path-tool.html" class="button">Read More</a>
</div>
</div>
Try this simple <a href="graphics-path-tool.html">tool</a> that helps you by generating code while you interactively
draw graphic paths.
</p>
<p>
As you drag the pencil icon, corresponding graphics code is auto-generated.
This code can be copied and pasted into a graphics instance to reproduce
the paths you created with the pencil.
</p>
<p>
The <a href="graphics-violin.html">violin example</a> was created with this tool.
</p>
<h3 id="aboutgraphic">Working with the Graphic Class</h3>
<p>The <code>Graphics</code> module uses different technologies based on browser capabilities. The <code>Graphics</code> module normalizes these different technologies with a consistent API. Ideally, you should not
have to interact directly with the underlying technologies or their corresponding HTML elements. Both the <code>Graphic</code> and <code>Shape</code> classes provide APIs for sizing, positioning and customization.</p>
<h4 id="graphicattributes">Graphic Attributes</h4>
<p>The <code>Graphic</code> class exposes the following attributes.</p>
<table>
<tr>
<th>Attribute</th>
<th>Type</th>
<th>Description</th>
</tr>
<tr>
<td><code>id</code></td>
<td><code>String</code></td>
<td>Unique identifier for the <code>Graphic</code> instance. If not explicity set, one will be generated.</td></tr>
<tr>
<td><code>shapes</code></td>
<td><code>Object</code></td>
<td>Key value pairs containing all shape instances contained in the <code>Graphic</code> instance.</td>
</tr>
<tr>
<td><code>contentBounds</code></td>
<td><code>Object</code></td>
<td>Object containing size and coordinate data for the content of a Graphic in relation to the coordinate space of the <code>Graphic</code> instance. The following values are included: <code>top</code>, <code>right</code>, <code>bottom</code>, <code>left</code>, <code>width</code> and <code>height</code>.</td>
</tr>
<tr>
<td><code>node</code></td>
<td><code>HTMLElement</code></td>
<td>Outermost HTMLElement of the <code>Graphic</code> instance. (read-only)</td>
</tr>
<tr>
<td><code>width</code></td>
<td><code>Number</code></td>
<td>The width of the <code>Graphic</code> instance.</td>
</tr>
<tr>
<td><code>height</code></td>
<td><code>Number</code></td>
<td>The height of the <code>Graphic</code> instance.</td>
</tr>
<tr>
<td><code>autoSize</code></td>
<td><code>boolean</code></td>
<td>Determines the sizing of the graphic. See the <a href="http://yuilibrary.com/yui/docs/api/classes/Graphic.html#attr_autoSize">API Docs</a> for possible values and associated behaviors.</td>
</tr>
<tr>
<td><code>preserveAspectRatio</code></td>
<td><code>String</code></td>
<td> Determines how content is sized when <code>autoSize</code> is set to <code>sizeContentToGraphic</code>. See the <a href="http://yuilibrary.com/yui/docs/api/classes/Graphic.html#attr_preserveAspectRatio">API Docs</a> for possible values.</td>
</tr>
<tr>
<td><code>resizeDown</code></td>
<td><code>boolean</code></td>
<td>The <code>contentBounds</code> will resize to greater values but not to smaller values. (for performance) When resizing the <code>contentBounds</code> down is desirable, set the resizeDown value to true. The default value is false.</td>
</tr>
<tr>
<td><code>x</code></td>
<td><code>Number</code></td>
<td>Indicates the x-coordinate for the instance.</td>
</tr>
<tr>
<td><code>y</code></td>
<td><code>Number</code></td>
<td>Indicates the y-coordinate for the instance.</td>
</tr>
<tr>
<td><code>autoDraw</code></td>
<td><code>boolean</code></td>
<td>Indicates whether or not the instance will automatically redraw after a change is made to a shape. When performing multiple operations, such adding many shapes, <code>autoDraw</code> can be set to false. Calling <code>_redraw</code> will force a redraw when <code>autoDraw</code> is <code>false</code>.</td>
</tr>
<tr>
<td><code>visible</code></td>
<td><code>boolean</code></td>
<td>Toggles visibility for a <code>Graphic</code> instance.</td>
</tr>
</table>
<h4 id="graphicmethods">Graphic Methods</h4>
<p>The <code>Graphic</code> class also has the following public methods.</p>
<table>
<tr>
<th><code>Method</code></th>
<th>Description</th>
</tr>
<tr>
<td>getXY</td>
<td>Returns an array containing the current position of the graphic instance in page coordinates.</td>
</tr>
<tr>
<td>addShape</td>
<td>Generates and returns a shape instance by type.</td>
</tr>
<tr>
<td>removeShape</td>
<td>Removes a shape instance from from the graphic instance.</td>
</tr>
<tr>
<td>removeAllShapes</td>
<td>Removes all shape instances</td>
</tr>
<tr>
<td>destroy</td>
<td>Destroys the graphic instance and all its children.</td>
</tr>
<tr>
<td>getShapeById</td>
<td>Returns a shape instance based on an id.</td>
</tr>
<tr>
<td>batch</td>
<td>Allows for creating multiple shapes in order to batch appending and redraw operations.</td>
</tr>
</table>
<h3 id="aboutshapes">Working with Shapes</h3>
<h4 id="shapeattributes">Shape Attributes</h4>
<p>Each shape shares a common set of attributes. Attributes shared across all shapes are listed below:</p>
<table>
<tr>
<th>Attribute</th>
<th>Type</th>
<th>Description</th>
</tr>
<tr>
<td><code>id</code></td>
<td><code>String</code></td>
<td>Unique identifier for the <code>Shape</code> instance. If not explicity set, one will be generated.</td></tr>
</tr>
<tr>
<td><code>node</code></td>
<td><code>HTMLElement</code></td>
<td>HTMLElement of the <code>Shape</code> instance. (read-only)</td>
</tr>
<tr>
<td><code>data</code></td>
<td><code>String</code></td>
<td>Represents an SVG Path string. This will be parsed and added to shape's API to represent the SVG data across all implementations. Note that when using VML or SVG implementations, part of this content will be added to the DOM using respective VML/SVG attributes. If your content comes from an untrusted source, you will need to ensure that no malicious code is included in that content.
</tr>
<tr>
<td><code>x</code></td>
<td><code>Number</code></td>
<td>The x-coordinate of the shape.</td>
</tr>
<tr>
<td><code>y</code></td>
<td><code>Number</code></td>
<td>The y-coordinate of the shape.</td>
</tr>
<tr>
<td><code>width</code></td>
<td><code>Number</code></td>
<td>The width of the <code>Shape</code> instance.</td>
</tr>
<tr>
<td><code>height</code></td>
<td><code>Number</code></td>
<td>The height of the <code>Shape</code> instance.</td>
</tr>
<tr>
<td><code>visible</code></td>
<td><code>boolean</code></td>
<td>Toggles visibility for a <code>Shape</code> instance.</td>
</tr>
<tr>
<td><code>fill</code></td>
<td><code>Object</code></td>
<td>
Contains information about the fill of the shape.
</td>
</tr>
<tr>
<td>stroke</td>
<td><code>Object</code></td>
<td>
Contains information about the stroke of the shape.
</td>
</tr>
<tr>
<td><code>transformOrigin</code></td>
<td><code>Array</code></td>
<td>The x and y values for the transformOrigin of a transform.</td>
</tr>
<tr>
<td><code>transform</code></td>
<td><code>String</code></td>
<td>A string containing, in order, transform operations applied to the shape instance. The <code>transform</code> string can contain the following values:
<dl>
<dt>rotate</dt><dd>Rotates the shape clockwise around it transformOrigin.</dd>
<dt>translate</dt><dd>Specifies a 2d translation.</dd>
<dt>skew</dt><dd>Skews the shape around the x-axis and y-axis.</dd>
<dt>scale</dt><dd>Specifies a 2d scaling operation.</dd>
<dt>translateX</dt><dd>Translates the shape along the x-axis.</dd>
<dt>translateY</dt><dd>Translates the shape along the y-axis.</dd>
<dt>skewX</dt><dd>Skews the shape around the x-axis.</dd>
<dt>skewY</dt><dd>Skews the shape around the y-axis.</dd>
</dl>
Applying transforms through the transform attribute will reset the transform matrix and apply a new transform. The shape class also contains corresponding methods for each transform
that will apply the transform to the current matrix. The below code illustrates how you might use the <code>transform</code> attribute to instantiate a recangle with a rotation of 45 degrees.
<pre class="code prettyprint">var myRect = new Y.Rect({
type:"rect",
width: 50,
height: 40,
transform: "rotate(45)"
};</pre>
The code below would apply <code>translate</code> and <code>rotate</code> to an existing shape.</p>
<pre class="code prettyprint">myRect.set("transform", "translate(40, 50) rotate(45)");</pre>
</td>
</tr>
</table>
<h4 id="shapemethods">Shape Methods</h4>
<p>Shapes can also be manipulated by the following methods:</p>
<table>
<tr>
<th>Method</th>
<th>Description</th>
</tr>
<tr>
<td><code>addClass</code></td>
<td>Adds a class to the underlying HTMLElement.</td>
</tr>
<tr>
<td><code>removeClass</code></td>
<td>Removes a class to the underlying HTMLElement.</td>
</tr>
<tr>
<td><code>getXY</code></td>
<td>Gets the current position of the shape in page coordinates. Returns an array, <code>[x, y,]</code>, with the coordinates.</td>
</tr>
<tr>
<td><code>setXY</code></td>
<td>Sets the current position of the shape in page coordinates. Accepts an array, <code>[x, y]</code>, with the coordinates.</td>
</tr>
<tr>
<td><code>get</code></td>
<td>Returns the value of a given attribute.</td>
</tr>
<tr>
<td><code>set</code></td>
<td>Sets the value of an attribute.</td>
</tr>
<tr>
<td><code>rotate</code></td>
<td>Rotates the shape clockwise around it <code>transformOrigin</code>.</td>
</tr>
<tr>
<td><code>translate</code></td>
<td>Specifies a 2d translation.</td>
</tr>
<tr>
<td><code>translateX</code></td>
<td>Translates the shape along the x-axis.</td>
</tr>
<tr>
<td><code>translateY</code></td>
<td>Translates the shape along the y-axis.</td>
</tr>
<tr>
<td><code>skew</code></td>
<td>Skews the shape around the x-axis and y-axis.</td>
</tr>
<tr>
<td><code>skewX</code></td>
<td>Skews the shape around the x-axis.</td>
</tr>
<tr>
<td><code>skewY</code></td>
<td>Skews the shape around the y-axis.</td>
</tr>
<tr>
<td><code>scale</code></td>
<td>Specifies a 2d scaling operation.</td>
</tr>
</table>
<h4 id="drawingmethods">Drawing Methods</h4>
<p>Unlike the other included shapes, the <code>Path</code> class is not pre-defined. Setting the size, fill and/or stroke of a pre-defined shape will render the shape. This is not true with the <code>Path</code>. To render
a <code>Path</code> instance, its drawing methods need to be leveraged. These drawing methods can also be leveraged when creating custom shapes. Available drawing methods include:
<dl>
<dt>moveTo</dt><dd>Moves to a coordinate point without drawing a line.</dd>
<dt>lineTo</dt><dd>Draws a line segment from the current point to the specified point.</dd>
<dt>curveTo</dt><dd>Draws a curve based on a start point, end point and two control points.</dd>
<dt>quadraticCurveTo</dt><dd>Draws a quadratic curve based on a start point, end point and two control points.</dd>
<dt>end</dt><dd>Ends a drawing operation. The path or custom shape will draw after end is called.</dd>
<dt>clear</dt><dd>Clears all contents of a path or custom shape.</dd>
</dl>
</p>
<h4 id="strokesandfills">Strokes and Fills</h4>
<p>All <code>Shape</code> instances contain <code>stroke</code> and <code>fill</code> attributes. They are used to define the colors for a <code>Shape</code>.</p>
<h5 id="definingstrokes">Defining a Stroke</h5>
<p>The <code>stroke</code> attribute has six properties.</p>
<dl>
<dt>color</dt><dd>The color of the stroke.</dd>
<dt>weight</dt><dd>Number that indicates the width of the stroke.</dd>
<dt>opacity</dt><dd>Number between 0 and 1 that indicates the opacity of the stroke. The default value is 1.</dd>
<dt>dashstyle</dt>Indicates whether to draw a dashed stroke. When set to "none", a solid stroke is drawn. When set to an array, the first index indicates the
length of the dash. The second index indicates the length of gap.
<dt>linecap</dt><dd>Specifies the linecap for the stroke. The following values can be specified:
<dl>
<dt>butt (default)</dt><dd>Specifies a butt linecap.</dd>
<dt>square</dt><dd>Specifies a sqare linecap.</dd>
<dt>round</dt><dd>Specifies a round linecap.</dd>
</dl>
</dd>
<dt>linejoin</dt><dd>Specifies a linejoin for the stroke. The following values can be specified:
<dl>
<dt>round (default)</dt><dd>Specifies that the linejoin will be round.</dd>
<dt>bevel</dt><dd>Specifies a bevel for the linejoin.</dd>
<dt>miter limit</dt><dd>An integer specifying the miter limit of a miter linejoin. If you want to specify a linejoin of miter, you simply specify the limit as opposed to having
separate miter and miter limit values.</dd>
</dl>
</dd>
</dl>
<p>The code below would set a 2 pixel solid red stroke on <code>myshape</code>.</p>
<pre class="code prettyprint">myshape.set("stroke", {
color: "#ff0000",
weight: 2
});</pre>
<p>The <code>dashstyle</code> property can be used to create a dashed stroke on a shape.</p>
<pre class="code prettyprint">myshape.set("stroke", {
color: "#ff0000",
weight: 2,
dashstyle: [3, 2]
});</pre>
<h5 id="definingfills">Defining a Fill</h5>
<p>The <code>fill</code> attribute has the following properties.</p>
<dl>
<dt>color</dt><dd>The color of the fill.</dd>
<dt>opacity</dt><dd>Number between 0 and 1 that indicates the opacity of the fill. The default value is 1.</dd>
<dt>type</dt><dd>Type of fill.
<dl>
<dt>solid</dt><dd>Solid single color fill. (default)</dd>
<dt>linear</dt><dd>Linear gradient fill.</dd>
<dt>radial</dt><dd>Radial gradient fill.</dd>
</dl>
</dd>
</dl>
<p>If a <code>linear</code> or <code>radial</code> is specified as the fill type. The following additional property is used:
<dl>
<dt>stops</dt><dd>An array of objects containing the following properties:
<dl>
<dt>color</dt><dd>The color of the stop.</dd>
<dt>opacity</dt><dd>Number between 0 and 1 that indicates the opacity of the stop. The default value is 1. Note: No effect for IE <= 8</dd>
<dt>offset</dt><dd>Number between 0 and 1 indicating where the color stop is positioned.</dd>
</dl>
</dd>
<p>Linear gradients also have the following property:</p>
<dt>rotation</dt><dd>Linear gradients flow left to right by default. The rotation property allows you to change the flow by rotation. (e.g. A rotation of 180 would make the gradient pain from right to left.)</dd>
<p>Radial gradients have the following additional properties:</p>
<dt>r</dt><dd>Radius of the gradient circle.</dd>
<dt>fx</dt><dd>Focal point x-coordinate of the gradient.</dd>
<dt>fy</dt><dd>Focal point y-coordinate of the gradient.</dd>
<dt>cx</dt><dd>The x-coordinate of the center of the gradient circle. Determines where the color stop begins. The default value 0.5.
<p><strong>Note: </strong>This property currently has no effect on Android or IE 6 - 8.</p>
</dd>
<dt>cy</dt><dd>The y-coordinate of the center of the gradient circle. Determines where the color stop begins. The default value 0.5.
<p><strong>Note: </strong>This property currently has no effect on Android or IE 6 - 8.</p>
</dd>
</dl>
<h3 id="radial-gradient-tool">Radial Gradient Tool</h3>
<!-- doesn't contain the header because it may be h3 or h2 -->
<p>
Try this simple <a href="graphics-radial-tool.html">tool</a> that helps
you interactively preview radial gradient fills.
<a href="graphics-radial-tool.html">
<img style="border: 1px solid #bfbfbf; height:265px; width:645px;" alt="Screen capture of Graphics radial gradient tool" src="../assets/graphics/img/radial_tool_capture.png">
</a>
<br><a href="graphics-radial-tool.html" class="button">Try It</a>
</p>
<p>
Avoid the trial and error, quickly get just the look you want.
As you drag and resize different parts of the control, you preview
the radial gradient fill and see its property values update.
Click the "Get Code Snippet" button for code you can paste into a
Graphics instance to reproduce the same gradient.
</p>
<h2 id="issues">Known Issues</h2>
<ul class="spaced">
<li>
<p>Gradients need more need more normalization across technologies. Certain gradient types have limitations on different browsers.
</p>
<ul>
<li>Radial gradients contain the properties <code>cx</code> and <code>cy</code>. These properties currently have no impact on Android or IE 6 - 8.</li>
<li>After being initially set, gradients cannot be updated in IE 6 - 8.</li>
</ul>
</li>
<li>
<p>Path element currently lacks the ability to have interactivity in Android.</p>
</li>
</ul>
</div>
</div>
</div>
<div class="yui3-u-1-4">
<div class="sidebar">
<div id="toc" class="sidebox">
<div class="hd">
<h2 class="no-toc">Table of Contents</h2>
</div>
<div class="bd">
<ul class="toc">
<li>
<a href="#getting-started">Getting Started</a>
</li>
<li>
<a href="#using">Using the Graphics module</a>
<ul class="toc">
<li>
<a href="#instantiating">Instantiating A Graphic instance</a>
<ul class="toc">
<li>
<a href="#css">CSS</a>
</li>
<li>
<a href="#html">HTML</a>
</li>
<li>
<a href="#javascript">JavaScript</a>
</li>
</ul>
</li>
<li>
<a href="#creating-shapes">Creating shapes</a>
</li>
<li>
<a href="#path-drawing-tool">Path Drawing Tool</a>
</li>
<li>
<a href="#aboutgraphic">Working with the Graphic Class</a>
<ul class="toc">
<li>
<a href="#graphicattributes">Graphic Attributes</a>
</li>
<li>
<a href="#graphicmethods">Graphic Methods</a>
</li>
</ul>
</li>
<li>
<a href="#aboutshapes">Working with Shapes</a>
<ul class="toc">
<li>
<a href="#shapeattributes">Shape Attributes</a>
</li>
<li>
<a href="#shapemethods">Shape Methods</a>
</li>
<li>
<a href="#drawingmethods">Drawing Methods</a>
</li>
<li>
<a href="#strokesandfills">Strokes and Fills</a>
<ul class="toc">
<li>
<a href="#definingstrokes">Defining a Stroke</a>
</li>
<li>
<a href="#definingfills">Defining a Fill</a>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#radial-gradient-tool">Radial Gradient Tool</a>
</li>
</ul>
</li>
<li>
<a href="#issues">Known Issues</a>
</li>
</ul>
</div>
</div>
<div class="sidebox">
<div class="hd">
<h2 class="no-toc">Examples</h2>
</div>
<div class="bd">
<ul class="examples">
<li data-description="Shows how to create a Graphic instance and add shapes.">
<a href="graphics-simple.html">Basic Graphics Implementation</a>
</li>
<li data-description="Shows how to draw lines and polygons.">
<a href="graphics-path.html">Basic Path</a>
</li>
<li data-description="Shows how to create linear and radial gradient fills.">
<a href="graphics-gradients.html">Create Gradient Fills</a>
</li>
<li data-description="Shows how to add drag to a shape.">
<a href="graphics-drag.html">Basic drag with graphic object</a>
</li>
<li data-description="Shows how to apply transforms to shape.">
<a href="graphics-transforms.html">Using Transforms</a>
</li>
<li data-description="Shows how to use a custom shape with the Graphics module.">
<a href="graphics-customshape.html">Custom Shape</a>
</li>
<li data-description="Shows to use the graphics api to draw a realistic glass.">
<a href="graphics-muddyglass.html">Transparent Glass with Shadow</a>
</li>
<li data-description="Shows to use the graphics api to draw a violin.">
<a href="graphics-violin.html">Complex Drawing: Violin</a>
</li>
</ul>
</div>
</div>
<div class="sidebox">
<div class="hd">
<h2 class="no-toc">Examples That Use This Component</h2>
</div>
<div class="bd">
<ul class="examples">
<li data-description="This example demonstrates animating an element along a curved path using bezier control points.">
<a href="../anim/curve.html">Animating Along a Curved Path</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="../assets/vendor/prettify/prettify-min.js"></script>
<script>prettyPrint();</script>
<script>
YUI.Env.Tests = {
examples: [],
project: '../assets',
assets: '../assets/graphics',
name: 'graphics',
title: 'Graphics',
newWindow: '',
auto: false
};
YUI.Env.Tests.examples.push('graphics-simple');
YUI.Env.Tests.examples.push('graphics-path');
YUI.Env.Tests.examples.push('graphics-gradients');
YUI.Env.Tests.examples.push('graphics-drag');
YUI.Env.Tests.examples.push('graphics-transforms');
YUI.Env.Tests.examples.push('graphics-customshape');
YUI.Env.Tests.examples.push('graphics-muddyglass');
YUI.Env.Tests.examples.push('graphics-violin');
YUI.Env.Tests.examples.push('curve');
</script>
<script src="../assets/yui/test-runner.js"></script>
</body>
</html>
| {
"content_hash": "cf208faa082abf30c0f635f3e2ccf0ac",
"timestamp": "",
"source": "github",
"line_count": 820,
"max_line_length": 402,
"avg_line_length": 40.889024390243904,
"alnum_prop": 0.5586208953443288,
"repo_name": "billwiliams/Yui",
"id": "c81de9da21e4e9810883fa544c67a175ccee5467",
"size": "33529",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "client/yui-3.17.2/docs/graphics/index.html",
"mode": "33261",
"license": "mit",
"language": [],
"symlink_target": ""
} |
#ifndef CODEMITTERGEN_H
#define CODEMITTERGEN_H
#include "llvm/TableGen/TableGenBackend.h"
#include <vector>
#include <string>
namespace llvm {
class RecordVal;
class BitsInit;
class CodeGenTarget;
class CodeEmitterGen : public TableGenBackend {
RecordKeeper &Records;
public:
CodeEmitterGen(RecordKeeper &R) : Records(R) {}
// run - Output the code emitter
void run(raw_ostream &o);
private:
void emitMachineOpEmitter(raw_ostream &o, const std::string &Namespace);
void emitGetValueBit(raw_ostream &o, const std::string &Namespace);
void reverseBits(std::vector<Record*> &Insts);
int getVariableBit(const std::string &VarName, BitsInit *BI, int bit);
std::string getInstructionCase(Record *R, CodeGenTarget &Target);
void
AddCodeToMergeInOperand(Record *R, BitsInit *BI, const std::string &VarName,
unsigned &NumberedOp,
std::string &Case, CodeGenTarget &Target);
};
} // End llvm namespace
#endif
| {
"content_hash": "689b9027e02bc4c2a63d86879c3f95a3",
"timestamp": "",
"source": "github",
"line_count": 37,
"max_line_length": 78,
"avg_line_length": 27.64864864864865,
"alnum_prop": 0.6803519061583577,
"repo_name": "abduld/clreflect",
"id": "a8588af761dec981997a317edaee1e475f376756",
"size": "1482",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "extern/llvm/utils/TableGen/CodeEmitterGen.h",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C++",
"bytes": "694261"
},
{
"name": "CMake",
"bytes": "11725"
},
{
"name": "Shell",
"bytes": "810"
}
],
"symlink_target": ""
} |
package org.shaon.utd.sirius.service;
import org.shaon.utd.sirius.domain.Course;
import org.shaon.utd.sirius.domain.Registered;
import org.shaon.utd.sirius.domain.Section;
import org.shaon.utd.sirius.domain.Student;
import org.testng.Assert;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import org.unitils.UnitilsTestNG;
import org.unitils.dbunit.annotation.DataSet;
import org.unitils.orm.jpa.JpaUnitils;
import org.unitils.orm.jpa.annotation.JpaEntityManagerFactory;
import java.util.List;
/**
* @author Fahad Shaon
*/
@DataSet("InstructorServiceBeanTest.xml")
@JpaEntityManagerFactory(persistenceUnit = "TestPersistenceUnit", configFile = "META-INF/persistence-test.xml")
public class RegisteredServiceBeanTest extends UnitilsTestNG {
private RegisteredService registeredService;
@BeforeMethod
public void setUp() {
registeredService = new RegisteredServiceBean();
JpaUnitils.injectEntityManagerInto(registeredService);
}
@Test
public void testFindByUserId() {
Student student = new Student();
student.setId(1L);
List<Registered> registeredList = registeredService.fetchRegisteredSectionsOfStudent(student);
Assert.assertEquals(registeredList.size(), 3);
Registered registered = registeredList.get(0);
Assert.assertEquals(registered.getSection().getId(), new Long(1));
registered = registeredList.get(1);
Assert.assertEquals(registered.getSection().getId(), new Long(3));
registered = registeredList.get(2);
Assert.assertEquals(registered.getSection().getId(), new Long(4));
}
@Test
public void testFetchRegisteredStudentOfSection() {
Section section = new Section();
section.setId(1L);
List<Registered> registeredList = registeredService.fetchRegisteredStudentOfSection(section);
Assert.assertEquals(registeredList.size(), 5);
Registered registered = registeredList.get(0);
Assert.assertEquals(registered.getStudent().getFirstName(), "Mariam");
registered = registeredList.get(1);
Assert.assertEquals(registered.getStudent().getFirstName(), "Sean");
registered = registeredList.get(2);
Assert.assertEquals(registered.getStudent().getFirstName(), "Camilla");
registered = registeredList.get(3);
Assert.assertEquals(registered.getStudent().getFirstName(), "Mariko");
registered = registeredList.get(4);
Assert.assertEquals(registered.getStudent().getFirstName(), "Cora");
}
@Test
public void testFind() {
Registered registered = registeredService.find(1L, 1L);
Assert.assertEquals(registered.getSection().getId(), new Long(1));
Assert.assertEquals(registered.getStudent().getId(), new Long(1));
}
@Test
public void testFetchRegistered() throws Exception {
Section section = new Section();
section.setId(1L);
List<Registered> registeredList = registeredService.fetchRegistered(section, 1L, "", "");
Assert.assertEquals(registeredList.size(), 1);
registeredList = registeredService.fetchRegistered(section, null, "a", "");
Assert.assertEquals(registeredList.size(), 5);
registeredList = registeredService.fetchRegistered(section, null, "", "a");
Assert.assertEquals(registeredList.size(), 1);
}
@Test
public void testFetchSectionList() throws Exception {
List<Section> sectionList = registeredService.fetchSectionList();
Assert.assertEquals(sectionList.size(), 4);
}
@Test
public void testFetchCourse() throws Exception {
String courseNumber = "CS 6360";
Course course = registeredService.fetchCourse(courseNumber);
Assert.assertEquals(course.getCourseNumber(), courseNumber);
Assert.assertEquals(course.getSectionList().size(), 2);
}
}
| {
"content_hash": "07e611f9a9dfd0132cfd9924e1a5e32f",
"timestamp": "",
"source": "github",
"line_count": 110,
"max_line_length": 111,
"avg_line_length": 35.736363636363635,
"alnum_prop": 0.7046553039938946,
"repo_name": "fahadshaon/sirius",
"id": "044cb5c3cc58c079e390eda82f44b036897b4cf1",
"size": "3931",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/test/java/org/shaon/utd/sirius/service/RegisteredServiceBeanTest.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "217221"
},
{
"name": "Java",
"bytes": "83554"
},
{
"name": "JavaScript",
"bytes": "80225"
}
],
"symlink_target": ""
} |
package org.linqs.psl.experimental.datasplitter.builddbstep;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.linqs.psl.database.Partition;
public class PartitionSetUtils {
public static List<Partition> invertPartitions(Collection<Partition> partitions, Set<Partition> allPartitions){
List<Partition> invertedPartition = new ArrayList<Partition>();
for(Partition p: allPartitions){
if(!partitions.contains(p)){
invertedPartition.add(p);
}
}
return invertedPartition;
}
public static Set<Partition> collectSets(List<Collection<Partition>> partitionList){
Set<Partition> allPartitions = new HashSet<Partition>();
for(Collection<Partition> pL : partitionList){
allPartitions.addAll(pL);
}
return allPartitions;
}
}
| {
"content_hash": "1d972b7bb4ad570b00421047001893c4",
"timestamp": "",
"source": "github",
"line_count": 32,
"max_line_length": 112,
"avg_line_length": 26.4375,
"alnum_prop": 0.764775413711584,
"repo_name": "linqs/psl-experimental",
"id": "0719cd99a93ff59597008a578bf91013160c3d80",
"size": "1561",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "psl-datasplitter/src/main/java/org/linqs/psl/experimental/datasplitter/builddbstep/PartitionSetUtils.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "528386"
},
{
"name": "Python",
"bytes": "4187"
},
{
"name": "Shell",
"bytes": "876"
}
],
"symlink_target": ""
} |
import * as React from 'react';
import * as motion from 'react-motion';
declare namespace Transition {
interface TransitionProps {
component?: string | boolean | React.ReactElement | undefined;
runOnMount?: boolean | undefined;
appear?: motion.Style | undefined;
enter?: motion.Style | undefined;
leave?: motion.Style | undefined;
onEnter?: ((style: motion.PlainStyle) => void) | undefined;
onLeave?: ((style: motion.Style) => void) | undefined;
}
}
declare const Transition: React.ComponentClass<Transition.TransitionProps>;
export default Transition;
| {
"content_hash": "cb51468b172fe24bd021852650bc2a7a",
"timestamp": "",
"source": "github",
"line_count": 17,
"max_line_length": 75,
"avg_line_length": 36.411764705882355,
"alnum_prop": 0.6736672051696284,
"repo_name": "markogresak/DefinitelyTyped",
"id": "18b3d53f2c8989878b411d95145fe79113771641",
"size": "892",
"binary": false,
"copies": "7",
"ref": "refs/heads/master",
"path": "types/react-motion-ui-pack/index.d.ts",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CoffeeScript",
"bytes": "15"
},
{
"name": "Protocol Buffer",
"bytes": "678"
},
{
"name": "TypeScript",
"bytes": "17426898"
}
],
"symlink_target": ""
} |
import React from 'react';
const PathPrefixContext = React.createContext('');
function usePathPrefix(): string {
return React.useContext(PathPrefixContext);
}
export { usePathPrefix, PathPrefixContext };
| {
"content_hash": "6ea64affc4233104626d58b49c07054e",
"timestamp": "",
"source": "github",
"line_count": 9,
"max_line_length": 50,
"avg_line_length": 23.22222222222222,
"alnum_prop": 0.7703349282296651,
"repo_name": "GoogleCloudPlatform/prometheus-engine",
"id": "7877628144a878d12dd7337dfe1ea1a6e4e16c9a",
"size": "209",
"binary": false,
"copies": "4",
"ref": "refs/heads/main",
"path": "third_party/prometheus_ui/base/web/ui/react-app/src/contexts/PathPrefixContext.tsx",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Dockerfile",
"bytes": "4035"
},
{
"name": "Go",
"bytes": "574177"
},
{
"name": "Makefile",
"bytes": "5189"
},
{
"name": "Shell",
"bytes": "11915"
}
],
"symlink_target": ""
} |
from swgpy.object import *
def create(kernel):
result = Intangible()
result.template = "object/draft_schematic/bio_engineer/dna_template/shared_dna_template_snorbal.iff"
result.attribute_template_id = -1
result.stfName("string_id_table","")
#### BEGIN MODIFICATIONS ####
#### END MODIFICATIONS ####
return result | {
"content_hash": "a5323374016fe3be7c5f2e322781a6a3",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 101,
"avg_line_length": 25.384615384615383,
"alnum_prop": 0.706060606060606,
"repo_name": "obi-two/Rebelion",
"id": "e9498e04e65673ae8665b779a5535ffd809cc3f8",
"size": "475",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "data/scripts/templates/object/draft_schematic/bio_engineer/dna_template/shared_dna_template_snorbal.py",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "11818"
},
{
"name": "C",
"bytes": "7699"
},
{
"name": "C++",
"bytes": "2293610"
},
{
"name": "CMake",
"bytes": "39727"
},
{
"name": "PLSQL",
"bytes": "42065"
},
{
"name": "Python",
"bytes": "7499185"
},
{
"name": "SQLPL",
"bytes": "41864"
}
],
"symlink_target": ""
} |
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title><?php echo $title; ?></title>
<?php echo html_tag('link', array( 'rel' => 'shortcut icon', 'type' => 'image/x-icon', 'href' => Asset::get_file('favicon.ico', 'img'), ) ); ?>
<?php echo html_tag('link', array( 'rel' => 'icon', 'type' => 'image/x-icon', 'href' => Asset::get_file('favicon.ico', 'img'), ) ); ?>
<?php echo Asset::css('bootstrap.css'); ?>
<style>
body { margin: 50px; }
</style>
<?php echo Asset::js(array(
'http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js',
'bootstrap.js',
)); ?>
<script>
$(function(){ $('.topbar').dropdown(); });
</script>
</head>
<body>
<?php if ($current_user): ?>
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">GlamourousParty</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li class="<?php echo Uri::segment(2) == '' ? 'active' : '' ?>">
<?php echo Html::anchor('admin', 'ダッシュボード') ?>
</li>
<?php
$files = new GlobIterator(APPPATH.'classes/controller/admin/*.php');
foreach($files as $file)
{
$section_segment = $file->getBasename('.php');
$section_title = Inflector::humanize($section_segment);
if ($section_title == 'Councilors') $section_title = '議員メンバー';
if ($section_title == 'Answers') $section_title = '回答';
if ($section_title == 'Questions') $section_title = '質問';
if ($section_title == 'Categories') $section_title = 'カテゴリ';
?>
<li class="<?php echo Uri::segment(2) == $section_segment ? 'active' : '' ?>">
<?php echo Html::anchor('admin/'.$section_segment, $section_title) ?>
</li>
<?php
}
?>
</ul>
<ul class="nav navbar-nav pull-right">
<li class="dropdown">
<a data-toggle="dropdown" class="dropdown-toggle" href="#"><?php echo $current_user->username ?> <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><?php echo Html::anchor('admin/logout', 'ログアウト') ?></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<?php endif; ?>
<div class="container">
<div class="row">
<div class="col-md-12">
<h1><?php echo $title; ?></h1>
<hr>
<?php if (Session::get_flash('success')): ?>
<div class="alert alert-success alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<p>
<?php echo implode('</p><p>', (array) Session::get_flash('success')); ?>
</p>
</div>
<?php endif; ?>
<?php if (Session::get_flash('error')): ?>
<div class="alert alert-danger alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<p>
<?php echo implode('</p><p>', (array) Session::get_flash('error')); ?>
</p>
</div>
<?php endif; ?>
</div>
<div class="col-md-12">
<?php echo $content; ?>
</div>
</div>
<hr/>
<footer>
<p class="pull-right"></p>
</footer>
</div>
</body>
</html>
| {
"content_hash": "3117d511d668d054012bb82d89adf06f",
"timestamp": "",
"source": "github",
"line_count": 99,
"max_line_length": 144,
"avg_line_length": 33.73737373737374,
"alnum_prop": 0.5655688622754491,
"repo_name": "womanshift/womanshift",
"id": "1a3564bc7a72df9df0dba13558b4d442b855d8fb",
"size": "3392",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "fuel/app/views/admin/template.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ApacheConf",
"bytes": "2045"
},
{
"name": "CSS",
"bytes": "8172"
},
{
"name": "HTML",
"bytes": "11839"
},
{
"name": "JavaScript",
"bytes": "4644"
},
{
"name": "PHP",
"bytes": "72878"
},
{
"name": "Shell",
"bytes": "2294"
}
],
"symlink_target": ""
} |
NutScript is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
NutScript is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with NutScript. If not, see <http://www.gnu.org/licenses/>.
--]]
ITEM.name = "Shotgun"
ITEM.desc = "A powerful pump-action shotgun."
ITEM.class = "weapon_shotgun"
ITEM.weaponCategory = "primary"
ITEM.model = "models/weapons/w_shotgun.mdl"
ITEM.width = 3
ITEM.height = 1
ITEM.price = 500
ITEM.iconCam = {
pos = Vector(0, 200, 1),
ang = Angle(0, 270, 0),
fov = 10
}
ITEM.flag = "Y"
ITEM.classes = {CLASS_CP_ELITE}
ITEM.factions = {FACTION_OW} | {
"content_hash": "4621308de8dd340c44cd802b27962bf0",
"timestamp": "",
"source": "github",
"line_count": 30,
"max_line_length": 72,
"avg_line_length": 34.53333333333333,
"alnum_prop": 0.7123552123552124,
"repo_name": "Chessnut/hl2rp",
"id": "2dd3a3f5255d858c50b5df715cb72a0002ad3be1",
"size": "1041",
"binary": false,
"copies": "1",
"ref": "refs/heads/1.1",
"path": "schema/items/weapons/sh_shotgun.lua",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Lua",
"bytes": "225826"
}
],
"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>
<groupId>org.synchronoss.cloud</groupId>
<artifactId>nio-multipart</artifactId>
<version>1.1.1-SNAPSHOT</version>
</parent>
<artifactId>nio-multipart-parser</artifactId>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<!-- Testing -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</dependency>
<dependency>
<groupId>org.synchronoss.cloud</groupId>
<artifactId>nio-stream-storage</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-io</artifactId>
<version>1.3.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>18.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava-testlib</artifactId>
<version>18.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>release</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project> | {
"content_hash": "e316d21a4265b83b9e5dedcee875adf0",
"timestamp": "",
"source": "github",
"line_count": 114,
"max_line_length": 204,
"avg_line_length": 29.79824561403509,
"alnum_prop": 0.5284074183102738,
"repo_name": "synchronoss/nio-multipart",
"id": "12deab0d2776441a117fddcbd67f71295ae0241b",
"size": "3397",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "nio-multipart-parser/pom.xml",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "344266"
},
{
"name": "Shell",
"bytes": "1084"
}
],
"symlink_target": ""
} |
CREATE PROCEDURE [dbo].[UpsertUser]
@userRef VARCHAR(255),
@displayName VARCHAR(255),
@ukprn BIGINT,
@email VARCHAR(255),
@isDeleted BIT = 0
AS
MERGE [dbo].[User] as [Target]
USING (SELECT @userRef as UserRef) AS [SOURCE]
ON [Target].UserRef = [Source].UserRef
WHEN MATCHED THEN UPDATE SET [Target].DisplayName = @displayName, [Target].Ukprn = @ukprn, [Target].Email = @email, [Target].IsDeleted = 0, [Target].LastLogin = GETDATE()
WHEN NOT MATCHED THEN INSERT (UserRef, DisplayName, Ukprn, Email, IsDeleted, LastLogin) VALUES (@userRef, @displayName, @ukprn, @email, @isDeleted, GETDATE());
| {
"content_hash": "31dd4c0ca4baad5ab13b035e2f14f035",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 171,
"avg_line_length": 46.53846153846154,
"alnum_prop": 0.7140495867768595,
"repo_name": "SkillsFundingAgency/das-providerapprenticeshipsservice",
"id": "94705adc2f59af474d38303ba5888d665003bba9",
"size": "607",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/SFA.DAS.ProviderAgreementStatus.Database/StoredProcedures/UpsertUser.sql",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ASP.NET",
"bytes": "250"
},
{
"name": "C#",
"bytes": "489715"
},
{
"name": "CSS",
"bytes": "179307"
},
{
"name": "HTML",
"bytes": "55305"
},
{
"name": "JavaScript",
"bytes": "279647"
},
{
"name": "SCSS",
"bytes": "138199"
},
{
"name": "TSQL",
"bytes": "4402"
}
],
"symlink_target": ""
} |
ACCEPTED
#### According to
Index Fungorum
#### Published in
Ned. kruidk. Archf 2(3): 775 (1902)
#### Original name
Sphaeronaema fagi Oudem.
### Remarks
null | {
"content_hash": "898cb0da8a3dca0409c602d751a8e068",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 35,
"avg_line_length": 12.307692307692308,
"alnum_prop": 0.6875,
"repo_name": "mdoering/backbone",
"id": "e529c4c56b9dd7b6afa843e1e51d1b827f390379",
"size": "208",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "life/Fungi/Ascomycota/Sphaeronaema/Sphaeronaema fagi/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
import React, { Component, PropTypes } from 'react'
import Business from './Business'
import StaffManager from './StaffManager'
import styles from 'styles/lemons.scss'
import classnames from 'classnames'
class BuyBusinessButton extends Component {
render () {
const {name, cash, cost, stockCost, salePrice, actions, maxCash, maxStock} = this.props
return (
<button className='btn btn-primary btn-block btn-small' hidden={maxCash < cost} disabled={cash < cost} onClick={(e) => actions.addBusiness({name: name, cost: cost, stock_cost: stockCost, sale_price: salePrice, maxStock: maxStock})}>
<span className='glyphicon glyphicon-plus' aria-hidden='true'></span> {name} (${cost})
</button>
)
}
}
class Plot extends Component {
getCost () {
var count = (this.props.businesses.length + this.props.plotsCount)
var cost = Math.pow(2, count) * 150
return cost
}
getPanelContent (available, cash, maxCash, actions) {
if (available === false) {
return (
<div>
<h3>Buy this Plot</h3>
<button disabled={cash < this.getCost()} className='btn btn-success btn-lg' onClick={(e) => actions.buyPlot(this.getCost()) }>Buy (${this.getCost()})</button>
</div>
)
}
return (
<div>
<BuyBusinessButton name='Lemonade Stand' cash={cash} cost={50} stockCost={1} salePrice={2} maxCash={maxCash} actions={actions} maxStock={25} />
<BuyBusinessButton name='Cookie Stand' cash={cash} cost={250} stockCost={2} salePrice={4} maxCash={maxCash} actions={actions} maxStock={25} />
<BuyBusinessButton name='Cupcake Stand' cash={cash} cost={1000} stockCost={3} salePrice={6} maxCash={maxCash} actions={actions} maxStock={25} />
<BuyBusinessButton name='Ice Cream Stand' cash={cash} cost={5000} stockCost={4} salePrice={8} maxCash={maxCash} actions={actions} maxStock={25} />
<BuyBusinessButton name='Burger Stand' cash={cash} cost={25000} stockCost={5} salePrice={10} maxCash={maxCash} actions={actions} maxStock={25} />
<BuyBusinessButton name='Banana Stand' cash={cash} cost={100000} stockCost={6} salePrice={12} maxCash={maxCash} actions={actions} maxStock={25} />
</div>
)
}
render () {
const { available, actions, cash, maxCash } = this.props
return (
<div className='col-xs-12 col-md-4'>
<div className='panel panel-info' >
<div className='panel-heading'>
<h4 className=''>New Plot</h4>
</div>
<div className={classnames('panel-body', styles.fixedpanel, 'text-center')}>
{this.getPanelContent(available, cash, maxCash, actions)}
</div>
</div>
</div>
)
}
}
export default class BusinessManager extends Component {
renderPlots (available, cash, maxCash, actions, businesses) {
var plots = []
for (var i = 0; i < available; i++) {
plots.push(<Plot cash={cash} maxCash={maxCash} actions={actions} businesses={businesses} plotsCount={available} />)
}
plots.push(<Plot available={false} cash={cash} maxCash={maxCash} actions={actions} businesses={businesses} plotsCount={available} />)
return <div>{plots}</div>
}
render () {
const { businesses, staff, actions, cash, maxCash, availablePlots } = this.props
return (
<div>
<div className='row'>
<div className='col-md-12'>
<h3>
Cash: ${cash}
</h3>
<div>
<div className='row'>
<div className='col-md-12'>
<ul id='myTabs' className={classnames('nav nav-tabs', styles.myTabs)} role='tablist'>
<li role='presentation' className='active'><a href='#businesses' aria-controls='businesses' role='tab' data-toggle='tab'>Businesses</a></li>
<li role='presentation'><a href='#staff' aria-controls='staff' role='tab' data-toggle='tab'>Staff</a></li>
</ul>
</div>
</div>
<div className='row'>
<div className='col-md-12'>
<div className='tab-content'>
<div className='tab-pane active' id='businesses'>
<div className='row'>
{businesses.map(business =>
<Business
key={business.id}
name={business.name}
stockAmount={business.stockAmount}
maxStock={business.maxStock}
sellPrice={business.sale_price}
cash={cash}
stockCost={business.stock_cost}
incrementStock={(amount, cost) => actions.incrementStock(business.id, amount, cost)}
sellBusiness={(sellValue) => actions.sellBusiness(business.id, sellValue)}
sellStock={() => actions.sellStock(business.id, 1, business.sale_price)}
{...business}
/>
)}
{this.renderPlots(availablePlots, cash, maxCash, actions, businesses)}
</div>
</div>
<div className='tab-pane' id='staff'>
<StaffManager staff={staff} />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
)
}
}
Plot.propTypes = {
cash: PropTypes.number.isRequired,
plotsCount: PropTypes.number.isRequired,
businesses: PropTypes.array.isRequired,
available: PropTypes.bool,
maxCash: PropTypes.number.isRequired,
actions: PropTypes.object.isRequired
}
BuyBusinessButton.propTypes = {
name: PropTypes.string.isRequired,
cash: PropTypes.number.isRequired,
maxCash: PropTypes.number.isRequired,
maxStock: PropTypes.number.isRequired,
cost: PropTypes.number.isRequired,
stockCost: PropTypes.number.isRequired,
actions: PropTypes.object.isRequired,
salePrice: PropTypes.number.isRequired
}
BusinessManager.propTypes = {
cash: PropTypes.number.isRequired,
maxCash: PropTypes.number.isRequired,
availablePlots: PropTypes.number.isRequired,
actions: PropTypes.object.isRequired,
businesses: PropTypes.arrayOf(PropTypes.shape({
name: PropTypes.string.isRequired,
stockAmount: PropTypes.number.isRequired,
stock_cost: PropTypes.number.isRequired
}).isRequired).isRequired,
staff: PropTypes.arrayOf(PropTypes.shape({
name: PropTypes.string.isRequired
}).isRequired).isRequired
}
export default BusinessManager
| {
"content_hash": "18f748bd2475a464d88ef77ee6e1fb34",
"timestamp": "",
"source": "github",
"line_count": 161,
"max_line_length": 240,
"avg_line_length": 41.24844720496895,
"alnum_prop": 0.5994579129649149,
"repo_name": "neiled/lemons",
"id": "6cc6fa75ed47229a78a4d3acc9b33d4afef4a9ed",
"size": "6641",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/components/BusinessManager.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "797"
},
{
"name": "HTML",
"bytes": "1572"
},
{
"name": "JavaScript",
"bytes": "53451"
}
],
"symlink_target": ""
} |
<?php
namespace Zend\Db\Adapter\Driver;
use Zend\Db\Adapter\StatementContainerInterface;
interface StatementInterface extends StatementContainerInterface
{
/**
* Get resource
*
* @return resource
*/
public function getResource();
/**
* Prepare sql
*
* @param string $sql
*/
public function prepare($sql = null);
/**
* Check if is prepared
*
* @return bool
*/
public function isPrepared();
/**
* Execute
*
* @param null $parameters
* @return ResultInterface
*/
public function execute($parameters = null);
}
| {
"content_hash": "4eb3660486b25386255f1c153f0fa60c",
"timestamp": "",
"source": "github",
"line_count": 38,
"max_line_length": 64,
"avg_line_length": 16.605263157894736,
"alnum_prop": 0.5863708399366085,
"repo_name": "exclie/Imagenologia",
"id": "a1ba56709509410733e2cca1f1f200716ec200a7",
"size": "933",
"binary": false,
"copies": "4",
"ref": "refs/heads/master",
"path": "vendor/zendframework/zendframework/library/Zend/Db/Adapter/Driver/StatementInterface.php",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "CSS",
"bytes": "1190035"
},
{
"name": "Go",
"bytes": "7075"
},
{
"name": "JavaScript",
"bytes": "2480301"
},
{
"name": "PHP",
"bytes": "461526"
},
{
"name": "Python",
"bytes": "5844"
},
{
"name": "Shell",
"bytes": "274"
}
],
"symlink_target": ""
} |
package com.xurxo.androidtestingcalculator.unit.domain;
import com.xurxo.androidtestingcalculator.domain.Operation;
import com.xurxo.androidtestingcalculator.domain.SubtractOperation;
import org.junit.Test;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.Is.is;
public class SubtractOperationTests {
@Test
public void evaluateTenSubtractSix_ShouldReturnFour(){
double operand1 = 10;
double operand2 = 6;
double expectedResult = 4;
Operation subtractOperation = new SubtractOperation();
double result = subtractOperation.evaluate(operand1,operand2);
assertThat(result, is(expectedResult));
}
@Test
public void getOperator_ShouldBeMinus(){
char expectedOperator = '-';
Operation subtractOperation = new SubtractOperation();
assertThat(subtractOperation.getOperator(), is(expectedOperator));
}
}
| {
"content_hash": "cd23f54c1203aee47f1bc5d2e0c4837b",
"timestamp": "",
"source": "github",
"line_count": 35,
"max_line_length": 74,
"avg_line_length": 26.8,
"alnum_prop": 0.7313432835820896,
"repo_name": "xurxodev/AndroidTestingCalculator",
"id": "06ea67b0f62746023eb6c5a1d77bc930c95d7545",
"size": "938",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "app/src/test/java/com/xurxo/androidtestingcalculator/unit/domain/SubtractOperationTests.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "51372"
}
],
"symlink_target": ""
} |
using std::string;
using std::vector;
namespace parquet {
using format::ConvertedType;
using format::FieldRepetitionType;
using format::SchemaElement;
namespace schema {
static inline SchemaElement NewPrimitive(const std::string& name,
FieldRepetitionType::type repetition,
format::Type::type type, int id = 0) {
SchemaElement result;
result.__set_name(name);
result.__set_repetition_type(repetition);
result.__set_type(type);
result.__set_num_children(0);
return result;
}
static inline SchemaElement NewGroup(const std::string& name,
FieldRepetitionType::type repetition,
int num_children, int id = 0) {
SchemaElement result;
result.__set_name(name);
result.__set_repetition_type(repetition);
result.__set_num_children(num_children);
return result;
}
// ----------------------------------------------------------------------
// ColumnPath
TEST(TestColumnPath, TestAttrs) {
ColumnPath path(std::vector<std::string>({"toplevel", "leaf"}));
ASSERT_EQ(path.ToDotString(), "toplevel.leaf");
std::shared_ptr<ColumnPath> path_ptr = ColumnPath::FromDotString("toplevel.leaf");
ASSERT_EQ(path_ptr->ToDotString(), "toplevel.leaf");
std::shared_ptr<ColumnPath> extended = path_ptr->extend("anotherlevel");
ASSERT_EQ(extended->ToDotString(), "toplevel.leaf.anotherlevel");
}
// ----------------------------------------------------------------------
// Primitive node
class TestPrimitiveNode : public ::testing::Test {
public:
void SetUp() {
name_ = "name";
id_ = 5;
}
void Convert(const format::SchemaElement* element) {
node_ = PrimitiveNode::FromParquet(element, id_);
ASSERT_TRUE(node_->is_primitive());
prim_node_ = static_cast<const PrimitiveNode*>(node_.get());
}
protected:
std::string name_;
const PrimitiveNode* prim_node_;
int id_;
std::unique_ptr<Node> node_;
};
TEST_F(TestPrimitiveNode, Attrs) {
PrimitiveNode node1("foo", Repetition::REPEATED, Type::INT32);
PrimitiveNode node2("bar", Repetition::OPTIONAL, Type::BYTE_ARRAY, LogicalType::UTF8);
ASSERT_EQ("foo", node1.name());
ASSERT_TRUE(node1.is_primitive());
ASSERT_FALSE(node1.is_group());
ASSERT_EQ(Repetition::REPEATED, node1.repetition());
ASSERT_EQ(Repetition::OPTIONAL, node2.repetition());
ASSERT_EQ(Node::PRIMITIVE, node1.node_type());
ASSERT_EQ(Type::INT32, node1.physical_type());
ASSERT_EQ(Type::BYTE_ARRAY, node2.physical_type());
// logical types
ASSERT_EQ(LogicalType::NONE, node1.logical_type());
ASSERT_EQ(LogicalType::UTF8, node2.logical_type());
// repetition
node1 = PrimitiveNode("foo", Repetition::REQUIRED, Type::INT32);
node2 = PrimitiveNode("foo", Repetition::OPTIONAL, Type::INT32);
PrimitiveNode node3("foo", Repetition::REPEATED, Type::INT32);
ASSERT_TRUE(node1.is_required());
ASSERT_TRUE(node2.is_optional());
ASSERT_FALSE(node2.is_required());
ASSERT_TRUE(node3.is_repeated());
ASSERT_FALSE(node3.is_optional());
}
TEST_F(TestPrimitiveNode, FromParquet) {
SchemaElement elt =
NewPrimitive(name_, FieldRepetitionType::OPTIONAL, format::Type::INT32, 0);
Convert(&elt);
ASSERT_EQ(name_, prim_node_->name());
ASSERT_EQ(id_, prim_node_->id());
ASSERT_EQ(Repetition::OPTIONAL, prim_node_->repetition());
ASSERT_EQ(Type::INT32, prim_node_->physical_type());
ASSERT_EQ(LogicalType::NONE, prim_node_->logical_type());
// Test a logical type
elt = NewPrimitive(name_, FieldRepetitionType::REQUIRED, format::Type::BYTE_ARRAY, 0);
elt.__set_converted_type(ConvertedType::UTF8);
Convert(&elt);
ASSERT_EQ(Repetition::REQUIRED, prim_node_->repetition());
ASSERT_EQ(Type::BYTE_ARRAY, prim_node_->physical_type());
ASSERT_EQ(LogicalType::UTF8, prim_node_->logical_type());
// FIXED_LEN_BYTE_ARRAY
elt = NewPrimitive(name_, FieldRepetitionType::OPTIONAL,
format::Type::FIXED_LEN_BYTE_ARRAY, 0);
elt.__set_type_length(16);
Convert(&elt);
ASSERT_EQ(name_, prim_node_->name());
ASSERT_EQ(id_, prim_node_->id());
ASSERT_EQ(Repetition::OPTIONAL, prim_node_->repetition());
ASSERT_EQ(Type::FIXED_LEN_BYTE_ARRAY, prim_node_->physical_type());
ASSERT_EQ(16, prim_node_->type_length());
// ConvertedType::Decimal
elt = NewPrimitive(name_, FieldRepetitionType::OPTIONAL,
format::Type::FIXED_LEN_BYTE_ARRAY, 0);
elt.__set_converted_type(ConvertedType::DECIMAL);
elt.__set_type_length(6);
elt.__set_scale(2);
elt.__set_precision(12);
Convert(&elt);
ASSERT_EQ(Type::FIXED_LEN_BYTE_ARRAY, prim_node_->physical_type());
ASSERT_EQ(LogicalType::DECIMAL, prim_node_->logical_type());
ASSERT_EQ(6, prim_node_->type_length());
ASSERT_EQ(2, prim_node_->decimal_metadata().scale);
ASSERT_EQ(12, prim_node_->decimal_metadata().precision);
}
TEST_F(TestPrimitiveNode, Equals) {
PrimitiveNode node1("foo", Repetition::REQUIRED, Type::INT32);
PrimitiveNode node2("foo", Repetition::REQUIRED, Type::INT64);
PrimitiveNode node3("bar", Repetition::REQUIRED, Type::INT32);
PrimitiveNode node4("foo", Repetition::OPTIONAL, Type::INT32);
PrimitiveNode node5("foo", Repetition::REQUIRED, Type::INT32);
ASSERT_TRUE(node1.Equals(&node1));
ASSERT_FALSE(node1.Equals(&node2));
ASSERT_FALSE(node1.Equals(&node3));
ASSERT_FALSE(node1.Equals(&node4));
ASSERT_TRUE(node1.Equals(&node5));
PrimitiveNode flba1("foo", Repetition::REQUIRED, Type::FIXED_LEN_BYTE_ARRAY,
LogicalType::DECIMAL, 12, 4, 2);
PrimitiveNode flba2("foo", Repetition::REQUIRED, Type::FIXED_LEN_BYTE_ARRAY,
LogicalType::DECIMAL, 1, 4, 2);
flba2.SetTypeLength(12);
PrimitiveNode flba3("foo", Repetition::REQUIRED, Type::FIXED_LEN_BYTE_ARRAY,
LogicalType::DECIMAL, 1, 4, 2);
flba3.SetTypeLength(16);
PrimitiveNode flba4("foo", Repetition::REQUIRED, Type::FIXED_LEN_BYTE_ARRAY,
LogicalType::DECIMAL, 12, 4, 0);
PrimitiveNode flba5("foo", Repetition::REQUIRED, Type::FIXED_LEN_BYTE_ARRAY,
LogicalType::NONE, 12, 4, 0);
ASSERT_TRUE(flba1.Equals(&flba2));
ASSERT_FALSE(flba1.Equals(&flba3));
ASSERT_FALSE(flba1.Equals(&flba4));
ASSERT_FALSE(flba1.Equals(&flba5));
}
TEST_F(TestPrimitiveNode, PhysicalLogicalMapping) {
ASSERT_NO_THROW(
PrimitiveNode::Make("foo", Repetition::REQUIRED, Type::INT32, LogicalType::INT_32));
ASSERT_NO_THROW(PrimitiveNode::Make("foo", Repetition::REQUIRED, Type::BYTE_ARRAY,
LogicalType::JSON));
ASSERT_THROW(
PrimitiveNode::Make("foo", Repetition::REQUIRED, Type::INT32, LogicalType::JSON),
ParquetException);
ASSERT_NO_THROW(PrimitiveNode::Make("foo", Repetition::REQUIRED, Type::INT64,
LogicalType::TIMESTAMP_MILLIS));
ASSERT_THROW(
PrimitiveNode::Make("foo", Repetition::REQUIRED, Type::INT32, LogicalType::INT_64),
ParquetException);
ASSERT_THROW(PrimitiveNode::Make("foo", Repetition::REQUIRED, Type::BYTE_ARRAY,
LogicalType::INT_8),
ParquetException);
ASSERT_THROW(PrimitiveNode::Make("foo", Repetition::REQUIRED, Type::BYTE_ARRAY,
LogicalType::INTERVAL),
ParquetException);
ASSERT_THROW(PrimitiveNode::Make("foo", Repetition::REQUIRED,
Type::FIXED_LEN_BYTE_ARRAY, LogicalType::ENUM),
ParquetException);
ASSERT_NO_THROW(PrimitiveNode::Make("foo", Repetition::REQUIRED, Type::BYTE_ARRAY,
LogicalType::ENUM));
ASSERT_THROW(
PrimitiveNode::Make("foo", Repetition::REQUIRED, Type::FIXED_LEN_BYTE_ARRAY,
LogicalType::DECIMAL, 0, 2, 4),
ParquetException);
ASSERT_THROW(PrimitiveNode::Make("foo", Repetition::REQUIRED, Type::FLOAT,
LogicalType::DECIMAL, 0, 2, 4),
ParquetException);
ASSERT_THROW(
PrimitiveNode::Make("foo", Repetition::REQUIRED, Type::FIXED_LEN_BYTE_ARRAY,
LogicalType::DECIMAL, 0, 4, 0),
ParquetException);
ASSERT_THROW(
PrimitiveNode::Make("foo", Repetition::REQUIRED, Type::FIXED_LEN_BYTE_ARRAY,
LogicalType::DECIMAL, 10, 0, 4),
ParquetException);
ASSERT_THROW(
PrimitiveNode::Make("foo", Repetition::REQUIRED, Type::FIXED_LEN_BYTE_ARRAY,
LogicalType::DECIMAL, 10, 4, -1),
ParquetException);
ASSERT_THROW(
PrimitiveNode::Make("foo", Repetition::REQUIRED, Type::FIXED_LEN_BYTE_ARRAY,
LogicalType::DECIMAL, 10, 2, 4),
ParquetException);
ASSERT_NO_THROW(PrimitiveNode::Make("foo", Repetition::REQUIRED,
Type::FIXED_LEN_BYTE_ARRAY, LogicalType::DECIMAL,
10, 6, 4));
ASSERT_NO_THROW(PrimitiveNode::Make("foo", Repetition::REQUIRED,
Type::FIXED_LEN_BYTE_ARRAY, LogicalType::INTERVAL,
12));
ASSERT_THROW(PrimitiveNode::Make("foo", Repetition::REQUIRED,
Type::FIXED_LEN_BYTE_ARRAY, LogicalType::INTERVAL, 10),
ParquetException);
}
// ----------------------------------------------------------------------
// Group node
class TestGroupNode : public ::testing::Test {
public:
NodeVector Fields1() {
NodeVector fields;
fields.push_back(Int32("one", Repetition::REQUIRED));
fields.push_back(Int64("two"));
fields.push_back(Double("three"));
return fields;
}
};
TEST_F(TestGroupNode, Attrs) {
NodeVector fields = Fields1();
GroupNode node1("foo", Repetition::REPEATED, fields);
GroupNode node2("bar", Repetition::OPTIONAL, fields, LogicalType::LIST);
ASSERT_EQ("foo", node1.name());
ASSERT_TRUE(node1.is_group());
ASSERT_FALSE(node1.is_primitive());
ASSERT_EQ(fields.size(), node1.field_count());
ASSERT_TRUE(node1.is_repeated());
ASSERT_TRUE(node2.is_optional());
ASSERT_EQ(Repetition::REPEATED, node1.repetition());
ASSERT_EQ(Repetition::OPTIONAL, node2.repetition());
ASSERT_EQ(Node::GROUP, node1.node_type());
// logical types
ASSERT_EQ(LogicalType::NONE, node1.logical_type());
ASSERT_EQ(LogicalType::LIST, node2.logical_type());
}
TEST_F(TestGroupNode, Equals) {
NodeVector f1 = Fields1();
NodeVector f2 = Fields1();
GroupNode group1("group", Repetition::REPEATED, f1);
GroupNode group2("group", Repetition::REPEATED, f2);
GroupNode group3("group2", Repetition::REPEATED, f2);
// This is copied in the GroupNode ctor, so this is okay
f2.push_back(Float("four", Repetition::OPTIONAL));
GroupNode group4("group", Repetition::REPEATED, f2);
GroupNode group5("group", Repetition::REPEATED, Fields1());
ASSERT_TRUE(group1.Equals(&group1));
ASSERT_TRUE(group1.Equals(&group2));
ASSERT_FALSE(group1.Equals(&group3));
ASSERT_FALSE(group1.Equals(&group4));
ASSERT_FALSE(group5.Equals(&group4));
}
TEST_F(TestGroupNode, FieldIndex) {
NodeVector fields = Fields1();
GroupNode group("group", Repetition::REQUIRED, fields);
for (size_t i = 0; i < fields.size(); i++) {
auto field = group.field(static_cast<int>(i));
ASSERT_EQ(i, group.FieldIndex(*field.get()));
}
// Test a non field node
auto non_field_alien = Int32("alien", Repetition::REQUIRED); // other name
auto non_field_familiar = Int32("one", Repetition::REPEATED); // other node
ASSERT_TRUE(group.FieldIndex(*non_field_alien.get()) < 0);
ASSERT_TRUE(group.FieldIndex(*non_field_familiar.get()) < 0);
}
// ----------------------------------------------------------------------
// Test convert group
class TestSchemaConverter : public ::testing::Test {
public:
void setUp() { name_ = "parquet_schema"; }
void Convert(const parquet::format::SchemaElement* elements, int length) {
FlatSchemaConverter converter(elements, length);
node_ = converter.Convert();
ASSERT_TRUE(node_->is_group());
group_ = static_cast<const GroupNode*>(node_.get());
}
protected:
std::string name_;
const GroupNode* group_;
std::unique_ptr<Node> node_;
};
bool check_for_parent_consistency(const GroupNode* node) {
// Each node should have the group as parent
for (int i = 0; i < node->field_count(); i++) {
const NodePtr& field = node->field(i);
if (field->parent() != node) {
return false;
}
if (field->is_group()) {
const GroupNode* group = static_cast<GroupNode*>(field.get());
if (!check_for_parent_consistency(group)) {
return false;
}
}
}
return true;
}
TEST_F(TestSchemaConverter, NestedExample) {
SchemaElement elt;
std::vector<SchemaElement> elements;
elements.push_back(NewGroup(name_, FieldRepetitionType::REPEATED, 2, 0));
// A primitive one
elements.push_back(
NewPrimitive("a", FieldRepetitionType::REQUIRED, format::Type::INT32, 1));
// A group
elements.push_back(NewGroup("bag", FieldRepetitionType::OPTIONAL, 1, 2));
// 3-level list encoding, by hand
elt = NewGroup("b", FieldRepetitionType::REPEATED, 1, 3);
elt.__set_converted_type(ConvertedType::LIST);
elements.push_back(elt);
elements.push_back(
NewPrimitive("item", FieldRepetitionType::OPTIONAL, format::Type::INT64, 4));
Convert(&elements[0], static_cast<int>(elements.size()));
// Construct the expected schema
NodeVector fields;
fields.push_back(Int32("a", Repetition::REQUIRED));
// 3-level list encoding
NodePtr item = Int64("item");
NodePtr list(GroupNode::Make("b", Repetition::REPEATED, {item}, LogicalType::LIST));
NodePtr bag(GroupNode::Make("bag", Repetition::OPTIONAL, {list}));
fields.push_back(bag);
NodePtr schema = GroupNode::Make(name_, Repetition::REPEATED, fields);
ASSERT_TRUE(schema->Equals(group_));
// Check that the parent relationship in each node is consitent
ASSERT_EQ(group_->parent(), nullptr);
ASSERT_TRUE(check_for_parent_consistency(group_));
}
TEST_F(TestSchemaConverter, InvalidRoot) {
// According to the Parquet specification, the first element in the
// list<SchemaElement> is a group whose children (and their descendants)
// contain all of the rest of the flattened schema elements. If the first
// element is not a group, it is a malformed Parquet file.
SchemaElement elements[2];
elements[0] =
NewPrimitive("not-a-group", FieldRepetitionType::REQUIRED, format::Type::INT32, 0);
ASSERT_THROW(Convert(elements, 2), ParquetException);
// While the Parquet spec indicates that the root group should have REPEATED
// repetition type, some implementations may return REQUIRED or OPTIONAL
// groups as the first element. These tests check that this is okay as a
// practicality matter.
elements[0] = NewGroup("not-repeated", FieldRepetitionType::REQUIRED, 1, 0);
elements[1] = NewPrimitive("a", FieldRepetitionType::REQUIRED, format::Type::INT32, 1);
Convert(elements, 2);
elements[0] = NewGroup("not-repeated", FieldRepetitionType::OPTIONAL, 1, 0);
Convert(elements, 2);
}
TEST_F(TestSchemaConverter, NotEnoughChildren) {
// Throw a ParquetException, but don't core dump or anything
SchemaElement elt;
std::vector<SchemaElement> elements;
elements.push_back(NewGroup(name_, FieldRepetitionType::REPEATED, 2, 0));
ASSERT_THROW(Convert(&elements[0], 1), ParquetException);
}
// ----------------------------------------------------------------------
// Schema tree flatten / unflatten
class TestSchemaFlatten : public ::testing::Test {
public:
void setUp() { name_ = "parquet_schema"; }
void Flatten(const GroupNode* schema) { ToParquet(schema, &elements_); }
protected:
std::string name_;
std::vector<format::SchemaElement> elements_;
};
TEST_F(TestSchemaFlatten, DecimalMetadata) {
// Checks that DecimalMetadata is only set for DecimalTypes
NodePtr node = PrimitiveNode::Make("decimal", Repetition::REQUIRED, Type::INT64,
LogicalType::DECIMAL, -1, 8, 4);
NodePtr group =
GroupNode::Make("group", Repetition::REPEATED, {node}, LogicalType::LIST);
Flatten(reinterpret_cast<GroupNode*>(group.get()));
ASSERT_EQ("decimal", elements_[1].name);
ASSERT_TRUE(elements_[1].__isset.precision);
ASSERT_TRUE(elements_[1].__isset.scale);
elements_.clear();
// Not for integers with no logical type
group =
GroupNode::Make("group", Repetition::REPEATED, {Int64("int64")}, LogicalType::LIST);
Flatten(reinterpret_cast<GroupNode*>(group.get()));
ASSERT_EQ("int64", elements_[1].name);
ASSERT_FALSE(elements_[0].__isset.precision);
ASSERT_FALSE(elements_[0].__isset.scale);
}
TEST_F(TestSchemaFlatten, NestedExample) {
SchemaElement elt;
std::vector<SchemaElement> elements;
elements.push_back(NewGroup(name_, FieldRepetitionType::REPEATED, 2, 0));
// A primitive one
elements.push_back(
NewPrimitive("a", FieldRepetitionType::REQUIRED, format::Type::INT32, 1));
// A group
elements.push_back(NewGroup("bag", FieldRepetitionType::OPTIONAL, 1, 2));
// 3-level list encoding, by hand
elt = NewGroup("b", FieldRepetitionType::REPEATED, 1, 3);
elt.__set_converted_type(ConvertedType::LIST);
elements.push_back(elt);
elements.push_back(
NewPrimitive("item", FieldRepetitionType::OPTIONAL, format::Type::INT64, 4));
// Construct the schema
NodeVector fields;
fields.push_back(Int32("a", Repetition::REQUIRED));
// 3-level list encoding
NodePtr item = Int64("item");
NodePtr list(GroupNode::Make("b", Repetition::REPEATED, {item}, LogicalType::LIST));
NodePtr bag(GroupNode::Make("bag", Repetition::OPTIONAL, {list}));
fields.push_back(bag);
NodePtr schema = GroupNode::Make(name_, Repetition::REPEATED, fields);
Flatten(static_cast<GroupNode*>(schema.get()));
ASSERT_EQ(elements_.size(), elements.size());
for (size_t i = 0; i < elements_.size(); i++) {
ASSERT_EQ(elements_[i], elements[i]);
}
}
TEST(TestColumnDescriptor, TestAttrs) {
NodePtr node = PrimitiveNode::Make("name", Repetition::OPTIONAL, Type::BYTE_ARRAY,
LogicalType::UTF8);
ColumnDescriptor descr(node, 4, 1);
ASSERT_EQ("name", descr.name());
ASSERT_EQ(4, descr.max_definition_level());
ASSERT_EQ(1, descr.max_repetition_level());
ASSERT_EQ(Type::BYTE_ARRAY, descr.physical_type());
ASSERT_EQ(-1, descr.type_length());
// Test FIXED_LEN_BYTE_ARRAY
node = PrimitiveNode::Make("name", Repetition::OPTIONAL, Type::FIXED_LEN_BYTE_ARRAY,
LogicalType::DECIMAL, 12, 10, 4);
descr = ColumnDescriptor(node, 4, 1);
ASSERT_EQ(Type::FIXED_LEN_BYTE_ARRAY, descr.physical_type());
ASSERT_EQ(12, descr.type_length());
}
class TestSchemaDescriptor : public ::testing::Test {
public:
void setUp() {}
protected:
SchemaDescriptor descr_;
};
TEST_F(TestSchemaDescriptor, InitNonGroup) {
NodePtr node = PrimitiveNode::Make("field", Repetition::OPTIONAL, Type::INT32);
ASSERT_THROW(descr_.Init(node), ParquetException);
}
TEST_F(TestSchemaDescriptor, Equals) {
NodePtr schema;
NodePtr inta = Int32("a", Repetition::REQUIRED);
NodePtr intb = Int64("b", Repetition::OPTIONAL);
NodePtr intb2 = Int64("b2", Repetition::OPTIONAL);
NodePtr intc = ByteArray("c", Repetition::REPEATED);
NodePtr item1 = Int64("item1", Repetition::REQUIRED);
NodePtr item2 = Boolean("item2", Repetition::OPTIONAL);
NodePtr item3 = Int32("item3", Repetition::REPEATED);
NodePtr list(GroupNode::Make("records", Repetition::REPEATED, {item1, item2, item3},
LogicalType::LIST));
NodePtr bag(GroupNode::Make("bag", Repetition::OPTIONAL, {list}));
NodePtr bag2(GroupNode::Make("bag", Repetition::REQUIRED, {list}));
SchemaDescriptor descr1;
descr1.Init(GroupNode::Make("schema", Repetition::REPEATED, {inta, intb, intc, bag}));
ASSERT_TRUE(descr1.Equals(descr1));
SchemaDescriptor descr2;
descr2.Init(GroupNode::Make("schema", Repetition::REPEATED, {inta, intb, intc, bag2}));
ASSERT_FALSE(descr1.Equals(descr2));
SchemaDescriptor descr3;
descr3.Init(GroupNode::Make("schema", Repetition::REPEATED, {inta, intb2, intc, bag}));
ASSERT_FALSE(descr1.Equals(descr3));
// Robust to name of parent node
SchemaDescriptor descr4;
descr4.Init(GroupNode::Make("SCHEMA", Repetition::REPEATED, {inta, intb, intc, bag}));
ASSERT_TRUE(descr1.Equals(descr4));
SchemaDescriptor descr5;
descr5.Init(
GroupNode::Make("schema", Repetition::REPEATED, {inta, intb, intc, bag, intb2}));
ASSERT_FALSE(descr1.Equals(descr5));
// Different max repetition / definition levels
ColumnDescriptor col1(inta, 5, 1);
ColumnDescriptor col2(inta, 6, 1);
ColumnDescriptor col3(inta, 5, 2);
ASSERT_TRUE(col1.Equals(col1));
ASSERT_FALSE(col1.Equals(col2));
ASSERT_FALSE(col1.Equals(col3));
}
TEST_F(TestSchemaDescriptor, BuildTree) {
NodeVector fields;
NodePtr schema;
NodePtr inta = Int32("a", Repetition::REQUIRED);
fields.push_back(inta);
fields.push_back(Int64("b", Repetition::OPTIONAL));
fields.push_back(ByteArray("c", Repetition::REPEATED));
// 3-level list encoding
NodePtr item1 = Int64("item1", Repetition::REQUIRED);
NodePtr item2 = Boolean("item2", Repetition::OPTIONAL);
NodePtr item3 = Int32("item3", Repetition::REPEATED);
NodePtr list(GroupNode::Make("records", Repetition::REPEATED, {item1, item2, item3},
LogicalType::LIST));
NodePtr bag(GroupNode::Make("bag", Repetition::OPTIONAL, {list}));
fields.push_back(bag);
schema = GroupNode::Make("schema", Repetition::REPEATED, fields);
descr_.Init(schema);
int nleaves = 6;
// 6 leaves
ASSERT_EQ(nleaves, descr_.num_columns());
// mdef mrep
// required int32 a 0 0
// optional int64 b 1 0
// repeated byte_array c 1 1
// optional group bag 1 0
// repeated group records 2 1
// required int64 item1 2 1
// optional boolean item2 3 1
// repeated int32 item3 3 2
int16_t ex_max_def_levels[6] = {0, 1, 1, 2, 3, 3};
int16_t ex_max_rep_levels[6] = {0, 0, 1, 1, 1, 2};
for (int i = 0; i < nleaves; ++i) {
const ColumnDescriptor* col = descr_.Column(i);
EXPECT_EQ(ex_max_def_levels[i], col->max_definition_level()) << i;
EXPECT_EQ(ex_max_rep_levels[i], col->max_repetition_level()) << i;
}
ASSERT_EQ(descr_.Column(0)->path()->ToDotString(), "a");
ASSERT_EQ(descr_.Column(1)->path()->ToDotString(), "b");
ASSERT_EQ(descr_.Column(2)->path()->ToDotString(), "c");
ASSERT_EQ(descr_.Column(3)->path()->ToDotString(), "bag.records.item1");
ASSERT_EQ(descr_.Column(4)->path()->ToDotString(), "bag.records.item2");
ASSERT_EQ(descr_.Column(5)->path()->ToDotString(), "bag.records.item3");
for (int i = 0; i < nleaves; ++i) {
auto col = descr_.Column(i);
ASSERT_EQ(i, descr_.ColumnIndex(*col->schema_node().get()));
}
// Test non-column nodes find
NodePtr non_column_alien = Int32("alien", Repetition::REQUIRED); // other path
NodePtr non_column_familiar = Int32("a", Repetition::REPEATED); // other node
ASSERT_TRUE(descr_.ColumnIndex(*non_column_alien.get()) < 0);
ASSERT_TRUE(descr_.ColumnIndex(*non_column_familiar.get()) < 0);
ASSERT_EQ(inta.get(), descr_.GetColumnRoot(0).get());
ASSERT_EQ(bag.get(), descr_.GetColumnRoot(3).get());
ASSERT_EQ(bag.get(), descr_.GetColumnRoot(4).get());
ASSERT_EQ(bag.get(), descr_.GetColumnRoot(5).get());
ASSERT_EQ(schema.get(), descr_.group_node());
// Init clears the leaves
descr_.Init(schema);
ASSERT_EQ(nleaves, descr_.num_columns());
}
static std::string Print(const NodePtr& node) {
std::stringstream ss;
PrintSchema(node.get(), ss);
return ss.str();
}
TEST(TestSchemaPrinter, Examples) {
// Test schema 1
NodeVector fields;
fields.push_back(Int32("a", Repetition::REQUIRED));
// 3-level list encoding
NodePtr item1 = Int64("item1");
NodePtr item2 = Boolean("item2", Repetition::REQUIRED);
NodePtr list(
GroupNode::Make("b", Repetition::REPEATED, {item1, item2}, LogicalType::LIST));
NodePtr bag(GroupNode::Make("bag", Repetition::OPTIONAL, {list}));
fields.push_back(bag);
fields.push_back(PrimitiveNode::Make("c", Repetition::REQUIRED, Type::INT32,
LogicalType::DECIMAL, -1, 3, 2));
NodePtr schema = GroupNode::Make("schema", Repetition::REPEATED, fields);
std::string result = Print(schema);
std::string expected = R"(message schema {
required int32 a;
optional group bag {
repeated group b (LIST) {
optional int64 item1;
required boolean item2;
}
}
required int32 c (DECIMAL(3,2));
}
)";
ASSERT_EQ(expected, result);
}
} // namespace schema
} // namespace parquet
| {
"content_hash": "bd085c008893470651b1549b0ec59331",
"timestamp": "",
"source": "github",
"line_count": 711,
"max_line_length": 90,
"avg_line_length": 35.139240506329116,
"alnum_prop": 0.6503362151777138,
"repo_name": "itaiin/parquet-cpp",
"id": "faacb76b4db07327b346c2f9ef1be7c438bdc46e",
"size": "26063",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/parquet/schema-test.cc",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "1865"
},
{
"name": "C",
"bytes": "6814"
},
{
"name": "C++",
"bytes": "843249"
},
{
"name": "CMake",
"bytes": "84367"
},
{
"name": "Perl",
"bytes": "4010"
},
{
"name": "Python",
"bytes": "14691"
},
{
"name": "Ruby",
"bytes": "4368"
},
{
"name": "Shell",
"bytes": "32991"
},
{
"name": "Thrift",
"bytes": "19611"
}
],
"symlink_target": ""
} |
/**
* @addtogroup t_fifo
* @{
* @defgroup t_fifo_api test_fifo_api
* @}
*/
#include <ztest.h>
extern void test_fifo_thread2thread(void);
extern void test_fifo_thread2isr(void);
extern void test_fifo_isr2thread(void);
extern void test_fifo_get_fail(void);
extern void test_fifo_loop(void);
extern void test_fifo_cancel_wait(void);
extern void test_fifo_is_empty_thread(void);
extern void test_fifo_is_empty_isr(void);
/*test case main entry*/
void test_main(void)
{
ztest_test_suite(test_fifo_api,
ztest_unit_test(test_fifo_thread2thread),
ztest_unit_test(test_fifo_thread2isr),
ztest_unit_test(test_fifo_isr2thread),
ztest_unit_test(test_fifo_get_fail),
ztest_unit_test(test_fifo_loop),
ztest_unit_test(test_fifo_cancel_wait),
ztest_unit_test(test_fifo_is_empty_thread),
ztest_unit_test(test_fifo_is_empty_isr));
ztest_run_test_suite(test_fifo_api);
}
| {
"content_hash": "2dad68f83d4475c5e42b81b1aceae8dd",
"timestamp": "",
"source": "github",
"line_count": 33,
"max_line_length": 47,
"avg_line_length": 27.12121212121212,
"alnum_prop": 0.7139664804469273,
"repo_name": "runchip/zephyr-cc3220",
"id": "4caaee8dc266b68d59f84142e530376bba5fe74a",
"size": "983",
"binary": false,
"copies": "3",
"ref": "refs/heads/led_demo",
"path": "tests/kernel/fifo/fifo_api/src/main.c",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Assembly",
"bytes": "314143"
},
{
"name": "C",
"bytes": "178828124"
},
{
"name": "C++",
"bytes": "1255550"
},
{
"name": "Lex",
"bytes": "11299"
},
{
"name": "Makefile",
"bytes": "191649"
},
{
"name": "Objective-C",
"bytes": "16327"
},
{
"name": "Perl",
"bytes": "269076"
},
{
"name": "Python",
"bytes": "232505"
},
{
"name": "Shell",
"bytes": "57437"
},
{
"name": "Verilog",
"bytes": "1449"
},
{
"name": "Yacc",
"bytes": "15396"
}
],
"symlink_target": ""
} |
/*
* This code was generated by
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
*
* Twilio - Preview
* This is the public Twilio REST API.
*
* NOTE: This class is auto generated by OpenAPI Generator.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
namespace Twilio.Rest.Preview.DeployedDevices.Fleet
{
public class KeyResource : Resource
{
private static Request BuildCreateRequest(CreateKeyOptions options, ITwilioRestClient client)
{
string path = "/DeployedDevices/Fleets/{FleetSid}/Keys";
string PathFleetSid = options.PathFleetSid;
path = path.Replace("{"+"FleetSid"+"}", PathFleetSid);
return new Request(
HttpMethod.Post,
Rest.Domain.Preview,
path,
postParams: options.GetParams(),
headerParams: null
);
}
/// <summary> Create a new Key credential in the Fleet, optionally giving it a friendly name and assigning to a Device. </summary>
/// <param name="options"> Create Key parameters </param>
/// <param name="client"> Client to make requests to Twilio </param>
/// <returns> A single instance of Key </returns>
public static KeyResource Create(CreateKeyOptions options, ITwilioRestClient client = null)
{
client = client ?? TwilioClient.GetRestClient();
var response = client.Request(BuildCreateRequest(options, client));
return FromJson(response.Content);
}
#if !NET35
/// <summary> Create a new Key credential in the Fleet, optionally giving it a friendly name and assigning to a Device. </summary>
/// <param name="options"> Create Key parameters </param>
/// <param name="client"> Client to make requests to Twilio </param>
/// <returns> Task that resolves to A single instance of Key </returns>
public static async System.Threading.Tasks.Task<KeyResource> CreateAsync(CreateKeyOptions options,
ITwilioRestClient client = null)
{
client = client ?? TwilioClient.GetRestClient();
var response = await client.RequestAsync(BuildCreateRequest(options, client));
return FromJson(response.Content);
}
#endif
/// <summary> Create a new Key credential in the Fleet, optionally giving it a friendly name and assigning to a Device. </summary>
/// <param name="pathFleetSid"> </param>
/// <param name="friendlyName"> Provides a human readable descriptive text for this Key credential, up to 256 characters long. </param>
/// <param name="deviceSid"> Provides the unique string identifier of an existing Device to become authenticated with this Key credential. </param>
/// <param name="client"> Client to make requests to Twilio </param>
/// <returns> A single instance of Key </returns>
public static KeyResource Create(
string pathFleetSid,
string friendlyName = null,
string deviceSid = null,
ITwilioRestClient client = null)
{
var options = new CreateKeyOptions(pathFleetSid){ FriendlyName = friendlyName, DeviceSid = deviceSid };
return Create(options, client);
}
#if !NET35
/// <summary> Create a new Key credential in the Fleet, optionally giving it a friendly name and assigning to a Device. </summary>
/// <param name="pathFleetSid"> </param>
/// <param name="friendlyName"> Provides a human readable descriptive text for this Key credential, up to 256 characters long. </param>
/// <param name="deviceSid"> Provides the unique string identifier of an existing Device to become authenticated with this Key credential. </param>
/// <param name="client"> Client to make requests to Twilio </param>
/// <returns> Task that resolves to A single instance of Key </returns>
public static async System.Threading.Tasks.Task<KeyResource> CreateAsync(
string pathFleetSid,
string friendlyName = null,
string deviceSid = null,
ITwilioRestClient client = null)
{
var options = new CreateKeyOptions(pathFleetSid){ FriendlyName = friendlyName, DeviceSid = deviceSid };
return await CreateAsync(options, client);
}
#endif
/// <summary> Delete a specific Key credential from the Fleet, effectively disallowing any inbound client connections that are presenting it. </summary>
/// <param name="options"> Delete Key parameters </param>
/// <param name="client"> Client to make requests to Twilio </param>
/// <returns> A single instance of Key </returns>
private static Request BuildDeleteRequest(DeleteKeyOptions options, ITwilioRestClient client)
{
string path = "/DeployedDevices/Fleets/{FleetSid}/Keys/{Sid}";
string PathFleetSid = options.PathFleetSid;
path = path.Replace("{"+"FleetSid"+"}", PathFleetSid);
string PathSid = options.PathSid;
path = path.Replace("{"+"Sid"+"}", PathSid);
return new Request(
HttpMethod.Delete,
Rest.Domain.Preview,
path,
queryParams: options.GetParams(),
headerParams: null
);
}
/// <summary> Delete a specific Key credential from the Fleet, effectively disallowing any inbound client connections that are presenting it. </summary>
/// <param name="options"> Delete Key parameters </param>
/// <param name="client"> Client to make requests to Twilio </param>
/// <returns> A single instance of Key </returns>
public static bool Delete(DeleteKeyOptions options, ITwilioRestClient client = null)
{
client = client ?? TwilioClient.GetRestClient();
var response = client.Request(BuildDeleteRequest(options, client));
return response.StatusCode == System.Net.HttpStatusCode.NoContent;
}
#if !NET35
/// <summary> Delete a specific Key credential from the Fleet, effectively disallowing any inbound client connections that are presenting it. </summary>
/// <param name="options"> Delete Key parameters </param>
/// <param name="client"> Client to make requests to Twilio </param>
/// <returns> Task that resolves to A single instance of Key </returns>
public static async System.Threading.Tasks.Task<bool> DeleteAsync(DeleteKeyOptions options,
ITwilioRestClient client = null)
{
client = client ?? TwilioClient.GetRestClient();
var response = await client.RequestAsync(BuildDeleteRequest(options, client));
return response.StatusCode == System.Net.HttpStatusCode.NoContent;
}
#endif
/// <summary> Delete a specific Key credential from the Fleet, effectively disallowing any inbound client connections that are presenting it. </summary>
/// <param name="pathFleetSid"> </param>
/// <param name="pathSid"> Provides a 34 character string that uniquely identifies the requested Key credential resource. </param>
/// <param name="client"> Client to make requests to Twilio </param>
/// <returns> A single instance of Key </returns>
public static bool Delete(string pathFleetSid, string pathSid, ITwilioRestClient client = null)
{
var options = new DeleteKeyOptions(pathFleetSid, pathSid) ;
return Delete(options, client);
}
#if !NET35
/// <summary> Delete a specific Key credential from the Fleet, effectively disallowing any inbound client connections that are presenting it. </summary>
/// <param name="pathFleetSid"> </param>
/// <param name="pathSid"> Provides a 34 character string that uniquely identifies the requested Key credential resource. </param>
/// <param name="client"> Client to make requests to Twilio </param>
/// <returns> Task that resolves to A single instance of Key </returns>
public static async System.Threading.Tasks.Task<bool> DeleteAsync(string pathFleetSid, string pathSid, ITwilioRestClient client = null)
{
var options = new DeleteKeyOptions(pathFleetSid, pathSid) ;
return await DeleteAsync(options, client);
}
#endif
private static Request BuildFetchRequest(FetchKeyOptions options, ITwilioRestClient client)
{
string path = "/DeployedDevices/Fleets/{FleetSid}/Keys/{Sid}";
string PathFleetSid = options.PathFleetSid;
path = path.Replace("{"+"FleetSid"+"}", PathFleetSid);
string PathSid = options.PathSid;
path = path.Replace("{"+"Sid"+"}", PathSid);
return new Request(
HttpMethod.Get,
Rest.Domain.Preview,
path,
queryParams: options.GetParams(),
headerParams: null
);
}
/// <summary> Fetch information about a specific Key credential in the Fleet. </summary>
/// <param name="options"> Fetch Key parameters </param>
/// <param name="client"> Client to make requests to Twilio </param>
/// <returns> A single instance of Key </returns>
public static KeyResource Fetch(FetchKeyOptions options, ITwilioRestClient client = null)
{
client = client ?? TwilioClient.GetRestClient();
var response = client.Request(BuildFetchRequest(options, client));
return FromJson(response.Content);
}
#if !NET35
/// <summary> Fetch information about a specific Key credential in the Fleet. </summary>
/// <param name="options"> Fetch Key parameters </param>
/// <param name="client"> Client to make requests to Twilio </param>
/// <returns> Task that resolves to A single instance of Key </returns>
public static async System.Threading.Tasks.Task<KeyResource> FetchAsync(FetchKeyOptions options,
ITwilioRestClient client = null)
{
client = client ?? TwilioClient.GetRestClient();
var response = await client.RequestAsync(BuildFetchRequest(options, client));
return FromJson(response.Content);
}
#endif
/// <summary> Fetch information about a specific Key credential in the Fleet. </summary>
/// <param name="pathFleetSid"> </param>
/// <param name="pathSid"> Provides a 34 character string that uniquely identifies the requested Key credential resource. </param>
/// <param name="client"> Client to make requests to Twilio </param>
/// <returns> A single instance of Key </returns>
public static KeyResource Fetch(
string pathFleetSid,
string pathSid,
ITwilioRestClient client = null)
{
var options = new FetchKeyOptions(pathFleetSid, pathSid){ };
return Fetch(options, client);
}
#if !NET35
/// <summary> Fetch information about a specific Key credential in the Fleet. </summary>
/// <param name="pathFleetSid"> </param>
/// <param name="pathSid"> Provides a 34 character string that uniquely identifies the requested Key credential resource. </param>
/// <param name="client"> Client to make requests to Twilio </param>
/// <returns> Task that resolves to A single instance of Key </returns>
public static async System.Threading.Tasks.Task<KeyResource> FetchAsync(string pathFleetSid, string pathSid, ITwilioRestClient client = null)
{
var options = new FetchKeyOptions(pathFleetSid, pathSid){ };
return await FetchAsync(options, client);
}
#endif
private static Request BuildReadRequest(ReadKeyOptions options, ITwilioRestClient client)
{
string path = "/DeployedDevices/Fleets/{FleetSid}/Keys";
string PathFleetSid = options.PathFleetSid;
path = path.Replace("{"+"FleetSid"+"}", PathFleetSid);
return new Request(
HttpMethod.Get,
Rest.Domain.Preview,
path,
queryParams: options.GetParams(),
headerParams: null
);
}
/// <summary> Retrieve a list of all Keys credentials belonging to the Fleet. </summary>
/// <param name="options"> Read Key parameters </param>
/// <param name="client"> Client to make requests to Twilio </param>
/// <returns> A single instance of Key </returns>
public static ResourceSet<KeyResource> Read(ReadKeyOptions options, ITwilioRestClient client = null)
{
client = client ?? TwilioClient.GetRestClient();
var response = client.Request(BuildReadRequest(options, client));
var page = Page<KeyResource>.FromJson("keys", response.Content);
return new ResourceSet<KeyResource>(page, options, client);
}
#if !NET35
/// <summary> Retrieve a list of all Keys credentials belonging to the Fleet. </summary>
/// <param name="options"> Read Key parameters </param>
/// <param name="client"> Client to make requests to Twilio </param>
/// <returns> Task that resolves to A single instance of Key </returns>
public static async System.Threading.Tasks.Task<ResourceSet<KeyResource>> ReadAsync(ReadKeyOptions options,
ITwilioRestClient client = null)
{
client = client ?? TwilioClient.GetRestClient();
var response = await client.RequestAsync(BuildReadRequest(options, client));
var page = Page<KeyResource>.FromJson("keys", response.Content);
return new ResourceSet<KeyResource>(page, options, client);
}
#endif
/// <summary> Retrieve a list of all Keys credentials belonging to the Fleet. </summary>
/// <param name="pathFleetSid"> </param>
/// <param name="deviceSid"> Filters the resulting list of Keys by a unique string identifier of an authenticated Device. </param>
/// <param name="pageSize"> How many resources to return in each list page. The default is 50, and the maximum is 1000. </param>
/// <param name="client"> Client to make requests to Twilio </param>
/// <param name="limit"> Record limit </param>
/// <returns> A single instance of Key </returns>
public static ResourceSet<KeyResource> Read(
string pathFleetSid,
string deviceSid = null,
int? pageSize = null,
long? limit = null,
ITwilioRestClient client = null)
{
var options = new ReadKeyOptions(pathFleetSid){ DeviceSid = deviceSid, PageSize = pageSize, Limit = limit};
return Read(options, client);
}
#if !NET35
/// <summary> Retrieve a list of all Keys credentials belonging to the Fleet. </summary>
/// <param name="pathFleetSid"> </param>
/// <param name="deviceSid"> Filters the resulting list of Keys by a unique string identifier of an authenticated Device. </param>
/// <param name="pageSize"> How many resources to return in each list page. The default is 50, and the maximum is 1000. </param>
/// <param name="client"> Client to make requests to Twilio </param>
/// <param name="limit"> Record limit </param>
/// <returns> Task that resolves to A single instance of Key </returns>
public static async System.Threading.Tasks.Task<ResourceSet<KeyResource>> ReadAsync(
string pathFleetSid,
string deviceSid = null,
int? pageSize = null,
long? limit = null,
ITwilioRestClient client = null)
{
var options = new ReadKeyOptions(pathFleetSid){ DeviceSid = deviceSid, PageSize = pageSize, Limit = limit};
return await ReadAsync(options, client);
}
#endif
/// <summary> Fetch the target page of records </summary>
/// <param name="targetUrl"> API-generated URL for the requested results page </param>
/// <param name="client"> Client to make requests to Twilio </param>
/// <returns> The target page of records </returns>
public static Page<KeyResource> GetPage(string targetUrl, ITwilioRestClient client)
{
client = client ?? TwilioClient.GetRestClient();
var request = new Request(
HttpMethod.Get,
targetUrl
);
var response = client.Request(request);
return Page<KeyResource>.FromJson("keys", response.Content);
}
/// <summary> Fetch the next page of records </summary>
/// <param name="page"> current page of records </param>
/// <param name="client"> Client to make requests to Twilio </param>
/// <returns> The next page of records </returns>
public static Page<KeyResource> NextPage(Page<KeyResource> page, ITwilioRestClient client)
{
var request = new Request(
HttpMethod.Get,
page.GetNextPageUrl(Rest.Domain.Api)
);
var response = client.Request(request);
return Page<KeyResource>.FromJson("keys", response.Content);
}
/// <summary> Fetch the previous page of records </summary>
/// <param name="page"> current page of records </param>
/// <param name="client"> Client to make requests to Twilio </param>
/// <returns> The previous page of records </returns>
public static Page<KeyResource> PreviousPage(Page<KeyResource> page, ITwilioRestClient client)
{
var request = new Request(
HttpMethod.Get,
page.GetPreviousPageUrl(Rest.Domain.Api)
);
var response = client.Request(request);
return Page<KeyResource>.FromJson("keys", response.Content);
}
private static Request BuildUpdateRequest(UpdateKeyOptions options, ITwilioRestClient client)
{
string path = "/DeployedDevices/Fleets/{FleetSid}/Keys/{Sid}";
string PathFleetSid = options.PathFleetSid;
path = path.Replace("{"+"FleetSid"+"}", PathFleetSid);
string PathSid = options.PathSid;
path = path.Replace("{"+"Sid"+"}", PathSid);
return new Request(
HttpMethod.Post,
Rest.Domain.Preview,
path,
postParams: options.GetParams(),
headerParams: null
);
}
/// <summary> Update the given properties of a specific Key credential in the Fleet, giving it a friendly name or assigning to a Device. </summary>
/// <param name="options"> Update Key parameters </param>
/// <param name="client"> Client to make requests to Twilio </param>
/// <returns> A single instance of Key </returns>
public static KeyResource Update(UpdateKeyOptions options, ITwilioRestClient client = null)
{
client = client ?? TwilioClient.GetRestClient();
var response = client.Request(BuildUpdateRequest(options, client));
return FromJson(response.Content);
}
/// <summary> Update the given properties of a specific Key credential in the Fleet, giving it a friendly name or assigning to a Device. </summary>
/// <param name="options"> Update Key parameters </param>
/// <param name="client"> Client to make requests to Twilio </param>
/// <returns> Task that resolves to A single instance of Key </returns>
#if !NET35
public static async System.Threading.Tasks.Task<KeyResource> UpdateAsync(UpdateKeyOptions options,
ITwilioRestClient client = null)
{
client = client ?? TwilioClient.GetRestClient();
var response = await client.RequestAsync(BuildUpdateRequest(options, client));
return FromJson(response.Content);
}
#endif
/// <summary> Update the given properties of a specific Key credential in the Fleet, giving it a friendly name or assigning to a Device. </summary>
/// <param name="pathFleetSid"> </param>
/// <param name="pathSid"> Provides a 34 character string that uniquely identifies the requested Key credential resource. </param>
/// <param name="friendlyName"> Provides a human readable descriptive text for this Key credential, up to 256 characters long. </param>
/// <param name="deviceSid"> Provides the unique string identifier of an existing Device to become authenticated with this Key credential. </param>
/// <param name="client"> Client to make requests to Twilio </param>
/// <returns> A single instance of Key </returns>
public static KeyResource Update(
string pathFleetSid,
string pathSid,
string friendlyName = null,
string deviceSid = null,
ITwilioRestClient client = null)
{
var options = new UpdateKeyOptions(pathFleetSid, pathSid){ FriendlyName = friendlyName, DeviceSid = deviceSid };
return Update(options, client);
}
#if !NET35
/// <summary> Update the given properties of a specific Key credential in the Fleet, giving it a friendly name or assigning to a Device. </summary>
/// <param name="pathFleetSid"> </param>
/// <param name="pathSid"> Provides a 34 character string that uniquely identifies the requested Key credential resource. </param>
/// <param name="friendlyName"> Provides a human readable descriptive text for this Key credential, up to 256 characters long. </param>
/// <param name="deviceSid"> Provides the unique string identifier of an existing Device to become authenticated with this Key credential. </param>
/// <param name="client"> Client to make requests to Twilio </param>
/// <returns> Task that resolves to A single instance of Key </returns>
public static async System.Threading.Tasks.Task<KeyResource> UpdateAsync(
string pathFleetSid,
string pathSid,
string friendlyName = null,
string deviceSid = null,
ITwilioRestClient client = null)
{
var options = new UpdateKeyOptions(pathFleetSid, pathSid){ FriendlyName = friendlyName, DeviceSid = deviceSid };
return await UpdateAsync(options, client);
}
#endif
/// <summary>
/// Converts a JSON string into a KeyResource object
/// </summary>
/// <param name="json"> Raw JSON string </param>
/// <returns> KeyResource object represented by the provided JSON </returns>
public static KeyResource FromJson(string json)
{
try
{
return JsonConvert.DeserializeObject<KeyResource>(json);
}
catch (JsonException e)
{
throw new ApiException(e.Message, e);
}
}
///<summary> A string that uniquely identifies this Key. </summary>
[JsonProperty("sid")]
public string Sid { get; private set; }
///<summary> URL of this Key. </summary>
[JsonProperty("url")]
public Uri Url { get; private set; }
///<summary> A human readable description for this Key. </summary>
[JsonProperty("friendly_name")]
public string FriendlyName { get; private set; }
///<summary> The unique identifier of the Fleet. </summary>
[JsonProperty("fleet_sid")]
public string FleetSid { get; private set; }
///<summary> The unique SID that identifies this Account. </summary>
[JsonProperty("account_sid")]
public string AccountSid { get; private set; }
///<summary> The unique identifier of a mapped Device. </summary>
[JsonProperty("device_sid")]
public string DeviceSid { get; private set; }
///<summary> The key secret. </summary>
[JsonProperty("secret")]
public string Secret { get; private set; }
///<summary> The date this Key credential was created. </summary>
[JsonProperty("date_created")]
public DateTime? DateCreated { get; private set; }
///<summary> The date this Key credential was updated. </summary>
[JsonProperty("date_updated")]
public DateTime? DateUpdated { get; private set; }
private KeyResource() {
}
}
}
| {
"content_hash": "b6713a34fbeeecbe9d6d9625ed860b34",
"timestamp": "",
"source": "github",
"line_count": 525,
"max_line_length": 160,
"avg_line_length": 52.06666666666667,
"alnum_prop": 0.5728918968355589,
"repo_name": "twilio/twilio-csharp",
"id": "14b796cac3b16b34d6b0d26a8eee93bea0586c9b",
"size": "27335",
"binary": false,
"copies": "1",
"ref": "refs/heads/main",
"path": "src/Twilio/Rest/Preview/DeployedDevices/Fleet/KeyResource.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "13879265"
},
{
"name": "Dockerfile",
"bytes": "1137"
},
{
"name": "Makefile",
"bytes": "1970"
}
],
"symlink_target": ""
} |
package org.kaaproject.kaa.server.admin.servlet;
import java.io.IOException;
import java.net.URLDecoder;
import javax.servlet.Servlet;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.codehaus.jackson.map.ObjectMapper;
import org.kaaproject.kaa.common.dto.EndpointProfileDto;
import org.kaaproject.kaa.server.admin.shared.services.ProfileService;
import org.kaaproject.kaa.server.admin.shared.servlet.ServletParams;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.helpers.MessageFormatter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.context.support.SpringBeanAutowiringSupport;
public class ProfileDownloadServlet extends HttpServlet implements Servlet, ServletParams {
private static final long serialVersionUID = 1584721028492234643L;
/** The Constant logger. */
private static final Logger LOG = LoggerFactory.getLogger(ProfileDownloadServlet.class);
private static final int BUFFER = 1024 * 100;
private static final String JSON = "application/json";
private static final ObjectMapper FORMATTER = new ObjectMapper();
/** The Constant PROFILE_FILE_NAME_PATTERN. */
private static final String PROFILE_FILE_NAME_PATTERN = "ep-{}-{}-profile-{}.json";
@Autowired
private ProfileService profileService;
@Override
public void init(ServletConfig config) throws ServletException {
super.init(config);
SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this, config.getServletContext());
}
@Override
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String endpointKey = URLDecoder.decode(request.getParameter(ENDPOINT_KEY_PARAMETER), "UTF-8");
String profileTypeString = URLDecoder.decode(request.getParameter(PROFILE_TYPE_PARAMETER), "UTF-8");
ProfileType profileType = ProfileType.valueOf(profileTypeString);
try {
EndpointProfileDto profile = profileService.getEndpointProfileByKeyHash(endpointKey);
String json;
String fileName = MessageFormatter.arrayFormat(PROFILE_FILE_NAME_PATTERN,
new Object[] { endpointKey, profileType.name().toLowerCase(), System.currentTimeMillis() }).getMessage();
if (profileType == ProfileType.CLIENT) {
json = profile.getClientProfileBody();
} else {
json = profile.getServerProfileBody();
}
if (json == null || json.isEmpty()) {
json = "{}";
}
Object jsonObject = FORMATTER.readValue(json, Object.class);
byte[] body = FORMATTER.writerWithDefaultPrettyPrinter().writeValueAsString(jsonObject).getBytes("UTF-8");
ServletUtils.prepareDisposition(request, response, fileName);
response.setContentType(JSON);
response.setContentLength(body.length);
response.setBufferSize(BUFFER);
response.getOutputStream().write(body);
response.flushBuffer();
} catch (Exception e) {
LOG.error("Unexpected error in ProfileDownloadServlet.doGet: ", e);
response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Unable to get file: " + e.getMessage());
}
}
}
| {
"content_hash": "8df3b6d7a94ac0cb9d8a5b52d2e6d44e",
"timestamp": "",
"source": "github",
"line_count": 82,
"max_line_length": 125,
"avg_line_length": 43.31707317073171,
"alnum_prop": 0.7117117117117117,
"repo_name": "rasendubi/kaa",
"id": "69164d82d750f61bc503ce845362706825a35f04",
"size": "4158",
"binary": false,
"copies": "2",
"ref": "refs/heads/develop",
"path": "server/node/src/main/java/org/kaaproject/kaa/server/admin/servlet/ProfileDownloadServlet.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "4759"
},
{
"name": "C",
"bytes": "1439411"
},
{
"name": "C++",
"bytes": "1228537"
},
{
"name": "CMake",
"bytes": "76927"
},
{
"name": "CSS",
"bytes": "10373"
},
{
"name": "HTML",
"bytes": "6884"
},
{
"name": "Java",
"bytes": "9364830"
},
{
"name": "Makefile",
"bytes": "5541"
},
{
"name": "Nix",
"bytes": "18223"
},
{
"name": "Objective-C",
"bytes": "1224377"
},
{
"name": "Python",
"bytes": "128276"
},
{
"name": "Ruby",
"bytes": "263"
},
{
"name": "Shell",
"bytes": "92744"
},
{
"name": "Thrift",
"bytes": "10264"
},
{
"name": "XSLT",
"bytes": "4062"
}
],
"symlink_target": ""
} |
// ----------------------------------------------------------------------------
// Copyright 2006-2010, GeoTelematic Solutions, Inc.
// All rights reserved
// ----------------------------------------------------------------------------
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// ----------------------------------------------------------------------------
// Change History:
// 2007/03/25 Martin D. Flynn
// -Initial release
// 2007/06/03 Martin D. Flynn
// -Added PrivateLabel to constructor
// 2007/11/28 Martin D. Flynn
// -Added start 'address' to go with start geoPoint
// -Added stop geopoint/address to available report fields
// 2008/03/28 Martin D. Flynn
// -Added limited reporting support for devices that do not support OpenDMTP.
// 2008/05/14 Martin D. Flynn
// -Integrated Device DataTransport interface
// 2008/06/20 Martin D. Flynn
// -Added support for displaying a report 'map'.
// 2009/01/01 Martin D. Flynn
// -Added totals for drive/idle time and distance driven.
// -Added 'minimumStoppedTime' property (for simulated start/stop events only).
// -Added 'hasStartStopCodes' property to force simulated start/stop events.
// 2009/05/01 Martin D. Flynn
// -Added support for "idle" elapsed time (ignition on and not moving).
// 2009/08/07 Martin D. Flynn
// -Changed 'hasStartStopCode' to 'tripStartType'
// 2009/11/01 Martin D. Flynn
// -Added property 'stopOnIgnitionOff'
// 2010/05/24 Martin D. Flynn
// -Added idle accumulation to TRIP_ON_SPEED
// ----------------------------------------------------------------------------
package org.opengts.war.report.field;
import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
import org.opengts.util.*;
import org.opengts.dbtools.*;
import org.opengts.db.*;
import org.opengts.db.tables.*;
import org.opengts.war.tools.*;
import org.opengts.war.report.*;
public class MotionReport
extends ReportData
implements DBRecordHandler<EventData>
{
// ------------------------------------------------------------------------
// Detail report
// Multiple FieldData records per device
// 'From'/'To' date
// ------------------------------------------------------------------------
// Columns:
// index startDateTime movingElapse stopDateTime idleElapse
// ------------------------------------------------------------------------
// It would be helpful if the following items were available from the device:
// - "minimumStoppedTime"
// ------------------------------------------------------------------------
// ------------------------------------------------------------------------
// Properties
private static final String PROP_tripStartType = "tripStartType";
private static final String PROP_minimumStoppedTime = "minimumStoppedTime";
private static final String PROP_minimumSpeedKPH = "minimumSpeedKPH";
private static final String PROP_stopOnIgnitionOff = "stopOnIgnitionOff";
// ------------------------------------------------------------------------
// Trip start types
private static final String MOTION_DEFAULT[] = new String[] { "default" };
private static final String MOTION_SPEED[] = new String[] { "speed", "motion" };
private static final String MOTION_IGNITION[] = new String[] { "ignition" };
private static final String MOTION_STARTSTOP[] = new String[] { "start", "startstop" };
private static final int TRIP_ON_SPEED = 0; // idle time if ignition present
private static final int TRIP_ON_IGNITION = 1; // no idle time
private static final int TRIP_ON_START = 2; // idle time if ignition present
private static String TripTypeName(int type)
{
switch (type) {
case TRIP_ON_SPEED : return "Speed";
case TRIP_ON_IGNITION : return "Ignition";
case TRIP_ON_START : return "Start/Stop";
default : return "Unknown";
}
}
// ------------------------------------------------------------------------
/** TRIP_ON_SPEED only
*** Minimum speed used for determining in-motion when the device does not
*** support start/stop events
**/
private static final double MIN_SPEED_KPH = 5.0;
/** TRIP_ON_SPEED only
*** Default mimimum stopped elapsed time to be considered stopped
**/
private static final long MIN_STOPPED_TIME_SEC = DateTime.MinuteSeconds(5);
/**
*** Default to delimit stop with ignition off (if this occurs before the minimum stopped time)
**/
private static final boolean STOP_ON_IGNITION_OFF = false;
// ------------------------------------------------------------------------
// During TRIP_ON_SPEED trip delimiters, set this value to 'true' to reset the
// elapsed stop time accumulation to start at the point of the defined 'stop'
// which is after the minimum elapsed stopped time has passed. This does cause
// some user confustion, so if the above is unclear, leave this value 'false'.
private static final boolean SPEED_RESET_STOP_TIME = false;
// ------------------------------------------------------------------------
private static final int STATE_UNKNOWN = 0;
private static final int STATE_START = 1;
private static final int STATE_STOP = 2;
// ------------------------------------------------------------------------
// ------------------------------------------------------------------------
private int deviceCount = 0;
private int tripStartType = TRIP_ON_SPEED;
private boolean tripTypeDefault = true;
private int ignitionCodes[] = null;
private boolean isIgnitionOn = false;
private EventData lastIgnitionEvent = null;
private EventData idleStartEvent = null;
private EventData idleStopEvent = null;
private long idleAccumulator = 0L; // seconds
private boolean isInMotion = false;
private EventData lastMotionEvent = null;
private EventData pendingStopEvent = null; // TRIP_ON_SPEED only
private double minSpeedKPH = MIN_SPEED_KPH; // TRIP_ON_SPEED only
private long minStoppedTimeSec = MIN_STOPPED_TIME_SEC; // TRIP_ON_SPEED only
private boolean stopOnIgnitionOff = STOP_ON_IGNITION_OFF;
private int lastStateChange = STATE_UNKNOWN;
private long lastStartTime = 0L;
private GeoPoint lastStartPoint = null;
private String lastStartAddress = "";
private double lastStartOdometer = 0.0;
private double lastStartFuelUsed = 0.0;
private long lastStopTime = 0L;
private GeoPoint lastStopPoint = null;
private String lastStopAddress = "";
private double lastStopOdometer = 0.0;
private double lastStopFuelUsed = 0.0;
private java.util.List<FieldData> deviceDetailData = null;
private java.util.List<FieldData> deviceTotalData = null;
private java.util.List<FieldData> fleetTotalData = null;
private double totalOdomKM = 0.0;
private long totalDriveSec = 0L;
private double totalDriveFuel = 0.0;
private int totalStopCount = 0;
private long totalStopSec = 0L;
private long totalIdleSec = 0L;
private double totalIdleFuel = 0.0;
// ------------------------------------------------------------------------
/**
*** Motion Report Constructor
*** @param rptEntry The ReportEntry that generated this report
*** @param reqState The session RequestProperties instance
*** @param devList The list of devices
**/
public MotionReport(ReportEntry rptEntry, RequestProperties reqState, ReportDeviceList devList)
throws ReportException
{
super(rptEntry, reqState, devList);
/* Account check */
if (this.getAccount() == null) {
throw new ReportException("Account-ID not specified");
}
/* Device check */
this.deviceCount = this.getDeviceCount();
if (this.deviceCount < 1) {
throw new ReportException("At least 1 Device must be specified");
}
// Detail report if device count == 1
// Summary report is device count > 1
}
// ------------------------------------------------------------------------
/**
*** Post report initialization
**/
public void postInitialize()
{
/* TRIP_ON_SPEED vars */
this.minSpeedKPH = this.getProperties().getDouble( PROP_minimumSpeedKPH , MIN_SPEED_KPH);
this.minStoppedTimeSec = this.getProperties().getLong( PROP_minimumStoppedTime, MIN_STOPPED_TIME_SEC);
this.stopOnIgnitionOff = this.getProperties().getBoolean(PROP_stopOnIgnitionOff , STOP_ON_IGNITION_OFF);
}
// ------------------------------------------------------------------------
/**
*** Override 'getEventData' to reset selected status codes
*** @param device The Device for which EventData records will be selected
*** @param rcdHandler The DBRecordHandler
*** @return An array of EventData records for the device
**/
protected EventData[] getEventData(Device device, DBRecordHandler<EventData> rcdHandler)
{
/* Device */
if (device == null) {
return EventData.EMPTY_ARRAY;
}
/* adjust report constraints */
ReportConstraints rc = this.getReportConstraints();
if (this.tripStartType == TRIP_ON_START) {
// return only start/stop events
if (this.ignitionCodes != null) {
rc.setStatusCodes(new int[] {
StatusCodes.STATUS_MOTION_START,
StatusCodes.STATUS_MOTION_STOP,
this.ignitionCodes[0], // ignition OFF
this.ignitionCodes[1] // ignition ON
});
} else {
rc.setStatusCodes(new int[] {
StatusCodes.STATUS_MOTION_START,
StatusCodes.STATUS_MOTION_STOP
});
}
rc.setValidGPSRequired(false); // don't need just valid gps events
} else
if (this.tripStartType == TRIP_ON_IGNITION) {
// return only IgnitionOn/IgnitionOff events (this.ignitionCodes is non-null)
rc.setStatusCodes(new int[] {
this.ignitionCodes[0], // ignition OFF
this.ignitionCodes[1] // ignition ON
});
rc.setValidGPSRequired(false); // don't need just valid gps events
} else {
// TRIP_ON_SPEED
// return all status codes
rc.setStatusCodes(null);
if (this.ignitionCodes != null) {
// read all events to make sure we get ignition events
rc.setValidGPSRequired(false);
} else {
// no ignition code, we only need GPS events
rc.setValidGPSRequired(true);
}
long rptLimit = rc.getReportLimit();
if (rptLimit > 0L) {
rc.setSelectionLimit(Math.max(rc.getSelectionLimit(), (rptLimit * 4L)));
}
}
/* get data */
return super.getEventData(device, rcdHandler);
}
// ------------------------------------------------------------------------
/**
*** Returns true if this report supports displaying a map
*** @return True if this report supports displaying a map, false otherwise
**/
public boolean getSupportsMapDisplay()
{
return true; // this.hasReportColumn(FieldLayout.DATA_STOP_GEOPOINT);
}
/**
*** Returns true if this report supports displaying KML
*** @return True if this report supports displaying KML, false otherwise
**/
public boolean getSupportsKmlDisplay()
{
return this.hasReportColumn(FieldLayout.DATA_STOP_GEOPOINT);
}
// ------------------------------------------------------------------------
/**
*** Gets the bound ReportLayout singleton instance for this report
*** @return The bound ReportLayout
**/
public ReportLayout getReportLayout()
{
// bind the report format to this data
return FieldLayout.getReportLayout();
}
/**
*** Creates and returns an iterator for the row data displayed in the body of this report.
*** @return The body row data iterator
**/
public DBDataIterator getBodyDataIterator()
{
/* total totals */
double totalTotalOdomKM = 0.0;
long totalTotalDriveSec = 0L;
double totalTotalDriveFuel = 0.0;
int totalTotalStopCount = 0;
long totalTotalStopSec = 0L;
long totalTotalIdleSec = 0L;
double totalTotalIdleFuel = 0.0;
/* device total data list */
this.deviceTotalData = new Vector<FieldData>();
/* device list */
Account account = this.getAccount();
String accountID = account.getAccountID();
ReportDeviceList devList = this.getReportDeviceList();
/* loop through devices */
for (Iterator i = devList.iterator(); i.hasNext();) {
String devID = (String)i.next();
/* init detail data iterator */
this.deviceDetailData = new Vector<FieldData>();
/* reset device totals */
this.totalOdomKM = 0.0;
this.totalDriveSec = 0L ;
this.totalDriveFuel = 0.0;
this.totalStopCount = 0;
this.totalStopSec = 0L ;
this.totalIdleSec = 0L ;
this.totalIdleFuel = 0.0;
// reset ignition state
this.isIgnitionOn = false;
this.lastIgnitionEvent = null;
this.ignitionCodes = null;
// reset idle state
this.idleStartEvent = null;
this.idleStopEvent = null;
this.idleAccumulator = 0L;
// reset motion
this.isInMotion = false;
this.lastMotionEvent = null;
// reset start
this.lastStartTime = 0L;
this.lastStartPoint = null;
this.lastStartAddress = "";
this.lastStartOdometer = 0.0;
this.lastStartFuelUsed = 0.0;
// reset stop
this.lastStopTime = 0L;
this.lastStopPoint = null;
this.lastStopAddress = "";
this.lastStopOdometer = 0.0;
this.lastStopFuelUsed = 0.0;
// reset state
this.lastStateChange = STATE_UNKNOWN;
try {
/* get device */
Device device = devList.getDevice(devID);
if (device == null) {
continue;
}
// Device ignition statusCodes
this.ignitionCodes = device.getIgnitionStatusCodes();
boolean hasIgnition = (this.ignitionCodes != null);
// trip start/stop type
String tt = this.getProperties().getString(PROP_tripStartType,MOTION_SPEED[0]).toLowerCase();
//Print.logInfo("Trip type: " + tt);
if (ListTools.contains(MOTION_DEFAULT,tt)) {
// "default"
String devCode = device.getDeviceCode();
DCServerConfig dcs = DCServerFactory.getServerConfig(devCode);
if ((dcs == null) && StringTools.isBlank(devCode) && Account.IsDemoAccount(accountID)) {
// special case for "demo" account when 'deviceCode' is blank
dcs = DCServerFactory.getServerConfig(DCServerFactory.OPENDMTP_NAME);
if (dcs == null) {
Print.logWarn("Account 'demo' DCServerConfig not found: " + DCServerFactory.OPENDMTP_NAME);
}
}
if (dcs != null) {
// DCServerConfig found
if (dcs.getStartStopSupported(false)) {
// Device supports start/stop
this.tripStartType = TRIP_ON_START;
} else
if (hasIgnition) {
// Device supports ignition state
this.tripStartType = TRIP_ON_IGNITION;
} else {
// Default to speed
this.tripStartType = TRIP_ON_SPEED;
}
} else {
// DCServerConfig not found ('deviceCode' is either blank or invalid)
if (hasIgnition) {
// Device supports ignition state
this.tripStartType = TRIP_ON_IGNITION;
} else {
// Default
this.tripStartType = TRIP_ON_SPEED;
}
}
this.tripTypeDefault = true;
} else
if (ListTools.contains(MOTION_STARTSTOP,tt)) {
// "startstop"
this.tripStartType = TRIP_ON_START;
this.tripTypeDefault = false;
} else
if (ListTools.contains(MOTION_IGNITION,tt)/* && hasIgnition */) {
// "ignition"
this.tripStartType = TRIP_ON_IGNITION;
this.tripTypeDefault = false;
if (!hasIgnition) {
this.ignitionCodes = new int[] { StatusCodes.STATUS_IGNITION_OFF, StatusCodes.STATUS_IGNITION_ON };
hasIgnition = true;
}
} else {
// "speed", "motion"
this.tripStartType = TRIP_ON_SPEED;
this.tripTypeDefault = true;
}
/* debug */
Print.logInfo("Trip Start Type: [" + this.tripStartType + "] " + TripTypeName(this.tripStartType));
if (hasIgnition) {
String ignOff = StatusCodes.GetHex(this.ignitionCodes[0]);
String ignOn = StatusCodes.GetHex(this.ignitionCodes[1]);
Print.logInfo("Device Ignition Codes "+ignOff+":"+ignOn+" [" + accountID + "/" + devID + "]");
} else {
Print.logInfo("No defined Device ignition codes [" + accountID + "/" + devID + "]");
}
// get events
this.getEventData(device, this); // <== callback to 'handleDBRecord'
// handle final record here
if (this.lastStopTime > 0) {
// we are stopped
long driveTime = (this.lastStartTime > 0L)? (this.lastStopTime - this.lastStartTime ) : -1L;
double driveDist = (this.lastStartTime > 0L)? (this.lastStopOdometer - this.lastStartOdometer) : -1.0; // kilometers
double driveFuel = (this.lastStartTime > 0L)? (this.lastStopFuelUsed - this.lastStartFuelUsed) : -1.0; // liter
double driveEcon = (driveFuel > 0.0)? (driveDist / driveFuel) : 0.0; // kilometers per liter
long stopElaps = -1L;
long idleElaps = (this.idleAccumulator > 0L)? this.idleAccumulator : -1L;
double idleFuel = -1.0;
this._addRecord(accountID, devID,
this.lastStartTime, this.lastStartPoint, this.lastStartAddress, this.lastStartOdometer, this.lastStartFuelUsed,
this.lastStopTime , this.lastStopPoint , this.lastStopAddress , this.lastStopOdometer , this.lastStopFuelUsed ,
driveTime, driveDist, driveFuel, driveEcon,
stopElaps, idleElaps, idleFuel);
} else
if (this.lastStartTime > 0) {
// we haven't stopped during the range of this report
long driveTime = -1L;
double driveDist = -1.0; // kilometers
double driveFuel = -1.0; // liters
double driveEcon = -1.0; // kilometers per liter
long stopElaps = -1L;
long idleElaps = -1L;
double idleFuel = -1.0;
this._addRecord(accountID, devID,
this.lastStartTime, this.lastStartPoint, this.lastStartAddress, this.lastStartOdometer, this.lastStartFuelUsed,
-1L , null , "" , -1.0 , -1.0 ,
driveTime, driveDist, driveFuel, driveEcon,
stopElaps, idleElaps, idleFuel);
}
/* total record */
FieldData fd = new FieldData();
double driveEcon = (this.totalDriveFuel > 0.0)? (this.totalOdomKM / this.totalDriveFuel) : 0.0;
fd.setAccount(account);
fd.setDevice(device);
fd.setString(FieldLayout.DATA_ACCOUNT_ID , this.getAccountID());
fd.setString(FieldLayout.DATA_DEVICE_ID , devID);
fd.setDouble(FieldLayout.DATA_ODOMETER_DELTA , this.totalOdomKM);
fd.setLong( FieldLayout.DATA_DRIVING_ELAPSED , this.totalDriveSec);
fd.setDouble(FieldLayout.DATA_FUEL_TRIP , this.totalDriveFuel);
fd.setDouble(FieldLayout.DATA_FUEL_ECONOMY , driveEcon);
fd.setLong( FieldLayout.DATA_STOP_COUNT , this.totalStopCount);
fd.setLong( FieldLayout.DATA_STOP_ELAPSED , this.totalStopSec);
fd.setLong( FieldLayout.DATA_IDLE_ELAPSED , this.totalIdleSec);
fd.setDouble(FieldLayout.DATA_FUEL_IDLE , this.totalIdleFuel);
this.deviceTotalData.add(fd);
/* total totals */
totalTotalOdomKM += this.totalOdomKM;
totalTotalDriveSec += this.totalDriveSec;
totalTotalDriveFuel += this.totalDriveFuel;
totalTotalStopCount += this.totalStopCount;
totalTotalStopSec += this.totalStopSec;
totalTotalIdleSec += this.totalIdleSec;
totalTotalIdleFuel += this.totalIdleFuel;
} catch (DBException dbe) {
Print.logError("Error retrieving EventData for Device: " + devID);
}
} // Device list iterator
/* return row iterator */
if (this.deviceCount > 1) {
// prepare fleet-total date
double avgEcon = (totalTotalDriveFuel > 0.0)? (totalTotalOdomKM / totalTotalDriveFuel) : 0.0;
FieldData fd = new FieldData();
fd.setAccount(account);
fd.setString(FieldLayout.DATA_ACCOUNT_ID , this.getAccountID());
fd.setDouble(FieldLayout.DATA_ODOMETER_DELTA , totalTotalOdomKM);
fd.setLong( FieldLayout.DATA_DRIVING_ELAPSED , totalTotalDriveSec);
fd.setDouble(FieldLayout.DATA_FUEL_TRIP , totalTotalDriveFuel);
//fd.setDouble(FieldLayout.DATA_FUEL_ECONOMY , avgEcon);
fd.setLong( FieldLayout.DATA_STOP_COUNT , totalTotalStopCount);
fd.setLong( FieldLayout.DATA_STOP_ELAPSED , totalTotalStopSec);
fd.setLong( FieldLayout.DATA_IDLE_ELAPSED , totalTotalIdleSec);
fd.setDouble(FieldLayout.DATA_FUEL_IDLE , totalTotalIdleFuel);
this.fleetTotalData = new Vector<FieldData>();
this.fleetTotalData.add(fd);
// return device-total data
return new ListDataIterator(this.deviceTotalData);
} else {
// return device-detail data
return new ListDataIterator(this.deviceDetailData);
}
}
/**
*** Creates and returns an iterator for the row data displayed in the total rows of this report.
*** @return The total row data iterator
**/
public DBDataIterator getTotalsDataIterator()
{
if (this.deviceCount > 1) {
if (this.fleetTotalData != null) {
return new ListDataIterator(this.fleetTotalData);
} else {
return null;
}
} else {
return new ListDataIterator(this.deviceTotalData);
}
}
// ------------------------------------------------------------------------
// ------------------------------------------------------------------------
/**
*** Adds a record to the body database iterator
*** @param startTime The motion start time
*** @param startGP The motion start GeoPoint
*** @param startAddress The motion start Address
*** @param startOdom The motion start Odometer
*** @param startFuel The motion start Fuel Usage
*** @param stopTime The motion stop time
*** @param stopGP The motion stop GeoPoint
*** @param stopAddress The motion stop Address
*** @param stopOdom The motion stop Odometer
*** @param stopFuel The motion stop Fuel Usage
*** @param driveTime The driving elapsed time
*** @param driveDist The distance driven
*** @param driveFuel The fuel used
*** @param driveEcon The fuel economy
*** @param stopElapse The elapsed stop time
*** @param idleElapse The elapsed idle time (ignition-on, not moving)
*** @param idleFuel The fuel used while idling (<='0.0' if unavailable)
**/
private void _addRecord(String acctID, String devID,
long startTime , GeoPoint startGP, String startAddress, double startOdom, double startFuel,
long stopTime , GeoPoint stopGP , String stopAddress , double stopOdom , double stopFuel ,
long driveTime , double driveDist, double driveFuel , double driveEcon,
long stopElapse, long idleElapse , double idleFuel
)
{
FieldData fd = new MotionFieldData();
fd.setString( FieldLayout.DATA_ACCOUNT_ID , acctID);
fd.setString( FieldLayout.DATA_DEVICE_ID , devID);
fd.setGeoPoint(FieldLayout.DATA_GEOPOINT , startGP); // may be null
fd.setString( FieldLayout.DATA_ADDRESS , startAddress); // may be null/blank
fd.setLong( FieldLayout.DATA_START_TIMESTAMP , startTime); // may be 0L
fd.setLong( FieldLayout.DATA_DRIVING_ELAPSED , driveTime);
fd.setDouble( FieldLayout.DATA_ODOMETER , startOdom);
fd.setDouble( FieldLayout.DATA_ODOMETER_DELTA , driveDist);
fd.setLong( FieldLayout.DATA_STOP_TIMESTAMP , stopTime);
fd.setGeoPoint(FieldLayout.DATA_STOP_GEOPOINT , stopGP); // may be null
fd.setString( FieldLayout.DATA_STOP_ADDRESS , stopAddress); // may be null/blank
fd.setDouble( FieldLayout.DATA_STOP_ODOMETER , stopOdom);
fd.setDouble( FieldLayout.DATA_FUEL_TOTAL , startFuel);
fd.setDouble( FieldLayout.DATA_FUEL_TRIP , driveFuel); // stopFuel - startFuel
fd.setDouble( FieldLayout.DATA_FUEL_ECONOMY , driveEcon); // driveDist / driveFuel
fd.setLong( FieldLayout.DATA_STOP_ELAPSED , stopElapse);
fd.setLong( FieldLayout.DATA_IDLE_ELAPSED , idleElapse);
fd.setDouble( FieldLayout.DATA_FUEL_IDLE , idleFuel);
this.deviceDetailData.add(fd);
if (driveTime > 0L) { this.totalDriveSec += driveTime ; }
if (driveDist > 0.0) { this.totalOdomKM += driveDist ; }
if (driveFuel > 0.0) { this.totalDriveFuel += driveFuel ; }
if (stopTime > 0L) { this.totalStopCount += 1 ; }
if (stopElapse > 0L) { this.totalStopSec += stopElapse ; }
if (idleElapse > 0L) { this.totalIdleSec += idleElapse ; }
if (idleFuel > 0.0) { this.totalIdleFuel += idleFuel ; }
}
/**
*** Custom DBRecord callback handler class
*** @param rcd The EventData record
*** @return The returned status indicating whether to continue, or stop
**/
public int handleDBRecord(EventData rcd)
throws DBException
{
EventData evRcd = rcd;
Device device = evRcd.getDevice();
int statusCode = evRcd.getStatusCode();
//Print.logInfo("EventData: " + evRcd.getTimestamp() + " 0x" + StringTools.toHexString(evRcd.getStatusCode(),16));
/* ignition state change */
boolean ignitionChange = false;
if (this.tripStartType != TRIP_ON_IGNITION) {
if (this.ignitionCodes != null) {
// has ignition codes
if (this.isIgnitionOff(statusCode)) {
// ignition OFF
if ((this.lastIgnitionEvent == null) || this.isIgnitionOn) {
ignitionChange = true;
this.isIgnitionOn = false;
//this.lastIgnOffEvent = evRcd;
this.lastIgnitionEvent = evRcd;
} else {
// ignition is already off
}
} else
if (this.isIgnitionOn(statusCode)) {
// ignition ON
if ((this.lastIgnitionEvent == null) || !this.isIgnitionOn) {
ignitionChange = true;
this.isIgnitionOn = true;
//this.lastIgnOnEvent = evRcd;
this.lastIgnitionEvent = evRcd;
} else {
// ignition is already on
}
} else {
// leave ignition state as-is
}
} else {
// no ignition codes
}
}
/* trip delimiter */
boolean isMotionStart = false;
boolean isMotionStop = false;
boolean isIdleStart = false;
boolean isIdleStop = false;
if (this.tripStartType == TRIP_ON_IGNITION) {
// TRIP_ON_IGNITION
if (this.isIgnitionOn(statusCode)) {
// I've started moving
if ((this.lastIgnitionEvent == null) || !this.isIgnitionOn) {
// ignition state changed to on
ignitionChange = true;
this.isIgnitionOn = true;
//this.lastIgnOnEvent = evRcd;
this.lastIgnitionEvent = evRcd;
isMotionStart = true;
this.isInMotion = true;
//this.lastStartEvent = evRcd;
this.lastMotionEvent = evRcd;
//isIdleStop = true; <== no idle for TRIP_ON_IGNITION
this.idleStopEvent = null;
} else {
// ignition is already on
}
} else
if (this.isIgnitionOff(statusCode)) {
// I've stopped moving
if ((this.lastIgnitionEvent == null) || this.isIgnitionOn) {
ignitionChange = true;
this.isIgnitionOn = false;
//this.lastIgnOffEvent = evRcd;
this.lastIgnitionEvent = evRcd;
isMotionStop = true;
this.isInMotion = false;
//this.lastStopEvent = evRcd;
this.lastMotionEvent = evRcd;
//isIdleStart = true; <== no idle for TRIP_ON_IGNITION
this.idleStartEvent = null;
} else {
// ignition is already off
}
} else {
// not a motion state change event
}
} else
if (this.tripStartType == TRIP_ON_START) {
// TRIP_ON_START
if (this.isMotionStart(statusCode)) {
if (!this.isInMotion) {
// I was stopped, I've now started moving (stop idle clock)
isMotionStart = true;
this.isInMotion = true;
//this.lastStartEvent = evRcd;
this.lastMotionEvent = evRcd;
if (!this.isIgnitionOn) {
// force ignition ON when moving
this.isIgnitionOn = true;
//this.lastIgnOnEvent = evRcd;
this.lastIgnitionEvent = evRcd;
}
isIdleStop = true; // in TRIP_ON_START
this.idleStopEvent = (this.ignitionCodes != null)? evRcd : null;
} else {
// I'm already moving
}
} else
if (this.isMotionStop(statusCode)) {
if (this.isInMotion) {
// I've stopped moving (start idle clock)
isMotionStop = true;
this.isInMotion = false;
//this.lastStopEvent = evRcd;
this.lastMotionEvent = evRcd;
if (this.isIgnitionOn && (this.ignitionCodes == null)) {
// force ignition off if device does not have ignition codes
this.isIgnitionOn = false;
//this.lastIgnOffEvent = evRcd
this.lastIgnitionEvent = evRcd;
}
isIdleStart = true; // in TRIP_ON_START
this.idleStartEvent = (this.ignitionCodes != null)? evRcd : null;
} else {
// I'm already stopped
}
} else
if (this.isIgnitionOff(statusCode) && this.stopOnIgnitionOff) {
if (this.isInMotion) {
// I've stopped moving (start idle clock)
isMotionStop = true;
this.isInMotion = false;
//this.lastStopEvent = evRcd;
this.lastMotionEvent = evRcd;
isIdleStart = true; // in TRIP_ON_START
this.idleStartEvent = (this.ignitionCodes != null)? evRcd : null;
} else {
// I'm already stopped
}
} else {
// not a motion state change event
// check for idle change events while not moving
if (!this.isInMotion) {
if (this.isIgnitionOn(statusCode)) {
// ignition on while not moving, start idle clock
isIdleStart = true; // in TRIP_ON_START
this.idleStartEvent = (this.ignitionCodes != null)? evRcd : null;
} else
if (this.isIgnitionOff(statusCode)) {
isIdleStop = true; // in TRIP_ON_START
this.idleStopEvent = (this.ignitionCodes != null)? evRcd : null;
}
}
}
} else
if (this.tripStartType == TRIP_ON_SPEED) {
if (evRcd.getSpeedKPH() >= this.minSpeedKPH) {
// I am moving
this.pendingStopEvent = null; // always reset (for min stop time below)
if (!this.isInMotion) {
// I wasn't moving before, now I've started moving
isMotionStart = true;
this.isInMotion = true;
//this.lastStartEvent = evRcd;
this.lastMotionEvent = evRcd; // start of motion
if (this.isIgnitionOn) {
// ignition is already on.
//Print.logInfo("Start of motion (ignition is ON)");
} else {
// force ignition on (since were now moving)
//Print.logInfo("Start of motion (force ignition ON)");
this.isIgnitionOn = true;
//this.lastIgnOnEvent = evRcd;
this.lastIgnitionEvent = evRcd;
}
isIdleStop = true; // in TRIP_ON_SPEED
this.idleStopEvent = (this.ignitionCodes != null)? evRcd : null;
} else {
// I'm still moving
if (ignitionChange) {
// ignition on/off while moving?
}
}
} else {
// I am not moving
if (this.isInMotion) {
// I was moving, now I've stopped moving - maybe
if (this.minStoppedTimeSec <= 0L) {
// no minimum stopped-time, and we haven't already stopped
//Print.logInfo("Stopped motion (no minimum stopped time)");
isMotionStop = true;
this.isInMotion = false;
//this.lastStopEvent = evRcd;
this.lastMotionEvent = evRcd; // stop motion
this.pendingStopEvent = null;
isIdleStart = true; // in TRIP_ON_SPEED
this.idleStartEvent = (this.ignitionCodes != null)? evRcd : null;
} else
if (ignitionChange && !this.isIgnitionOn && this.stopOnIgnitionOff) {
// ignition turned off while not moving, and we want to consider this as a stop
//Print.logInfo("Stopped motion (forced by ignition OFF)");
isMotionStop = true;
this.isInMotion = false;
//this.lastStopEvent = evRcd;
this.lastMotionEvent = (this.pendingStopEvent != null)? this.pendingStopEvent : evRcd; // stop motion
this.pendingStopEvent = null;
isIdleStart = true; // in TRIP_ON_SPEED
this.idleStartEvent = (this.ignitionCodes != null)? evRcd : null;
} else {
// minimum stopped time in effect
if (this.pendingStopEvent == null) {
// start the stopped-time clock
this.pendingStopEvent = evRcd;
} else {
// check to see if we've met the minimum stopped time
long deltaTimeSec = evRcd.getTimestamp() - this.pendingStopEvent.getTimestamp();
if (deltaTimeSec >= this.minStoppedTimeSec) {
// elapsed stop time exceeded limit
//Print.logInfo("Stopped motion (elapsed minimum stop time)");
isMotionStop = true;
this.isInMotion = false;
//this.lastStopEvent = evRcd;
if (SPEED_RESET_STOP_TIME) {
// if we reset the stop event here, then the minimum stopped time will
// not be counted. (this does cause some user confusion, so this reset
// should not occur).
this.lastMotionEvent = evRcd; // stop motion
} else {
this.lastMotionEvent = this.pendingStopEvent;
}
this.pendingStopEvent = null;
isIdleStart = true; // in TRIP_ON_SPEED
this.idleStartEvent = (this.ignitionCodes != null)? evRcd : null;
} else {
// assume I'm still moving (ie. temporarily stopped)
}
}
}
} else {
// I'm still not moving
// check for idle change events while not moving
if (this.isIgnitionOn(statusCode)) {
// ignition on while not moving, start idle clock
isIdleStart = true; // in TRIP_ON_SPEED
this.idleStartEvent = (this.ignitionCodes != null)? evRcd : null;
} else
if (this.isIgnitionOff(statusCode)) {
isIdleStop = true; // in TRIP_ON_SPEED
this.idleStopEvent = (this.ignitionCodes != null)? evRcd : null;
}
}
}
}
// isMotionStart - true if motion changed from stop==>start
// isMotionStop - true if motion changed from start==>stop
// this.isInMotion - current motion state
// this.lastMotionEvent - last motion delimiter event
// this.lastIgnitionEvent - last ignition delimiter event
// isIdleStart - true if idle changed from stop==>start
// isIdleStop - true if idle changed from start==>stop
// this.idleStartEvent - last idle start event
// this.idleStopEvent - last idle stop event
// ignitionChange - true if ignition changed state
// this.isIgnitionOn - current ignition state
/* accrue idle time */
if (this.ignitionCodes != null) {
// 'idle' only valid if we have ignition codes
if (isIdleStart) {
// just wait for 'stop'
} else
if (isIdleStop) {
// 'this.idleStopEvent' is non-null
if (this.idleStartEvent != null) {
this.idleAccumulator += (this.idleStopEvent.getTimestamp() - this.idleStartEvent.getTimestamp());
} else {
// 'this.idleStartEvent' not yet initialized (likely first occurance in report)
}
//Print.logInfo("Accumulated Idle time: " + this.idleAccumulator);
this.idleStartEvent = null;
this.idleStopEvent = null;
}
}
// lastStart -> lastStop -> start
if (isMotionStart) {
EventData ev = this.lastMotionEvent; // start of motion
// 'this.isIgnitionOn' is 'true'
if (this.lastStateChange == STATE_START) {
// abnormal start ==> start
// we already have a 'start', we're missing an interleaving 'stop'
// the driving-time is not valid
// ('this.lastStopTime' will already be '0' here, since we didn't get an interleaving 'stop')
// ('this.lastStartTime' will be > 0 here, since we did get a previous 'start')
// We treat this START event as a STOP event
long stopTime = ev.getTimestamp();
GeoPoint stopPoint = ev.getGeoPoint();
String stopAddr = ev.getAddress();
double stopOdom = ev.getOdometerKM();
if (stopOdom <= 0.0) { stopOdom = ev.getDistanceKM(); }
double stopFuel = ev.getFieldValue(EventData.FLD_fuelTotal, 0.0);
long driveTime = (this.lastStartTime > 0L)? (stopTime - this.lastStartTime) : 0L;
double driveDist = (this.lastStartTime > 0L)? (stopOdom - this.lastStartOdometer) : 0.0; // kilometers
double driveFuel = (this.lastStartTime > 0L)? (stopFuel - this.lastStartFuelUsed) : 0.0; // liters
double driveEcon = (driveFuel > 0.0)? (driveDist / driveFuel) : -1.0; // kilometers per liter
long stopElaps = 0L;
long idleElaps = 0L;
double idleFuel = -1.0;
this._addRecord(ev.getAccountID(), ev.getDeviceID(),
this.lastStartTime, this.lastStartPoint, this.lastStartAddress, this.lastStartOdometer, this.lastStartFuelUsed,
stopTime , stopPoint , stopAddr , stopOdom , stopFuel ,
driveTime, driveDist, driveFuel, driveEcon,
stopElaps, idleElaps, idleFuel);
// continue with 'START'
} else
if (this.lastStopTime > 0) {
// normal start --> stop ==> start
long driveTime = (this.lastStartTime > 0L)? (this.lastStopTime - this.lastStartTime) : 0L;
double driveDist = (this.lastStartTime > 0L)? (this.lastStopOdometer - this.lastStartOdometer) : -1.0; // kilometers
double driveFuel = (this.lastStartTime > 0L)? (this.lastStopFuelUsed - this.lastStartFuelUsed) : -1.0; // liters
double driveEcon = (driveFuel > 0.0)? (driveDist / driveFuel) : 0.0; // kilometers per liter
long stopElaps = ev.getTimestamp() - this.lastStopTime;
long idleElaps = (this.idleAccumulator > 0L)? this.idleAccumulator : -1L;
double idleFuel = -1.0;
this._addRecord(ev.getAccountID(), ev.getDeviceID(),
this.lastStartTime, this.lastStartPoint, this.lastStartAddress, this.lastStartOdometer, this.lastStartFuelUsed,
this.lastStopTime , this.lastStopPoint , this.lastStopAddress , this.lastStopOdometer , this.lastStopFuelUsed ,
driveTime, driveDist, driveFuel, driveEcon,
stopElaps, idleElaps, idleFuel);
}
this.lastStartTime = ev.getTimestamp();
this.lastStartPoint = ev.getGeoPoint();
this.lastStartAddress = ev.getAddress();
this.lastStartOdometer = ev.getOdometerKM();
if (this.lastStartOdometer <= 0.0) { this.lastStartOdometer = ev.getDistanceKM(); }
this.lastStartFuelUsed = ev.getFieldValue(EventData.FLD_fuelTotal, 0.0);
this.lastStopTime = 0L;
this.lastStopPoint = null;
this.lastStopAddress = null;
this.lastStopOdometer = 0.0;
this.lastStopFuelUsed = 0.0;
this.lastStateChange = STATE_START;
/* clear idle accrual */
this.idleAccumulator = 0L;
} else
if (isMotionStop) {
EventData ev = this.lastMotionEvent; // stop motion
if (this.lastStateChange == STATE_STOP) {
// abnormal start --> stop ==> stop
// we already have a 'stop', we're missing a 'start'.
// this condition can only occur for TRIP_ON_START or TRIP_ON_IGNITION
if ((this.lastStopTime > 0) && (this.lastIgnitionEvent != null) && (this.lastIgnitionEvent.getTimestamp() > this.lastStopTime)) {
// inject a START at the last ignition event (no additional idle accural calculations)
long startTime = this.lastIgnitionEvent.getTimestamp();
GeoPoint startPoint = this.lastIgnitionEvent.getGeoPoint();
String startAddr = this.lastIgnitionEvent.getAddress();
double startOdom = this.lastIgnitionEvent.getOdometerKM();
if (startOdom <= 0.0) { startOdom = this.lastIgnitionEvent.getDistanceKM(); }
double startFuel = this.lastIgnitionEvent.getFieldValue(EventData.FLD_fuelTotal, 0.0);
long driveTime = this.lastStopTime - startTime;
double driveDist = this.lastStopOdometer - startOdom; // kilometers
double driveFuel = this.lastStopFuelUsed - startFuel; // liters
double driveEcon = (driveFuel > 0.0)? (driveDist / driveFuel) : 0.0; // kilometers per liter
long stopElaps = this.lastIgnitionEvent.getTimestamp() - this.lastStopTime;
long idleElaps = (this.idleAccumulator > 0L)? this.idleAccumulator : -1L;
double idleFuel = -1.0;
this._addRecord(ev.getAccountID(), ev.getDeviceID(),
startTime , startPoint , startAddr , startOdom , startFuel ,
this.lastStopTime , this.lastStopPoint , this.lastStopAddress , this.lastStopOdometer , this.lastStopFuelUsed ,
driveTime, driveDist, driveFuel, driveEcon,
stopElaps, idleElaps, idleFuel);
this.isIgnitionOn = true; // force to true, since we simulated a 'START'
// 'this.lastIgnitionEvent' stays as-is
// Continue with STOP
} else {
// no interleaving ignition events
// ignore the previous 'STOP'
}
}
this.lastStopTime = ev.getTimestamp();
this.lastStopPoint = ev.getGeoPoint();
this.lastStopAddress = ev.getAddress();
this.lastStopOdometer = ev.getOdometerKM();
if (this.lastStopOdometer <= 0.0) { this.lastStopOdometer = ev.getDistanceKM(); }
this.lastStopFuelUsed = ev.getFieldValue(EventData.FLD_fuelTotal, 0.0);
this.lastStateChange = STATE_STOP;
/* start idle accrual */
this.idleAccumulator = 0L;
}
/* return record limit status */
return (this.deviceDetailData.size() < this.getReportLimit())? DBRH_SKIP : DBRH_STOP;
}
// ------------------------------------------------------------------------
private boolean isIgnitionOn(int statusCode)
{
if (this.ignitionCodes != null) {
return (statusCode == this.ignitionCodes[1]);
} else {
return false;
}
}
private boolean isIgnitionOff(int statusCode)
{
if (this.ignitionCodes != null) {
return (statusCode == this.ignitionCodes[0]);
} else {
return false;
}
}
private boolean isMotionStart(int statusCode)
{
return (statusCode == StatusCodes.STATUS_MOTION_START);
}
private boolean isMotionStop(int statusCode)
{
return (statusCode == StatusCodes.STATUS_MOTION_STOP);
}
// ------------------------------------------------------------------------
// ------------------------------------------------------------------------
/**
*** Custom MotionFieldData class
**/
private static class MotionFieldData
extends FieldData
implements EventDataProvider
{
// Available fields:
// FieldLayout.DATA_ACCOUNT_ID
// FieldLayout.DATA_DEVICE_ID
// FieldLayout.DATA_GEOPOINT
// FieldLayout.DATA_ADDRESS
// FieldLayout.DATA_START_TIMESTAMP
// FieldLayout.DATA_DRIVING_ELAPSED
// FieldLayout.DATA_ODOMETER
// FieldLayout.DATA_ODOMETER_DELTA
// FieldLayout.DATA_STOP_TIMESTAMP
// FieldLayout.DATA_STOP_GEOPOINT
// FieldLayout.DATA_STOP_ADDRESS
// FieldLayout.DATA_STOP_ODOMETER
// FieldLayout.DATA_FUEL_TOTAL
// FieldLayout.DATA_FUEL_TRIP
// FieldLayout.DATA_FUEL_ECONOMY
// FieldLayout.DATA_IDLE_ELAPSED
public MotionFieldData() {
super();
}
public String getAccountID() {
return super.getString(FieldLayout.DATA_ACCOUNT_ID,"");
}
public String getDeviceID() {
return super.getDeviceID();
}
public String getDeviceDescription() {
return super.getDeviceDescription();
}
public String getDeviceVIN() {
return super.getDeviceVIN();
}
public long getTimestamp() {
return super.getLong(FieldLayout.DATA_STOP_TIMESTAMP, 0L);
}
public int getStatusCode() {
return StatusCodes.STATUS_MOTION_STOP;
}
public String getStatusCodeDescription(BasicPrivateLabel bpl) {
return "Stop";
}
public int getPushpinIconIndex(String iconSelector, OrderedSet<String> iconKeys,
boolean isFleet, BasicPrivateLabel bpl) {
return EventData.ICON_PUSHPIN_RED;
}
public double getLatitude() {
GeoPoint gp = super.getGeoPoint(FieldLayout.DATA_STOP_GEOPOINT, null);
return (gp != null)? gp.getLatitude() : 0.0;
}
public double getLongitude() {
GeoPoint gp = super.getGeoPoint(FieldLayout.DATA_STOP_GEOPOINT, null);
return (gp != null)? gp.getLongitude() : 0.0;
}
public int getSatelliteCount() {
return 0;
}
public double getBatteryLevel() {
return 0.0;
}
public double getSpeedKPH() {
return 0.0;
}
public double getHeading() {
return 0.0;
}
public double getAltitude() {
return 0.0;
}
public double getOdometerKM() {
return 0.0;
}
public String getGeozoneID() {
return "";
}
public String getAddress() {
return super.getString(FieldLayout.DATA_STOP_ADDRESS, "");
}
public long getInputMask() {
return 0L;
}
public void setIsLastEvent(boolean isLast) {
super.setBoolean(FieldLayout.DATA_LAST_EVENT,isLast);
}
public boolean getIsLastEvent() {
return super.getBoolean(FieldLayout.DATA_LAST_EVENT,false);
}
}
}
| {
"content_hash": "7a77efc2a79a0121cbaa09b416b32458",
"timestamp": "",
"source": "github",
"line_count": 1183,
"max_line_length": 145,
"avg_line_length": 49.05494505494506,
"alnum_prop": 0.49165977391783844,
"repo_name": "cisdev123/OpenGTS_2.6.0",
"id": "b5a68fdd43469fd02872194a68c88003caf6ee5b",
"size": "58032",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "src/org/opengts/war/report/field/MotionReport.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "13754"
},
{
"name": "CSS",
"bytes": "57398"
},
{
"name": "Java",
"bytes": "7705340"
},
{
"name": "JavaScript",
"bytes": "598031"
},
{
"name": "Perl",
"bytes": "53060"
},
{
"name": "Shell",
"bytes": "37282"
}
],
"symlink_target": ""
} |
FROM balenalib/fincm3-debian:buster-build
# remove several traces of debian python
RUN apt-get purge -y python.*
# http://bugs.python.org/issue19846
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
ENV LANG C.UTF-8
# key 63C7CC90: public key "Simon McVittie <smcv@pseudorandom.co.uk>" imported
# key 3372DCFA: public key "Donald Stufft (dstufft) <donald@stufft.io>" imported
RUN gpg --batch --keyserver keyring.debian.org --recv-keys 4DE8FF2A63C7CC90 \
&& gpg --batch --keyserver keyserver.ubuntu.com --recv-key 6E3CBCE93372DCFA \
&& gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 0x52a43a1e4b77b059
ENV PYTHON_VERSION 3.10.0
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 21.2.4
ENV SETUPTOOLS_VERSION 58.0.0
RUN set -x \
&& curl -SLO "http://resin-packages.s3.amazonaws.com/python/v$PYTHON_VERSION/Python-$PYTHON_VERSION.linux-armv7hf-libffi3.2.tar.gz" \
&& echo "ce89c2591e640a14e84687c675feb1b94b7d62f987b388a72bb0d9574d98b207 Python-$PYTHON_VERSION.linux-armv7hf-libffi3.2.tar.gz" | sha256sum -c - \
&& tar -xzf "Python-$PYTHON_VERSION.linux-armv7hf-libffi3.2.tar.gz" --strip-components=1 \
&& rm -rf "Python-$PYTHON_VERSION.linux-armv7hf-libffi3.2.tar.gz" \
&& ldconfig \
&& if [ ! -e /usr/local/bin/pip3 ]; then : \
&& curl -SLO "https://raw.githubusercontent.com/pypa/get-pip/430ba37776ae2ad89f794c7a43b90dc23bac334c/get-pip.py" \
&& echo "19dae841a150c86e2a09d475b5eb0602861f2a5b7761ec268049a662dbd2bd0c get-pip.py" | sha256sum -c - \
&& python3 get-pip.py \
&& rm get-pip.py \
; fi \
&& pip3 install --no-cache-dir --upgrade --force-reinstall pip=="$PYTHON_PIP_VERSION" setuptools=="$SETUPTOOLS_VERSION" \
&& find /usr/local \
\( -type d -a -name test -o -name tests \) \
-o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
-exec rm -rf '{}' + \
&& cd / \
&& rm -rf /usr/src/python ~/.cache
# install "virtualenv", since the vast majority of users of this image will want it
RUN pip3 install --no-cache-dir virtualenv
ENV PYTHON_DBUS_VERSION 1.2.18
# install dbus-python dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
libdbus-1-dev \
libdbus-glib-1-dev \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get -y autoremove
# install dbus-python
RUN set -x \
&& mkdir -p /usr/src/dbus-python \
&& curl -SL "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-$PYTHON_DBUS_VERSION.tar.gz" -o dbus-python.tar.gz \
&& curl -SL "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-$PYTHON_DBUS_VERSION.tar.gz.asc" -o dbus-python.tar.gz.asc \
&& gpg --verify dbus-python.tar.gz.asc \
&& tar -xzC /usr/src/dbus-python --strip-components=1 -f dbus-python.tar.gz \
&& rm dbus-python.tar.gz* \
&& cd /usr/src/dbus-python \
&& PYTHON_VERSION=$(expr match "$PYTHON_VERSION" '\([0-9]*\.[0-9]*\)') ./configure \
&& make -j$(nproc) \
&& make install -j$(nproc) \
&& cd / \
&& rm -rf /usr/src/dbus-python
# make some useful symlinks that are expected to exist
RUN cd /usr/local/bin \
&& ln -sf pip3 pip \
&& { [ -e easy_install ] || ln -s easy_install-* easy_install; } \
&& ln -sf idle3 idle \
&& ln -sf pydoc3 pydoc \
&& ln -sf python3 python \
&& ln -sf python3-config python-config
# set PYTHONPATH to point to dist-packages
ENV PYTHONPATH /usr/lib/python3/dist-packages:$PYTHONPATH
CMD ["echo","'No CMD command was set in Dockerfile! Details about CMD command could be found in Dockerfile Guide section in our Docs. Here's the link: https://balena.io/docs"]
RUN curl -SLO "https://raw.githubusercontent.com/balena-io-library/base-images/8accad6af708fca7271c5c65f18a86782e19f877/scripts/assets/tests/test-stack@python.sh" \
&& echo "Running test-stack@python" \
&& chmod +x test-stack@python.sh \
&& bash test-stack@python.sh \
&& rm -rf test-stack@python.sh
RUN [ ! -d /.balena/messages ] && mkdir -p /.balena/messages; echo 'Here are a few details about this Docker image (For more information please visit https://www.balena.io/docs/reference/base-images/base-images/): \nArchitecture: ARM v7 \nOS: Debian Buster \nVariant: build variant \nDefault variable(s): UDEV=off \nThe following software stack is preinstalled: \nPython v3.10.0, Pip v21.2.4, Setuptools v58.0.0 \nExtra features: \n- Easy way to install packages with `install_packages <package-name>` command \n- Run anywhere with cross-build feature (for ARM only) \n- Keep the container idling with `balena-idle` command \n- Show base image details with `balena-info` command' > /.balena/messages/image-info
RUN echo '#!/bin/sh.real\nbalena-info\nrm -f /bin/sh\ncp /bin/sh.real /bin/sh\n/bin/sh "$@"' > /bin/sh-shim \
&& chmod +x /bin/sh-shim \
&& cp /bin/sh /bin/sh.real \
&& mv /bin/sh-shim /bin/sh | {
"content_hash": "64b96b58b7d02c9ff3ade992537b1865",
"timestamp": "",
"source": "github",
"line_count": 95,
"max_line_length": 711,
"avg_line_length": 50.83157894736842,
"alnum_prop": 0.7034582729343549,
"repo_name": "resin-io-library/base-images",
"id": "52f2c7c01d35f30cd00babf6338f6499ce5da365",
"size": "4850",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "balena-base-images/python/fincm3/debian/buster/3.10.0/build/Dockerfile",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Dockerfile",
"bytes": "71234697"
},
{
"name": "JavaScript",
"bytes": "13096"
},
{
"name": "Shell",
"bytes": "12051936"
},
{
"name": "Smarty",
"bytes": "59789"
}
],
"symlink_target": ""
} |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>geocoq: Error</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel="stylesheet">
<link href="../../../../../bootstrap-custom.css" rel="stylesheet">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<script src="../../../../../moment.min.js"></script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<div class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="../..">clean / extra-dev</a></li>
<li class="active"><a href="">dev / geocoq - dev</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
geocoq
<small>
dev
<span class="label label-danger">Error</span>
</small>
</h1>
<p><em><script>document.write(moment("2019-11-30 21:22:11 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2019-11-30 21:22:11 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-threads base
base-unix base
conf-findutils 1 Virtual package relying on findutils
conf-m4 1 Virtual package relying on m4
coq dev Formal proof management system
num 1.3 The legacy Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.09.0 The OCaml compiler (virtual package)
ocaml-base-compiler 4.09.0 Official release 4.09.0
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.8.1 A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "Julien Narboux <julien@narboux.fr>"
homepage: "http://geocoq.github.io/GeoCoq/"
bug-reports: "https://github.com/GeoCoq/GeoCoq/issues"
authors: ["Michael Beeson" "Gabriel Braun <gabriel.braun@unistra.fr>" "Pierre Boutry <pierre.boutry@unistra.fr>" "Charly Gries <charly.gries@etu.unistra.fr>" "Julien Narboux <narboux@unistra.fr"]
license: "LGPL 3"
build: [
["./configure.sh"]
[make "-j%{jobs}%"]
]
install: [
[make "install"]
]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/GeoCoq"]
depends: [
"ocaml"
"coq" {>= "8.6.2"}
"coq-mathcomp-field" {>= "1.6.4"}
]
synopsis: "A formalization of foundations of geometry in Coq"
flags: light-uninstall
url {
src: "git+https://github.com/GeoCoq/GeoCoq.git"
}
</pre>
<h2>Lint</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Dry install</h2>
<p>Dry install with the current Coq version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam install -y --show-action coq-geocoq.dev coq.dev</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam list; echo; ulimit -Sv 4000000; timeout 2h opam install -y --deps-only coq-geocoq.dev coq.dev</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>16 m 25 s</dd>
</dl>
<h2>Install</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam list; echo; ulimit -Sv 4000000; timeout 2h opam install -y coq-geocoq.dev coq.dev</code></dd>
<dt>Return code</dt>
<dd>7936</dd>
<dt>Duration</dt>
<dd>22 m 32 s</dd>
<dt>Output</dt>
<dd><pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-threads base
base-unix base
conf-findutils 1 Virtual package relying on findutils
conf-m4 1 Virtual package relying on m4
coq dev Formal proof management system
coq-mathcomp-algebra dev Mathematical Components Library on Algebra
coq-mathcomp-field dev Mathematical Components Library on Fields
coq-mathcomp-fingroup dev Mathematical Components Library on finite groups
coq-mathcomp-solvable dev Mathematical Components Library on finite groups (II)
coq-mathcomp-ssreflect dev Small Scale Reflection
num 1.3 The legacy Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.09.0 The OCaml compiler (virtual package)
ocaml-base-compiler 4.09.0 Official release 4.09.0
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.8.1 A library manager for OCaml
[NOTE] Package coq is already installed (current version is dev).
The following actions will be performed:
- install coq-geocoq dev
<><> Gathering sources ><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[coq-geocoq.dev] synchronised from git+https://github.com/GeoCoq/GeoCoq.git
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[ERROR] The compilation of coq-geocoq failed at "/home/bench/.opam/opam-init/hooks/sandbox.sh build make -j4".
#=== ERROR while compiling coq-geocoq.dev =====================================#
# context 2.0.5 | linux/x86_64 | ocaml-base-compiler.4.09.0 | file:///home/bench/run/opam-coq-archive/extra-dev
# path ~/.opam/ocaml-base-compiler.4.09.0/.opam-switch/build/coq-geocoq.dev
# command ~/.opam/opam-init/hooks/sandbox.sh build make -j4
# exit-code 2
# env-file ~/.opam/log/coq-geocoq-5449-0a5907.env
# output-file ~/.opam/log/coq-geocoq-5449-0a5907.out
### output ###
# [...]
# [notation-overridden,parsing]
# File "./Meta_theory/Models/POF_to_Tarski.v", line 2, characters 0-69:
# Warning: Notation "_ * _" was already used in scope nat_scope.
# [notation-overridden,parsing]
# File "./Meta_theory/Models/POF_to_Tarski.v", line 5, characters 43-48:
# Error: Unable to locate library order with prefix mathcomp.
#
# Makefile:672: recipe for target 'Meta_theory/Models/POF_to_Tarski.vo' failed
# make[1]: *** [Meta_theory/Models/POF_to_Tarski.vo] Error 1
# make[1]: *** Waiting for unfinished jobs....
# Makefile:326: recipe for target 'all' failed
# make: *** [all] Error 2
<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
+- The following actions failed
| - build coq-geocoq dev
+-
- No changes have been performed
# Run eval $(opam env) to update the current shell environment
</pre></dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Missing removes</dt>
<dd>
none
</dd>
<dt>Wrong removes</dt>
<dd>
none
</dd>
</dl>
</div>
</div>
</div>
<hr/>
<div class="footer">
<p class="text-center">
<small>Sources are on <a href="https://github.com/coq-bench">GitHub</a>. © Guillaume Claret.</small>
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
| {
"content_hash": "c61f3abd95d01818cf03ca471a99b449",
"timestamp": "",
"source": "github",
"line_count": 210,
"max_line_length": 278,
"avg_line_length": 47.67142857142857,
"alnum_prop": 0.5624812706023374,
"repo_name": "coq-bench/coq-bench.github.io",
"id": "96e75b36d8cc152c6abac30cd59feafec7caf806",
"size": "10013",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "clean/Linux-x86_64-4.09.0-2.0.5/extra-dev/dev/geocoq/dev.html",
"mode": "33188",
"license": "mit",
"language": [],
"symlink_target": ""
} |
template<typename T>
void operator >> (const YAML::Node& node, T& i)
{
i = node.as<T>();
}
#endif
class StopPointSender{
public:
StopPointSender();
void run();
private:
std::string robot_frame_, world_frame_;
tf::TransformListener tf_listener_;
ros::Rate rate_;
ros::Publisher stop_point_pub_;
geometry_msgs::PointStamped stop_area_center_;
geometry_msgs::PointStamped stop_point;
bool done_sending_the_topic;
bool readFile(const std::string &filename);
void sleep();
void setStopAreaCenter(double x, double y, double z);
bool onStopArea(double dist_err = 1.0);
tf::StampedTransform getRobotPosGL();
void setStopPoint(double x, double y, double z);
void pulishStopPoint();
};
StopPointSender::StopPointSender() :
rate_(10), done_sending_the_topic(false)
{
ros::NodeHandle private_nh("~");
private_nh.param("robot_frame", robot_frame_, std::string("/base_link"));
private_nh.param("world_frame", world_frame_, std::string("/map"));
double max_update_rate;
private_nh.param("max_update_rate", max_update_rate, 10.0);
rate_ = ros::Rate(max_update_rate);
std::string filename = "";
private_nh.param("filename", filename, filename);
if(filename != ""){
ROS_INFO_STREAM("Read waypoints data from " << filename);
readFile(filename);
}
ros::NodeHandle nh;
stop_point_pub_ = nh.advertise<geometry_msgs::PointStamped>("/stop_point", 1);
}
bool StopPointSender::readFile(const std::string &filename)
{
try{
std::ifstream ifs(filename.c_str(), std::ifstream::in);
if(ifs.good() == false){
return false;
}
YAML::Node node;
#ifdef NEW_YAMLCPP
node = YAML::Load(ifs);
#else
YAML::Parser parser(ifs);
parser.GetNextDocument(node);
#endif
#ifdef NEW_YAMLCPP
const YAML::Node &sa_node_tmp = node["stop_area_center"];
const YAML::Node *sa_node = sa_node_tmp ? &sa_node_tmp : NULL;
#else
const YAML::Node *sa_node = node.FindValue("stop_area_center");
#endif
if(sa_node != NULL){
double x, y, z;
(*sa_node)["center"]["x"] >> x;
(*sa_node)["center"]["y"] >> y;
(*sa_node)["center"]["z"] >> z;
setStopAreaCenter(x, y, z);
}else{
return false;
}
const YAML::Node &sp_node_tmp = node["stop_point"];
const YAML::Node *sp_node = sp_node_tmp ? &sp_node_tmp : NULL;
if(sp_node != NULL){
double x, y, z;
(*sp_node)["point"]["x"] >> x;
(*sp_node)["point"]["y"] >> y;
(*sp_node)["point"]["z"] >> z;
setStopPoint(x, y, z);
}else{
return false;
}
}catch(YAML::ParserException &e){
return false;
}catch(YAML::RepresentationException &e){
return false;
}
return true;
}
void StopPointSender::run(){
while(ros::ok()){
if (!done_sending_the_topic) {
while(!onStopArea() && ros::ok()){
sleep();
}
pulishStopPoint();
done_sending_the_topic=true;
}
sleep();
}
}
void StopPointSender::sleep(){
rate_.sleep();
ros::spinOnce();
}
void StopPointSender::setStopAreaCenter(double x, double y, double z)
{
stop_area_center_.point.x = x;
stop_area_center_.point.y = y;
stop_area_center_.point.z = z;
}
bool StopPointSender::onStopArea(double dist_err){
tf::StampedTransform robot_gl = getRobotPosGL();
const double wx = stop_area_center_.point.x;
const double wy = stop_area_center_.point.y;
const double rx = robot_gl.getOrigin().x();
const double ry = robot_gl.getOrigin().y();
const double dist = std::sqrt(std::pow(wx - rx, 2) + std::pow(wy - ry, 2));
return dist < dist_err;
}
tf::StampedTransform StopPointSender::getRobotPosGL()
{
tf::StampedTransform robot_gl;
try{
tf_listener_.waitForTransform(world_frame_, robot_frame_, ros::Time(0.0), ros::Duration(4.0));
tf_listener_.lookupTransform(world_frame_, robot_frame_, ros::Time(0.0), robot_gl);
}catch(tf::TransformException &e){
ROS_WARN_STREAM("tf::TransformException: " << e.what());
}
return robot_gl;
}
void StopPointSender::setStopPoint(double x, double y, double z)
{
stop_point.point.x = x;
stop_point.point.y = y;
stop_point.point.z = z;
}
void StopPointSender::pulishStopPoint()
{
stop_point.header.frame_id = world_frame_;
stop_point.header.stamp = ros::Time::now();
stop_point_pub_.publish(stop_point);
ROS_INFO("%.6f %.6f %.6f",
stop_point.point.x,
stop_point.point.y,
stop_point.point.z);
}
int main(int argc, char *argv[]){
ros::init(argc, argv, "stoppoint_sender");
StopPointSender sps;
sps.run();
return 0;
}
| {
"content_hash": "6ebd086175ab00178a9a593c784ea459",
"timestamp": "",
"source": "github",
"line_count": 189,
"max_line_length": 100,
"avg_line_length": 24.656084656084655,
"alnum_prop": 0.617381974248927,
"repo_name": "open-rdc/orne_navigation",
"id": "1a52f293f0a22a9f3bdbb504c1e5a98704e3891e",
"size": "4891",
"binary": false,
"copies": "1",
"ref": "refs/heads/melodic-devel",
"path": "orne_stoppoint_manager/src/stoppoint_sender.cpp",
"mode": "33188",
"license": "bsd-2-clause",
"language": [
{
"name": "C++",
"bytes": "18859"
},
{
"name": "CMake",
"bytes": "35449"
},
{
"name": "Python",
"bytes": "34603"
},
{
"name": "Shell",
"bytes": "809"
}
],
"symlink_target": ""
} |
'use strict';
import {
Subscription
}
from '@hoist/model';
import SubscriptionWrapper from '../../lib/subscription_wrapper';
import {
expect
}
from 'chai';
import sinon from 'sinon';
describe('SubscriptionWrapper', function () {
var subscriptionWrapper;
var subscription;
describe('#get', function () {
before(function () {
subscription = new Subscription({
meta: {
existingKey: 'value'
}
});
subscriptionWrapper = new SubscriptionWrapper(subscription);
});
it('returns existing properties', function () {
return expect(subscriptionWrapper.get('existingKey')).to.eql('value');
});
it('returns undef if property doesn\'t exist', function () {
return expect(subscriptionWrapper.get('nothing')).to.not.exist;
});
});
describe('#set', function () {
before(function () {
subscription = new Subscription({
meta: {
existingKey: 'value'
}
});
subscriptionWrapper = new SubscriptionWrapper(subscription);
});
it('updates existing properties', function () {
subscriptionWrapper.set('existingKey', 'newValue');
return expect(subscription.meta.existingKey).to.eql('newValue');
});
it('creates new properties', function () {
subscriptionWrapper.set('newKey', 'newValue');
return expect(subscription.meta.newKey).to.eql('newValue');
});
});
describe('#save', function () {
before(function () {
subscription = new Subscription({
meta: {
existingKey: 'value'
}
});
subscriptionWrapper = new SubscriptionWrapper(subscription);
sinon.stub(subscription, 'saveAsync').returns(Promise.resolve(null));
return subscriptionWrapper.save();
});
after(function () {
subscription.saveAsync.restore();
});
it('calls save on underlying subscription', function () {
return expect(subscription.saveAsync).to.have.been.called;
});
});
});
| {
"content_hash": "6fbac0aa459af742d7d960d431467598",
"timestamp": "",
"source": "github",
"line_count": 69,
"max_line_length": 76,
"avg_line_length": 28.869565217391305,
"alnum_prop": 0.6255020080321285,
"repo_name": "hoist/hoist-poller",
"id": "5c65d93c3e33e57e00200fcdea25b41ea3465233",
"size": "1992",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "tests/unit_tests/subscription_wrapper_tests.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "JavaScript",
"bytes": "34657"
},
{
"name": "Shell",
"bytes": "261"
}
],
"symlink_target": ""
} |
using namespace simpla;
int main(int argc, char** argv) {
parallel::Initialize(argc, argv);
std::cout << "[" << GLOBAL_COMM.rank() << "]"
<< parallel::gather_string("rank[" + std::to_string(GLOBAL_COMM.rank()) + "]", 2) << std::endl;
std::cout << "[" << GLOBAL_COMM.rank() << "]"
<< parallel::gather_string("rank[" + std::to_string(GLOBAL_COMM.rank()) + "]", -1) << std::endl;
parallel::Finalize();
} | {
"content_hash": "e2e969b0a1f6f1f829b8203b9fa0f7b6",
"timestamp": "",
"source": "github",
"line_count": 10,
"max_line_length": 110,
"avg_line_length": 44.5,
"alnum_prop": 0.5393258426966292,
"repo_name": "simpla-fusion/SimPla",
"id": "e2080b45e3b5df31b210d0e306b949f5f30a7872",
"size": "614",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "test/parallel/mpi_string_dummy.cpp",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "C",
"bytes": "1018"
},
{
"name": "C++",
"bytes": "1351546"
},
{
"name": "CMake",
"bytes": "188945"
},
{
"name": "Lua",
"bytes": "27538"
},
{
"name": "Python",
"bytes": "9634"
}
],
"symlink_target": ""
} |
package bio.terra.stairway.queue;
import bio.terra.stairway.impl.StairwayImpl;
/**
* QueueMessage is a base class for messages put in the Stairway work queue. It defines the format
* version number of the message. If the format changes, that will need to cascade through the
* subclasses.
*/
abstract class QueueMessage {
static final String FORMAT_VERSION = "1";
abstract boolean process(StairwayImpl stairway) throws InterruptedException;
}
| {
"content_hash": "adadee0d943d73175e7df1b7986e65e3",
"timestamp": "",
"source": "github",
"line_count": 14,
"max_line_length": 98,
"avg_line_length": 32.42857142857143,
"alnum_prop": 0.775330396475771,
"repo_name": "DataBiosphere/stairway",
"id": "da34d1e8f2214ad419b7282efdfeda3ae085bb5e",
"size": "454",
"binary": false,
"copies": "1",
"ref": "refs/heads/develop",
"path": "stairway/src/main/java/bio/terra/stairway/queue/QueueMessage.java",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "Groovy",
"bytes": "2130"
},
{
"name": "Java",
"bytes": "482354"
},
{
"name": "Shell",
"bytes": "304"
}
],
"symlink_target": ""
} |
export default function anonymous(data, helper
/**/) {
data = data || {};helper = helper || {};var _e = helper.escape ? helper.escape : function (s) {return s;};var _s = '<ul class="toc-link-list"></ul>';return _s;
};
| {
"content_hash": "3188a12552c9d03e4422343ffec56c71",
"timestamp": "",
"source": "github",
"line_count": 4,
"max_line_length": 163,
"avg_line_length": 55.5,
"alnum_prop": 0.6081081081081081,
"repo_name": "leungwensen/toc-generator",
"id": "6cec43ee5a77bb1d3acba2b55215af87bbd21a16",
"size": "222",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/template/link-list.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "39616"
},
{
"name": "HTML",
"bytes": "1625"
},
{
"name": "JavaScript",
"bytes": "1393929"
},
{
"name": "Makefile",
"bytes": "346"
}
],
"symlink_target": ""
} |
$(function(){
initNoSysRoleList();
initHasSysRoleList();
$.parser.parse();//重新加载样式
initPagePermission(); //权限初始化
});
function initNoSysRoleList(){
var spId=$('#spId').val();
var myBasePath=basePath+'noSysRoleListPermission';
$('#noSysRoleList').empty();
$.post(myBasePath,{ spId: spId },function (dt){
dt=JSON.parse(dt);
$.each(dt,function (index,el){
$('#noSysRoleList').append('<option value="'+el.SRID+'">'+el.SRNAME+'</option>');
});
});
}
function initHasSysRoleList(){
var spId=$('#spId').val();
var myBasePath=basePath+'hasSysRoleListPermission';
$('#srIds').empty();
$.post(myBasePath,{ spId: spId },function (dt){
dt=JSON.parse(dt);
$.each(dt,function (index,el){
$('#srIds').append('<option value="'+el.SRID+'">'+el.SRNAME+'</option>');
});
});
}
function submitForm(){
var spId=$('#spId').val();
var srIds=getSelectValues('srIds');
var myBasePath=$('#fm').attr("action");
$.post(myBasePath,
{
spId: spId,
srIds:srIds
},function (dt){
toastr.info(dt, '添加结果');
}
);
}
/**
* 初始化权限,将没权限的按钮移除
*/
function initPagePermission(){
isExistPermission('rolePermissionProc:post','saveBt');
} | {
"content_hash": "421cf99f2e3a0691aad2d4da02a379e0",
"timestamp": "",
"source": "github",
"line_count": 58,
"max_line_length": 84,
"avg_line_length": 21.29310344827586,
"alnum_prop": 0.5919028340080972,
"repo_name": "brucevsked/simcustc1",
"id": "ba8ca8124aedefea9f21900da5a19c68118b277e",
"size": "1293",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "src/main/webapp/static/js/project/rolePermissionList.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "121"
},
{
"name": "Java",
"bytes": "1521233"
},
{
"name": "PLSQL",
"bytes": "57771"
}
],
"symlink_target": ""
} |
package Paws::CloudFront::CacheBehaviors;
use Moose;
has Items => (is => 'ro', isa => 'ArrayRef[Paws::CloudFront::CacheBehavior]', request_name => 'CacheBehavior', traits => ['NameInRequest']);
has Quantity => (is => 'ro', isa => 'Int', required => 1);
1;
### main pod documentation begin ###
=head1 NAME
Paws::CloudFront::CacheBehaviors
=head1 USAGE
This class represents one of two things:
=head3 Arguments in a call to a service
Use the attributes of this class as arguments to methods. You shouldn't make instances of this class.
Each attribute should be used as a named argument in the calls that expect this type of object.
As an example, if Att1 is expected to be a Paws::CloudFront::CacheBehaviors object:
$service_obj->Method(Att1 => { Items => $value, ..., Quantity => $value });
=head3 Results returned from an API call
Use accessors for each attribute. If Att1 is expected to be an Paws::CloudFront::CacheBehaviors object:
$result = $service_obj->Method(...);
$result->Att1->Items
=head1 DESCRIPTION
A complex type that contains zero or more C<CacheBehavior> elements.
=head1 ATTRIBUTES
=head2 Items => ArrayRef[L<Paws::CloudFront::CacheBehavior>]
Optional: A complex type that contains cache behaviors for this
distribution. If C<Quantity> is C<0>, you can omit C<Items>.
=head2 B<REQUIRED> Quantity => Int
The number of cache behaviors for this distribution.
=head1 SEE ALSO
This class forms part of L<Paws>, describing an object used in L<Paws::CloudFront>
=head1 BUGS and CONTRIBUTIONS
The source code is located here: https://github.com/pplu/aws-sdk-perl
Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues
=cut
| {
"content_hash": "1223bacaf6dd76969a1a86d07724d42e",
"timestamp": "",
"source": "github",
"line_count": 63,
"max_line_length": 142,
"avg_line_length": 26.857142857142858,
"alnum_prop": 0.7287234042553191,
"repo_name": "ioanrogers/aws-sdk-perl",
"id": "a5bff0e5ef6420348beab5970d19c6d97857093a",
"size": "1692",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "auto-lib/Paws/CloudFront/CacheBehaviors.pm",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Makefile",
"bytes": "1292"
},
{
"name": "Perl",
"bytes": "20360380"
},
{
"name": "Perl 6",
"bytes": "99393"
},
{
"name": "Shell",
"bytes": "445"
}
],
"symlink_target": ""
} |
package net.kuujo.vertigo.util;
/**
* Purely for syntactic sugar when handling branching in vertigo components.
*
* @author <a href="http://github.com/ef-labs">Magnus Koch</a>
*/
public class AckAggregator<T> extends IncrementalCompletionHandler<T> {
}
| {
"content_hash": "5b7e6efb1dc3ec38d2368551de1021e9",
"timestamp": "",
"source": "github",
"line_count": 10,
"max_line_length": 76,
"avg_line_length": 25.9,
"alnum_prop": 0.7374517374517374,
"repo_name": "englishtown/vertigo",
"id": "e767d8d1c7c2f9ba570a5d1e77da90b115c13b5a",
"size": "869",
"binary": false,
"copies": "1",
"ref": "refs/heads/feature/LP-601",
"path": "core/src/main/java/net/kuujo/vertigo/util/AckAggregator.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "615108"
},
{
"name": "Shell",
"bytes": "200"
}
],
"symlink_target": ""
} |
package uk.co.ben_gibson.git.link.test.Git;
import junit.framework.TestCase;
import uk.co.ben_gibson.git.link.Git.Branch;
public class BranchTest extends TestCase
{
public void testCanBeCastToString()
{
Branch branch = new Branch("dev");
assertSame("dev", branch.toString());
}
public void testCanCreateMasterBranch()
{
Branch branch = Branch.master();
assertSame("master", branch.toString());
}
}
| {
"content_hash": "e2a65e12f95aad0655c9d2828b494cb4",
"timestamp": "",
"source": "github",
"line_count": 21,
"max_line_length": 48,
"avg_line_length": 21.857142857142858,
"alnum_prop": 0.6623093681917211,
"repo_name": "ben-gibson/remote-repository-mapper",
"id": "a90a73e5b79a03e86bf155ebdf477c23e7ec29be",
"size": "459",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "tests/unit/uk/co/ben_gibson/git/link/test/Git/BranchTest.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Java",
"bytes": "52039"
}
],
"symlink_target": ""
} |
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="robots" content="noindex">
<title>File vendor/mikey179/vfsStream/examples/ExampleTestCaseOldWay.php | Practica2_Servidor</title>
<link rel="stylesheet" href="resources/style.css?e99947befd7bf673c6b43ff75e9e0f170c88a60e">
</head>
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
<div id="groups">
<h3>Namespaces</h3>
<ul>
<li>
<a href="namespace-Composer.html">
Composer<span></span>
</a>
<ul>
<li>
<a href="namespace-Composer.Autoload.html">
Autoload </a>
</li>
</ul></li>
<li>
<a href="namespace-None.html">
None </a>
</li>
<li>
<a href="namespace-org.html">
org<span></span>
</a>
<ul>
<li>
<a href="namespace-org.bovigo.html">
bovigo<span></span>
</a>
<ul>
<li>
<a href="namespace-org.bovigo.vfs.html">
vfs<span></span>
</a>
<ul>
<li>
<a href="namespace-org.bovigo.vfs.example.html">
example </a>
</li>
<li>
<a href="namespace-org.bovigo.vfs.visitor.html">
visitor </a>
</li>
</ul></li></ul></li></ul></li>
<li>
<a href="namespace-PHP.html">
PHP </a>
</li>
</ul>
</div>
<hr>
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-AdvancedValueBinderTest.html">AdvancedValueBinderTest</a></li>
<li><a href="class-Agregador.html" class="invalid">Agregador</a></li>
<li><a href="class-AutofilterColumnTest.html">AutofilterColumnTest</a></li>
<li><a href="class-AutoFilterTest.html">AutoFilterTest</a></li>
<li><a href="class-AutoloaderTest.html">AutoloaderTest</a></li>
<li><a href="class-CalculationTest.html">CalculationTest</a></li>
<li><a href="class-Camiseta.html">Camiseta</a></li>
<li><a href="class-Carrito.html">Carrito</a></li>
<li><a href="class-Carro.html">Carro</a></li>
<li><a href="class-Categorias.html">Categorias</a></li>
<li><a href="class-CellCollectionTest.html">CellCollectionTest</a></li>
<li><a href="class-CellTest.html">CellTest</a></li>
<li><a href="class-CholeskyDecomposition.html">CholeskyDecomposition</a></li>
<li><a href="class-CI_Benchmark.html" class="invalid">CI_Benchmark</a></li>
<li><a href="class-CI_Cache.html" class="invalid">CI_Cache</a></li>
<li><a href="class-CI_Cache_apc.html" class="invalid">CI_Cache_apc</a></li>
<li><a href="class-CI_Cache_dummy.html" class="invalid">CI_Cache_dummy</a></li>
<li><a href="class-CI_Cache_file.html" class="invalid">CI_Cache_file</a></li>
<li><a href="class-CI_Cache_memcached.html" class="invalid">CI_Cache_memcached</a></li>
<li><a href="class-CI_Cache_redis.html">CI_Cache_redis</a></li>
<li><a href="class-CI_Cache_wincache.html">CI_Cache_wincache</a></li>
<li><a href="class-CI_Calendar.html" class="invalid">CI_Calendar</a></li>
<li><a href="class-CI_Cart.html" class="invalid">CI_Cart</a></li>
<li><a href="class-CI_Config.html" class="invalid">CI_Config</a></li>
<li><a href="class-CI_Controller.html" class="invalid">CI_Controller</a></li>
<li><a href="class-CI_DB_active_record.html">CI_DB_active_record</a></li>
<li><a href="class-CI_DB_Cache.html" class="invalid">CI_DB_Cache</a></li>
<li><a href="class-CI_DB_cubrid_driver.html" class="invalid">CI_DB_cubrid_driver</a></li>
<li><a href="class-CI_DB_cubrid_forge.html" class="invalid">CI_DB_cubrid_forge</a></li>
<li><a href="class-CI_DB_cubrid_result.html" class="invalid">CI_DB_cubrid_result</a></li>
<li><a href="class-CI_DB_cubrid_utility.html" class="invalid">CI_DB_cubrid_utility</a></li>
<li><a href="class-CI_DB_driver.html" class="invalid">CI_DB_driver</a></li>
<li><a href="class-CI_DB_forge.html" class="invalid">CI_DB_forge</a></li>
<li><a href="class-CI_DB_ibase_driver.html">CI_DB_ibase_driver</a></li>
<li><a href="class-CI_DB_ibase_forge.html">CI_DB_ibase_forge</a></li>
<li><a href="class-CI_DB_ibase_result.html">CI_DB_ibase_result</a></li>
<li><a href="class-CI_DB_ibase_utility.html">CI_DB_ibase_utility</a></li>
<li><a href="class-CI_DB_mssql_driver.html" class="invalid">CI_DB_mssql_driver</a></li>
<li><a href="class-CI_DB_mssql_forge.html" class="invalid">CI_DB_mssql_forge</a></li>
<li><a href="class-CI_DB_mssql_result.html" class="invalid">CI_DB_mssql_result</a></li>
<li><a href="class-CI_DB_mssql_utility.html" class="invalid">CI_DB_mssql_utility</a></li>
<li><a href="class-CI_DB_mysql_driver.html" class="invalid">CI_DB_mysql_driver</a></li>
<li><a href="class-CI_DB_mysql_forge.html" class="invalid">CI_DB_mysql_forge</a></li>
<li><a href="class-CI_DB_mysql_result.html" class="invalid">CI_DB_mysql_result</a></li>
<li><a href="class-CI_DB_mysql_utility.html" class="invalid">CI_DB_mysql_utility</a></li>
<li><a href="class-CI_DB_mysqli_driver.html" class="invalid">CI_DB_mysqli_driver</a></li>
<li><a href="class-CI_DB_mysqli_forge.html" class="invalid">CI_DB_mysqli_forge</a></li>
<li><a href="class-CI_DB_mysqli_result.html" class="invalid">CI_DB_mysqli_result</a></li>
<li><a href="class-CI_DB_mysqli_utility.html" class="invalid">CI_DB_mysqli_utility</a></li>
<li><a href="class-CI_DB_oci8_driver.html" class="invalid">CI_DB_oci8_driver</a></li>
<li><a href="class-CI_DB_oci8_forge.html" class="invalid">CI_DB_oci8_forge</a></li>
<li><a href="class-CI_DB_oci8_result.html" class="invalid">CI_DB_oci8_result</a></li>
<li><a href="class-CI_DB_oci8_utility.html" class="invalid">CI_DB_oci8_utility</a></li>
<li><a href="class-CI_DB_odbc_driver.html" class="invalid">CI_DB_odbc_driver</a></li>
<li><a href="class-CI_DB_odbc_forge.html" class="invalid">CI_DB_odbc_forge</a></li>
<li><a href="class-CI_DB_odbc_result.html" class="invalid">CI_DB_odbc_result</a></li>
<li><a href="class-CI_DB_odbc_utility.html" class="invalid">CI_DB_odbc_utility</a></li>
<li><a href="class-CI_DB_pdo_4d_driver.html">CI_DB_pdo_4d_driver</a></li>
<li><a href="class-CI_DB_pdo_4d_forge.html">CI_DB_pdo_4d_forge</a></li>
<li><a href="class-CI_DB_pdo_cubrid_driver.html">CI_DB_pdo_cubrid_driver</a></li>
<li><a href="class-CI_DB_pdo_cubrid_forge.html">CI_DB_pdo_cubrid_forge</a></li>
<li><a href="class-CI_DB_pdo_dblib_driver.html">CI_DB_pdo_dblib_driver</a></li>
<li><a href="class-CI_DB_pdo_dblib_forge.html">CI_DB_pdo_dblib_forge</a></li>
<li><a href="class-CI_DB_pdo_driver.html" class="invalid">CI_DB_pdo_driver</a></li>
<li><a href="class-CI_DB_pdo_firebird_driver.html">CI_DB_pdo_firebird_driver</a></li>
<li><a href="class-CI_DB_pdo_firebird_forge.html">CI_DB_pdo_firebird_forge</a></li>
<li><a href="class-CI_DB_pdo_forge.html" class="invalid">CI_DB_pdo_forge</a></li>
<li><a href="class-CI_DB_pdo_ibm_driver.html">CI_DB_pdo_ibm_driver</a></li>
<li><a href="class-CI_DB_pdo_ibm_forge.html">CI_DB_pdo_ibm_forge</a></li>
<li><a href="class-CI_DB_pdo_informix_driver.html">CI_DB_pdo_informix_driver</a></li>
<li><a href="class-CI_DB_pdo_informix_forge.html">CI_DB_pdo_informix_forge</a></li>
<li><a href="class-CI_DB_pdo_mysql_driver.html">CI_DB_pdo_mysql_driver</a></li>
<li><a href="class-CI_DB_pdo_mysql_forge.html">CI_DB_pdo_mysql_forge</a></li>
<li><a href="class-CI_DB_pdo_oci_driver.html">CI_DB_pdo_oci_driver</a></li>
<li><a href="class-CI_DB_pdo_oci_forge.html">CI_DB_pdo_oci_forge</a></li>
<li><a href="class-CI_DB_pdo_odbc_driver.html">CI_DB_pdo_odbc_driver</a></li>
<li><a href="class-CI_DB_pdo_odbc_forge.html">CI_DB_pdo_odbc_forge</a></li>
<li><a href="class-CI_DB_pdo_pgsql_driver.html">CI_DB_pdo_pgsql_driver</a></li>
<li><a href="class-CI_DB_pdo_pgsql_forge.html">CI_DB_pdo_pgsql_forge</a></li>
<li><a href="class-CI_DB_pdo_result.html" class="invalid">CI_DB_pdo_result</a></li>
<li><a href="class-CI_DB_pdo_sqlite_driver.html">CI_DB_pdo_sqlite_driver</a></li>
<li><a href="class-CI_DB_pdo_sqlite_forge.html">CI_DB_pdo_sqlite_forge</a></li>
<li><a href="class-CI_DB_pdo_sqlsrv_driver.html">CI_DB_pdo_sqlsrv_driver</a></li>
<li><a href="class-CI_DB_pdo_sqlsrv_forge.html">CI_DB_pdo_sqlsrv_forge</a></li>
<li><a href="class-CI_DB_pdo_utility.html" class="invalid">CI_DB_pdo_utility</a></li>
<li><a href="class-CI_DB_postgre_driver.html" class="invalid">CI_DB_postgre_driver</a></li>
<li><a href="class-CI_DB_postgre_forge.html" class="invalid">CI_DB_postgre_forge</a></li>
<li><a href="class-CI_DB_postgre_result.html" class="invalid">CI_DB_postgre_result</a></li>
<li><a href="class-CI_DB_postgre_utility.html" class="invalid">CI_DB_postgre_utility</a></li>
<li><a href="class-CI_DB_query_builder.html">CI_DB_query_builder</a></li>
<li><a href="class-CI_DB_result.html" class="invalid">CI_DB_result</a></li>
<li><a href="class-CI_DB_sqlite3_driver.html">CI_DB_sqlite3_driver</a></li>
<li><a href="class-CI_DB_sqlite3_forge.html">CI_DB_sqlite3_forge</a></li>
<li><a href="class-CI_DB_sqlite3_result.html">CI_DB_sqlite3_result</a></li>
<li><a href="class-CI_DB_sqlite3_utility.html">CI_DB_sqlite3_utility</a></li>
<li><a href="class-CI_DB_sqlite_driver.html" class="invalid">CI_DB_sqlite_driver</a></li>
<li><a href="class-CI_DB_sqlite_forge.html" class="invalid">CI_DB_sqlite_forge</a></li>
<li><a href="class-CI_DB_sqlite_result.html" class="invalid">CI_DB_sqlite_result</a></li>
<li><a href="class-CI_DB_sqlite_utility.html" class="invalid">CI_DB_sqlite_utility</a></li>
<li><a href="class-CI_DB_sqlsrv_driver.html" class="invalid">CI_DB_sqlsrv_driver</a></li>
<li><a href="class-CI_DB_sqlsrv_forge.html" class="invalid">CI_DB_sqlsrv_forge</a></li>
<li><a href="class-CI_DB_sqlsrv_result.html" class="invalid">CI_DB_sqlsrv_result</a></li>
<li><a href="class-CI_DB_sqlsrv_utility.html" class="invalid">CI_DB_sqlsrv_utility</a></li>
<li><a href="class-CI_DB_utility.html" class="invalid">CI_DB_utility</a></li>
<li><a href="class-CI_Driver.html" class="invalid">CI_Driver</a></li>
<li><a href="class-CI_Driver_Library.html" class="invalid">CI_Driver_Library</a></li>
<li><a href="class-CI_Email.html" class="invalid">CI_Email</a></li>
<li><a href="class-CI_Encrypt.html" class="invalid">CI_Encrypt</a></li>
<li><a href="class-CI_Encryption.html">CI_Encryption</a></li>
<li><a href="class-CI_Exceptions.html" class="invalid">CI_Exceptions</a></li>
<li><a href="class-CI_Form_validation.html" class="invalid">CI_Form_validation</a></li>
<li><a href="class-CI_FTP.html" class="invalid">CI_FTP</a></li>
<li><a href="class-CI_Hooks.html" class="invalid">CI_Hooks</a></li>
<li><a href="class-CI_Image_lib.html" class="invalid">CI_Image_lib</a></li>
<li><a href="class-CI_Input.html" class="invalid">CI_Input</a></li>
<li><a href="class-CI_Javascript.html" class="invalid">CI_Javascript</a></li>
<li><a href="class-CI_Jquery.html" class="invalid">CI_Jquery</a></li>
<li><a href="class-CI_Lang.html" class="invalid">CI_Lang</a></li>
<li><a href="class-CI_Loader.html" class="invalid">CI_Loader</a></li>
<li><a href="class-CI_Log.html" class="invalid">CI_Log</a></li>
<li><a href="class-CI_Migration.html" class="invalid">CI_Migration</a></li>
<li><a href="class-CI_Model.html" class="invalid">CI_Model</a></li>
<li><a href="class-CI_Output.html" class="invalid">CI_Output</a></li>
<li><a href="class-CI_Pagination.html" class="invalid">CI_Pagination</a></li>
<li><a href="class-CI_Parser.html" class="invalid">CI_Parser</a></li>
<li><a href="class-CI_Profiler.html" class="invalid">CI_Profiler</a></li>
<li><a href="class-CI_Router.html" class="invalid">CI_Router</a></li>
<li><a href="class-CI_Security.html" class="invalid">CI_Security</a></li>
<li><a href="class-CI_Session.html" class="invalid">CI_Session</a></li>
<li><a href="class-CI_Session_database_driver.html">CI_Session_database_driver</a></li>
<li><a href="class-CI_Session_driver.html">CI_Session_driver</a></li>
<li><a href="class-CI_Session_files_driver.html">CI_Session_files_driver</a></li>
<li><a href="class-CI_Session_memcached_driver.html">CI_Session_memcached_driver</a></li>
<li><a href="class-CI_Session_redis_driver.html">CI_Session_redis_driver</a></li>
<li><a href="class-CI_SHA1.html">CI_SHA1</a></li>
<li><a href="class-CI_Table.html" class="invalid">CI_Table</a></li>
<li><a href="class-CI_Trackback.html" class="invalid">CI_Trackback</a></li>
<li><a href="class-CI_Typography.html" class="invalid">CI_Typography</a></li>
<li><a href="class-CI_Unit_test.html" class="invalid">CI_Unit_test</a></li>
<li><a href="class-CI_Upload.html" class="invalid">CI_Upload</a></li>
<li><a href="class-CI_URI.html" class="invalid">CI_URI</a></li>
<li><a href="class-CI_User_agent.html" class="invalid">CI_User_agent</a></li>
<li><a href="class-CI_Utf8.html" class="invalid">CI_Utf8</a></li>
<li><a href="class-CI_Xmlrpc.html" class="invalid">CI_Xmlrpc</a></li>
<li><a href="class-CI_Xmlrpcs.html" class="invalid">CI_Xmlrpcs</a></li>
<li><a href="class-CI_Zip.html" class="invalid">CI_Zip</a></li>
<li><a href="class-CodePageTest.html">CodePageTest</a></li>
<li><a href="class-ColorTest.html">ColorTest</a></li>
<li><a href="class-ColumnCellIteratorTest.html">ColumnCellIteratorTest</a></li>
<li><a href="class-ColumnIteratorTest.html">ColumnIteratorTest</a></li>
<li><a href="class-Complex.html">Complex</a></li>
<li><a href="class-complexAssert.html">complexAssert</a></li>
<li><a href="class-Composer.Autoload.ClassLoader.html">Composer\Autoload\ClassLoader</a></li>
<li><a href="class-ComposerAutoloaderInit03216eaa5a0e5a7f5bbbeeae5708a458.html">ComposerAutoloaderInit03216eaa5a0e5a7f5bbbeeae5708a458</a></li>
<li><a href="class-DataSeriesValuesTest.html">DataSeriesValuesTest</a></li>
<li><a href="class-DataTypeTest.html">DataTypeTest</a></li>
<li><a href="class-DateTest.html">DateTest</a></li>
<li><a href="class-DateTime.html">DateTime</a></li>
<li><a href="class-DateTimeTest.html">DateTimeTest</a></li>
<li><a href="class-DefaultValueBinderTest.html">DefaultValueBinderTest</a></li>
<li><a href="class-DOMCharacterData.html">DOMCharacterData</a></li>
<li><a href="class-DOMElement.html">DOMElement</a></li>
<li><a href="class-DOMNode.html">DOMNode</a></li>
<li><a href="class-DOMText.html">DOMText</a></li>
<li><a href="class-EigenvalueDecomposition.html">EigenvalueDecomposition</a></li>
<li><a href="class-EliminarUsuario.html">EliminarUsuario</a></li>
<li><a href="class-EngineeringTest.html">EngineeringTest</a></li>
<li><a href="class-Error404.html">Error404</a></li>
<li><a href="class-Excel.html">Excel</a></li>
<li><a href="class-FileTest.html">FileTest</a></li>
<li><a href="class-FinancialTest.html">FinancialTest</a></li>
<li><a href="class-FontTest.html">FontTest</a></li>
<li><a href="class-FPDF.html">FPDF</a></li>
<li><a href="class-FunctionsTest.html">FunctionsTest</a></li>
<li><a href="class-Gestor_Tiendas_Model.html">Gestor_Tiendas_Model</a></li>
<li><a href="class-HyperlinkTest.html">HyperlinkTest</a></li>
<li><a href="class-JSON_WebClient.html">JSON_WebClient</a></li>
<li><a href="class-JSON_WebServer_Controller.html" class="invalid">JSON_WebServer_Controller</a></li>
<li><a href="class-LayoutTest.html">LayoutTest</a></li>
<li><a href="class-LegendTest.html">LegendTest</a></li>
<li><a href="class-LogicalTest.html">LogicalTest</a></li>
<li><a href="class-Login.html">Login</a></li>
<li><a href="class-LookupRefTest.html">LookupRefTest</a></li>
<li><a href="class-Main.html">Main</a></li>
<li><a href="class-MathTrigTest.html">MathTrigTest</a></li>
<li><a href="class-Mdl_Agregador.html">Mdl_Agregador</a></li>
<li><a href="class-Mdl_camiseta.html">Mdl_camiseta</a></li>
<li><a href="class-Mdl_carrito.html">Mdl_carrito</a></li>
<li><a href="class-Mdl_categorias.html">Mdl_categorias</a></li>
<li><a href="class-Mdl_MisPedidos.html">Mdl_MisPedidos</a></li>
<li><a href="class-Mdl_pedidos.html">Mdl_pedidos</a></li>
<li><a href="class-Mdl_provincias.html">Mdl_provincias</a></li>
<li><a href="class-Mdl_restablecerCont.html">Mdl_restablecerCont</a></li>
<li><a href="class-Mdl_seleccionadas.html">Mdl_seleccionadas</a></li>
<li><a href="class-Mdl_usuarios.html">Mdl_usuarios</a></li>
<li><a href="class-Mdl_xml.html">Mdl_xml</a></li>
<li><a href="class-MisPedidos.html">MisPedidos</a></li>
<li><a href="class-ModificarCorrecto.html">ModificarCorrecto</a></li>
<li><a href="class-ModificarUsuario.html">ModificarUsuario</a></li>
<li><a href="class-Monedas.html">Monedas</a></li>
<li><a href="class-MyReadFilter.html">MyReadFilter</a></li>
<li><a href="class-NumberFormatTest.html">NumberFormatTest</a></li>
<li><a href="class-org.bovigo.vfs.example.Example.html">org\bovigo\vfs\example\Example</a></li>
<li><a href="class-org.bovigo.vfs.example.ExampleTestCaseOldWay.html">org\bovigo\vfs\example\ExampleTestCaseOldWay</a></li>
<li><a href="class-org.bovigo.vfs.example.ExampleTestCaseWithVfsStream.html">org\bovigo\vfs\example\ExampleTestCaseWithVfsStream</a></li>
<li><a href="class-org.bovigo.vfs.example.FailureExample.html">org\bovigo\vfs\example\FailureExample</a></li>
<li><a href="class-org.bovigo.vfs.example.FailureExampleTestCase.html">org\bovigo\vfs\example\FailureExampleTestCase</a></li>
<li><a href="class-org.bovigo.vfs.example.FilemodeExample.html">org\bovigo\vfs\example\FilemodeExample</a></li>
<li><a href="class-org.bovigo.vfs.example.FilemodeExampleTestCaseOldWay.html">org\bovigo\vfs\example\FilemodeExampleTestCaseOldWay</a></li>
<li><a href="class-org.bovigo.vfs.example.FilemodeExampleTestCaseWithVfsStream.html">org\bovigo\vfs\example\FilemodeExampleTestCaseWithVfsStream</a></li>
<li><a href="class-org.bovigo.vfs.example.FilePermissionsExample.html">org\bovigo\vfs\example\FilePermissionsExample</a></li>
<li><a href="class-org.bovigo.vfs.example.FilePermissionsExampleTestCase.html">org\bovigo\vfs\example\FilePermissionsExampleTestCase</a></li>
<li><a href="class-org.bovigo.vfs.QuotaTestCase.html">org\bovigo\vfs\QuotaTestCase</a></li>
<li><a href="class-org.bovigo.vfs.TestvfsStreamAbstractContent.html">org\bovigo\vfs\TestvfsStreamAbstractContent</a></li>
<li><a href="class-org.bovigo.vfs.TestvfsStreamWrapper.html">org\bovigo\vfs\TestvfsStreamWrapper</a></li>
<li><a href="class-org.bovigo.vfs.vfsStream.html">org\bovigo\vfs\vfsStream</a></li>
<li><a href="class-org.bovigo.vfs.vfsStreamAbstractContent.html">org\bovigo\vfs\vfsStreamAbstractContent</a></li>
<li><a href="class-org.bovigo.vfs.vfsStreamAbstractContentTestCase.html">org\bovigo\vfs\vfsStreamAbstractContentTestCase</a></li>
<li><a href="class-org.bovigo.vfs.vfsStreamContainerIterator.html">org\bovigo\vfs\vfsStreamContainerIterator</a></li>
<li><a href="class-org.bovigo.vfs.vfsStreamContainerIteratorTestCase.html">org\bovigo\vfs\vfsStreamContainerIteratorTestCase</a></li>
<li><a href="class-org.bovigo.vfs.vfsStreamDirectory.html">org\bovigo\vfs\vfsStreamDirectory</a></li>
<li><a href="class-org.bovigo.vfs.vfsStreamDirectoryIssue18TestCase.html">org\bovigo\vfs\vfsStreamDirectoryIssue18TestCase</a></li>
<li><a href="class-org.bovigo.vfs.vfsStreamDirectoryTestCase.html">org\bovigo\vfs\vfsStreamDirectoryTestCase</a></li>
<li><a href="class-org.bovigo.vfs.vfsStreamFile.html">org\bovigo\vfs\vfsStreamFile</a></li>
<li><a href="class-org.bovigo.vfs.vfsStreamFileTestCase.html">org\bovigo\vfs\vfsStreamFileTestCase</a></li>
<li><a href="class-org.bovigo.vfs.vfsStreamGlobTestCase.html">org\bovigo\vfs\vfsStreamGlobTestCase</a></li>
<li><a href="class-org.bovigo.vfs.vfsStreamResolveIncludePathTestCase.html">org\bovigo\vfs\vfsStreamResolveIncludePathTestCase</a></li>
<li><a href="class-org.bovigo.vfs.vfsStreamTestCase.html">org\bovigo\vfs\vfsStreamTestCase</a></li>
<li><a href="class-org.bovigo.vfs.vfsStreamUmaskTestCase.html">org\bovigo\vfs\vfsStreamUmaskTestCase</a></li>
<li><a href="class-org.bovigo.vfs.vfsStreamWrapper.html">org\bovigo\vfs\vfsStreamWrapper</a></li>
<li><a href="class-org.bovigo.vfs.vfsStreamWrapperAlreadyRegisteredTestCase.html">org\bovigo\vfs\vfsStreamWrapperAlreadyRegisteredTestCase</a></li>
<li><a href="class-org.bovigo.vfs.vfsStreamWrapperBaseTestCase.html">org\bovigo\vfs\vfsStreamWrapperBaseTestCase</a></li>
<li><a href="class-org.bovigo.vfs.vfsStreamWrapperDirSeparatorTestCase.html">org\bovigo\vfs\vfsStreamWrapperDirSeparatorTestCase</a></li>
<li><a href="class-org.bovigo.vfs.vfsStreamWrapperFileTestCase.html">org\bovigo\vfs\vfsStreamWrapperFileTestCase</a></li>
<li><a href="class-org.bovigo.vfs.vfsStreamWrapperFileTimesTestCase.html">org\bovigo\vfs\vfsStreamWrapperFileTimesTestCase</a></li>
<li><a href="class-org.bovigo.vfs.vfsStreamWrapperFlockTestCase.html">org\bovigo\vfs\vfsStreamWrapperFlockTestCase</a></li>
<li><a href="class-org.bovigo.vfs.vfsStreamWrapperMkDirTestCase.html">org\bovigo\vfs\vfsStreamWrapperMkDirTestCase</a></li>
<li><a href="class-org.bovigo.vfs.vfsStreamWrapperQuotaTestCase.html">org\bovigo\vfs\vfsStreamWrapperQuotaTestCase</a></li>
<li><a href="class-org.bovigo.vfs.vfsStreamWrapperRecordingProxy.html">org\bovigo\vfs\vfsStreamWrapperRecordingProxy</a></li>
<li><a href="class-org.bovigo.vfs.vfsStreamWrapperSelectStreamTestCase.html">org\bovigo\vfs\vfsStreamWrapperSelectStreamTestCase</a></li>
<li><a href="class-org.bovigo.vfs.vfsStreamWrapperSetOptionTestCase.html">org\bovigo\vfs\vfsStreamWrapperSetOptionTestCase</a></li>
<li><a href="class-org.bovigo.vfs.vfsStreamWrapperTestCase.html">org\bovigo\vfs\vfsStreamWrapperTestCase</a></li>
<li><a href="class-org.bovigo.vfs.vfsStreamWrapperWithoutRootTestCase.html">org\bovigo\vfs\vfsStreamWrapperWithoutRootTestCase</a></li>
<li><a href="class-org.bovigo.vfs.vfsStreamZipTestCase.html">org\bovigo\vfs\vfsStreamZipTestCase</a></li>
<li><a href="class-org.bovigo.vfs.visitor.vfsStreamAbstractVisitor.html">org\bovigo\vfs\visitor\vfsStreamAbstractVisitor</a></li>
<li><a href="class-org.bovigo.vfs.visitor.vfsStreamAbstractVisitorTestCase.html">org\bovigo\vfs\visitor\vfsStreamAbstractVisitorTestCase</a></li>
<li><a href="class-org.bovigo.vfs.visitor.vfsStreamPrintVisitor.html">org\bovigo\vfs\visitor\vfsStreamPrintVisitor</a></li>
<li><a href="class-org.bovigo.vfs.visitor.vfsStreamPrintVisitorTestCase.html">org\bovigo\vfs\visitor\vfsStreamPrintVisitorTestCase</a></li>
<li><a href="class-org.bovigo.vfs.visitor.vfsStreamStructureVisitor.html">org\bovigo\vfs\visitor\vfsStreamStructureVisitor</a></li>
<li><a href="class-org.bovigo.vfs.visitor.vfsStreamStructureVisitorTestCase.html">org\bovigo\vfs\visitor\vfsStreamStructureVisitorTestCase</a></li>
<li><a href="class-PasswordHasherTest.html">PasswordHasherTest</a></li>
<li><a href="class-PclZip.html">PclZip</a></li>
<li><a href="class-PDF.html" class="invalid">PDF</a></li>
<li><a href="class-Pedidos.html">Pedidos</a></li>
<li><a href="class-PHPExcel.html">PHPExcel</a></li>
<li><a href="class-PHPExcel_Autoloader.html">PHPExcel_Autoloader</a></li>
<li><a href="class-PHPExcel_Best_Fit.html">PHPExcel_Best_Fit</a></li>
<li><a href="class-PHPExcel_CachedObjectStorage_APC.html">PHPExcel_CachedObjectStorage_APC</a></li>
<li><a href="class-PHPExcel_CachedObjectStorage_CacheBase.html">PHPExcel_CachedObjectStorage_CacheBase</a></li>
<li><a href="class-PHPExcel_CachedObjectStorage_DiscISAM.html">PHPExcel_CachedObjectStorage_DiscISAM</a></li>
<li><a href="class-PHPExcel_CachedObjectStorage_Igbinary.html">PHPExcel_CachedObjectStorage_Igbinary</a></li>
<li><a href="class-PHPExcel_CachedObjectStorage_Memcache.html">PHPExcel_CachedObjectStorage_Memcache</a></li>
<li><a href="class-PHPExcel_CachedObjectStorage_Memory.html">PHPExcel_CachedObjectStorage_Memory</a></li>
<li><a href="class-PHPExcel_CachedObjectStorage_MemoryGZip.html">PHPExcel_CachedObjectStorage_MemoryGZip</a></li>
<li><a href="class-PHPExcel_CachedObjectStorage_MemorySerialized.html">PHPExcel_CachedObjectStorage_MemorySerialized</a></li>
<li><a href="class-PHPExcel_CachedObjectStorage_PHPTemp.html">PHPExcel_CachedObjectStorage_PHPTemp</a></li>
<li><a href="class-PHPExcel_CachedObjectStorage_SQLite.html">PHPExcel_CachedObjectStorage_SQLite</a></li>
<li><a href="class-PHPExcel_CachedObjectStorage_SQLite3.html">PHPExcel_CachedObjectStorage_SQLite3</a></li>
<li><a href="class-PHPExcel_CachedObjectStorage_Wincache.html">PHPExcel_CachedObjectStorage_Wincache</a></li>
<li><a href="class-PHPExcel_CachedObjectStorageFactory.html">PHPExcel_CachedObjectStorageFactory</a></li>
<li><a href="class-PHPExcel_CalcEngine_CyclicReferenceStack.html">PHPExcel_CalcEngine_CyclicReferenceStack</a></li>
<li><a href="class-PHPExcel_CalcEngine_Logger.html">PHPExcel_CalcEngine_Logger</a></li>
<li><a href="class-PHPExcel_Calculation.html">PHPExcel_Calculation</a></li>
<li><a href="class-PHPExcel_Calculation_Database.html">PHPExcel_Calculation_Database</a></li>
<li><a href="class-PHPExcel_Calculation_DateTime.html">PHPExcel_Calculation_DateTime</a></li>
<li><a href="class-PHPExcel_Calculation_Engineering.html">PHPExcel_Calculation_Engineering</a></li>
<li><a href="class-PHPExcel_Calculation_ExceptionHandler.html">PHPExcel_Calculation_ExceptionHandler</a></li>
<li><a href="class-PHPExcel_Calculation_Financial.html">PHPExcel_Calculation_Financial</a></li>
<li><a href="class-PHPExcel_Calculation_FormulaParser.html">PHPExcel_Calculation_FormulaParser</a></li>
<li><a href="class-PHPExcel_Calculation_FormulaToken.html">PHPExcel_Calculation_FormulaToken</a></li>
<li><a href="class-PHPExcel_Calculation_Function.html">PHPExcel_Calculation_Function</a></li>
<li><a href="class-PHPExcel_Calculation_Functions.html">PHPExcel_Calculation_Functions</a></li>
<li><a href="class-PHPExcel_Calculation_Logical.html">PHPExcel_Calculation_Logical</a></li>
<li><a href="class-PHPExcel_Calculation_LookupRef.html">PHPExcel_Calculation_LookupRef</a></li>
<li><a href="class-PHPExcel_Calculation_MathTrig.html">PHPExcel_Calculation_MathTrig</a></li>
<li><a href="class-PHPExcel_Calculation_Statistical.html">PHPExcel_Calculation_Statistical</a></li>
<li><a href="class-PHPExcel_Calculation_TextData.html">PHPExcel_Calculation_TextData</a></li>
<li><a href="class-PHPExcel_Calculation_Token_Stack.html">PHPExcel_Calculation_Token_Stack</a></li>
<li><a href="class-PHPExcel_Cell.html">PHPExcel_Cell</a></li>
<li><a href="class-PHPExcel_Cell_AdvancedValueBinder.html">PHPExcel_Cell_AdvancedValueBinder</a></li>
<li><a href="class-PHPExcel_Cell_DataType.html">PHPExcel_Cell_DataType</a></li>
<li><a href="class-PHPExcel_Cell_DataValidation.html">PHPExcel_Cell_DataValidation</a></li>
<li><a href="class-PHPExcel_Cell_DefaultValueBinder.html">PHPExcel_Cell_DefaultValueBinder</a></li>
<li><a href="class-PHPExcel_Cell_Hyperlink.html">PHPExcel_Cell_Hyperlink</a></li>
<li><a href="class-PHPExcel_Chart.html">PHPExcel_Chart</a></li>
<li><a href="class-PHPExcel_Chart_Axis.html">PHPExcel_Chart_Axis</a></li>
<li><a href="class-PHPExcel_Chart_DataSeries.html">PHPExcel_Chart_DataSeries</a></li>
<li><a href="class-PHPExcel_Chart_DataSeriesValues.html">PHPExcel_Chart_DataSeriesValues</a></li>
<li><a href="class-PHPExcel_Chart_GridLines.html">PHPExcel_Chart_GridLines</a></li>
<li><a href="class-PHPExcel_Chart_Layout.html">PHPExcel_Chart_Layout</a></li>
<li><a href="class-PHPExcel_Chart_Legend.html">PHPExcel_Chart_Legend</a></li>
<li><a href="class-PHPExcel_Chart_PlotArea.html">PHPExcel_Chart_PlotArea</a></li>
<li><a href="class-PHPExcel_Chart_Renderer_jpgraph.html">PHPExcel_Chart_Renderer_jpgraph</a></li>
<li><a href="class-PHPExcel_Chart_Title.html">PHPExcel_Chart_Title</a></li>
<li><a href="class-PHPExcel_Comment.html">PHPExcel_Comment</a></li>
<li><a href="class-PHPExcel_DocumentProperties.html">PHPExcel_DocumentProperties</a></li>
<li><a href="class-PHPExcel_DocumentSecurity.html">PHPExcel_DocumentSecurity</a></li>
<li><a href="class-PHPExcel_Exponential_Best_Fit.html">PHPExcel_Exponential_Best_Fit</a></li>
<li><a href="class-PHPExcel_HashTable.html">PHPExcel_HashTable</a></li>
<li><a href="class-PHPExcel_Helper_HTML.html">PHPExcel_Helper_HTML</a></li>
<li><a href="class-PHPExcel_IOFactory.html">PHPExcel_IOFactory</a></li>
<li><a href="class-PHPExcel_Linear_Best_Fit.html">PHPExcel_Linear_Best_Fit</a></li>
<li><a href="class-PHPExcel_Logarithmic_Best_Fit.html">PHPExcel_Logarithmic_Best_Fit</a></li>
<li><a href="class-PHPExcel_NamedRange.html">PHPExcel_NamedRange</a></li>
<li><a href="class-PHPExcel_Polynomial_Best_Fit.html">PHPExcel_Polynomial_Best_Fit</a></li>
<li><a href="class-PHPExcel_Power_Best_Fit.html">PHPExcel_Power_Best_Fit</a></li>
<li><a href="class-PHPExcel_Properties.html">PHPExcel_Properties</a></li>
<li><a href="class-PHPExcel_Reader_Abstract.html">PHPExcel_Reader_Abstract</a></li>
<li><a href="class-PHPExcel_Reader_CSV.html">PHPExcel_Reader_CSV</a></li>
<li><a href="class-PHPExcel_Reader_DefaultReadFilter.html">PHPExcel_Reader_DefaultReadFilter</a></li>
<li><a href="class-PHPExcel_Reader_Excel2003XML.html">PHPExcel_Reader_Excel2003XML</a></li>
<li><a href="class-PHPExcel_Reader_Excel2007.html">PHPExcel_Reader_Excel2007</a></li>
<li><a href="class-PHPExcel_Reader_Excel2007_Chart.html">PHPExcel_Reader_Excel2007_Chart</a></li>
<li><a href="class-PHPExcel_Reader_Excel2007_Theme.html">PHPExcel_Reader_Excel2007_Theme</a></li>
<li><a href="class-PHPExcel_Reader_Excel5.html">PHPExcel_Reader_Excel5</a></li>
<li><a href="class-PHPExcel_Reader_Excel5_Escher.html">PHPExcel_Reader_Excel5_Escher</a></li>
<li><a href="class-PHPExcel_Reader_Excel5_MD5.html">PHPExcel_Reader_Excel5_MD5</a></li>
<li><a href="class-PHPExcel_Reader_Excel5_RC4.html">PHPExcel_Reader_Excel5_RC4</a></li>
<li><a href="class-PHPExcel_Reader_Gnumeric.html">PHPExcel_Reader_Gnumeric</a></li>
<li><a href="class-PHPExcel_Reader_HTML.html">PHPExcel_Reader_HTML</a></li>
<li><a href="class-PHPExcel_Reader_OOCalc.html">PHPExcel_Reader_OOCalc</a></li>
<li><a href="class-PHPExcel_Reader_SYLK.html">PHPExcel_Reader_SYLK</a></li>
<li><a href="class-PHPExcel_ReferenceHelper.html">PHPExcel_ReferenceHelper</a></li>
<li><a href="class-PHPExcel_RichText.html">PHPExcel_RichText</a></li>
<li><a href="class-PHPExcel_RichText_Run.html">PHPExcel_RichText_Run</a></li>
<li><a href="class-PHPExcel_RichText_TextElement.html">PHPExcel_RichText_TextElement</a></li>
<li><a href="class-PHPExcel_Settings.html">PHPExcel_Settings</a></li>
<li><a href="class-PHPExcel_Shared_CodePage.html">PHPExcel_Shared_CodePage</a></li>
<li><a href="class-PHPExcel_Shared_Date.html">PHPExcel_Shared_Date</a></li>
<li><a href="class-PHPExcel_Shared_Drawing.html">PHPExcel_Shared_Drawing</a></li>
<li><a href="class-PHPExcel_Shared_Escher.html">PHPExcel_Shared_Escher</a></li>
<li><a href="class-PHPExcel_Shared_Escher_DgContainer.html">PHPExcel_Shared_Escher_DgContainer</a></li>
<li><a href="class-PHPExcel_Shared_Escher_DgContainer_SpgrContainer.html">PHPExcel_Shared_Escher_DgContainer_SpgrContainer</a></li>
<li><a href="class-PHPExcel_Shared_Escher_DgContainer_SpgrContainer_SpContainer.html">PHPExcel_Shared_Escher_DgContainer_SpgrContainer_SpContainer</a></li>
<li><a href="class-PHPExcel_Shared_Escher_DggContainer.html">PHPExcel_Shared_Escher_DggContainer</a></li>
<li><a href="class-PHPExcel_Shared_Escher_DggContainer_BstoreContainer.html">PHPExcel_Shared_Escher_DggContainer_BstoreContainer</a></li>
<li><a href="class-PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE.html">PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE</a></li>
<li><a href="class-PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE_Blip.html">PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE_Blip</a></li>
<li><a href="class-PHPExcel_Shared_Excel5.html">PHPExcel_Shared_Excel5</a></li>
<li><a href="class-PHPExcel_Shared_File.html">PHPExcel_Shared_File</a></li>
<li><a href="class-PHPExcel_Shared_Font.html">PHPExcel_Shared_Font</a></li>
<li><a href="class-PHPExcel_Shared_JAMA_LUDecomposition.html">PHPExcel_Shared_JAMA_LUDecomposition</a></li>
<li><a href="class-PHPExcel_Shared_JAMA_Matrix.html">PHPExcel_Shared_JAMA_Matrix</a></li>
<li><a href="class-PHPExcel_Shared_JAMA_QRDecomposition.html">PHPExcel_Shared_JAMA_QRDecomposition</a></li>
<li><a href="class-PHPExcel_Shared_OLE.html">PHPExcel_Shared_OLE</a></li>
<li><a href="class-PHPExcel_Shared_OLE_ChainedBlockStream.html">PHPExcel_Shared_OLE_ChainedBlockStream</a></li>
<li><a href="class-PHPExcel_Shared_OLE_PPS.html">PHPExcel_Shared_OLE_PPS</a></li>
<li><a href="class-PHPExcel_Shared_OLE_PPS_File.html">PHPExcel_Shared_OLE_PPS_File</a></li>
<li><a href="class-PHPExcel_Shared_OLE_PPS_Root.html">PHPExcel_Shared_OLE_PPS_Root</a></li>
<li><a href="class-PHPExcel_Shared_OLERead.html">PHPExcel_Shared_OLERead</a></li>
<li><a href="class-PHPExcel_Shared_PasswordHasher.html">PHPExcel_Shared_PasswordHasher</a></li>
<li><a href="class-PHPExcel_Shared_String.html">PHPExcel_Shared_String</a></li>
<li><a href="class-PHPExcel_Shared_TimeZone.html">PHPExcel_Shared_TimeZone</a></li>
<li><a href="class-PHPExcel_Shared_XMLWriter.html">PHPExcel_Shared_XMLWriter</a></li>
<li><a href="class-PHPExcel_Shared_ZipArchive.html">PHPExcel_Shared_ZipArchive</a></li>
<li><a href="class-PHPExcel_Shared_ZipStreamWrapper.html">PHPExcel_Shared_ZipStreamWrapper</a></li>
<li><a href="class-PHPExcel_Style.html">PHPExcel_Style</a></li>
<li><a href="class-PHPExcel_Style_Alignment.html">PHPExcel_Style_Alignment</a></li>
<li><a href="class-PHPExcel_Style_Border.html">PHPExcel_Style_Border</a></li>
<li><a href="class-PHPExcel_Style_Borders.html">PHPExcel_Style_Borders</a></li>
<li><a href="class-PHPExcel_Style_Color.html">PHPExcel_Style_Color</a></li>
<li><a href="class-PHPExcel_Style_Conditional.html">PHPExcel_Style_Conditional</a></li>
<li><a href="class-PHPExcel_Style_Fill.html">PHPExcel_Style_Fill</a></li>
<li><a href="class-PHPExcel_Style_Font.html">PHPExcel_Style_Font</a></li>
<li><a href="class-PHPExcel_Style_NumberFormat.html">PHPExcel_Style_NumberFormat</a></li>
<li><a href="class-PHPExcel_Style_Protection.html">PHPExcel_Style_Protection</a></li>
<li><a href="class-PHPExcel_Style_Supervisor.html">PHPExcel_Style_Supervisor</a></li>
<li><a href="class-PHPExcel_Worksheet.html">PHPExcel_Worksheet</a></li>
<li><a href="class-PHPExcel_Worksheet_AutoFilter.html">PHPExcel_Worksheet_AutoFilter</a></li>
<li><a href="class-PHPExcel_Worksheet_AutoFilter_Column.html">PHPExcel_Worksheet_AutoFilter_Column</a></li>
<li><a href="class-PHPExcel_Worksheet_AutoFilter_Column_Rule.html">PHPExcel_Worksheet_AutoFilter_Column_Rule</a></li>
<li><a href="class-PHPExcel_Worksheet_BaseDrawing.html">PHPExcel_Worksheet_BaseDrawing</a></li>
<li><a href="class-PHPExcel_Worksheet_CellIterator.html">PHPExcel_Worksheet_CellIterator</a></li>
<li><a href="class-PHPExcel_Worksheet_Column.html">PHPExcel_Worksheet_Column</a></li>
<li><a href="class-PHPExcel_Worksheet_ColumnCellIterator.html">PHPExcel_Worksheet_ColumnCellIterator</a></li>
<li><a href="class-PHPExcel_Worksheet_ColumnDimension.html">PHPExcel_Worksheet_ColumnDimension</a></li>
<li><a href="class-PHPExcel_Worksheet_ColumnIterator.html">PHPExcel_Worksheet_ColumnIterator</a></li>
<li><a href="class-PHPExcel_Worksheet_Drawing.html">PHPExcel_Worksheet_Drawing</a></li>
<li><a href="class-PHPExcel_Worksheet_Drawing_Shadow.html">PHPExcel_Worksheet_Drawing_Shadow</a></li>
<li><a href="class-PHPExcel_Worksheet_HeaderFooter.html">PHPExcel_Worksheet_HeaderFooter</a></li>
<li><a href="class-PHPExcel_Worksheet_HeaderFooterDrawing.html">PHPExcel_Worksheet_HeaderFooterDrawing</a></li>
<li><a href="class-PHPExcel_Worksheet_MemoryDrawing.html">PHPExcel_Worksheet_MemoryDrawing</a></li>
<li><a href="class-PHPExcel_Worksheet_PageMargins.html">PHPExcel_Worksheet_PageMargins</a></li>
<li><a href="class-PHPExcel_Worksheet_PageSetup.html">PHPExcel_Worksheet_PageSetup</a></li>
<li><a href="class-PHPExcel_Worksheet_Protection.html">PHPExcel_Worksheet_Protection</a></li>
<li><a href="class-PHPExcel_Worksheet_Row.html">PHPExcel_Worksheet_Row</a></li>
<li><a href="class-PHPExcel_Worksheet_RowCellIterator.html">PHPExcel_Worksheet_RowCellIterator</a></li>
<li><a href="class-PHPExcel_Worksheet_RowDimension.html">PHPExcel_Worksheet_RowDimension</a></li>
<li><a href="class-PHPExcel_Worksheet_RowIterator.html">PHPExcel_Worksheet_RowIterator</a></li>
<li><a href="class-PHPExcel_Worksheet_SheetView.html">PHPExcel_Worksheet_SheetView</a></li>
<li><a href="class-PHPExcel_WorksheetIterator.html">PHPExcel_WorksheetIterator</a></li>
<li><a href="class-PHPExcel_Writer_Abstract.html">PHPExcel_Writer_Abstract</a></li>
<li><a href="class-PHPExcel_Writer_CSV.html">PHPExcel_Writer_CSV</a></li>
<li><a href="class-PHPExcel_Writer_Excel2007.html">PHPExcel_Writer_Excel2007</a></li>
<li><a href="class-PHPExcel_Writer_Excel2007_Chart.html">PHPExcel_Writer_Excel2007_Chart</a></li>
<li><a href="class-PHPExcel_Writer_Excel2007_Comments.html">PHPExcel_Writer_Excel2007_Comments</a></li>
<li><a href="class-PHPExcel_Writer_Excel2007_ContentTypes.html">PHPExcel_Writer_Excel2007_ContentTypes</a></li>
<li><a href="class-PHPExcel_Writer_Excel2007_DocProps.html">PHPExcel_Writer_Excel2007_DocProps</a></li>
<li><a href="class-PHPExcel_Writer_Excel2007_Drawing.html">PHPExcel_Writer_Excel2007_Drawing</a></li>
<li><a href="class-PHPExcel_Writer_Excel2007_Rels.html">PHPExcel_Writer_Excel2007_Rels</a></li>
<li><a href="class-PHPExcel_Writer_Excel2007_RelsRibbon.html">PHPExcel_Writer_Excel2007_RelsRibbon</a></li>
<li><a href="class-PHPExcel_Writer_Excel2007_RelsVBA.html">PHPExcel_Writer_Excel2007_RelsVBA</a></li>
<li><a href="class-PHPExcel_Writer_Excel2007_StringTable.html">PHPExcel_Writer_Excel2007_StringTable</a></li>
<li><a href="class-PHPExcel_Writer_Excel2007_Style.html">PHPExcel_Writer_Excel2007_Style</a></li>
<li><a href="class-PHPExcel_Writer_Excel2007_Theme.html">PHPExcel_Writer_Excel2007_Theme</a></li>
<li><a href="class-PHPExcel_Writer_Excel2007_Workbook.html">PHPExcel_Writer_Excel2007_Workbook</a></li>
<li><a href="class-PHPExcel_Writer_Excel2007_Worksheet.html">PHPExcel_Writer_Excel2007_Worksheet</a></li>
<li><a href="class-PHPExcel_Writer_Excel2007_WriterPart.html">PHPExcel_Writer_Excel2007_WriterPart</a></li>
<li><a href="class-PHPExcel_Writer_Excel5.html">PHPExcel_Writer_Excel5</a></li>
<li><a href="class-PHPExcel_Writer_Excel5_BIFFwriter.html">PHPExcel_Writer_Excel5_BIFFwriter</a></li>
<li><a href="class-PHPExcel_Writer_Excel5_Escher.html">PHPExcel_Writer_Excel5_Escher</a></li>
<li><a href="class-PHPExcel_Writer_Excel5_Font.html">PHPExcel_Writer_Excel5_Font</a></li>
<li><a href="class-PHPExcel_Writer_Excel5_Parser.html">PHPExcel_Writer_Excel5_Parser</a></li>
<li><a href="class-PHPExcel_Writer_Excel5_Workbook.html">PHPExcel_Writer_Excel5_Workbook</a></li>
<li><a href="class-PHPExcel_Writer_Excel5_Worksheet.html">PHPExcel_Writer_Excel5_Worksheet</a></li>
<li><a href="class-PHPExcel_Writer_Excel5_Xf.html">PHPExcel_Writer_Excel5_Xf</a></li>
<li><a href="class-PHPExcel_Writer_HTML.html">PHPExcel_Writer_HTML</a></li>
<li><a href="class-PHPExcel_Writer_OpenDocument.html">PHPExcel_Writer_OpenDocument</a></li>
<li><a href="class-PHPExcel_Writer_OpenDocument_Cell_Comment.html">PHPExcel_Writer_OpenDocument_Cell_Comment</a></li>
<li><a href="class-PHPExcel_Writer_OpenDocument_Content.html">PHPExcel_Writer_OpenDocument_Content</a></li>
<li><a href="class-PHPExcel_Writer_OpenDocument_Meta.html">PHPExcel_Writer_OpenDocument_Meta</a></li>
<li><a href="class-PHPExcel_Writer_OpenDocument_MetaInf.html">PHPExcel_Writer_OpenDocument_MetaInf</a></li>
<li><a href="class-PHPExcel_Writer_OpenDocument_Mimetype.html">PHPExcel_Writer_OpenDocument_Mimetype</a></li>
<li><a href="class-PHPExcel_Writer_OpenDocument_Settings.html">PHPExcel_Writer_OpenDocument_Settings</a></li>
<li><a href="class-PHPExcel_Writer_OpenDocument_Styles.html">PHPExcel_Writer_OpenDocument_Styles</a></li>
<li><a href="class-PHPExcel_Writer_OpenDocument_Thumbnails.html">PHPExcel_Writer_OpenDocument_Thumbnails</a></li>
<li><a href="class-PHPExcel_Writer_OpenDocument_WriterPart.html">PHPExcel_Writer_OpenDocument_WriterPart</a></li>
<li><a href="class-PHPExcel_Writer_PDF.html">PHPExcel_Writer_PDF</a></li>
<li><a href="class-PHPExcel_Writer_PDF_Core.html">PHPExcel_Writer_PDF_Core</a></li>
<li><a href="class-PHPExcel_Writer_PDF_DomPDF.html">PHPExcel_Writer_PDF_DomPDF</a></li>
<li><a href="class-PHPExcel_Writer_PDF_mPDF.html">PHPExcel_Writer_PDF_mPDF</a></li>
<li><a href="class-PHPExcel_Writer_PDF_tcPDF.html">PHPExcel_Writer_PDF_tcPDF</a></li>
<li><a href="class-ReferenceHelperTest.html">ReferenceHelperTest</a></li>
<li><a href="class-Registro.html">Registro</a></li>
<li><a href="class-RestablecerContrasenha.html">RestablecerContrasenha</a></li>
<li><a href="class-RowCellIteratorTest.html">RowCellIteratorTest</a></li>
<li><a href="class-RowIteratorTest.html">RowIteratorTest</a></li>
<li><a href="class-RuleTest.html">RuleTest</a></li>
<li><a href="class-SesionNoIniciada.html">SesionNoIniciada</a></li>
<li><a href="class-SingularValueDecomposition.html">SingularValueDecomposition</a></li>
<li><a href="class-SQLite3.html">SQLite3</a></li>
<li><a href="class-StringTest.html">StringTest</a></li>
<li><a href="class-testDataFileIterator.html">testDataFileIterator</a></li>
<li><a href="class-TextDataTest.html">TextDataTest</a></li>
<li><a href="class-Tienda01.html">Tienda01</a></li>
<li><a href="class-Tienda02.html">Tienda02</a></li>
<li><a href="class-Tiendas_Model.html">Tiendas_Model</a></li>
<li><a href="class-TimeZoneTest.html">TimeZoneTest</a></li>
<li><a href="class-trendClass.html">trendClass</a></li>
<li><a href="class-TTFParser.html">TTFParser</a></li>
<li><a href="class-WorksheetColumnTest.html">WorksheetColumnTest</a></li>
<li><a href="class-WorksheetRowTest.html">WorksheetRowTest</a></li>
<li><a href="class-XEEValidatorTest.html">XEEValidatorTest</a></li>
<li><a href="class-XML.html">XML</a></li>
<li><a href="class-XML_RPC_Client.html" class="invalid">XML_RPC_Client</a></li>
<li><a href="class-XML_RPC_Message.html" class="invalid">XML_RPC_Message</a></li>
<li><a href="class-XML_RPC_Response.html" class="invalid">XML_RPC_Response</a></li>
<li><a href="class-XML_RPC_Values.html" class="invalid">XML_RPC_Values</a></li>
<li><a href="class-XMLWriter.html">XMLWriter</a></li>
</ul>
<h3>Interfaces</h3>
<ul>
<li><a href="class-DateTimeInterface.html">DateTimeInterface</a></li>
<li><a href="class-Iterator.html">Iterator</a></li>
<li><a href="class-IteratorAggregate.html">IteratorAggregate</a></li>
<li><a href="class-org.bovigo.vfs.vfsStreamContainer.html">org\bovigo\vfs\vfsStreamContainer</a></li>
<li><a href="class-org.bovigo.vfs.vfsStreamContent.html">org\bovigo\vfs\vfsStreamContent</a></li>
<li><a href="class-org.bovigo.vfs.visitor.vfsStreamVisitor.html">org\bovigo\vfs\visitor\vfsStreamVisitor</a></li>
<li><a href="class-PHPExcel_CachedObjectStorage_ICache.html">PHPExcel_CachedObjectStorage_ICache</a></li>
<li><a href="class-PHPExcel_Cell_IValueBinder.html">PHPExcel_Cell_IValueBinder</a></li>
<li><a href="class-PHPExcel_IComparable.html">PHPExcel_IComparable</a></li>
<li><a href="class-PHPExcel_Reader_IReader.html">PHPExcel_Reader_IReader</a></li>
<li><a href="class-PHPExcel_Reader_IReadFilter.html">PHPExcel_Reader_IReadFilter</a></li>
<li><a href="class-PHPExcel_RichText_ITextElement.html">PHPExcel_RichText_ITextElement</a></li>
<li><a href="class-PHPExcel_Writer_IWriter.html">PHPExcel_Writer_IWriter</a></li>
<li><a href="class-SessionHandlerInterface.html">SessionHandlerInterface</a></li>
<li><a href="class-Traversable.html">Traversable</a></li>
</ul>
<h3>Exceptions</h3>
<ul>
<li><a href="class-Exception.html">Exception</a></li>
<li><a href="class-InvalidArgumentException.html">InvalidArgumentException</a></li>
<li><a href="class-LogicException.html">LogicException</a></li>
<li><a href="class-org.bovigo.vfs.vfsStreamException.html">org\bovigo\vfs\vfsStreamException</a></li>
<li><a href="class-PHPExcel_Calculation_Exception.html">PHPExcel_Calculation_Exception</a></li>
<li><a href="class-PHPExcel_Chart_Exception.html">PHPExcel_Chart_Exception</a></li>
<li><a href="class-PHPExcel_Exception.html">PHPExcel_Exception</a></li>
<li><a href="class-PHPExcel_Reader_Exception.html">PHPExcel_Reader_Exception</a></li>
<li><a href="class-PHPExcel_Writer_Exception.html">PHPExcel_Writer_Exception</a></li>
</ul>
<h3>Functions</h3>
<ul>
<li><a href="function-_attributes_to_string.html" class="invalid">_attributes_to_string</a></li>
<li><a href="function-_error_handler.html">_error_handler</a></li>
<li><a href="function-_exception_handler.html" class="invalid">_exception_handler</a></li>
<li><a href="function-_get_smiley_array.html" class="invalid">_get_smiley_array</a></li>
<li><a href="function-_get_validation_object.html" class="invalid">_get_validation_object</a></li>
<li><a href="function-_list.html" class="invalid">_list</a></li>
<li><a href="function-_parse_attributes.html">_parse_attributes</a></li>
<li><a href="function-_parse_form_attributes.html" class="invalid">_parse_form_attributes</a></li>
<li><a href="function-_shutdown_handler.html">_shutdown_handler</a></li>
<li><a href="function-_stringify_attributes.html">_stringify_attributes</a></li>
<li><a href="function-acosh.html">acosh</a></li>
<li><a href="function-alternator.html" class="invalid">alternator</a></li>
<li><a href="function-anchor.html" class="invalid">anchor</a></li>
<li><a href="function-anchor_popup.html" class="invalid">anchor_popup</a></li>
<li><a href="function-array_column.html">array_column</a></li>
<li><a href="function-array_replace.html">array_replace</a></li>
<li><a href="function-array_replace_recursive.html">array_replace_recursive</a></li>
<li><a href="function-ascii_to_entities.html" class="invalid">ascii_to_entities</a></li>
<li><a href="function-asinh.html">asinh</a></li>
<li><a href="function-atanh.html">atanh</a></li>
<li><a href="function-auto_link.html" class="invalid">auto_link</a></li>
<li><a href="function-auto_typography.html" class="invalid">auto_typography</a></li>
<li><a href="function-base_url.html" class="invalid">base_url</a></li>
<li><a href="function-br.html" class="invalid">br</a></li>
<li><a href="function-byte_format.html" class="invalid">byte_format</a></li>
<li><a href="function-cambiaFormatoFecha.html">cambiaFormatoFecha</a></li>
<li><a href="function-camelize.html" class="invalid">camelize</a></li>
<li><a href="function-character_limiter.html" class="invalid">character_limiter</a></li>
<li><a href="function-claves_check.html">claves_check</a></li>
<li><a href="function-Composer.Autoload.includeFile.html">Composer\Autoload\includeFile</a></li>
<li><a href="function-composerRequire03216eaa5a0e5a7f5bbbeeae5708a458.html">composerRequire03216eaa5a0e5a7f5bbbeeae5708a458</a></li>
<li><a href="function-config_item.html" class="invalid">config_item</a></li>
<li><a href="function-convert_accented_characters.html" class="invalid">convert_accented_characters</a></li>
<li><a href="function-CreaArrayParaSelect.html">CreaArrayParaSelect</a></li>
<li><a href="function-CreaSelect.html">CreaSelect</a></li>
<li><a href="function-CreaSelectMod.html">CreaSelectMod</a></li>
<li><a href="function-create_captcha.html" class="invalid">create_captcha</a></li>
<li><a href="function-current_url.html" class="invalid">current_url</a></li>
<li><a href="function-date_range.html">date_range</a></li>
<li><a href="function-days_in_month.html" class="invalid">days_in_month</a></li>
<li><a href="function-DB.html" class="invalid">DB</a></li>
<li><a href="function-delete_cookie.html" class="invalid">delete_cookie</a></li>
<li><a href="function-delete_files.html" class="invalid">delete_files</a></li>
<li><a href="function-directory_map.html" class="invalid">directory_map</a></li>
<li><a href="function-dni_LetraNIF.html">dni_LetraNIF</a></li>
<li><a href="function-do_hash.html" class="invalid">do_hash</a></li>
<li><a href="function-doctype.html" class="invalid">doctype</a></li>
<li><a href="function-element.html" class="invalid">element</a></li>
<li><a href="function-elements.html" class="invalid">elements</a></li>
<li><a href="function-ellipsize.html" class="invalid">ellipsize</a></li>
<li><a href="function-encode_php_tags.html" class="invalid">encode_php_tags</a></li>
<li><a href="function-entities_to_ascii.html" class="invalid">entities_to_ascii</a></li>
<li><a href="function-entity_decode.html" class="invalid">entity_decode</a></li>
<li><a href="function-Error.html">Error</a></li>
<li><a href="function-force_download.html" class="invalid">force_download</a></li>
<li><a href="function-form_button.html" class="invalid">form_button</a></li>
<li><a href="function-form_checkbox.html" class="invalid">form_checkbox</a></li>
<li><a href="function-form_close.html" class="invalid">form_close</a></li>
<li><a href="function-form_dropdown.html" class="invalid">form_dropdown</a></li>
<li><a href="function-form_error.html" class="invalid">form_error</a></li>
<li><a href="function-form_fieldset.html" class="invalid">form_fieldset</a></li>
<li><a href="function-form_fieldset_close.html" class="invalid">form_fieldset_close</a></li>
<li><a href="function-form_hidden.html" class="invalid">form_hidden</a></li>
<li><a href="function-form_input.html" class="invalid">form_input</a></li>
<li><a href="function-form_label.html" class="invalid">form_label</a></li>
<li><a href="function-form_multiselect.html" class="invalid">form_multiselect</a></li>
<li><a href="function-form_open.html" class="invalid">form_open</a></li>
<li><a href="function-form_open_multipart.html" class="invalid">form_open_multipart</a></li>
<li><a href="function-form_password.html" class="invalid">form_password</a></li>
<li><a href="function-form_prep.html" class="invalid">form_prep</a></li>
<li><a href="function-form_radio.html" class="invalid">form_radio</a></li>
<li><a href="function-form_reset.html" class="invalid">form_reset</a></li>
<li><a href="function-form_submit.html" class="invalid">form_submit</a></li>
<li><a href="function-form_textarea.html" class="invalid">form_textarea</a></li>
<li><a href="function-form_upload.html" class="invalid">form_upload</a></li>
<li><a href="function-function_usable.html">function_usable</a></li>
<li><a href="function-get_clickable_smileys.html" class="invalid">get_clickable_smileys</a></li>
<li><a href="function-get_config.html" class="invalid">get_config</a></li>
<li><a href="function-get_cookie.html" class="invalid">get_cookie</a></li>
<li><a href="function-get_dir_file_info.html" class="invalid">get_dir_file_info</a></li>
<li><a href="function-get_file_info.html" class="invalid">get_file_info</a></li>
<li><a href="function-get_filenames.html" class="invalid">get_filenames</a></li>
<li><a href="function-get_instance.html" class="invalid">get_instance</a></li>
<li><a href="function-get_mime_by_extension.html" class="invalid">get_mime_by_extension</a></li>
<li><a href="function-get_mimes.html">get_mimes</a></li>
<li><a href="function-getFicheroXML_Monedas.html">getFicheroXML_Monedas</a></li>
<li><a href="function-GetInfoFromTrueType.html">GetInfoFromTrueType</a></li>
<li><a href="function-GetInfoFromType1.html">GetInfoFromType1</a></li>
<li><a href="function-getPrecioFinal.html">getPrecioFinal</a></li>
<li><a href="function-gmt_to_local.html" class="invalid">gmt_to_local</a></li>
<li><a href="function-hash_equals.html">hash_equals</a></li>
<li><a href="function-hash_pbkdf2.html">hash_pbkdf2</a></li>
<li><a href="function-heading.html" class="invalid">heading</a></li>
<li><a href="function-hex2bin.html">hex2bin</a></li>
<li><a href="function-highlight_code.html" class="invalid">highlight_code</a></li>
<li><a href="function-highlight_phrase.html" class="invalid">highlight_phrase</a></li>
<li><a href="function-html_escape.html" class="invalid">html_escape</a></li>
<li><a href="function-human_to_unix.html" class="invalid">human_to_unix</a></li>
<li><a href="function-humanize.html" class="invalid">humanize</a></li>
<li><a href="function-hypo.html">hypo</a></li>
<li><a href="function-img.html" class="invalid">img</a></li>
<li><a href="function-increment_string.html" class="invalid">increment_string</a></li>
<li><a href="function-index_page.html" class="invalid">index_page</a></li>
<li><a href="function-is_cli.html">is_cli</a></li>
<li><a href="function-is_countable.html">is_countable</a></li>
<li><a href="function-is_false.html" class="invalid">is_false</a></li>
<li><a href="function-is_https.html">is_https</a></li>
<li><a href="function-is_loaded.html" class="invalid">is_loaded</a></li>
<li><a href="function-is_php.html" class="invalid">is_php</a></li>
<li><a href="function-is_really_writable.html" class="invalid">is_really_writable</a></li>
<li><a href="function-is_true.html" class="invalid">is_true</a></li>
<li><a href="function-JAMAError.html">JAMAError</a></li>
<li><a href="function-js_insert_smiley.html">js_insert_smiley</a></li>
<li><a href="function-lang.html" class="invalid">lang</a></li>
<li><a href="function-link_tag.html" class="invalid">link_tag</a></li>
<li><a href="function-load_class.html" class="invalid">load_class</a></li>
<li><a href="function-LoadMap.html">LoadMap</a></li>
<li><a href="function-local_to_gmt.html" class="invalid">local_to_gmt</a></li>
<li><a href="function-log_message.html" class="invalid">log_message</a></li>
<li><a href="function-mailto.html" class="invalid">mailto</a></li>
<li><a href="function-MakeDefinitionFile.html">MakeDefinitionFile</a></li>
<li><a href="function-MakeFont.html">MakeFont</a></li>
<li><a href="function-MakeFontDescriptor.html">MakeFontDescriptor</a></li>
<li><a href="function-MakeFontEncoding.html">MakeFontEncoding</a></li>
<li><a href="function-MakeUnicodeArray.html">MakeUnicodeArray</a></li>
<li><a href="function-MakeWidthArray.html">MakeWidthArray</a></li>
<li><a href="function-mb_str_replace.html">mb_str_replace</a></li>
<li><a href="function-mb_strlen.html">mb_strlen</a></li>
<li><a href="function-mb_strpos.html">mb_strpos</a></li>
<li><a href="function-mb_substr.html">mb_substr</a></li>
<li><a href="function-mdate.html" class="invalid">mdate</a></li>
<li><a href="function-Message.html">Message</a></li>
<li><a href="function-meta.html" class="invalid">meta</a></li>
<li><a href="function-MostrarDescuento.html">MostrarDescuento</a></li>
<li><a href="function-MuestraMonedas.html">MuestraMonedas</a></li>
<li><a href="function-mysql_to_unix.html" class="invalid">mysql_to_unix</a></li>
<li><a href="function-nbs.html" class="invalid">nbs</a></li>
<li><a href="function-nice_date.html">nice_date</a></li>
<li><a href="function-nl2br_except_pre.html" class="invalid">nl2br_except_pre</a></li>
<li><a href="function-Notice.html">Notice</a></li>
<li><a href="function-now.html" class="invalid">now</a></li>
<li><a href="function-octal_permissions.html" class="invalid">octal_permissions</a></li>
<li><a href="function-odbc_fetch_array.html">odbc_fetch_array</a></li>
<li><a href="function-odbc_fetch_object.html">odbc_fetch_object</a></li>
<li><a href="function-ol.html" class="invalid">ol</a></li>
<li><a href="function-parse_smileys.html" class="invalid">parse_smileys</a></li>
<li><a href="function-password_get_info.html">password_get_info</a></li>
<li><a href="function-password_hash.html">password_hash</a></li>
<li><a href="function-password_needs_rehash.html">password_needs_rehash</a></li>
<li><a href="function-password_verify.html">password_verify</a></li>
<li><a href="function-PclZipUtilCopyBlock.html">PclZipUtilCopyBlock</a></li>
<li><a href="function-PclZipUtilOptionText.html">PclZipUtilOptionText</a></li>
<li><a href="function-PclZipUtilPathInclusion.html">PclZipUtilPathInclusion</a></li>
<li><a href="function-PclZipUtilPathReduction.html">PclZipUtilPathReduction</a></li>
<li><a href="function-PclZipUtilRename.html">PclZipUtilRename</a></li>
<li><a href="function-PclZipUtilTranslateWinPath.html">PclZipUtilTranslateWinPath</a></li>
<li><a href="function-plural.html" class="invalid">plural</a></li>
<li><a href="function-prep_url.html" class="invalid">prep_url</a></li>
<li><a href="function-quoted_printable_encode.html">quoted_printable_encode</a></li>
<li><a href="function-quotes_to_entities.html" class="invalid">quotes_to_entities</a></li>
<li><a href="function-random_element.html" class="invalid">random_element</a></li>
<li><a href="function-random_string.html" class="invalid">random_string</a></li>
<li><a href="function-read_file.html" class="invalid">read_file</a></li>
<li><a href="function-redirect.html" class="invalid">redirect</a></li>
<li><a href="function-reduce_double_slashes.html" class="invalid">reduce_double_slashes</a></li>
<li><a href="function-reduce_multiples.html" class="invalid">reduce_multiples</a></li>
<li><a href="function-remove_invisible_characters.html" class="invalid">remove_invisible_characters</a></li>
<li><a href="function-repeater.html" class="invalid">repeater</a></li>
<li><a href="function-safe_mailto.html" class="invalid">safe_mailto</a></li>
<li><a href="function-sanitize_filename.html" class="invalid">sanitize_filename</a></li>
<li><a href="function-SaveToFile.html">SaveToFile</a></li>
<li><a href="function-send_email.html" class="invalid">send_email</a></li>
<li><a href="function-SesionIniciadaCheck.html">SesionIniciadaCheck</a></li>
<li><a href="function-set_checkbox.html" class="invalid">set_checkbox</a></li>
<li><a href="function-set_cookie.html" class="invalid">set_cookie</a></li>
<li><a href="function-set_radio.html" class="invalid">set_radio</a></li>
<li><a href="function-set_realpath.html" class="invalid">set_realpath</a></li>
<li><a href="function-set_select.html" class="invalid">set_select</a></li>
<li><a href="function-set_status_header.html" class="invalid">set_status_header</a></li>
<li><a href="function-set_value.html" class="invalid">set_value</a></li>
<li><a href="function-show_404.html" class="invalid">show_404</a></li>
<li><a href="function-show_error.html" class="invalid">show_error</a></li>
<li><a href="function-singular.html" class="invalid">singular</a></li>
<li><a href="function-site_url.html" class="invalid">site_url</a></li>
<li><a href="function-smiley_js.html" class="invalid">smiley_js</a></li>
<li><a href="function-standard_date.html" class="invalid">standard_date</a></li>
<li><a href="function-strip_image_tags.html" class="invalid">strip_image_tags</a></li>
<li><a href="function-strip_quotes.html" class="invalid">strip_quotes</a></li>
<li><a href="function-strip_slashes.html" class="invalid">strip_slashes</a></li>
<li><a href="function-symbolic_permissions.html" class="invalid">symbolic_permissions</a></li>
<li><a href="function-timespan.html" class="invalid">timespan</a></li>
<li><a href="function-timezone_menu.html" class="invalid">timezone_menu</a></li>
<li><a href="function-timezones.html" class="invalid">timezones</a></li>
<li><a href="function-transpose.html">transpose</a></li>
<li><a href="function-trim_slashes.html" class="invalid">trim_slashes</a></li>
<li><a href="function-ul.html" class="invalid">ul</a></li>
<li><a href="function-underscore.html" class="invalid">underscore</a></li>
<li><a href="function-unix_to_human.html" class="invalid">unix_to_human</a></li>
<li><a href="function-uri_string.html" class="invalid">uri_string</a></li>
<li><a href="function-url_title.html" class="invalid">url_title</a></li>
<li><a href="function-valid_email.html" class="invalid">valid_email</a></li>
<li><a href="function-validation_errors.html" class="invalid">validation_errors</a></li>
<li><a href="function-Warning.html">Warning</a></li>
<li><a href="function-word_censor.html" class="invalid">word_censor</a></li>
<li><a href="function-word_limiter.html" class="invalid">word_limiter</a></li>
<li><a href="function-word_wrap.html" class="invalid">word_wrap</a></li>
<li><a href="function-write_file.html" class="invalid">write_file</a></li>
<li><a href="function-xml_convert.html" class="invalid">xml_convert</a></li>
<li><a href="function-xss_clean.html" class="invalid">xss_clean</a></li>
</ul>
</div>
</div>
</div>
<div id="splitter"></div>
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text" placeholder="Search">
</form>
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<span>Namespace</span> </li>
<li>
<span>Class</span> </li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
</ul>
<ul>
</ul>
</div>
<pre><code><span id="1" class="l"><a href="#1"> 1: </a><span class="xlang"><?php</span>
</span><span id="2" class="l"><a href="#2"> 2: </a><span class="php-comment"></span>
</span><span id="10" class="l"><a href="#10">10: </a><span class="php-keyword1">namespace</span> org\bovigo\vfs\example;
</span><span id="11" class="l"><a href="#11">11: </a><span class="php-keyword1">require_once</span> <span class="php-quote">'Example.php'</span>;
</span><span id="12" class="l"><a href="#12">12: </a><span class="php-comment">/**
</span></span><span id="13" class="l"><a href="#13">13: </a><span class="php-comment"> * Test case for class Example.
</span></span><span id="14" class="l"><a href="#14">14: </a><span class="php-comment"> */</span>
</span><span id="15" class="l"><a href="#15">15: </a><span class="php-keyword1">class</span> ExampleTestCaseOldWay <span class="php-keyword1">extends</span> \PHPUnit_Framework_TestCase
</span><span id="16" class="l"><a href="#16">16: </a>{
</span><span id="17" class="l"><a href="#17">17: </a> <span class="php-comment">/**
</span></span><span id="18" class="l"><a href="#18">18: </a><span class="php-comment"> * set up test environmemt
</span></span><span id="19" class="l"><a href="#19">19: </a><span class="php-comment"> */</span>
</span><span id="20" class="l"><a href="#20">20: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> setUp()
</span><span id="21" class="l"><a href="#21">21: </a> {
</span><span id="22" class="l"><a href="#22">22: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">file_exists</span>(__DIR__ . <span class="php-quote">'/id'</span>) === <span class="php-keyword1">true</span>) {
</span><span id="23" class="l"><a href="#23">23: </a> <span class="php-keyword2">rmdir</span>(__DIR__ . <span class="php-quote">'/id'</span>);
</span><span id="24" class="l"><a href="#24">24: </a> }
</span><span id="25" class="l"><a href="#25">25: </a> }
</span><span id="26" class="l"><a href="#26">26: </a>
</span><span id="27" class="l"><a href="#27">27: </a> <span class="php-comment">/**
</span></span><span id="28" class="l"><a href="#28">28: </a><span class="php-comment"> * clear up test environment
</span></span><span id="29" class="l"><a href="#29">29: </a><span class="php-comment"> */</span>
</span><span id="30" class="l"><a href="#30">30: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> tearDown()
</span><span id="31" class="l"><a href="#31">31: </a> {
</span><span id="32" class="l"><a href="#32">32: </a> <span class="php-keyword1">if</span> (<span class="php-keyword2">file_exists</span>(__DIR__ . <span class="php-quote">'/id'</span>) === <span class="php-keyword1">true</span>) {
</span><span id="33" class="l"><a href="#33">33: </a> <span class="php-keyword2">rmdir</span>(__DIR__ . <span class="php-quote">'/id'</span>);
</span><span id="34" class="l"><a href="#34">34: </a> }
</span><span id="35" class="l"><a href="#35">35: </a> }
</span><span id="36" class="l"><a href="#36">36: </a>
</span><span id="37" class="l"><a href="#37">37: </a> <span class="php-comment">/**
</span></span><span id="38" class="l"><a href="#38">38: </a><span class="php-comment"> * @test
</span></span><span id="39" class="l"><a href="#39">39: </a><span class="php-comment"> */</span>
</span><span id="40" class="l"><a href="#40">40: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> directoryIsCreated()
</span><span id="41" class="l"><a href="#41">41: </a> {
</span><span id="42" class="l"><a href="#42">42: </a> <span class="php-var">$example</span> = <span class="php-keyword1">new</span> Example(<span class="php-quote">'id'</span>);
</span><span id="43" class="l"><a href="#43">43: </a> <span class="php-var">$this</span>->assertFalse(<span class="php-keyword2">file_exists</span>(__DIR__ . <span class="php-quote">'/id'</span>));
</span><span id="44" class="l"><a href="#44">44: </a> <span class="php-var">$example</span>->setDirectory(__DIR__);
</span><span id="45" class="l"><a href="#45">45: </a> <span class="php-var">$this</span>->assertTrue(<span class="php-keyword2">file_exists</span>(__DIR__ . <span class="php-quote">'/id'</span>));
</span><span id="46" class="l"><a href="#46">46: </a> }
</span><span id="47" class="l"><a href="#47">47: </a>}
</span><span id="48" class="l"><a href="#48">48: </a><span class="xlang">?></span></span></code></pre>
<div id="footer">
Practica2_Servidor API documentation generated by <a href="http://apigen.org">ApiGen</a>
</div>
</div>
</div>
<script src="resources/combined.js?056d0a570f5e91e43be2719a6d30b4b426c2aee0"></script>
<script src="elementlist.js?6695153af8baa053fc9e62fe58e60bbb427f0910"></script>
</body>
</html>
| {
"content_hash": "064dd23b5da3a456cbe9784204472ebb",
"timestamp": "",
"source": "github",
"line_count": 882,
"max_line_length": 238,
"avg_line_length": 76.8843537414966,
"alnum_prop": 0.6888603786940365,
"repo_name": "isacm94/Practica2_Servidor",
"id": "037391dbb47ba836e2ad28c03076180896ef7ebc",
"size": "68603",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "doc/source-class-org.bovigo.vfs.example.ExampleTestCaseOldWay.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ApacheConf",
"bytes": "266"
},
{
"name": "CSS",
"bytes": "92316"
},
{
"name": "HTML",
"bytes": "8301247"
},
{
"name": "JavaScript",
"bytes": "72095"
},
{
"name": "PHP",
"bytes": "3199138"
}
],
"symlink_target": ""
} |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_55) on Wed Feb 25 22:13:38 GMT 2015 -->
<title>G-Index</title>
<meta name="date" content="2015-02-25">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="G-Index";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../overview-summary.html">Overview</a></li>
<li>Package</li>
<li>Class</li>
<li>Use</li>
<li><a href="../overview-tree.html">Tree</a></li>
<li><a href="../deprecated-list.html">Deprecated</a></li>
<li class="navBarCell1Rev">Index</li>
<li><a href="../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="index-6.html">Prev Letter</a></li>
<li><a href="index-8.html">Next Letter</a></li>
</ul>
<ul class="navList">
<li><a href="../index.html?index-filesindex-7.html" target="_top">Frames</a></li>
<li><a href="index-7.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="contentContainer"><a href="index-1.html">A</a> <a href="index-2.html">B</a> <a href="index-3.html">C</a> <a href="index-4.html">D</a> <a href="index-5.html">E</a> <a href="index-6.html">F</a> <a href="index-7.html">G</a> <a href="index-8.html">H</a> <a href="index-9.html">I</a> <a href="index-10.html">K</a> <a href="index-11.html">L</a> <a href="index-12.html">M</a> <a href="index-13.html">N</a> <a href="index-14.html">O</a> <a href="index-15.html">P</a> <a href="index-16.html">R</a> <a href="index-17.html">S</a> <a href="index-18.html">T</a> <a href="index-19.html">U</a> <a href="index-20.html">V</a> <a href="index-21.html">W</a> <a href="index-22.html">X</a> <a href="index-23.html">Y</a> <a name="_G_">
<!-- -->
</a>
<h2 class="title">G</h2>
<dl>
<dt><a href="../call/game/main/GameSettings.html" title="class in call.game.main"><span class="strong">GameSettings</span></a> - Class in <a href="../call/game/main/package-summary.html">call.game.main</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/main/GameSettings.html#GameSettings()">GameSettings()</a></span> - Constructor for class call.game.main.<a href="../call/game/main/GameSettings.html" title="class in call.game.main">GameSettings</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/main/GameSettings.html#GameSettings(int, int)">GameSettings(int, int)</a></span> - Constructor for class call.game.main.<a href="../call/game/main/GameSettings.html" title="class in call.game.main">GameSettings</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/main/GameSettings.html#GameSettings(int, int, java.lang.String)">GameSettings(int, int, String)</a></span> - Constructor for class call.game.main.<a href="../call/game/main/GameSettings.html" title="class in call.game.main">GameSettings</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/main/GameSettings.html#GameSettings(int, int, java.lang.String, int, int, int)">GameSettings(int, int, String, int, int, int)</a></span> - Constructor for class call.game.main.<a href="../call/game/main/GameSettings.html" title="class in call.game.main">GameSettings</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/image/BaseSprite.html#getAngle()">getAngle()</a></span> - Method in class call.game.image.<a href="../call/game/image/BaseSprite.html" title="class in call.game.image">BaseSprite</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/utils/Vec2Double.html#getAngleDegrees(call.game.utils.Vec2Double)">getAngleDegrees(Vec2Double)</a></span> - Method in class call.game.utils.<a href="../call/game/utils/Vec2Double.html" title="class in call.game.utils">Vec2Double</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/image/AnimatedSprite.html#getAnimation()">getAnimation()</a></span> - Method in class call.game.image.<a href="../call/game/image/AnimatedSprite.html" title="class in call.game.image">AnimatedSprite</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/image/Image.html#getBackend()">getBackend()</a></span> - Method in class call.game.image.<a href="../call/game/image/Image.html" title="class in call.game.image">Image</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/image/Image.html#getBounds()">getBounds()</a></span> - Method in class call.game.image.<a href="../call/game/image/Image.html" title="class in call.game.image">Image</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/input/mouse/Mouse.html#getBounds()">getBounds()</a></span> - Static method in class call.game.input.mouse.<a href="../call/game/input/mouse/Mouse.html" title="class in call.game.input.mouse">Mouse</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/main/Camera.html#getBounds()">getBounds()</a></span> - Method in class call.game.main.<a href="../call/game/main/Camera.html" title="class in call.game.main">Camera</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/physicx/BoundingBox.html#getBounds()">getBounds()</a></span> - Method in class call.game.physicx.<a href="../call/game/physicx/BoundingBox.html" title="class in call.game.physicx">BoundingBox</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/physicx/IBounded.html#getBounds()">getBounds()</a></span> - Method in interface call.game.physicx.<a href="../call/game/physicx/IBounded.html" title="interface in call.game.physicx">IBounded</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/main/menu/OverlayMenu.html#getButtons()">getButtons()</a></span> - Method in class call.main.menu.<a href="../call/main/menu/OverlayMenu.html" title="class in call.main.menu">OverlayMenu</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/main/Camera.html#getCameraHeight()">getCameraHeight()</a></span> - Method in class call.game.main.<a href="../call/game/main/Camera.html" title="class in call.game.main">Camera</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/main/Camera.html#getCameraScale()">getCameraScale()</a></span> - Method in class call.game.main.<a href="../call/game/main/Camera.html" title="class in call.game.main">Camera</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/main/Camera.html#getCameraWidth()">getCameraWidth()</a></span> - Method in class call.game.main.<a href="../call/game/main/Camera.html" title="class in call.game.main">Camera</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/main/Camera.html#getCameraX()">getCameraX()</a></span> - Method in class call.game.main.<a href="../call/game/main/Camera.html" title="class in call.game.main">Camera</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/main/Camera.html#getCameraY()">getCameraY()</a></span> - Method in class call.game.main.<a href="../call/game/main/Camera.html" title="class in call.game.main">Camera</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/mod/ModEntry.html#getClasses()">getClasses()</a></span> - Method in class call.game.mod.<a href="../call/game/mod/ModEntry.html" title="class in call.game.mod">ModEntry</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/mod/ModEntry.html#getClassesWithAnnotation(java.lang.Class)">getClassesWithAnnotation(Class<? extends Annotation>)</a></span> - Method in class call.game.mod.<a href="../call/game/mod/ModEntry.html" title="class in call.game.mod">ModEntry</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/mod/ModEntry.html#getClassWithAnnotation(java.lang.Class)">getClassWithAnnotation(Class<? extends Annotation>)</a></span> - Method in class call.game.mod.<a href="../call/game/mod/ModEntry.html" title="class in call.game.mod">ModEntry</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/entitys/BaseEntity.html#getCollidableEntitys()">getCollidableEntitys()</a></span> - Method in class call.game.entitys.<a href="../call/game/entitys/BaseEntity.html" title="class in call.game.entitys">BaseEntity</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/mod/CALLModLoader.html#getCurrentState()">getCurrentState()</a></span> - Method in class call.game.mod.<a href="../call/game/mod/CALLModLoader.html" title="class in call.game.mod">CALLModLoader</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/main/ClassUtils.html#getDefinedMethod(java.lang.String, java.lang.Class)">getDefinedMethod(String, Class<?>)</a></span> - Static method in class call.game.main.<a href="../call/game/main/ClassUtils.html" title="class in call.game.main">ClassUtils</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/utils/Translate.html#getDifX()">getDifX()</a></span> - Method in class call.game.utils.<a href="../call/game/utils/Translate.html" title="class in call.game.utils">Translate</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/utils/Translate.html#getDifY()">getDifY()</a></span> - Method in class call.game.utils.<a href="../call/game/utils/Translate.html" title="class in call.game.utils">Translate</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/main/GameSettings.html#getDisplaySettings()">getDisplaySettings()</a></span> - Method in class call.game.main.<a href="../call/game/main/GameSettings.html" title="class in call.game.main">GameSettings</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/utils/TimeKeeper.html#getDuration()">getDuration()</a></span> - Method in class call.game.utils.<a href="../call/game/utils/TimeKeeper.html" title="class in call.game.utils">TimeKeeper</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/entitys/BaseEntity.html#getEntityID()">getEntityID()</a></span> - Method in class call.game.entitys.<a href="../call/game/entitys/BaseEntity.html" title="class in call.game.entitys">BaseEntity</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/entitys/EntityHandler.html#getEntitys()">getEntitys()</a></span> - Static method in class call.game.entitys.<a href="../call/game/entitys/EntityHandler.html" title="class in call.game.entitys">EntityHandler</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/state/StateInfo.html#getExtra(java.lang.String)">getExtra(String)</a></span> - Method in class call.game.state.<a href="../call/game/state/StateInfo.html" title="class in call.game.state">StateInfo</a></dt>
<dd>
<div class="block">Gets extra data</div>
</dd>
<dt><span class="strong"><a href="../call/game/state/StateInfo.html#getExtraInt(java.lang.String)">getExtraInt(String)</a></span> - Method in class call.game.state.<a href="../call/game/state/StateInfo.html" title="class in call.game.state">StateInfo</a></dt>
<dd>
<div class="block">Gets extra integers</div>
</dd>
<dt><span class="strong"><a href="../call/game/main/GameSettings.html#getFps()">getFps()</a></span> - Method in class call.game.main.<a href="../call/game/main/GameSettings.html" title="class in call.game.main">GameSettings</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/main/Unknown.html#getFPS()">getFPS()</a></span> - Static method in class call.game.main.<a href="../call/game/main/Unknown.html" title="class in call.game.main">Unknown</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/shader/Shader.html#getFragmentShader()">getFragmentShader()</a></span> - Method in class call.game.shader.<a href="../call/game/shader/Shader.html" title="class in call.game.shader">Shader</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/image/Animation.html#getFrame(int)">getFrame(int)</a></span> - Method in class call.game.image.<a href="../call/game/image/Animation.html" title="class in call.game.image">Animation</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/image/Animation.html#getFrames()">getFrames()</a></span> - Method in class call.game.image.<a href="../call/game/image/Animation.html" title="class in call.game.image">Animation</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/main/Unknown.html#getGL()">getGL()</a></span> - Static method in class call.game.main.<a href="../call/game/main/Unknown.html" title="class in call.game.main">Unknown</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/main/Unknown.html#getGLProfile()">getGLProfile()</a></span> - Static method in class call.game.main.<a href="../call/game/main/Unknown.html" title="class in call.game.main">Unknown</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/entitys/BaseEntity.html#getHealth()">getHealth()</a></span> - Method in class call.game.entitys.<a href="../call/game/entitys/BaseEntity.html" title="class in call.game.entitys">BaseEntity</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/entitys/HealthEntity.html#getHealth()">getHealth()</a></span> - Method in class call.game.entitys.<a href="../call/game/entitys/HealthEntity.html" title="class in call.game.entitys">HealthEntity</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/entitys/TwoStateEntity.html#getHealth()">getHealth()</a></span> - Method in class call.game.entitys.<a href="../call/game/entitys/TwoStateEntity.html" title="class in call.game.entitys">TwoStateEntity</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/image/Image.html#getHeight()">getHeight()</a></span> - Method in class call.game.image.<a href="../call/game/image/Image.html" title="class in call.game.image">Image</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/main/GameSettings.html#getHeight()">getHeight()</a></span> - Method in class call.game.main.<a href="../call/game/main/GameSettings.html" title="class in call.game.main">GameSettings</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/physicx/BoundingBox.html#getHeight()">getHeight()</a></span> - Method in class call.game.physicx.<a href="../call/game/physicx/BoundingBox.html" title="class in call.game.physicx">BoundingBox</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/main/menu/OverlayMenu.html#getHeight()">getHeight()</a></span> - Method in class call.main.menu.<a href="../call/main/menu/OverlayMenu.html" title="class in call.main.menu">OverlayMenu</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/image/AnimatedSprite.html#getImage()">getImage()</a></span> - Method in class call.game.image.<a href="../call/game/image/AnimatedSprite.html" title="class in call.game.image">AnimatedSprite</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/image/BaseSprite.html#getImage()">getImage()</a></span> - Method in class call.game.image.<a href="../call/game/image/BaseSprite.html" title="class in call.game.image">BaseSprite</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/image/GroupedSprite.html#getImage()">getImage()</a></span> - Method in class call.game.image.<a href="../call/game/image/GroupedSprite.html" title="class in call.game.image">GroupedSprite</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/image/ImageCache.html#getImage(java.lang.String)">getImage(String)</a></span> - Static method in class call.game.image.<a href="../call/game/image/ImageCache.html" title="class in call.game.image">ImageCache</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/image/Sprite.html#getImage()">getImage()</a></span> - Method in class call.game.image.<a href="../call/game/image/Sprite.html" title="class in call.game.image">Sprite</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/image/Animation.html#getIndex()">getIndex()</a></span> - Method in class call.game.image.<a href="../call/game/image/Animation.html" title="class in call.game.image">Animation</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/mod/CALLModLoader.html#getInstance()">getInstance()</a></span> - Static method in class call.game.mod.<a href="../call/game/mod/CALLModLoader.html" title="class in call.game.mod">CALLModLoader</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/mod/Overrider.html#getInstance()">getInstance()</a></span> - Static method in class call.game.mod.<a href="../call/game/mod/Overrider.html" title="class in call.game.mod">Overrider</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/main/menu/DebugMenu.html#getInstance()">getInstance()</a></span> - Static method in class call.main.menu.<a href="../call/main/menu/DebugMenu.html" title="class in call.main.menu">DebugMenu</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/input/keyboard/KeyTypedEvent.html#getKey()">getKey()</a></span> - Method in class call.game.input.keyboard.<a href="../call/game/input/keyboard/KeyTypedEvent.html" title="class in call.game.input.keyboard">KeyTypedEvent</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/main/Unknown.html#getKeyboard()">getKeyboard()</a></span> - Static method in class call.game.main.<a href="../call/game/main/Unknown.html" title="class in call.game.main">Unknown</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/input/keyboard/KeyTypedEvent.html#getKeyState()">getKeyState()</a></span> - Method in class call.game.input.keyboard.<a href="../call/game/input/keyboard/KeyTypedEvent.html" title="class in call.game.input.keyboard">KeyTypedEvent</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/utils/Vec2Double.html#getLength()">getLength()</a></span> - Method in class call.game.utils.<a href="../call/game/utils/Vec2Double.html" title="class in call.game.utils">Vec2Double</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/input/mouse/Mouse.html#getLocation()">getLocation()</a></span> - Static method in class call.game.input.mouse.<a href="../call/game/input/mouse/Mouse.html" title="class in call.game.input.mouse">Mouse</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/mod/ModEntry.html#getMainClass()">getMainClass()</a></span> - Method in class call.game.mod.<a href="../call/game/mod/ModEntry.html" title="class in call.game.mod">ModEntry</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/mod/ModEntry.html#getMainInstance()">getMainInstance()</a></span> - Method in class call.game.mod.<a href="../call/game/mod/ModEntry.html" title="class in call.game.mod">ModEntry</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/entitys/HealthEntity.html#getMaxHealth()">getMaxHealth()</a></span> - Method in class call.game.entitys.<a href="../call/game/entitys/HealthEntity.html" title="class in call.game.entitys">HealthEntity</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/image/Animation.html#getMaxindex()">getMaxindex()</a></span> - Method in class call.game.image.<a href="../call/game/image/Animation.html" title="class in call.game.image">Animation</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/mod/ModEntry.html#getmodID()">getmodID()</a></span> - Method in class call.game.mod.<a href="../call/game/mod/ModEntry.html" title="class in call.game.mod">ModEntry</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/mod/CALLModLoader.html#getMods()">getMods()</a></span> - Method in class call.game.mod.<a href="../call/game/mod/CALLModLoader.html" title="class in call.game.mod">CALLModLoader</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/main/Unknown.html#getMouse()">getMouse()</a></span> - Static method in class call.game.main.<a href="../call/game/main/Unknown.html" title="class in call.game.main">Unknown</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/input/keyboard/KeyBind.html#getName()">getName()</a></span> - Method in class call.game.input.keyboard.<a href="../call/game/input/keyboard/KeyBind.html" title="class in call.game.input.keyboard">KeyBind</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/entitys/particle/ParticleHandler.html#getParticles()">getParticles()</a></span> - Static method in class call.game.entitys.particle.<a href="../call/game/entitys/particle/ParticleHandler.html" title="class in call.game.entitys.particle">ParticleHandler</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/input/keyboard/KeyBind.html#getRealKey()">getRealKey()</a></span> - Method in class call.game.input.keyboard.<a href="../call/game/input/keyboard/KeyBind.html" title="class in call.game.input.keyboard">KeyBind</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/main/Unknown.html#getRenderables()">getRenderables()</a></span> - Static method in class call.game.main.<a href="../call/game/main/Unknown.html" title="class in call.game.main">Unknown</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/image/Image.html#getScale()">getScale()</a></span> - Method in class call.game.image.<a href="../call/game/image/Image.html" title="class in call.game.image">Image</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/utils/Translate.html#getScaledInstance(double, double)">getScaledInstance(double, double)</a></span> - Method in class call.game.utils.<a href="../call/game/utils/Translate.html" title="class in call.game.utils">Translate</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/main/Unknown.html#getScreenSize()">getScreenSize()</a></span> - Static method in class call.game.main.<a href="../call/game/main/Unknown.html" title="class in call.game.main">Unknown</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/entitys/BaseEntity.html#getSprite()">getSprite()</a></span> - Method in class call.game.entitys.<a href="../call/game/entitys/BaseEntity.html" title="class in call.game.entitys">BaseEntity</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/image/GroupedSprite.html#getSprite(java.lang.String)">getSprite(String)</a></span> - Method in class call.game.image.<a href="../call/game/image/GroupedSprite.html" title="class in call.game.image">GroupedSprite</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/image/GroupedSprite.html#getSprites()">getSprites()</a></span> - Method in class call.game.image.<a href="../call/game/image/GroupedSprite.html" title="class in call.game.image">GroupedSprite</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/mod/event/CMLEvent.html#getState()">getState()</a></span> - Method in class call.game.mod.event.<a href="../call/game/mod/event/CMLEvent.html" title="class in call.game.mod.event">CMLEvent</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/state/StateEngine.html#getState()">getState()</a></span> - Method in class call.game.state.<a href="../call/game/state/StateEngine.html" title="class in call.game.state">StateEngine</a></dt>
<dd>
<div class="block">Get the current state instance</div>
</dd>
<dt><span class="strong"><a href="../call/game/main/FileHelper.html#getStream(java.lang.String)">getStream(String)</a></span> - Static method in class call.game.main.<a href="../call/game/main/FileHelper.html" title="class in call.game.main">FileHelper</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/image/Animation.html#getTimer()">getTimer()</a></span> - Method in class call.game.image.<a href="../call/game/image/Animation.html" title="class in call.game.image">Animation</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/main/GameSettings.html#getTitle()">getTitle()</a></span> - Method in class call.game.main.<a href="../call/game/main/GameSettings.html" title="class in call.game.main">GameSettings</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/main/GameSettings.html#getTps()">getTps()</a></span> - Method in class call.game.main.<a href="../call/game/main/GameSettings.html" title="class in call.game.main">GameSettings</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/main/Unknown.html#getTPS()">getTPS()</a></span> - Static method in class call.game.main.<a href="../call/game/main/Unknown.html" title="class in call.game.main">Unknown</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/input/mouse/Mouse.html#getTrueLocation()">getTrueLocation()</a></span> - Static method in class call.game.input.mouse.<a href="../call/game/input/mouse/Mouse.html" title="class in call.game.input.mouse">Mouse</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/main/Unknown.html#getUpdateables()">getUpdateables()</a></span> - Static method in class call.game.main.<a href="../call/game/main/Unknown.html" title="class in call.game.main">Unknown</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/main/FileHelper.html#getURL(java.lang.String)">getURL(String)</a></span> - Static method in class call.game.main.<a href="../call/game/main/FileHelper.html" title="class in call.game.main">FileHelper</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/shader/Shader.html#getVertexShader()">getVertexShader()</a></span> - Method in class call.game.shader.<a href="../call/game/shader/Shader.html" title="class in call.game.shader">Shader</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/image/Image.html#getWidth()">getWidth()</a></span> - Method in class call.game.image.<a href="../call/game/image/Image.html" title="class in call.game.image">Image</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/main/GameSettings.html#getWidth()">getWidth()</a></span> - Method in class call.game.main.<a href="../call/game/main/GameSettings.html" title="class in call.game.main">GameSettings</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/physicx/BoundingBox.html#getWidth()">getWidth()</a></span> - Method in class call.game.physicx.<a href="../call/game/physicx/BoundingBox.html" title="class in call.game.physicx">BoundingBox</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/main/menu/OverlayMenu.html#getWidth()">getWidth()</a></span> - Method in class call.main.menu.<a href="../call/main/menu/OverlayMenu.html" title="class in call.main.menu">OverlayMenu</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/entitys/BaseEntity.html#getX()">getX()</a></span> - Method in class call.game.entitys.<a href="../call/game/entitys/BaseEntity.html" title="class in call.game.entitys">BaseEntity</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/image/BaseSprite.html#getX()">getX()</a></span> - Method in class call.game.image.<a href="../call/game/image/BaseSprite.html" title="class in call.game.image">BaseSprite</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/physicx/BoundingBox.html#getX()">getX()</a></span> - Method in class call.game.physicx.<a href="../call/game/physicx/BoundingBox.html" title="class in call.game.physicx">BoundingBox</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/utils/Vec2Double.html#getX()">getX()</a></span> - Method in class call.game.utils.<a href="../call/game/utils/Vec2Double.html" title="class in call.game.utils">Vec2Double</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/main/menu/OverlayMenu.html#getX()">getX()</a></span> - Method in class call.main.menu.<a href="../call/main/menu/OverlayMenu.html" title="class in call.main.menu">OverlayMenu</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/entitys/BaseEntity.html#getY()">getY()</a></span> - Method in class call.game.entitys.<a href="../call/game/entitys/BaseEntity.html" title="class in call.game.entitys">BaseEntity</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/image/BaseSprite.html#getY()">getY()</a></span> - Method in class call.game.image.<a href="../call/game/image/BaseSprite.html" title="class in call.game.image">BaseSprite</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/physicx/BoundingBox.html#getY()">getY()</a></span> - Method in class call.game.physicx.<a href="../call/game/physicx/BoundingBox.html" title="class in call.game.physicx">BoundingBox</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/utils/Vec2Double.html#getY()">getY()</a></span> - Method in class call.game.utils.<a href="../call/game/utils/Vec2Double.html" title="class in call.game.utils">Vec2Double</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/main/menu/OverlayMenu.html#getY()">getY()</a></span> - Method in class call.main.menu.<a href="../call/main/menu/OverlayMenu.html" title="class in call.main.menu">OverlayMenu</a></dt>
<dd> </dd>
<dt><a href="../call/game/image/GroupedSprite.html" title="class in call.game.image"><span class="strong">GroupedSprite</span></a> - Class in <a href="../call/game/image/package-summary.html">call.game.image</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../call/game/image/GroupedSprite.html#GroupedSprite(double, double)">GroupedSprite(double, double)</a></span> - Constructor for class call.game.image.<a href="../call/game/image/GroupedSprite.html" title="class in call.game.image">GroupedSprite</a></dt>
<dd> </dd>
</dl>
<a href="index-1.html">A</a> <a href="index-2.html">B</a> <a href="index-3.html">C</a> <a href="index-4.html">D</a> <a href="index-5.html">E</a> <a href="index-6.html">F</a> <a href="index-7.html">G</a> <a href="index-8.html">H</a> <a href="index-9.html">I</a> <a href="index-10.html">K</a> <a href="index-11.html">L</a> <a href="index-12.html">M</a> <a href="index-13.html">N</a> <a href="index-14.html">O</a> <a href="index-15.html">P</a> <a href="index-16.html">R</a> <a href="index-17.html">S</a> <a href="index-18.html">T</a> <a href="index-19.html">U</a> <a href="index-20.html">V</a> <a href="index-21.html">W</a> <a href="index-22.html">X</a> <a href="index-23.html">Y</a> </div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../overview-summary.html">Overview</a></li>
<li>Package</li>
<li>Class</li>
<li>Use</li>
<li><a href="../overview-tree.html">Tree</a></li>
<li><a href="../deprecated-list.html">Deprecated</a></li>
<li class="navBarCell1Rev">Index</li>
<li><a href="../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="index-6.html">Prev Letter</a></li>
<li><a href="index-8.html">Next Letter</a></li>
</ul>
<ul class="navList">
<li><a href="../index.html?index-filesindex-7.html" target="_top">Frames</a></li>
<li><a href="index-7.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 ======= -->
</body>
</html>
| {
"content_hash": "68c1ba645cf865388ba5d9e97ed4948b",
"timestamp": "",
"source": "github",
"line_count": 336,
"max_line_length": 840,
"avg_line_length": 97.73511904761905,
"alnum_prop": 0.6872620968969823,
"repo_name": "CUB3D/Unknown-3",
"id": "3339f6e692864b8e40d973306b3695215d1e1e04",
"size": "32839",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "project/doc/index-files/index-7.html",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "84930"
}
],
"symlink_target": ""
} |
package org.apache.sling.auth.core.impl;
import java.io.UnsupportedEncodingException;
import javax.servlet.http.HttpServletRequest;
import org.jmock.Expectations;
import org.jmock.Mockery;
import org.jmock.integration.junit4.JUnit4Mockery;
import junit.framework.TestCase;
import junitx.util.PrivateAccessor;
public class SlingAuthenticatorTest extends TestCase {
private final Mockery context = new JUnit4Mockery();
public void test_quoteCookieValue() throws UnsupportedEncodingException {
try {
SlingAuthenticator.quoteCookieValue(null);
fail("Expected IllegalArgumentExcepion on null value");
} catch (IllegalArgumentException iae) {
// expected
}
checkQuote("\"", "\"\\\"\"");
checkQuote("simplevalue", "\"simplevalue\"");
checkQuote("simple value", "\"simple+value\"");
checkQuote("email@address.com", "\"email@address.com\"");
checkQuote("string\ttab", "\"string%09tab\"");
checkQuote("test中文", "\"test%E4%B8%AD%E6%96%87\"");
try {
SlingAuthenticator.quoteCookieValue("string\rCR");
fail("Expected IllegalArgumentExcepion on value containing CR");
} catch (IllegalArgumentException iae) {
// expected
}
}
public void test_unquoteCookieValue() {
assertNull(SlingAuthenticator.unquoteCookieValue(null));
assertEquals("", SlingAuthenticator.unquoteCookieValue(""));
checkUnQuote("unquoted", "unquoted");
checkUnQuote("unquoted\"", "unquoted\"");
checkUnQuote("un\"quoted", "un\"quoted");
checkUnQuote("\"\\\"\"", "\"");
checkUnQuote("\"simplevalue\"", "simplevalue");
checkUnQuote("\"simple value\"", "simple value");
checkUnQuote("\"email@address.com\"", "email@address.com");
checkUnQuote("\"string\ttab\"", "string\ttab");
}
private void checkQuote(final String value, final String expected) throws UnsupportedEncodingException {
final String actual = SlingAuthenticator.quoteCookieValue(value);
assertEquals(expected, actual);
}
private void checkUnQuote(final String value, final String expected) {
final String actual = SlingAuthenticator.unquoteCookieValue(value);
assertEquals(expected, actual);
}
//SLING-4864
public void test_isAnonAllowed() throws Throwable {
SlingAuthenticator slingAuthenticator = new SlingAuthenticator();
PathBasedHolderCache<AuthenticationRequirementHolder> authRequiredCache = new PathBasedHolderCache<AuthenticationRequirementHolder>();
authRequiredCache.addHolder(new AuthenticationRequirementHolder("/", false, null));
PrivateAccessor.setField(slingAuthenticator, "authRequiredCache", authRequiredCache);
final HttpServletRequest request = context.mock(HttpServletRequest.class);
context.checking(new Expectations() {
{
allowing(request).getServletPath();
will(returnValue(null));
allowing(request).getPathInfo();
will(returnValue(null));
allowing(request).getServerName();
will(returnValue("localhost"));
allowing(request).getServerPort();
will(returnValue(80));
allowing(request).getScheme();
will(returnValue("http"));
}
});
Boolean allowed = (Boolean) PrivateAccessor.invoke(slingAuthenticator,"isAnonAllowed", new Class[]{HttpServletRequest.class},new Object[]{request});
assertTrue(allowed);
}
}
| {
"content_hash": "2ef5cc9065e8b7e72678d1760838c2bd",
"timestamp": "",
"source": "github",
"line_count": 101,
"max_line_length": 157,
"avg_line_length": 36.17821782178218,
"alnum_prop": 0.6516146688560481,
"repo_name": "mikibrv/sling",
"id": "8da1fe6f85ac22cb9d3233fd4ba50645df76a68f",
"size": "4465",
"binary": false,
"copies": "5",
"ref": "refs/heads/trunk",
"path": "bundles/auth/core/src/test/java/org/apache/sling/auth/core/impl/SlingAuthenticatorTest.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ANTLR",
"bytes": "7690"
},
{
"name": "Batchfile",
"bytes": "194"
},
{
"name": "CSS",
"bytes": "80802"
},
{
"name": "Groovy",
"bytes": "7745"
},
{
"name": "HTML",
"bytes": "106621"
},
{
"name": "Java",
"bytes": "21694104"
},
{
"name": "JavaScript",
"bytes": "332686"
},
{
"name": "Makefile",
"bytes": "1519"
},
{
"name": "Python",
"bytes": "2586"
},
{
"name": "Ruby",
"bytes": "4896"
},
{
"name": "Scala",
"bytes": "127988"
},
{
"name": "Shell",
"bytes": "24834"
},
{
"name": "XProc",
"bytes": "2290"
},
{
"name": "XSLT",
"bytes": "8575"
}
],
"symlink_target": ""
} |
require 'dystio/command'
module Dystio
module Commands
# Deletes a directory or item.
class Delete < Dystio::Command
# Initializes an instance of the command with the specified path and options.
#
# @param [String] path the path to the directory or item in the provider.
#
def initialize(path, options = {})
super(options)
@path = path
end
# Executes the command.
def call
end
private
attr_reader :path
end
end
end
| {
"content_hash": "1a1c17bdfb533499dbb16aee01d92e2e",
"timestamp": "",
"source": "github",
"line_count": 25,
"max_line_length": 83,
"avg_line_length": 20.68,
"alnum_prop": 0.6112185686653772,
"repo_name": "evansagge/dystio",
"id": "c10b40c7eb06aa734673381262b250d511d4ea88",
"size": "1093",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "lib/dystio/commands/delete.rb",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
title: Reflect isExtensible
localeTitle: Reflect isExtensible
---
## Reflect isExtensible
Este é um esboço. [Ajude nossa comunidade a expandi-lo](https://github.com/freecodecamp/guides/tree/master/src/pages/javascript/standard-objects/reflect/reflect-isextensible/index.md) .
[Este guia de estilo rápido ajudará a garantir que sua solicitação de recebimento seja aceita](https://github.com/freecodecamp/guides/blob/master/README.md) .
#### Mais Informações: | {
"content_hash": "39b2afd062308bc3ca50d6eeb894e3bb",
"timestamp": "",
"source": "github",
"line_count": 10,
"max_line_length": 185,
"avg_line_length": 46,
"alnum_prop": 0.7978260869565217,
"repo_name": "otavioarc/freeCodeCamp",
"id": "0ef6472607aabf5c3fc08e9a20761cf539924d4e",
"size": "472",
"binary": false,
"copies": "4",
"ref": "refs/heads/master",
"path": "guide/portuguese/javascript/standard-objects/reflect/reflect-isextensible/index.md",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "CSS",
"bytes": "35491"
},
{
"name": "HTML",
"bytes": "17600"
},
{
"name": "JavaScript",
"bytes": "777274"
}
],
"symlink_target": ""
} |
import os
import sys
sys.path.insert(0, os.path.join(os.path.split(__file__)[0], '..'))
| {
"content_hash": "d95a41acb33ed3c2b9ea0d679bb627c6",
"timestamp": "",
"source": "github",
"line_count": 4,
"max_line_length": 66,
"avg_line_length": 22.25,
"alnum_prop": 0.6404494382022472,
"repo_name": "sapo/python-kyototycoon-ng",
"id": "798154a16f0c538678f2d60085faef08188c643e",
"size": "271",
"binary": false,
"copies": "4",
"ref": "refs/heads/master",
"path": "tests/config.py",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "Lua",
"bytes": "1135"
},
{
"name": "Makefile",
"bytes": "149"
},
{
"name": "Python",
"bytes": "107631"
}
],
"symlink_target": ""
} |
package jp.nyatla.nyartoolkit.rpf.tracker.nyartk;
import jp.nyatla.nyartoolkit.core.NyARException;
import jp.nyatla.nyartoolkit.core.param.INyARCameraDistortionFactor;
import jp.nyatla.nyartoolkit.core.raster.NyARGrayscaleRaster;
import jp.nyatla.nyartoolkit.core.types.NyARBufferType;
import jp.nyatla.nyartoolkit.rpf.sampler.lrlabel.LowResolutionLabelingSampler;
import jp.nyatla.nyartoolkit.rpf.sampler.lrlabel.LowResolutionLabelingSamplerOut;
import jp.nyatla.nyartoolkit.rpf.utils.INyARGsRasterGraphics;
import jp.nyatla.nyartoolkit.rpf.utils.NyARGsRasterGraphicsFactory;
/**
* このクラスは、NyARTrackerSourceのリファレンス実装です。
* 全ての画像処理を処理系のソフトウェアで実装します。
* <p>基本的な使い方 -
* このクラスは、次のような手順で使います。
* <ul>
* <li>{@link #refBaseRaster}関数で、基本グレースケール画像を得る。
* <li>基本グレースケール画像に、新しいイメージを書込む。
* <li>{@link NyARTracker#progress}関数に入力する。
* </ul>
* インスタンスの所有するラスタ間の同期は、{@link NyARTracker#progress}がコールする{@link #makeSampleOut}関数で行います。
* </p>
*/
public class NyARTrackerSource_Reference extends NyARTrackerSource
{
/**
* 反転RobertsFilter画像のインスタンス
*/
private LowResolutionLabelingSampler _sampler;
private NyARGrayscaleRaster _rb_source;
private NegativeSqRoberts _rfilter=new NegativeSqRoberts(NyARBufferType.INT1D_GRAY_8);
private INyARGsRasterGraphics _gs_graphics;
/**
* コンストラクタです。
* ヒント画像
* @param i_number_of_sample
* サンプラが検出する最大数。
* 通常100~200以上を指定します。(QVGA画像あたり、100個を基準にします。)
* 数が少なすぎると、検出率が低下します。最低でも、NyARTrackerに設定するターゲット数の合計*2以上を指定してください。
* @param i_ref_raster_distortion
* 歪み矯正の為のオブジェクトを指定します。歪み矯正が必要ない時は、NULLを指定します。
* @param i_width
* ソース画像のサイズ
* @param i_height
* ソース画像のサイズ
* @param i_depth
* 解像度の深さ(1/(2^n))倍の画像として処理する。
* @param i_is_alloc
* ベースラスタのバッファを内部確保外部参照にするかのフラグです。
* trueの場合、バッファは内部に確保され、{@link #wrapBuffer}関数が使用できなくなります。
* @throws NyARException
*/
public NyARTrackerSource_Reference(int i_number_of_sample,INyARCameraDistortionFactor i_ref_raster_distortion,int i_width,int i_height,int i_depth,boolean i_is_alloc) throws NyARException
{
super((int)Math.pow(2,i_depth));
assert(i_depth>0);
int div=this._rob_resolution;
//主GSラスタ
this._base_raster=new NyARGrayscaleRaster(i_width,i_height,NyARBufferType.INT1D_GRAY_8,i_is_alloc);
this._gs_graphics=NyARGsRasterGraphicsFactory.createDriver(this._base_raster);
//Roberts変換ラスタ
this._rb_source=new NyARGrayscaleRaster(i_width/div,i_height/div,NyARBufferType.INT1D_GRAY_8, true);
//Robertsラスタは最も解像度の低いラスタと同じ
this._rbraster=new NyARGrayscaleRaster(i_width/div,i_height/div,NyARBufferType.INT1D_GRAY_8, true);
this._vec_reader=new NyARVectorReader_INT1D_GRAY_8(this._base_raster,i_ref_raster_distortion,this._rbraster);
//samplerとsampleout
this._sampler=new LowResolutionLabelingSampler(i_width, i_height,(int)Math.pow(2,i_depth));
this._sample_out=new LowResolutionLabelingSamplerOut(i_number_of_sample);
}
/**
* GS画像をセットします。
* この関数を使ってセットした画像は、インスタンスから参照されます。
* @param i_ref_source
* @throws NyARException
*/
public void wrapBuffer(NyARGrayscaleRaster i_ref_source) throws NyARException
{
//バッファのスイッチ
this._base_raster.wrapBuffer(i_ref_source.getBuffer());
}
/**
* この関数は、基準画像と内部状態を同期します。 通常、ユーザがこの関数を使用することはありません。
*/
public void syncResource() throws NyARException
{
//内部状態の同期
this._gs_graphics.copyTo(0,0,this._rob_resolution,this._rb_source);
this._rfilter.doFilter(this._rb_source,this._rbraster);
}
/**
* SampleOutを計算して返します。
* この関数は、NyARTrackerが呼び出します。
* 通常、ユーザがこの関数を使用することはありません。
*/
public LowResolutionLabelingSamplerOut makeSampleOut() throws NyARException
{
syncResource();
//敷居値自動調整はそのうちね。
this._sampler.sampling(this._rbraster,220,this._sample_out);
return this._sample_out;
}
}
| {
"content_hash": "159cacd5435bf6bf86a1c302af623a7e",
"timestamp": "",
"source": "github",
"line_count": 107,
"max_line_length": 188,
"avg_line_length": 34.429906542056074,
"alnum_prop": 0.7681867535287731,
"repo_name": "swkim01/GreenHouse",
"id": "e56137319b024a9856ad07a09e71e1da8ed7aebd",
"size": "5911",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "app/NyARToolKit for Android/src/jp/nyatla/nyartoolkit/rpf/tracker/nyartk/NyARTrackerSource_Reference.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Arduino",
"bytes": "10604"
},
{
"name": "Java",
"bytes": "1476887"
},
{
"name": "JavaScript",
"bytes": "2990"
},
{
"name": "Max",
"bytes": "349964"
},
{
"name": "Python",
"bytes": "2312"
},
{
"name": "Shell",
"bytes": "167"
}
],
"symlink_target": ""
} |
// Copyright 2006-2008 Google Inc. All Rights Reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * 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.
// * Neither the name of Google Inc. 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
// OWNER 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.
#ifndef V8_BUILTINS_H_
#define V8_BUILTINS_H_
namespace v8 { namespace internal {
// Define list of builtins implemented in C.
#define BUILTIN_LIST_C(V) \
V(Illegal, 0) \
\
V(EmptyFunction, 0) \
\
V(ArrayCode, 0) \
\
V(ArrayPush, 1) \
V(ArrayPop, 0) \
\
V(HandleApiCall, 0) \
V(HandleApiCallAsFunction, 0)
// Define list of builtins implemented in assembly.
#define BUILTIN_LIST_A(V) \
V(ArgumentsAdaptorTrampoline, BUILTIN, UNINITIALIZED) \
V(JSConstructCall, BUILTIN, UNINITIALIZED) \
V(JSEntryTrampoline, BUILTIN, UNINITIALIZED) \
V(JSConstructEntryTrampoline, BUILTIN, UNINITIALIZED) \
\
V(Return_DebugBreak, BUILTIN, DEBUG_BREAK) \
V(Return_DebugBreakEntry, BUILTIN, DEBUG_BREAK) \
V(ConstructCall_DebugBreak, BUILTIN, DEBUG_BREAK) \
V(StubNoRegisters_DebugBreak, BUILTIN, DEBUG_BREAK) \
\
V(LoadIC_Miss, BUILTIN, UNINITIALIZED) \
V(KeyedLoadIC_Miss, BUILTIN, UNINITIALIZED) \
V(StoreIC_Miss, BUILTIN, UNINITIALIZED) \
V(KeyedStoreIC_Miss, BUILTIN, UNINITIALIZED) \
\
V(LoadIC_Initialize, LOAD_IC, UNINITIALIZED) \
V(LoadIC_PreMonomorphic, LOAD_IC, PREMONOMORPHIC) \
V(LoadIC_Normal, LOAD_IC, MONOMORPHIC) \
V(LoadIC_ArrayLength, LOAD_IC, MONOMORPHIC) \
V(LoadIC_ShortStringLength, LOAD_IC, MONOMORPHIC) \
V(LoadIC_MediumStringLength, LOAD_IC, MONOMORPHIC) \
V(LoadIC_LongStringLength, LOAD_IC, MONOMORPHIC) \
V(LoadIC_FunctionPrototype, LOAD_IC, MONOMORPHIC) \
V(LoadIC_Megamorphic, LOAD_IC, MEGAMORPHIC) \
V(LoadIC_DebugBreak, LOAD_IC, DEBUG_BREAK) \
\
V(KeyedLoadIC_Initialize, KEYED_LOAD_IC, UNINITIALIZED) \
V(KeyedLoadIC_PreMonomorphic, KEYED_LOAD_IC, PREMONOMORPHIC) \
V(KeyedLoadIC_Generic, KEYED_LOAD_IC, MEGAMORPHIC) \
V(KeyedLoadIC_DebugBreak, KEYED_LOAD_IC, DEBUG_BREAK) \
\
V(StoreIC_Initialize, STORE_IC, UNINITIALIZED) \
V(StoreIC_Megamorphic, STORE_IC, MEGAMORPHIC) \
V(StoreIC_DebugBreak, STORE_IC, DEBUG_BREAK) \
\
V(KeyedStoreIC_Initialize, KEYED_STORE_IC, UNINITIALIZED) \
V(KeyedStoreIC_Generic, KEYED_STORE_IC, MEGAMORPHIC) \
V(KeyedStoreIC_DebugBreak, KEYED_STORE_IC, DEBUG_BREAK) \
\
/* Uses KeyedLoadIC_Initialize; must be after in list. */ \
V(FunctionApply, BUILTIN, UNINITIALIZED)
// Define list of builtins implemented in JavaScript.
#define BUILTINS_LIST_JS(V) \
V(EQUALS, 1) \
V(STRICT_EQUALS, 1) \
V(COMPARE, 2) \
V(ADD, 1) \
V(SUB, 1) \
V(MUL, 1) \
V(DIV, 1) \
V(MOD, 1) \
V(INC, 0) \
V(DEC, 0) \
V(BIT_OR, 1) \
V(BIT_AND, 1) \
V(BIT_XOR, 1) \
V(UNARY_MINUS, 0) \
V(BIT_NOT, 0) \
V(SHL, 1) \
V(SAR, 1) \
V(SHR, 1) \
V(DELETE, 1) \
V(IN, 1) \
V(INSTANCE_OF, 1) \
V(GET_KEYS, 0) \
V(FILTER_KEY, 1) \
V(CALL_NON_FUNCTION, 0) \
V(TO_OBJECT, 0) \
V(TO_NUMBER, 0) \
V(TO_STRING, 0) \
V(APPLY_PREPARE, 1) \
V(APPLY_OVERFLOW, 1)
class ObjectVisitor;
class Builtins : public AllStatic {
public:
// Generate all builtin code objects. Should be called once during
// VM initialization.
static void Setup(bool create_heap_objects);
static void TearDown();
// Garbage collection support.
static void IterateBuiltins(ObjectVisitor* v);
// Disassembler support.
static const char* Lookup(byte* pc);
enum Name {
#define DEF_ENUM_C(name, ignore) name,
#define DEF_ENUM_A(name, kind, state) name,
BUILTIN_LIST_C(DEF_ENUM_C)
BUILTIN_LIST_A(DEF_ENUM_A)
#undef DEF_ENUM_C
#undef DEF_ENUM_A
builtin_count
};
enum CFunctionId {
#define DEF_ENUM_C(name, ignore) c_##name,
BUILTIN_LIST_C(DEF_ENUM_C)
#undef DEF_ENUM_C
cfunction_count
};
enum JavaScript {
#define DEF_ENUM(name, ignore) name,
BUILTINS_LIST_JS(DEF_ENUM)
#undef DEF_ENUM
id_count
};
static bool IsConstructCall(Address pc);
static bool IsArgumentsAdaptorCall(Address pc);
static Code* builtin(Name name) {
// Code::cast cannot be used here since we access builtins
// during the marking phase of mark sweep. See IC::Clear.
return reinterpret_cast<Code*>(builtins_[name]);
}
static Address builtin_address(Name name) {
return reinterpret_cast<Address>(&builtins_[name]);
}
static Address c_function_address(CFunctionId id) {
return c_functions_[id];
}
static const char* GetName(JavaScript id) { return javascript_names_[id]; }
static int GetArgumentsCount(JavaScript id) { return javascript_argc_[id]; }
static int NumberOfJavaScriptBuiltins() { return id_count; }
// Called from stub-cache.cc.
static void Generate_CallIC_DebugBreak(MacroAssembler* masm);
static Object* builtin_passed_function;
private:
// The external C++ functions called from the code.
static Address c_functions_[cfunction_count];
// Note: These are always Code objects, but to conform with
// IterateBuiltins() above which assumes Object**'s for the callback
// function f, we use an Object* array here.
static Object* builtins_[builtin_count];
static const char* names_[builtin_count];
static const char* javascript_names_[id_count];
static int javascript_argc_[id_count];
// The offset from the beginning of the JSConstructCall builtin code
// object to the return address after the call. Used for determining
// if a call is a constructor invocation.
static int construct_call_pc_offset_;
static int arguments_adaptor_call_pc_offset_;
static void Generate_Adaptor(MacroAssembler* masm,
int argc,
CFunctionId id);
static void Generate_JSConstructCall(MacroAssembler* masm);
static void Generate_JSEntryTrampoline(MacroAssembler* masm);
static void Generate_JSConstructEntryTrampoline(MacroAssembler* masm);
static void Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm);
static void Generate_FunctionApply(MacroAssembler* masm);
static void Generate_LoadIC_DebugBreak(MacroAssembler* masm);
static void Generate_StoreIC_DebugBreak(MacroAssembler* masm);
static void Generate_KeyedLoadIC_DebugBreak(MacroAssembler* masm);
static void Generate_KeyedStoreIC_DebugBreak(MacroAssembler* masm);
static void Generate_ConstructCall_DebugBreak(MacroAssembler* masm);
static void Generate_Return_DebugBreak(MacroAssembler* masm);
static void Generate_Return_DebugBreakEntry(MacroAssembler* masm);
static void Generate_StubNoRegisters_DebugBreak(MacroAssembler* masm);
};
} } // namespace v8::internal
#endif // V8_BUILTINS_H_
| {
"content_hash": "b661a144be71ffb869f71db27648f238",
"timestamp": "",
"source": "github",
"line_count": 236,
"max_line_length": 78,
"avg_line_length": 41.17372881355932,
"alnum_prop": 0.588864875990532,
"repo_name": "dfdeshom/v8onpython",
"id": "4e04bbc92344872b0bf29d40debc0b85f075aadf",
"size": "9717",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "v8-src/src/builtins.h",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "C",
"bytes": "76538"
},
{
"name": "C++",
"bytes": "3138129"
},
{
"name": "JavaScript",
"bytes": "2314241"
},
{
"name": "Python",
"bytes": "62483"
}
],
"symlink_target": ""
} |
package edu.kit.dama.mdm.dataorganization.ext;
import edu.kit.dama.mdm.dataorganization.entity.impl.client.CollectionNode;
import edu.kit.dama.mdm.dataorganization.entity.impl.client.DataOrganizationNode;
import edu.kit.dama.mdm.dataorganization.entity.impl.client.FileNode;
import edu.kit.dama.mdm.dataorganization.impl.jpa.Attribute;
import java.io.File;
import java.io.IOException;
/**
*
* @author pasic
*/
public class FSParser {
public DataOrganizationNode parseDONodes(File from, int maxDepth,
String viewName) throws IOException {
DataOrganizationNode ret;
if (0 < maxDepth) {
if (from.isDirectory()) {
CollectionNode cn = new CollectionNode();
cn.setName(from.getName());
File[] ls = from.listFiles();
if (null != ls) {
for (File child : ls) {
cn.addChild(parseDONodes(child, maxDepth - 1, viewName));
}
}
ret = cn;
} else {
ret = new FileNode(null);
FileNode ff = new FileNode(null);
ff.setLogicalFileName(null);
long lastmod = from.lastModified();
long sz = from.length();
boolean hidden = from.isHidden();
ret.addAttribute(new Attribute("last-modified", String.valueOf(
lastmod)));
ret.addAttribute(new Attribute("size", String.valueOf(
sz)));
ret.addAttribute(new Attribute("hidden", String.valueOf(
hidden)));
ret.addAttribute(new Attribute("true-path", "Beethoven/op56/" +
from.getName()));
ret.setName(from.getName());
}
} else {
throw new IOException();
}
ret.setViewName(viewName);
return ret;
}
public DataOrganizationNode parseDONodes(File from, int maxDepth) throws
IOException {
return parseDONodes(from, maxDepth, "default");
}
}
| {
"content_hash": "985139c0d61a1d339f1f7c463ed2dc69",
"timestamp": "",
"source": "github",
"line_count": 59,
"max_line_length": 81,
"avg_line_length": 36.20338983050848,
"alnum_prop": 0.5510299625468165,
"repo_name": "kit-data-manager/base",
"id": "d4bcc65f39c02ce180659e2bf3ec3581d2897437",
"size": "2754",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "DataOrganization/src/main/java/edu/kit/dama/mdm/dataorganization/ext/FSParser.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "402"
},
{
"name": "CSS",
"bytes": "504470"
},
{
"name": "HTML",
"bytes": "29793"
},
{
"name": "Java",
"bytes": "5770625"
},
{
"name": "JavaScript",
"bytes": "19166"
},
{
"name": "PLpgSQL",
"bytes": "189351"
},
{
"name": "Shell",
"bytes": "7423"
},
{
"name": "TSQL",
"bytes": "14486"
}
],
"symlink_target": ""
} |
package com.sumzerotrading.ib;
import com.ib.client.EWrapper;
/**
*
* @author Rob Terpilowski
*/
public interface IBConnectionInterface extends EWrapper {
public void setClientId( int clientId );
public void setHost( String host );
public void setPort( int port );
public int getClientId();
public String getHost();
public int getPort();
public void addIbConnectionDelegate(EWrapper delegate);
public void removeIbConnectionDelegate(EWrapper delegate);
}
| {
"content_hash": "5b718bae71a4e41890aee5aba8b71ac5",
"timestamp": "",
"source": "github",
"line_count": 29,
"max_line_length": 62,
"avg_line_length": 18.310344827586206,
"alnum_prop": 0.67984934086629,
"repo_name": "rterp/LimitUpTrading",
"id": "68197215ec4bf88336d1baf149cb294c6bfcbc32",
"size": "1658",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "commons/sumzero-ib-common-api/src/main/java/com/sumzerotrading/ib/IBConnectionInterface.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Java",
"bytes": "1087997"
}
],
"symlink_target": ""
} |
layout: post
type: post
title: "Hello world!"
date: 2017-01-16
category: life
comments: true
author: "LJ MIRANDA"
tags: [github pages, github, jekyll, ruby, wordpress, wordpress to github pages]
---
Hello world!
I'm now transferring my blog from Wordpress into Github pages —the former
site will be deleted soon. So, if you cannot access
[this](https://ljvmiranda.wordpress.com) link anymore, then that means I have
already done the deed. It seems that I have some pretty popular articles in my
Worpress site, so perhaps I'll start migrating them here.
Here are some reasons why I decided to go for Github pages:
- **Integration to my dev workflow**. I have been using Git extensively, and I
enjoy versioning my work. That also includes pushing/pulling changes to my
remote, and practicing continuous integration or deployment. Github pages
enables me to do just that: I just need to push to `master`, and my page
will be deployed in no time. *I can also work offline*, and push upstream
changes to my repository. In summary, I just want a "hack-ish" user-experience.
- **I want to try some web development**. Web developers may scoff at what they
just read, but migrating to Github Pages enabled me to learn a bit of web
dev. Even with just a static site generator like Jekyll, I was able to dip
my toes on the Rails ecosystem, SCSS, and the like.
- **Open-source experience**. I realized that if readers found any mistakes,
either from grammar or content, they can just go ahead and open up a Pull Request.
They don't need to point them out in the comments and wait for me to
correct them myself. Github integration is pretty good, and I'd love to
leverage that[^1].
On the other hand, there are still some things that may need some improvement:
- **Plugins require setup**. For Wordpress, I just virtually need to
drag and drop plugins I want to have. SEO and Analytics are automatically
available. With Github Pages, I need to setup Disqus for comments, Google
Analytics for stats, and other things. *Github pages doesn't support
plugins out-of-the-box*, so if I want to do that, I need to push the
locally generated files instead [^2].
- **No databases, etc.**. That's definitely expected, especially on static-site
generators. If you want the full blogging experience, I'd say stick to
other services for that. If you want a clean and lightweight experience,
then Github pages is a good solution for you.
With that in mind, I won't suggest Jekyll + Github Pages for non-developers who
don't want to roll-up their sleeves and tinker around their site. If you want
an easy and no-ops way of blogging, use other providers such as Medium or
Wordpress. But, if you find joy in building things and making things work, then
Github pages is definitely the best solution for you!
### Footnotes
[^1]: Of course, the source code is available [on Github](https://github.com/ljvmiranda921/ljvmiranda921.github.io)
[^2]: I solved this problem by integrating Travis-CI in my workflow. Whenever the checks on the `master` passed, it automatically deploys the **locally-generated files** to `gh-pages`, and is deployed to the website.
| {
"content_hash": "c455277c2a2676994b4ca4587dd539b5",
"timestamp": "",
"source": "github",
"line_count": 58,
"max_line_length": 216,
"avg_line_length": 55.53448275862069,
"alnum_prop": 0.7506985408258305,
"repo_name": "vankhoa21991/vankhoa21991.github.io",
"id": "79dd47bdf89388cdef39d4588dfb7393aa6f94ad",
"size": "3225",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "experience/_posts/2017-01-17-hello-world.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "5158"
},
{
"name": "HTML",
"bytes": "11369"
},
{
"name": "JavaScript",
"bytes": "2928"
},
{
"name": "Ruby",
"bytes": "1106"
},
{
"name": "SCSS",
"bytes": "12876"
}
],
"symlink_target": ""
} |
use log::{error, warn};
use std::cmp;
use std::convert::TryInto;
use std::fs::File;
use std::io::Read;
use std::path::Path;
use std::sync::Mutex;
#[cfg(feature = "rayon")]
use rayon::prelude::*;
use super::parser;
use super::{Document, Object, ObjectId};
use crate::error::XrefError;
use crate::object_stream::ObjectStream;
use crate::xref::XrefEntry;
use crate::{Error, IncrementalDocument, Result};
impl Document {
/// Load a PDF document from a specified file path.
#[inline]
pub fn load<P: AsRef<Path>>(path: P) -> Result<Document> {
let file = File::open(path)?;
let capacity = Some(file.metadata()?.len() as usize);
Self::load_internal(file, capacity)
}
/// Load a PDF document from an arbitrary source.
#[inline]
pub fn load_from<R: Read>(source: R) -> Result<Document> {
Self::load_internal(source, None)
}
fn load_internal<R: Read>(mut source: R, capacity: Option<usize>) -> Result<Document> {
let mut buffer = capacity.map(Vec::with_capacity).unwrap_or_else(Vec::new);
source.read_to_end(&mut buffer)?;
Reader {
buffer: &buffer,
document: Document::new(),
}
.read()
}
/// Load a PDF document from a memory slice.
pub fn load_mem(buffer: &[u8]) -> Result<Document> {
buffer.try_into()
}
}
impl TryInto<Document> for &[u8] {
type Error = Error;
fn try_into(self) -> Result<Document> {
Reader {
buffer: self,
document: Document::new(),
}
.read()
}
}
impl IncrementalDocument {
/// Load a PDF document from a specified file path.
#[inline]
pub fn load<P: AsRef<Path>>(path: P) -> Result<Self> {
let file = File::open(path)?;
let capacity = Some(file.metadata()?.len() as usize);
Self::load_internal(file, capacity)
}
/// Load a PDF document from an arbitrary source.
#[inline]
pub fn load_from<R: Read>(source: R) -> Result<Self> {
Self::load_internal(source, None)
}
fn load_internal<R: Read>(mut source: R, capacity: Option<usize>) -> Result<Self> {
let mut buffer = capacity.map(Vec::with_capacity).unwrap_or_else(Vec::new);
source.read_to_end(&mut buffer)?;
let document = Reader {
buffer: &buffer,
document: Document::new(),
}
.read()?;
Ok(IncrementalDocument::create_from(buffer, document))
}
/// Load a PDF document from a memory slice.
pub fn load_mem(buffer: &[u8]) -> Result<Document> {
buffer.try_into()
}
}
impl TryInto<IncrementalDocument> for &[u8] {
type Error = Error;
fn try_into(self) -> Result<IncrementalDocument> {
let document = Reader {
buffer: self,
document: Document::new(),
}
.read()?;
Ok(IncrementalDocument::create_from(self.to_vec(), document))
}
}
pub struct Reader<'a> {
buffer: &'a [u8],
document: Document,
}
/// Maximum allowed embedding of literal strings.
pub const MAX_BRACKET: usize = 100;
impl<'a> Reader<'a> {
/// Read whole document.
fn read(mut self) -> Result<Document> {
// The document structure can be expressed in PEG as:
// document <- header indirect_object* xref trailer xref_start
let version = parser::header(self.buffer).ok_or(Error::Header)?;
let xref_start = Self::get_xref_start(self.buffer)?;
if xref_start > self.buffer.len() {
return Err(Error::Xref(XrefError::Start));
}
self.document.xref_start = xref_start;
let (mut xref, mut trailer) = parser::xref_and_trailer(&self.buffer[xref_start..], &self)?;
// Read previous Xrefs of linearized or incremental updated document.
let mut prev_xref_start = trailer.remove(b"Prev");
while let Some(prev) = prev_xref_start.and_then(|offset| offset.as_i64().ok()) {
if prev < 0 || prev as usize > self.buffer.len() {
return Err(Error::Xref(XrefError::PrevStart));
}
let (prev_xref, mut prev_trailer) = parser::xref_and_trailer(&self.buffer[prev as usize..], &self)?;
xref.merge(prev_xref);
// Read xref stream in hybrid-reference file
let prev_xref_stream_start = trailer.remove(b"XRefStm");
if let Some(prev) = prev_xref_stream_start.and_then(|offset| offset.as_i64().ok()) {
if prev < 0 || prev as usize > self.buffer.len() {
return Err(Error::Xref(XrefError::StreamStart));
}
let (prev_xref, _) = parser::xref_and_trailer(&self.buffer[prev as usize..], &self)?;
xref.merge(prev_xref);
}
prev_xref_start = prev_trailer.remove(b"Prev");
}
let xref_entry_count = xref.max_id() + 1;
if xref.size != xref_entry_count {
warn!(
"Size entry of trailer dictionary is {}, correct value is {}.",
xref.size, xref_entry_count
);
xref.size = xref_entry_count;
}
self.document.version = version;
self.document.max_id = xref.size - 1;
self.document.trailer = trailer;
self.document.reference_table = xref;
let zero_length_streams = Mutex::new(vec![]);
let object_streams = Mutex::new(vec![]);
let entries_filter_map = |(_, entry): (&_, &_)| {
if let XrefEntry::Normal { offset, .. } = *entry {
let (object_id, mut object) = self
.read_object(offset as usize, None)
.map_err(|e| error!("Object load error: {:?}", e))
.ok()?;
if let Ok(ref mut stream) = object.as_stream_mut() {
if stream.dict.type_is(b"ObjStm") {
let obj_stream = ObjectStream::new(stream).ok()?;
let mut object_streams = object_streams.lock().unwrap();
// TODO: Is insert and replace intended behavior?
// See https://github.com/J-F-Liu/lopdf/issues/160 for more info
object_streams.extend(obj_stream.objects);
} else if stream.content.is_empty() {
let mut zero_length_streams = zero_length_streams.lock().unwrap();
zero_length_streams.push(object_id);
}
}
Some((object_id, object))
} else {
None
}
};
#[cfg(feature = "rayon")]
{
self.document.objects = self
.document
.reference_table
.entries
.par_iter()
.filter_map(entries_filter_map)
.collect();
}
#[cfg(not(feature = "rayon"))]
{
self.document.objects = self
.document
.reference_table
.entries
.iter()
.filter_map(entries_filter_map)
.collect();
}
// Only add entries, but never replace entries
for (id, entry) in object_streams.into_inner().unwrap() {
self.document.objects.entry(id).or_insert(entry);
}
for object_id in zero_length_streams.into_inner().unwrap() {
let _ = self.set_stream_content(object_id);
}
Ok(self.document)
}
fn set_stream_content(&mut self, object_id: ObjectId) -> Result<()> {
let length = self.get_stream_length(object_id)?;
let stream = self
.document
.get_object_mut(object_id)
.and_then(Object::as_stream_mut)?;
let start = stream.start_position.ok_or(Error::ObjectNotFound)?;
if length < 0 {
return Err(Error::Syntax("Negative stream length.".to_string()));
}
let end = start + length as usize;
if end > self.buffer.len() {
return Err(Error::Syntax("Stream extends after document end.".to_string()));
}
stream.set_content(self.buffer[start..end].to_vec());
Ok(())
}
fn get_stream_length(&self, object_id: ObjectId) -> Result<i64> {
let object = self.document.get_object(object_id)?;
let stream = object.as_stream()?;
stream.dict.get(b"Length").and_then(|value| {
if let Ok(id) = value.as_reference() {
return self.document.get_object(id).and_then(Object::as_i64);
}
value.as_i64()
})
}
/// Get object offset by object id.
fn get_offset(&self, id: ObjectId) -> Result<u32> {
let entry = self.document.reference_table.get(id.0).ok_or(Error::ObjectNotFound)?;
match *entry {
XrefEntry::Normal { offset, generation } => {
if id.1 == generation {
Ok(offset)
} else {
Err(Error::ObjectNotFound)
}
}
_ => Err(Error::ObjectNotFound),
}
}
pub fn get_object(&self, id: ObjectId) -> Result<Object> {
let offset = self.get_offset(id)?;
let (_, obj) = self.read_object(offset as usize, Some(id))?;
Ok(obj)
}
fn read_object(&self, offset: usize, expected_id: Option<ObjectId>) -> Result<(ObjectId, Object)> {
if offset > self.buffer.len() {
return Err(Error::Offset(offset));
}
parser::indirect_object(self.buffer, offset, expected_id, self)
}
fn get_xref_start(buffer: &[u8]) -> Result<usize> {
let seek_pos = buffer.len() - cmp::min(buffer.len(), 512);
Self::search_substring(buffer, b"%%EOF", seek_pos)
.and_then(|eof_pos| if eof_pos > 25 { Some(eof_pos) } else { None })
.and_then(|eof_pos| Self::search_substring(buffer, b"startxref", eof_pos - 25))
.ok_or(Error::Xref(XrefError::Start))
.and_then(|xref_pos| {
if xref_pos <= buffer.len() {
match parser::xref_start(&buffer[xref_pos..]) {
Some(startxref) => Ok(startxref as usize),
None => Err(Error::Xref(XrefError::Start)),
}
} else {
Err(Error::Xref(XrefError::Start))
}
})
}
fn search_substring(buffer: &[u8], pattern: &[u8], start_pos: usize) -> Option<usize> {
let mut seek_pos = start_pos;
let mut index = 0;
while seek_pos < buffer.len() && index < pattern.len() {
if buffer[seek_pos] == pattern[index] {
index += 1;
} else if index > 0 {
seek_pos -= index;
index = 0;
}
seek_pos += 1;
if index == pattern.len() {
let res = seek_pos - index;
return Self::search_substring(buffer, pattern, res + 1).or(Some(res));
}
}
None
}
}
#[test]
fn load_document() {
let mut doc = Document::load("assets/example.pdf").unwrap();
assert_eq!(doc.version, "1.5");
// Create temporary folder to store file.
let temp_dir = tempfile::tempdir().unwrap();
let file_path = temp_dir.path().join("test_2_load.pdf");
doc.save(file_path).unwrap();
}
#[test]
#[should_panic(expected = "Xref(Start)")]
fn load_short_document() {
let _doc = Document::load_mem(b"%PDF-1.5\n%%EOF\n").unwrap();
}
#[test]
fn load_many_shallow_brackets() {
let content: String = std::iter::repeat("()")
.take(MAX_BRACKET * 10)
.flat_map(|x| x.chars())
.collect();
const STREAM_CRUFT: usize = 33;
let doc = format!(
"%PDF-1.5
1 0 obj<</Type/Pages/Kids[5 0 R]/Count 1/Resources 3 0 R/MediaBox[0 0 595 842]>>endobj
2 0 obj<</Type/Font/Subtype/Type1/BaseFont/Courier>>endobj
3 0 obj<</Font<</F1 2 0 R>>>>endobj
5 0 obj<</Type/Page/Parent 1 0 R/Contents[4 0 R]>>endobj
6 0 obj<</Type/Catalog/Pages 1 0 R>>endobj
4 0 obj<</Length {}>>stream
BT
/F1 48 Tf
100 600 Td
({}) Tj
ET
endstream endobj\n",
content.len() + STREAM_CRUFT,
content
);
let doc = format!(
"{}xref
0 7
0000000000 65535 f
0000000009 00000 n
0000000096 00000 n
0000000155 00000 n
0000000291 00000 n
0000000191 00000 n
0000000248 00000 n
trailer
<</Root 6 0 R/Size 7>>
startxref
{}
%%EOF",
doc,
doc.len()
);
let _doc = Document::load_mem(doc.as_bytes()).unwrap();
}
#[test]
fn load_too_deep_brackets() {
let content: Vec<u8> = std::iter::repeat(b'(')
.take(MAX_BRACKET + 1)
.chain(std::iter::repeat(b')').take(MAX_BRACKET + 1))
.collect();
let content = String::from_utf8(content).unwrap();
const STREAM_CRUFT: usize = 33;
let doc = format!(
"%PDF-1.5
1 0 obj<</Type/Pages/Kids[5 0 R]/Count 1/Resources 3 0 R/MediaBox[0 0 595 842]>>endobj
2 0 obj<</Type/Font/Subtype/Type1/BaseFont/Courier>>endobj
3 0 obj<</Font<</F1 2 0 R>>>>endobj
5 0 obj<</Type/Page/Parent 1 0 R/Contents[7 0 R 4 0 R]>>endobj
6 0 obj<</Type/Catalog/Pages 1 0 R>>endobj
7 0 obj<</Length 45>>stream
BT /F1 48 Tf 100 600 Td (Hello World!) Tj ET
endstream
endobj
4 0 obj<</Length {}>>stream
BT
/F1 48 Tf
100 600 Td
({}) Tj
ET
endstream endobj\n",
content.len() + STREAM_CRUFT,
content
);
let doc = format!(
"{}xref
0 7
0000000000 65535 f
0000000009 00000 n
0000000096 00000 n
0000000155 00000 n
0000000387 00000 n
0000000191 00000 n
0000000254 00000 n
0000000297 00000 n
trailer
<</Root 6 0 R/Size 7>>
startxref
{}
%%EOF",
doc,
doc.len()
);
let doc = Document::load_mem(doc.as_bytes()).unwrap();
let pages = doc.get_pages().keys().cloned().collect::<Vec<_>>();
assert_eq!("Hello World!\n", doc.extract_text(&pages).unwrap());
}
| {
"content_hash": "bff03d9aad0fb8603ce22547e8e318bd",
"timestamp": "",
"source": "github",
"line_count": 450,
"max_line_length": 112,
"avg_line_length": 31.13111111111111,
"alnum_prop": 0.54422157184667,
"repo_name": "J-F-Liu/lopdf",
"id": "213441c876183769895de8470d12669095d6acab",
"size": "14071",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/reader.rs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Rust",
"bytes": "402785"
}
],
"symlink_target": ""
} |
<?php
/**
* Zend_XmlRpc_Fault
*/
#require_once 'Zend/XmlRpc/Fault.php';
/**
* XMLRPC Server Faults
*
* Encapsulates an exception for use as an XMLRPC fault response. Valid
* exception classes that may be used for generating the fault code and fault
* string can be attached using {@link attachFaultException()}; all others use a
* generic '404 Unknown error' response.
*
* You may also attach fault observers, which would allow you to monitor
* particular fault cases; this is done via {@link attachObserver()}. Observers
* need only implement a static 'observe' method.
*
* To allow method chaining, you may use the {@link getInstance()} factory
* to instantiate a Zend_XmlRpc_Server_Fault.
*
* @category Zend
* @package Zend_XmlRpc
* @subpackage Server
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_XmlRpc_Server_Fault extends Zend_XmlRpc_Fault
{
/**
* @var Exception
*/
protected $_exception;
/**
* @var array Array of exception classes that may define xmlrpc faults
*/
protected static $_faultExceptionClasses = array('Zend_XmlRpc_Server_Exception' => true);
/**
* @var array Array of fault observers
*/
protected static $_observers = array();
/**
* Constructor
*
* @param Exception $e
* @return Zend_XmlRpc_Server_Fault
*/
public function __construct(Exception $e)
{
$this->_exception = $e;
$code = 404;
$message = 'Unknown error';
$exceptionClass = get_class($e);
foreach (array_keys(self::$_faultExceptionClasses) as $class) {
if ($e instanceof $class) {
$code = $e->getCode();
$message = $e->getMessage();
break;
}
}
parent::__construct($code, $message);
// Notify exception observers, if present
if (!empty(self::$_observers)) {
foreach (array_keys(self::$_observers) as $observer) {
call_user_func(array($observer, 'observe'), $this);
}
}
}
/**
* Return Zend_XmlRpc_Server_Fault instance
*
* @param Exception $e
* @return Zend_XmlRpc_Server_Fault
*/
public static function getInstance(Exception $e)
{
return new self($e);
}
/**
* Attach valid exceptions that can be used to define xmlrpc faults
*
* @param string|array $classes Class name or array of class names
* @return void
*/
public static function attachFaultException($classes)
{
if (!is_array($classes)) {
$classes = (array) $classes;
}
foreach ($classes as $class) {
if (is_string($class) && class_exists($class)) {
self::$_faultExceptionClasses[$class] = true;
}
}
}
/**
* Detach fault exception classes
*
* @param string|array $classes Class name or array of class names
* @return void
*/
public static function detachFaultException($classes)
{
if (!is_array($classes)) {
$classes = (array) $classes;
}
foreach ($classes as $class) {
if (is_string($class) && isset(self::$_faultExceptionClasses[$class])) {
unset(self::$_faultExceptionClasses[$class]);
}
}
}
/**
* Attach an observer class
*
* Allows observation of xmlrpc server faults, thus allowing logging or mail
* notification of fault responses on the xmlrpc server.
*
* Expects a valid class name; that class must have a public static method
* 'observe' that accepts an exception as its sole argument.
*
* @param string $class
* @return boolean
*/
public static function attachObserver($class)
{
if (!is_string($class)
|| !class_exists($class)
|| !is_callable(array($class, 'observe')))
{
return false;
}
if (!isset(self::$_observers[$class])) {
self::$_observers[$class] = true;
}
return true;
}
/**
* Detach an observer
*
* @param string $class
* @return boolean
*/
public static function detachObserver($class)
{
if (!isset(self::$_observers[$class])) {
return false;
}
unset(self::$_observers[$class]);
return true;
}
/**
* Retrieve the exception
*
* @access public
* @return Exception
*/
public function getException()
{
return $this->_exception;
}
}
| {
"content_hash": "aadf2add35ba596bbf1a9ee21a0a4629",
"timestamp": "",
"source": "github",
"line_count": 182,
"max_line_length": 93,
"avg_line_length": 27.247252747252748,
"alnum_prop": 0.5460778382738455,
"repo_name": "almadaocta/lordbike-production",
"id": "6c357a75f4b938aa18dcb29b609d7d8ade4ff979",
"size": "5739",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "errors/includes/src/Zend_XmlRpc_Server_Fault.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": ""
} |
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Grove Kit on Cesar Gimenes</title>
<link>http://crg.eti.br/tags/grove-kit/</link>
<description>Recent content in Grove Kit on Cesar Gimenes</description>
<generator>Hugo -- gohugo.io</generator>
<language>pt-Br</language>
<copyright>Copyright (c) 2016, Cesar Gimenes; all rights reserved.</copyright>
<lastBuildDate>Tue, 19 Jul 2016 00:15:46 -0300</lastBuildDate>
<atom:link href="http://crg.eti.br/tags/grove-kit/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Go com Intel Edison Lendo valor analógico</title>
<link>http://crg.eti.br/post/go_com_intel_edison_lendo_valor_analogico/</link>
<pubDate>Tue, 19 Jul 2016 00:15:46 -0300</pubDate>
<guid>http://crg.eti.br/post/go_com_intel_edison_lendo_valor_analogico/</guid>
<description>Este é mais um post da serie falando sobre Go com Intel Edison, e estou usando bastante do que já falei em outros posts como tratamento de sinais por exemplo.
Para gerar o sinal analógico vamos usar um potenciômetro, ou melhor RAS, Rotary Angle Sensor :D. O estilo do código é muito parecido com o que fizemos para gerar sinais PWM, mas agora a operação é de leitura.
Lendo valores analógicos com MRAA.</description>
</item>
<item>
<title>Go com Intel Edison controlando saída PWM</title>
<link>http://crg.eti.br/post/go_com_intel_edison_controlando_saida_pwm/</link>
<pubDate>Mon, 18 Jul 2016 19:03:19 -0300</pubDate>
<guid>http://crg.eti.br/post/go_com_intel_edison_controlando_saida_pwm/</guid>
<description>PWM ou Pulse Width Modulation tem uma gama enorme de aplicações, usamos para controlar servos, definir o brilho de LEDs, potência de motores, regular tenção, efeitos sonoros e por ai vai.
PWD com MRAA Como de costume poderíamos ter chamado diretamente as funções da MRAA, mas daí o código fica muito mais confuso, uma pratica melhor é dividir o programa em múltiplos arquivos.
Primeiro o cabeçalho pwm.h que vai ser usado para incluir as funções C no código Go.</description>
</item>
<item>
<title>Go com Intel Edison lendo um botão.</title>
<link>http://crg.eti.br/post/go_com_intel_edison_lendo_um_botao/</link>
<pubDate>Mon, 18 Jul 2016 00:51:08 -0300</pubDate>
<guid>http://crg.eti.br/post/go_com_intel_edison_lendo_um_botao/</guid>
<description>Continuando com a diversão com o Intel Edison e a linguagem Go, esse é um pequeno exemplo de como ler o estado de um botão e usar esse estado para exibir uma mensagem na tela e para acender um LED.
Para facilitar o entendimento vamos ver duas formas de implementação, uma com tudo em um único arquivo e outra com um código mais organizado.
Primeiro exemplo Crie um arquivo com o nome button.</description>
</item>
<item>
<title>Intel Bong com Edison</title>
<link>http://crg.eti.br/post/intel_bong_com_edison/</link>
<pubDate>Fri, 15 Jul 2016 17:08:49 -0300</pubDate>
<guid>http://crg.eti.br/post/intel_bong_com_edison/</guid>
<description>Eu quero emitir alertas sonoros no meu projeto de controle IoT e para isso eu precisava entender como a classe buzzer da biblioteca UPM funciona, dava para fazer tudo usando apenas a MRAA afinal é apenas um PWM em um terminal, mas vale a pena usar a UPM pois já vou usar para coisas mais pesadas como controle de periféricos i2c por exemplo.
Outro motivo para esse pequeno tutorial é que a UPM tem vários recursos e bons exemplos mas não encontrei nenhum lugar explicando como compilar apenas usando os recursos do próprio Edison com uma simples linha de comando ou no máximo com um pequeno Makefile.</description>
</item>
</channel>
</rss> | {
"content_hash": "25987ef255209bf5126bfb9e5b09ebce",
"timestamp": "",
"source": "github",
"line_count": 59,
"max_line_length": 360,
"avg_line_length": 65.69491525423729,
"alnum_prop": 0.7198142414860681,
"repo_name": "crgimenes/crgimenes.github.io",
"id": "51424b7a4ce86564d528dae3f06fc5271c118fe7",
"size": "3920",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "tags/grove-kit/index.xml",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "10422"
},
{
"name": "HTML",
"bytes": "756915"
},
{
"name": "JavaScript",
"bytes": "926"
}
],
"symlink_target": ""
} |
[% page.banner = "December 18, 2005 - Ponie project in transition" %]
[% page.title = page.banner %]
<p>
Ponie is the project name for Perl 5.12, a bridge between Perl 5 and
Perl 6. Ponie will bring Perl 5 to Parrot, the virtual machine at the
heart of Perl 6. A project of this size and complexity takes plenty
of talent, and plenty of support, to complete. The first phase of the
project has come to an end, and a new one is beginning.
</p>
<p>
In July of 2003, as Ponie was announced,
<a href="http://www.fotango.com/">Fotango</a>
generously committed two years to the Ponie project. Fotango has delivered
that and more, donating the time and considerable talent of Artur
Bergman and, more recently, Nicholas Clark, to the effort. Because of
their work, Ponie has a solid foundation as the project moves forward.
The Perl Foundation is grateful for their support.
</p>
<p>
But Ponie is a huge, complex project, and there's a lot left to do. With
Fotango wrapping up its commitment, and Nick already extremely busy
serving as pumpking for Perl 5.8, there's simply not enough time for
him to devote to Ponie. That means we need new people to step forward
and contribute to the project.
</p>
<p>
Jesse Vincent, project manager for Perl 6, and Nick have put out a call
for a new pumpking. The Ponie pumpking needs to manage the route we
take to get the Ponie source code from where it is now to its eventual
goal: a Perl 5 runtime fully integrated with the Parrot virtual machine.
For details about their search for the leader for the next phase of
Ponie development, see their full
<a href="http://use.perl.org/article.pl?sid=05/12/14/2318248">Call For Pumpking</a>.
</p>
| {
"content_hash": "fc2af3cc8760d00af687b4b5d99cf4a7",
"timestamp": "",
"source": "github",
"line_count": 39,
"max_line_length": 84,
"avg_line_length": 43.15384615384615,
"alnum_prop": 0.7587641117052881,
"repo_name": "autarch/perlweb",
"id": "de18988b2be45a1bb9a623340c91c92a9f56286a",
"size": "1683",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "docs/foundation/news/2005/ponie_in_transition.html",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "39919"
},
{
"name": "JavaScript",
"bytes": "22100"
},
{
"name": "Perl",
"bytes": "7922790"
},
{
"name": "Shell",
"bytes": "1932"
}
],
"symlink_target": ""
} |
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Substance xmlns="uri:/mil/tatrc/physiology/datamodel" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" State="Liquid" xsi:schemaLocation="">
<Name>Succinylcholine</Name>
<MolarMass value="290.4" unit="g/mol"/>
<Clearance>
<Systemic>
<FractionExcretedInFeces value="0.0"/>
<FractionUnboundInPlasma value="0.8"/>
<IntrinsicClearance value="0.0" unit="mL/min kg"/>
<RenalClearance value="0.0" unit="mL/min kg"/>
<SystemicClearance value="50.0" unit="mL/min kg"/>
</Systemic>
<RenalDynamics>
<Clearance value="0.0" unit="mL/min kg"/>
</RenalDynamics>
</Clearance>
<Pharmacokinetics>
<AcidDissociationConstant value="1.0"/>
<BindingProtein>Albumin</BindingProtein>
<BloodPlasmaRatio value="1.0"/>
<FractionUnboundInPlasma value="0.8"/>
<IonicState>Base</IonicState>
<LogP value="-1.5"/>
</Pharmacokinetics>
<Pharmacodynamics>
<Bronchodilation value="0.0"/>
<DiastolicPressureModifier value="-0.1"/>
<EC50 value="0.5811" unit="ug/mL"/>
<HeartRateModifier value="-0.1"/>
<NeuromuscularBlock value="1.0"/>
<PupilState>Normal</PupilState>
<RespirationRateModifier value="0.0"/>
<Sedation value="0.0"/>
<SystolicPressureModifier value="-0.1"/>
<TidalVolumeModifier value="0.0"/>
</Pharmacodynamics>
</Substance>
| {
"content_hash": "551c89ea90315331a336e0850781fa8a",
"timestamp": "",
"source": "github",
"line_count": 37,
"max_line_length": 146,
"avg_line_length": 41.2972972972973,
"alnum_prop": 0.6086387434554974,
"repo_name": "ScreenBasedSimulator/ScreenBasedSimulator2",
"id": "8ba4a04fde1d98aa1d1aeb8f9933caf724f68726",
"size": "1528",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "substances/Succinylcholine.xml",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "424878"
},
{
"name": "GLSL",
"bytes": "309851"
},
{
"name": "HTML",
"bytes": "4690"
},
{
"name": "Java",
"bytes": "2611757"
},
{
"name": "JavaScript",
"bytes": "10045"
}
],
"symlink_target": ""
} |
ACCEPTED
#### According to
Index Fungorum
#### Published in
Sydowia 10: 42 (1957)
#### Original name
Appendiculella camerunensis Hansf.
### Remarks
null | {
"content_hash": "e312164d0ee1dc7de5f0dcaef055dc64",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 34,
"avg_line_length": 12,
"alnum_prop": 0.717948717948718,
"repo_name": "mdoering/backbone",
"id": "83fa5039bc87ce09462163aaca7cb57504bde034",
"size": "214",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "life/Fungi/Ascomycota/Dothideomycetes/Meliolales/Meliolaceae/Appendiculella/Appendiculella camerunensis/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
package dk.deck.aws.price.api;
import dk.deck.aws.price.api.model.Price;
import java.io.IOException;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
/**
*
* @author Jesper Terkelsen
*/
public class RdsPriceListTest {
public RdsPriceListTest() {
}
@BeforeClass
public static void setUpClass() {
}
@AfterClass
public static void tearDownClass() {
}
private RdsPriceList instance;
@Before
public void setUp() {
instance = new RdsPriceList();
}
@After
public void tearDown() {
}
/**
* Test of getRdsHourRate method, of class RdsPriceList.
*/
@Test
public void testGetRdsHourRate() throws Exception {
System.out.println("getRdsHourRate");
getRdsHourRate("eu-west-1", "mysql", "db.t1.micro", false);
getRdsHourRate("eu-west-1", "mysql", "db.t1.micro", true);
getRdsHourRate("eu-west-1", "mysql", "db.m1.small", false);
getRdsHourRate("eu-west-1", "mysql", "db.m1.small", true);
getRdsHourRate("eu-west-1", "mysql", "db.m1.medium", false);
getRdsHourRate("eu-west-1", "mysql", "db.m1.medium", true);
getRdsHourRate("eu-west-1", "mysql", "db.m1.large", false);
getRdsHourRate("eu-west-1", "mysql", "db.m1.large", true);
getRdsHourRate("eu-west-1", "mysql", "db.m1.xlarge", false);
getRdsHourRate("eu-west-1", "mysql", "db.m1.xlarge", true);
getRdsHourRate("eu-west-1", "mysql", "db.m2.xlarge", false);
getRdsHourRate("eu-west-1", "mysql", "db.m2.xlarge", true);
getRdsHourRate("eu-west-1", "mysql", "db.m2.2xlarge", false);
getRdsHourRate("eu-west-1", "mysql", "db.m2.2xlarge", true);
getRdsHourRate("eu-west-1", "mysql", "db.m2.4xlarge", false);
getRdsHourRate("eu-west-1", "mysql", "db.m2.4xlarge", true);
}
private Price getRdsHourRate(String regionName, String dbEngine, String instanceTypeClass, boolean multiAz) throws IOException{
Price result = instance.getRdsHourRate(regionName, dbEngine, instanceTypeClass, multiAz);
System.out.println(regionName + " " + dbEngine + " " + instanceTypeClass + " " + multiAz + ": " + result);
return result;
}
}
| {
"content_hash": "1745c9aa67195ea39e3fea5b36c086c6",
"timestamp": "",
"source": "github",
"line_count": 69,
"max_line_length": 131,
"avg_line_length": 33.81159420289855,
"alnum_prop": 0.6236605229318474,
"repo_name": "JesperTerkelsen/aws-price-api",
"id": "a60fec9c4619070ff13a76db31481ec9ee593e2b",
"size": "2936",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "modules/api/src/test/java/dk/deck/aws/price/api/RdsPriceListTest.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "41115"
}
],
"symlink_target": ""
} |
package org.glowroot.agent.weaving.targets;
public class NestingMisc implements Misc {
private static final String yes;
private final boolean stopNesting;
// test with static initializer present to verify static initializer merging
static {
yes = "yes";
}
public NestingMisc() {
this(false);
}
private NestingMisc(boolean stopNesting) {
this.stopNesting = stopNesting;
}
@Override
public void execute1() {
if (!stopNesting) {
new NestingMisc(true).execute1();
}
}
@Override
public String executeWithReturn() {
return yes;
}
@Override
public void executeWithArgs(String one, int two) {}
}
| {
"content_hash": "f9b687693289edaeb7f119a5c72c0682",
"timestamp": "",
"source": "github",
"line_count": 37,
"max_line_length": 80,
"avg_line_length": 19.62162162162162,
"alnum_prop": 0.6239669421487604,
"repo_name": "trask/glowroot",
"id": "8a1417ce909270b62502bd9136c30630addc4846",
"size": "1341",
"binary": false,
"copies": "2",
"ref": "refs/heads/main",
"path": "agent/core/src/test/java/org/glowroot/agent/weaving/targets/NestingMisc.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "236"
},
{
"name": "Dockerfile",
"bytes": "999"
},
{
"name": "HTML",
"bytes": "465740"
},
{
"name": "Handlebars",
"bytes": "30516"
},
{
"name": "Java",
"bytes": "7493967"
},
{
"name": "JavaScript",
"bytes": "575303"
},
{
"name": "SCSS",
"bytes": "53842"
},
{
"name": "Scala",
"bytes": "241694"
},
{
"name": "Shell",
"bytes": "33363"
}
],
"symlink_target": ""
} |
import sys
import inspect
from models import TopologyParameterCustomValue
from system.models import Configuration
def configuration_factory(databaseinfra, memory_size):
for name, obj in inspect.getmembers(sys.modules[__name__]):
if inspect.isclass(obj) and '__ENGINE__' in obj.__dict__:
if obj.__ENGINE__ == databaseinfra.engine.name:
return obj(databaseinfra, memory_size)
raise NotImplementedError
def configuration_exists(engine_name, parameter_name):
for name, obj in inspect.getmembers(sys.modules[__name__]):
if inspect.isclass(obj) and '__ENGINE__' in obj.__dict__:
if obj.__ENGINE__ == engine_name:
parameter_name = parameter_name.replace('-', '_')
if parameter_name in obj.__dict__:
return True
return False
class ParameterObject(object):
def __init__(self, value, default):
self.value = str(value)
self.default = str(default)
class ConfigurationBase(object):
__ENGINE__ = 'None'
MB_TO_GB_FACTOR = 1.0 / 1024
MB_FORMATTER = 'MB'
GB_FORMATTER = 'GB'
def __init__(self, databaseinfra, memory_size_mega):
self.databaseinfra = databaseinfra
self._memory_size = memory_size_mega
@property
def memory_size_in_mb(self):
return self._memory_size
@property
def memory_size_in_gb(self):
return round(self._memory_size * self.MB_TO_GB_FACTOR, 2)
@property
def memory_size_in_bytes(self):
return self._memory_size * 1024 * 1024
def value_in_mb(self, value):
return "{}{}".format(int(value), self.MB_FORMATTER)
def value_in_gb(self, value):
return "{}{}".format(int(value), self.GB_FORMATTER)
def value_format(self, value):
value_in_gb = value * self.MB_TO_GB_FACTOR
if isinstance(value_in_gb, int) and value_in_gb >= 1:
return self.value_in_gb(value_in_gb)
return self.value_in_mb(value)
def get_parameter(self, parameter_name, default):
value = self.databaseinfra.get_parameter_value_by_parameter_name(
parameter_name=parameter_name
)
if not value:
value = default
return ParameterObject(value, default)
def __getattribute__(self, item):
if item == 'databaseinfra':
return object.__getattribute__(self, item)
topology = self.databaseinfra.plan.replication_topology
try:
attribute = TopologyParameterCustomValue.objects.get(
topology=topology, parameter__name=item.replace("_", "-")
)
return object.__getattribute__(self, attribute.attr_name)
except TopologyParameterCustomValue.DoesNotExist:
return object.__getattribute__(self, item)
class ConfigurationRedis(ConfigurationBase):
__ENGINE__ = 'redis'
@property
def maxmemory(self):
parameter_name = inspect.stack()[0][3]
if self.memory_size_in_gb <= 1:
value = self.memory_size_in_bytes / 2
else:
value = self.memory_size_in_bytes * 0.75
default = int(value)
return self.get_parameter(parameter_name, default)
@property
def appendonly(self):
parameter_name = inspect.stack()[0][3]
if self.databaseinfra.plan.has_persistence:
default = 'yes'
else:
default = 'no'
return self.get_parameter(parameter_name, default)
@property
def maxmemory_policy(self):
parameter_name = inspect.stack()[0][3]
if self.databaseinfra.plan.has_persistence:
default = 'volatile-lru'
else:
default = 'allkeys-lru'
return self.get_parameter(parameter_name, default)
@property
def loglevel(self):
parameter_name = inspect.stack()[0][3]
default = 'notice'
return self.get_parameter(parameter_name, default)
@property
def databases(self):
parameter_name = inspect.stack()[0][3]
default = '1'
return self.get_parameter(parameter_name, default)
@property
def timeout(self):
parameter_name = inspect.stack()[0][3]
default = 0
return self.get_parameter(parameter_name, default)
@property
def rdbcompression(self):
parameter_name = inspect.stack()[0][3]
default = 'yes'
return self.get_parameter(parameter_name, default)
@property
def rdbchecksum(self):
parameter_name = inspect.stack()[0][3]
default = 'yes'
return self.get_parameter(parameter_name, default)
@property
def slave_serve_stale_data(self):
parameter_name = inspect.stack()[0][3]
default = 'yes'
return self.get_parameter(parameter_name, default)
@property
def slave_read_only(self):
parameter_name = inspect.stack()[0][3]
default = 'yes'
return self.get_parameter(parameter_name, default)
@property
def maxclients(self):
parameter_name = inspect.stack()[0][3]
default = 10000
return self.get_parameter(parameter_name, default)
@property
def appendfsync(self):
parameter_name = inspect.stack()[0][3]
default = 'everysec'
return self.get_parameter(parameter_name, default)
@property
def no_appendfsync_on_rewrite(self):
parameter_name = inspect.stack()[0][3]
default = 'no'
return self.get_parameter(parameter_name, default)
@property
def auto_aof_rewrite_percentage(self):
parameter_name = inspect.stack()[0][3]
default = 100
return self.get_parameter(parameter_name, default)
@property
def auto_aof_rewrite_min_size(self):
parameter_name = inspect.stack()[0][3]
default = 1073741824
return self.get_parameter(parameter_name, default)
@property
def lua_time_limit(self):
parameter_name = inspect.stack()[0][3]
default = 5000
return self.get_parameter(parameter_name, default)
@property
def slowlog_log_slower_than(self):
parameter_name = inspect.stack()[0][3]
default = 10000
return self.get_parameter(parameter_name, default)
@property
def slowlog_max_len(self):
parameter_name = inspect.stack()[0][3]
default = 1024
return self.get_parameter(parameter_name, default)
@property
def hash_max_ziplist_entries(self):
parameter_name = inspect.stack()[0][3]
default = 512
return self.get_parameter(parameter_name, default)
@property
def hash_max_ziplist_value(self):
parameter_name = inspect.stack()[0][3]
default = 64
return self.get_parameter(parameter_name, default)
@property
def set_max_intset_entries(self):
parameter_name = inspect.stack()[0][3]
default = 512
return self.get_parameter(parameter_name, default)
@property
def zset_max_ziplist_entries(self):
parameter_name = inspect.stack()[0][3]
default = 128
return self.get_parameter(parameter_name, default)
@property
def zset_max_ziplist_value(self):
parameter_name = inspect.stack()[0][3]
default = 64
return self.get_parameter(parameter_name, default)
@property
def activerehashing(self):
parameter_name = inspect.stack()[0][3]
default = 'yes'
return self.get_parameter(parameter_name, default)
@property
def repl_ping_slave_period(self):
parameter_name = inspect.stack()[0][3]
default = 1
return self.get_parameter(parameter_name, default)
@property
def repl_timeout(self):
parameter_name = inspect.stack()[0][3]
default = 3600
return self.get_parameter(parameter_name, default)
@property
def repl_disable_tcp_nodelay(self):
parameter_name = inspect.stack()[0][3]
default = 'no'
return self.get_parameter(parameter_name, default)
@property
def repl_backlog_size(self):
parameter_name = inspect.stack()[0][3]
default = 1048576
return self.get_parameter(parameter_name, default)
@property
def repl_backlog_ttl(self):
parameter_name = inspect.stack()[0][3]
default = 3600
return self.get_parameter(parameter_name, default)
@property
def client_output_buffer_limit_normal(self):
parameter_name = inspect.stack()[0][3]
default = "0 0 0"
return self.get_parameter(parameter_name, default)
@property
def client_output_buffer_limit_slave(self):
parameter_name = inspect.stack()[0][3]
if self.memory_size_in_gb <= 1:
default = "536870912 536870912 3600"
elif self.memory_size_in_gb <= 2:
default = "1073741824 1073741824 3600"
elif self.memory_size_in_gb <= 4:
default = "2147483648 2147483648 3600"
else:
default = "4294967296 4294967296 3600"
return self.get_parameter(parameter_name, default)
@property
def client_output_buffer_limit_pubsub(self):
parameter_name = inspect.stack()[0][3]
default = "33554432 8388608 60"
return self.get_parameter(parameter_name, default)
@property
def cluster_enabled(self):
return 'no'
@property
def cluster_enabled_true(self):
return 'yes'
@property
def save(self):
parameter_name = inspect.stack()[0][3]
default = '7200 1 3600 10 1800 10000'
return self.get_parameter(parameter_name, default)
@property
def save_list(self):
save_value = self.save.value
save_list = save_value.split()
if len(save_list) % 2 != 0:
raise Exception(
'Invalid argument {} for save parameter.'.format(save_value)
)
save_list2 = []
for i in range(0, len(save_list), 2):
item = "{} {}".format(save_list[i], save_list[i + 1])
save_list2.append(item)
return save_list2
@property
def cluster_node_timeout(self):
parameter_name = inspect.stack()[0][3]
default = 5000
return self.get_parameter(parameter_name, default)
class ConfigurationMySQL(ConfigurationBase):
__ENGINE__ = 'mysql'
@property
def query_cache_size(self):
parameter_name = inspect.stack()[0][3]
default = 0
return self.get_parameter(parameter_name, default)
@property
def max_allowed_packet(self):
parameter_name = inspect.stack()[0][3]
default = 4194304
return self.get_parameter(parameter_name, default)
@property
def sort_buffer_size(self):
parameter_name = inspect.stack()[0][3]
default = int(self.memory_size_in_bytes / 204.8)
return self.get_parameter(parameter_name, default)
@property
def tmp_table_size(self):
parameter_name = inspect.stack()[0][3]
default = int(self.memory_size_in_bytes / 64)
return self.get_parameter(parameter_name, default)
@property
def max_heap_table_size(self):
parameter_name = inspect.stack()[0][3]
default = 16777216
return self.get_parameter(parameter_name, default)
@property
def max_binlog_size(self):
parameter_name = inspect.stack()[0][3]
if self.memory_size_in_mb < 2048:
default = 52428800
elif self.memory_size_in_mb < 8192:
default = 104857600
elif self.memory_size_in_mb < 32768:
default = 262144000
else:
default = 524288000
return self.get_parameter(parameter_name, default)
@property
def key_buffer_size(self):
parameter_name = inspect.stack()[0][3]
default = 8388608
return self.get_parameter(parameter_name, default)
@property
def myisam_sort_buffer_size(self):
parameter_name = inspect.stack()[0][3]
default = 8388608
return self.get_parameter(parameter_name, default)
@property
def read_buffer_size(self):
parameter_name = inspect.stack()[0][3]
default = 131072
return self.get_parameter(parameter_name, default)
@property
def read_rnd_buffer_size(self):
parameter_name = inspect.stack()[0][3]
default = 262144
return self.get_parameter(parameter_name, default)
@property
def innodb_buffer_pool_size(self):
parameter_name = inspect.stack()[0][3]
if self.memory_size_in_mb < 1024:
default = self.memory_size_in_bytes / 4
elif self.memory_size_in_mb < 8192:
default = self.memory_size_in_bytes / 2
else:
default = (self.memory_size_in_bytes * 3) / 4
default = int(default)
return self.get_parameter(parameter_name, default)
@property
def innodb_log_file_size(self):
parameter_name = inspect.stack()[0][3]
default = 50331648
return self.get_parameter(parameter_name, default)
@property
def innodb_log_buffer_size(self):
parameter_name = inspect.stack()[0][3]
default = 8388608
return self.get_parameter(parameter_name, default)
@property
def binlog_format(self):
parameter_name = inspect.stack()[0][3]
default = 'ROW'
return self.get_parameter(parameter_name, default)
@property
def transaction_isolation(self):
parameter_name = inspect.stack()[0][3]
default = 'READ-COMMITTED'
return self.get_parameter(parameter_name, default)
@property
def default_storage_engine(self):
parameter_name = inspect.stack()[0][3]
default = 'InnoDB'
return self.get_parameter(parameter_name, default)
@property
def default_tmp_storage_engine(self):
parameter_name = inspect.stack()[0][3]
default = 'InnoDB'
return self.get_parameter(parameter_name, default)
@property
def character_set_server(self):
parameter_name = inspect.stack()[0][3]
default = 'utf8'
return self.get_parameter(parameter_name, default)
@property
def collation_server(self):
parameter_name = inspect.stack()[0][3]
default = 'utf8_general_ci'
return self.get_parameter(parameter_name, default)
@property
def max_connections(self):
parameter_name = inspect.stack()[0][3]
default = 1000
return self.get_parameter(parameter_name, default)
@property
def max_connect_errors(self):
parameter_name = inspect.stack()[0][3]
default = 999999
return self.get_parameter(parameter_name, default)
@property
def thread_cache_size(self):
parameter_name = inspect.stack()[0][3]
default = 32
return self.get_parameter(parameter_name, default)
@property
def table_open_cache(self):
parameter_name = inspect.stack()[0][3]
default = 4096
return self.get_parameter(parameter_name, default)
@property
def query_cache_type(self):
parameter_name = inspect.stack()[0][3]
default = 'OFF'
return self.get_parameter(parameter_name, default)
@property
def sync_binlog(self):
parameter_name = inspect.stack()[0][3]
default = 1
return self.get_parameter(parameter_name, default)
@property
def expire_logs_days(self):
parameter_name = inspect.stack()[0][3]
default = 3
return self.get_parameter(parameter_name, default)
@property
def long_query_time(self):
parameter_name = inspect.stack()[0][3]
default = '1.000000'
return self.get_parameter(parameter_name, default)
@property
def slow_query_log(self):
parameter_name = inspect.stack()[0][3]
default = 'ON'
return self.get_parameter(parameter_name, default)
@property
def innodb_autoextend_increment(self):
parameter_name = inspect.stack()[0][3]
default = 8
return self.get_parameter(parameter_name, default)
@property
def innodb_file_per_table(self):
parameter_name = inspect.stack()[0][3]
default = 'ON'
return self.get_parameter(parameter_name, default)
@property
def innodb_lock_wait_timeout(self):
parameter_name = inspect.stack()[0][3]
default = 50
return self.get_parameter(parameter_name, default)
@property
def innodb_flush_log_at_trx_commit(self):
parameter_name = inspect.stack()[0][3]
default = 1
return self.get_parameter(parameter_name, default)
@property
def innodb_thread_concurrency(self):
parameter_name = inspect.stack()[0][3]
default = 16
return self.get_parameter(parameter_name, default)
@property
def innodb_max_dirty_pages_pct(self):
parameter_name = inspect.stack()[0][3]
default = 90
return self.get_parameter(parameter_name, default)
@property
def innodb_max_purge_lag(self):
parameter_name = inspect.stack()[0][3]
default = 0
return self.get_parameter(parameter_name, default)
@property
def explicit_defaults_for_timestamp(self):
parameter_name = inspect.stack()[0][3]
default = 'ON'
return self.get_parameter(parameter_name, default)
@property
def performance_schema(self):
parameter_name = inspect.stack()[0][3]
if self.memory_size_in_mb < 8192:
default = 'OFF'
else:
default = 'ON'
return self.get_parameter(parameter_name, default)
@property
def thread_stack(self):
parameter_name = inspect.stack()[0][3]
default = 196608
return self.get_parameter(parameter_name, default)
@property
def log_slave_updates(self):
parameter_name = inspect.stack()[0][3]
default = 'ON'
return self.get_parameter(parameter_name, default)
@property
def innodb_log_files_in_group(self):
parameter_name = inspect.stack()[0][3]
default = 3
return self.get_parameter(parameter_name, default)
@property
def innodb_flush_method(self):
parameter_name = inspect.stack()[0][3]
default = 'O_DIRECT'
return self.get_parameter(parameter_name, default)
@property
def skip_external_locking(self):
parameter_name = inspect.stack()[0][3]
default = 'ON'
return self.get_parameter(parameter_name, default)
@property
def skip_name_resolve(self):
parameter_name = inspect.stack()[0][3]
default = 'ON'
return self.get_parameter(parameter_name, default)
@property
def wait_timeout(self):
parameter_name = inspect.stack()[0][3]
default = 28800
return self.get_parameter(parameter_name, default)
@property
def interactive_timeout(self):
parameter_name = inspect.stack()[0][3]
default = 28800
return self.get_parameter(parameter_name, default)
@property
def log_bin_trust_function_creators(self):
parameter_name = inspect.stack()[0][3]
default = 'OFF'
return self.get_parameter(parameter_name, default)
@property
def sql_mode(self):
parameter_name = inspect.stack()[0][3]
default = 'default'
return self.get_parameter(parameter_name, default)
@property
def audit_log_format(self):
parameter_name = inspect.stack()[0][3]
default = 'NEW'
return self.get_parameter(parameter_name, default)
@property
def audit_log_rotate_on_size(self):
parameter_name = inspect.stack()[0][3]
default = 0
return self.get_parameter(parameter_name, default)
@property
def audit_log_exclude_accounts(self):
parameter_name = inspect.stack()[0][3]
default = ''
return self.get_parameter(parameter_name, default)
@property
def audit_log_policy(self):
parameter_name = inspect.stack()[0][3]
default = 'NONE'
return self.get_parameter(parameter_name, default)
@property
def init_connect(self):
parameter_name = inspect.stack()[0][3]
default = ''
return self.get_parameter(parameter_name, default)
@property
def slave_net_timeout(self):
parameter_name = inspect.stack()[0][3]
default = 60
return self.get_parameter(parameter_name, default)
class ConfigurationMongoDB(ConfigurationBase):
__ENGINE__ = 'mongodb'
@property
def systemLog_quiet(self):
parameter_name = inspect.stack()[0][3]
default = False
return self.get_parameter(parameter_name, default)
def __getattr__(self, item):
if '.' in item:
item = item.replace('.', '_')
return self.__getattribute__(item)
@property
def oplogSize(self):
parameter_name = inspect.stack()[0][3]
default = Configuration.get_by_name_as_int(
'parameter_{}'.format(parameter_name), 512
)
return self.get_parameter(parameter_name, default)
@property
def quiet(self):
parameter_name = inspect.stack()[0][3]
default = 'false'
return self.get_parameter(parameter_name, default)
@property
def logLevel(self):
parameter_name = inspect.stack()[0][3]
default = 0
return self.get_parameter(parameter_name, default)
@property
def wiredTiger_engineConfig_cacheSizeGB(self):
parameter_name = inspect.stack()[0][3]
if self.memory_size_in_mb < 2564:
cache_mb = 256
else:
cache_mb = (self.memory_size_in_mb - 1024) / 2
default = round(cache_mb / 1024.0, 2)
return self.get_parameter(parameter_name, default)
class ConfigurationMySQLPercona(ConfigurationMySQL):
__ENGINE__ = 'mysql_percona'
| {
"content_hash": "ff87eb74ebc1695609e2a1dda53efa53",
"timestamp": "",
"source": "github",
"line_count": 720,
"max_line_length": 76,
"avg_line_length": 30.583333333333332,
"alnum_prop": 0.6133060853769301,
"repo_name": "globocom/database-as-a-service",
"id": "39db492ae77cbeadbfdec622378ac0e5fe2d9fed",
"size": "22067",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "dbaas/physical/configurations.py",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "CSS",
"bytes": "243568"
},
{
"name": "Dockerfile",
"bytes": "1372"
},
{
"name": "HTML",
"bytes": "310401"
},
{
"name": "JavaScript",
"bytes": "988830"
},
{
"name": "Makefile",
"bytes": "5199"
},
{
"name": "Python",
"bytes": "9674426"
},
{
"name": "Shell",
"bytes": "215115"
}
],
"symlink_target": ""
} |
Create an implementation of the atbash cipher, an ancient encryption system created in the Middle East.
The Atbash cipher is a simple substitution cipher that relies on
transposing all the letters in the alphabet such that the resulting
alphabet is backwards. The first letter is replaced with the last
letter, the second with the second-last, and so on.
An Atbash cipher for the Latin alphabet would be as follows:
```plain
Plain: abcdefghijklmnopqrstuvwxyz
Cipher: zyxwvutsrqponmlkjihgfedcba
```
It is a very weak cipher because it only has one possible key, and it is
a simple monoalphabetic substitution cipher. However, this may not have
been an issue in the cipher's time.
Ciphertext is written out in groups of fixed length, the traditional group size
being 5 letters, and punctuation is excluded. This is to make it harder to guess
things based on word boundaries.
## Examples
- Encoding `test` gives `gvhg`
- Decoding `gvhg` gives `test`
- Decoding `gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt` gives `The quick brown fox jumps over the lazy dog.`
## Setup
Go through the project setup instructions for Xcode using Swift:
http://help.exercism.io/getting-started-with-swift.html
## Source
Wikipedia [view source](http://en.wikipedia.org/wiki/Atbash)
| {
"content_hash": "7a03c659dda17f47bb4c76d1ad4714aa",
"timestamp": "",
"source": "github",
"line_count": 37,
"max_line_length": 107,
"avg_line_length": 34.45945945945946,
"alnum_prop": 0.7819607843137255,
"repo_name": "kevinvanderlugt/Exercism-Solutions",
"id": "d712409a9445f0ee742f284e89aa0ad2ad1db65a",
"size": "1292",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "swift/atbash-cipher/README.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Swift",
"bytes": "225400"
}
],
"symlink_target": ""
} |
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using md.stdl.Interfaces;
using mp.pddn;
using VVVV.PluginInterfaces.V2;
namespace mp.dx.Nodes
{
[Startable]
public class VersionWriter : IStartable
{
public static string VersionPath { get; private set; }
public static string VvvvDir { get; private set; }
public void Start()
{
var ver = typeof(VersionWriter).Assembly.GetName().Version.ToString();
VvvvDir = Path.GetDirectoryName(System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName);
if (VvvvDir != null)
{
VersionPath = Path.Combine(VvvvDir, "packs", "mp.dx", "version.info");
File.WriteAllText(VersionPath, ver);
}
else
{
VersionPath = "null";
}
}
public void Shutdown() { Start(); }
}
[PluginInfo(
Name = "About",
Category = "mp.dx",
Author = "microdee"
)]
public class AboutNode : IPluginEvaluate, IPartImportsSatisfiedNotification
{
[Output("mp.dx Version")] public ISpread<string> FVer;
[Output("md.stdl Version")] public ISpread<string> FMdStdlVer;
[Output("mp.pddn Version")] public ISpread<string> FMpPddnVer;
[Output("Version File Path")] public ISpread<string> FVerPath;
[Output("VVVV Dir")] public ISpread<string> FVDir;
public void Evaluate(int SpreadMax) { }
public void OnImportsSatisfied()
{
FVer[0] = typeof(AboutNode).Assembly.GetName().Version.ToString();
FMdStdlVer[0] = typeof(IMainlooping).Assembly.GetName().Version.ToString();
FMpPddnVer[0] = typeof(SpreadWrapper).Assembly.GetName().Version.ToString();
FVDir[0] = VersionWriter.VvvvDir;
FVerPath[0] = VersionWriter.VersionPath;
}
}
}
| {
"content_hash": "e7931ce89a9afb4710414f7e548b6884",
"timestamp": "",
"source": "github",
"line_count": 64,
"max_line_length": 112,
"avg_line_length": 32.296875,
"alnum_prop": 0.6168359941944848,
"repo_name": "microdee/mp.dx",
"id": "91ba101172d38b6be54015d4601885d5967752d8",
"size": "2069",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "DX11Utils/About.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "10297"
},
{
"name": "C#",
"bytes": "144556"
},
{
"name": "C++",
"bytes": "73695"
},
{
"name": "HLSL",
"bytes": "128217"
}
],
"symlink_target": ""
} |
layout: post
title: Thoughts on the VNXe 3200
date: 2014-05-09 16:09
---
I had some thoughts after reading [Chad Sakac’s blog](http://virtualgeek.typepad.com/virtual_geek/2014/05/vnx-architectural-evolution-keeps-rolling-vnxe-3200-project-liberty.html) entry about the new VNXe 3200.
* The original VNXe (3100/3150/3300) was not my favorite product. It was fine as far as entry-level storage goes, but there were a good chunk of restrictions on the product, both technical and artificial, compared to it’s “big brother” VNX.
* I’m conversely more excited about getting into deployments of the VNXe 3200\. I’ll let you read Chad’s blog to get a more complete list of features but being able to do FAST Cache and FAST VP makes it a lot more of a compelling product.
* I get the impression from reading Chad’s post that VNXe is reaching the point where the platform will eventually gain the ability to be as feature complete as the VNX and being built on the same hardware platform eventually perform as well as the VNX.
* At some point, I would expect the “next-next-Generation VNX” to look more like a VNXe then the CLARiiON/Celerra mashup that exists today. No Windows code anywhere to be found, truely unified block and file setup.
* If all they did was get rid of Java in the full VNX Unisphere mangement interface, I’d be so happy.
* I suspect a lot of customers where a block-only VNX 5200/5300 made sense are going to be “moving down” to the VNXe.
Looking forward to getting my hands on one.
| {
"content_hash": "fe54861eb5288759196b009de10e2b64",
"timestamp": "",
"source": "github",
"line_count": 16,
"max_line_length": 255,
"avg_line_length": 94.5625,
"alnum_prop": 0.7739590218109715,
"repo_name": "vmstan/vmstan.github.io",
"id": "5b526f8ae025044432790f47067231fad9531bf1",
"size": "1543",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "_posts/2014-05-09-thoughts-on-the-vnxe-3200.md",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "13123"
},
{
"name": "HTML",
"bytes": "13641"
},
{
"name": "JavaScript",
"bytes": "13797"
}
],
"symlink_target": ""
} |
<?php
require_once dirname(dirname(__FILE__)).'/FilesystemHelper.php';
class Twig_Tests_Cache_FilesystemTest extends PHPUnit_Framework_TestCase
{
private $classname;
private $directory;
private $cache;
protected function setUp()
{
$nonce = hash('sha256', uniqid(mt_rand(), true));
$this->classname = '__Twig_Tests_Cache_FilesystemTest_Template_'.$nonce;
$this->directory = sys_get_temp_dir().'/twig-test';
$this->cache = new Twig_Cache_Filesystem($this->directory);
}
protected function tearDown()
{
if (file_exists($this->directory)) {
Twig_Tests_FilesystemHelper::removeDir($this->directory);
}
}
public function testLoad()
{
$key = $this->directory.'/cache/cachefile.php';
$dir = dirname($key);
@mkdir($dir, 0777, true);
$this->assertTrue(is_dir($dir));
$this->assertFalse(class_exists($this->classname, false));
$content = $this->generateSource();
file_put_contents($key, $content);
$this->cache->load($key);
$this->assertTrue(class_exists($this->classname, false));
}
public function testLoadMissing()
{
$key = $this->directory.'/cache/cachefile.php';
$this->assertFalse(class_exists($this->classname, false));
$this->cache->load($key);
$this->assertFalse(class_exists($this->classname, false));
}
public function testWrite()
{
$key = $this->directory.'/cache/cachefile.php';
$content = $this->generateSource();
$this->assertFileNotExists($key);
$this->assertFileNotExists($this->directory);
$this->cache->write($key, $content);
$this->assertFileExists($this->directory);
$this->assertFileExists($key);
$this->assertSame(file_get_contents($key), $content);
}
/**
* @expectedException RuntimeException
* @expectedExceptionMessage Unable to create the cache directory
*/
public function testWriteFailMkdir()
{
if (defined('PHP_WINDOWS_VERSION_BUILD')) {
$this->markTestSkipped('Read-only directories not possible on Windows.');
}
$key = $this->directory.'/cache/cachefile.php';
$content = $this->generateSource();
$this->assertFileNotExists($key);
// Create read-only root directory.
@mkdir($this->directory, 0555, true);
$this->assertTrue(is_dir($this->directory));
$this->cache->write($key, $content);
}
/**
* @expectedException RuntimeException
* @expectedExceptionMessage Unable to write in the cache directory
*/
public function testWriteFailDirWritable()
{
if (defined('PHP_WINDOWS_VERSION_BUILD')) {
$this->markTestSkipped('Read-only directories not possible on Windows.');
}
$key = $this->directory.'/cache/cachefile.php';
$content = $this->generateSource();
$this->assertFileNotExists($key);
// Create root directory.
@mkdir($this->directory, 0777, true);
// Create read-only subdirectory.
@mkdir($this->directory.'/cache', 0555);
$this->assertTrue(is_dir($this->directory.'/cache'));
$this->cache->write($key, $content);
}
/**
* @expectedException RuntimeException
* @expectedExceptionMessage Failed to write cache file
*/
public function testWriteFailWriteFile()
{
$key = $this->directory.'/cache/cachefile.php';
$content = $this->generateSource();
$this->assertFileNotExists($key);
// Create a directory in the place of the cache file.
@mkdir($key, 0777, true);
$this->assertTrue(is_dir($key));
$this->cache->write($key, $content);
}
public function testGetTimestamp()
{
$key = $this->directory.'/cache/cachefile.php';
$dir = dirname($key);
@mkdir($dir, 0777, true);
$this->assertTrue(is_dir($dir));
// Create the file with a specific modification time.
touch($key, 1234567890);
$this->assertSame(1234567890, $this->cache->getTimestamp($key));
}
public function testGetTimestampMissingFile()
{
$key = $this->directory.'/cache/cachefile.php';
$this->assertSame(0, $this->cache->getTimestamp($key));
}
/**
* Test file cache is tolerant towards trailing (back)slashes on the configured cache directory.
*
* @dataProvider provideDirectories
*/
public function testGenerateKey($expected, $input)
{
$cache = new Twig_Cache_Filesystem($input);
$this->assertRegExp($expected, $cache->generateKey('_test_', get_class($this)));
}
public function provideDirectories()
{
$pattern = '#a/b/[a-zA-Z0-9]+/[a-zA-Z0-9]+.php$#';
return array(
array($pattern, 'a/b'),
array($pattern, 'a/b/'),
array($pattern, 'a/b\\'),
array($pattern, 'a/b\\/'),
array($pattern, 'a/b\\//'),
array('#/'.substr($pattern, 1), '/a/b'),
);
}
private function generateSource()
{
return strtr('<?php class {{classname}} {}', array(
'{{classname}}' => $this->classname,
));
}
}
| {
"content_hash": "0af9008065ca464ce8c5c324b08dba86",
"timestamp": "",
"source": "github",
"line_count": 186,
"max_line_length": 100,
"avg_line_length": 29.596774193548388,
"alnum_prop": 0.5640326975476839,
"repo_name": "gustavokev/preescolar1",
"id": "94b7c64ea23854457e6b01963f9acbc05a22669a",
"size": "5705",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "vendor/twig/twig/test/Twig/Tests/Cache/FilesystemTest.php",
"mode": "33261",
"license": "mit",
"language": [
{
"name": "ApacheConf",
"bytes": "388"
},
{
"name": "CSS",
"bytes": "32330"
},
{
"name": "HTML",
"bytes": "8689942"
},
{
"name": "JavaScript",
"bytes": "70482"
},
{
"name": "PHP",
"bytes": "1931592"
}
],
"symlink_target": ""
} |
#include <shogun/lib/config.h>
#ifdef HAVE_EIGEN3
#include <shogun/lib/common.h>
#include <shogun/io/SGIO.h>
#include <shogun/preprocessor/DensePreprocessor.h>
#include <shogun/features/DenseFeatures.h>
#include <shogun/features/Features.h>
#include <shogun/labels/MulticlassLabels.h>
#include <shogun/mathematics/eigen3.h>
#include <shogun/preprocessor/FisherLDA.h>
#include <shogun/preprocessor/DimensionReductionPreprocessor.h>
#include <shogun/mathematics/eigen3.h>
#include <vector>
using namespace std;
using namespace Eigen;
using namespace shogun;
CFisherLDA::CFisherLDA (EFLDAMethod method, float64_t thresh):
CDimensionReductionPreprocessor()
{
initialize_parameters();
m_method=method;
m_threshold=thresh;
}
void CFisherLDA::initialize_parameters()
{
m_method=AUTO_FLDA;
m_threshold=0.01;
m_num_dim=0;
SG_ADD(&m_method, "FLDA_method","method for performing FLDA",
MS_NOT_AVAILABLE);
SG_ADD(&m_num_dim, "final_dimensions","dimensions to be retained",
MS_NOT_AVAILABLE);
SG_ADD(&m_transformation_matrix, "transformation_matrix","Transformation"
" matrix (Eigenvectors of covariance matrix).", MS_NOT_AVAILABLE);
SG_ADD(&m_mean_vector, "mean_vector", "Mean Vector.", MS_NOT_AVAILABLE);
SG_ADD(&m_eigenvalues_vector, "eigenvalues_vector",
"Vector with Eigenvalues.", MS_NOT_AVAILABLE);
}
CFisherLDA::~CFisherLDA()
{
}
bool CFisherLDA::fit(CFeatures *features, CLabels *labels, int32_t num_dimensions)
{
REQUIRE(features, "Features are not provided!\n")
REQUIRE(features->get_feature_class()==C_DENSE,
"LDA only works with dense features. you provided %s\n",
features->get_name());
REQUIRE(features->get_feature_type()==F_DREAL,
"LDA only works with real features.\n");
REQUIRE(labels, "Labels for the given features are not specified!\n")
REQUIRE(labels->get_label_type()==LT_MULTICLASS, "The labels should be of "
"the type MulticlassLabels! you provided %s\n", labels->get_name());
SGMatrix<float64_t> feature_matrix=((CDenseFeatures<float64_t>*)features)
->get_feature_matrix();
SGVector<float64_t> labels_vector=((CMulticlassLabels*)labels)->get_labels();
int32_t num_vectors=feature_matrix.num_cols;
int32_t num_features=feature_matrix.num_rows;
REQUIRE(labels_vector.vlen==num_vectors,"The number of samples provided (%d)"
" must be equal to the number of labels provided(%d)\n",num_vectors,
labels_vector.vlen);
// C holds the number of unique classes.
int32_t C=((CMulticlassLabels*)labels)->get_num_classes();
REQUIRE(C>1, "At least two classes are needed to perform LDA.\n")
int32_t i=0;
int32_t j=0;
m_num_dim=num_dimensions;
// max target dimension allowed.
// int32_t max_dim_allowed=C-1;
// clip number if Dimensions to be a valid number
if ((m_num_dim<=0) || (m_num_dim>(C-1)))
m_num_dim=(C-1);
MatrixXd fmatrix=Map<MatrixXd>(feature_matrix.matrix, num_features,
num_vectors);
Map<VectorXd> lvector(labels_vector.vector, num_vectors);
// holds the total mean
m_mean_vector=SGVector<float64_t>(num_features);
Map<VectorXd>mean_total (m_mean_vector.vector, num_features);
mean_total=VectorXd::Zero(num_features);
// holds the mean for each class
vector<VectorXd> mean_class(C);
// holds the frequency for each class.
// i.e the i'th element holds the number
// of times class i is observed.
VectorXd num_class=VectorXd::Zero(C);
// calculate the class means and the total means.
for (i=0; i<C; i++)
{
mean_class[i]=VectorXd::Zero(num_features);
for (j=0; j<num_vectors; j++)
{
if (i==lvector[j])
{
num_class[i]++;
mean_class[i]+=fmatrix.col(j);
}
}
mean_class[i]/=(float64_t)num_class[i];
mean_total+=mean_class[i];
}
mean_total/=(float64_t)C;
// Subtract the class means from the 'respective' data.
// e.g all data belonging to class 0 is subtracted by
// the mean of class 0 data.
for (i=0; i<C; i++)
for (j=0; j<num_vectors; j++)
if (i==lvector[j])
fmatrix.col(j)-=mean_class[i];
if ((m_method==CANVAR_FLDA) ||
(m_method==AUTO_FLDA && num_vectors<num_features))
{
// holds the fmatrix for each class
vector<MatrixXd> centered_class_i(C);
VectorXd temp=num_class;
MatrixXd Sw=MatrixXd::Zero(num_features, num_features);
for (i=0; i<C; i++)
{
centered_class_i[i]=MatrixXd::Zero(num_features, num_class[i]);
for (j=0; j<num_vectors; j++)
if (i==lvector[j])
centered_class_i[i].col(num_class[i]-(temp[i]--))
=fmatrix.col(j);
Sw+=(centered_class_i[i]*centered_class_i[i].transpose())
*num_class[i]/(float64_t)(num_class[i]-1);
}
// within class matrix for cannonical variates implementation
MatrixXd Sb(num_features, C);
for (i=0; i<C; i++)
Sb.col(i)=sqrt(num_class[i])*(mean_class[i]-mean_total);
MatrixXd fmatrix1=Map<MatrixXd>(feature_matrix.matrix, num_features,
num_vectors);
JacobiSVD<MatrixXd> svd(fmatrix1, ComputeThinU | ComputeThinV);
// basis to represent the solution
MatrixXd Q;
if(num_features>num_vectors)
{
j=0;
for (i=0;i<num_vectors;i++)
if (svd.singularValues()(i)>m_threshold)
j++;
else
break;
Q=svd.matrixU().leftCols(j);
}
else
Q=svd.matrixU();
// Sb is the modified between scatter
Sb=(Q.transpose())*Sb*(Sb.transpose())*Q;
// Sw is the modified within scatter
Sw=Q.transpose()*Sw*Q;
// to find SVD((inverse(Chol(Sw)))' * Sb * (inverse(Chol(Sw))))
//1.get Cw=Chol(Sw)
//find the decomposition of Cw'
HouseholderQR<MatrixXd> decomposition(Sw.llt().matrixU().transpose());
//2.get P=inv(Cw')*Sb
//MatrixXd P=decomposition.solve(Sb);
//3. final value to be put in SVD will be therefore:
// final_ output = (inv(Cw')*(P'))';
//MatrixXd X_final_chol=(decomposition.solve(P.transpose())).transpose();
JacobiSVD<MatrixXd> svd2(decomposition.solve
(decomposition.solve(Sb).transpose()).transpose(),ComputeThinU);
m_transformation_matrix=SGMatrix<float64_t> (num_features, m_num_dim);
Map<MatrixXd> eigenVectors(m_transformation_matrix.matrix, num_features,
m_num_dim);
eigenVectors=Q*(svd2.matrixU()).leftCols(m_num_dim);
m_eigenvalues_vector=SGVector<float64_t>(m_num_dim);
Map<VectorXd> eigenValues (m_eigenvalues_vector.vector, m_num_dim);
eigenValues=svd2.singularValues().topRows(m_num_dim);
}
else
{
// For holding the within class scatter.
MatrixXd Sw=fmatrix*fmatrix.transpose();
// For holding the between class scatter.
MatrixXd Sb(num_features, C);
for (i=0; i<C; i++)
Sb.col(i)=mean_class[i];
Sb=Sb-mean_total.rowwise().replicate(C);
Sb=Sb*Sb.transpose();
// calculate the Ax=b problem
// where A=Sw
// b=Sb
// x=M
// MatrixXd M=Sw.householderQr().solve(Sb);
// calculate the eigenvalues and eigenvectors of M.
EigenSolver<MatrixXd> es(Sw.householderQr().solve(Sb));
MatrixXd all_eigenvectors=es.eigenvectors().real();
VectorXd all_eigenvalues=es.eigenvalues().real();
std::vector<pair<float64_t, int32_t> > data(num_features);
for (i=0; i<num_features; i++)
{
data[i].first=all_eigenvalues[i];
data[i].second=i;
}
// sort the eigenvalues.
std::sort (data.begin(), data.end());
// keep 'm_num_dim' numbers of top Eigenvalues
m_eigenvalues_vector=SGVector<float64_t> (m_num_dim);
Map<VectorXd> eigenValues(m_eigenvalues_vector.vector, m_num_dim);
// keep 'm_num_dim' numbers of EigenVectors
// corresponding to their respective eigenvalues
m_transformation_matrix=SGMatrix<float64_t> (num_features, m_num_dim);
Map<MatrixXd> eigenVectors(m_transformation_matrix.matrix, num_features,
m_num_dim);
for (i=0; i<m_num_dim; i++)
{
eigenValues[i]=data[num_features-i-1].first;
eigenVectors.col(i)=all_eigenvectors.col(data[num_features-i-1].second);
}
}
return true;
}
void CFisherLDA::cleanup()
{
m_transformation_matrix=SGMatrix<float64_t>();
m_mean_vector=SGVector<float64_t>();
m_eigenvalues_vector=SGVector<float64_t>();
}
SGMatrix<float64_t> CFisherLDA::apply_to_feature_matrix(CFeatures*features)
{
REQUIRE(features->get_feature_class()==C_DENSE,
"LDA only works with dense features\n");
REQUIRE(features->get_feature_type()==F_DREAL,
"LDA only works with real features\n");
SGMatrix<float64_t> m=((CDenseFeatures<float64_t>*)
features)->get_feature_matrix();
int32_t num_vectors=m.num_cols;
int32_t num_features=m.num_rows;
SG_INFO("Transforming feature matrix\n")
Map<MatrixXd> transform_matrix(m_transformation_matrix.matrix,
m_transformation_matrix.num_rows, m_transformation_matrix.num_cols);
SG_INFO("get Feature matrix: %ix%i\n", num_vectors, num_features)
Map<MatrixXd> feature_matrix (m.matrix, num_features, num_vectors);
feature_matrix.block (0, 0, m_num_dim, num_vectors)=
transform_matrix.transpose()*feature_matrix;
SG_INFO("Form matrix of target dimension")
for (int32_t col=0; col<num_vectors; col++)
{
for (int32_t row=0; row<m_num_dim; row++)
m[col*m_num_dim+row]=feature_matrix(row, col);
}
m.num_rows=m_num_dim;
m.num_cols=num_vectors;
((CDenseFeatures<float64_t>*)features)->set_feature_matrix(m);
return m;
}
SGVector<float64_t> CFisherLDA::apply_to_feature_vector(SGVector<float64_t> vector)
{
SGVector<float64_t> result = SGVector<float64_t>(m_num_dim);
Map<VectorXd> resultVec(result.vector, m_num_dim);
Map<VectorXd> inputVec(vector.vector, vector.vlen);
Map<VectorXd> mean(m_mean_vector.vector, m_mean_vector.vlen);
Map<MatrixXd> transformMat(m_transformation_matrix.matrix,
m_transformation_matrix.num_rows, m_transformation_matrix.num_cols);
resultVec=transformMat.transpose()*inputVec;
return result;
}
SGMatrix<float64_t> CFisherLDA::get_transformation_matrix()
{
return m_transformation_matrix;
}
SGVector<float64_t> CFisherLDA::get_eigenvalues()
{
return m_eigenvalues_vector;
}
SGVector<float64_t> CFisherLDA::get_mean()
{
return m_mean_vector;
}
#endif//HAVE_EIGEN3
| {
"content_hash": "6fe5d292e3ccb339847730186860b472",
"timestamp": "",
"source": "github",
"line_count": 328,
"max_line_length": 83,
"avg_line_length": 30.0640243902439,
"alnum_prop": 0.6980022310110536,
"repo_name": "Saurabh7/shogun",
"id": "ce431b8dd9e5d1d1f5da138b50944e1b9e0dad1c",
"size": "11477",
"binary": false,
"copies": "8",
"ref": "refs/heads/master",
"path": "src/shogun/preprocessor/FisherLDA.cpp",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "104870"
},
{
"name": "C++",
"bytes": "11435353"
},
{
"name": "CMake",
"bytes": "213091"
},
{
"name": "Lua",
"bytes": "1204"
},
{
"name": "M",
"bytes": "10020"
},
{
"name": "Makefile",
"bytes": "452"
},
{
"name": "Matlab",
"bytes": "66047"
},
{
"name": "Perl",
"bytes": "31939"
},
{
"name": "Perl6",
"bytes": "15714"
},
{
"name": "Protocol Buffer",
"bytes": "1476"
},
{
"name": "Python",
"bytes": "431160"
},
{
"name": "R",
"bytes": "53362"
},
{
"name": "Ruby",
"bytes": "59"
},
{
"name": "Shell",
"bytes": "17074"
}
],
"symlink_target": ""
} |
/**
*
*/
package se.lbroman.msrp.impl.data;
import java.util.LinkedList;
/**
* Yet another extremely simple byte array data structure. It appends data in
* constant time, but returns data in linear time, amortized constant time.
* Useful for building arrays and extracting them.
*
*
* @author Leonard Broman
*
*/
public class ByteArrayBuilder {
private LinkedList<byte[]> chunks = new LinkedList<byte[]>();;
private int length = 0;
public void append(byte[] a) {
chunks.add(a);
length += a.length;
}
/**
* Adds a subrange of an array to the builder.
*
* @param a
* the array
* @param start
* first byte to copy
* @param end
* last byte to copy
*/
public void append(byte[] a, int start, int end) {
int size = (end-start+1);
byte[] b = new byte[size];
for (int i = start; i <= end; i++) {
b[i - start] = a[i];
}
chunks.add(b);
length += end - start + 1;
}
public byte[] getBytes() {
byte[] b = new byte[length];
int pos = 0;
for (byte[] c : chunks) {
for (int i = 0; i < c.length; i++) {
b[pos] = c[i];
pos++;
}
}
chunks.clear();
chunks.add(b);
return b;
}
}
| {
"content_hash": "6f3a0bbf550099ecd05012ae11bd8d84",
"timestamp": "",
"source": "github",
"line_count": 61,
"max_line_length": 77,
"avg_line_length": 20.459016393442624,
"alnum_prop": 0.5512820512820513,
"repo_name": "lbroman/MSRP-API",
"id": "ca1dc5e91965239cf238dea019e5a5b98fa00263",
"size": "1248",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "stack/src/main/java/se/lbroman/msrp/impl/data/ByteArrayBuilder.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "198795"
}
],
"symlink_target": ""
} |
ACCEPTED
#### According to
International Plant Names Index
#### Published in
null
#### Original name
null
### Remarks
null | {
"content_hash": "0afa53d593288530c04db6f3db3e4d80",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 31,
"avg_line_length": 9.692307692307692,
"alnum_prop": 0.7063492063492064,
"repo_name": "mdoering/backbone",
"id": "f8907e8ec8a5cdb566779d8712a0d291c9296318",
"size": "176",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "life/Plantae/Pteridophyta/Polypodiopsida/Polypodiales/Pteridaceae/Oeosporangium/Oeosporangium persica/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
package coyote.dataframe;
import coyote.commons.ByteUtil;
/** signed, 16-bit value in the range of -32,768 to 32,767 */
public class S16Type implements FieldType {
private static final int _size = 2;
private final static String _name = "S16";
public boolean checkType( Object obj ) {
return ( obj instanceof java.lang.Short );
}
public Object decode( byte[] value ) {
return new Short( ByteUtil.retrieveShort( value, 0 ) );
}
public byte[] encode( Object obj ) {
return ByteUtil.renderShort( ( (Short)obj ).shortValue() );
}
public String getTypeName() {
return _name;
}
public boolean isNumeric() {
return true;
}
public int getSize() {
return _size;
}
/**
* @see coyote.dataframe.FieldType#stringValue(byte[])
*/
@Override
public String stringValue( byte[] val ) {
if ( val == null ) {
return "";
} else {
Object obj = decode( val );
if ( obj != null )
return obj.toString();
else
return "";
}
}
/**
* @see coyote.dataframe.FieldType#parse(java.lang.String)
*/
@Override
public Object parse( String text ) {
Short retval = null;
try {
retval = Short.parseShort( text );
} catch ( NumberFormatException ignore ) {}
return retval;
}
}
| {
"content_hash": "7f6c38e5b59a10d9606ecd3a027ab094",
"timestamp": "",
"source": "github",
"line_count": 88,
"max_line_length": 63,
"avg_line_length": 15.068181818181818,
"alnum_prop": 0.5987933634992458,
"repo_name": "sdcote/dataframe",
"id": "91e3c91712ff6fb5f7d8e9dc2ec826ec2d30fa76",
"size": "1605",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/main/java/coyote/dataframe/S16Type.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "279909"
},
{
"name": "Java",
"bytes": "446054"
}
],
"symlink_target": ""
} |
{% extends:'mako-error::error' %}
{% block:'title' %}Service Unavailable{% endblock %}
{% block:'message' %}
<h1>503</h1>
<p>The service is currently unavailable.</p>
{% endblock %}
| {
"content_hash": "cbe6678c85399e27ae41b594c9db496d",
"timestamp": "",
"source": "github",
"line_count": 8,
"max_line_length": 52,
"avg_line_length": 23.25,
"alnum_prop": 0.6344086021505376,
"repo_name": "mako-framework/framework",
"id": "ad28de707f668f5049228a3fcbd8570873e4506d",
"size": "186",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/mako/error/handlers/web/views/503.tpl.php",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "Hack",
"bytes": "15270"
},
{
"name": "PHP",
"bytes": "1936047"
}
],
"symlink_target": ""
} |
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2014 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
<color name="default_color_light">#ff4092c3</color>
<color name="default_color_dark">#ff241c99</color>
</resources>
| {
"content_hash": "7c723d07917dcc786dc49b8c8b6f525d",
"timestamp": "",
"source": "github",
"line_count": 20,
"max_line_length": 74,
"avg_line_length": 39.15,
"alnum_prop": 0.735632183908046,
"repo_name": "googlearchive/android-MessagingService",
"id": "0e6825b0e8e45606fcc1a3eecaa9a4147073193f",
"size": "783",
"binary": false,
"copies": "13",
"ref": "refs/heads/master",
"path": "Application/src/main/res/values/colors.xml",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "25849"
}
],
"symlink_target": ""
} |
namespace display {
class Display;
class DisplayObserver;
// DisplayChangeNotifier is a class implementing the handling of DisplayObserver
// notification for Screen.
class DISPLAY_EXPORT DisplayChangeNotifier {
public:
DisplayChangeNotifier();
~DisplayChangeNotifier();
void AddObserver(DisplayObserver* observer);
void RemoveObserver(DisplayObserver* observer);
void NotifyDisplaysChanged(const std::vector<Display>& old_displays,
const std::vector<Display>& new_displays);
void NotifyCurrentWorkspaceChanged(const std::string& workspace);
private:
// The observers that need to be notified when a display is modified, added
// or removed.
base::ObserverList<DisplayObserver> observer_list_;
DISALLOW_COPY_AND_ASSIGN(DisplayChangeNotifier);
};
} // namespace display
#endif // UI_DISPLAY_DISPLAY_CHANGE_NOTIFIER_H_
| {
"content_hash": "813419fc336f843cf4227ed94512d93c",
"timestamp": "",
"source": "github",
"line_count": 31,
"max_line_length": 80,
"avg_line_length": 28.35483870967742,
"alnum_prop": 0.7519908987485779,
"repo_name": "endlessm/chromium-browser",
"id": "f201d86dd2b6602d351945529f9ed831b179debc",
"size": "1254",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "ui/display/display_change_notifier.h",
"mode": "33188",
"license": "bsd-3-clause",
"language": [],
"symlink_target": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.