text
stringlengths 2
1.04M
| meta
dict |
---|---|
import React from "react";
import {getSettings} from "../api";
import {buildAuthenticator} from "../authentication";
import ClipboardJS from "clipboard";
new ClipboardJS('#copy-your-user-id');
const JoinPage = () => {
const settings = getSettings();
// TODO: deduplicate with registration page
if (!settings.user) {
const {
domain,
clientId
} = settings.auth0;
const auth = buildAuthenticator(domain, clientId);
auth.login();
return <p>Please wait, you will be redirected...</p>;
}
const userId = settings.user.id;
return <>
<h1>Join an Existing Congregation</h1>
<p>To access a congregation in Territory Bro, you will need to tell your <em>User ID</em> to the brother who is
taking care of the territories in your congregation, so that he can give you access.</p>
<p>Your User ID is:</p>
<p id="your-user-id" style={{fontSize: '150%', margin: '15px'}}>{userId}</p>
<p>
<button id="copy-your-user-id" type="button" className="pure-button" data-clipboard-target="#your-user-id">
Copy to clipboard
</button>
</p>
</>;
};
export default JoinPage;
| {
"content_hash": "0b507bf31ed62797616f28034a05f856",
"timestamp": "",
"source": "github",
"line_count": 40,
"max_line_length": 115,
"avg_line_length": 28.7,
"alnum_prop": 0.6506968641114983,
"repo_name": "orfjackal/territory-bro",
"id": "b7c0d783ad3f5b92156e6466186a2cd5e9fa4065",
"size": "1317",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "web/js/pages/JoinPage.tsx",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "6114"
},
{
"name": "Clojure",
"bytes": "23871"
},
{
"name": "HTML",
"bytes": "784"
},
{
"name": "JavaScript",
"bytes": "62263"
},
{
"name": "PLSQL",
"bytes": "194"
},
{
"name": "Shell",
"bytes": "2261"
}
],
"symlink_target": ""
} |
TARGET=public/vendor
DATA=public/data
SPEC=public/spec
SCHEMA=schema
# Copy dependencies by default. Link if a -l flag is specified.
CWD=$(pwd)
VEGA_OP="cp -R"
VEGA_DATASETS_OP="cp -R"
SCHEMA_OP="cp"
VEGA_EMBED_OP="cp -R"
VEGA_LITE_OP="cp -R"
while getopts :l: FLAG; do
case $FLAG in
l)
echo "Linking '$OPTARG'."
npm link $OPTARG
OPTARG=$( echo ${OPTARG}_OP | tr '-' '_' | tr '[:lower:]' '[:upper:]' )
eval $OPTARG="\"ln -sf\""
echo
esac
done
# delete old vendor, data, and spec directories to start with a clean slate.
# rm -rf $TARGET
# rm -rf $DATA
# rm -rf $SPEC
echo "Copying dependencies to '$TARGET'."
if [ ! -d "$TARGET" ]; then
mkdir $TARGET
fi
cp lib/json3-compactstringify.js $TARGET
echo "Copying data to '$DATA'."
if [ ! -d "$DATA" ]; then
mkdir $DATA
fi
eval $VEGA_DATASETS_OP "$CWD/data/*" $DATA
eval $VEGA_DATASETS_OP "$CWD/node_modules/vega-datasets/data/*" $DATA
echo "Copy examples to '$SPEC'."
if [ ! -d "$SPEC" ]; then
mkdir $SPEC
fi
eval $SCHEMA_OP "$CWD/node_modules/vega/docs/vega-schema.json" "$SCHEMA/vega.schema.json"
eval $SCHEMA_OP "$CWD/node_modules/vega-lite/build/vega-lite-schema.json" "$SCHEMA/vl.schema.json"
eval $VEGA_OP "$CWD/node_modules/vega/docs/examples/*.vg.json" "$SPEC/vega"
eval $VEGA_LITE_OP "$CWD/node_modules/vega-lite/examples/specs/*.vl.json" "$SPEC/vega-lite/"
cp "$CWD/node_modules/vega-lite/_data/examples.json" "$SPEC/vega-lite/index.json"
cp "$CWD/node_modules/vega/docs/_data/examples.json" "$SPEC/vega/index.json"
| {
"content_hash": "be8ee05dd4447acdc3f9f6d1792cf425",
"timestamp": "",
"source": "github",
"line_count": 60,
"max_line_length": 98,
"avg_line_length": 25.5,
"alnum_prop": 0.6660130718954248,
"repo_name": "jlove29/vega-editor",
"id": "052f496b585c6529d15acdb6a93720becc408228",
"size": "1543",
"binary": false,
"copies": "1",
"ref": "refs/heads/redux",
"path": "scripts/vendor.sh",
"mode": "33261",
"license": "bsd-3-clause",
"language": [
{
"name": "CSS",
"bytes": "8502"
},
{
"name": "HTML",
"bytes": "483"
},
{
"name": "JavaScript",
"bytes": "139600"
},
{
"name": "Shell",
"bytes": "3405"
}
],
"symlink_target": ""
} |
var ConnectionView = Backbone.View.extend({
events: {
"click .btn_close" : "close",
"click .btn_connect" : "connect",
"change input": "on_form_change",
"keyup #password": "check_enter",
"click #btn_anonymous":"connect_anonymously",
"click #roster_toggle" : "toggleRoster",
"click .presence_status" : "setPresence",
"click #logout" : "logout"
},
template: function(){
var template = JST['prattle/templates/connection_modal']();
return template;
},
///Refactor
setPresence: function(evt){
var presence_status = $(evt.currentTarget).data('status');
var icon = $(evt.currentTarget).data('icon');
var text = $(evt.currentTarget).text();
var self = this;
this.model.sendPresence(presence_status);
Prattle.session.set("presence_status",presence_status);
$(this.el).find('#set_status').html('<i class="' +icon +'"></i>');
// GESX
},
logout:function(){
if(confirm("Really disconnect?")){
Prattle.clear();
$(this.el).remove();
this.model.disconnect();
}
},
///Refactor
ping_status: function(){
var self = this;
Prattle.flash("Checking status...");
this.model.send_ping();
},
toggle_debug: function(){Prattle.DEBUG = !(Prattle.DEBUG);},
show_info: function(){
try{
Prattle.showExceptions(5);
}catch(exc){
Prattle.logException(exc,"Roster View exception showing info?!?");
}
},
initialize: function(){
this.el.id = "chat_modal";
},
check_enter: function(obj){
if(parseInt(obj.which) === 13){
this.model.set("disconnected_count","0");
this.connect();
}
},
on_form_change: function(obj){
//this will automatically create model changes based on form changes
//this.model.set($(obj.currentTarget).attr("id"),$(obj.currentTarget).val());
},
renderStatusModal: function(){
$('#presence-modal-status').modal({show:true,backdrop:false});
},
attachHandlers:function(){
//TODO:Refactor this to be in correct sequence
var auto_reconnect = this.model.get("auto_reconnect");
if(auto_reconnect != true){
var status = Prattle.session.get("presence_status");
if(status != null){
if(status == "available"){
this.set_available();
Prattle.notice("Status "+ status);
}
else if(status == "unavailable"){
this.set_away();
Prattle.notice("Status " + status);
}
}else{
throw 'Status Modal exception';
}
}
},
render: function(){
var connectionInfo = {
'chatServices':[
{name:"Cervicio", value:"xsell-it.com"},
{name:"Gmail", value:"gmail.com"},
{name:"Facebook", value:"chat.facebook.com"},
{name:"Prattle", value:"demo.prattle.com"},
{name:"XSELL", value:"xselltechnologies.com"}
]
};
var html = JST['prattle/templates/connection_modal']();
var template = Handlebars.compile(html);
var output = template(connectionInfo);
$("#prattle").append($(this.el).html(output));
//this.$el.find("#jabber_domain").val(this.model.get("domain"));
$("#chat_modal").fadeIn('350');
return this;
},
renderToolbar:function(){
var template = Handlebars.compile(JST['prattle/templates/connection_bar']());
var html = template(this.model.toJSON());
$(this.el).html(html);
$(this.el).prependTo("#prattle").show();
return this;
},
toggleRoster: function(){
this.trigger('toggle_roster');
},
connect_anonymously: function(){
//http://stackoverflow.com/questions/5114259/anonymous-login-in-openfire-with-strophe
this.model.startAnonymousChat();
this.$el.fadeOut();
},
close: function(){
$(this.el).fadeOut();
this.trigger("close");
},
connect: function(){
var rememberMe = this.$el.find("#rememberme").is(":checked");
var auto = this.$el.find("#autologin").is(":checked");
var username = this.$el.find("#username").val();
var password = this.$el.find("#password").val();
var domain = this.$el.find("#jabber_domain").val();
this.model.set("username",username + "@" + domain);
this.model.set("password",password);
if(rememberMe){
Prattle.session.set("username",username);
Prattle.session.set("domain",domain);
Prattle.session.set("password",password);
Prattle.session.set("auto",auto);
}
this.renderToolbar();
this.model.startAuthenticatedChat();
}
}); | {
"content_hash": "da7ceabe4f0a07dcfe825430bc5e1e32",
"timestamp": "",
"source": "github",
"line_count": 143,
"max_line_length": 93,
"avg_line_length": 35.16083916083916,
"alnum_prop": 0.5415672235481305,
"repo_name": "XSell/prattle",
"id": "605c167ae9e179ac8f5b1c947bb33c1e0f9d832f",
"size": "5028",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "app/assets/javascripts/prattle/views/connection_view.js",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "26826"
},
{
"name": "JavaScript",
"bytes": "338574"
},
{
"name": "Ruby",
"bytes": "28429"
}
],
"symlink_target": ""
} |
'use strict';
var http = require('http');
var https = require('https');
/**
* List of Buses
*/
exports.busservices = function(req, res) {
var options = {
//http://mk.ods-live.co.uk/api/1/bus/locations.json?service='+id
host: 'mk.ods-live.co.uk',
path: '/api/1/bus/services.json'
};
//res.jsonp(services);
var httpReq = http.get(options, function(response) {
//console.log('STATUS: ' + response.statusCode);
//console.log('HEADERS: ' + JSON.stringify(response.headers));
// Buffer the body entirely for processing as a whole.
var bodyChunks = [];
response.on('data', function(chunk) {
// You can process streamed parts here...
bodyChunks.push(chunk);
}).on('end', function() {
//console.log(Buffer.concat(bodyChunks));
var body = JSON.parse(Buffer.concat(bodyChunks));
//console.log('BODY: ' + body.toString());
// ...and/or process the entire body here.
res.jsonp(body);
});
});
httpReq.on('error', function(e) {
console.log('ERROR: ' + e.message);
});
};
exports.busservice = function(req, res) {
var options = {
//http://mk.ods-live.co.uk/api/1/bus/locations.json?service='+id
host: 'mk.ods-live.co.uk',
path: '/api/1/bus/locations.json?service='+req.params.busId
};
//res.jsonp(line5);
var httpReq = http.get(options, function(response) {
//console.log('STATUS: ' + response.statusCode);
//console.log('HEADERS: ' + JSON.stringify(response.headers));
// Buffer the body entirely for processing as a whole.
var bodyChunks = [];
response.on('data', function(chunk) {
// You can process streamed parts here...
bodyChunks.push(chunk);
}).on('end', function() {
var body = JSON.parse(Buffer.concat(bodyChunks));
console.log(body);
// ...and/or process the entire body here.
res.jsonp(body);
});
});
httpReq.on('error', function(e) {
console.log('ERROR: ' + e.message);
});
};
| {
"content_hash": "be6f1e21c89b90b52121fdb9d7bb5417",
"timestamp": "",
"source": "github",
"line_count": 81,
"max_line_length": 66,
"avg_line_length": 23.395061728395063,
"alnum_prop": 0.6395778364116095,
"repo_name": "ekretschmann/bi",
"id": "33e25a3610f1a7af65a220f301e22ad2c5a3290d",
"size": "1895",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "app/controllers/buses.server.controller.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "22276"
},
{
"name": "HTML",
"bytes": "44274"
},
{
"name": "JavaScript",
"bytes": "221716"
},
{
"name": "Shell",
"bytes": "414"
}
],
"symlink_target": ""
} |
from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union, cast
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import AsyncHttpResponse
from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod
from azure.core.rest import HttpRequest
from azure.core.tracing.decorator import distributed_trace
from azure.core.tracing.decorator_async import distributed_trace_async
from azure.core.utils import case_insensitive_dict
from azure.mgmt.core.exceptions import ARMErrorFormat
from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling
from ... import models as _models
from ..._vendor import _convert_request
from ...operations._private_endpoint_connections_operations import build_create_or_update_request, build_delete_request_initial, build_get_request, build_list_request
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
class PrivateEndpointConnectionsOperations:
"""
.. warning::
**DO NOT** instantiate this class directly.
Instead, you should access the following operations through
:class:`~azure.mgmt.servicebus.v2021_01_01_preview.aio.ServiceBusManagementClient`'s
:attr:`private_endpoint_connections` attribute.
"""
models = _models
def __init__(self, *args, **kwargs) -> None:
input_args = list(args)
self._client = input_args.pop(0) if input_args else kwargs.pop("client")
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
@distributed_trace
def list(
self,
resource_group_name: str,
namespace_name: str,
**kwargs: Any
) -> AsyncIterable[_models.PrivateEndpointConnectionListResult]:
"""Gets the available PrivateEndpointConnections within a namespace.
:param resource_group_name: Name of the Resource group within the Azure subscription.
:type resource_group_name: str
:param namespace_name: The namespace name.
:type namespace_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either PrivateEndpointConnectionListResult or the result
of cls(response)
:rtype:
~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.servicebus.v2021_01_01_preview.models.PrivateEndpointConnectionListResult]
:raises: ~azure.core.exceptions.HttpResponseError
"""
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version = kwargs.pop('api_version', _params.pop('api-version', "2021-01-01-preview")) # type: str
cls = kwargs.pop('cls', None) # type: ClsType[_models.PrivateEndpointConnectionListResult]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}) or {})
def prepare_request(next_link=None):
if not next_link:
request = build_list_request(
resource_group_name=resource_group_name,
namespace_name=namespace_name,
subscription_id=self._config.subscription_id,
api_version=api_version,
template_url=self.list.metadata['url'],
headers=_headers,
params=_params,
)
request = _convert_request(request)
request.url = self._client.format_url(request.url) # type: ignore
else:
request = build_list_request(
resource_group_name=resource_group_name,
namespace_name=namespace_name,
subscription_id=self._config.subscription_id,
api_version=api_version,
template_url=next_link,
headers=_headers,
params=_params,
)
request = _convert_request(request)
request.url = self._client.format_url(request.url) # type: ignore
request.method = "GET"
return request
async def extract_data(pipeline_response):
deserialized = self._deserialize("PrivateEndpointConnectionListResult", pipeline_response)
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem)
return deserialized.next_link or None, AsyncList(list_of_elem)
async def get_next(next_link=None):
request = prepare_request(next_link)
pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access
request,
stream=False,
**kwargs
)
response = pipeline_response.http_response
if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
return pipeline_response
return AsyncItemPaged(
get_next, extract_data
)
list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/privateEndpointConnections"} # type: ignore
@distributed_trace_async
async def create_or_update(
self,
resource_group_name: str,
namespace_name: str,
private_endpoint_connection_name: str,
parameters: _models.PrivateEndpointConnection,
**kwargs: Any
) -> _models.PrivateEndpointConnection:
"""Creates or updates PrivateEndpointConnections of service namespace.
:param resource_group_name: Name of the Resource group within the Azure subscription.
:type resource_group_name: str
:param namespace_name: The namespace name.
:type namespace_name: str
:param private_endpoint_connection_name: The PrivateEndpointConnection name.
:type private_endpoint_connection_name: str
:param parameters: Parameters supplied to update Status of PrivateEndPoint Connection to
namespace resource.
:type parameters: ~azure.mgmt.servicebus.v2021_01_01_preview.models.PrivateEndpointConnection
:keyword callable cls: A custom type or function that will be passed the direct response
:return: PrivateEndpointConnection, or the result of cls(response)
:rtype: ~azure.mgmt.servicebus.v2021_01_01_preview.models.PrivateEndpointConnection
:raises: ~azure.core.exceptions.HttpResponseError
"""
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}) or {})
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version = kwargs.pop('api_version', _params.pop('api-version', "2021-01-01-preview")) # type: str
content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str]
cls = kwargs.pop('cls', None) # type: ClsType[_models.PrivateEndpointConnection]
_json = self._serialize.body(parameters, 'PrivateEndpointConnection')
request = build_create_or_update_request(
subscription_id=self._config.subscription_id,
resource_group_name=resource_group_name,
namespace_name=namespace_name,
private_endpoint_connection_name=private_endpoint_connection_name,
api_version=api_version,
content_type=content_type,
json=_json,
template_url=self.create_or_update.metadata['url'],
headers=_headers,
params=_params,
)
request = _convert_request(request)
request.url = self._client.format_url(request.url) # type: ignore
pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access
request,
stream=False,
**kwargs
)
response = pipeline_response.http_response
if response.status_code not in [200, 201]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
if response.status_code == 200:
deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response)
if response.status_code == 201:
deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response)
if cls:
return cls(pipeline_response, deserialized, {})
return deserialized
create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore
async def _delete_initial( # pylint: disable=inconsistent-return-statements
self,
resource_group_name: str,
namespace_name: str,
private_endpoint_connection_name: str,
**kwargs: Any
) -> None:
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}) or {})
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version = kwargs.pop('api_version', _params.pop('api-version', "2021-01-01-preview")) # type: str
cls = kwargs.pop('cls', None) # type: ClsType[None]
request = build_delete_request_initial(
resource_group_name=resource_group_name,
namespace_name=namespace_name,
subscription_id=self._config.subscription_id,
private_endpoint_connection_name=private_endpoint_connection_name,
api_version=api_version,
template_url=self._delete_initial.metadata['url'],
headers=_headers,
params=_params,
)
request = _convert_request(request)
request.url = self._client.format_url(request.url) # type: ignore
pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access
request,
stream=False,
**kwargs
)
response = pipeline_response.http_response
if response.status_code not in [200, 202, 204]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
if cls:
return cls(pipeline_response, None, {})
_delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore
@distributed_trace_async
async def begin_delete( # pylint: disable=inconsistent-return-statements
self,
resource_group_name: str,
namespace_name: str,
private_endpoint_connection_name: str,
**kwargs: Any
) -> AsyncLROPoller[None]:
"""Deletes an existing Private Endpoint Connection.
:param resource_group_name: Name of the Resource group within the Azure subscription.
:type resource_group_name: str
:param namespace_name: The namespace name.
:type namespace_name: str
:param private_endpoint_connection_name: The PrivateEndpointConnection name.
:type private_endpoint_connection_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for
this operation to not poll, or pass in your own initialized polling object for a personal
polling strategy.
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)
:rtype: ~azure.core.polling.AsyncLROPoller[None]
:raises: ~azure.core.exceptions.HttpResponseError
"""
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version = kwargs.pop('api_version', _params.pop('api-version', "2021-01-01-preview")) # type: str
cls = kwargs.pop('cls', None) # type: ClsType[None]
polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
lro_delay = kwargs.pop(
'polling_interval',
self._config.polling_interval
)
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
if cont_token is None:
raw_result = await self._delete_initial( # type: ignore
resource_group_name=resource_group_name,
namespace_name=namespace_name,
private_endpoint_connection_name=private_endpoint_connection_name,
api_version=api_version,
cls=lambda x,y,z: x,
headers=_headers,
params=_params,
**kwargs
)
kwargs.pop('error_map', None)
def get_long_running_output(pipeline_response):
if cls:
return cls(pipeline_response, None, {})
if polling is True:
polling_method = cast(AsyncPollingMethod, AsyncARMPolling(
lro_delay,
**kwargs
)) # type: AsyncPollingMethod
elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
else: polling_method = polling
if cont_token:
return AsyncLROPoller.from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output
)
return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method)
begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore
@distributed_trace_async
async def get(
self,
resource_group_name: str,
namespace_name: str,
private_endpoint_connection_name: str,
**kwargs: Any
) -> _models.PrivateEndpointConnection:
"""Gets a description for the specified Private Endpoint Connection.
:param resource_group_name: Name of the Resource group within the Azure subscription.
:type resource_group_name: str
:param namespace_name: The namespace name.
:type namespace_name: str
:param private_endpoint_connection_name: The PrivateEndpointConnection name.
:type private_endpoint_connection_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: PrivateEndpointConnection, or the result of cls(response)
:rtype: ~azure.mgmt.servicebus.v2021_01_01_preview.models.PrivateEndpointConnection
:raises: ~azure.core.exceptions.HttpResponseError
"""
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}) or {})
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version = kwargs.pop('api_version', _params.pop('api-version', "2021-01-01-preview")) # type: str
cls = kwargs.pop('cls', None) # type: ClsType[_models.PrivateEndpointConnection]
request = build_get_request(
resource_group_name=resource_group_name,
namespace_name=namespace_name,
private_endpoint_connection_name=private_endpoint_connection_name,
subscription_id=self._config.subscription_id,
api_version=api_version,
template_url=self.get.metadata['url'],
headers=_headers,
params=_params,
)
request = _convert_request(request)
request.url = self._client.format_url(request.url) # type: ignore
pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access
request,
stream=False,
**kwargs
)
response = pipeline_response.http_response
if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response)
if cls:
return cls(pipeline_response, deserialized, {})
return deserialized
get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore
| {
"content_hash": "02e4c6cc681d4378fc0ff00c60ac0c5a",
"timestamp": "",
"source": "github",
"line_count": 404,
"max_line_length": 242,
"avg_line_length": 46.94059405940594,
"alnum_prop": 0.6495465091752795,
"repo_name": "Azure/azure-sdk-for-python",
"id": "31f68d205e987b6bcafdcd3fdac67ea57c7f3c82",
"size": "19464",
"binary": false,
"copies": "1",
"ref": "refs/heads/main",
"path": "sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/v2021_01_01_preview/aio/operations/_private_endpoint_connections_operations.py",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "1224"
},
{
"name": "Bicep",
"bytes": "24196"
},
{
"name": "CSS",
"bytes": "6089"
},
{
"name": "Dockerfile",
"bytes": "4892"
},
{
"name": "HTML",
"bytes": "12058"
},
{
"name": "JavaScript",
"bytes": "8137"
},
{
"name": "Jinja",
"bytes": "10377"
},
{
"name": "Jupyter Notebook",
"bytes": "272022"
},
{
"name": "PowerShell",
"bytes": "518535"
},
{
"name": "Python",
"bytes": "715484989"
},
{
"name": "Shell",
"bytes": "3631"
}
],
"symlink_target": ""
} |
// Copyright 2011 The Closure Library Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS-IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/**
* @fileoverview A simple dummy class for representing message ports in tests.
*
*/
goog.provide('goog.testing.messaging.MockMessagePort');
goog.require('goog.events.EventTarget');
/**
* Class for unit-testing code that uses MessagePorts.
* @param {*} id An opaque identifier, used because message ports otherwise have
* no distinguishing characteristics.
* @param {goog.testing.MockControl} mockControl The mock control used to create
* the method mock for #postMessage.
* @constructor
* @extends {goog.events.EventTarget}
* @final
*/
goog.testing.messaging.MockMessagePort = function(id, mockControl) {
goog.base(this);
/**
* An opaque identifier, used because message ports otherwise have no
* distinguishing characteristics.
* @type {*}
*/
this.id = id;
/**
* Whether or not the port has been started.
* @type {boolean}
*/
this.started = false;
/**
* Whether or not the port has been closed.
* @type {boolean}
*/
this.closed = false;
mockControl.createMethodMock(this, 'postMessage');
};
goog.inherits(goog.testing.messaging.MockMessagePort, goog.events.EventTarget);
/**
* A mock postMessage funciton. Actually an instance of
* {@link goog.testing.FunctionMock}.
* @param {*} message The message to send.
* @param {Array.<MessagePort>=} opt_ports Ports to send with the message.
*/
goog.testing.messaging.MockMessagePort.prototype.postMessage = function(
message, opt_ports) {};
/**
* Starts the port.
*/
goog.testing.messaging.MockMessagePort.prototype.start = function() {
this.started = true;
};
/**
* Closes the port.
*/
goog.testing.messaging.MockMessagePort.prototype.close = function() {
this.closed = true;
};
| {
"content_hash": "755f1fccb0abfa76c2ceb1d2ba8219c5",
"timestamp": "",
"source": "github",
"line_count": 86,
"max_line_length": 80,
"avg_line_length": 28.348837209302324,
"alnum_prop": 0.6866283839212469,
"repo_name": "dmincu/IOC",
"id": "01cd3523feaf44038dc11a2512836a8d02a94ed3",
"size": "2438",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "new_php/closure-library/closure/goog/testing/messaging/mockmessageport.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "276898"
},
{
"name": "Emacs Lisp",
"bytes": "2480"
},
{
"name": "JavaScript",
"bytes": "13304586"
},
{
"name": "PHP",
"bytes": "42285"
},
{
"name": "Python",
"bytes": "77277"
},
{
"name": "Shell",
"bytes": "1962"
}
],
"symlink_target": ""
} |
graphenecommon.committee module
===============================
.. automodule:: graphenecommon.committee
:members:
:undoc-members:
:show-inheritance:
| {
"content_hash": "19a14b7f099c55fc7b87183d7a7bd209",
"timestamp": "",
"source": "github",
"line_count": 7,
"max_line_length": 40,
"avg_line_length": 22.857142857142858,
"alnum_prop": 0.6,
"repo_name": "xeroc/python-graphenelib",
"id": "1ca4bca22076bbdeecbd34bb5eae4ef3c69f0477",
"size": "160",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "docs/graphenecommon.committee.rst",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Makefile",
"bytes": "872"
},
{
"name": "Python",
"bytes": "922435"
}
],
"symlink_target": ""
} |
ACCEPTED
#### According to
International Plant Names Index
#### Published in
null
#### Original name
null
### Remarks
null | {
"content_hash": "c821dd26118dab565eb622227ce35e24",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 31,
"avg_line_length": 9.692307692307692,
"alnum_prop": 0.7063492063492064,
"repo_name": "mdoering/backbone",
"id": "9fa5616e27a1a6d0152f426bbb4a47ce1637e15d",
"size": "176",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "life/Plantae/Magnoliophyta/Magnoliopsida/Gentianales/Apocynaceae/Stapelia/Stapelia sarmentosa/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
module.exports = function( grunt ) {
'use strict';
//
// Grunt configuration:
//
// https://github.com/cowboy/grunt/blob/master/docs/getting_started.md
//
grunt.initConfig({
// Project configuration
// ---------------------
// specify an alternate install location for Bower
bower: {
dir: 'app/components'
},
// Coffee to JS compilation
coffee: {
compile: {
files: {
'temp/scripts/*.js': 'app/scripts/**/*.coffee'
},
options: {
basePath: 'app/scripts'
}
}
},
// compile .scss/.sass to .css using Compass
compass: {
dist: {
// http://compass-style.org/help/tutorials/configuration-reference/#configuration-properties
options: {
css_dir: 'temp/styles',
sass_dir: 'app/styles',
images_dir: 'app/images',
javascripts_dir: 'temp/scripts',
force: true
}
}
},
// generate application cache manifest
manifest:{
dest: ''
},
// default watch configuration
watch: {
coffee: {
files: 'app/scripts/**/*.coffee',
tasks: 'coffee reload'
},
compass: {
files: [
'app/styles/**/*.{scss,sass}'
],
tasks: 'compass reload'
},
reload: {
files: [
'app/*.html',
'app/styles/**/*.css',
'app/scripts/**/*.js',
'app/views/**/*.html',
'app/images/**/*'
],
tasks: 'reload'
}
},
// default lint configuration, change this to match your setup:
// https://github.com/cowboy/grunt/blob/master/docs/task_lint.md#lint-built-in-task
lint: {
files: [
'Gruntfile.js',
'app/scripts/**/*.js',
'spec/**/*.js'
]
},
// specifying JSHint options and globals
// https://github.com/cowboy/grunt/blob/master/docs/task_lint.md#specifying-jshint-options-and-globals
jshint: {
options: {
curly: true,
eqeqeq: true,
immed: true,
latedef: true,
newcap: true,
noarg: true,
sub: true,
undef: true,
boss: true,
eqnull: true,
browser: true
},
globals: {
angular: true
}
},
// Build configuration
// -------------------
// the staging directory used during the process
staging: 'temp',
// final build output
output: 'dist',
mkdirs: {
staging: 'app/'
},
// Below, all paths are relative to the staging directory, which is a copy
// of the app/ directory. Any .gitignore, .ignore and .buildignore file
// that might appear in the app/ tree are used to ignore these values
// during the copy process.
// concat css/**/*.css files, inline @import, output a single minified css
css: {
'styles/main.css': ['styles/**/*.css']
},
// renames JS/CSS to prepend a hash of their contents for easier
// versioning
rev: {
js: 'scripts/**/*.js',
css: 'styles/**/*.css',
img: 'images/**'
},
// usemin handler should point to the file containing
// the usemin blocks to be parsed
'usemin-handler': {
html: 'index.html'
},
// update references in HTML/CSS to revved files
usemin: {
html: ['**/*.html'],
css: ['**/*.css']
},
// HTML minification
html: {
files: ['**/*.html']
},
// Optimizes JPGs and PNGs (with jpegtran & optipng)
img: {
dist: '<config:rev.img>'
},
// rjs configuration. You don't necessarily need to specify the typical
// `path` configuration, the rjs task will parse these values from your
// main module, using http://requirejs.org/docs/optimization.html#mainConfigFile
//
// name / out / mainConfig file should be used. You can let it blank if
// you're using usemin-handler to parse rjs config from markup (default
// setup)
rjs: {
// no minification, is done by the min task
optimize: 'none',
baseUrl: './scripts',
wrap: true
},
});
// Alias the `test` task to run `testacular` instead
grunt.registerTask('test', 'run the testacular test driver', function () {
var done = this.async();
require('child_process').exec('testacular start --single-run', function (err, stdout) {
grunt.log.write(stdout);
done(err);
});
});
};
| {
"content_hash": "729f6f63e55c8537e7129ba7d6609e0e",
"timestamp": "",
"source": "github",
"line_count": 180,
"max_line_length": 106,
"avg_line_length": 24.788888888888888,
"alnum_prop": 0.5403406544150605,
"repo_name": "cironunes/jquery-to-angular",
"id": "fafde7c120ea5fe191961e01b4077b145c7e4768",
"size": "4462",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "samples/cart/Gruntfile.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "JavaScript",
"bytes": "17809"
}
],
"symlink_target": ""
} |
<?php
//SideBar Widget类
class sidebarWidget extends Widget {
public function render($data){
$linkQuery=M('linktable');
$linkData=$linkQuery->order('id')->select();
$insert['link']=$linkData;
$content=$this->renderFile('sidebar',$insert);
return $content;
}
}
| {
"content_hash": "52144380bac248afbf4550223e2f0c55",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 58,
"avg_line_length": 29.384615384615383,
"alnum_prop": 0.4869109947643979,
"repo_name": "zyzsdy/feelyblog",
"id": "b0f7a6f5281e5c9968285b25b54de890f28c82df",
"size": "384",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "FeelyBlog/Lib/Widget/sidebarWidget.class.php",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "1392"
},
{
"name": "JavaScript",
"bytes": "33268"
},
{
"name": "PHP",
"bytes": "437433"
}
],
"symlink_target": ""
} |
package com.tbb.analytics.flume.twitter.source;
import org.apache.flume.Context;
import org.apache.flume.EventDrivenSource;
import org.apache.flume.annotations.InterfaceAudience;
import org.apache.flume.annotations.InterfaceStability;
import org.apache.flume.conf.Configurable;
import org.apache.flume.source.AbstractSource;
/**
* Created by Riyaz A Shaikh on 4/2/2016.
*/
@InterfaceAudience.Public
@InterfaceStability.Stable
public class SitestreamSource extends AbstractSource implements Configurable, EventDrivenSource {
@Override
public void configure(Context context) {
}
@Override
public synchronized void start() {
}
@Override
public synchronized void stop() {
}
}
| {
"content_hash": "c07f76264d7ca4a0c2e5c69f0e7a4689",
"timestamp": "",
"source": "github",
"line_count": 32,
"max_line_length": 97,
"avg_line_length": 22.46875,
"alnum_prop": 0.7649513212795549,
"repo_name": "TBB-Softwares/tbb-flume-twitter-source",
"id": "d58c8cc33c1e9f55edfb06cc53d686cfb1a48a8a",
"size": "719",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/main/java/com/tbb/analytics/flume/twitter/source/SitestreamSource.java",
"mode": "33188",
"license": "mit",
"language": [],
"symlink_target": ""
} |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_77) on Mon May 23 19:36:32 EDT 2016 -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Uses of Class org.egothor.stemmer.MultiTrie2 (Lucene 6.0.1 API)</title>
<meta name="date" content="2016-05-23">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Class org.egothor.stemmer.MultiTrie2 (Lucene 6.0.1 API)";
}
}
catch(err) {
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../org/egothor/stemmer/MultiTrie2.html" title="class in org.egothor.stemmer">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/egothor/stemmer/class-use/MultiTrie2.html" target="_top">Frames</a></li>
<li><a href="MultiTrie2.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h2 title="Uses of Class org.egothor.stemmer.MultiTrie2" class="title">Uses of Class<br>org.egothor.stemmer.MultiTrie2</h2>
</div>
<div class="classUseContainer">No usage of org.egothor.stemmer.MultiTrie2</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../org/egothor/stemmer/MultiTrie2.html" title="class in org.egothor.stemmer">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/egothor/stemmer/class-use/MultiTrie2.html" target="_top">Frames</a></li>
<li><a href="MultiTrie2.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>
<i>Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.</i>
<script src='../../../../prettify.js' type='text/javascript'></script>
<script type='text/javascript'>
(function(){
var oldonload = window.onload;
if (typeof oldonload != 'function') {
window.onload = prettyPrint;
} else {
window.onload = function() {
oldonload();
prettyPrint();
}
}
})();
</script>
</small></p>
</body>
</html>
| {
"content_hash": "1517272280b2f7183a0fd863a8cf18b8",
"timestamp": "",
"source": "github",
"line_count": 140,
"max_line_length": 123,
"avg_line_length": 34.81428571428572,
"alnum_prop": 0.595814526056627,
"repo_name": "YorkUIRLab/irlab",
"id": "53d5f11d8f032b65751047b6eb8d1b5b87b1005e",
"size": "4874",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "lib/lucene-6.0.1/docs/analyzers-stempel/org/egothor/stemmer/class-use/MultiTrie2.html",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "433499"
},
{
"name": "Gnuplot",
"bytes": "2444"
},
{
"name": "HTML",
"bytes": "95820812"
},
{
"name": "Java",
"bytes": "303195"
},
{
"name": "JavaScript",
"bytes": "33538"
}
],
"symlink_target": ""
} |
package fr.elgregos.java8presentation.lambdas.example6.constructorreference;
import java.util.Arrays;
import java.util.List;
public class Team {
public List<String> firstName;
public Team(final String[] firstName) {
this.firstName = Arrays.asList(firstName);
}
}
| {
"content_hash": "f3778ed655d9a80c72890eef2d6b5786",
"timestamp": "",
"source": "github",
"line_count": 14,
"max_line_length": 76,
"avg_line_length": 20.642857142857142,
"alnum_prop": 0.7301038062283737,
"repo_name": "GregoryBevan/java8presentation",
"id": "d04d87c8ba441308b6d08821c2f706dc8efb30a1",
"size": "289",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/main/java/fr/elgregos/java8presentation/lambdas/example6/constructorreference/Team.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "2987"
},
{
"name": "HTML",
"bytes": "952"
},
{
"name": "Java",
"bytes": "33352"
},
{
"name": "JavaScript",
"bytes": "4395"
}
],
"symlink_target": ""
} |
package main_test
import (
"testing"
kusttest_test "sigs.k8s.io/kustomize/api/testutils/kusttest"
)
func TestPrefixTransformer(t *testing.T) {
th := kusttest_test.MakeEnhancedHarness(t).
PrepBuiltin("PrefixTransformer")
defer th.Reset()
rm := th.LoadAndRunTransformer(`
apiVersion: builtin
kind: PrefixTransformer
metadata:
name: notImportantHere
prefix: baked-
fieldSpecs:
- path: metadata/name
`, `
apiVersion: v1
kind: Namespace
metadata:
name: apple
---
apiVersion: v1
kind: Service
metadata:
name: apple
spec:
ports:
- port: 7002
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: crd
---
apiVersion: apiregistration.k8s.io/v1
kind: APIService
metadata:
name: apiservice
---
apiVersion: v1
kind: ConfigMap
metadata:
name: cm
`)
th.AssertActualEqualsExpected(rm, `
apiVersion: v1
kind: Namespace
metadata:
name: apple
---
apiVersion: v1
kind: Service
metadata:
annotations:
internal.config.kubernetes.io/prefixes: baked-
internal.config.kubernetes.io/previousKinds: Service
internal.config.kubernetes.io/previousNames: apple
internal.config.kubernetes.io/previousNamespaces: default
name: baked-apple
spec:
ports:
- port: 7002
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: crd
---
apiVersion: apiregistration.k8s.io/v1
kind: APIService
metadata:
name: apiservice
---
apiVersion: v1
kind: ConfigMap
metadata:
annotations:
internal.config.kubernetes.io/prefixes: baked-
internal.config.kubernetes.io/previousKinds: ConfigMap
internal.config.kubernetes.io/previousNames: cm
internal.config.kubernetes.io/previousNamespaces: default
name: baked-cm
`)
rm = th.LoadAndRunTransformer(`
apiVersion: builtin
kind: PrefixTransformer
metadata:
name: notImportantHere
prefix: test-
fieldSpecs:
- kind: Deployment
path: metadata/name
- kind: Deployment
path: spec/template/spec/containers/name
`, `
apiVersion: apps/v1
kind: Deployment
metadata:
name: deployment
spec:
template:
spec:
containers:
- image: myapp
name: main
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: crd
---
apiVersion: apiregistration.k8s.io/v1
kind: APIService
metadata:
name: apiservice
---
apiVersion: v1
kind: ConfigMap
metadata:
name: cm
`)
th.AssertActualEqualsExpected(rm, `
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
internal.config.kubernetes.io/prefixes: test-
internal.config.kubernetes.io/previousKinds: Deployment
internal.config.kubernetes.io/previousNames: deployment
internal.config.kubernetes.io/previousNamespaces: default
name: test-deployment
spec:
template:
spec:
containers:
- image: myapp
name: test-main
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: crd
---
apiVersion: apiregistration.k8s.io/v1
kind: APIService
metadata:
name: apiservice
---
apiVersion: v1
kind: ConfigMap
metadata:
name: cm
`)
}
| {
"content_hash": "d9c9f8a3c6dd17ec47d2629b53353d33",
"timestamp": "",
"source": "github",
"line_count": 163,
"max_line_length": 61,
"avg_line_length": 18.680981595092025,
"alnum_prop": 0.7454844006568144,
"repo_name": "kubernetes-sigs/kustomize",
"id": "00247c1e66e95e94465ab4aacc31a7ba2a812dfb",
"size": "3127",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "plugin/builtin/prefixtransformer/PrefixTransformer_test.go",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Dockerfile",
"bytes": "4828"
},
{
"name": "Go",
"bytes": "3998011"
},
{
"name": "HTML",
"bytes": "10086"
},
{
"name": "Makefile",
"bytes": "20661"
},
{
"name": "PowerShell",
"bytes": "2159"
},
{
"name": "PureBasic",
"bytes": "3469475"
},
{
"name": "SCSS",
"bytes": "96"
},
{
"name": "Shell",
"bytes": "47249"
},
{
"name": "Starlark",
"bytes": "1334"
}
],
"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_25) on Sat Nov 16 21:43:21 PST 2013 -->
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>Uses of Class com.fasterxml.jackson.databind.deser.BeanDeserializerModifier (jackson-databind 2.3.0 API)</title>
<meta name="date" content="2013-11-16">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Class com.fasterxml.jackson.databind.deser.BeanDeserializerModifier (jackson-databind 2.3.0 API)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../../com/fasterxml/jackson/databind/deser/BeanDeserializerModifier.html" title="class in com.fasterxml.jackson.databind.deser">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?com/fasterxml/jackson/databind/deser/class-use/BeanDeserializerModifier.html" target="_top">Frames</a></li>
<li><a href="BeanDeserializerModifier.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h2 title="Uses of Class com.fasterxml.jackson.databind.deser.BeanDeserializerModifier" class="title">Uses of Class<br>com.fasterxml.jackson.databind.deser.BeanDeserializerModifier</h2>
</div>
<div class="classUseContainer">
<ul class="blockList">
<li class="blockList">
<table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation">
<caption><span>Packages that use <a href="../../../../../../com/fasterxml/jackson/databind/deser/BeanDeserializerModifier.html" title="class in com.fasterxml.jackson.databind.deser">BeanDeserializerModifier</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Package</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="#com.fasterxml.jackson.databind">com.fasterxml.jackson.databind</a></td>
<td class="colLast">
<div class="block">Contains basic mapper (conversion) functionality that
allows for converting between regular streaming json content and
Java objects (beans or Tree Model: support for both is via
<a href="../../../../../../com/fasterxml/jackson/databind/ObjectMapper.html" title="class in com.fasterxml.jackson.databind"><code>ObjectMapper</code></a> class, as well
as convenience methods included in
<a href="http://fasterxml.github.com/jackson-core/javadoc/2.3.0/com/fasterxml/jackson/core/JsonParser.html?is-external=true" title="class or interface in com.fasterxml.jackson.core"><code>JsonParser</code></a></div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="#com.fasterxml.jackson.databind.cfg">com.fasterxml.jackson.databind.cfg</a></td>
<td class="colLast">
<div class="block">Package that contains most of configuration-related classes;
exception being couple of most-commonly used configuration
things (like Feature enumerations) that are at the
main level (<code>com.fasterxml.jackson.databind</code>).</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="#com.fasterxml.jackson.databind.deser">com.fasterxml.jackson.databind.deser</a></td>
<td class="colLast">
<div class="block">Contains implementation classes of deserialization part of
data binding.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="#com.fasterxml.jackson.databind.module">com.fasterxml.jackson.databind.module</a></td>
<td class="colLast">
<div class="block">Package that contains classes and interfaces to help implement
custom extension <a href="../../../../../../com/fasterxml/jackson/databind/Module.html" title="class in com.fasterxml.jackson.databind"><code>Module</code></a>s
(which are registered using
<a href="../../../../../../com/fasterxml/jackson/databind/ObjectMapper.html#registerModule(com.fasterxml.jackson.databind.Module)"><code>ObjectMapper.registerModule(com.fasterxml.jackson.databind.Module)</code></a>.</div>
</td>
</tr>
</tbody>
</table>
</li>
<li class="blockList">
<ul class="blockList">
<li class="blockList"><a name="com.fasterxml.jackson.databind">
<!-- -->
</a>
<h3>Uses of <a href="../../../../../../com/fasterxml/jackson/databind/deser/BeanDeserializerModifier.html" title="class in com.fasterxml.jackson.databind.deser">BeanDeserializerModifier</a> in <a href="../../../../../../com/fasterxml/jackson/databind/package-summary.html">com.fasterxml.jackson.databind</a></h3>
<table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation">
<caption><span>Methods in <a href="../../../../../../com/fasterxml/jackson/databind/package-summary.html">com.fasterxml.jackson.databind</a> with parameters of type <a href="../../../../../../com/fasterxml/jackson/databind/deser/BeanDeserializerModifier.html" title="class in com.fasterxml.jackson.databind.deser">BeanDeserializerModifier</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><span class="strong">Module.SetupContext.</span><code><strong><a href="../../../../../../com/fasterxml/jackson/databind/Module.SetupContext.html#addBeanDeserializerModifier(com.fasterxml.jackson.databind.deser.BeanDeserializerModifier)">addBeanDeserializerModifier</a></strong>(<a href="../../../../../../com/fasterxml/jackson/databind/deser/BeanDeserializerModifier.html" title="class in com.fasterxml.jackson.databind.deser">BeanDeserializerModifier</a> mod)</code>
<div class="block">Method that module can use to register additional modifier objects to
customize configuration and construction of bean deserializers.</div>
</td>
</tr>
</tbody>
</table>
</li>
<li class="blockList"><a name="com.fasterxml.jackson.databind.cfg">
<!-- -->
</a>
<h3>Uses of <a href="../../../../../../com/fasterxml/jackson/databind/deser/BeanDeserializerModifier.html" title="class in com.fasterxml.jackson.databind.deser">BeanDeserializerModifier</a> in <a href="../../../../../../com/fasterxml/jackson/databind/cfg/package-summary.html">com.fasterxml.jackson.databind.cfg</a></h3>
<table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing fields, and an explanation">
<caption><span>Fields in <a href="../../../../../../com/fasterxml/jackson/databind/cfg/package-summary.html">com.fasterxml.jackson.databind.cfg</a> declared as <a href="../../../../../../com/fasterxml/jackson/databind/deser/BeanDeserializerModifier.html" title="class in com.fasterxml.jackson.databind.deser">BeanDeserializerModifier</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="../../../../../../com/fasterxml/jackson/databind/deser/BeanDeserializerModifier.html" title="class in com.fasterxml.jackson.databind.deser">BeanDeserializerModifier</a>[]</code></td>
<td class="colLast"><span class="strong">DeserializerFactoryConfig.</span><code><strong><a href="../../../../../../com/fasterxml/jackson/databind/cfg/DeserializerFactoryConfig.html#_modifiers">_modifiers</a></strong></code>
<div class="block">List of modifiers that can change the way <a href="../../../../../../com/fasterxml/jackson/databind/deser/BeanDeserializer.html" title="class in com.fasterxml.jackson.databind.deser"><code>BeanDeserializer</code></a> instances
are configured and constructed.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected static <a href="../../../../../../com/fasterxml/jackson/databind/deser/BeanDeserializerModifier.html" title="class in com.fasterxml.jackson.databind.deser">BeanDeserializerModifier</a>[]</code></td>
<td class="colLast"><span class="strong">DeserializerFactoryConfig.</span><code><strong><a href="../../../../../../com/fasterxml/jackson/databind/cfg/DeserializerFactoryConfig.html#NO_MODIFIERS">NO_MODIFIERS</a></strong></code> </td>
</tr>
</tbody>
</table>
<table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation">
<caption><span>Methods in <a href="../../../../../../com/fasterxml/jackson/databind/cfg/package-summary.html">com.fasterxml.jackson.databind.cfg</a> that return types with arguments of type <a href="../../../../../../com/fasterxml/jackson/databind/deser/BeanDeserializerModifier.html" title="class in com.fasterxml.jackson.databind.deser">BeanDeserializerModifier</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a><<a href="../../../../../../com/fasterxml/jackson/databind/deser/BeanDeserializerModifier.html" title="class in com.fasterxml.jackson.databind.deser">BeanDeserializerModifier</a>></code></td>
<td class="colLast"><span class="strong">DeserializerFactoryConfig.</span><code><strong><a href="../../../../../../com/fasterxml/jackson/databind/cfg/DeserializerFactoryConfig.html#deserializerModifiers()">deserializerModifiers</a></strong>()</code> </td>
</tr>
</tbody>
</table>
<table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation">
<caption><span>Methods in <a href="../../../../../../com/fasterxml/jackson/databind/cfg/package-summary.html">com.fasterxml.jackson.databind.cfg</a> with parameters of type <a href="../../../../../../com/fasterxml/jackson/databind/deser/BeanDeserializerModifier.html" title="class in com.fasterxml.jackson.databind.deser">BeanDeserializerModifier</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../com/fasterxml/jackson/databind/cfg/DeserializerFactoryConfig.html" title="class in com.fasterxml.jackson.databind.cfg">DeserializerFactoryConfig</a></code></td>
<td class="colLast"><span class="strong">DeserializerFactoryConfig.</span><code><strong><a href="../../../../../../com/fasterxml/jackson/databind/cfg/DeserializerFactoryConfig.html#withDeserializerModifier(com.fasterxml.jackson.databind.deser.BeanDeserializerModifier)">withDeserializerModifier</a></strong>(<a href="../../../../../../com/fasterxml/jackson/databind/deser/BeanDeserializerModifier.html" title="class in com.fasterxml.jackson.databind.deser">BeanDeserializerModifier</a> modifier)</code>
<div class="block">Fluent/factory method used to construct a configuration object that
has same configuration as this instance plus one additional
deserialiazer modifier.</div>
</td>
</tr>
</tbody>
</table>
<table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing constructors, and an explanation">
<caption><span>Constructors in <a href="../../../../../../com/fasterxml/jackson/databind/cfg/package-summary.html">com.fasterxml.jackson.databind.cfg</a> with parameters of type <a href="../../../../../../com/fasterxml/jackson/databind/deser/BeanDeserializerModifier.html" title="class in com.fasterxml.jackson.databind.deser">BeanDeserializerModifier</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colLast"><code><strong><a href="../../../../../../com/fasterxml/jackson/databind/cfg/DeserializerFactoryConfig.html#DeserializerFactoryConfig(com.fasterxml.jackson.databind.deser.Deserializers[], com.fasterxml.jackson.databind.deser.KeyDeserializers[], com.fasterxml.jackson.databind.deser.BeanDeserializerModifier[], com.fasterxml.jackson.databind.AbstractTypeResolver[], com.fasterxml.jackson.databind.deser.ValueInstantiators[])">DeserializerFactoryConfig</a></strong>(<a href="../../../../../../com/fasterxml/jackson/databind/deser/Deserializers.html" title="interface in com.fasterxml.jackson.databind.deser">Deserializers</a>[] allAdditionalDeserializers,
<a href="../../../../../../com/fasterxml/jackson/databind/deser/KeyDeserializers.html" title="interface in com.fasterxml.jackson.databind.deser">KeyDeserializers</a>[] allAdditionalKeyDeserializers,
<a href="../../../../../../com/fasterxml/jackson/databind/deser/BeanDeserializerModifier.html" title="class in com.fasterxml.jackson.databind.deser">BeanDeserializerModifier</a>[] modifiers,
<a href="../../../../../../com/fasterxml/jackson/databind/AbstractTypeResolver.html" title="class in com.fasterxml.jackson.databind">AbstractTypeResolver</a>[] atr,
<a href="../../../../../../com/fasterxml/jackson/databind/deser/ValueInstantiators.html" title="interface in com.fasterxml.jackson.databind.deser">ValueInstantiators</a>[] vi)</code>
<div class="block">Copy-constructor that will create an instance that contains defined
set of additional deserializer providers.</div>
</td>
</tr>
</tbody>
</table>
</li>
<li class="blockList"><a name="com.fasterxml.jackson.databind.deser">
<!-- -->
</a>
<h3>Uses of <a href="../../../../../../com/fasterxml/jackson/databind/deser/BeanDeserializerModifier.html" title="class in com.fasterxml.jackson.databind.deser">BeanDeserializerModifier</a> in <a href="../../../../../../com/fasterxml/jackson/databind/deser/package-summary.html">com.fasterxml.jackson.databind.deser</a></h3>
<table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation">
<caption><span>Methods in <a href="../../../../../../com/fasterxml/jackson/databind/deser/package-summary.html">com.fasterxml.jackson.databind.deser</a> with parameters of type <a href="../../../../../../com/fasterxml/jackson/databind/deser/BeanDeserializerModifier.html" title="class in com.fasterxml.jackson.databind.deser">BeanDeserializerModifier</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code>abstract <a href="../../../../../../com/fasterxml/jackson/databind/deser/DeserializerFactory.html" title="class in com.fasterxml.jackson.databind.deser">DeserializerFactory</a></code></td>
<td class="colLast"><span class="strong">DeserializerFactory.</span><code><strong><a href="../../../../../../com/fasterxml/jackson/databind/deser/DeserializerFactory.html#withDeserializerModifier(com.fasterxml.jackson.databind.deser.BeanDeserializerModifier)">withDeserializerModifier</a></strong>(<a href="../../../../../../com/fasterxml/jackson/databind/deser/BeanDeserializerModifier.html" title="class in com.fasterxml.jackson.databind.deser">BeanDeserializerModifier</a> modifier)</code>
<div class="block">Convenience method for creating a new factory instance with additional
<a href="../../../../../../com/fasterxml/jackson/databind/deser/BeanDeserializerModifier.html" title="class in com.fasterxml.jackson.databind.deser"><code>BeanDeserializerModifier</code></a>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../../com/fasterxml/jackson/databind/deser/DeserializerFactory.html" title="class in com.fasterxml.jackson.databind.deser">DeserializerFactory</a></code></td>
<td class="colLast"><span class="strong">BasicDeserializerFactory.</span><code><strong><a href="../../../../../../com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.html#withDeserializerModifier(com.fasterxml.jackson.databind.deser.BeanDeserializerModifier)">withDeserializerModifier</a></strong>(<a href="../../../../../../com/fasterxml/jackson/databind/deser/BeanDeserializerModifier.html" title="class in com.fasterxml.jackson.databind.deser">BeanDeserializerModifier</a> modifier)</code>
<div class="block">Convenience method for creating a new factory instance with additional
<a href="../../../../../../com/fasterxml/jackson/databind/deser/BeanDeserializerModifier.html" title="class in com.fasterxml.jackson.databind.deser"><code>BeanDeserializerModifier</code></a>.</div>
</td>
</tr>
</tbody>
</table>
</li>
<li class="blockList"><a name="com.fasterxml.jackson.databind.module">
<!-- -->
</a>
<h3>Uses of <a href="../../../../../../com/fasterxml/jackson/databind/deser/BeanDeserializerModifier.html" title="class in com.fasterxml.jackson.databind.deser">BeanDeserializerModifier</a> in <a href="../../../../../../com/fasterxml/jackson/databind/module/package-summary.html">com.fasterxml.jackson.databind.module</a></h3>
<table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing fields, and an explanation">
<caption><span>Fields in <a href="../../../../../../com/fasterxml/jackson/databind/module/package-summary.html">com.fasterxml.jackson.databind.module</a> declared as <a href="../../../../../../com/fasterxml/jackson/databind/deser/BeanDeserializerModifier.html" title="class in com.fasterxml.jackson.databind.deser">BeanDeserializerModifier</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="../../../../../../com/fasterxml/jackson/databind/deser/BeanDeserializerModifier.html" title="class in com.fasterxml.jackson.databind.deser">BeanDeserializerModifier</a></code></td>
<td class="colLast"><span class="strong">SimpleModule.</span><code><strong><a href="../../../../../../com/fasterxml/jackson/databind/module/SimpleModule.html#_deserializerModifier">_deserializerModifier</a></strong></code> </td>
</tr>
</tbody>
</table>
<table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation">
<caption><span>Methods in <a href="../../../../../../com/fasterxml/jackson/databind/module/package-summary.html">com.fasterxml.jackson.databind.module</a> with parameters of type <a href="../../../../../../com/fasterxml/jackson/databind/deser/BeanDeserializerModifier.html" title="class in com.fasterxml.jackson.databind.deser">BeanDeserializerModifier</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../com/fasterxml/jackson/databind/module/SimpleModule.html" title="class in com.fasterxml.jackson.databind.module">SimpleModule</a></code></td>
<td class="colLast"><span class="strong">SimpleModule.</span><code><strong><a href="../../../../../../com/fasterxml/jackson/databind/module/SimpleModule.html#setDeserializerModifier(com.fasterxml.jackson.databind.deser.BeanDeserializerModifier)">setDeserializerModifier</a></strong>(<a href="../../../../../../com/fasterxml/jackson/databind/deser/BeanDeserializerModifier.html" title="class in com.fasterxml.jackson.databind.deser">BeanDeserializerModifier</a> mod)</code> </td>
</tr>
</tbody>
</table>
</li>
</ul>
</li>
</ul>
</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../../com/fasterxml/jackson/databind/deser/BeanDeserializerModifier.html" title="class in com.fasterxml.jackson.databind.deser">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?com/fasterxml/jackson/databind/deser/class-use/BeanDeserializerModifier.html" target="_top">Frames</a></li>
<li><a href="BeanDeserializerModifier.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright © 2012-2013 <a href="http://fasterxml.com/">FasterXML</a>. All Rights Reserved.</small></p>
</body>
</html>
| {
"content_hash": "e725a5f589e0cb07cdeff5e3db847cd1",
"timestamp": "",
"source": "github",
"line_count": 324,
"max_line_length": 677,
"avg_line_length": 70.58641975308642,
"alnum_prop": 0.7077831219938785,
"repo_name": "FasterXML/jackson-databind",
"id": "ff884923ccf8376e653c0817475a5f9af04b1b7c",
"size": "22870",
"binary": false,
"copies": "1",
"ref": "refs/heads/2.15",
"path": "docs/javadoc/2.3/com/fasterxml/jackson/databind/deser/class-use/BeanDeserializerModifier.html",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "7940640"
},
{
"name": "Logos",
"bytes": "173041"
},
{
"name": "Shell",
"bytes": "264"
}
],
"symlink_target": ""
} |
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>bin</id>
<formats>
<format>zip</format>
<format>tar.gz</format>
</formats>
<files>
<file>
<source>README.md</source>
<destName>README.txt</destName>
<outputDirectory>/</outputDirectory>
<filtered>true</filtered>
</file>
<file>
<source>LICENSE</source>
<destName>LICENSE.txt</destName>
<outputDirectory>/</outputDirectory>
</file>
<file>
<source>LICENSE.duo-security</source>
<destName>LICENSE.duo-security.txt</destName>
<outputDirectory>/</outputDirectory>
<filtered>true</filtered>
</file>
<file>
<source>src/main/conf/duo.vm</source>
<outputDirectory>/</outputDirectory>
<filtered>false</filtered>
</file>
<file>
<source>src/main/resources/Duo-Web-v1.bundled.js</source>
<outputDirectory>/web/duo</outputDirectory>
<filtered>false</filtered>
</file>
<file>
<source>src/main/resources/Duo-Web-v1.bundled.min.js</source>
<outputDirectory>/web/duo</outputDirectory>
<filtered>false</filtered>
</file>
<file>
<source>src/main/resources/Duo-Web-v1.js</source>
<outputDirectory>/web/duo</outputDirectory>
<filtered>false</filtered>
</file>
<file>
<source>src/main/resources/Duo-Web-v1.min.js</source>
<outputDirectory>/web/duo</outputDirectory>
<filtered>false</filtered>
</file>
<file>
<source>src/main/resources/duo.css</source>
<outputDirectory>/web/duo</outputDirectory>
<filtered>false</filtered>
</file>
</files>
<fileSets>
<fileSet>
<directory>target</directory>
<outputDirectory>/</outputDirectory>
<includes>
<include>mcb-duo-${project.version}.jar</include>
</includes>
</fileSet>
</fileSets>
</assembly>
| {
"content_hash": "3b4d074892b5c4dbad5304e9b247bb99",
"timestamp": "",
"source": "github",
"line_count": 67,
"max_line_length": 141,
"avg_line_length": 29.507462686567163,
"alnum_prop": 0.6843702579666161,
"repo_name": "uchicago/mcb-duo",
"id": "6bd20fe0de47f93366d3866c7f442247a37b87e6",
"size": "1977",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/main/assembly/src.xml",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "83"
},
{
"name": "Java",
"bytes": "61764"
},
{
"name": "JavaScript",
"bytes": "227650"
}
],
"symlink_target": ""
} |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="ja">
<head>
<!-- Generated by javadoc (1.8.0_45) on Fri May 20 00:01:20 JST 2016 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>クラス yokohama.yellow_man.sena.controllers.Applicationの使用</title>
<meta name="date" content="2016-05-20">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="\u30AF\u30E9\u30B9 yokohama.yellow_man.sena.controllers.Application\u306E\u4F7F\u7528";
}
}
catch(err) {
}
//-->
</script>
<noscript>
<div>ブラウザのJavaScriptが無効になっています。</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="ナビゲーション・リンクをスキップ">ナビゲーション・リンクをスキップ</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="ナビゲーション">
<li><a href="../../../../../overview-summary.html">概要</a></li>
<li><a href="../package-summary.html">パッケージ</a></li>
<li><a href="../../../../../yokohama/yellow_man/sena/controllers/Application.html" title="yokohama.yellow_man.sena.controllers内のクラス">クラス</a></li>
<li class="navBarCell1Rev">使用</li>
<li><a href="../package-tree.html">階層ツリー</a></li>
<li><a href="../../../../../deprecated-list.html">非推奨</a></li>
<li><a href="../../../../../index-files/index-1.html">索引</a></li>
<li><a href="../../../../../help-doc.html">ヘルプ</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>前</li>
<li>次</li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?yokohama/yellow_man/sena/controllers/class-use/Application.html" target="_top">フレーム</a></li>
<li><a href="Application.html" target="_top">フレームなし</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">すべてのクラス</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h2 title="クラスの使用 yokohama.yellow_man.sena.controllers.Application" class="title">クラスの使用<br>yokohama.yellow_man.sena.controllers.Application</h2>
</div>
<div class="classUseContainer">yokohama.yellow_man.sena.controllers.Applicationはどこからも使用されていません</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="ナビゲーション・リンクをスキップ">ナビゲーション・リンクをスキップ</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="ナビゲーション">
<li><a href="../../../../../overview-summary.html">概要</a></li>
<li><a href="../package-summary.html">パッケージ</a></li>
<li><a href="../../../../../yokohama/yellow_man/sena/controllers/Application.html" title="yokohama.yellow_man.sena.controllers内のクラス">クラス</a></li>
<li class="navBarCell1Rev">使用</li>
<li><a href="../package-tree.html">階層ツリー</a></li>
<li><a href="../../../../../deprecated-list.html">非推奨</a></li>
<li><a href="../../../../../index-files/index-1.html">索引</a></li>
<li><a href="../../../../../help-doc.html">ヘルプ</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>前</li>
<li>次</li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?yokohama/yellow_man/sena/controllers/class-use/Application.html" target="_top">フレーム</a></li>
<li><a href="Application.html" target="_top">フレームなし</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">すべてのクラス</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": "aa30411496787e5efa854498802740c4",
"timestamp": "",
"source": "github",
"line_count": 125,
"max_line_length": 145,
"avg_line_length": 35.536,
"alnum_prop": 0.614813147230977,
"repo_name": "yellow-man/sena-doc",
"id": "7a269d105b18d304bcac27787fa977b13078d3be",
"size": "4892",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "javadoc/batch/yokohama/yellow_man/sena/controllers/class-use/Application.html",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
package main
import (
// This is the graphics library we are going to use. It is called the
// Simple Direct Media Library. SDL for short. We need this to create the
// window and to provide the drawing functions we need.
"github.com/veandco/go-sdl2/sdl"
)
// These are the variables for the graphics library
// They have to be outside of the main function because the functions at the
// end of the file need them.
// This the window we are going to draw into
var window *sdl.Window
// This the abstraction to the graphics hardware inside the computer
// that actually does the drawing
var renderer *sdl.Renderer
// ---- Game State variables ----
// The quit flag this is used to control the main game loop.
// If quit is true then the user wants to finish the game. This will
// break the main game loop.
var quit bool
// The programs main function
func main() {
// ---- This is the start of Owen's graphics setup code ----
// First we have to initalise the SDL library, before we can use it
sdl.Init(sdl.INIT_EVERYTHING)
// defer is a go keyword and a special feature.
// This means that go will automatically call the function sdl.Quit() before
// the program exits for us. We don't have to remember to put this at the end!
defer sdl.Quit()
// These variabels are important. They are the width and height of the window
// If you change these you will change the size of the image
var windowWidth int
var windowHeight int
// if you want to change these try 800 for the width and 600 for the height
windowWidth = 1024
windowHeight = 768
// Now we have to create the window we want to use.
// We need to tell the SDL library how big to make the window of the correct
// size - that's what the bit in the brackets does
window = createWindow(windowWidth, windowHeight)
// automatically destroy the window when the program finishes
defer window.Destroy()
// Now we have a window we need to create a renderer so we can draw into
// it. In this case we want to use the first graphics card that supports faster
// drawing
renderer = createRenderer(window)
// automatically destroy the renderer when the program exits.
defer renderer.Destroy()
// Set a black i.e. RGBA (0,0,0,0) background colour and clear the window
renderer.SetDrawColor(0, 0, 0, 0)
renderer.Clear()
// ---- This is the end of Owen's graphics setup code ----
// initialise the games variables.
initialise()
// Your Turn
// You need to call the main game loop function of the game here.
// Put your answer on the next line
}
// Initialise sets the inital values of the game state variables.
// Initialise must be called before the games main loop starts.
func initialise() {
// initially set the quit flag to false.
quit = false
}
// GameMainLoop controls the game. It performs three main tasks. The first task
// is to get the users input. The second task is to update the games state based
// on the user input and the rules of the game. The final task is to update, or
// draw or render, the changes to the screen. Each of these tasks is also
// a separate function.
// The function also has to repeatedly do these three tasks while
// the value of the quit flag is false.
//
// Your Turn
// Write a main game loop funtion according to the instructions above
// Start your answer on the next line
// GetInput gets the users input and updates the game state variables that realte
// to the users input, for example, the direction that the user wants to move their
// bat in.
//
// Your Turn
// See if you can write the getInput function
// getInput has to check if the user has clicked the close button.
// You can do this be calling the checkQuit function. Don't worry about how
// chckQuit works. We will look at this later!
// For now all you need to do is call checkQuit from getInput()
// Start your answer on the next line
// UpdateGameState updates the game state variables based on the user input and
// the rules of the game.
//
// Your Turn
// See if you can write the updateStateFunction
// For now, lets just get updateState to print the value of the quit variable.
// Start your answer on the next line
// Render updates the screen, based on the new positions of the bats and the ball.
//
// Your Turn
// See if you can write the render function
// render needs to call the Present function. You can do this like this:
// renderer.Present()
// This will display the window, with a black background
// Start your answer on the next line
// CheckQuit checks if the user has clicked the window's close button.
// If the user has then the quit variable is set it true.
func checkQuit() {
var event sdl.Event
event = sdl.PollEvent()
if event != nil {
switch event.(type) {
case *sdl.QuitEvent:
quit = true
}
}
}
// Create the graphics window using the SDl library or crash trying
func createWindow(w, h int) *sdl.Window {
var window *sdl.Window
var err error
window, err = sdl.CreateWindow("Pong Game", sdl.WINDOWPOS_UNDEFINED, sdl.WINDOWPOS_UNDEFINED,
w, h, sdl.WINDOW_SHOWN)
if err != nil {
panic(err)
}
return window
}
// Create the graphics renderer or crash trying
func createRenderer(w *sdl.Window) *sdl.Renderer {
var r *sdl.Renderer
var err error
r, err = sdl.CreateRenderer(w, -1, sdl.RENDERER_ACCELERATED)
if err != nil {
panic(err)
}
return r
}
| {
"content_hash": "2f77fb81146c20b5af668d9d3e7a8644",
"timestamp": "",
"source": "github",
"line_count": 156,
"max_line_length": 94,
"avg_line_length": 34.22435897435897,
"alnum_prop": 0.7286008615845664,
"repo_name": "gophercoders/codeclub-extra",
"id": "93a747db640072b6fe125a279230fb08c661837d",
"size": "5339",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "pong-v1/pong-v1.go",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "Go",
"bytes": "25164"
}
],
"symlink_target": ""
} |
<div class="block-main">
{{> nav/nav-new}}
<div class="container">
<div class="block-main-image">
<img src="%=static=%images/general/coupon_orange.png" alt="">
</div>
<div class="block-main-title h3">
SUPER FAST <span class="text-primary">ESTIMATE</span>
</div>
<div class="block-main-desctitle h4">
DELIVERED TO YOUR INBOX
</div>
<div class="counter-wrapper">
<div class="counter">
<div class="countdown-container" id="counter"></div>
</div>
</div>
{{!<div class="block-main-title h4">469-909-1423</div>
<div class="block-main-description">
<ul class="block-main-list">
<li><span class="number">1</span>Fill out quick form</li>
<li><span class="number">2</span>We measure the roof</li>
<li><span class="number">3</span>Estimate in your <b>inbox!</b></li>
</ul>
</div>}}
<div class="block-main-button" id="sticker">
<a href="#" class="button-primary button-gray">
<span class="no-sticky">CONTACT ME NOW</span>
<span class="yes-sticky">
<i class="ico-phone_icon"></i>
<span>CONTACT US</span>
</span>
</a>
<a href="https://docs.google.com/a/mypioneerroofing.com/forms/d/1nOxdvIBEHCVG6mtzmYOPI-1za5jWU3xJ5EUUiPtMVlM/viewform" class="button-primary">
<span class="no-sticky">GET A FAST ESTIMATE</span>
<span class="yes-sticky">
<i class="ico-fastestimate"></i>
<span>FAST ESTIMATE</span>
</span>
</a>
</div>
</div>
</div>
| {
"content_hash": "acc759f2a31e2a5dc68ac651f4031f4a",
"timestamp": "",
"source": "github",
"line_count": 43,
"max_line_length": 145,
"avg_line_length": 33.48837209302326,
"alnum_prop": 0.6333333333333333,
"repo_name": "sohailkhetani/pioneerroofing",
"id": "b0b4f68fa1882be27e10784b0d5294a76e27112b",
"size": "1440",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "markup/modules/block-fold/block-fold.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "89686"
},
{
"name": "HTML",
"bytes": "73395"
},
{
"name": "JavaScript",
"bytes": "160738"
}
],
"symlink_target": ""
} |
"""
Created on Sun Oct 10 14:57:50 2010
Author: josef-pktd, Skipper Seabold
License: BSD
TODO: check everywhere initialization of signal.lfilter
"""
import numpy as np
from scipy import signal, optimize
from scikits.statsmodels.base.model import (LikelihoodModel,
GenericLikelihoodModel)
#copied from sandbox/regression/mle.py
#rename until merge of classes is complete
class Arma(GenericLikelihoodModel): #switch to generic mle
"""
univariate Autoregressive Moving Average model, conditional on initial values
The ARMA model is estimated either with conditional Least Squares or with
conditional Maximum Likelihood. The implementation is
using scipy.filter.lfilter which makes it faster than the Kalman Filter
Implementation. The Kalman Filter Implementation however uses the exact
Maximum Likelihood and will be more accurate, statistically more efficent
in small samples.
In large samples conditional LS, conditional MLE and exact MLE should be very
close to each other, they are equivalent asymptotically.
Notes
-----
this can subclass TSMLEModel
TODO:
- CondLS return raw estimation results
- needs checking that there is no wrong state retained, when running fit
several times with different options
- still needs consistent order options.
- Currently assumes that the mean is zero, no mean or effect of exogenous
variables are included in the estimation.
"""
def __init__(self, endog, exog=None):
#need to override p,q (nar,nma) correctly
super(Arma, self).__init__(endog, exog)
#set default arma(1,1)
self.nar = 1
self.nma = 1
#self.initialize()
def initialize(self):
pass
def geterrors(self, params):
#copied from sandbox.tsa.arima.ARIMA
p, q = self.nar, self.nma
ar = np.concatenate(([1], -params[:p]))
ma = np.concatenate(([1], params[p:p+q]))
#lfilter_zi requires same length for ar and ma
maxlag = 1+max(p,q)
armax = np.zeros(maxlag)
armax[:p+1] = ar
mamax = np.zeros(maxlag)
mamax[:q+1] = ma
#remove zi again to match better with Skipper's version
#zi = signal.lfilter_zi(armax, mamax)
#errorsest = signal.lfilter(rhoy, rhoe, self.endog, zi=zi)[0] #zi is also returned
errorsest = signal.lfilter(ar, ma, self.endog)
return errorsest
def loglike(self, params):
"""
Loglikelihood for arma model
Notes
-----
The ancillary parameter is assumed to be the last element of
the params vector
"""
# #copied from sandbox.tsa.arima.ARIMA
# p = self.nar
# rhoy = np.concatenate(([1], params[:p]))
# rhoe = np.concatenate(([1], params[p:-1]))
# errorsest = signal.lfilter(rhoy, rhoe, self.endog)
errorsest = self.geterrors(params)
sigma2 = np.maximum(params[-1]**2, 1e-6)
axis = 0
nobs = len(errorsest)
#this doesn't help for exploding paths
#errorsest[np.isnan(errorsest)] = 100
# llike = -0.5 * (np.sum(np.log(sigma2),axis)
# + np.sum((errorsest**2)/sigma2, axis)
# + nobs*np.log(2*np.pi))
llike = -0.5 * (nobs*np.log(sigma2)
+ np.sum((errorsest**2)/sigma2, axis)
+ nobs*np.log(2*np.pi))
return llike
#add for Jacobian calculation bsejac in GenericMLE, copied from loglike
def nloglikeobs(self, params):
"""
Loglikelihood for arma model
Notes
-----
The ancillary parameter is assumed to be the last element of
the params vector
"""
# #copied from sandbox.tsa.arima.ARIMA
# p = self.nar
# rhoy = np.concatenate(([1], params[:p]))
# rhoe = np.concatenate(([1], params[p:-1]))
# errorsest = signal.lfilter(rhoy, rhoe, self.endog)
errorsest = self.geterrors(params)
sigma2 = np.maximum(params[-1]**2, 1e-6)
axis = 0
nobs = len(errorsest)
#this doesn't help for exploding paths
#errorsest[np.isnan(errorsest)] = 100
# llike = -0.5 * (np.sum(np.log(sigma2),axis)
# + np.sum((errorsest**2)/sigma2, axis)
# + nobs*np.log(2*np.pi))
llike = 0.5 * (np.log(sigma2)
+ (errorsest**2)/sigma2
+ np.log(2*np.pi))
return llike
#use generic instead
# def score(self, params):
# """
# Score vector for Arma model
# """
# #return None
# #print params
# jac = ndt.Jacobian(self.loglike, stepMax=1e-4)
# return jac(params)[-1]
#use generic instead
# def hessian(self, params):
# """
# Hessian of arma model. Currently uses numdifftools
# """
# #return None
# Hfun = ndt.Jacobian(self.score, stepMax=1e-4)
# return Hfun(params)[-1]
#copied from arima.ARIMA, needs splitting out of method specific code
def fit(self, order=(0,0), start_params=None, method="ls", **optkwds):
'''
Estimate lag coefficients of an ARIMA process.
Parameters
----------
order : sequence
p,d,q where p is the number of AR lags, d is the number of
differences to induce stationarity, and q is the number of
MA lags to estimate.
method : str {"ls", "ssm"}
Method of estimation. LS is conditional least squares.
SSM is state-space model and the Kalman filter is used to
maximize the exact likelihood.
rhoy0, rhoe0 : array_like (optional)
starting values for estimation
Returns
-------
(rh, cov_x, infodict, mesg, ier) : output of scipy.optimize.leastsq
rh :
estimate of lag parameters, concatenated [rhoy, rhoe]
cov_x :
unscaled (!) covariance matrix of coefficient estimates
'''
if not hasattr(order, '__iter__'):
raise ValueError("order must be an iterable sequence. Got type \
%s instead" % type(order))
p,q = order
self.nar = p # needed for geterrors, needs cleanup
self.nma = q
## if d > 0:
## raise ValueError("Differencing not implemented yet")
## # assume no constant, ie mu = 0
## # unless overwritten then use w_bar for mu
## Y = np.diff(endog, d, axis=0) #TODO: handle lags?
x = self.endog.squeeze() # remove the squeeze might be needed later
# def errfn( rho):
# #rhoy, rhoe = rho
# rhoy = np.concatenate(([1], rho[:p]))
# rhoe = np.concatenate(([1], rho[p:]))
# etahatr = signal.lfilter(rhoy, rhoe, x)
# #print rho,np.sum(etahatr*etahatr)
# return etahatr
#replace with start_params
if start_params is None:
arcoefs0 = 0.5 * np.ones(p)
macoefs0 = 0.5 * np.ones(q)
start_params = np.r_[arcoefs0, macoefs0]
method = method.lower()
if method == "ls":
#update
optim_kwds = dict(ftol=1e-10, full_output=True)
optim_kwds.update(optkwds)
#changes: use self.geterrors (nobs,):
# rh, cov_x, infodict, mesg, ier = \
# optimize.leastsq(errfn, np.r_[rhoy0, rhoe0],ftol=1e-10,full_output=True)
rh, cov_x, infodict, mesg, ier = \
optimize.leastsq(self.geterrors, start_params, **optim_kwds)
#TODO: need missing parameter estimates for LS, scale, residual-sdt
#TODO: integrate this into the MLE.fit framework?
elif method == "ssm":
pass
else: #this is also conditional least squares
# fmin_bfgs is slow or doesn't work yet
errfnsum = lambda rho : np.sum(self.geterrors(rho)**2)
#xopt, {fopt, gopt, Hopt, func_calls, grad_calls
optim_kwds = dict(maxiter=2, full_output=True)
optim_kwds.update(optkwds)
rh, fopt, gopt, cov_x, _,_, ier = \
optimize.fmin_bfgs(errfnsum, start_params, **optim_kwds)
infodict, mesg = None, None
self.params = rh
self.ar_est = np.concatenate(([1], -rh[:p]))
self.ma_est = np.concatenate(([1], rh[p:p+q]))
#rh[-q:])) doesnt work for q=0, added p+q as endpoint for safety if var is included
self.error_estimate = self.geterrors(rh)
return rh, cov_x, infodict, mesg, ier
#renamed and needs check with other fit
def fit_mle(self, order=(0,0), start_params=None, method='nm', maxiter=5000, tol=1e-08,
**kwds):
'''Estimate an ARMA model with given order using Conditional Maximum Likelihood
Parameters
----------
order : tuple, 2 elements
specifies the number of lags(nar, nma) to include, not including lag 0
start_params : array_like, 1d, (nar+nma+1,)
start parameters for the optimization, the length needs to be equal to the
number of ar plus ma coefficients plus 1 for the residual variance
method : str
optimization method, as described in LikelihoodModel
maxiter : int
maximum number of iteration in the optimization
tol : float
tolerance (?) for the optimization
Returns
-------
mlefit : instance of (GenericLikelihood ?)Result class
contains estimation results and additional statistics
'''
nar, nma = p, q = order
self.nar, self.nma = nar, nma
if start_params is None:
start_params = np.concatenate((0.05*np.ones(nar + nma), [1]))
mlefit = super(Arma, self).fit(start_params=start_params,
maxiter=maxiter, method=method, tol=tol, **kwds)
#bug fix: running ls and then mle didn't overwrite this
rh = mlefit.params
self.params = rh
self.ar_est = np.concatenate(([1], -rh[:p]))
self.ma_est = np.concatenate(([1], rh[p:p+q]))
self.error_estimate = self.geterrors(rh)
return mlefit
#copied from arima.ARIMA
def predicted(self, ar=None, ma=None):
'''past predicted values of time series
just added, not checked yet
'''
# #ar, ma not used, not useful as arguments for predicted pattern
# #need it for prediction for other time series, endog
# if ar is None:
# ar = self.ar_est
# if ma is None:
# ma = self.ma_est
return self.endog - self.error_estimate
#copied from arima.ARIMA
def forecast(self, ar=None, ma=None, nperiod=10):
'''nperiod ahead forecast at the end of the data period
forecast is based on the error estimates
'''
eta = np.r_[self.error_estimate, np.zeros(nperiod)]
if ar is None:
ar = self.ar_est
if ma is None:
ma = self.ma_est
return signal.lfilter(ma, ar, eta)
def forecast2(self, step_ahead=1, start=None, end=None, endog=None):
'''rolling h-period ahead forecast without reestimation, 1 period ahead only
in construction: uses loop to go over data and
not sure how to get (finite) forecast polynomial for h-step
Notes
-----
just the idea:
To improve performance with expanding arrays, specify total period by endog
and the conditional forecast period by step_ahead
This should be used by/with results which should contain predicted error or
noise. Could be either a recursive loop or lfilter with a h-step ahead
forecast filter, but then I need to calculate that one. ???
further extension: allow reestimation option
question: return h-step ahead or range(h)-step ahead ?
'''
if step_ahead != 1:
raise NotImplementedError
p,q = self.nar, self.nma
k = 0
errors = self.error_estimate
y = self.endog
#this is for 1step ahead only, still need h-step predictive polynomial
arcoefs_rev = self.params[k:k+p][::-1]
macoefs_rev = self.params[k+p:k+p+q][::-1]
predicted = []
# create error vector iteratively
for i in range(start, end):
predicted.append(sum(arcoefs_rev*y[i-p:i]) + sum(macoefs_rev * errors[i-p:i]))
return np.asarray(predicted)
def forecast3(self, step_ahead=1, start=None): #, end=None):
'''another try for h-step ahead forecasting
'''
from arima_process import arma2ma, ArmaProcess
p,q = self.nar, self.nma
k=0
ar = self.params[k:k+p]
ma = self.params[k+p:k+p+q]
marep = arma2ma(ar,ma, start)[step_ahead+1:] #truncated ma representation
errors = self.error_estimate
forecasts = np.convolve(errors, marep)
return forecasts#[-(errors.shape[0] - start-5):] #get 5 overlapping for testing
#copied from arima.ARIMA
#TODO: is this needed as a method at all?
#JP: not needed in this form, but can be replace with using the parameters
@classmethod
def generate_sample(cls, ar, ma, nsample, std=1):
eta = std * np.random.randn(nsample)
return signal.lfilter(ma, ar, eta)
| {
"content_hash": "e40412b5eddcaf5dbe3d84965818c06d",
"timestamp": "",
"source": "github",
"line_count": 376,
"max_line_length": 91,
"avg_line_length": 35.8936170212766,
"alnum_prop": 0.5872851215174867,
"repo_name": "wesm/statsmodels",
"id": "8372b89545956aa664927c5cabbdbe1f9f6d4019",
"size": "13496",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "scikits/statsmodels/tsa/arma_mle.py",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "Assembly",
"bytes": "10509"
},
{
"name": "C",
"bytes": "11707"
},
{
"name": "Python",
"bytes": "3470843"
},
{
"name": "R",
"bytes": "2168"
}
],
"symlink_target": ""
} |
using System;
using System.Web.Mvc;
using BaselineSolution.Framework.Infrastructure.Attributes;
namespace BaselineSolution.WebApp.Components.Models.SelectLists
{
public interface IOptionsBuilder<out TOption>
{
/// <summary>
/// Returns the select list with one or more options preselected where the option value is equal to the property value.
/// </summary>
/// <param name="optionValueFunction">The function that takes an <typeparamref name="TOption"/> and returns the value that should be used for the option tag</param>
/// <param name="optionTextFunction">The function that takes an <typeparamref name="TOption"/> and returns the text that should be used for the option tag</param>
/// <param name="optionHtmlAttributesFunction">The function that takes an <typeparamref name="TOption"/> and returns the html attributes that should be set on the option tag</param>
/// <returns>The select list with one or more options preselected where the option value is equal to the property value.</returns>
[NotNull]
MvcHtmlString Options([NotNull] Func<TOption, string> optionValueFunction,
[NotNull] Func<TOption, string> optionTextFunction,
[CanBeNull] Func<TOption, object> optionHtmlAttributesFunction);
/// <summary>
/// Returns the select list with one or more options preselected where the option value is equal to the property value.
/// </summary>
/// <param name="optionValueFunction">The function that takes an <typeparamref name="TOption"/> and returns the value that should be used for the option tag</param>
/// <param name="optionTextFunction">The function that takes an <typeparamref name="TOption"/> and returns the text that should be used for the option tag</param>
/// <returns>The select list with one or more options preselected where the option value is equal to the property value.</returns>
[NotNull]
MvcHtmlString Options([NotNull] Func<TOption, string> optionValueFunction,
[NotNull] Func<TOption, string> optionTextFunction);
/// <summary>
/// Returns the select list with one or more options preselected where the option value is equal to the property value.
/// </summary>
/// <param name="optionValueFunction">The function that takes an <typeparamref name="TOption"/> and returns the value that should be used for the option tag</param>
/// <param name="optionTextFunction">The function that takes an <typeparamref name="TOption"/> and returns the text that should be used for the option tag</param>
/// <param name="optionHtmlAttributesFunction">The function that takes an <typeparamref name="TOption"/> and returns the html attributes that should be set on the option tag</param>
/// <returns>The select list with one or more options preselected where the option value is equal to the property value.</returns>
[NotNull]
MvcHtmlString Options([NotNull] Func<TOption, int> optionValueFunction,
[NotNull] Func<TOption, string> optionTextFunction,
[CanBeNull] Func<TOption, object> optionHtmlAttributesFunction);
/// <summary>
/// Returns the select list with one or more options preselected where the option value is equal to the property value.
/// </summary>
/// <param name="optionValueFunction">The function that takes an <typeparamref name="TOption"/> and returns the value that should be used for the option tag</param>
/// <param name="optionTextFunction">The function that takes an <typeparamref name="TOption"/> and returns the text that should be used for the option tag</param>
/// <returns>The select list with one or more options preselected where the option value is equal to the property value.</returns>
[NotNull]
MvcHtmlString Options([NotNull] Func<TOption, int> optionValueFunction,
[NotNull] Func<TOption, string> optionTextFunction);
}
} | {
"content_hash": "7fc628b04779905c5f87eba4635bb95f",
"timestamp": "",
"source": "github",
"line_count": 53,
"max_line_length": 189,
"avg_line_length": 78.64150943396227,
"alnum_prop": 0.6880998080614203,
"repo_name": "Adconsulting/BaseSolution",
"id": "d76b87f6b5147d42783249642f45ef51e5a83c6c",
"size": "4170",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "BaselineSolution.WebApp.Components/Models/SelectLists/IOptionsBuilder.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ASP",
"bytes": "114"
},
{
"name": "C#",
"bytes": "645373"
},
{
"name": "CSS",
"bytes": "20422"
},
{
"name": "JavaScript",
"bytes": "259724"
}
],
"symlink_target": ""
} |
namespace MassTransit
{
using System;
using System.Collections.Generic;
using System.Linq;
using ConsumeConfigurators;
using Internals.Extensions;
using Microsoft.Practices.Unity;
using Saga;
using Saga.SubscriptionConfigurators;
using UnityIntegration;
public static class UnityExtensions
{
public static void LoadFrom(this IReceiveEndpointConfigurator configurator, IUnityContainer container)
{
IList<Type> concreteTypes = FindTypes<IConsumer>(container, x => !x.HasInterface<ISaga>());
if (concreteTypes.Count > 0)
{
foreach (Type concreteType in concreteTypes)
ConsumerConfiguratorCache.Configure(concreteType, configurator, container);
}
IList<Type> sagaTypes = FindTypes<ISaga>(container, x => true);
if (sagaTypes.Count > 0)
{
foreach (Type sagaType in sagaTypes)
SagaConfiguratorCache.Configure(sagaType, configurator, container);
}
}
public static void Consumer<T>(this IReceiveEndpointConfigurator configurator, IUnityContainer container,
Action<IConsumerConfigurator<T>> configure = null)
where T : class, IConsumer
{
var consumerFactory = new UnityConsumerFactory<T>(container);
configurator.Consumer(consumerFactory, configure);
}
public static void Saga<T>(this IReceiveEndpointConfigurator configurator, IUnityContainer container,
Action<ISagaConfigurator<T>> configure = null)
where T : class, ISaga
{
var sagaRepository = container.Resolve<ISagaRepository<T>>();
var unitySagaRepository = new UnitySagaRepository<T>(sagaRepository, container);
configurator.Saga(unitySagaRepository, configure);
}
static IList<Type> FindTypes<T>(IUnityContainer container, Func<Type, bool> filter)
{
return container.Registrations
.Where(r => r.MappedToType.HasInterface<T>())
.Select(r => r.MappedToType)
.Where(filter)
.ToList();
}
}
} | {
"content_hash": "01b32357621c7c56c629d8b90a7c5fbc",
"timestamp": "",
"source": "github",
"line_count": 62,
"max_line_length": 113,
"avg_line_length": 37.145161290322584,
"alnum_prop": 0.6087711680416847,
"repo_name": "D3-LucaPiombino/MassTransit",
"id": "f064c7bc385c549dc99e27849b5a060b811b3e94",
"size": "2954",
"binary": false,
"copies": "2",
"ref": "refs/heads/develop",
"path": "src/Containers/MassTransit.UnityIntegration/UnityExtensions.cs",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "1897"
},
{
"name": "C#",
"bytes": "4284861"
},
{
"name": "F#",
"bytes": "14240"
},
{
"name": "PowerShell",
"bytes": "3099"
}
],
"symlink_target": ""
} |
<?xml version="1.0" encoding="UTF-8"?>
<!-- config.xml reference: https://build.phonegap.com/docs/config-xml -->
<widget xmlns = "http://www.w3.org/ns/widgets"
xmlns:gap = "http://phonegap.com/ns/1.0"
id = "com.phonegap.testGPS"
versionCode = "10"
version = "1.0.0">
<name>Trek n Track</name>
<description>
Trek n Track
</description>
<author href="http://phonegap.com" email="[email protected]">
PhoneGap Team
</author>
<gap:platform name="ios"/>
<gap:platform name="android"/>
<gap:platform name="winphone"/>
<!--
If you do not want any permissions to be added to your app, add the
following tag to your config.xml; you will still have the INTERNET
permission on your app, which PhoneGap requires.
-->
<preference name="permissions" value="none"/>
<!-- Customize your app and platform with the preference element. -->
<preference name="phonegap-version" value="3.4.0" /> <!-- all: current version of PhoneGap -->
<preference name="orientation" value="default" /> <!-- all: default means both landscape and portrait are enabled -->
<preference name="target-device" value="universal" /> <!-- all: possible values handset, tablet, or universal -->
<preference name="fullscreen" value="true" /> <!-- all: hides the status bar at the top of the screen -->
<preference name="webviewbounce" value="true" /> <!-- ios: control whether the screen 'bounces' when scrolled beyond the top -->
<preference name="prerendered-icon" value="true" /> <!-- ios: if icon is prerendered, iOS will not apply it's gloss to the app's icon on the user's home screen -->
<preference name="stay-in-webview" value="false" /> <!-- ios: external links should open in the default browser, 'true' would use the webview the app lives in -->
<preference name="ios-statusbarstyle" value="black-opaque" /> <!-- ios: black-translucent will appear black because the PhoneGap webview doesn't go beneath the status bar -->
<preference name="detect-data-types" value="true" /> <!-- ios: controls whether data types (such as phone no. and dates) are automatically turned into links by the system -->
<preference name="exit-on-suspend" value="false" /> <!-- ios: if set to true, app will terminate when home button is pressed -->
<preference name="show-splash-screen-spinner" value="true" /> <!-- ios: if set to false, the spinner won't appear on the splash screen during app loading -->
<preference name="auto-hide-splash-screen" value="true" /> <!-- ios: if set to false, the splash screen must be hidden using a JavaScript API -->
<preference name="disable-cursor" value="false" /> <!-- blackberry: prevents a mouse-icon/cursor from being displayed on the app -->
<preference name="android-minSdkVersion" value="7" /> <!-- android: MIN SDK version supported on the target device. MAX version is blank by default. -->
<preference name="android-installLocation" value="auto" /> <!-- android: app install location. 'auto' will choose. 'internalOnly' is device memory. 'preferExternal' is SDCard. -->
<!-- Plugins -->
<!-- Core plugins -->
<gap:plugin name="org.apache.cordova.battery-status" />
<gap:plugin name="org.apache.cordova.camera" />
<gap:plugin name="org.apache.cordova.media-capture" />
<gap:plugin name="org.apache.cordova.console" />
<gap:plugin name="org.apache.cordova.contacts" />
<gap:plugin name="org.apache.cordova.device" />
<gap:plugin name="org.apache.cordova.device-motion" />
<gap:plugin name="org.apache.cordova.device-orientation" />
<gap:plugin name="org.apache.cordova.dialogs" />
<gap:plugin name="org.apache.cordova.file" />
<gap:plugin name="org.apache.cordova.file-transfer" />
<gap:plugin name="org.apache.cordova.geolocation" />
<gap:plugin name="org.apache.cordova.globalization" />
<gap:plugin name="org.apache.cordova.inappbrowser" />
<gap:plugin name="org.apache.cordova.media" />
<gap:plugin name="org.apache.cordova.network-information" />
<gap:plugin name="org.apache.cordova.splashscreen" />
<gap:plugin name="org.apache.cordova.vibration" />
<!-- Third party plugins -->
<!-- A list of available plugins are available at https://build.phonegap.com/plugins -->
<!--
<gap:plugin name="com.phonegap.plugins.barcodescanner" />
-->
<!-- Define app icon for each platform. This is a relative path to config.xml.
For e.g. if you place an icon.png inside res folder, you should modify the
src in the following setting to "res/icon.png" -->
<icon src="icon.png" />
<icon src="res/icon/android/icon-36-ldpi.png" gap:platform="android" gap:qualifier="ldpi" />
<icon src="res/icon/android/icon-48-mdpi.png" gap:platform="android" gap:qualifier="mdpi" />
<icon src="res/icon/android/icon-72-hdpi.png" gap:platform="android" gap:qualifier="hdpi" />
<icon src="res/icon/android/icon-96-xhdpi.png" gap:platform="android" gap:qualifier="xhdpi" />
<icon src="res/icon/blackberry/icon-80.png" gap:platform="blackberry" />
<icon src="res/icon/blackberry/icon-80.png" gap:platform="blackberry" gap:state="hover"/>
<icon src="res/icon/ios/icon-57.png" gap:platform="ios" width="57" height="57" />
<icon src="res/icon/ios/icon-72.png" gap:platform="ios" width="72" height="72" />
<icon src="res/icon/ios/icon-57-2x.png" gap:platform="ios" width="114" height="114" />
<icon src="res/icon/ios/icon-72-2x.png" gap:platform="ios" width="144" height="144" />
<icon src="res/icon/webos/icon-64.png" gap:platform="webos" />
<icon src="res/icon/windows-phone/icon-48.png" gap:platform="winphone" />
<icon src="res/icon/windows-phone/icon-173.png" gap:platform="winphone" gap:role="background" />
<!-- Define app splash screen for each platform. -->
<gap:splash src="res/screen/android/screen-ldpi-portrait.png" gap:platform="android" gap:qualifier="port-ldpi" />
<gap:splash src="res/screen/android/screen-mdpi-portrait.png" gap:platform="android" gap:qualifier="port-mdpi" />
<gap:splash src="res/screen/android/screen-hdpi-portrait.png" gap:platform="android" gap:qualifier="port-hdpi" />
<gap:splash src="res/screen/android/screen-xhdpi-portrait.png" gap:platform="android" gap:qualifier="port-xhdpi" />
<gap:splash src="res/screen/blackberry/screen-225.png" gap:platform="blackberry" />
<gap:splash src="res/screen/ios/screen-iphone-portrait.png" gap:platform="ios" width="320" height="480" />
<gap:splash src="res/screen/ios/screen-iphone-portrait-2x.png" gap:platform="ios" width="640" height="960" />
<gap:splash src="res/screen/ios/screen-iphone-portrait-568h-2x.png" gap:platform="ios" width="640" height="1136" />
<gap:splash src="res/screen/ios/screen-ipad-portrait.png" gap:platform="ios" width="768" height="1024" />
<gap:splash src="res/screen/ios/screen-ipad-landscape.png" gap:platform="ios" width="1024" height="768" />
<gap:splash src="res/screen/windows-phone/screen-portrait.jpg" gap:platform="winphone" />
<!--
Define access to external domains.
<access /> - a blank access tag denies access to all external resources.
<access origin="*" /> - a wildcard access tag allows access to all external resource.
Otherwise, you can specify specific domains:
-->
<access origin="*"/>
<!--
<access origin="http://phonegap.com" /> - allow any secure requests to http://phonegap.com/
<access origin="http://phonegap.com" subdomains="true" /> - same as above, but including subdomains, such as http://build.phonegap.com/
<access origin="http://phonegap.com" browserOnly="true" /> - only allows http://phonegap.com to be opened by the child browser.
-->
</widget> | {
"content_hash": "e42d2e6cdf80d0e4624d2cfaac59c3e4",
"timestamp": "",
"source": "github",
"line_count": 119,
"max_line_length": 197,
"avg_line_length": 70.33613445378151,
"alnum_prop": 0.6350059737156512,
"repo_name": "xyz2130/testGPSphonegapbuild",
"id": "c52688f7331652ce8b6ccc459cf6c03cd372aaf5",
"size": "8370",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "www/config.xml",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "1026993"
},
{
"name": "JavaScript",
"bytes": "677388"
}
],
"symlink_target": ""
} |
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_display_message"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.example.lando.beerbingo.DisplayMessageActivity">
</RelativeLayout>
| {
"content_hash": "1e8d089c4e4c5b0480fe8400c0cccc88",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 74,
"avg_line_length": 47.84615384615385,
"alnum_prop": 0.7556270096463023,
"repo_name": "Baersligan/BeerBingo",
"id": "fb1bdcd41ab1710bb48e460f16a18e4fb6e82d22",
"size": "622",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "BeerBingo/app/src/main/res/layout/activity_display_message.xml",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "20636"
}
],
"symlink_target": ""
} |
* [Vue.js](https://vuejs.org/) 3
* [Laravel](http://laravel.com/docs/) 5+
* [Bootstrap](http://getbootstrap.com/) 4/5
* [Tailwind CSS](https://tailwindcss.com/) 3
## Install
Install with yarn or npm:
:::: code-group
::: code-group-item YARN
```bash:no-line-numbers
yarn add laravel-vue-pagination
```
:::
::: code-group-item NPM
```bash:no-line-numbers
npm install laravel-vue-pagination
```
:::
::::
Then, import and register the pagination component required for your project:
```js
import { Bootstrap4Pagination } from 'laravel-vue-pagination';
import { Bootstrap5Pagination } from 'laravel-vue-pagination';
import { TailwindPagination } from 'laravel-vue-pagination';
```
| {
"content_hash": "b5bb7bf004bd435da5d1f9c392363d4c",
"timestamp": "",
"source": "github",
"line_count": 29,
"max_line_length": 77,
"avg_line_length": 23.482758620689655,
"alnum_prop": 0.7063142437591777,
"repo_name": "gilbitron/laravel-vue-pagination",
"id": "631701f7103c0f5e01623569a04ca4a78789c545",
"size": "714",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "docs/guide/install.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "58"
},
{
"name": "HTML",
"bytes": "340"
},
{
"name": "JavaScript",
"bytes": "20203"
},
{
"name": "Vue",
"bytes": "20517"
}
],
"symlink_target": ""
} |
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.slime;
/**
* Helper interface for inserting values into any of the container
* classes (ArrayValue, ObjectValue, or Slime). May be useful for
* deserializers where you can use it to decouple the actual value
* decoding from the container where the value should be inserted.
*/
public interface Inserter {
Cursor insertNIX();
Cursor insertBOOL(boolean value);
Cursor insertLONG(long value);
Cursor insertDOUBLE(double value);
Cursor insertSTRING(String value);
Cursor insertSTRING(byte[] utf8);
Cursor insertDATA(byte[] value);
Cursor insertARRAY();
Cursor insertOBJECT();
}
| {
"content_hash": "ca7739713ffe7b84ec126dc4150b30d3",
"timestamp": "",
"source": "github",
"line_count": 22,
"max_line_length": 104,
"avg_line_length": 33.72727272727273,
"alnum_prop": 0.7345013477088949,
"repo_name": "vespa-engine/vespa",
"id": "c36b56c11e251ff97e5c45390bc60e49af534601",
"size": "742",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "vespajlib/src/main/java/com/yahoo/slime/Inserter.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ANTLR",
"bytes": "8130"
},
{
"name": "C",
"bytes": "60315"
},
{
"name": "C++",
"bytes": "29580035"
},
{
"name": "CMake",
"bytes": "593981"
},
{
"name": "Emacs Lisp",
"bytes": "91"
},
{
"name": "GAP",
"bytes": "3312"
},
{
"name": "Go",
"bytes": "560664"
},
{
"name": "HTML",
"bytes": "54520"
},
{
"name": "Java",
"bytes": "40814190"
},
{
"name": "JavaScript",
"bytes": "73436"
},
{
"name": "LLVM",
"bytes": "6152"
},
{
"name": "Lex",
"bytes": "11499"
},
{
"name": "Makefile",
"bytes": "5553"
},
{
"name": "Objective-C",
"bytes": "12369"
},
{
"name": "Perl",
"bytes": "23134"
},
{
"name": "Python",
"bytes": "52392"
},
{
"name": "Roff",
"bytes": "17506"
},
{
"name": "Ruby",
"bytes": "10690"
},
{
"name": "Shell",
"bytes": "268737"
},
{
"name": "Yacc",
"bytes": "14735"
}
],
"symlink_target": ""
} |
// Copyright 2021 The Pigweed Authors
//
// 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.
#include <algorithm>
#include <cctype>
#include <functional>
#include <iostream>
#include <string>
#include <string_view>
#include <unordered_map>
#include <vector>
#include "pw_log/log.h"
#include "pw_span/span.h"
namespace {
// String used to prompt for user input in the CLI loop.
constexpr char kPrompt[] = ">";
// Convert the provided string to a lowercase equivalent.
std::string ToLower(std::string_view view) {
std::string str{view};
std::transform(str.begin(), str.end(), str.begin(), [](char c) {
return std::tolower(c);
});
return str;
}
// Scan an input line for tokens, returning a vector containing each token.
// Tokens are either whitespace delimited strings or a quoted string which may
// contain spaces and is terminated by another quote. When delimiting by
// whitespace any consecutive sequence of whitespace is treated as a single
// delimiter.
//
// For example, the tokenization of the following line:
//
// The duck said "quack, quack" before eating its bread
//
// Would result in the following tokens:
//
// ["The", "duck", "said", "quack, quack", "before", "eating", "its", "bread"]
//
std::vector<std::string_view> TokenizeLine(std::string_view line) {
size_t token_start = 0;
size_t index = 0;
bool in_quote = false;
std::vector<std::string_view> tokens;
while (index < line.size()) {
// Trim leading/trailing whitespace for each token.
while (index < line.size() && std::isspace(line[index])) {
++index;
}
if (index >= line.size()) {
// Have reached the end and no further tokens remain.
break;
}
token_start = index++;
if (line[token_start] == '"') {
in_quote = true;
// Don't include the quote character.
++token_start;
}
// In a token, scan for the end of the token.
while (index < line.size()) {
if ((in_quote && line[index] == '"') ||
(!in_quote && std::isspace(line[index]))) {
break;
}
++index;
}
if (index >= line.size() && in_quote) {
PW_LOG_WARN("Assuming closing quote at EOL.");
}
tokens.push_back(line.substr(token_start, index - token_start));
in_quote = false;
++index;
}
return tokens;
}
// Context supplied to (and mutable by) each command.
struct CommandContext {
// When set to `true`, the CLI will exit once the active command returns.
bool quit = false;
};
// Commands are given mutable CommandContext and a span tokens in the line of
// the command.
using Command =
std::function<bool(CommandContext*, pw::span<std::string_view>)>;
// Echoes all arguments provided to cout.
bool CommandEcho(CommandContext* /*context*/,
pw::span<std::string_view> tokens) {
bool first = true;
for (const auto& token : tokens.subspan(1)) {
if (!first) {
std::cout << ' ';
}
std::cout << token;
first = false;
}
std::cout << std::endl;
return true;
}
// Quit the CLI.
bool CommandQuit(CommandContext* context,
pw::span<std::string_view> /*tokens*/) {
context->quit = true;
return true;
}
} // namespace
int main(int /*argc*/, char* /*argv*/[]) {
CommandContext context;
std::unordered_map<std::string, Command> commands{
{"echo", CommandEcho},
{"exit", CommandQuit},
{"quit", CommandQuit},
};
// Enter CLI loop.
while (true) {
// Prompt for input.
std::string line;
std::cout << kPrompt << ' ' << std::flush;
std::getline(std::cin, line);
// Tokenize provided line.
auto tokens = TokenizeLine(line);
if (tokens.empty()) {
continue;
}
// Search for provided command.
auto it = commands.find(ToLower(tokens[0]));
if (it == commands.end()) {
PW_LOG_ERROR("Unrecognized command \"%.*s\".",
static_cast<int>(tokens[0].size()),
tokens[0].data());
continue;
}
// Invoke the command.
Command command = it->second;
command(&context, tokens);
if (context.quit) {
break;
}
}
return EXIT_SUCCESS;
}
| {
"content_hash": "3cb9b9ef90c53db281f233e0df93f4a6",
"timestamp": "",
"source": "github",
"line_count": 176,
"max_line_length": 80,
"avg_line_length": 26.482954545454547,
"alnum_prop": 0.6277622827719374,
"repo_name": "google/pigweed",
"id": "181f85989e89836764ec67d8d70e63c60bcac92c",
"size": "4661",
"binary": false,
"copies": "1",
"ref": "refs/heads/main",
"path": "pw_tool/main.cc",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "8654"
},
{
"name": "C",
"bytes": "487991"
},
{
"name": "C++",
"bytes": "6119052"
},
{
"name": "CMake",
"bytes": "288698"
},
{
"name": "CSS",
"bytes": "4820"
},
{
"name": "Go",
"bytes": "18932"
},
{
"name": "HTML",
"bytes": "1194"
},
{
"name": "Java",
"bytes": "327548"
},
{
"name": "JavaScript",
"bytes": "12482"
},
{
"name": "Jinja",
"bytes": "2467"
},
{
"name": "Python",
"bytes": "3578966"
},
{
"name": "Rust",
"bytes": "645"
},
{
"name": "SCSS",
"bytes": "1382"
},
{
"name": "Shell",
"bytes": "22974"
},
{
"name": "Smarty",
"bytes": "692"
},
{
"name": "Starlark",
"bytes": "489444"
},
{
"name": "TypeScript",
"bytes": "235169"
}
],
"symlink_target": ""
} |
<ons-page>
<ons-toolbar>
<div class="center">Simple Navigation</div>
</ons-toolbar>
<ons-list ng-controller="MasterController">
<ons-list-item modifier="chevron" class="item" ng-repeat="item in items" ui-sref="navigator.master.detail({index: $index})">
<ons-row>
<ons-col width="60px">
<div class="item-thum"></div>
</ons-col>
<ons-col>
<header>
<span class="item-title">{{item.title}}</span>
<span class="item-label">{{item.label}}</span>
</header>
<p class="item-desc">{{item.desc}}</p>
</ons-col>
</ons-row>
</ons-list-item>
</ons-list>
</ons-page> | {
"content_hash": "81a4ecbce23ee9ca506464e3717487a0",
"timestamp": "",
"source": "github",
"line_count": 21,
"max_line_length": 127,
"avg_line_length": 28.761904761904763,
"alnum_prop": 0.6158940397350994,
"repo_name": "frankdiox/OnsenUI-router",
"id": "b09f327f17721ecfc607d040e6b81fc89cc81979",
"size": "604",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "html/master.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "1551"
},
{
"name": "HTML",
"bytes": "6950"
},
{
"name": "JavaScript",
"bytes": "3278"
}
],
"symlink_target": ""
} |
import json
import requests
import responses
from nose.tools import (
assert_equal,
assert_is_instance,
assert_is_none,
assert_is_not_none,
assert_not_equal,
assert_raises
)
from gocardless_pro.errors import MalformedResponseError
from gocardless_pro import resources
from gocardless_pro import list_response
from .. import helpers
@responses.activate
def test_payouts_list():
fixture = helpers.load_fixture('payouts')['list']
helpers.stub_response(fixture)
response = helpers.client.payouts.list(*fixture['url_params'])
body = fixture['body']['payouts']
assert_is_instance(response, list_response.ListResponse)
assert_is_instance(response.records[0], resources.Payout)
assert_equal(response.before, fixture['body']['meta']['cursors']['before'])
assert_equal(response.after, fixture['body']['meta']['cursors']['after'])
assert_is_none(responses.calls[-1].request.headers.get('Idempotency-Key'))
assert_equal([r.amount for r in response.records],
[b.get('amount') for b in body])
assert_equal([r.arrival_date for r in response.records],
[b.get('arrival_date') for b in body])
assert_equal([r.created_at for r in response.records],
[b.get('created_at') for b in body])
assert_equal([r.currency for r in response.records],
[b.get('currency') for b in body])
assert_equal([r.deducted_fees for r in response.records],
[b.get('deducted_fees') for b in body])
assert_equal([r.id for r in response.records],
[b.get('id') for b in body])
assert_equal([r.metadata for r in response.records],
[b.get('metadata') for b in body])
assert_equal([r.payout_type for r in response.records],
[b.get('payout_type') for b in body])
assert_equal([r.reference for r in response.records],
[b.get('reference') for b in body])
assert_equal([r.status for r in response.records],
[b.get('status') for b in body])
assert_equal([r.tax_currency for r in response.records],
[b.get('tax_currency') for b in body])
@responses.activate
def test_timeout_payouts_list_retries():
fixture = helpers.load_fixture('payouts')['list']
with helpers.stub_timeout_then_response(fixture) as rsps:
response = helpers.client.payouts.list(*fixture['url_params'])
assert_equal(2, len(rsps.calls))
assert_equal(rsps.calls[0].request.headers.get('Idempotency-Key'),
rsps.calls[1].request.headers.get('Idempotency-Key'))
body = fixture['body']['payouts']
assert_is_instance(response, list_response.ListResponse)
assert_is_instance(response.records[0], resources.Payout)
assert_equal(response.before, fixture['body']['meta']['cursors']['before'])
assert_equal(response.after, fixture['body']['meta']['cursors']['after'])
def test_502_payouts_list_retries():
fixture = helpers.load_fixture('payouts')['list']
with helpers.stub_502_then_response(fixture) as rsps:
response = helpers.client.payouts.list(*fixture['url_params'])
assert_equal(2, len(rsps.calls))
assert_equal(rsps.calls[0].request.headers.get('Idempotency-Key'),
rsps.calls[1].request.headers.get('Idempotency-Key'))
body = fixture['body']['payouts']
assert_is_instance(response, list_response.ListResponse)
assert_is_instance(response.records[0], resources.Payout)
assert_equal(response.before, fixture['body']['meta']['cursors']['before'])
assert_equal(response.after, fixture['body']['meta']['cursors']['after'])
@responses.activate
def test_payouts_all():
fixture = helpers.load_fixture('payouts')['list']
def callback(request):
if 'after=123' in request.url:
fixture['body']['meta']['cursors']['after'] = None
else:
fixture['body']['meta']['cursors']['after'] = '123'
return [200, {}, json.dumps(fixture['body'])]
url = 'http://example.com' + fixture['path_template']
responses.add_callback(fixture['method'], url, callback)
all_records = list(helpers.client.payouts.all())
assert_equal(len(all_records), len(fixture['body']['payouts']) * 2)
for record in all_records:
assert_is_instance(record, resources.Payout)
@responses.activate
def test_payouts_get():
fixture = helpers.load_fixture('payouts')['get']
helpers.stub_response(fixture)
response = helpers.client.payouts.get(*fixture['url_params'])
body = fixture['body']['payouts']
assert_is_instance(response, resources.Payout)
assert_is_none(responses.calls[-1].request.headers.get('Idempotency-Key'))
assert_equal(response.amount, body.get('amount'))
assert_equal(response.arrival_date, body.get('arrival_date'))
assert_equal(response.created_at, body.get('created_at'))
assert_equal(response.currency, body.get('currency'))
assert_equal(response.deducted_fees, body.get('deducted_fees'))
assert_equal(response.id, body.get('id'))
assert_equal(response.metadata, body.get('metadata'))
assert_equal(response.payout_type, body.get('payout_type'))
assert_equal(response.reference, body.get('reference'))
assert_equal(response.status, body.get('status'))
assert_equal(response.tax_currency, body.get('tax_currency'))
assert_equal(response.fx.estimated_exchange_rate,
body.get('fx')['estimated_exchange_rate'])
assert_equal(response.fx.exchange_rate,
body.get('fx')['exchange_rate'])
assert_equal(response.fx.fx_amount,
body.get('fx')['fx_amount'])
assert_equal(response.fx.fx_currency,
body.get('fx')['fx_currency'])
assert_equal(response.links.creditor,
body.get('links')['creditor'])
assert_equal(response.links.creditor_bank_account,
body.get('links')['creditor_bank_account'])
@responses.activate
def test_timeout_payouts_get_retries():
fixture = helpers.load_fixture('payouts')['get']
with helpers.stub_timeout_then_response(fixture) as rsps:
response = helpers.client.payouts.get(*fixture['url_params'])
assert_equal(2, len(rsps.calls))
assert_equal(rsps.calls[0].request.headers.get('Idempotency-Key'),
rsps.calls[1].request.headers.get('Idempotency-Key'))
body = fixture['body']['payouts']
assert_is_instance(response, resources.Payout)
def test_502_payouts_get_retries():
fixture = helpers.load_fixture('payouts')['get']
with helpers.stub_502_then_response(fixture) as rsps:
response = helpers.client.payouts.get(*fixture['url_params'])
assert_equal(2, len(rsps.calls))
assert_equal(rsps.calls[0].request.headers.get('Idempotency-Key'),
rsps.calls[1].request.headers.get('Idempotency-Key'))
body = fixture['body']['payouts']
assert_is_instance(response, resources.Payout)
@responses.activate
def test_payouts_update():
fixture = helpers.load_fixture('payouts')['update']
helpers.stub_response(fixture)
response = helpers.client.payouts.update(*fixture['url_params'])
body = fixture['body']['payouts']
assert_is_instance(response, resources.Payout)
assert_is_none(responses.calls[-1].request.headers.get('Idempotency-Key'))
assert_equal(response.amount, body.get('amount'))
assert_equal(response.arrival_date, body.get('arrival_date'))
assert_equal(response.created_at, body.get('created_at'))
assert_equal(response.currency, body.get('currency'))
assert_equal(response.deducted_fees, body.get('deducted_fees'))
assert_equal(response.id, body.get('id'))
assert_equal(response.metadata, body.get('metadata'))
assert_equal(response.payout_type, body.get('payout_type'))
assert_equal(response.reference, body.get('reference'))
assert_equal(response.status, body.get('status'))
assert_equal(response.tax_currency, body.get('tax_currency'))
assert_equal(response.fx.estimated_exchange_rate,
body.get('fx')['estimated_exchange_rate'])
assert_equal(response.fx.exchange_rate,
body.get('fx')['exchange_rate'])
assert_equal(response.fx.fx_amount,
body.get('fx')['fx_amount'])
assert_equal(response.fx.fx_currency,
body.get('fx')['fx_currency'])
assert_equal(response.links.creditor,
body.get('links')['creditor'])
assert_equal(response.links.creditor_bank_account,
body.get('links')['creditor_bank_account'])
@responses.activate
def test_timeout_payouts_update_retries():
fixture = helpers.load_fixture('payouts')['update']
with helpers.stub_timeout_then_response(fixture) as rsps:
response = helpers.client.payouts.update(*fixture['url_params'])
assert_equal(2, len(rsps.calls))
assert_equal(rsps.calls[0].request.headers.get('Idempotency-Key'),
rsps.calls[1].request.headers.get('Idempotency-Key'))
body = fixture['body']['payouts']
assert_is_instance(response, resources.Payout)
def test_502_payouts_update_retries():
fixture = helpers.load_fixture('payouts')['update']
with helpers.stub_502_then_response(fixture) as rsps:
response = helpers.client.payouts.update(*fixture['url_params'])
assert_equal(2, len(rsps.calls))
assert_equal(rsps.calls[0].request.headers.get('Idempotency-Key'),
rsps.calls[1].request.headers.get('Idempotency-Key'))
body = fixture['body']['payouts']
assert_is_instance(response, resources.Payout)
| {
"content_hash": "25141e2453edf415d54c4c81dc4222ed",
"timestamp": "",
"source": "github",
"line_count": 221,
"max_line_length": 79,
"avg_line_length": 43.53393665158371,
"alnum_prop": 0.6640681841804387,
"repo_name": "gocardless/gocardless-pro-python",
"id": "4d8bb0eaacc4ab0830514dcd35c112dca1a19e7c",
"size": "9732",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "tests/integration/payouts_integration_test.py",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Makefile",
"bytes": "76"
},
{
"name": "Python",
"bytes": "566303"
}
],
"symlink_target": ""
} |
CM_WebSocketTransport::CM_WebSocketTransport()
{
}
| {
"content_hash": "fe67d275095d1495f31f9eb435a2af73",
"timestamp": "",
"source": "github",
"line_count": 4,
"max_line_length": 46,
"avg_line_length": 13,
"alnum_prop": 0.7692307692307693,
"repo_name": "operepo/ope",
"id": "4bf8b05d03e8c8de2f4fffdffb30d6aaf2eee699",
"size": "88",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "client_tools/lms/src/OPE_LMS/cm/cm_websockettransport.cpp",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "AL",
"bytes": "40379"
},
{
"name": "Awk",
"bytes": "22377"
},
{
"name": "Batchfile",
"bytes": "81725"
},
{
"name": "C",
"bytes": "655"
},
{
"name": "C++",
"bytes": "200907"
},
{
"name": "CMake",
"bytes": "8149"
},
{
"name": "CSS",
"bytes": "103747"
},
{
"name": "Dockerfile",
"bytes": "47152"
},
{
"name": "Emacs Lisp",
"bytes": "90665"
},
{
"name": "HTML",
"bytes": "37373861"
},
{
"name": "Java",
"bytes": "916104"
},
{
"name": "JavaScript",
"bytes": "9115492"
},
{
"name": "Makefile",
"bytes": "7428"
},
{
"name": "NewLisp",
"bytes": "111955"
},
{
"name": "PHP",
"bytes": "5053"
},
{
"name": "Perl",
"bytes": "45839826"
},
{
"name": "PostScript",
"bytes": "192210"
},
{
"name": "PowerShell",
"bytes": "2870"
},
{
"name": "Procfile",
"bytes": "114"
},
{
"name": "Prolog",
"bytes": "248055"
},
{
"name": "Python",
"bytes": "9037346"
},
{
"name": "QML",
"bytes": "125647"
},
{
"name": "QMake",
"bytes": "7566"
},
{
"name": "Raku",
"bytes": "7174577"
},
{
"name": "Roff",
"bytes": "25148"
},
{
"name": "Ruby",
"bytes": "162111"
},
{
"name": "Shell",
"bytes": "2574077"
},
{
"name": "Smalltalk",
"bytes": "77031"
},
{
"name": "SystemVerilog",
"bytes": "83394"
},
{
"name": "Tcl",
"bytes": "7061959"
},
{
"name": "Vim script",
"bytes": "27705984"
},
{
"name": "kvlang",
"bytes": "60630"
}
],
"symlink_target": ""
} |
// Copyright 2015 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import {ChromeEvent} from '/tools/typescript/definitions/chrome_event.js';
import {assert} from 'chrome://resources/js/assert_ts.js';
import {ActivityLogDelegate} from './activity_log/activity_log_history.js';
import {ActivityLogEventDelegate} from './activity_log/activity_log_stream.js';
import {ErrorPageDelegate} from './error_page.js';
import {ItemDelegate} from './item.js';
import {KeyboardShortcutDelegate} from './keyboard_shortcut_delegate.js';
import {LoadErrorDelegate} from './load_error.js';
import {Dialog, navigation, Page} from './navigation_helper.js';
import {PackDialogDelegate} from './pack_dialog.js';
import {SiteSettingsDelegate} from './site_settings_mixin.js';
import {ToolbarDelegate} from './toolbar.js';
export interface ServiceInterface extends ActivityLogDelegate,
ActivityLogEventDelegate,
ErrorPageDelegate, ItemDelegate,
KeyboardShortcutDelegate,
LoadErrorDelegate, PackDialogDelegate,
SiteSettingsDelegate,
ToolbarDelegate {
notifyDragInstallInProgress(): void;
loadUnpackedFromDrag(): Promise<boolean>;
installDroppedFile(): void;
getProfileStateChangedTarget():
ChromeEvent<(info: chrome.developerPrivate.ProfileInfo) => void>;
getProfileConfiguration(): Promise<chrome.developerPrivate.ProfileInfo>;
getExtensionsInfo(): Promise<chrome.developerPrivate.ExtensionInfo[]>;
getExtensionSize(id: string): Promise<string>;
}
export class Service implements ServiceInterface {
private isDeleting_: boolean = false;
private eventsToIgnoreOnce_: Set<string> = new Set();
getProfileConfiguration() {
return new Promise<chrome.developerPrivate.ProfileInfo>(function(resolve) {
chrome.developerPrivate.getProfileConfiguration(resolve);
});
}
getItemStateChangedTarget() {
return chrome.developerPrivate.onItemStateChanged;
}
shouldIgnoreUpdate(
extensionId: string,
eventType: chrome.developerPrivate.EventType): boolean {
return this.eventsToIgnoreOnce_.delete(`${extensionId}_${eventType}`);
}
ignoreNextEvent(
extensionId: string, eventType: chrome.developerPrivate.EventType): void {
this.eventsToIgnoreOnce_.add(`${extensionId}_${eventType}`);
}
getProfileStateChangedTarget() {
return chrome.developerPrivate.onProfileStateChanged;
}
getExtensionsInfo() {
return new Promise<chrome.developerPrivate.ExtensionInfo[]>(function(
resolve) {
chrome.developerPrivate.getExtensionsInfo(
{includeDisabled: true, includeTerminated: true}, resolve);
});
}
getExtensionSize(id: string) {
return new Promise<string>(function(resolve) {
chrome.developerPrivate.getExtensionSize(id, resolve);
});
}
addRuntimeHostPermission(id: string, host: string): Promise<void> {
return new Promise((resolve, reject) => {
chrome.developerPrivate.addHostPermission(id, host, () => {
if (chrome.runtime.lastError) {
reject(chrome.runtime.lastError.message);
return;
}
resolve();
});
});
}
removeRuntimeHostPermission(id: string, host: string): Promise<void> {
return new Promise((resolve, reject) => {
chrome.developerPrivate.removeHostPermission(id, host, () => {
if (chrome.runtime.lastError) {
reject(chrome.runtime.lastError.message);
return;
}
resolve();
});
});
}
recordUserAction(metricName: string): void {
chrome.metricsPrivate.recordUserAction(metricName);
}
/**
* Opens a file browser dialog for the user to select a file (or directory).
* @return The promise to be resolved with the selected path.
*/
private chooseFilePath_(
selectType: chrome.developerPrivate.SelectType,
fileType: chrome.developerPrivate.FileType): Promise<string> {
return new Promise(function(resolve, reject) {
chrome.developerPrivate.choosePath(selectType, fileType, function(path) {
if (chrome.runtime.lastError &&
chrome.runtime.lastError.message !==
'File selection was canceled.') {
reject(chrome.runtime.lastError);
} else {
resolve(path || '');
}
});
});
}
updateExtensionCommandKeybinding(
extensionId: string, commandName: string, keybinding: string) {
chrome.developerPrivate.updateExtensionCommand({
extensionId: extensionId,
commandName: commandName,
keybinding: keybinding,
});
}
updateExtensionCommandScope(
extensionId: string, commandName: string,
scope: chrome.developerPrivate.CommandScope): void {
// The COMMAND_REMOVED event needs to be ignored since it is sent before
// the command is added back with the updated scope but can be handled
// after the COMMAND_ADDED event.
this.ignoreNextEvent(
extensionId, chrome.developerPrivate.EventType.COMMAND_REMOVED);
chrome.developerPrivate.updateExtensionCommand({
extensionId: extensionId,
commandName: commandName,
scope: scope,
});
}
setShortcutHandlingSuspended(isCapturing: boolean) {
chrome.developerPrivate.setShortcutHandlingSuspended(isCapturing);
}
/**
* @return A signal that loading finished, rejected if any error occurred.
*/
private loadUnpackedHelper_(extraOptions?:
chrome.developerPrivate.LoadUnpackedOptions):
Promise<boolean> {
return new Promise(function(resolve, reject) {
const options = Object.assign(
{
failQuietly: true,
populateError: true,
},
extraOptions);
chrome.developerPrivate.loadUnpacked(options, (loadError) => {
if (chrome.runtime.lastError &&
chrome.runtime.lastError.message !==
'File selection was canceled.') {
throw new Error(chrome.runtime.lastError.message);
}
if (loadError) {
return reject(loadError);
}
// The load was successful if there's no lastError indicated (and
// no loadError, which is checked above).
const loadSuccessful = typeof chrome.runtime.lastError === 'undefined';
resolve(loadSuccessful);
});
});
}
deleteItem(id: string) {
if (this.isDeleting_) {
return;
}
chrome.metricsPrivate.recordUserAction('Extensions.RemoveExtensionClick');
this.isDeleting_ = true;
chrome.management.uninstall(id, {showConfirmDialog: true}, () => {
// The "last error" was almost certainly the user canceling the dialog.
// Do nothing. We only check it so we don't get noisy logs.
/** @suppress {suspiciousCode} */
chrome.runtime.lastError;
this.isDeleting_ = false;
});
}
setItemEnabled(id: string, isEnabled: boolean) {
chrome.metricsPrivate.recordUserAction(
isEnabled ? 'Extensions.ExtensionEnabled' :
'Extensions.ExtensionDisabled');
chrome.management.setEnabled(id, isEnabled);
}
setItemAllowedIncognito(id: string, isAllowedIncognito: boolean) {
chrome.developerPrivate.updateExtensionConfiguration({
extensionId: id,
incognitoAccess: isAllowedIncognito,
});
}
setItemAllowedOnFileUrls(id: string, isAllowedOnFileUrls: boolean) {
chrome.developerPrivate.updateExtensionConfiguration({
extensionId: id,
fileAccess: isAllowedOnFileUrls,
});
}
setItemHostAccess(id: string, hostAccess: chrome.developerPrivate.HostAccess):
void {
chrome.developerPrivate.updateExtensionConfiguration({
extensionId: id,
hostAccess: hostAccess,
});
}
setItemCollectsErrors(id: string, collectsErrors: boolean): void {
chrome.developerPrivate.updateExtensionConfiguration({
extensionId: id,
errorCollection: collectsErrors,
});
}
inspectItemView(id: string, view: chrome.developerPrivate.ExtensionView):
void {
chrome.developerPrivate.openDevTools({
extensionId: id,
renderProcessId: view.renderProcessId,
renderViewId: view.renderViewId,
incognito: view.incognito,
isServiceWorker: view.type === 'EXTENSION_SERVICE_WORKER_BACKGROUND',
});
}
openUrl(url: string): void {
window.open(url);
}
reloadItem(id: string): Promise<void> {
return new Promise(function(resolve, reject) {
chrome.developerPrivate.reload(
id, {failQuietly: true, populateErrorForUnpacked: true},
(loadError) => {
if (loadError) {
reject(loadError);
return;
}
resolve();
});
});
}
repairItem(id: string): void {
chrome.developerPrivate.repairExtension(id);
}
showItemOptionsPage(extension: chrome.developerPrivate.ExtensionInfo): void {
assert(extension && extension.optionsPage);
if (extension.optionsPage!.openInTab) {
chrome.developerPrivate.showOptions(extension.id);
} else {
navigation.navigateTo({
page: Page.DETAILS,
subpage: Dialog.OPTIONS,
extensionId: extension.id,
});
}
}
setProfileInDevMode(inDevMode: boolean) {
chrome.developerPrivate.updateProfileConfiguration(
{inDeveloperMode: inDevMode});
}
loadUnpacked(): Promise<boolean> {
return this.loadUnpackedHelper_();
}
retryLoadUnpacked(retryGuid: string): Promise<boolean> {
// Attempt to load an unpacked extension, optionally as another attempt at
// a previously-specified load.
return this.loadUnpackedHelper_({retryGuid: retryGuid});
}
choosePackRootDirectory(): Promise<string> {
return this.chooseFilePath_(
chrome.developerPrivate.SelectType.FOLDER,
chrome.developerPrivate.FileType.LOAD);
}
choosePrivateKeyPath(): Promise<string> {
return this.chooseFilePath_(
chrome.developerPrivate.SelectType.FILE,
chrome.developerPrivate.FileType.PEM);
}
packExtension(
rootPath: string, keyPath: string, flag?: number,
callback?:
(response: chrome.developerPrivate.PackDirectoryResponse) => void):
void {
chrome.developerPrivate.packDirectory(rootPath, keyPath, flag, callback);
}
updateAllExtensions(extensions: chrome.developerPrivate.ExtensionInfo[]) {
/**
* Attempt to reload local extensions. If an extension fails to load, the
* user is prompted to try updating the broken extension using loadUnpacked
* and we skip reloading the remaining local extensions.
*/
return new Promise<void>((resolve) => {
chrome.developerPrivate.autoUpdate(() => resolve());
chrome.metricsPrivate.recordUserAction('Options_UpdateExtensions');
})
.then(() => {
return new Promise<void>((resolve, reject) => {
const loadLocalExtensions = async () => {
for (const extension of extensions) {
if (extension.location === 'UNPACKED') {
try {
await this.reloadItem(extension.id);
} catch (loadError) {
reject(loadError);
break;
}
}
}
resolve();
};
loadLocalExtensions();
});
});
}
deleteErrors(
extensionId: string, errorIds?: number[],
type?: chrome.developerPrivate.ErrorType) {
chrome.developerPrivate.deleteExtensionErrors({
extensionId: extensionId,
errorIds: errorIds,
type: type,
});
}
requestFileSource(args: chrome.developerPrivate.RequestFileSourceProperties):
Promise<chrome.developerPrivate.RequestFileSourceResponse> {
return new Promise(function(resolve) {
chrome.developerPrivate.requestFileSource(args, resolve);
});
}
showInFolder(id: string) {
chrome.developerPrivate.showPath(id);
}
getExtensionActivityLog(extensionId: string):
Promise<chrome.activityLogPrivate.ActivityResultSet> {
return new Promise(function(resolve) {
chrome.activityLogPrivate.getExtensionActivities(
{
activityType: chrome.activityLogPrivate.ExtensionActivityFilter.ANY,
extensionId: extensionId,
},
resolve);
});
}
getFilteredExtensionActivityLog(extensionId: string, searchTerm: string) {
const anyType = chrome.activityLogPrivate.ExtensionActivityFilter.ANY;
// Construct one filter for each API call we will make: one for substring
// search by api call, one for substring search by page URL, and one for
// substring search by argument URL. % acts as a wildcard.
const activityLogFilters = [
{
activityType: anyType,
extensionId: extensionId,
apiCall: `%${searchTerm}%`,
},
{
activityType: anyType,
extensionId: extensionId,
pageUrl: `%${searchTerm}%`,
},
{
activityType: anyType,
extensionId: extensionId,
argUrl: `%${searchTerm}%`,
},
];
const promises:
Array<Promise<chrome.activityLogPrivate.ActivityResultSet>> =
activityLogFilters.map(
filter => new Promise(function(resolve) {
chrome.activityLogPrivate.getExtensionActivities(
filter, resolve);
}));
return Promise.all(promises).then(results => {
// We may have results that are present in one or more searches, so
// we merge them here. We also assume that every distinct activity
// id corresponds to exactly one activity.
const activitiesById = new Map();
for (const result of results) {
for (const activity of result.activities) {
activitiesById.set(activity.activityId, activity);
}
}
return {activities: Array.from(activitiesById.values())};
});
}
deleteActivitiesById(activityIds: string[]): Promise<void> {
return new Promise(function(resolve) {
chrome.activityLogPrivate.deleteActivities(activityIds, resolve);
});
}
deleteActivitiesFromExtension(extensionId: string): Promise<void> {
return new Promise(function(resolve) {
chrome.activityLogPrivate.deleteActivitiesByExtension(
extensionId, resolve);
});
}
getOnExtensionActivity(): ChromeEvent<
(activity: chrome.activityLogPrivate.ExtensionActivity) => void> {
return chrome.activityLogPrivate.onExtensionActivity;
}
downloadActivities(rawActivityData: string, fileName: string) {
const blob = new Blob([rawActivityData], {type: 'application/json'});
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = fileName;
a.click();
}
/**
* Attempts to load an unpacked extension via a drag-n-drop gesture.
* @return {!Promise}
*/
loadUnpackedFromDrag() {
return this.loadUnpackedHelper_({useDraggedPath: true});
}
installDroppedFile() {
chrome.developerPrivate.installDroppedFile();
}
notifyDragInstallInProgress() {
chrome.developerPrivate.notifyDragInstallInProgress();
}
getUserSiteSettings(): Promise<chrome.developerPrivate.UserSiteSettings> {
return new Promise(function(resolve) {
chrome.developerPrivate.getUserSiteSettings(resolve);
});
}
addUserSpecifiedSites(
siteSet: chrome.developerPrivate.SiteSet,
hosts: string[]): Promise<void> {
return new Promise(function(resolve) {
chrome.developerPrivate.addUserSpecifiedSites({siteSet, hosts}, resolve);
});
}
removeUserSpecifiedSites(
siteSet: chrome.developerPrivate.SiteSet,
hosts: string[]): Promise<void> {
return new Promise(function(resolve) {
chrome.developerPrivate.removeUserSpecifiedSites(
{siteSet, hosts}, resolve);
});
}
getUserAndExtensionSitesByEtld():
Promise<chrome.developerPrivate.SiteGroup[]> {
return new Promise(function(resolve) {
chrome.developerPrivate.getUserAndExtensionSitesByEtld(resolve);
});
}
getMatchingExtensionsForSite(site: string):
Promise<chrome.developerPrivate.MatchingExtensionInfo[]> {
return chrome.developerPrivate.getMatchingExtensionsForSite(site);
}
getUserSiteSettingsChangedTarget() {
return chrome.developerPrivate.onUserSiteSettingsChanged;
}
setShowAccessRequestsInToolbar(id: string, showRequests: boolean) {
chrome.developerPrivate.updateExtensionConfiguration({
extensionId: id,
showAccessRequestsInToolbar: showRequests,
});
}
static getInstance(): ServiceInterface {
return instance || (instance = new Service());
}
static setInstance(obj: ServiceInterface) {
instance = obj;
}
}
let instance: ServiceInterface|null = null;
| {
"content_hash": "041950c5d8e61167702f2bea2439f04e",
"timestamp": "",
"source": "github",
"line_count": 528,
"max_line_length": 80,
"avg_line_length": 32.51893939393939,
"alnum_prop": 0.6623762376237624,
"repo_name": "chromium/chromium",
"id": "2b1ea327bff00649314a4f2f889ed323ff34c5f6",
"size": "17170",
"binary": false,
"copies": "5",
"ref": "refs/heads/main",
"path": "chrome/browser/resources/extensions/service.ts",
"mode": "33188",
"license": "bsd-3-clause",
"language": [],
"symlink_target": ""
} |
import { CommonDataService } from './../../../core/services/common/common-data.service';
import { Configuration } from './../../../app.constants';
import { AuthService } from '../../../core/services/common/auth.service';
import { Router } from '@angular/router';
import { UserloginService } from './../../../core/services/userlogin/userlogin.service';
import { Component } from '@angular/core';
import { GlobalState } from '../../../global.state';
@Component({
selector: 'ba-page-top',
templateUrl: './baPageTop.html',
styleUrls: ['./baPageTop.scss'],
})
export class BaPageTop {
public isScrolled: boolean = false;
public isMenuCollapsed: boolean = false;
public username: string;
public profilePicPath: string;
public serverPath: string;
public currUser: any;
constructor(private _state: GlobalState, private userloginService: UserloginService,
private _router: Router, private authService: AuthService,
private _commonDataService: CommonDataService,
private _configuration: Configuration ) {
this._state.subscribe('menu.isCollapsed', (isCollapsed) => {
this.isMenuCollapsed = isCollapsed;
this.serverPath = this._configuration.Server;
});
if (JSON.parse(localStorage.getItem('currentUser')) !== null) {
this.username = JSON.parse(localStorage.getItem('currentUser')).username;
//this.roleList = JSON.parse(localStorage.getItem('currentUser')).roleList;
this.profilePicPath = JSON.parse(localStorage.getItem('currentUser')).user.profile_picture;
// this.username = this.authService.auth_email;
if (JSON.parse(localStorage.getItem('profilePicPath')) !== null) {
this.profilePicPath = JSON.parse(localStorage.getItem('profilePicPath'));
}
}
this._commonDataService.updatePData.subscribe(data => {
this.profilePicPath = this._commonDataService.profilePicPath;
});
}
public toggleMenu() {
this.isMenuCollapsed = !this.isMenuCollapsed;
this._state.notifyDataChanged('menu.isCollapsed', this.isMenuCollapsed);
return false;
}
public scrolledChanged(isScrolled) {
this.isScrolled = isScrolled;
}
public logout() {
// this.userloginService.logout().subscribe(
// data => {
// console.log(data);
// if (data == true) {
// this._router.navigate(['login']);
// }
// });
this.authService.logout();
this._router.navigate(['login']);
}
}
| {
"content_hash": "8d46e22fc6cdb9e9c9a243a76b05bfd7",
"timestamp": "",
"source": "github",
"line_count": 68,
"max_line_length": 103,
"avg_line_length": 37.588235294117645,
"alnum_prop": 0.6443661971830986,
"repo_name": "AhmedAlmodrs/datacenter",
"id": "87e74c9e9cc7076aa3fcf40587c467b8749bb470",
"size": "2556",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/app/theme/components/baPageTop/baPageTop.component.ts",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "159187"
},
{
"name": "HTML",
"bytes": "276726"
},
{
"name": "JavaScript",
"bytes": "42603"
},
{
"name": "Shell",
"bytes": "153"
},
{
"name": "TypeScript",
"bytes": "594312"
}
],
"symlink_target": ""
} |
namespace App.Data.Migrations
{
using App.Models;
using System;
using System.Data.Entity;
using System.Data.Entity.Migrations;
using System.Linq;
public sealed class Configuration : DbMigrationsConfiguration<ApplicationDbContext>
{
static Random rand = new Random();
public Configuration()
{
AutomaticMigrationsEnabled = true;
AutomaticMigrationDataLossAllowed = true;
}
protected override void Seed(ApplicationDbContext context)
{
//this.AddInitialItemCategories(context);
//this.AddInitialItems(context);
}
private void AddInitialItemCategories(ApplicationDbContext context)
{
if (!context.ItemCategories.Any())
{
for (int i = 0; i < 4; i++)
{
var newItemCategory = new ItemCategory
{
Name = "Item category " + i,
DateAdded = DateTime.Now
};
context.ItemCategories.Add(newItemCategory);
}
context.SaveChanges();
}
}
private void AddInitialItems(ApplicationDbContext context)
{
if (!context.Items.Any())
{
for (int i = 0; i < 10; i++)
{
var newItem = new Item
{
Name = "Item " + i,
Price = rand.Next(30,80),
Summary = "Short Description of the item " + i,
Description = "Long Description of the item " + i,
DateAdded = DateTime.Now,
ItemCategoryId = rand.Next(1, 5)
};
context.Items.Add(newItem);
}
context.SaveChanges();
}
}
}
}
| {
"content_hash": "056ff4bcd84d4587a8597db7865f8079",
"timestamp": "",
"source": "github",
"line_count": 62,
"max_line_length": 87,
"avg_line_length": 31.79032258064516,
"alnum_prop": 0.4672754946727549,
"repo_name": "nzhul/mvcstart",
"id": "5ed37f9ebcdaba1e773e1dcc0651172291074067",
"size": "1971",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "App/App.Data/Migrations/Configuration.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ASP",
"bytes": "98"
},
{
"name": "C#",
"bytes": "293606"
},
{
"name": "CSS",
"bytes": "82981"
},
{
"name": "HTML",
"bytes": "47363"
},
{
"name": "JavaScript",
"bytes": "2047600"
}
],
"symlink_target": ""
} |
"""
Copyright 2012 GroupDocs.
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.
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
"""
import sys
import os
from .models import *
from groupdocs.FileStream import FileStream
from groupdocs.ApiClient import ApiException
class SystemApi(object):
def __init__(self, apiClient):
self.apiClient = apiClient
self.__basePath = "https://dev-api.groupdocs.com/v2.0"
@property
def basePath(self):
return self.__basePath
@basePath.setter
def basePath(self, value):
self.__basePath = value
def GetUserPlan(self, callerId, **kwargs):
"""Get user plan
Args:
callerId, str: User GUID (required)
Returns: GetPlanResponse
"""
if( callerId == None ):
raise ApiException(400, "missing required parameters")
allParams = ['callerId']
params = locals()
for (key, val) in params['kwargs'].items():
if key not in allParams:
raise TypeError("Got an unexpected keyword argument '%s' to method GetUserPlan" % key)
params[key] = val
del params['kwargs']
resourcePath = '/system/{callerId}/plan'.replace('*', '')
resourcePath = resourcePath.replace('{format}', 'json')
method = 'GET'
queryParams = {}
headerParams = {}
if ('callerId' in params):
replacement = str(self.apiClient.toPathValue(params['callerId']))
resourcePath = resourcePath.replace('{' + 'callerId' + '}',
replacement)
postData = (params['body'] if 'body' in params else None)
response = self.apiClient.callAPI(self.basePath, resourcePath, method, queryParams,
postData, headerParams)
if not response:
return None
responseObject = self.apiClient.deserialize(response, 'GetPlanResponse')
return responseObject
def GetUserSubscriptionPlan(self, callerId, **kwargs):
"""Get user plan
Args:
callerId, str: User GUID (required)
Returns: GetUserSubscriptionPlanResponse
"""
if( callerId == None ):
raise ApiException(400, "missing required parameters")
allParams = ['callerId']
params = locals()
for (key, val) in params['kwargs'].items():
if key not in allParams:
raise TypeError("Got an unexpected keyword argument '%s' to method GetUserSubscriptionPlan" % key)
params[key] = val
del params['kwargs']
resourcePath = '/system/{callerId}/subscription'.replace('*', '')
resourcePath = resourcePath.replace('{format}', 'json')
method = 'GET'
queryParams = {}
headerParams = {}
if ('callerId' in params):
replacement = str(self.apiClient.toPathValue(params['callerId']))
resourcePath = resourcePath.replace('{' + 'callerId' + '}',
replacement)
postData = (params['body'] if 'body' in params else None)
response = self.apiClient.callAPI(self.basePath, resourcePath, method, queryParams,
postData, headerParams)
if not response:
return None
responseObject = self.apiClient.deserialize(response, 'GetUserSubscriptionPlanResponse')
return responseObject
def GetSubscriptionPlans(self, callerId, family, **kwargs):
"""Get subscription plans
Args:
callerId, str: User GUID (required)
family, str: Product Family Name (required)
Returns: GetSubscriptionPlansResponse
"""
if( callerId == None or family == None ):
raise ApiException(400, "missing required parameters")
allParams = ['callerId', 'family']
params = locals()
for (key, val) in params['kwargs'].items():
if key not in allParams:
raise TypeError("Got an unexpected keyword argument '%s' to method GetSubscriptionPlans" % key)
params[key] = val
del params['kwargs']
resourcePath = '/system/{callerId}/plans/{family}?invalidate={invalidate}'.replace('*', '')
resourcePath = resourcePath.replace('{format}', 'json')
method = 'GET'
queryParams = {}
headerParams = {}
if ('callerId' in params):
replacement = str(self.apiClient.toPathValue(params['callerId']))
resourcePath = resourcePath.replace('{' + 'callerId' + '}',
replacement)
if ('family' in params):
replacement = str(self.apiClient.toPathValue(params['family']))
resourcePath = resourcePath.replace('{' + 'family' + '}',
replacement)
postData = (params['body'] if 'body' in params else None)
response = self.apiClient.callAPI(self.basePath, resourcePath, method, queryParams,
postData, headerParams)
if not response:
return None
responseObject = self.apiClient.deserialize(response, 'GetSubscriptionPlansResponse')
return responseObject
def SetSubscriptionPlan(self, userId, productId, body, **kwargs):
"""Set subscription plan user plan
Args:
userId, str: User GUID (required)
productId, str: Product ID (required)
body, SubscriptionPlanInfo: Subscription Plan (required)
Returns: SetUserSubscriptionPlanResponse
"""
if( userId == None or productId == None or body == None ):
raise ApiException(400, "missing required parameters")
allParams = ['userId', 'productId', 'body']
params = locals()
for (key, val) in params['kwargs'].items():
if key not in allParams:
raise TypeError("Got an unexpected keyword argument '%s' to method SetSubscriptionPlan" % key)
params[key] = val
del params['kwargs']
resourcePath = '/system/{userId}/subscriptions/{productId}'.replace('*', '')
resourcePath = resourcePath.replace('{format}', 'json')
method = 'PUT'
queryParams = {}
headerParams = {}
if ('userId' in params):
replacement = str(self.apiClient.toPathValue(params['userId']))
resourcePath = resourcePath.replace('{' + 'userId' + '}',
replacement)
if ('productId' in params):
replacement = str(self.apiClient.toPathValue(params['productId']))
resourcePath = resourcePath.replace('{' + 'productId' + '}',
replacement)
postData = (params['body'] if 'body' in params else None)
response = self.apiClient.callAPI(self.basePath, resourcePath, method, queryParams,
postData, headerParams)
if not response:
return None
responseObject = self.apiClient.deserialize(response, 'SetUserSubscriptionPlanResponse')
return responseObject
def GetCountries(self, callerId, **kwargs):
"""Get countries
Args:
callerId, str: User GUID (required)
Returns: GetCountriesResponse
"""
if( callerId == None ):
raise ApiException(400, "missing required parameters")
allParams = ['callerId']
params = locals()
for (key, val) in params['kwargs'].items():
if key not in allParams:
raise TypeError("Got an unexpected keyword argument '%s' to method GetCountries" % key)
params[key] = val
del params['kwargs']
resourcePath = '/system/{callerId}/countries'.replace('*', '')
resourcePath = resourcePath.replace('{format}', 'json')
method = 'GET'
queryParams = {}
headerParams = {}
if ('callerId' in params):
replacement = str(self.apiClient.toPathValue(params['callerId']))
resourcePath = resourcePath.replace('{' + 'callerId' + '}',
replacement)
postData = (params['body'] if 'body' in params else None)
response = self.apiClient.callAPI(self.basePath, resourcePath, method, queryParams,
postData, headerParams)
if not response:
return None
responseObject = self.apiClient.deserialize(response, 'GetCountriesResponse')
return responseObject
def GetStates(self, callerId, countryName, **kwargs):
"""Get states
Args:
callerId, str: User GUID (required)
countryName, str: Country Name (required)
Returns: GetStatesResponse
"""
if( callerId == None or countryName == None ):
raise ApiException(400, "missing required parameters")
allParams = ['callerId', 'countryName']
params = locals()
for (key, val) in params['kwargs'].items():
if key not in allParams:
raise TypeError("Got an unexpected keyword argument '%s' to method GetStates" % key)
params[key] = val
del params['kwargs']
resourcePath = '/system/{callerId}/countries/{countryName}/states'.replace('*', '')
resourcePath = resourcePath.replace('{format}', 'json')
method = 'GET'
queryParams = {}
headerParams = {}
if ('callerId' in params):
replacement = str(self.apiClient.toPathValue(params['callerId']))
resourcePath = resourcePath.replace('{' + 'callerId' + '}',
replacement)
if ('countryName' in params):
replacement = str(self.apiClient.toPathValue(params['countryName']))
resourcePath = resourcePath.replace('{' + 'countryName' + '}',
replacement)
postData = (params['body'] if 'body' in params else None)
response = self.apiClient.callAPI(self.basePath, resourcePath, method, queryParams,
postData, headerParams)
if not response:
return None
responseObject = self.apiClient.deserialize(response, 'GetStatesResponse')
return responseObject
def SetBillingAddress(self, userId, body, **kwargs):
"""Set user billing address
Args:
userId, str: User GUID (required)
body, BillingAddressInfo: Billing Address (required)
Returns: GetBillingAddressResponse
"""
if( userId == None or body == None ):
raise ApiException(400, "missing required parameters")
allParams = ['userId', 'body']
params = locals()
for (key, val) in params['kwargs'].items():
if key not in allParams:
raise TypeError("Got an unexpected keyword argument '%s' to method SetBillingAddress" % key)
params[key] = val
del params['kwargs']
resourcePath = '/system/{userId}/billingaddress'.replace('*', '')
resourcePath = resourcePath.replace('{format}', 'json')
method = 'PUT'
queryParams = {}
headerParams = {}
if ('userId' in params):
replacement = str(self.apiClient.toPathValue(params['userId']))
resourcePath = resourcePath.replace('{' + 'userId' + '}',
replacement)
postData = (params['body'] if 'body' in params else None)
response = self.apiClient.callAPI(self.basePath, resourcePath, method, queryParams,
postData, headerParams)
if not response:
return None
responseObject = self.apiClient.deserialize(response, 'GetBillingAddressResponse')
return responseObject
| {
"content_hash": "ab822f58f8d3189dac18406d5c73fef5",
"timestamp": "",
"source": "github",
"line_count": 346,
"max_line_length": 114,
"avg_line_length": 37.30346820809248,
"alnum_prop": 0.5665917719067173,
"repo_name": "liosha2007/temporary-groupdocs-python3-sdk",
"id": "6cc5e3a4015ccd05bf838b5c42923beb91bcaabd",
"size": "12929",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "groupdocs/SystemApi.py",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Python",
"bytes": "992590"
}
],
"symlink_target": ""
} |
#include "brg_endian.h"
#include "displayIntermediateValues.h"
#include "KeccakP-800-12-reference.h"
typedef unsigned char UINT8;
typedef unsigned int UINT32;
typedef UINT32 tKeccakLane;
void fromBytesToWords(tKeccakLane *stateAsWords, const unsigned char *state); // From KeccakF-800/Reference
void fromWordsToBytes(unsigned char *state, const tKeccakLane *stateAsWords); // From KeccakF-800/Reference
void KeccakP800_12_OnWords(tKeccakLane *state);
void KeccakF800Round(tKeccakLane *state, unsigned int indexRound); // From KeccakF-800/Reference
void KeccakP800_12_StatePermute(void *state)
{
#if (PLATFORM_BYTE_ORDER != IS_LITTLE_ENDIAN)
tKeccakLane stateAsWords[KeccakF_width/32];
#endif
displayStateAsBytes(1, "Input of permutation", (const unsigned char *)state);
#if (PLATFORM_BYTE_ORDER == IS_LITTLE_ENDIAN)
KeccakP800_12_OnWords((tKeccakLane*)state);
#else
fromBytesToWords(stateAsWords, (const unsigned char *)state);
KeccakP800_12_OnWords(stateAsWords);
fromWordsToBytes((unsigned char *)state, stateAsWords);
#endif
displayStateAsBytes(1, "State after permutation", (const unsigned char *)state);
}
void KeccakP800_12_OnWords(tKeccakLane *state)
{
unsigned int i;
displayStateAsLanes(3, "Same, with lanes as 32-bit words", state);
for(i=10; i<22; i++)
KeccakF800Round(state, i);
}
/* ---------------------------------------------------------------- */
void KeccakP800_12_StateXORPermuteExtract(void *state, const unsigned char *inData, unsigned int inLaneCount, unsigned char *outData, unsigned int outLaneCount)
{
KeccakF800_StateXORLanes(state, inData, inLaneCount);
KeccakP800_12_StatePermute(state);
KeccakF800_StateExtractLanes(state, outData, outLaneCount);
}
| {
"content_hash": "36a9a8eaa8bf01c2a7fa1fd44fbdc1b2",
"timestamp": "",
"source": "github",
"line_count": 50,
"max_line_length": 160,
"avg_line_length": 34.98,
"alnum_prop": 0.7284162378502002,
"repo_name": "mjosaarinen/brutus",
"id": "2f522e4bb6935628aa1597a2a6c923ab90d32112",
"size": "2227",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "crypto_aead_round1/riverkeyakv1/ref/KeccakP-800-12-reference.c",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Assembly",
"bytes": "15986028"
},
{
"name": "C",
"bytes": "29905916"
},
{
"name": "C++",
"bytes": "8884140"
},
{
"name": "Makefile",
"bytes": "9738"
},
{
"name": "Objective-C",
"bytes": "198516"
},
{
"name": "Shell",
"bytes": "4364"
}
],
"symlink_target": ""
} |
@interface OrgApacheLuceneIndexFlushPolicy ()
- (jboolean)assertMessageWithNSString:(NSString *)s;
@end
__attribute__((unused)) static jboolean OrgApacheLuceneIndexFlushPolicy_assertMessageWithNSString_(OrgApacheLuceneIndexFlushPolicy *self, NSString *s);
@implementation OrgApacheLuceneIndexFlushPolicy
- (instancetype)initPackagePrivate {
OrgApacheLuceneIndexFlushPolicy_initPackagePrivate(self);
return self;
}
- (void)onDeleteWithOrgApacheLuceneIndexDocumentsWriterFlushControl:(OrgApacheLuceneIndexDocumentsWriterFlushControl *)control
withOrgApacheLuceneIndexDocumentsWriterPerThreadPool_ThreadState:(OrgApacheLuceneIndexDocumentsWriterPerThreadPool_ThreadState *)state {
// can't call an abstract method
[self doesNotRecognizeSelector:_cmd];
}
- (void)onUpdateWithOrgApacheLuceneIndexDocumentsWriterFlushControl:(OrgApacheLuceneIndexDocumentsWriterFlushControl *)control
withOrgApacheLuceneIndexDocumentsWriterPerThreadPool_ThreadState:(OrgApacheLuceneIndexDocumentsWriterPerThreadPool_ThreadState *)state {
[self onInsertWithOrgApacheLuceneIndexDocumentsWriterFlushControl:control withOrgApacheLuceneIndexDocumentsWriterPerThreadPool_ThreadState:state];
[self onDeleteWithOrgApacheLuceneIndexDocumentsWriterFlushControl:control withOrgApacheLuceneIndexDocumentsWriterPerThreadPool_ThreadState:state];
}
- (void)onInsertWithOrgApacheLuceneIndexDocumentsWriterFlushControl:(OrgApacheLuceneIndexDocumentsWriterFlushControl *)control
withOrgApacheLuceneIndexDocumentsWriterPerThreadPool_ThreadState:(OrgApacheLuceneIndexDocumentsWriterPerThreadPool_ThreadState *)state {
// can't call an abstract method
[self doesNotRecognizeSelector:_cmd];
}
- (void)init__WithOrgApacheLuceneIndexLiveIndexWriterConfig:(OrgApacheLuceneIndexLiveIndexWriterConfig *)indexWriterConfig {
@synchronized(self) {
self->indexWriterConfig_ = indexWriterConfig;
JreStrongAssign(&infoStream_, [((OrgApacheLuceneIndexLiveIndexWriterConfig *) nil_chk(indexWriterConfig)) getInfoStream]);
}
}
- (OrgApacheLuceneIndexDocumentsWriterPerThreadPool_ThreadState *)findLargestNonPendingWriterWithOrgApacheLuceneIndexDocumentsWriterFlushControl:(OrgApacheLuceneIndexDocumentsWriterFlushControl *)control
withOrgApacheLuceneIndexDocumentsWriterPerThreadPool_ThreadState:(OrgApacheLuceneIndexDocumentsWriterPerThreadPool_ThreadState *)perThreadState {
JreAssert([((OrgApacheLuceneIndexDocumentsWriterPerThread *) nil_chk(((OrgApacheLuceneIndexDocumentsWriterPerThreadPool_ThreadState *) nil_chk(perThreadState))->dwpt_)) getNumDocsInRAM] > 0, @"org/apache/lucene/index/FlushPolicy.java:113 condition failed: assert perThreadState.dwpt.getNumDocsInRAM() > 0;");
jlong maxRamSoFar = perThreadState->bytesUsed_;
OrgApacheLuceneIndexDocumentsWriterPerThreadPool_ThreadState *maxRamUsingThreadState = JreRetainedLocalValue(perThreadState);
JreAssert(!JreLoadVolatileBoolean(&perThreadState->flushPending_), @"DWPT should have flushed");
id<JavaUtilIterator> activePerThreadsIterator = JreRetainedLocalValue([((OrgApacheLuceneIndexDocumentsWriterFlushControl *) nil_chk(control)) allActiveThreadStates]);
jint count = 0;
while ([((id<JavaUtilIterator>) nil_chk(activePerThreadsIterator)) hasNext]) {
OrgApacheLuceneIndexDocumentsWriterPerThreadPool_ThreadState *next = JreRetainedLocalValue([activePerThreadsIterator next]);
if (!JreLoadVolatileBoolean(&((OrgApacheLuceneIndexDocumentsWriterPerThreadPool_ThreadState *) nil_chk(next))->flushPending_)) {
jlong nextRam = next->bytesUsed_;
if (nextRam > 0 && [((OrgApacheLuceneIndexDocumentsWriterPerThread *) nil_chk(next->dwpt_)) getNumDocsInRAM] > 0) {
if ([((OrgApacheLuceneUtilInfoStream *) nil_chk(infoStream_)) isEnabledWithNSString:@"FP"]) {
[((OrgApacheLuceneUtilInfoStream *) nil_chk(infoStream_)) messageWithNSString:@"FP" withNSString:JreStrcat("$J$I", @"thread state has ", nextRam, @" bytes; docInRAM=", [((OrgApacheLuceneIndexDocumentsWriterPerThread *) nil_chk(next->dwpt_)) getNumDocsInRAM])];
}
count++;
if (nextRam > maxRamSoFar) {
maxRamSoFar = nextRam;
maxRamUsingThreadState = next;
}
}
}
}
if ([((OrgApacheLuceneUtilInfoStream *) nil_chk(infoStream_)) isEnabledWithNSString:@"FP"]) {
[((OrgApacheLuceneUtilInfoStream *) nil_chk(infoStream_)) messageWithNSString:@"FP" withNSString:JreStrcat("I$", count, @" in-use non-flushing threads states")];
}
JreAssert(OrgApacheLuceneIndexFlushPolicy_assertMessageWithNSString_(self, @"set largest ram consuming thread pending on lower watermark"), @"org/apache/lucene/index/FlushPolicy.java:139 condition failed: assert assertMessage(\"set largest ram consuming thread pending on lower watermark\");");
return maxRamUsingThreadState;
}
- (jboolean)assertMessageWithNSString:(NSString *)s {
return OrgApacheLuceneIndexFlushPolicy_assertMessageWithNSString_(self, s);
}
- (void)__javaClone:(OrgApacheLuceneIndexFlushPolicy *)original {
[super __javaClone:original];
[indexWriterConfig_ release];
}
- (void)dealloc {
RELEASE_(infoStream_);
[super dealloc];
}
+ (const J2ObjcClassInfo *)__metadata {
static J2ObjcMethodInfo methods[] = {
{ NULL, NULL, 0x0, -1, -1, -1, -1, -1, -1 },
{ NULL, "V", 0x401, 0, 1, -1, -1, -1, -1 },
{ NULL, "V", 0x1, 2, 1, -1, -1, -1, -1 },
{ NULL, "V", 0x401, 3, 1, -1, -1, -1, -1 },
{ NULL, "V", 0x24, 4, 5, -1, -1, -1, -1 },
{ NULL, "LOrgApacheLuceneIndexDocumentsWriterPerThreadPool_ThreadState;", 0x4, 6, 1, -1, -1, -1, -1 },
{ NULL, "Z", 0x2, 7, 8, -1, -1, -1, -1 },
};
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wobjc-multiple-method-names"
#pragma clang diagnostic ignored "-Wundeclared-selector"
methods[0].selector = @selector(initPackagePrivate);
methods[1].selector = @selector(onDeleteWithOrgApacheLuceneIndexDocumentsWriterFlushControl:withOrgApacheLuceneIndexDocumentsWriterPerThreadPool_ThreadState:);
methods[2].selector = @selector(onUpdateWithOrgApacheLuceneIndexDocumentsWriterFlushControl:withOrgApacheLuceneIndexDocumentsWriterPerThreadPool_ThreadState:);
methods[3].selector = @selector(onInsertWithOrgApacheLuceneIndexDocumentsWriterFlushControl:withOrgApacheLuceneIndexDocumentsWriterPerThreadPool_ThreadState:);
methods[4].selector = @selector(init__WithOrgApacheLuceneIndexLiveIndexWriterConfig:);
methods[5].selector = @selector(findLargestNonPendingWriterWithOrgApacheLuceneIndexDocumentsWriterFlushControl:withOrgApacheLuceneIndexDocumentsWriterPerThreadPool_ThreadState:);
methods[6].selector = @selector(assertMessageWithNSString:);
#pragma clang diagnostic pop
static const J2ObjcFieldInfo fields[] = {
{ "indexWriterConfig_", "LOrgApacheLuceneIndexLiveIndexWriterConfig;", .constantValue.asLong = 0, 0x4, -1, -1, -1, -1 },
{ "infoStream_", "LOrgApacheLuceneUtilInfoStream;", .constantValue.asLong = 0, 0x4, -1, -1, -1, -1 },
};
static const void *ptrTable[] = { "onDelete", "LOrgApacheLuceneIndexDocumentsWriterFlushControl;LOrgApacheLuceneIndexDocumentsWriterPerThreadPool_ThreadState;", "onUpdate", "onInsert", "init", "LOrgApacheLuceneIndexLiveIndexWriterConfig;", "findLargestNonPendingWriter", "assertMessage", "LNSString;" };
static const J2ObjcClassInfo _OrgApacheLuceneIndexFlushPolicy = { "FlushPolicy", "org.apache.lucene.index", ptrTable, methods, fields, 7, 0x400, 7, 2, -1, -1, -1, -1, -1 };
return &_OrgApacheLuceneIndexFlushPolicy;
}
@end
void OrgApacheLuceneIndexFlushPolicy_initPackagePrivate(OrgApacheLuceneIndexFlushPolicy *self) {
NSObject_init(self);
}
jboolean OrgApacheLuceneIndexFlushPolicy_assertMessageWithNSString_(OrgApacheLuceneIndexFlushPolicy *self, NSString *s) {
if ([((OrgApacheLuceneUtilInfoStream *) nil_chk(self->infoStream_)) isEnabledWithNSString:@"FP"]) {
[((OrgApacheLuceneUtilInfoStream *) nil_chk(self->infoStream_)) messageWithNSString:@"FP" withNSString:s];
}
return true;
}
J2OBJC_CLASS_TYPE_LITERAL_SOURCE(OrgApacheLuceneIndexFlushPolicy)
| {
"content_hash": "13787b6df18ccd6339b57ee4114041e4",
"timestamp": "",
"source": "github",
"line_count": 129,
"max_line_length": 310,
"avg_line_length": 62.74418604651163,
"alnum_prop": 0.7789720780825302,
"repo_name": "lukhnos/objclucene",
"id": "5a805dd26abd32ad7e1eafc79343179f397d0863",
"size": "8902",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/org/apache/lucene/index/FlushPolicy.m",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "72674"
},
{
"name": "Objective-C",
"bytes": "31684259"
},
{
"name": "Shell",
"bytes": "491"
}
],
"symlink_target": ""
} |
ACCEPTED
#### According to
World Register of Marine Species
#### Published in
null
#### Original name
null
### Remarks
null | {
"content_hash": "65d61c844ad164a39fde727dfdb88406",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 32,
"avg_line_length": 9.76923076923077,
"alnum_prop": 0.7007874015748031,
"repo_name": "mdoering/backbone",
"id": "3356f0af67c6f44008a13228e3fc0b9607ac6e8e",
"size": "183",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "life/Protozoa/Granuloreticulosea/Foraminiferida/Saccamminidae/Technitella/Technitella legumen/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
'use strict';
var crypto = require('crypto'),
HoekBoom = require('hoek-boom'),
Measured = require('measured');
module.exports = BaseController;
function BaseController(logger, server) {
this.logger = logger;
this.server = server;
}
/**
* if an agentName is not already registered in the agents state object, it is added
*
* @param agentname {string}
* @returns {object} - returns the agent state object
*/
BaseController.prototype.registerAgent = function (agentname) {
var agents = this.server.app.state.agents;
if (!agents[agentname]) {
agents[agentname] = {
jobs: {},
histogram: new Measured.Histogram(),
meter: new Measured.Meter(),
timeoutmeter: new Measured.Meter()
};
this.server.app.state.clusterEmit('cluster-identify-agent', agentname);
}
return agents[agentname];
};
// todo: might want to consolidate registerJob and registerAgentJob
/**
* sets up tracking structure for a particular job type
* @param {string} jobname
*/
BaseController.prototype.registerJob = function (jobname) {
var jobs = this.server.app.state.jobs;
if (!jobs[jobname]) {
jobs[jobname] = {
histogram: new Measured.Histogram(),
meter: new Measured.Meter(),
timeoutmeter: new Measured.Meter()
};
}
return jobs;
};
/**
* registers that a particular agent is accepting work for a particular job
* sets up tracking structure for when the agent starts actually doing work
*
* @param {string} agentname
* @param {string} jobname
*/
BaseController.prototype.registerAgentJob = function (agentname, jobname) {
var agent = this.registerAgent(agentname);
if (!agent.jobs[jobname]) {
agent.jobs[jobname] = {
histogram: new Measured.Histogram(),
meter: new Measured.Meter(),
timeoutmeter: new Measured.Meter()
};
}
return agent;
};
/**
*
* @param agentname {string}
* @param jobname {string}
* @param date {timestamp}
* @returns {Promise}
*/
BaseController.prototype.startJob = function (agentname, jobname, date, lockdata, id) {
var jobs, job;
id = id || crypto.randomBytes(12).toString('base64').slice(0, 16)
.replace(/\+/g, '0')
.replace(/\//g, '0');
job = {id: id, name: jobname, agent: agentname, start: date, lock_data: lockdata};
// make sure the agent is registered and tracking this jobtype
this.registerAgentJob(agentname, jobname);
// make sure the job is registered for statistics
jobs = this.registerJob(jobname);
// put job into active state
jobs.active_jobs[id] = job;
return job;
};
/**
* calculate job duration
* work out the new job stats
* remove the job from active jobs
* @param id
* @param date
*/
BaseController.prototype.endJob = function (id, date, lockdata, isTimeout) {
var state = this.server.app.state,
jobs = state.jobs,
job = jobs.active_jobs[id],
agent,
agentjobinfo,
duration;
HoekBoom.assertBoom(job, 'no job was found with this id: ' + id, 'badRequest');
// stats stuff
agent = this.server.app.state.agents[job.agent];
agentjobinfo = agent.jobs[job.name];
duration = date - job.start;
if (isTimeout) {
agent.timeoutmeter.mark();
jobs[job.name].timeoutmeter.mark();
agentjobinfo.timeoutmeter.mark();
} else {
agent.histogram.update(duration);
agent.meter.mark();
agentjobinfo.histogram.update(duration);
agentjobinfo.meter.mark();
jobs[job.name].histogram.update(duration);
jobs[job.name].meter.mark();
}
// remove from the active jobs
delete jobs.active_jobs[id];
return state.removeLocks(lockdata);
};
BaseController.prototype.computeAverage = function (numcompleted, avgduration, reading) {
return (numcompleted * avgduration + reading) / ++numcompleted;
};
/**
*
* clear all jobs older than maxage
*/
BaseController.prototype.clearOldJobs = function () {
var state = this.server.app.state,
activejobs = state.jobs.active_jobs,
now = Date.now(),
self = this;
Object.keys(activejobs).forEach(function (key) {
var job = activejobs[key],
duration = now - job.start,
maxage = job.maxAge || state.jobMaxAge,
status;
if (duration > maxage) {
status = self.endJob(job.id, now, job.lock_data, true);
return self.server.app.state.clusterEmit('cluster-end-job', job.id, now, job.lock_data, status.version, true)
.then(function () {
return status;
});
}
});
};
BaseController.prototype.clearOldJobsRepeat = function (clearInterval) {
var interval,
state = this.server.app.state;
if (state.isMaster) {
interval = clearInterval || state.clearOldJobsInterval;
this.clearOldJobs();
setTimeout(this.clearOldJobsRepeat.bind(this), interval);
}
};
| {
"content_hash": "33642b2fce6a744893d1894fea2fded6",
"timestamp": "",
"source": "github",
"line_count": 194,
"max_line_length": 121,
"avg_line_length": 26.201030927835053,
"alnum_prop": 0.6269919338973048,
"repo_name": "mrlannigan/governor",
"id": "ecf93f57c28bda8f45348d9a47847f62a32db660",
"size": "5083",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "lib/baseController.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "JavaScript",
"bytes": "72673"
},
{
"name": "Makefile",
"bytes": "966"
}
],
"symlink_target": ""
} |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="profile"/>
<meta name="author" content="Almudena Marin Cobos"/>
<link rel="icon" href="../lapiz.ico"/>
<title>Almudena Marín Cobos</title>
<!-- Bootstrap core CSS -->
<link href="../dist/css/bootstrap.min.css" rel="stylesheet">
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<link href="../assets/css/ie10-viewport-bug-workaround.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="starter-template.css" rel="stylesheet">
<!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
<!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
<script src="../assets/js/ie-emulation-modes-warning.js"></script>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[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>
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">HOME</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="../starter-template/index.html">Profile</a></li>
<li><a href="../starter-template/index_tp.html">Teaching Philosophy</a></li>
<li><a href="../blog/index.html">Log Book</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
<div class="container">
<div class="starter-template">
<h1>Bio</h1>
<p>B.A. with honors in Spanish Language and Literature (2008), Universidad de Córdoba (Spain). M.A. in Hispanic Literatures (2011), Universidad de Córdoba (Spain).
She has been studying and researching at universities in Europe and in the United States, such as Royal Holloway (2005-2006) and Queen Mary (2010) in London, as well as Fordham University (2012) in New York.
She has spoken in many conference presentations and published articles in refereed journals pertaining to Early Modern Spanish Poetry, i.e. Anuario Lope de Vega, Bulletin Hispanique or Versants.
She is avid a contributor to the online digital database <a href="http://www.uco.es/investigacion/proyectos/phebo/">PHEBO</a>, an ongoing project directed by Prof. Ruiz Pérez. </p>
<h4>For detailed information, please check my CV <a href="../CV/index.html">here</a>.</h4>
<h1>Teaching experience</h1>
<p>She had taught Spanish as a Second Language in Sir Williams Perkins' School, a private school for girls in Chertsey (Surrey, England) back in 2005.
She was a T.A. and focused on oral activities for an Intermediate and Advanced level, engaging the girls in an understanding of
Spanish Language and Culture far from stereotypes and encouraging them to always know more. Nowadays, she is a PhD Candidate and Teaching Fellow at the department
of Latin American and Iberian Cultures in Columbia University (New York City). She has taught <a href="http://laic.columbia.edu/courses/elementary-spanish-6/">Elementary Spanish I</a>,
<a href="http://laic.columbia.edu/courses/intermediate-spanish-26/">Intermidiate Spanish I</a>, and
<a href="http://laic.columbia.edu/courses/advanced-language-through-content-underground-iberia/">Advanced Language Through Content ("Underground Iberia")</a>.</p>
</div>
</div><!-- /.container -->
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="../../assets/js/vendor/jquery.min.js"><\/script>')</script>
<script src="../../dist/js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="../../assets/js/ie10-viewport-bug-workaround.js"></script>
</body>
</html>
| {
"content_hash": "45c577dc29f64b3564adadb5e88cadc2",
"timestamp": "",
"source": "github",
"line_count": 87,
"max_line_length": 217,
"avg_line_length": 57.97701149425287,
"alnum_prop": 0.6473037272006344,
"repo_name": "almudenamc/almudenamc.github.io",
"id": "226199f2167d5d287df7af9567ad7eff8af80867",
"size": "5044",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "starter-template/index.html",
"mode": "33261",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "798822"
},
{
"name": "HTML",
"bytes": "901008"
},
{
"name": "JavaScript",
"bytes": "354856"
},
{
"name": "PowerShell",
"bytes": "468"
},
{
"name": "Python",
"bytes": "5734"
},
{
"name": "Ruby",
"bytes": "1185"
},
{
"name": "Shell",
"bytes": "350"
}
],
"symlink_target": ""
} |
import {
AfterViewInit,
Component,
Input,
NgZone,
OnChanges,
OnDestroy,
OnInit,
SimpleChanges,
ViewChild,
ViewEncapsulation,
} from "@angular/core";
import { Dataset } from "chipster-js-common";
import * as d3 from "d3";
import log from "loglevel";
import { Subject } from "rxjs";
import { takeUntil, tap } from "rxjs/operators";
import { ErrorService } from "../../../../../core/errorhandler/error.service";
import { RestErrorService } from "../../../../../core/errorhandler/rest-error.service";
import { NativeElementService } from "../../../../../shared/services/native-element.service";
import { SpreadsheetService } from "../../../../../shared/services/spreadsheet.service";
import { DatasetService } from "../../dataset.service";
import { DialogModalService } from "../../dialogmodal/dialogmodal.service";
import { GetSessionDataService } from "../../get-session-data.service";
import { SessionDataService } from "../../session-data.service";
import { SessionEventService } from "../../session-event.service";
export enum PhenodataState {
OWN_PHENODATA,
INHERITED_PHENODATA,
NO_PHENODATA,
DATASET_NULL,
}
@Component({
selector: "ch-phenodata-visualization",
templateUrl: "./phenodata-visualization.component.html",
styleUrls: ["./phenodata-visualization.component.less"],
// disable ViewEncapsulation.Emulated, because we want dynamically add a style to the
// remove column button, but an emulated view encapsulation would mess up style names
encapsulation: ViewEncapsulation.None,
})
export class PhenodataVisualizationComponent implements OnInit, OnChanges, OnDestroy, AfterViewInit {
@Input() private dataset: Dataset;
@Input() private datasetsMap: Map<string, Dataset>;
// MUST be handled outside Angular zone to prevent a change detection loop
hot;
rows: Array<Array<string>>;
headers: string[];
latestEdit: number;
deferredUpdatesTimerId: number | null = null;
unremovableColumns = ["sample", "original_name"];
PhenodataState = PhenodataState; // for using the enum in template
phenodataState: PhenodataState = PhenodataState.DATASET_NULL;
phenodataAncestor: Dataset;
phenodataFilled = false;
ready = false;
sortColumn: number;
sortOrder: boolean;
sortingEnabled: boolean;
phenodataString: string;
private unsubscribe: Subject<any> = new Subject();
constructor(
private sessionDataService: SessionDataService,
private stringModalService: DialogModalService,
private sessionEventService: SessionEventService,
private zone: NgZone,
private restErrorService: RestErrorService,
private spreadsheetService: SpreadsheetService,
private nativeElementService: NativeElementService,
private errorService: ErrorService,
private getSessionDataService: GetSessionDataService,
private datasetService: DatasetService
) {}
@ViewChild("horizontalScroll") horizontalScrollDiv;
ngOnInit() {
this.updateViewAfterDelay();
// update view if someone else has edited the phenodata
this.sessionEventService
.getDatasetStream()
.pipe(takeUntil(this.unsubscribe))
.subscribe(
(event) => {
// TODO if phenodata view starts to use fields other than the phenodata (such as name) and needs to react
// to updates of those fields, add needed changes below. Now event stream causes update only if phenodata
// has been changed
// only react to events of this dataset
if (this.dataset == null || this.dataset.datasetId !== (event.newValue as Dataset)?.datasetId) {
return;
}
// get the latest datasets from the sessionData, because websocket events
// don't update selectedDatasets at the moment
// in this case, could use the one from the event also?
const updatedDataset = this.datasetsMap.get(this.dataset.datasetId);
if (this.datasetService.getOwnPhenodata(updatedDataset) === this.phenodataString) {
return;
}
// someone else has changed phenodata, update
this.updateViewLater();
},
(err) => this.errorService.showError("phenodata update failed", err)
);
}
ngAfterViewInit() {
// not created in modal
if (this.horizontalScrollDiv) {
this.nativeElementService.disableGestures(this.horizontalScrollDiv.nativeElement);
}
}
ngOnChanges(changes: SimpleChanges) {
if (Object.keys(changes).includes("dataset") && this.dataset) {
this.updateViewLater();
}
}
ngOnDestroy() {
this.unsubscribe.next();
this.unsubscribe.complete();
if (this.hot) {
this.zone.runOutsideAngular(() => {
this.hot.destroy();
this.hot = null;
});
}
}
private getWidth(array: string[][], headers: string[]) {
return this.spreadsheetService.guessWidth(headers, array) + 100;
}
private getHeight(array: string[][]) {
return array.length * 23 + 50; // extra for header-row and borders
}
private updateSize(array: string[][], headers: string[]) {
const container = document.getElementById("tableContainer");
container.style.width = this.getWidth(array, headers) + "px";
container.style.height = this.getHeight(array) + "px";
}
private getSettings(array: string[][], headers: string[]) {
const columnSorting = this.sortingEnabled
? {
column: this.sortColumn,
sortOrder: this.sortOrder,
sortEmptyCells: true,
}
: { columnSorting: true };
return {
data: array,
colHeaders: headers,
columnSorting,
manualColumnResize: true,
sortIndicator: true,
rowHeights: 23,
scrollColHeaders: false,
scrollCompatibilityMode: false,
renderAllRows: false,
width: this.getWidth(array, headers),
height: this.getHeight(array),
afterGetColHeader: (col: number, TH: any) => {
if (this.unremovableColumns.includes(headers[col])) {
// removal not allowed
return;
}
this.createRemoveButton(col, TH);
},
afterChange: (changes: any, source: string) => {
/*
Cut two-way binding loops here.
If the user edited the table (source === 'edit'),
then the scope and server must be updated also. The same applies for
'paste' and 'autofill'. The latter are created when copying cells by
dragging the small rectangle in the corner of the selection.
But if the change came from the scope (source === 'loadData'), then
we must not update the scope, because it would create an infinite
loop.
*/
// log.info(source);
if (source === "edit" || source === "Autofill.fill" || source === "CopyPaste.paste") {
this.latestEdit = new Date().getTime();
this.updateDataset();
}
},
};
}
private createRemoveButton(col: number, TH: any) {
const button = document.createElement("A");
button.className = "pull-right";
// use id instead of class to make it more specific than the 'color: inherit' rule in the bootstrap styles
button.id = "phenodata-header-button";
button.innerHTML = "×";
button.addEventListener(
"click",
() => {
this.removeColumn(col);
},
false
);
if (TH.firstChild.lastChild.nodeName === "A") {
TH.firstChild.removeChild(TH.firstChild.lastChild);
}
TH.firstChild.appendChild(button);
}
removeColumn(index: number) {
this.zone.runOutsideAngular(() => {
this.hot.alter("remove_col", index);
});
this.updateDataset();
}
/**
* FIXME Generates server update for each column to be removed, also possibly causes problems when
* receiving updates from server while removing rest of the columns
*
* Maybe refactor so that take unremovable columns and make new phenodata string out of them.
*
*/
reset() {
// do something only if there are removable columns
if (this.headers.some((columnHeader: string) => !this.unremovableColumns.includes(columnHeader))) {
// get indexes of removable columns
const removableColumnIndexces = this.headers
.map((columnHeader: string, index: number) => (!this.unremovableColumns.includes(columnHeader) ? index : -1))
.filter((index) => index !== -1);
// remove columns in reverse order to avoid messing up
removableColumnIndexces.reverse().forEach((index) => this.removeColumn(index));
this.updateViewAfterDelay();
this.updateDataset();
}
}
private updateDataset() {
const phenodataString: string = [this.headers].concat(this.rows).reduce(
(result: string, row: Array<string>) =>
(result +=
row
.reduce((rowString: string, cellValue: string) => {
const cellString = cellValue != null ? cellValue : "";
return rowString + cellString + "\t";
}, "")
.slice(0, -1) + "\n"),
""
);
this.phenodataString = phenodataString;
if (phenodataString !== this.datasetService.getOwnPhenodata(this.dataset)) {
this.datasetService.setPhenodata(this.dataset, phenodataString);
this.sessionDataService.updateDataset(this.dataset).subscribe(
() => log.info("dataset phenodata updated"),
(err) => this.restErrorService.showError("dataset phenodata update failed", err)
);
}
}
private updateViewAfterDelay() {
setTimeout(() => this.updateView(), 200);
}
private updateView() {
this.ready = false;
this.phenodataFilled = false;
this.phenodataAncestor = null;
this.headers = [];
this.rows = [];
// store sorting state
if (this.hot) {
if (this.hot.sortingEnabled) {
this.sortingEnabled = true;
this.sortColumn = this.hot.sortColumn;
this.sortOrder = this.hot.sortOrder;
} else {
this.sortingEnabled = false;
this.sortColumn = null;
this.sortOrder = null;
}
}
// remove old table if this is an update
const container = document.getElementById("tableContainer");
if (!container) {
// timer or event triggered the update
log.info("cancelling the phenodata update, because the container has been removed already");
return;
}
while (container.firstChild) {
container.removeChild(container.firstChild);
}
if (this.dataset == null) {
this.phenodataState = PhenodataState.DATASET_NULL;
this.ready = true;
return;
}
// get the latest datasets from the sessionData, because websocket events
// don't update selectedDatasets at the moment
this.dataset = this.datasetsMap.get(this.dataset.datasetId);
if (this.dataset == null) {
this.phenodataState = PhenodataState.DATASET_NULL;
this.ready = true;
return;
}
// find phenodata for this dataset, could be own or inherited
let phenodataString;
if (this.datasetService.hasOwnPhenodata(this.dataset)) {
phenodataString = this.datasetService.getOwnPhenodata(this.dataset);
this.phenodataState = PhenodataState.OWN_PHENODATA;
this.phenodataFilled = this.datasetService.isPhenodataFilled(this.dataset);
} else {
const ancestorsWithPhenodata = this.getSessionDataService.getAncestorDatasetsWithPhenodata(this.dataset);
if (ancestorsWithPhenodata.length > 0) {
phenodataString = this.datasetService.getOwnPhenodata(ancestorsWithPhenodata[0]);
this.phenodataState = PhenodataState.INHERITED_PHENODATA;
this.phenodataAncestor = ancestorsWithPhenodata[0];
} else {
this.phenodataState = PhenodataState.NO_PHENODATA;
this.ready = true;
return;
}
}
// parse the phenodata string
if (phenodataString != null && phenodataString.length > 0) {
const allRows = d3.tsvParseRows(phenodataString);
this.headers = allRows[0];
this.rows = allRows.length > 1 ? allRows.slice(1) : [];
}
// for now, show the phenodata table only for own phenodata
const settings = this.getSettings(this.rows, this.headers);
if (this.phenodataState === PhenodataState.OWN_PHENODATA) {
this.zone.runOutsideAngular(() => {
this.hot = new Handsontable(container, settings);
});
this.updateSize(this.rows, this.headers);
this.zone.runOutsideAngular(() => {
if (this.hot) {
this.hot.loadData(this.rows);
}
});
}
this.ready = true;
}
private isEditingNow() {
return new Date().getTime() - this.latestEdit < 1000;
}
private updateViewLater() {
if (!this.isEditingNow()) {
this.updateViewAfterDelay();
} else {
/*
Defer updates when the table is being edited
Imagine the following sequence of events:
1. user fills in row 1
2. the changes are pushed to the server
3. user fills in row 2
4. we receive a notification about the first dataset change and update the table,
reverting the users changes on the line 2
5. user fills in row 3
6. the changes are pushed to the server, including the reverted line 2
The probability of this is now considerably reduced by delaying the updates in stage
4 when the table is being edited.
The other option would be to save some edit timestamps or edit sources on the server
so that we could recognize the events that we have create ourselves and wouldn't have
to apply them to the table.
*/
if (this.deferredUpdatesTimerId == null) {
this.deferredUpdatesTimerId = window.setInterval(() => {
if (!this.isEditingNow()) {
window.clearInterval(this.deferredUpdatesTimerId);
this.deferredUpdatesTimerId = null;
this.updateViewAfterDelay();
}
}, 100);
}
}
}
openAddColumnModal() {
this.stringModalService
.openStringModal("Add new column", "Column name", "", "Add")
.pipe(
tap((name) => {
this.zone.runOutsideAngular(() => {
const colHeaders = (this.hot.getSettings() as ht.Options).colHeaders as Array<string>;
this.hot.alter("insert_col", colHeaders.length);
// remove undefined column header
colHeaders.pop();
colHeaders.push(name);
this.hot.updateSettings(
{
colHeaders,
},
false
);
});
this.updateDataset();
})
)
.subscribe(null, (err) => this.restErrorService.showError("Add column failed", err));
}
}
| {
"content_hash": "742e3e895af41f3babd8175a0e7ccdc2",
"timestamp": "",
"source": "github",
"line_count": 441,
"max_line_length": 117,
"avg_line_length": 33.3968253968254,
"alnum_prop": 0.6480173818576861,
"repo_name": "chipster/chipster-web",
"id": "aa4974fb8e2c4b676eca2a964356c8e545d1ab52",
"size": "14728",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/app/views/sessions/session/visualization/phenodata/phenodata-visualization.component.ts",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "32128"
},
{
"name": "HTML",
"bytes": "163643"
},
{
"name": "JavaScript",
"bytes": "3243018"
},
{
"name": "Less",
"bytes": "12673"
},
{
"name": "SCSS",
"bytes": "3214"
},
{
"name": "TypeScript",
"bytes": "1386386"
}
],
"symlink_target": ""
} |
/*!
* Copyright (c) 2015 by Contributors
* \file c_api.h
* \brief C API of mxnet
*/
#ifndef MXNET_C_API_H_
#define MXNET_C_API_H_
/*! \brief Inhibit C++ name-mangling for MXNet functions. */
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
/*! \brief Keep the default value in C++ */
#ifdef __cplusplus
#define DEFAULT(x) = x
#else
#define DEFAULT(x)
#endif // __cplusplus
#include <stdint.h>
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
/*! \brief MXNET_DLL prefix for windows */
#ifdef _WIN32
#ifdef MXNET_EXPORTS
#define MXNET_DLL __declspec(dllexport)
#else
#define MXNET_DLL __declspec(dllimport)
#endif
#else
#define MXNET_DLL
#endif
/*! \brief manually define unsigned int */
typedef unsigned int mx_uint;
/*! \brief manually define float */
typedef float mx_float;
/*! \brief data type to store dim size */
typedef int64_t dim_t;
// all the handles are simply void *
// will be casted internally to specific pointers types
// these typedefs are mainly used for readablity reasons
/*! \brief handle to NDArray */
typedef void *NDArrayHandle;
/*! \brief handle to a mxnet narray function that changes NDArray */
typedef const void *FunctionHandle;
/*! \brief handle to a function that takes param and creates symbol */
typedef void *AtomicSymbolCreator;
/*! \brief handle to cached operator */
typedef void *CachedOpHandle;
/*! \brief handle to a symbol that can be bind as operator */
typedef void *SymbolHandle;
/*! \brief handle to a AtomicSymbol */
typedef void *AtomicSymbolHandle;
/*! \brief handle to an Executor */
typedef void *ExecutorHandle;
/*! \brief handle a dataiter creator */
typedef void *DataIterCreator;
/*! \brief handle to a DataIterator */
typedef void *DataIterHandle;
/*! \brief handle to KVStore */
typedef void *KVStoreHandle;
/*! \brief handle to RecordIO */
typedef void *RecordIOHandle;
/*! \brief handle to MXRtc*/
typedef void *RtcHandle;
/*! \brief handle to rtc cuda module*/
typedef void *CudaModuleHandle;
/*! \brief handle to rtc cuda kernel*/
typedef void *CudaKernelHandle;
/*! \brief handle to a Profile object (domain, duration, counter, etc.) */
typedef void *ProfileHandle;
typedef void (*ExecutorMonitorCallback)(const char*,
NDArrayHandle,
void *);
struct NativeOpInfo {
void (*forward)(int, float**, int*, unsigned**, int*, void*);
void (*backward)(int, float**, int*, unsigned**, int*, void*);
void (*infer_shape)(int, int*, unsigned**, void*);
void (*list_outputs)(char***, void*);
void (*list_arguments)(char***, void*);
// all functions also pass a payload void* pointer
void* p_forward;
void* p_backward;
void* p_infer_shape;
void* p_list_outputs;
void* p_list_arguments;
};
struct NDArrayOpInfo {
bool (*forward)(int, void**, int*, void*);
bool (*backward)(int, void**, int*, void*);
bool (*infer_shape)(int, int*, unsigned**, void*);
bool (*list_outputs)(char***, void*);
bool (*list_arguments)(char***, void*);
bool (*declare_backward_dependency)(const int*, const int*, const int*,
int*, int**, void*);
// all functions also pass a payload void* pointer
void* p_forward;
void* p_backward;
void* p_infer_shape;
void* p_list_outputs;
void* p_list_arguments;
void* p_declare_backward_dependency;
};
typedef int (*MXGenericCallback)(void);
struct MXCallbackList {
int num_callbacks;
int (**callbacks)(void);
void **contexts;
};
enum CustomOpCallbacks {
kCustomOpDelete,
kCustomOpForward,
kCustomOpBackward
};
enum CustomOpPropCallbacks {
kCustomOpPropDelete,
kCustomOpPropListArguments,
kCustomOpPropListOutputs,
kCustomOpPropListAuxiliaryStates,
kCustomOpPropInferShape,
kCustomOpPropDeclareBackwardDependency,
kCustomOpPropCreateOperator,
kCustomOpPropInferType,
kCustomOpPropInferStorageType,
kCustomOpPropBackwardInferStorageType
};
typedef int (*CustomOpFBFunc)(int /*size*/, void** /*ptrs*/, int* /*tags*/,
const int* /*reqs*/, const int /*is_train*/,
void* /*state*/);
typedef int (*CustomOpDelFunc)(void* /*state*/);
typedef int (*CustomOpListFunc)(char*** /*args*/, void* /*state*/);
typedef int (*CustomOpInferShapeFunc)(int /*num_input*/, int* /*ndims*/,
unsigned** /*shapes*/, void* /*state*/);
typedef int (*CustomOpInferStorageTypeFunc)(int /*num_input*/, int* /*stypes*/, void* /*state*/);
typedef int (*CustomOpBackwardInferStorageTypeFunc)(int /*num_input*/,
int * /*stypes*/,
int * /*tags*/,
void * /*state*/);
typedef int (*CustomOpInferTypeFunc)(int /*num_input*/, int* /*types*/, void* /*state*/);
typedef int (*CustomOpBwdDepFunc)(const int* /*out_grad*/, const int* /*in_data*/,
const int* /*out_data*/, int* /*num_deps*/,
int** /*rdeps*/, void* /*state*/);
typedef int (*CustomOpCreateFunc)(const char* /*ctx*/, int /*num_inputs*/,
unsigned** /*shapes*/, const int* /*ndims*/,
const int* /*dtypes*/, struct MXCallbackList* /*ret*/,
void* /*state*/);
typedef int (*CustomOpPropCreator)(const char* /*op_type*/, const int /*num_kwargs*/,
const char** /*keys*/, const char** /*values*/,
struct MXCallbackList* /*ret*/);
enum CustomFunctionCallbacks {
kCustomFunctionBackward,
kCustomFunctionDelete
};
typedef int (*CustomFunctionBwdFunc)(int /*num_ograds*/, int /*num_igrads*/, void** /*ptrs*/,
const int* /*reqs*/, const int /*is_train*/,
void* /*state*/);
typedef int (*CustomFunctionDelFunc)(void* /*state*/);
/*!
* \brief return str message of the last error
* all function in this file will return 0 when success
* and -1 when an error occured,
* MXGetLastError can be called to retrieve the error
*
* this function is threadsafe and can be called by different thread
* \return error info
*/
MXNET_DLL const char *MXGetLastError();
//-------------------------------------
// Part 0: Global State setups
//-------------------------------------
/*!
* \brief Seed all global random number generators in mxnet.
* \param seed the random number seed.
* \return 0 when success, -1 when failure happens.
*/
MXNET_DLL int MXRandomSeed(int seed);
/*!
* \brief Seed the global random number generator of the given device.
* \param seed the random number seed.
* \return 0 when success, -1 when failure happens.
*/
MXNET_DLL int MXRandomSeedContext(int seed, int dev_type, int dev_id);
/*!
* \brief Notify the engine about a shutdown,
* This can help engine to print less messages into display.
*
* User do not have to call this function.
* \return 0 when success, -1 when failure happens.
*/
MXNET_DLL int MXNotifyShutdown();
/*!
* \brief Set up configuration of profiler
* \param num_params Number of parameters
* \param keys array of parameter keys
* \param vals array of parameter values
* \return 0 when success, -1 when failure happens.
*/
MXNET_DLL int MXSetProfilerConfig(int num_params, const char* const* keys, const char* const* vals);
/*!
* \brief Set up state of profiler
* \param state indicate the working state of profiler,
* profiler not running when state == 0,
* profiler running when state == 1
* \return 0 when success, -1 when failure happens.
*/
MXNET_DLL int MXSetProfilerState(int state);
/*!
* \brief Save profile and stop profiler
* \param finished true if stat output should stop after this point
* \return 0 when success, -1 when failure happens.
*/
MXNET_DLL int MXDumpProfile(int finished);
/*!
* \brief Print aggregate stats to the a string
* \param out_str Will receive a pointer to the output string
* \param reset Clear the aggregate stats after printing
* \return 0 when success, -1 when failure happens.
* \note
*/
MXNET_DLL int MXAggregateProfileStatsPrint(const char **out_str, int reset);
/*!
* \brief Pause profiler tuning collection
* \param paused If nonzero, profiling pauses. Otherwise, profiling resumes/continues
* \return 0 when success, -1 when failure happens.
* \note pausing and resuming is global and not recursive
*/
MXNET_DLL int MXProfilePause(int paused);
/*!
* \brief Create profiling domain
* \param domain String representing the domain name to create
* \param out Return domain object
* \return 0 when success, -1 when failure happens.
*/
MXNET_DLL int MXProfileCreateDomain(const char *domain, ProfileHandle *out);
/*!
* \brief Create profile task
* \param name Name of the task
* \param domain Domain of the task
* \param out Output handle
* \return 0 when success, -1 when failure happens.
*/
MXNET_DLL int MXProfileCreateTask(ProfileHandle domain,
const char *task_name,
ProfileHandle *out);
/*!
* \brief Create profile frame
* \param name Name of the frame
* \param domain Domain of the frame
* \param out Output handle
* \return 0 when success, -1 when failure happens.
*/
MXNET_DLL int MXProfileCreateFrame(ProfileHandle domain,
const char *frame_name,
ProfileHandle *out);
/*!
* \brief Create profile event
* \param name Name of the event
* \param out Output handle
* \return 0 when success, -1 when failure happens.
*/
MXNET_DLL int MXProfileCreateEvent(const char *event_name, ProfileHandle *out);
/*!
* \brief Create profile counter
* \param name Name of the counter
* \param domain Domain of the counter
* \param out Output handle
* \return 0 when success, -1 when failure happens.
*/
MXNET_DLL int MXProfileCreateCounter(ProfileHandle domain,
const char *counter_name,
ProfileHandle *out);
/*!
* \brief Destroy a frame
* \param frame_handle Handle to frame to destroy
* \return 0 when success, -1 when failure happens.
*/
MXNET_DLL int MXProfileDestroyHandle(ProfileHandle frame_handle);
/*!
* \brief Start timing the duration of a profile duration object such as an event, task or frame
* \param duration_handle handle to the duration object
* \return 0 when success, -1 when failure happens.
*/
MXNET_DLL int MXProfileDurationStart(ProfileHandle duration_handle);
/*!
* \brief Stop timing the duration of a profile duration object such as an event, task or frame
* \param duration_handle handle to the duration object
* \return 0 when success, -1 when failure happens.
*/
MXNET_DLL int MXProfileDurationStop(ProfileHandle duration_handle);
/*!
* \brief Set a counter, given its handle
* \param counter_handle Handle to counter to set
* \param value Value to set the counter to (64-bit unsigned integer)
* \return 0 when success, -1 when failure happens.
*/
MXNET_DLL int MXProfileSetCounter(ProfileHandle counter_handle, uint64_t value);
/*!
* \brief Adjust a counter by the given amount, given its handle
* \param counter_handle Handle to counter to adjust
* \param value Value to adjust the counter by (64-bit signed integer)
* \return 0 when success, -1 when failure happens.
*/
MXNET_DLL int MXProfileAdjustCounter(ProfileHandle counter_handle, int64_t value);
/*!
* \brief Mark a single instant in time
* \param domain Domain of the marker
* \param instant_marker_name Name of the marker
* \param scope Scope of marker ('global', 'process', 'thread', 'task', 'marker')
* \return 0 when success, -1 when failure happens.
*/
MXNET_DLL int MXProfileSetMarker(ProfileHandle domain,
const char *instant_marker_name,
const char *scope);
/*!
* \brief Set the number of OMP threads to use
* \param thread_num Number of OMP threads desired
* \return 0 when success, -1 when failure happens.
*/
MXNET_DLL int MXSetNumOMPThreads(int thread_num);
/*!
* \brief set bulk execution limit
* \param bulk_size new bulk_size
* \param prev_bulk_size previous bulk_size
*/
MXNET_DLL int MXEngineSetBulkSize(int bulk_size, int* prev_bulk_size);
/*!
* \brief Get the number of GPUs.
* \param pointer to int that will hold the number of GPUs available.
* \return 0 when success, -1 when failure happens.
*/
MXNET_DLL int MXGetGPUCount(int* out);
/*!
* \brief get the MXNet library version as an integer
* \param pointer to the integer holding the version number
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXGetVersion(int *out);
//-------------------------------------
// Part 1: NDArray creation and deletion
//-------------------------------------
/*!
* \brief create a NDArray handle that is not initialized
* can be used to pass in as mutate variables
* to hold the result of NDArray
* \param out the returning handle
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXNDArrayCreateNone(NDArrayHandle *out);
/*!
* \brief create a NDArray with specified shape
* \param shape the pointer to the shape
* \param ndim the dimension of the shape
* \param dev_type device type, specify device we want to take
* \param dev_id the device id of the specific device
* \param delay_alloc whether to delay allocation until
* the narray is first mutated
* \param out the returning handle
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXNDArrayCreate(const mx_uint *shape,
mx_uint ndim,
int dev_type,
int dev_id,
int delay_alloc,
NDArrayHandle *out);
/*!
* \brief create a NDArray with specified shape and data type
* \param shape the pointer to the shape
* \param ndim the dimension of the shape
* \param dev_type device type, specify device we want to take
* \param dev_id the device id of the specific device
* \param delay_alloc whether to delay allocation until
* the narray is first mutated
* \param dtype data type of created array
* \param out the returning handle
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXNDArrayCreateEx(const mx_uint *shape,
mx_uint ndim,
int dev_type,
int dev_id,
int delay_alloc,
int dtype,
NDArrayHandle *out);
/*!
* \brief create an empty sparse NDArray with specified shape and data type
* \param storage_type the storage type of the ndarray
* \param shape the pointer to the shape
* \param ndim the dimension of the shape
* \param dev_type device type, specify device we want to take
* \param dev_id the device id of the specific device
* \param delay_alloc whether to delay allocation until
* the narray is first mutated
* \param dtype data type of created array
* \param num_aux the number of aux data to support this ndarray
* \param aux_type data type of the aux data for the created array
* \param aux_ndims the dimension of the shapes of aux data
* \param aux_shape the shapes of aux data
* \param out the returning handle
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXNDArrayCreateSparseEx(int storage_type,
const mx_uint *shape,
mx_uint ndim,
int dev_type,
int dev_id,
int delay_alloc,
int dtype,
mx_uint num_aux,
int *aux_type,
mx_uint *aux_ndims,
const mx_uint *aux_shape,
NDArrayHandle *out);
/*!
* \brief create a NDArray handle that is loaded from raw bytes.
* \param buf the head of the raw bytes
* \param size size of the raw bytes
* \param out the returning handle
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXNDArrayLoadFromRawBytes(const void *buf,
size_t size,
NDArrayHandle *out);
/*!
* \brief save the NDArray into raw bytes.
* \param handle the NDArray handle
* \param out_size size of the raw bytes
* \param out_buf the head of returning memory bytes.
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXNDArraySaveRawBytes(NDArrayHandle handle,
size_t *out_size,
const char **out_buf);
/*!
* \brief Save list of narray into the file.
* \param fname name of the file.
* \param num_args number of arguments to save.
* \param args the array of NDArrayHandles to be saved.
* \param keys the name of the NDArray, optional, can be NULL
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXNDArraySave(const char* fname,
mx_uint num_args,
NDArrayHandle* args,
const char** keys);
/*!
* \brief Load list of narray from the file.
* \param fname name of the file.
* \param out_size number of narray loaded.
* \param out_arr head of the returning narray handles.
* \param out_name_size size of output name arrray.
* \param out_names the names of returning NDArrays, can be NULL
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXNDArrayLoad(const char* fname,
mx_uint *out_size,
NDArrayHandle** out_arr,
mx_uint *out_name_size,
const char*** out_names);
/*!
* \brief Load list / dictionary of narrays from file content loaded into memory.
* This will load a list of ndarrays in a similar
* manner to MXNDArrayLoad, however, it loads from
* buffer containing the contents of a file, rather than
* from a specified file.
* \param ndarray_buffer pointer to the start of the ndarray file content
* \param size size of the file
* \param out_size number of narray loaded.
* \param out_arr head of the returning narray handles.
* \param out_name_size size of output name arrray.
* \param out_names the names of returning NDArrays, can be NULL
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXNDArrayLoadFromBuffer(const void *ndarray_buffer,
size_t size,
mx_uint *out_size,
NDArrayHandle** out_arr,
mx_uint *out_name_size,
const char*** out_names);
/*!
* \brief Perform a synchronize copy from a continugous CPU memory region.
*
* This function will call WaitToWrite before the copy is performed.
* This is useful to copy data from existing memory region that are
* not wrapped by NDArray(thus dependency not being tracked).
*
* \param handle the NDArray handle
* \param data the data source to copy from.
* \param size the memory size we want to copy from.
*/
MXNET_DLL int MXNDArraySyncCopyFromCPU(NDArrayHandle handle,
const void *data,
size_t size);
/*!
* \brief Perform a synchronize copyto a continugous CPU memory region.
*
* This function will call WaitToRead before the copy is performed.
* This is useful to copy data from existing memory region that are
* not wrapped by NDArray(thus dependency not being tracked).
*
* \param handle the NDArray handle
* \param data the data source to copy into.
* \param size the memory size we want to copy into.
*/
MXNET_DLL int MXNDArraySyncCopyToCPU(NDArrayHandle handle,
void *data,
size_t size);
/*!
* \brief Copy src.data() to dst.data() if i = -1, else dst.aux_data(i) if i >= 0
* This function blocks. Do not use it in performance critical code.
* \param handle_dst handle of a dst ndarray whose data/aux_data has been allocated
* \param handle_src handle of a src ndarray which has default storage type
* \param i dst data blob indicator
*/
MXNET_DLL int MXNDArraySyncCopyFromNDArray(NDArrayHandle handle_dst,
const NDArrayHandle handle_src,
const int i);
/*!
* \brief check whether the NDArray format is valid
* \param full_check if `True`, rigorous check, O(N) operations
* Otherwise basic check, O(1) operations
*/
MXNET_DLL int MXNDArraySyncCheckFormat(NDArrayHandle handle, const bool full_check);
/*!
* \brief Wait until all the pending writes with respect NDArray are finished.
* Always call this before read data out synchronizely.
* \param handle the NDArray handle
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXNDArrayWaitToRead(NDArrayHandle handle);
/*!
* \brief Wait until all the pending read/write with respect NDArray are finished.
* Always call this before write data into NDArray synchronizely.
* \param handle the NDArray handle
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXNDArrayWaitToWrite(NDArrayHandle handle);
/*!
* \brief wait until all delayed operations in
* the system is completed
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXNDArrayWaitAll();
/*!
* \brief free the narray handle
* \param handle the handle to be freed
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXNDArrayFree(NDArrayHandle handle);
/*!
* \brief Slice the NDArray along axis 0.
* \param handle the handle to the NDArray
* \param slice_begin The beginning index of slice
* \param slice_end The ending index of slice
* \param out The NDArrayHandle of sliced NDArray
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXNDArraySlice(NDArrayHandle handle,
mx_uint slice_begin,
mx_uint slice_end,
NDArrayHandle *out);
/*!
* \brief Index the NDArray along axis 0.
* \param handle the handle to the NDArray
* \param idx the index
* \param out The NDArrayHandle of output NDArray
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXNDArrayAt(NDArrayHandle handle,
mx_uint idx,
NDArrayHandle *out);
/*!
* \brief get the storage type of the array
*/
MXNET_DLL int MXNDArrayGetStorageType(NDArrayHandle handle,
int *out_storage_type);
/*!
* \brief Reshape the NDArray.
* \param handle the handle to the narray
* \param ndim number of dimensions of new shape
* \param dims new shape
* \param out the NDArrayHandle of reshaped NDArray
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXNDArrayReshape(NDArrayHandle handle,
int ndim,
int *dims,
NDArrayHandle *out);
/*!
* \brief Reshape the NDArray.
* \param handle the handle to the narray
* \param ndim number of dimensions of new shape
* \param dims new shape
* \param out the NDArrayHandle of reshaped NDArray
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXNDArrayReshape64(NDArrayHandle handle,
int ndim,
dim_t *dims,
bool reverse,
NDArrayHandle *out);
/*!
* \brief get the shape of the array
* \param handle the handle to the narray
* \param out_dim the output dimension
* \param out_pdata pointer holder to get data pointer of the shape
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXNDArrayGetShape(NDArrayHandle handle,
mx_uint *out_dim,
const mx_uint **out_pdata);
/*!
* \brief get the content of the data in NDArray
* \param handle the handle to the ndarray
* \param out_pdata pointer holder to get pointer of data
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXNDArrayGetData(NDArrayHandle handle,
void **out_pdata);
/*!
* \brief get the type of the data in NDArray
* \param handle the handle to the narray
* \param out_dtype pointer holder to get type of data
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXNDArrayGetDType(NDArrayHandle handle,
int *out_dtype);
/*!
* \brief get the type of the ith aux data in NDArray
* \param handle the handle to the narray
* \param i the index of the aux data
* \param out_type pointer holder to get type of aux data
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXNDArrayGetAuxType(NDArrayHandle handle,
mx_uint i,
int *out_type);
/*!
* \brief Get a deep copy of the ith aux data blob
* in the form of an NDArray of default storage type.
* This function blocks. Do not use it in performance critical code.
*/
MXNET_DLL int MXNDArrayGetAuxNDArray(NDArrayHandle handle,
mx_uint i,
NDArrayHandle *out);
/*!
* \brief Get a deep copy of the data blob
* in the form of an NDArray of default storage type.
* This function blocks. Do not use it in performance critical code.
*/
MXNET_DLL int MXNDArrayGetDataNDArray(NDArrayHandle handle,
NDArrayHandle *out);
/*!
* \brief get the context of the NDArray
* \param handle the handle to the narray
* \param out_dev_type the output device type
* \param out_dev_id the output device id
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXNDArrayGetContext(NDArrayHandle handle,
int *out_dev_type,
int *out_dev_id);
/*!
* \brief return gradient buffer attached to this NDArray
* \param handle NDArray handle
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXNDArrayGetGrad(NDArrayHandle handle, NDArrayHandle *out);
/*!
* \brief detach and ndarray from computation graph by clearing entry_
* \param handle NDArray handle
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXNDArrayDetach(NDArrayHandle handle, NDArrayHandle *out);
/*!
* \brief set the flag for gradient array state.
* \param handle NDArray handle
* \param state the new state.
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXNDArraySetGradState(NDArrayHandle handle, int state);
/*!
* \brief set the flag for gradient array state.
* \param handle NDArray handle
* \param state the new state.
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXNDArrayGetGradState(NDArrayHandle handle, int *out);
//--------------------------------
// Part 2: functions on NDArray
//--------------------------------
/*!
* \brief list all the available functions handles
* most user can use it to list all the needed functions
* \param out_size the size of returned array
* \param out_array the output function array
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXListFunctions(mx_uint *out_size,
FunctionHandle **out_array);
/*!
* \brief get the function handle by name
* \param name the name of the function
* \param out the corresponding function handle
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXGetFunction(const char *name,
FunctionHandle *out);
/*!
* \brief Get the information of the function handle.
* \param fun The function handle.
* \param name The returned name of the function.
* \param description The returned description of the function.
* \param num_args Number of arguments.
* \param arg_names Name of the arguments.
* \param arg_type_infos Type information about the arguments.
* \param arg_descriptions Description information about the arguments.
* \param return_type Return type of the function.
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXFuncGetInfo(FunctionHandle fun,
const char **name,
const char **description,
mx_uint *num_args,
const char ***arg_names,
const char ***arg_type_infos,
const char ***arg_descriptions,
const char **return_type DEFAULT(NULL));
/*!
* \brief get the argument requirements of the function
* \param fun input function handle
* \param num_use_vars how many NDArrays to be passed in as used_vars
* \param num_scalars scalar variable is needed
* \param num_mutate_vars how many NDArrays to be passed in as mutate_vars
* \param type_mask the type mask of this function
* \return 0 when success, -1 when failure happens
* \sa MXFuncInvoke
*/
MXNET_DLL int MXFuncDescribe(FunctionHandle fun,
mx_uint *num_use_vars,
mx_uint *num_scalars,
mx_uint *num_mutate_vars,
int *type_mask);
/*!
* \brief invoke a function, the array size of passed in arguments
* must match the values in the
* \param fun the function
* \param use_vars the normal arguments passed to function
* \param scalar_args the scalar qarguments
* \param mutate_vars the mutate arguments
* \return 0 when success, -1 when failure happens
* \sa MXFuncDescribeArgs
*/
MXNET_DLL int MXFuncInvoke(FunctionHandle fun,
NDArrayHandle *use_vars,
mx_float *scalar_args,
NDArrayHandle *mutate_vars);
/*!
* \brief invoke a function, the array size of passed in arguments
* must match the values in the
* \param fun the function
* \param use_vars the normal arguments passed to function
* \param scalar_args the scalar qarguments
* \param mutate_vars the mutate arguments
* \param num_params number of keyword parameters
* \param param_keys keys for keyword parameters
* \param param_vals values for keyword parameters
* \return 0 when success, -1 when failure happens
* \sa MXFuncDescribeArgs
*/
MXNET_DLL int MXFuncInvokeEx(FunctionHandle fun,
NDArrayHandle *use_vars,
mx_float *scalar_args,
NDArrayHandle *mutate_vars,
int num_params,
char **param_keys,
char **param_vals);
/*!
* \brief invoke a nnvm op and imperative function
* \param creator the op
* \param num_inputs number of input NDArrays
* \param inputs input NDArrays
* \param num_outputs number of output NDArrays
* \param outputs output NDArrays
* \param num_params number of keyword parameters
* \param param_keys keys for keyword parameters
* \param param_vals values for keyword parameters
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXImperativeInvoke(AtomicSymbolCreator creator,
int num_inputs,
NDArrayHandle *inputs,
int *num_outputs,
NDArrayHandle **outputs,
int num_params,
const char **param_keys,
const char **param_vals);
/*!
* \brief invoke a nnvm op and imperative function
* \param creator the op
* \param num_inputs number of input NDArrays
* \param inputs input NDArrays
* \param num_outputs number of output NDArrays
* \param outputs output NDArrays
* \param num_params number of keyword parameters
* \param param_keys keys for keyword parameters
* \param param_vals values for keyword parameters
* \param out_stypes output ndarrays' stypes
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXImperativeInvokeEx(AtomicSymbolCreator creator,
int num_inputs,
NDArrayHandle *inputs,
int *num_outputs,
NDArrayHandle **outputs,
int num_params,
const char **param_keys,
const char **param_vals,
const int **out_stypes);
/*!
* \brief set whether to record operator for autograd
* \param is_recording 1 when recording, 0 when not recording.
* \param prev returns the previous status before this set.
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXAutogradSetIsRecording(int is_recording, int* prev);
/*!
* \brief set whether to record operator for autograd
* \param is_training 1 when training, 0 when testing
* \param prev returns the previous status before this set.
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXAutogradSetIsTraining(int is_training, int* prev);
/*!
* \brief get whether autograd recording is on
* \param curr returns the current status.
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXAutogradIsRecording(bool* curr);
/*!
* \brief get whether training mode is on
* \param curr returns the current status.
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXAutogradIsTraining(bool* curr);
/*!
* \brief mark NDArrays as variables to compute gradient for autograd
* \param num_var number of variable NDArrays
* \param var_handles variable NDArrays
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXAutogradMarkVariables(mx_uint num_var,
NDArrayHandle *var_handles,
mx_uint *reqs_array,
NDArrayHandle *grad_handles);
/*!
* \brief compute the gradient of outputs w.r.t variabels
* \param num_output number of output NDArray
* \param output_handles output NDArrays
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXAutogradComputeGradient(mx_uint num_output,
NDArrayHandle* output_handles);
/*!
* \brief compute the gradient of outputs w.r.t variabels
* \param num_output number of output NDArray
* \param output_handles output NDArrays
* \param ograd_handles head gradient for NDArrays
* \param retain_graph whether to keep the graph after backward
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXAutogradBackward(mx_uint num_output,
NDArrayHandle* output_handles,
NDArrayHandle* ograd_handles,
int retain_graph);
/*!
* \brief compute the gradient of outputs w.r.t variabels
* \param num_output number of output NDArray
* \param output_handles output NDArrays
* \param ograd_handles head gradient for NDArrays
* \param num_variables number of variables
* \param
* \param retain_graph whether to keep the graph after backward
* \param is_train whether to do backward for training or inference
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXAutogradBackwardEx(mx_uint num_output,
NDArrayHandle *output_handles,
NDArrayHandle *ograd_handles,
mx_uint num_variables,
NDArrayHandle *var_handles,
int retain_graph,
int create_graph,
int is_train,
NDArrayHandle **grad_handles,
int **grad_stypes);
/*
* \brief get the graph constructed by autograd.
* \param handle ndarray handle
* \param out output symbol handle
*/
MXNET_DLL int MXAutogradGetSymbol(NDArrayHandle handle, SymbolHandle *out);
/*!
* \brief create cached operator
*/
MXNET_DLL int MXCreateCachedOp(SymbolHandle handle, CachedOpHandle *out);
/*!
* \brief create cached operator
*/
MXNET_DLL int MXCreateCachedOpEx(SymbolHandle handle,
int num_flags,
const char** keys,
const char** vals,
CachedOpHandle *out);
/*!
* \brief free cached operator
*/
MXNET_DLL int MXFreeCachedOp(CachedOpHandle handle);
/*!
* \brief invoke cached operator
*/
MXNET_DLL int MXInvokeCachedOp(CachedOpHandle handle,
int num_inputs,
NDArrayHandle *inputs,
int *num_outputs,
NDArrayHandle **outputs);
/*!
* \brief invoke a cached op
* \param handle the handle to the cached op
* \param num_inputs number of input NDArrays
* \param inputs input NDArrays
* \param num_outputs number of output NDArrays
* \param outputs output NDArrays
* \param out_stypes output ndarrays' stypes
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXInvokeCachedOpEx(CachedOpHandle handle,
int num_inputs,
NDArrayHandle *inputs,
int *num_outputs,
NDArrayHandle **outputs,
const int** out_stypes);
/*!
* \brief invoke cached operator
*/
MXNET_DLL int MXInvokeCachedOp(CachedOpHandle handle,
int num_inputs,
NDArrayHandle *inputs,
int *num_outputs,
NDArrayHandle **outputs);
//--------------------------------------------
// Part 3: symbolic configuration generation
//--------------------------------------------
/*!
* \brief list all the available operator names, include entries.
* \param out_size the size of returned array
* \param out_array the output operator name array.
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXListAllOpNames(mx_uint *out_size,
const char ***out_array);
/*!
* \brief list all the available AtomicSymbolEntry
* \param out_size the size of returned array
* \param out_array the output AtomicSymbolCreator array
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXSymbolListAtomicSymbolCreators(mx_uint *out_size,
AtomicSymbolCreator **out_array);
/*!
* \brief Get the name of an atomic symbol.
* \param creator the AtomicSymbolCreator.
* \param name The returned name of the creator.
*/
MXNET_DLL int MXSymbolGetAtomicSymbolName(AtomicSymbolCreator creator,
const char **name);
/*!
* \brief Get the input symbols of the graph.
* \param sym The graph.
* \param inputs The input symbols of the graph.
* \param input_size the number of input symbols returned.
*/
MXNET_DLL int MXSymbolGetInputSymbols(SymbolHandle sym, SymbolHandle **inputs,
int *input_size);
/*!
* \brief Cut a subgraph whose nodes are marked with a subgraph attribute.
* The input graph will be modified. A variable node will be created for each
* edge that connects to nodes outside the subgraph. The outside nodes that
* connect to the subgraph will be returned.
* \param sym The graph.
* \param inputs The nodes that connect to the subgraph.
* \param input_size The number of such nodes.
*/
MXNET_DLL int MXSymbolCutSubgraph(SymbolHandle sym, SymbolHandle **inputs,
int *input_size);
/*!
* \brief Get the detailed information about atomic symbol.
* \param creator the AtomicSymbolCreator.
* \param name The returned name of the creator.
* \param description The returned description of the symbol.
* \param num_args Number of arguments.
* \param arg_names Name of the arguments.
* \param arg_type_infos Type informations about the arguments.
* \param arg_descriptions Description information about the arguments.
* \param key_var_num_args The keyword argument for specifying variable number of arguments.
* When this parameter has non-zero length, the function allows variable number
* of positional arguments, and will need the caller to pass it in in
* MXSymbolCreateAtomicSymbol,
* With key = key_var_num_args, and value = number of positional arguments.
* \param return_type Return type of the function, can be Symbol or Symbol[]
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXSymbolGetAtomicSymbolInfo(AtomicSymbolCreator creator,
const char **name,
const char **description,
mx_uint *num_args,
const char ***arg_names,
const char ***arg_type_infos,
const char ***arg_descriptions,
const char **key_var_num_args,
const char **return_type DEFAULT(NULL));
/*!
* \brief Create an AtomicSymbol.
* \param creator the AtomicSymbolCreator
* \param num_param the number of parameters
* \param keys the keys to the params
* \param vals the vals of the params
* \param out pointer to the created symbol handle
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXSymbolCreateAtomicSymbol(AtomicSymbolCreator creator,
mx_uint num_param,
const char **keys,
const char **vals,
SymbolHandle *out);
/*!
* \brief Create a Variable Symbol.
* \param name name of the variable
* \param out pointer to the created symbol handle
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXSymbolCreateVariable(const char *name, SymbolHandle *out);
/*!
* \brief Create a Symbol by grouping list of symbols together
* \param num_symbols number of symbols to be grouped
* \param symbols array of symbol handles
* \param out pointer to the created symbol handle
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXSymbolCreateGroup(mx_uint num_symbols,
SymbolHandle *symbols,
SymbolHandle *out);
/*!
* \brief Load a symbol from a json file.
* \param fname the file name.
* \param out the output symbol.
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXSymbolCreateFromFile(const char *fname, SymbolHandle *out);
/*!
* \brief Load a symbol from a json string.
* \param json the json string.
* \param out the output symbol.
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXSymbolCreateFromJSON(const char *json, SymbolHandle *out);
/*!
* \brief Save a symbol into a json file.
* \param symbol the input symbol.
* \param fname the file name.
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXSymbolSaveToFile(SymbolHandle symbol, const char *fname);
/*!
* \brief Save a symbol into a json string
* \param symbol the input symbol.
* \param out_json output json string.
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXSymbolSaveToJSON(SymbolHandle symbol, const char **out_json);
/*!
* \brief Free the symbol handle.
* \param symbol the symbol
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXSymbolFree(SymbolHandle symbol);
/*!
* \brief Copy the symbol to another handle
* \param symbol the source symbol
* \param out used to hold the result of copy
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXSymbolCopy(SymbolHandle symbol, SymbolHandle *out);
/*!
* \brief Print the content of symbol, used for debug.
* \param symbol the symbol
* \param out_str pointer to hold the output string of the printing.
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXSymbolPrint(SymbolHandle symbol, const char **out_str);
/*!
* \brief Get string name from symbol
* \param symbol the source symbol
* \param out The result name.
* \param success Whether the result is contained in out.
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXSymbolGetName(SymbolHandle symbol,
const char** out,
int *success);
/*!
* \brief Get string attribute from symbol
* \param symbol the source symbol
* \param key The key of the symbol.
* \param out The result attribute, can be NULL if the attribute do not exist.
* \param success Whether the result is contained in out.
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXSymbolGetAttr(SymbolHandle symbol,
const char* key,
const char** out,
int *success);
/*!
* \brief Set string attribute from symbol.
* NOTE: Setting attribute to a symbol can affect the semantics(mutable/immutable) of symbolic graph.
*
* Safe recommendaton: use immutable graph
* - Only allow set attributes during creation of new symbol as optional parameter
*
* Mutable graph (be careful about the semantics):
* - Allow set attr at any point.
* - Mutating an attribute of some common node of two graphs can cause confusion from user.
*
* \param symbol the source symbol
* \param key The key of the symbol.
* \param value The value to be saved.
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXSymbolSetAttr(SymbolHandle symbol,
const char* key,
const char* value);
/*!
* \brief Get all attributes from symbol, including all descendents.
* \param symbol the source symbol
* \param out_size The number of output attributes
* \param out 2*out_size strings representing key value pairs.
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXSymbolListAttr(SymbolHandle symbol,
mx_uint *out_size,
const char*** out);
/*!
* \brief Get all attributes from symbol, excluding descendents.
* \param symbol the source symbol
* \param out_size The number of output attributes
* \param out 2*out_size strings representing key value pairs.
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXSymbolListAttrShallow(SymbolHandle symbol,
mx_uint *out_size,
const char*** out);
/*!
* \brief List arguments in the symbol.
* \param symbol the symbol
* \param out_size output size
* \param out_str_array pointer to hold the output string array
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXSymbolListArguments(SymbolHandle symbol,
mx_uint *out_size,
const char ***out_str_array);
/*!
* \brief List returns in the symbol.
* \param symbol the symbol
* \param out_size output size
* \param out_str_array pointer to hold the output string array
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXSymbolListOutputs(SymbolHandle symbol,
mx_uint *out_size,
const char ***out_str_array);
/*!
* \brief Get number of outputs of the symbol.
* \param symbol The symbol
* \param out_size number of outputs
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXSymbolGetNumOutputs(SymbolHandle symbol,
mx_uint *output_count);
/*!
* \brief Get a symbol that contains all the internals.
* \param symbol The symbol
* \param out The output symbol whose outputs are all the internals.
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXSymbolGetInternals(SymbolHandle symbol,
SymbolHandle *out);
/*!
* \brief Get a symbol that contains only direct children.
* \param symbol The symbol
* \param out The output symbol whose outputs are the direct children.
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXSymbolGetChildren(SymbolHandle symbol,
SymbolHandle *out);
/*!
* \brief Get index-th outputs of the symbol.
* \param symbol The symbol
* \param index the Index of the output.
* \param out The output symbol whose outputs are the index-th symbol.
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXSymbolGetOutput(SymbolHandle symbol,
mx_uint index,
SymbolHandle *out);
/*!
* \brief List auxiliary states in the symbol.
* \param symbol the symbol
* \param out_size output size
* \param out_str_array pointer to hold the output string array
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXSymbolListAuxiliaryStates(SymbolHandle symbol,
mx_uint *out_size,
const char ***out_str_array);
/*!
* \brief Compose the symbol on other symbols.
*
* This function will change the sym hanlde.
* To achieve function apply behavior, copy the symbol first
* before apply.
*
* \param sym the symbol to apply
* \param name the name of symbol
* \param num_args number of arguments
* \param keys the key of keyword args (optional)
* \param args arguments to sym
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXSymbolCompose(SymbolHandle sym,
const char *name,
mx_uint num_args,
const char** keys,
SymbolHandle* args);
/*!
* \brief Get the gradient graph of the symbol
*
* \param sym the symbol to get gradient
* \param num_wrt number of arguments to get gradient
* \param wrt the name of the arguments to get gradient
* \param out the returned symbol that has gradient
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXSymbolGrad(SymbolHandle sym,
mx_uint num_wrt,
const char** wrt,
SymbolHandle* out);
/*!
* \brief infer shape of unknown input shapes given the known one.
* The shapes are packed into a CSR matrix represented by arg_ind_ptr and arg_shape_data
* The call will be treated as a kwargs call if key != nullptr or num_args==0, otherwise it is positional.
*
* \param sym symbol handle
* \param num_args numbe of input arguments.
* \param keys the key of keyword args (optional)
* \param arg_ind_ptr the head pointer of the rows in CSR
* \param arg_shape_data the content of the CSR
* \param in_shape_size sizeof the returning array of in_shapes
* \param in_shape_ndim returning array of shape dimensions of eachs input shape.
* \param in_shape_data returning array of pointers to head of the input shape.
* \param out_shape_size sizeof the returning array of out_shapes
* \param out_shape_ndim returning array of shape dimensions of eachs input shape.
* \param out_shape_data returning array of pointers to head of the input shape.
* \param aux_shape_size sizeof the returning array of aux_shapes
* \param aux_shape_ndim returning array of shape dimensions of eachs auxiliary shape.
* \param aux_shape_data returning array of pointers to head of the auxiliary shape.
* \param complete whether infer shape completes or more information is needed.
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXSymbolInferShape(SymbolHandle sym,
mx_uint num_args,
const char** keys,
const mx_uint *arg_ind_ptr,
const mx_uint *arg_shape_data,
mx_uint *in_shape_size,
const mx_uint **in_shape_ndim,
const mx_uint ***in_shape_data,
mx_uint *out_shape_size,
const mx_uint **out_shape_ndim,
const mx_uint ***out_shape_data,
mx_uint *aux_shape_size,
const mx_uint **aux_shape_ndim,
const mx_uint ***aux_shape_data,
int *complete);
/*!
* \brief partially infer shape of unknown input shapes given the known one.
*
* Return partially inferred results if not all shapes could be inferred.
* The shapes are packed into a CSR matrix represented by arg_ind_ptr and arg_shape_data
* The call will be treated as a kwargs call if key != nullptr or num_args==0, otherwise it is positional.
*
* \param sym symbol handle
* \param num_args numbe of input arguments.
* \param keys the key of keyword args (optional)
* \param arg_ind_ptr the head pointer of the rows in CSR
* \param arg_shape_data the content of the CSR
* \param in_shape_size sizeof the returning array of in_shapes
* \param in_shape_ndim returning array of shape dimensions of eachs input shape.
* \param in_shape_data returning array of pointers to head of the input shape.
* \param out_shape_size sizeof the returning array of out_shapes
* \param out_shape_ndim returning array of shape dimensions of eachs input shape.
* \param out_shape_data returning array of pointers to head of the input shape.
* \param aux_shape_size sizeof the returning array of aux_shapes
* \param aux_shape_ndim returning array of shape dimensions of eachs auxiliary shape.
* \param aux_shape_data returning array of pointers to head of the auxiliary shape.
* \param complete whether infer shape completes or more information is needed.
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXSymbolInferShapePartial(SymbolHandle sym,
mx_uint num_args,
const char** keys,
const mx_uint *arg_ind_ptr,
const mx_uint *arg_shape_data,
mx_uint *in_shape_size,
const mx_uint **in_shape_ndim,
const mx_uint ***in_shape_data,
mx_uint *out_shape_size,
const mx_uint **out_shape_ndim,
const mx_uint ***out_shape_data,
mx_uint *aux_shape_size,
const mx_uint **aux_shape_ndim,
const mx_uint ***aux_shape_data,
int *complete);
/*!
* \brief infer type of unknown input types given the known one.
* The types are packed into a CSR matrix represented by arg_ind_ptr and arg_type_data
* The call will be treated as a kwargs call if key != nullptr or num_args==0, otherwise it is positional.
*
* \param sym symbol handle
* \param num_args numbe of input arguments.
* \param keys the key of keyword args (optional)
* \param arg_type_data the content of the CSR
* \param in_type_size sizeof the returning array of in_types
* \param in_type_data returning array of pointers to head of the input type.
* \param out_type_size sizeof the returning array of out_types
* \param out_type_data returning array of pointers to head of the input type.
* \param aux_type_size sizeof the returning array of aux_types
* \param aux_type_data returning array of pointers to head of the auxiliary type.
* \param complete whether infer type completes or more information is needed.
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXSymbolInferType(SymbolHandle sym,
mx_uint num_args,
const char** keys,
const int *arg_type_data,
mx_uint *in_type_size,
const int **in_type_data,
mx_uint *out_type_size,
const int **out_type_data,
mx_uint *aux_type_size,
const int **aux_type_data,
int *complete);
/*!
* \brief Convert a symbol into a quantized symbol where FP32 operators are replaced with INT8
* \param sym_handle symbol to be converted
* \param ret_sym_handle quantized symbol result
* \param num_excluded_symbols number of layers excluded from being quantized in the input symbol
* \param excluded_symbols array of symbols to be excluded from being quantized
* \param num_offline number of parameters that are quantized offline
* \param offline_params array of c strings representing the names of params quantized offline
* \param quantized_dtype the quantized destination type for input data.
*/
MXNET_DLL int MXQuantizeSymbol(SymbolHandle sym_handle,
SymbolHandle *ret_sym_handle,
const mx_uint num_excluded_symbols,
const SymbolHandle *excluded_symbols,
const mx_uint num_offline,
const char **offline_params,
const char *quantized_dtype);
/*!
* \brief Set calibration table to node attributes in the sym
* \param sym_handle symbol whose node attributes are to be set by calibration table
* \param num_layers number of layers in the calibration table
* \param layer names stored as keys in the calibration table
* \param low_quantiles low quantiles of layers stored in the calibration table
* \param high_quantiles high quantiles of layers stored in the calibration table
* \param ret_sym_handle returned symbol
*/
MXNET_DLL int MXSetCalibTableToQuantizedSymbol(SymbolHandle qsym_handle,
const mx_uint num_layers,
const char** layer_names,
const float* low_quantiles,
const float* high_quantiles,
SymbolHandle* ret_sym_handle);
//--------------------------------------------
// Part 4: Executor interface
//--------------------------------------------
/*!
* \brief Delete the executor
* \param handle the executor.
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXExecutorFree(ExecutorHandle handle);
/*!
* \brief Print the content of execution plan, used for debug.
* \param handle the executor.
* \param out_str pointer to hold the output string of the printing.
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXExecutorPrint(ExecutorHandle handle, const char **out_str);
/*!
* \brief Executor forward method
*
* \param handle executor handle
* \param is_train int value to indicate whether the forward pass is for evaluation
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXExecutorForward(ExecutorHandle handle, int is_train);
/*!
* \brief Excecutor run backward
*
* \param handle execute handle
* \param len lenth
* \param head_grads NDArray handle for heads' gradient
*
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXExecutorBackward(ExecutorHandle handle,
mx_uint len,
NDArrayHandle *head_grads);
/*!
* \brief Excecutor run backward
*
* \param handle execute handle
* \param len lenth
* \param head_grads NDArray handle for heads' gradient
* \param is_train int value to indicate whether the backward pass is for evaluation
*
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXExecutorBackwardEx(ExecutorHandle handle,
mx_uint len,
NDArrayHandle *head_grads,
int is_train);
/*!
* \brief Get executor's head NDArray
*
* \param handle executor handle
* \param out_size output narray vector size
* \param out out put narray handles
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXExecutorOutputs(ExecutorHandle handle,
mx_uint *out_size,
NDArrayHandle **out);
/*!
* \brief Generate Executor from symbol
*
* \param symbol_handle symbol handle
* \param dev_type device type
* \param dev_id device id
* \param len length
* \param in_args in args array
* \param arg_grad_store arg grads handle array
* \param grad_req_type grad req array
* \param aux_states_len length of auxiliary states
* \param aux_states auxiliary states array
* \param out output executor handle
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXExecutorBind(SymbolHandle symbol_handle,
int dev_type,
int dev_id,
mx_uint len,
NDArrayHandle *in_args,
NDArrayHandle *arg_grad_store,
mx_uint *grad_req_type,
mx_uint aux_states_len,
NDArrayHandle *aux_states,
ExecutorHandle *out);
/*!
* \brief Generate Executor from symbol,
* This is advanced function, allow specify group2ctx map.
* The user can annotate "ctx_group" attribute to name each group.
*
* \param symbol_handle symbol handle
* \param dev_type device type of default context
* \param dev_id device id of default context
* \param num_map_keys size of group2ctx map
* \param map_keys keys of group2ctx map
* \param map_dev_types device type of group2ctx map
* \param map_dev_ids device id of group2ctx map
* \param len length
* \param in_args in args array
* \param arg_grad_store arg grads handle array
* \param grad_req_type grad req array
* \param aux_states_len length of auxiliary states
* \param aux_states auxiliary states array
* \param out output executor handle
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXExecutorBindX(SymbolHandle symbol_handle,
int dev_type,
int dev_id,
mx_uint num_map_keys,
const char** map_keys,
const int* map_dev_types,
const int* map_dev_ids,
mx_uint len,
NDArrayHandle *in_args,
NDArrayHandle *arg_grad_store,
mx_uint *grad_req_type,
mx_uint aux_states_len,
NDArrayHandle *aux_states,
ExecutorHandle *out);
/*!
* \brief Generate Executor from symbol,
* This is advanced function, allow specify group2ctx map.
* The user can annotate "ctx_group" attribute to name each group.
*
* \param symbol_handle symbol handle
* \param dev_type device type of default context
* \param dev_id device id of default context
* \param num_map_keys size of group2ctx map
* \param map_keys keys of group2ctx map
* \param map_dev_types device type of group2ctx map
* \param map_dev_ids device id of group2ctx map
* \param len length
* \param in_args in args array
* \param arg_grad_store arg grads handle array
* \param grad_req_type grad req array
* \param aux_states_len length of auxiliary states
* \param aux_states auxiliary states array
* \param shared_exec input executor handle for memory sharing
* \param out output executor handle
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXExecutorBindEX(SymbolHandle symbol_handle,
int dev_type,
int dev_id,
mx_uint num_map_keys,
const char** map_keys,
const int* map_dev_types,
const int* map_dev_ids,
mx_uint len,
NDArrayHandle *in_args,
NDArrayHandle *arg_grad_store,
mx_uint *grad_req_type,
mx_uint aux_states_len,
NDArrayHandle *aux_states,
ExecutorHandle shared_exec,
ExecutorHandle *out);
MXNET_DLL int MXExecutorSimpleBind(SymbolHandle symbol_handle,
int dev_type,
int dev_id,
const mx_uint num_g2c_keys,
const char** g2c_keys,
const int* g2c_dev_types,
const int* g2c_dev_ids,
const mx_uint provided_grad_req_list_len,
const char** provided_grad_req_names,
const char** provided_grad_req_types,
const mx_uint num_provided_arg_shapes,
const char** provided_arg_shape_names,
const mx_uint* provided_arg_shape_data,
const mx_uint* provided_arg_shape_idx,
const mx_uint num_provided_arg_dtypes,
const char** provided_arg_dtype_names,
const int* provided_arg_dtypes,
const mx_uint num_provided_arg_stypes,
const char** provided_arg_stype_names,
const int* provided_arg_stypes,
const mx_uint num_shared_arg_names,
const char** shared_arg_name_list,
int* shared_buffer_len,
const char** shared_buffer_name_list,
NDArrayHandle* shared_buffer_handle_list,
const char*** updated_shared_buffer_name_list,
NDArrayHandle** updated_shared_buffer_handle_list,
mx_uint* num_in_args,
NDArrayHandle** in_args,
NDArrayHandle** arg_grads,
mx_uint* num_aux_states,
NDArrayHandle** aux_states,
ExecutorHandle shared_exec_handle,
ExecutorHandle* out);
/*!
* \brief Return a new executor with the same symbol and shared memory,
* but different input/output shapes.
*
* \param partial_shaping Whether to allow changing the shape of unspecified arguments.
* \param allow_up_sizing Whether to allow allocating new ndarrays that's larger than the original.
* \param dev_type device type of default context
* \param dev_id device id of default context
* \param num_map_keys size of group2ctx map
* \param map_keys keys of group2ctx map
* \param map_dev_types device type of group2ctx map
* \param map_dev_ids device id of group2ctx map
* \param num_in_args length of in_args
* \param in_args in args array
* \param arg_grads arg grads handle array
* \param num_aux_states length of auxiliary states
* \param aux_states auxiliary states array
* \param shared_exec input executor handle for memory sharing
* \param out output executor handle
* \return a new executor
*/
MXNET_DLL int MXExecutorReshape(int partial_shaping,
int allow_up_sizing,
int dev_type,
int dev_id,
mx_uint num_map_keys,
const char** map_keys,
const int* map_dev_types,
const int* map_dev_ids,
const mx_uint num_provided_arg_shapes,
const char** provided_arg_shape_names,
const mx_uint* provided_arg_shape_data,
const mx_uint* provided_arg_shape_idx,
mx_uint* num_in_args,
NDArrayHandle** in_args,
NDArrayHandle** arg_grads,
mx_uint* num_aux_states,
NDArrayHandle** aux_states,
ExecutorHandle shared_exec,
ExecutorHandle *out);
/*!
* \brief set a call back to notify the completion of operation
*/
MXNET_DLL int MXExecutorSetMonitorCallback(ExecutorHandle handle,
ExecutorMonitorCallback callback,
void* callback_handle);
//--------------------------------------------
// Part 5: IO Interface
//--------------------------------------------
/*!
* \brief List all the available iterator entries
* \param out_size the size of returned iterators
* \param out_array the output iteratos entries
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXListDataIters(mx_uint *out_size,
DataIterCreator **out_array);
/*!
* \brief Init an iterator, init with parameters
* the array size of passed in arguments
* \param handle of the iterator creator
* \param num_param number of parameter
* \param keys parameter keys
* \param vals parameter values
* \param out resulting iterator
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXDataIterCreateIter(DataIterCreator handle,
mx_uint num_param,
const char **keys,
const char **vals,
DataIterHandle *out);
/*!
* \brief Get the detailed information about data iterator.
* \param creator the DataIterCreator.
* \param name The returned name of the creator.
* \param description The returned description of the symbol.
* \param num_args Number of arguments.
* \param arg_names Name of the arguments.
* \param arg_type_infos Type informations about the arguments.
* \param arg_descriptions Description information about the arguments.
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXDataIterGetIterInfo(DataIterCreator creator,
const char **name,
const char **description,
mx_uint *num_args,
const char ***arg_names,
const char ***arg_type_infos,
const char ***arg_descriptions);
/*!
* \brief Free the handle to the IO module
* \param handle the handle pointer to the data iterator
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXDataIterFree(DataIterHandle handle);
/*!
* \brief Move iterator to next position
* \param handle the handle to iterator
* \param out return value of next
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXDataIterNext(DataIterHandle handle,
int *out);
/*!
* \brief Call iterator.Reset
* \param handle the handle to iterator
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXDataIterBeforeFirst(DataIterHandle handle);
/*!
* \brief Get the handle to the NDArray of underlying data
* \param handle the handle pointer to the data iterator
* \param out handle to underlying data NDArray
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXDataIterGetData(DataIterHandle handle,
NDArrayHandle *out);
/*!
* \brief Get the image index by array.
* \param handle the handle pointer to the data iterator
* \param out_index output index of the array.
* \param out_size output size of the array.
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXDataIterGetIndex(DataIterHandle handle,
uint64_t **out_index,
uint64_t *out_size);
/*!
* \brief Get the padding number in current data batch
* \param handle the handle pointer to the data iterator
* \param pad pad number ptr
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXDataIterGetPadNum(DataIterHandle handle,
int *pad);
/*!
* \brief Get the handle to the NDArray of underlying label
* \param handle the handle pointer to the data iterator
* \param out the handle to underlying label NDArray
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXDataIterGetLabel(DataIterHandle handle,
NDArrayHandle *out);
//--------------------------------------------
// Part 6: basic KVStore interface
//--------------------------------------------
/*!
* \brief Initialized ps-lite environment variables
* \param num_vars number of variables to initialize
* \param keys environment keys
* \param vals environment values
*/
MXNET_DLL int MXInitPSEnv(mx_uint num_vars,
const char **keys,
const char **vals);
/*!
* \brief Create a kvstore
* \param type the type of KVStore
* \param out The output type of KVStore
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXKVStoreCreate(const char *type,
KVStoreHandle *out);
/*!
* \brief Set parameters to use low-bit compressed gradients
* \param handle handle to the kvstore
* \param keys keys for compression parameters
* \param vals values for compression parameters
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXKVStoreSetGradientCompression(KVStoreHandle handle,
mx_uint num_params,
const char** keys,
const char** vals);
/*!
* \brief Delete a KVStore handle.
* \param handle handle to the kvstore
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXKVStoreFree(KVStoreHandle handle);
/*!
* \brief Init a list of (key,value) pairs in kvstore
* \param handle handle to the kvstore
* \param num the number of key-value pairs
* \param keys the list of keys
* \param vals the list of values
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXKVStoreInit(KVStoreHandle handle,
mx_uint num,
const int* keys,
NDArrayHandle* vals);
/*!
* \brief Init a list of (key,value) pairs in kvstore, where each key is a string
* \param handle handle to the kvstore
* \param num the number of key-value pairs
* \param keys the list of keys
* \param vals the list of values
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXKVStoreInitEx(KVStoreHandle handle,
mx_uint num,
const char** keys,
NDArrayHandle* vals);
/*!
* \brief Push a list of (key,value) pairs to kvstore
* \param handle handle to the kvstore
* \param num the number of key-value pairs
* \param keys the list of keys
* \param vals the list of values
* \param priority the priority of the action
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXKVStorePush(KVStoreHandle handle,
mx_uint num,
const int* keys,
NDArrayHandle* vals,
int priority);
/*!
* \brief Push a list of (key,value) pairs to kvstore, where each key is a string
* \param handle handle to the kvstore
* \param num the number of key-value pairs
* \param keys the list of keys
* \param vals the list of values
* \param priority the priority of the action
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXKVStorePushEx(KVStoreHandle handle,
mx_uint num,
const char** keys,
NDArrayHandle* vals,
int priority);
/*!
* \brief pull a list of (key, value) pairs from the kvstore
* \param handle handle to the kvstore
* \param num the number of key-value pairs
* \param keys the list of keys
* \param vals the list of values
* \param priority the priority of the action
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXKVStorePull(KVStoreHandle handle,
mx_uint num,
const int* keys,
NDArrayHandle* vals,
int priority);
/*!
* \brief pull a list of (key, value) pairs from the kvstore, where each key is a string
* \param handle handle to the kvstore
* \param num the number of key-value pairs
* \param keys the list of keys
* \param vals the list of values
* \param priority the priority of the action
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXKVStorePullEx(KVStoreHandle handle,
mx_uint num,
const char** keys,
NDArrayHandle* vals,
int priority);
/*!
* \brief pull a list of (key, value) pairs from the kvstore, where each key is an integer.
* The NDArray pulled back will be in row_sparse storage with only the specified
* row_ids present based row_ids (others rows are zeros).
* \param handle handle to the kvstore
* \param num the number of key-value pairs
* \param keys the list of keys
* \param vals the list of values
* \param row_ids the list of row_id NDArrays
* \param priority the priority of the action
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXKVStorePullRowSparse(KVStoreHandle handle,
mx_uint num,
const int* keys,
NDArrayHandle* vals,
const NDArrayHandle* row_ids,
int priority);
/*!
* \brief pull a list of (key, value) pairs from the kvstore, where each key is a string.
* The NDArray pulled back will be in row_sparse storage with only the specified
* row_ids present based row_ids (others rows are zeros).
* \param handle handle to the kvstore
* \param num the number of key-value pairs
* \param keys the list of keys
* \param vals the list of values
* \param row_ids the list of row_id NDArrays
* \param priority the priority of the action
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXKVStorePullRowSparseEx(KVStoreHandle handle,
mx_uint num,
const char** keys,
NDArrayHandle* vals,
const NDArrayHandle* row_ids,
int priority);
/*!
* \brief user-defined updater for the kvstore
* It's this updater's responsibility to delete \a recv and \a local
* \param the key
* \param recv the pushed value on this key
* \param local the value stored on local on this key
* \param handle The additional handle to the updater
*/
typedef void (MXKVStoreUpdater)(int key,
NDArrayHandle recv,
NDArrayHandle local,
void *handle);
/*!
* \brief user-defined updater for the kvstore with string keys
* It's this updater's responsibility to delete \a recv and \a local
* \param the key
* \param recv the pushed value on this key
* \param local the value stored on local on this key
* \param handle The additional handle to the updater
*/
typedef void (MXKVStoreStrUpdater)(const char* key,
NDArrayHandle recv,
NDArrayHandle local,
void *handle);
/*!
* \brief register a push updater
* \param handle handle to the KVStore
* \param updater udpater function
* \param updater_handle The additional handle used to invoke the updater
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXKVStoreSetUpdater(KVStoreHandle handle,
MXKVStoreUpdater updater,
void *updater_handle);
/*!
* \brief register a push updater with int keys and one with string keys
* \param handle handle to the KVStore
* \param updater updater function with int keys
* \param str_updater updater function with string keys
* \param updater_handle The additional handle used to invoke the updater
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXKVStoreSetUpdaterEx(KVStoreHandle handle,
MXKVStoreUpdater updater,
MXKVStoreStrUpdater str_updater,
void *updater_handle);
/*!
* \brief get the type of the kvstore
* \param handle handle to the KVStore
* \param type a string type
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXKVStoreGetType(KVStoreHandle handle,
const char** type);
//--------------------------------------------
// Part 6: advanced KVStore for multi-machines
//--------------------------------------------
/**
* \brief return The rank of this node in its group, which is in [0, GroupSize).
*
* \param handle handle to the KVStore
* \param ret the node rank
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXKVStoreGetRank(KVStoreHandle handle,
int *ret);
/**
* \brief return The number of nodes in this group, which is
* - number of workers if if `IsWorkerNode() == true`,
* - number of servers if if `IsServerNode() == true`,
* - 1 if `IsSchedulerNode() == true`,
* \param handle handle to the KVStore
* \param ret the group size
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXKVStoreGetGroupSize(KVStoreHandle handle,
int *ret);
/**
* \brief return whether or not this process is a worker node.
* \param ret 1 for yes, 0 for no
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXKVStoreIsWorkerNode(int *ret);
/**
* \brief return whether or not this process is a server node.
* \param ret 1 for yes, 0 for no
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXKVStoreIsServerNode(int *ret);
/**
* \brief return whether or not this process is a scheduler node.
* \param ret 1 for yes, 0 for no
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXKVStoreIsSchedulerNode(int *ret);
/**
* \brief global barrier among all worker machines
*
* \param handle handle to the KVStore
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXKVStoreBarrier(KVStoreHandle handle);
/**
* \brief whether to do barrier when finalize
*
* \param handle handle to the KVStore
* \param barrier_before_exit whether to do barrier when kvstore finalize
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXKVStoreSetBarrierBeforeExit(KVStoreHandle handle,
const int barrier_before_exit);
/**
* \brief the prototype of a server controller
* \param head the head of the command
* \param body the body of the command
* \param controller_handle helper handle for implementing controller
*/
typedef void (MXKVStoreServerController)(int head,
const char *body,
void *controller_handle);
/**
* \return Run as server (or scheduler)
*
* \param handle handle to the KVStore
* \param controller the user-defined server controller
* \param controller_handle helper handle for implementing controller
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXKVStoreRunServer(KVStoreHandle handle,
MXKVStoreServerController controller,
void *controller_handle);
/**
* \return Send a command to all server nodes
*
* \param handle handle to the KVStore
* \param cmd_id the head of the command
* \param cmd_body the body of the command
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXKVStoreSendCommmandToServers(KVStoreHandle handle,
int cmd_id,
const char* cmd_body);
/**
* \brief Get the number of ps dead node(s) specified by {node_id}
*
* \param handle handle to the KVStore
* \param node_id Can be a node group or a single node.
* kScheduler = 1, kServerGroup = 2, kWorkerGroup = 4
* \param number Ouptut number of dead nodes
* \param timeout_sec A node fails to send heartbeart in {timeout_sec} seconds
* will be presumed as 'dead'
*/
MXNET_DLL int MXKVStoreGetNumDeadNode(KVStoreHandle handle,
const int node_id,
int *number,
const int timeout_sec DEFAULT(60));
/**
* \brief Create a RecordIO writer object
* \param uri path to file
* \param out handle pointer to the created object
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXRecordIOWriterCreate(const char *uri, RecordIOHandle *out);
/**
* \brief Delete a RecordIO writer object
* \param handle handle to RecordIO object
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXRecordIOWriterFree(RecordIOHandle handle);
/**
* \brief Write a record to a RecordIO object
* \param handle handle to RecordIO object
* \param buf buffer to write
* \param size size of buffer
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXRecordIOWriterWriteRecord(RecordIOHandle handle,
const char *buf, size_t size);
/**
* \brief Get the current writer pointer position
* \param handle handle to RecordIO object
* \param pos handle to output position
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXRecordIOWriterTell(RecordIOHandle handle, size_t *pos);
/**
* \brief Create a RecordIO reader object
* \param uri path to file
* \param out handle pointer to the created object
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXRecordIOReaderCreate(const char *uri, RecordIOHandle *out);
/**
* \brief Delete a RecordIO reader object
* \param handle handle to RecordIO object
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXRecordIOReaderFree(RecordIOHandle handle);
/**
* \brief Write a record to a RecordIO object
* \param handle handle to RecordIO object
* \param buf pointer to return buffer
* \param size point to size of buffer
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXRecordIOReaderReadRecord(RecordIOHandle handle,
char const **buf, size_t *size);
/**
* \brief Set the current reader pointer position
* \param handle handle to RecordIO object
* \param pos target position
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXRecordIOReaderSeek(RecordIOHandle handle, size_t pos);
/**
* \brief Get the current writer pointer position
* \param handle handle to RecordIO object
* \param pos handle to output position
* \return 0 when success, -1 when failure happens
*/
MXNET_DLL int MXRecordIOReaderTell(RecordIOHandle handle, size_t *pos);
/**
* \brief Create a MXRtc object
*/
MXNET_DLL int MXRtcCreate(char* name, mx_uint num_input, mx_uint num_output,
char** input_names, char** output_names,
NDArrayHandle* inputs, NDArrayHandle* outputs,
char* kernel, RtcHandle *out);
/**
* \brief Run cuda kernel
*/
MXNET_DLL int MXRtcPush(RtcHandle handle, mx_uint num_input, mx_uint num_output,
NDArrayHandle* inputs, NDArrayHandle* outputs,
mx_uint gridDimX,
mx_uint gridDimY,
mx_uint gridDimZ,
mx_uint blockDimX,
mx_uint blockDimY,
mx_uint blockDimZ);
/**
* \brief Delete a MXRtc object
*/
MXNET_DLL int MXRtcFree(RtcHandle handle);
/*
* \brief register custom operators from frontend.
* \param op_type name of custom op
* \param creator
*/
MXNET_DLL int MXCustomOpRegister(const char* op_type, CustomOpPropCreator creator);
/*
* \brief record custom function for backward later.
* \param num_inputs number of input NDArrays.
* \param inputs handle to input NDArrays.
* \param num_outputs number of output NDArrays.
* \param outputs handle to output NDArrays.
* \param callbacks callbacks for backward function.
*/
MXNET_DLL int MXCustomFunctionRecord(int num_inputs, NDArrayHandle *inputs,
int num_outputs, NDArrayHandle *outputs,
struct MXCallbackList *callbacks);
/*
* \brief create cuda rtc module
* \param source cuda source code
* \param num_options number of compiler flags
* \param options compiler flags
* \param num_exports number of exported function names
* \param exported function names
* \param out handle to created module
*/
MXNET_DLL int MXRtcCudaModuleCreate(const char* source, int num_options,
const char** options, int num_exports,
const char** exports, CudaModuleHandle *out);
/*
* \brief delete cuda rtc module
* \param handle handle to cuda module
*/
MXNET_DLL int MXRtcCudaModuleFree(CudaModuleHandle handle);
/*
* \brief get kernel from module
* \param handle handle to cuda module
* \param name name of kernel function
* \param num_args number of arguments
* \param is_ndarray whether argument is ndarray
* \param is_const whether argument is constant
* \param arg_types data type of arguments
* \param out created kernel
*/
MXNET_DLL int MXRtcCudaKernelCreate(CudaModuleHandle handle, const char* name,
int num_args, int* is_ndarray, int* is_const,
int* arg_types, CudaKernelHandle *out);
/*
* \brief delete kernel
* \param handle handle to previously created kernel
*/
MXNET_DLL int MXRtcCudaKernelFree(CudaKernelHandle handle);
/*
* \brief launch cuda kernel
* \param handle handle to kernel
* \param dev_id (GPU) device id
* \param args pointer to arguments
* \param grid_dim_x grid dimension x
* \param grid_dim_y grid dimension y
* \param grid_dim_z grid dimension z
* \param block_dim_x block dimension x
* \param block_dim_y block dimension y
* \param block_dim_z block dimension z
* \param shared_mem size of dynamically allocated shared memory
*/
MXNET_DLL int MXRtcCudaKernelCall(CudaKernelHandle handle, int dev_id, void** args,
mx_uint grid_dim_x, mx_uint grid_dim_y,
mx_uint grid_dim_z, mx_uint block_dim_x,
mx_uint block_dim_y, mx_uint block_dim_z,
mx_uint shared_mem);
/*!
* \brief Get shared memory handle from NDArray
* \param handle NDArray handle.
* \param shared_pid output PID
* \param shared_id output shared memory id.
*/
MXNET_DLL int MXNDArrayGetSharedMemHandle(NDArrayHandle handle, int* shared_pid,
int* shared_id);
/*!
* \brief Reconstruct NDArray from shared memory handle
* \param shared_pid shared PID
* \param shared_id shared memory id
* \param shape pointer to NDArray dimensions
* \param ndim number of NDArray dimensions
* \param dtype data type of NDArray
* \param out constructed NDArray
*/
MXNET_DLL int MXNDArrayCreateFromSharedMem(int shared_pid, int shared_id, const mx_uint *shape,
mx_uint ndim, int dtype, NDArrayHandle *out);
#ifdef __cplusplus
}
#endif // __cplusplus
#endif // MXNET_C_API_H_
| {
"content_hash": "8682849c53fc2c6c5e811080fabdca15",
"timestamp": "",
"source": "github",
"line_count": 2330,
"max_line_length": 107,
"avg_line_length": 40.39184549356223,
"alnum_prop": 0.6116902022037338,
"repo_name": "jamesliu/mxnet",
"id": "6c7626b917a455c2e7f67e3b3c66488413a8a20d",
"size": "94920",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "include/mxnet/c_api.h",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ANTLR",
"bytes": "1731"
},
{
"name": "Batchfile",
"bytes": "13130"
},
{
"name": "C",
"bytes": "123214"
},
{
"name": "C++",
"bytes": "5600157"
},
{
"name": "CMake",
"bytes": "84037"
},
{
"name": "Clojure",
"bytes": "375066"
},
{
"name": "Cuda",
"bytes": "948875"
},
{
"name": "Groovy",
"bytes": "16047"
},
{
"name": "Java",
"bytes": "122297"
},
{
"name": "Jupyter Notebook",
"bytes": "1275293"
},
{
"name": "Makefile",
"bytes": "67550"
},
{
"name": "Matlab",
"bytes": "34903"
},
{
"name": "Perl",
"bytes": "1367889"
},
{
"name": "Perl 6",
"bytes": "7280"
},
{
"name": "Python",
"bytes": "5829940"
},
{
"name": "R",
"bytes": "311579"
},
{
"name": "Scala",
"bytes": "1039625"
},
{
"name": "Shell",
"bytes": "292731"
},
{
"name": "Smalltalk",
"bytes": "43774"
}
],
"symlink_target": ""
} |
#include "numerics/newhall.hpp"
#include <algorithm>
#include <cmath>
#include <vector>
#include "geometry/named_quantities.hpp"
#include "gtest/gtest.h"
#include "gmock/gmock.h"
#include "numerics/polynomial.hpp"
#include "numerics/polynomial_evaluators.hpp"
#include "quantities/named_quantities.hpp"
#include "quantities/quantities.hpp"
#include "quantities/si.hpp"
#include "testing_utilities/almost_equals.hpp"
#include "testing_utilities/approximate_quantity.hpp"
#include "testing_utilities/is_near.hpp"
#include "testing_utilities/numerics.hpp"
namespace principia {
namespace numerics {
using geometry::Instant;
using quantities::Abs;
using quantities::Length;
using quantities::Speed;
using quantities::Time;
using quantities::si::Metre;
using quantities::si::Second;
using testing_utilities::AbsoluteError;
using testing_utilities::AlmostEquals;
using testing_utilities::ApproximateQuantity;
using testing_utilities::IsNear;
using testing_utilities::RelativeError;
using testing_utilities::operator""_⑴;
// The adapters wrap the result of the Newhall approximation so that they can be
// used consistently in this test.
template<int degree>
class ЧебышёвAdapter {
public:
static ЧебышёвAdapter NewhallApproximation(std::vector<Length> const& q,
std::vector<Speed> const& v,
Instant const& t_min,
Instant const& t_max,
Length& error_estimate);
Length Evaluate(Instant const& t) const;
Speed EvaluateDerivative(Instant const& t) const;
private:
explicit ЧебышёвAdapter(ЧебышёвSeries<Length> series);
ЧебышёвSeries<Length> series_;
};
template<int degree>
class MonomialAdapter {
public:
static MonomialAdapter NewhallApproximation(std::vector<Length> const& q,
std::vector<Speed> const& v,
Instant const& t_min,
Instant const& t_max,
Length& error_estimate);
Length Evaluate(Instant const& t) const;
Speed EvaluateDerivative(Instant const& t) const;
private:
using P = PolynomialInMonomialBasis<Length, Instant, degree, EstrinEvaluator>;
explicit MonomialAdapter(P const& polynomial);
P polynomial_;
};
class NewhallTest : public ::testing::Test {
protected:
NewhallTest()
: t_min_(t0_ - 1 * Second),
t_max_(t0_ + 3 * Second),
length_function_1_([this](Instant const t) -> Length {
return 0.5 * Metre + 2 * Metre *
std::sin((t - t_min_) / (0.3 * Second)) *
std::exp((t - t_min_) / (1 * Second));
}),
speed_function_1_([this](Instant const t) -> Speed {
return ((2 * Metre) / (0.3 * Second) *
std::cos((t - t_min_) / (0.3 * Second)) +
(2 * Metre / Second) *
std::sin((t - t_min_) / (0.3 * Second))) *
std::exp((t - t_min_) / (1 * Second));
}),
length_function_2_([this](Instant const t) -> Length {
return 5 * Metre *
(1 + (t - t_min_) / (0.3 * Second) +
std::pow((t - t_min_) / (4 * Second), 7));
}),
speed_function_2_([this](Instant const t) -> Speed {
return 5 * Metre *
(1 / (0.3 * Second) +
(7 / (4 * Second)) *
std::pow((t - t_min_) / (4 * Second), 6));
}) {}
template<typename Adapter>
void CheckNewhallApproximationErrors(
std::function<Length(Instant const)> length_function,
std::function<Speed(Instant const)> speed_function,
ApproximateQuantity<Length> const& expected_length_error_estimate,
ApproximateQuantity<Length> const& expected_length_absolute_error,
ApproximateQuantity<Speed> const& expected_speed_absolute_error) {
std::vector<Length> lengths;
std::vector<Speed> speeds;
for (Instant t = t_min_; t <= t_max_; t += 0.5 * Second) {
lengths.push_back(length_function(t));
speeds.push_back(speed_function(t));
}
Length length_error_estimate;
Adapter const approximation =
Adapter::NewhallApproximation(
lengths, speeds, t_min_, t_max_, length_error_estimate);
// Compute the absolute error of both functions throughout the interval.
Length length_absolute_error;
Speed speed_absolute_error;
for (Instant t = t_min_; t <= t_max_; t += 0.05 * Second) {
Length const expected_length = length_function(t);
Length const actual_length = approximation.Evaluate(t);
Speed const expected_speed = speed_function(t);
Speed const actual_speed = approximation.EvaluateDerivative(t);
length_absolute_error =
std::max(length_absolute_error,
AbsoluteError(expected_length, actual_length));
speed_absolute_error =
std::max(speed_absolute_error,
AbsoluteError(expected_speed, actual_speed));
}
EXPECT_THAT(Abs(length_error_estimate),
IsNear(expected_length_error_estimate));
EXPECT_THAT(length_absolute_error, IsNear(expected_length_absolute_error));
EXPECT_THAT(speed_absolute_error, IsNear(expected_speed_absolute_error));
}
Instant const t0_;
Instant t_min_;
Instant t_max_;
std::function<Length(Instant const& t)> length_function_1_;
std::function<Speed(Instant const& t)> speed_function_1_;
std::function<Length(Instant const& t)> length_function_2_;
std::function<Speed(Instant const& t)> speed_function_2_;
};
template<int degree>
ЧебышёвAdapter<degree> ЧебышёвAdapter<degree>::NewhallApproximation(
std::vector<Length> const& q,
std::vector<Speed> const& v,
Instant const& t_min,
Instant const& t_max,
Length& error_estimate) {
return ЧебышёвAdapter(NewhallApproximationInЧебышёвBasis(degree,
q, v,
t_min, t_max,
error_estimate));
}
template<int degree>
Length ЧебышёвAdapter<degree>::Evaluate(Instant const& t) const {
return series_.Evaluate(t);
}
template<int degree>
Speed ЧебышёвAdapter<degree>::EvaluateDerivative(Instant const& t) const {
return series_.EvaluateDerivative(t);
}
template<int degree>
ЧебышёвAdapter<degree>::ЧебышёвAdapter(ЧебышёвSeries<Length> series)
: series_(std::move(series)) {}
template<int degree>
MonomialAdapter<degree> MonomialAdapter<degree>::NewhallApproximation(
std::vector<Length> const& q,
std::vector<Speed> const& v,
Instant const& t_min,
Instant const& t_max,
Length& error_estimate) {
return MonomialAdapter(
NewhallApproximationInMonomialBasis<Length, degree, EstrinEvaluator>(
q, v,
t_min, t_max,
error_estimate));
}
template<int degree>
Length MonomialAdapter<degree>::Evaluate(Instant const& t) const {
return polynomial_.Evaluate(t);
}
template<int degree>
Speed MonomialAdapter<degree>::EvaluateDerivative(Instant const& t) const {
return polynomial_.EvaluateDerivative(t);
}
template<int degree>
MonomialAdapter<degree>::MonomialAdapter(P const& polynomial)
: polynomial_(polynomial) {}
TEST_F(NewhallTest, ApproximationInЧебышёвBasis_1_3) {
CheckNewhallApproximationErrors<ЧебышёвAdapter<3>>(
length_function_1_,
speed_function_1_,
/*expected_length_error_estimate=*/3.9e1_⑴ * Metre,
/*expected_length_absolute_error=*/1.7e2_⑴ * Metre,
/*expected_speed_absolute_error=*/2.3e2_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInЧебышёвBasis_1_4) {
CheckNewhallApproximationErrors<ЧебышёвAdapter<4>>(
length_function_1_,
speed_function_1_,
/*expected_length_error_estimate=*/1.8e1_⑴ * Metre,
/*expected_length_absolute_error=*/4.7e1_⑴ * Metre,
/*expected_speed_absolute_error=*/1.2e2_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInЧебышёвBasis_1_5) {
CheckNewhallApproximationErrors<ЧебышёвAdapter<5>>(
length_function_1_,
speed_function_1_,
/*expected_length_error_estimate=*/8.3e0_⑴ * Metre,
/*expected_length_absolute_error=*/4.3e1_⑴ * Metre,
/*expected_speed_absolute_error=*/1.2e2_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInЧебышёвBasis_1_6) {
CheckNewhallApproximationErrors<ЧебышёвAdapter<6>>(
length_function_1_,
speed_function_1_,
/*expected_length_error_estimate=*/1.4e0_⑴ * Metre,
/*expected_length_absolute_error=*/3.8e1_⑴ * Metre,
/*expected_speed_absolute_error=*/1.0e2_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInЧебышёвBasis_1_7) {
CheckNewhallApproximationErrors<ЧебышёвAdapter<7>>(
length_function_1_,
speed_function_1_,
/*expected_length_error_estimate=*/7.5e0_⑴ * Metre,
/*expected_length_absolute_error=*/1.4e1_⑴ * Metre,
/*expected_speed_absolute_error=*/4.5e1_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInЧебышёвBasis_1_8) {
CheckNewhallApproximationErrors<ЧебышёвAdapter<8>>(
length_function_1_,
speed_function_1_,
/*expected_length_error_estimate=*/4.2e0_⑴ * Metre,
/*expected_length_absolute_error=*/6.3e0_⑴ * Metre,
/*expected_speed_absolute_error=*/2.8e1_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInЧебышёвBasis_1_9) {
CheckNewhallApproximationErrors<ЧебышёвAdapter<9>>(
length_function_1_,
speed_function_1_,
/*expected_length_error_estimate=*/3.1e-1_⑴ * Metre,
/*expected_length_absolute_error=*/4.9e0_⑴ * Metre,
/*expected_speed_absolute_error=*/2.2e1_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInЧебышёвBasis_1_10) {
CheckNewhallApproximationErrors<ЧебышёвAdapter<10>>(
length_function_1_,
speed_function_1_,
/*expected_length_error_estimate=*/7.5e-1_⑴ * Metre,
/*expected_length_absolute_error=*/6.5e-1_⑴ * Metre,
/*expected_speed_absolute_error=*/3.6e0_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInЧебышёвBasis_1_11) {
CheckNewhallApproximationErrors<ЧебышёвAdapter<11>>(
length_function_1_,
speed_function_1_,
/*expected_length_error_estimate=*/1.8e-1_⑴ * Metre,
/*expected_length_absolute_error=*/2.0e-1_⑴ * Metre,
/*expected_speed_absolute_error=*/1.6e0_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInЧебышёвBasis_1_12) {
CheckNewhallApproximationErrors<ЧебышёвAdapter<12>>(
length_function_1_,
speed_function_1_,
/*expected_length_error_estimate=*/4.9e-2_⑴ * Metre,
/*expected_length_absolute_error=*/7.9e-2_⑴ * Metre,
/*expected_speed_absolute_error=*/7.3e-1_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInЧебышёвBasis_1_13) {
CheckNewhallApproximationErrors<ЧебышёвAdapter<13>>(
length_function_1_,
speed_function_1_,
/*expected_length_error_estimate=*/2.6e-2_⑴ * Metre,
/*expected_length_absolute_error=*/1.3e-2_⑴ * Metre,
/*expected_speed_absolute_error=*/1.2e-1_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInЧебышёвBasis_1_14) {
CheckNewhallApproximationErrors<ЧебышёвAdapter<14>>(
length_function_1_,
speed_function_1_,
/*expected_length_error_estimate=*/8.9e-4_⑴ * Metre,
/*expected_length_absolute_error=*/1.5e-2_⑴ * Metre,
/*expected_speed_absolute_error=*/1.5e-1_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInЧебышёвBasis_1_15) {
CheckNewhallApproximationErrors<ЧебышёвAdapter<15>>(
length_function_1_,
speed_function_1_,
/*expected_length_error_estimate=*/1.6e-3_⑴ * Metre,
/*expected_length_absolute_error=*/4.3e-3_⑴ * Metre,
/*expected_speed_absolute_error=*/4.4e-2_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInЧебышёвBasis_1_16) {
CheckNewhallApproximationErrors<ЧебышёвAdapter<16>>(
length_function_1_,
speed_function_1_,
/*expected_length_error_estimate=*/2.9e-4_⑴ * Metre,
/*expected_length_absolute_error=*/1.7e-3_⑴ * Metre,
/*expected_speed_absolute_error=*/1.8e-2_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInЧебышёвBasis_1_17) {
CheckNewhallApproximationErrors<ЧебышёвAdapter<17>>(
length_function_1_,
speed_function_1_,
/*expected_length_error_estimate=*/3.7e-5_⑴ * Metre,
/*expected_length_absolute_error=*/7.6e-4_⑴ * Metre,
/*expected_speed_absolute_error=*/8.2e-3_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInЧебышёвBasis_2_3) {
CheckNewhallApproximationErrors<ЧебышёвAdapter<3>>(
length_function_2_,
speed_function_2_,
/*expected_length_error_estimate=*/7.9e-1_⑴ * Metre,
/*expected_length_absolute_error=*/2.0e0_⑴ * Metre,
/*expected_speed_absolute_error=*/1.8e0_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInЧебышёвBasis_2_4) {
CheckNewhallApproximationErrors<ЧебышёвAdapter<4>>(
length_function_2_,
speed_function_2_,
/*expected_length_error_estimate=*/2.5e-1_⑴ * Metre,
/*expected_length_absolute_error=*/2.9e-1_⑴ * Metre,
/*expected_speed_absolute_error=*/4.6e-1_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInЧебышёвBasis_2_5) {
CheckNewhallApproximationErrors<ЧебышёвAdapter<5>>(
length_function_2_,
speed_function_2_,
/*expected_length_error_estimate=*/5.7e-2_⑴ * Metre,
/*expected_length_absolute_error=*/3.6e-2_⑴ * Metre,
/*expected_speed_absolute_error=*/7.4e-2_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInЧебышёвBasis_2_6) {
CheckNewhallApproximationErrors<ЧебышёвAdapter<6>>(
length_function_2_,
speed_function_2_,
/*expected_length_error_estimate=*/8.6e-3_⑴ * Metre,
/*expected_length_absolute_error=*/2.3e-3_⑴ * Metre,
/*expected_speed_absolute_error=*/6.0e-3_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInЧебышёвBasis_2_7) {
CheckNewhallApproximationErrors<ЧебышёвAdapter<7>>(
length_function_2_,
speed_function_2_,
/*expected_length_error_estimate=*/6.2e-4_⑴ * Metre,
/*expected_length_absolute_error=*/2.9e-14_⑴ * Metre,
/*expected_speed_absolute_error=*/2.5e-14_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInЧебышёвBasis_2_8) {
CheckNewhallApproximationErrors<ЧебышёвAdapter<8>>(
length_function_2_,
speed_function_2_,
/*expected_length_error_estimate=*/4.5e-16_⑴ * Metre,
/*expected_length_absolute_error=*/2.9e-14_⑴ * Metre,
/*expected_speed_absolute_error=*/2.2e-14_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInЧебышёвBasis_2_9) {
CheckNewhallApproximationErrors<ЧебышёвAdapter<9>>(
length_function_2_,
speed_function_2_,
/*expected_length_error_estimate=*/4.8e-16_⑴ * Metre,
/*expected_length_absolute_error=*/2.9e-14_⑴ * Metre,
/*expected_speed_absolute_error=*/2.2e-14_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInЧебышёвBasis_2_10) {
CheckNewhallApproximationErrors<ЧебышёвAdapter<10>>(
length_function_2_,
speed_function_2_,
/*expected_length_error_estimate=*/4.8e-16_⑴ * Metre,
/*expected_length_absolute_error=*/4.3e-14_⑴ * Metre,
/*expected_speed_absolute_error=*/2.9e-14_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInЧебышёвBasis_2_11) {
CheckNewhallApproximationErrors<ЧебышёвAdapter<11>>(
length_function_2_,
speed_function_2_,
/*expected_length_error_estimate=*/1.1e-16_⑴ * Metre,
/*expected_length_absolute_error=*/3.6e-14_⑴ * Metre,
/*expected_speed_absolute_error=*/2.2e-14_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInЧебышёвBasis_2_12) {
CheckNewhallApproximationErrors<ЧебышёвAdapter<12>>(
length_function_2_,
speed_function_2_,
/*expected_length_error_estimate=*/7.3e-16_⑴ * Metre,
/*expected_length_absolute_error=*/2.9e-14_⑴ * Metre,
/*expected_speed_absolute_error=*/2.9e-14_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInЧебышёвBasis_2_13) {
CheckNewhallApproximationErrors<ЧебышёвAdapter<13>>(
length_function_2_,
speed_function_2_,
/*expected_length_error_estimate=*/1.3e-15_⑴ * Metre,
/*expected_length_absolute_error=*/1.4e-14_⑴ * Metre,
/*expected_speed_absolute_error=*/6.1e-14_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInЧебышёвBasis_2_14) {
CheckNewhallApproximationErrors<ЧебышёвAdapter<14>>(
length_function_2_,
speed_function_2_,
/*expected_length_error_estimate=*/2.1e-16_⑴ * Metre,
/*expected_length_absolute_error=*/1.4e-14_⑴ * Metre,
/*expected_speed_absolute_error=*/6.8e-14_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInЧебышёвBasis_2_15) {
CheckNewhallApproximationErrors<ЧебышёвAdapter<15>>(
length_function_2_,
speed_function_2_,
/*expected_length_error_estimate=*/3.2e-16_⑴ * Metre,
/*expected_length_absolute_error=*/2.9e-14_⑴ * Metre,
/*expected_speed_absolute_error=*/3.5e-13_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInЧебышёвBasis_2_16) {
CheckNewhallApproximationErrors<ЧебышёвAdapter<16>>(
length_function_2_,
speed_function_2_,
/*expected_length_error_estimate=*/1.1e-15_⑴ * Metre,
/*expected_length_absolute_error=*/2.9e-14_⑴ * Metre,
/*expected_speed_absolute_error=*/8.5e-13_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInЧебышёвBasis_2_17) {
CheckNewhallApproximationErrors<ЧебышёвAdapter<17>>(
length_function_2_,
speed_function_2_,
/*expected_length_error_estimate=*/4.8e-15_⑴ * Metre,
/*expected_length_absolute_error=*/7.2e-14_⑴ * Metre,
/*expected_speed_absolute_error=*/1.2e-12_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInMonomialBasis_1_3) {
CheckNewhallApproximationErrors<MonomialAdapter<3>>(
length_function_1_,
speed_function_1_,
/*expected_length_error_estimate=*/3.9e1_⑴ * Metre,
/*expected_length_absolute_error=*/1.7e2_⑴ * Metre,
/*expected_speed_absolute_error=*/2.3e2_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInMonomialBasis_1_4) {
CheckNewhallApproximationErrors<MonomialAdapter<4>>(
length_function_1_,
speed_function_1_,
/*expected_length_error_estimate=*/1.8e1_⑴ * Metre,
/*expected_length_absolute_error=*/4.7e1_⑴ * Metre,
/*expected_speed_absolute_error=*/1.2e2_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInMonomialBasis_1_5) {
CheckNewhallApproximationErrors<MonomialAdapter<5>>(
length_function_1_,
speed_function_1_,
/*expected_length_error_estimate=*/8.3e0_⑴ * Metre,
/*expected_length_absolute_error=*/4.3e1_⑴ * Metre,
/*expected_speed_absolute_error=*/1.2e2_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInMonomialBasis_1_6) {
CheckNewhallApproximationErrors<MonomialAdapter<6>>(
length_function_1_,
speed_function_1_,
/*expected_length_error_estimate=*/1.4e0_⑴ * Metre,
/*expected_length_absolute_error=*/3.8e1_⑴ * Metre,
/*expected_speed_absolute_error=*/1.0e2_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInMonomialBasis_1_7) {
CheckNewhallApproximationErrors<MonomialAdapter<7>>(
length_function_1_,
speed_function_1_,
/*expected_length_error_estimate=*/7.5e0_⑴ * Metre,
/*expected_length_absolute_error=*/1.4e1_⑴ * Metre,
/*expected_speed_absolute_error=*/4.5e1_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInMonomialBasis_1_8) {
CheckNewhallApproximationErrors<MonomialAdapter<8>>(
length_function_1_,
speed_function_1_,
/*expected_length_error_estimate=*/4.2e0_⑴ * Metre,
/*expected_length_absolute_error=*/6.3e0_⑴ * Metre,
/*expected_speed_absolute_error=*/2.8e1_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInMonomialBasis_1_9) {
CheckNewhallApproximationErrors<MonomialAdapter<9>>(
length_function_1_,
speed_function_1_,
/*expected_length_error_estimate=*/3.1e-1_⑴ * Metre,
/*expected_length_absolute_error=*/4.9e0_⑴ * Metre,
/*expected_speed_absolute_error=*/2.2e1_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInMonomialBasis_1_10) {
CheckNewhallApproximationErrors<MonomialAdapter<10>>(
length_function_1_,
speed_function_1_,
/*expected_length_error_estimate=*/7.5e-1_⑴ * Metre,
/*expected_length_absolute_error=*/6.5e-1_⑴ * Metre,
/*expected_speed_absolute_error=*/3.6e0_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInMonomialBasis_1_11) {
CheckNewhallApproximationErrors<MonomialAdapter<11>>(
length_function_1_,
speed_function_1_,
/*expected_length_error_estimate=*/1.8e-1_⑴ * Metre,
/*expected_length_absolute_error=*/2.0e-1_⑴ * Metre,
/*expected_speed_absolute_error=*/1.6e0_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInMonomialBasis_1_12) {
CheckNewhallApproximationErrors<MonomialAdapter<12>>(
length_function_1_,
speed_function_1_,
/*expected_length_error_estimate=*/4.9e-2_⑴ * Metre,
/*expected_length_absolute_error=*/7.9e-2_⑴ * Metre,
/*expected_speed_absolute_error=*/7.3e-1_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInMonomialBasis_1_13) {
CheckNewhallApproximationErrors<MonomialAdapter<13>>(
length_function_1_,
speed_function_1_,
/*expected_length_error_estimate=*/2.6e-2_⑴ * Metre,
/*expected_length_absolute_error=*/1.3e-2_⑴ * Metre,
/*expected_speed_absolute_error=*/1.2e-1_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInMonomialBasis_1_14) {
CheckNewhallApproximationErrors<MonomialAdapter<14>>(
length_function_1_,
speed_function_1_,
/*expected_length_error_estimate=*/8.9e-4_⑴ * Metre,
/*expected_length_absolute_error=*/1.5e-2_⑴ * Metre,
/*expected_speed_absolute_error=*/1.5e-1_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInMonomialBasis_1_15) {
CheckNewhallApproximationErrors<MonomialAdapter<15>>(
length_function_1_,
speed_function_1_,
/*expected_length_error_estimate=*/1.6e-3_⑴ * Metre,
/*expected_length_absolute_error=*/4.3e-3_⑴ * Metre,
/*expected_speed_absolute_error=*/4.4e-2_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInMonomialBasis_1_16) {
CheckNewhallApproximationErrors<MonomialAdapter<16>>(
length_function_1_,
speed_function_1_,
/*expected_length_error_estimate=*/2.9e-4_⑴ * Metre,
/*expected_length_absolute_error=*/1.7e-3_⑴ * Metre,
/*expected_speed_absolute_error=*/1.8e-2_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInMonomialBasis_1_17) {
CheckNewhallApproximationErrors<MonomialAdapter<17>>(
length_function_1_,
speed_function_1_,
/*expected_length_error_estimate=*/3.7e-5_⑴ * Metre,
/*expected_length_absolute_error=*/7.6e-4_⑴ * Metre,
/*expected_speed_absolute_error=*/8.2e-3_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInMonomialBasis_2_3) {
CheckNewhallApproximationErrors<MonomialAdapter<3>>(
length_function_2_,
speed_function_2_,
/*expected_length_error_estimate=*/7.9e-1_⑴ * Metre,
/*expected_length_absolute_error=*/2.0e0_⑴ * Metre,
/*expected_speed_absolute_error=*/1.8e0_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInMonomialBasis_2_4) {
CheckNewhallApproximationErrors<MonomialAdapter<4>>(
length_function_2_,
speed_function_2_,
/*expected_length_error_estimate=*/2.5e-1_⑴ * Metre,
/*expected_length_absolute_error=*/2.9e-1_⑴ * Metre,
/*expected_speed_absolute_error=*/4.6e-1_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInMonomialBasis_2_5) {
CheckNewhallApproximationErrors<MonomialAdapter<5>>(
length_function_2_,
speed_function_2_,
/*expected_length_error_estimate=*/5.7e-2_⑴ * Metre,
/*expected_length_absolute_error=*/3.6e-2_⑴ * Metre,
/*expected_speed_absolute_error=*/7.4e-2_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInMonomialBasis_2_6) {
CheckNewhallApproximationErrors<MonomialAdapter<6>>(
length_function_2_,
speed_function_2_,
/*expected_length_error_estimate=*/8.6e-3_⑴ * Metre,
/*expected_length_absolute_error=*/2.3e-3_⑴ * Metre,
/*expected_speed_absolute_error=*/6.0e-3_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInMonomialBasis_2_7) {
CheckNewhallApproximationErrors<MonomialAdapter<7>>(
length_function_2_,
speed_function_2_,
/*expected_length_error_estimate=*/6.2e-4_⑴ * Metre,
/*expected_length_absolute_error=*/2.9e-14_⑴ * Metre,
/*expected_speed_absolute_error=*/2.5e-14_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInMonomialBasis_2_8) {
CheckNewhallApproximationErrors<MonomialAdapter<8>>(
length_function_2_,
speed_function_2_,
/*expected_length_error_estimate=*/4.5e-16_⑴ * Metre,
/*expected_length_absolute_error=*/3.9e-14_⑴ * Metre,
/*expected_speed_absolute_error=*/1.2e-13_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInMonomialBasis_2_9) {
CheckNewhallApproximationErrors<MonomialAdapter<9>>(
length_function_2_,
speed_function_2_,
/*expected_length_error_estimate=*/4.8e-16_⑴ * Metre,
/*expected_length_absolute_error=*/1.0e-13_⑴ * Metre,
/*expected_speed_absolute_error=*/4.8e-13_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInMonomialBasis_2_10) {
CheckNewhallApproximationErrors<MonomialAdapter<10>>(
length_function_2_,
speed_function_2_,
/*expected_length_error_estimate=*/4.8e-16_⑴ * Metre,
/*expected_length_absolute_error=*/3.5e-13_⑴ * Metre,
/*expected_speed_absolute_error=*/7.1e-13_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInMonomialBasis_2_11) {
CheckNewhallApproximationErrors<MonomialAdapter<11>>(
length_function_2_,
speed_function_2_,
/*expected_length_error_estimate=*/1.1e-16_⑴ * Metre,
/*expected_length_absolute_error=*/5.6e-13_⑴ * Metre,
/*expected_speed_absolute_error=*/1.7e-12_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInMonomialBasis_2_12) {
CheckNewhallApproximationErrors<MonomialAdapter<12>>(
length_function_2_,
speed_function_2_,
/*expected_length_error_estimate=*/7.3e-16_⑴ * Metre,
/*expected_length_absolute_error=*/1.3e-11_⑴ * Metre,
/*expected_speed_absolute_error=*/5.4e-11_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInMonomialBasis_2_13) {
CheckNewhallApproximationErrors<MonomialAdapter<13>>(
length_function_2_,
speed_function_2_,
/*expected_length_error_estimate=*/1.3e-15_⑴ * Metre,
/*expected_length_absolute_error=*/1.9e-11_⑴ * Metre,
/*expected_speed_absolute_error=*/9.5e-11_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInMonomialBasis_2_14) {
CheckNewhallApproximationErrors<MonomialAdapter<14>>(
length_function_2_,
speed_function_2_,
/*expected_length_error_estimate=*/2.1e-16_⑴ * Metre,
/*expected_length_absolute_error=*/8.1e-12_⑴ * Metre,
/*expected_speed_absolute_error=*/5.1e-11_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInMonomialBasis_2_15) {
CheckNewhallApproximationErrors<MonomialAdapter<15>>(
length_function_2_,
speed_function_2_,
/*expected_length_error_estimate=*/3.2e-16_⑴ * Metre,
/*expected_length_absolute_error=*/3.0e-10_⑴ * Metre,
/*expected_speed_absolute_error=*/1.6e-9_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInMonomialBasis_2_16) {
CheckNewhallApproximationErrors<MonomialAdapter<16>>(
length_function_2_,
speed_function_2_,
/*expected_length_error_estimate=*/1.1e-15_⑴ * Metre,
/*expected_length_absolute_error=*/5.8e-10_⑴ * Metre,
/*expected_speed_absolute_error=*/2.8e-9_⑴ * Metre / Second);
}
TEST_F(NewhallTest, ApproximationInMonomialBasis_2_17) {
CheckNewhallApproximationErrors<MonomialAdapter<17>>(
length_function_2_,
speed_function_2_,
/*expected_length_error_estimate=*/4.8e-15_⑴ * Metre,
/*expected_length_absolute_error=*/3.7e-9_⑴ * Metre,
/*expected_speed_absolute_error=*/2.2e-8_⑴ * Metre / Second);
}
TEST_F(NewhallTest, NonConstantDegree) {
std::vector<Length> lengths;
std::vector<Speed> speeds;
for (Instant t = t_min_; t <= t_max_; t += 0.5 * Second) {
lengths.push_back(length_function_1_(t));
speeds.push_back(speed_function_1_(t));
}
Length length_error_estimate;
auto const approximation =
NewhallApproximationInMonomialBasis<Length, EstrinEvaluator>(
/*degree=*/10,
lengths, speeds, t_min_, t_max_, length_error_estimate);
EXPECT_THAT(RelativeError(approximation->Evaluate(t_min_),
length_function_1_(t_min_)), IsNear(9e-13_⑴));
}
} // namespace numerics
} // namespace principia
| {
"content_hash": "5df0973e49920cb5b0bc9cd26477e9dd",
"timestamp": "",
"source": "github",
"line_count": 773,
"max_line_length": 80,
"avg_line_length": 37.817593790426905,
"alnum_prop": 0.6631888619026443,
"repo_name": "eggrobin/Principia",
"id": "b7904dc47c2b5128e90fbd89febc37d57d9fa3d7",
"size": "30117",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "numerics/newhall_test.cpp",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Awk",
"bytes": "3540"
},
{
"name": "C#",
"bytes": "303305"
},
{
"name": "C++",
"bytes": "5329850"
},
{
"name": "Fortran",
"bytes": "2234"
},
{
"name": "Makefile",
"bytes": "16441"
},
{
"name": "Mathematica",
"bytes": "374705"
},
{
"name": "PowerShell",
"bytes": "9489"
},
{
"name": "Shell",
"bytes": "4772"
}
],
"symlink_target": ""
} |
from multiprocessing import Process
import time
def f(name):
time.sleep(4)
print('hello', name)
if __name__ == '__main__':
p = Process(target=f, args=('bob',))
p.daemon=True
p.start()
p.terminate()
p.join()
| {
"content_hash": "3038a1ed8963594d9934b18831f1ee39",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 40,
"avg_line_length": 18.23076923076923,
"alnum_prop": 0.5822784810126582,
"repo_name": "orangeYao/twiOpinion",
"id": "4f667dfd54b6be1dc5334c9a51762b0b338a8a96",
"size": "237",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "testGui/test.py",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "41503"
},
{
"name": "Objective-C",
"bytes": "25470"
},
{
"name": "Python",
"bytes": "348940"
},
{
"name": "Shell",
"bytes": "919"
}
],
"symlink_target": ""
} |
package com.flat502.rox.marshal;
import java.io.InputStream;
import java.io.Reader;
/**
* Encapsulates the methods required to unmarshal an
* {@link com.flat502.rox.marshal.RpcResponse} from various sources.
*/
public interface MethodResponseUnmarshaller extends MethodUnmarshaller {
/**
* Unmarshal an {@link RpcResponse} instance from an {@link InputStream}.
* <p>
* Implementations are responsible for determining the stream's
* character encoding (where applicable).
* @param in
* The {@link InputStream} from which to unmarshal a new
* {@link RpcResponse} instance.
* @param aid
* The {@link MethodResponseUnmarshallerAid} to use when unmarshalling
* the response. May be <code>null</code>, in which internal defaults
* will be used
* @return
* A new instance of this class representing the XML structure in the
* given document.
* @throws Exception
* Implementations are free to throw exceptions.
*/
RpcResponse unmarshal(InputStream in, MethodResponseUnmarshallerAid aid)
throws Exception;
/**
* Unmarshal an {@link RpcResponse} instance from a {@link Reader}.
* @param in
* The {@link Reader} from which to unmarshal a new
* {@link RpcResponse} instance.
* @param aid
* The {@link MethodResponseUnmarshallerAid} to use when unmarshalling
* the response. May be <code>null</code>, in which internal defaults
* will be used
* @return
* A new instance of this class representing the XML structure in the
* given document.
* @throws Exception
* Implementations are free to throw exceptions.
*/
RpcResponse unmarshal(Reader in, MethodResponseUnmarshallerAid aid)
throws Exception;
/**
* Unmarshal an {@link RpcResponse} instance from an XML string.
* @param xml
* The XML string from which to unmarshal a new
* {@link RpcResponse} instance.
* @param aid
* The {@link MethodResponseUnmarshallerAid} to use when unmarshalling
* the response. May be <code>null</code>, in which internal defaults
* will be used
* @return
* A new instance of this class representing the XML structure in the
* given document.
* @throws Exception
* Implementations are free to throw exceptions.
*/
RpcResponse unmarshal(String xml, MethodResponseUnmarshallerAid aid)
throws Exception;
}
| {
"content_hash": "3af4b2c628d16efb84e360c1714fc44a",
"timestamp": "",
"source": "github",
"line_count": 67,
"max_line_length": 74,
"avg_line_length": 35.43283582089552,
"alnum_prop": 0.7038753159224936,
"repo_name": "lukehutch/gribbit-rox",
"id": "84ed49b64ee9997ef2e87e328a2769faeee628e5",
"size": "2374",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "attic/src/com/flat502/rox/marshal/MethodResponseUnmarshaller.java",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "HTML",
"bytes": "5335"
},
{
"name": "Java",
"bytes": "1814926"
}
],
"symlink_target": ""
} |
package org.openengsb.connector.plaintextreport.internal;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
import org.junit.Test;
public class StringReportPartTest {
@Test
public void getBytes_shouldReturnByteRepresentation() {
String content = "Foobarbuz";
StringReportPart part = new StringReportPart("repPart", "text/plain", content);
assertThat(part.getContent(), is(content.getBytes()));
}
}
| {
"content_hash": "4f747158ded1db8d905d184cb82ff211",
"timestamp": "",
"source": "github",
"line_count": 19,
"max_line_length": 87,
"avg_line_length": 25.157894736842106,
"alnum_prop": 0.7322175732217573,
"repo_name": "openengsb-domcon/openengsb-connector-plaintextreport",
"id": "ed6e2976174c1073319cda8f512d21b344c57d46",
"size": "1306",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/test/java/org/openengsb/connector/plaintextreport/internal/StringReportPartTest.java",
"mode": "33261",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "27446"
}
],
"symlink_target": ""
} |
(function() {
'use strict';
angular
.module('app', [
'app.core',
'app.home'
])
.run(['$rootScope', '$location', '$timeout', function($rootScope, $location, $timeout) {
$rootScope.$on('$routeChangeError', function() {
$location.path("/error");
});
$rootScope.$on('$routeChangeStart', function() {
$rootScope.isLoading = true;
});
$rootScope.$on('$routeChangeSuccess', function() {
$timeout(function() {
$rootScope.isLoading = false;
}, 1000);
});
}])
.config(function($locationProvider, $routeProvider) {
// $locationProvider.hashPrefix('!');
$routeProvider.otherwise({
redirectTo: '/'
});
});
}());
| {
"content_hash": "66ba19c006dcfe4b64fc751a29d9e8df",
"timestamp": "",
"source": "github",
"line_count": 29,
"max_line_length": 96,
"avg_line_length": 30.655172413793103,
"alnum_prop": 0.44431946006749157,
"repo_name": "bhochhi/thinking-cap",
"id": "e6f9d6d2315df1fb37a265bc1186ce3292aec917",
"size": "889",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "app/app.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "167"
},
{
"name": "HTML",
"bytes": "1838"
},
{
"name": "JavaScript",
"bytes": "10939"
}
],
"symlink_target": ""
} |
/**
* Automatically generated file. Please do not edit.
* @author Highcharts Config Generator by Karasiq
* @see [[http://api.highcharts.com/highstock]]
*/
package com.highstock.config
import scalajs.js, js.`|`
import com.highcharts.CleanJsObject
import com.highcharts.HighchartsUtils._
/**
* @note JavaScript name: <code>plotOptions-areasplinerange-point</code>
*/
@js.annotation.ScalaJSDefined
class PlotOptionsAreasplinerangePoint extends com.highcharts.HighchartsGenericObject {
/**
* <p>Events for each single point.</p>
* @since 2.3.0
*/
val events: js.Any = js.undefined
}
object PlotOptionsAreasplinerangePoint {
/**
* @param events <p>Events for each single point.</p>
*/
def apply(events: js.UndefOr[js.Any] = js.undefined): PlotOptionsAreasplinerangePoint = {
val eventsOuter: js.Any = events
com.highcharts.HighchartsGenericObject.toCleanObject(new PlotOptionsAreasplinerangePoint {
override val events: js.Any = eventsOuter
})
}
}
| {
"content_hash": "4e209a31f03fdc8c9e900dfdd714eecd",
"timestamp": "",
"source": "github",
"line_count": 35,
"max_line_length": 94,
"avg_line_length": 28.771428571428572,
"alnum_prop": 0.7219463753723933,
"repo_name": "Karasiq/scalajs-highcharts",
"id": "165f7c190cf8125a0b87ae1c58ede012fad4b001",
"size": "1007",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/main/scala/com/highstock/config/PlotOptionsAreasplinerangePoint.scala",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Scala",
"bytes": "131509301"
}
],
"symlink_target": ""
} |
/*
* Created on Jul 14, 2004
*/
package org.jkiss.dbeaver.erd.ui.dnd;
import org.eclipse.gef3.requests.CreationFactory;
/**
* Factory for creating instances of new objects from a palette
* @author Serge Rider
*/
public class DataElementFactory implements CreationFactory
{
private Object template;
/**
* Creates a new FlowElementFactory with the given template object
*
* @param o
* the template
*/
public DataElementFactory(Object o)
{
template = o;
}
/**
* @see org.eclipse.gef3.requests.CreationFactory#getNewObject()
*/
@Override
public Object getNewObject()
{
try
{
return ((Class<?>) template).getConstructor().newInstance();
}
catch (Exception e)
{
return null;
}
}
/**
* @see org.eclipse.gef3.requests.CreationFactory#getObjectType()
*/
@Override
public Object getObjectType()
{
return template;
}
} | {
"content_hash": "6f0dd667aa11f33139de2abb16cc231d",
"timestamp": "",
"source": "github",
"line_count": 54,
"max_line_length": 67,
"avg_line_length": 16.537037037037038,
"alnum_prop": 0.6730123180291153,
"repo_name": "dbeaver/dbeaver",
"id": "f3b4c927c975e09f0b084a6278997e7dda41100e",
"size": "1548",
"binary": false,
"copies": "2",
"ref": "refs/heads/devel",
"path": "plugins/org.jkiss.dbeaver.erd.ui/src/org/jkiss/dbeaver/erd/ui/dnd/DataElementFactory.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "2837"
},
{
"name": "C++",
"bytes": "63113"
},
{
"name": "CSS",
"bytes": "19889"
},
{
"name": "HTML",
"bytes": "10899"
},
{
"name": "Java",
"bytes": "24735648"
},
{
"name": "Shell",
"bytes": "202"
},
{
"name": "XSLT",
"bytes": "8047"
}
],
"symlink_target": ""
} |
// ----- this file has been automatically generated - do not edit
import { UAProperty } from "node-opcua-address-space-base"
import { DataType, VariantOptions } from "node-opcua-variant"
import { DTAxisInformation } from "./dt_axis_information"
import { UAArrayItem, UAArrayItem_Base } from "./ua_array_item"
/**
* | | |
* |----------------|--------------------------------------------------|
* |namespace |http://opcfoundation.org/UA/ |
* |nodeClass |VariableType |
* |typedDefinition |YArrayItemType ns=0;i=12029 |
* |dataType |Null |
* |dataType Name |VariantOptions[] ns=0;i=0 |
* |isAbstract |false |
*/
export interface UAYArrayItem_Base<T, DT extends DataType> extends UAArrayItem_Base<T, DT> {
xAxisDefinition: UAProperty<DTAxisInformation, DataType.ExtensionObject>;
}
export interface UAYArrayItem<T, DT extends DataType> extends UAArrayItem<T, DT>, UAYArrayItem_Base<T, DT> {
} | {
"content_hash": "be1066a69ac1a5c8685a9e307b23b7ce",
"timestamp": "",
"source": "github",
"line_count": 20,
"max_line_length": 108,
"avg_line_length": 59.25,
"alnum_prop": 0.5080168776371308,
"repo_name": "node-opcua/node-opcua",
"id": "f1b216769eaa0b2be2e748353c4eb761b1846c87",
"size": "1185",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "packages/node-opcua-nodeset-ua/source/ua_y_array_item.ts",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "2277"
},
{
"name": "Dockerfile",
"bytes": "460"
},
{
"name": "JavaScript",
"bytes": "2558006"
},
{
"name": "Makefile",
"bytes": "2119"
},
{
"name": "Shell",
"bytes": "4981"
},
{
"name": "TypeScript",
"bytes": "8392344"
},
{
"name": "XSLT",
"bytes": "5379"
}
],
"symlink_target": ""
} |
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: >
If argArray is either an array or an arguments object,
the function is passed the (ToUint32(argArray.length)) arguments argArray[0], argArray[1],...,argArray[ToUint32(argArray.length)-1]
es5id: 15.3.4.3_A7_T7
description: >
argArray is (null, arguments), inside function call without
declaration used
---*/
(function (){
Function("a1,a2,a3","this.shifted=a1+a2+a3;").apply(null,arguments);
})("",1,2);
//CHECK#1
if (this["shifted"] !== "12") {
$ERROR('#1: If argArray is either an array or an arguments object, the function is passed the...');
}
| {
"content_hash": "75fe59937d42da17d392f4225a0622de",
"timestamp": "",
"source": "github",
"line_count": 21,
"max_line_length": 135,
"avg_line_length": 34.04761904761905,
"alnum_prop": 0.6867132867132867,
"repo_name": "baslr/ArangoDB",
"id": "864f1e054ccf5826a32422a75d8d61b7dd095463",
"size": "715",
"binary": false,
"copies": "4",
"ref": "refs/heads/3.1-silent",
"path": "3rdParty/V8/V8-5.0.71.39/test/test262/data/test/built-ins/Function/prototype/apply/S15.3.4.3_A7_T7.js",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Ada",
"bytes": "89080"
},
{
"name": "Assembly",
"bytes": "391227"
},
{
"name": "Awk",
"bytes": "4272"
},
{
"name": "Batchfile",
"bytes": "62892"
},
{
"name": "C",
"bytes": "7932707"
},
{
"name": "C#",
"bytes": "96430"
},
{
"name": "C++",
"bytes": "284363933"
},
{
"name": "CLIPS",
"bytes": "5291"
},
{
"name": "CMake",
"bytes": "681903"
},
{
"name": "CSS",
"bytes": "1036656"
},
{
"name": "CWeb",
"bytes": "174166"
},
{
"name": "Cuda",
"bytes": "52444"
},
{
"name": "DIGITAL Command Language",
"bytes": "259402"
},
{
"name": "Emacs Lisp",
"bytes": "14637"
},
{
"name": "Fortran",
"bytes": "1856"
},
{
"name": "Groovy",
"bytes": "131"
},
{
"name": "HTML",
"bytes": "2318016"
},
{
"name": "Java",
"bytes": "2325801"
},
{
"name": "JavaScript",
"bytes": "67878359"
},
{
"name": "LLVM",
"bytes": "24129"
},
{
"name": "Lex",
"bytes": "1231"
},
{
"name": "Lua",
"bytes": "16189"
},
{
"name": "M4",
"bytes": "600550"
},
{
"name": "Makefile",
"bytes": "509612"
},
{
"name": "Max",
"bytes": "36857"
},
{
"name": "Module Management System",
"bytes": "1545"
},
{
"name": "NSIS",
"bytes": "28404"
},
{
"name": "Objective-C",
"bytes": "19321"
},
{
"name": "Objective-C++",
"bytes": "2503"
},
{
"name": "PHP",
"bytes": "98503"
},
{
"name": "Pascal",
"bytes": "145688"
},
{
"name": "Perl",
"bytes": "720157"
},
{
"name": "Perl 6",
"bytes": "9918"
},
{
"name": "Python",
"bytes": "5859911"
},
{
"name": "QMake",
"bytes": "16692"
},
{
"name": "R",
"bytes": "5123"
},
{
"name": "Rebol",
"bytes": "354"
},
{
"name": "Roff",
"bytes": "1010686"
},
{
"name": "Ruby",
"bytes": "922159"
},
{
"name": "SAS",
"bytes": "1847"
},
{
"name": "Scheme",
"bytes": "10604"
},
{
"name": "Shell",
"bytes": "511077"
},
{
"name": "Swift",
"bytes": "116"
},
{
"name": "Tcl",
"bytes": "1172"
},
{
"name": "TeX",
"bytes": "32117"
},
{
"name": "Vim script",
"bytes": "4075"
},
{
"name": "Visual Basic",
"bytes": "11568"
},
{
"name": "XSLT",
"bytes": "551977"
},
{
"name": "Yacc",
"bytes": "53005"
}
],
"symlink_target": ""
} |
<html><img border=0 src=122-56-5.txt alt=122-56-5.txt></img><body>
"x"
"1" "SHORT-TERM TEST PROGRAM SPONSORED BY THE DIVISION OF CANCER BIOLOGY,NATIONAL CANCER INSTITUTE, MS. ELLEN ZAIKA, ASSISTANT PROJECT OFFICER , p.Y92"
</body></html>
| {
"content_hash": "d6bb55005eefecafeef8a6ca212aef7f",
"timestamp": "",
"source": "github",
"line_count": 4,
"max_line_length": 153,
"avg_line_length": 60,
"alnum_prop": 0.725,
"repo_name": "andrewdefries/Ames_ToxBenchmark",
"id": "bdf694c2415ee9d5bd81205f9985d0755645fa7c",
"size": "240",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "122-56-5.txt.html",
"mode": "33188",
"license": "mit",
"language": [],
"symlink_target": ""
} |
package org.gradle.internal.buildtree;
import org.gradle.internal.build.ExecutionResult;
public class DefaultBuildTreeWorkExecutor implements BuildTreeWorkExecutor {
@Override
public ExecutionResult<Void> execute(BuildTreeWorkGraph graph) {
return graph.runWork();
}
}
| {
"content_hash": "fcd25af2853009d2460e0c59dcb828de",
"timestamp": "",
"source": "github",
"line_count": 12,
"max_line_length": 76,
"avg_line_length": 24.416666666666668,
"alnum_prop": 0.7747440273037542,
"repo_name": "blindpirate/gradle",
"id": "0b18814cdf6efe13803ffb5d16bfa32eb18d620e",
"size": "908",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "subprojects/core/src/main/java/org/gradle/internal/buildtree/DefaultBuildTreeWorkExecutor.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Assembly",
"bytes": "277"
},
{
"name": "Brainfuck",
"bytes": "54"
},
{
"name": "C",
"bytes": "123600"
},
{
"name": "C++",
"bytes": "1781062"
},
{
"name": "CSS",
"bytes": "173356"
},
{
"name": "GAP",
"bytes": "424"
},
{
"name": "Gherkin",
"bytes": "191"
},
{
"name": "Groovy",
"bytes": "30003442"
},
{
"name": "HTML",
"bytes": "59961"
},
{
"name": "Java",
"bytes": "28084200"
},
{
"name": "JavaScript",
"bytes": "78583"
},
{
"name": "Kotlin",
"bytes": "4000485"
},
{
"name": "Objective-C",
"bytes": "652"
},
{
"name": "Objective-C++",
"bytes": "441"
},
{
"name": "Python",
"bytes": "57"
},
{
"name": "Ruby",
"bytes": "16"
},
{
"name": "Scala",
"bytes": "10840"
},
{
"name": "Shell",
"bytes": "12897"
},
{
"name": "Swift",
"bytes": "2040"
},
{
"name": "XSLT",
"bytes": "42693"
},
{
"name": "jq",
"bytes": "171"
}
],
"symlink_target": ""
} |
namespace Tests.Map
{
using System.Data.Entity.ModelConfiguration;
using Tests.Fakes;
class ProductMap : EntityTypeConfiguration<Product>
{
public ProductMap()
{
HasKey(p => p.Id);
Property(p => p.Name);
HasOptional(p => p.Manufacturer);
HasMany(p => p.Models);
}
}
} | {
"content_hash": "4e19dba126758757622401b8bba72ba8",
"timestamp": "",
"source": "github",
"line_count": 19,
"max_line_length": 55,
"avg_line_length": 19.157894736842106,
"alnum_prop": 0.5384615384615384,
"repo_name": "hermsdorff/ODataSelectToWebAPI",
"id": "8b5d472cca4e932ec0ccdfada1a136e488d96bf3",
"size": "366",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Tests/Map/ProductMap.cs",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "ASP",
"bytes": "103"
},
{
"name": "C#",
"bytes": "154523"
},
{
"name": "CSS",
"bytes": "14701"
},
{
"name": "JavaScript",
"bytes": "572"
}
],
"symlink_target": ""
} |
auth = angular.module('auth', []);
auth.controller('login', ['$scope', '$http', function($scope, $http) {
$scope.httpForm = new icaav.services.HTTPForm($http);
$scope.authUrl = '/auth/authentication';
$scope.user = {};
$scope.authentication = function() {
$scope.httpForm.post(icaav.helpers.getBasePath() + $scope.authUrl, $scope.user)
.success(function(response) {
if(response.success) {
window.location.href = icaav.helpers.getBasePath() + "/admin";
} else {
console.log('No redirect user');
}
});
};
}]);
| {
"content_hash": "fdc380f703f3536cdbe76adc19a61220",
"timestamp": "",
"source": "github",
"line_count": 19,
"max_line_length": 87,
"avg_line_length": 32.78947368421053,
"alnum_prop": 0.5585874799357945,
"repo_name": "Juanin88/icaav",
"id": "cd29563971bb119c8a447ae2287ef4047819d551",
"size": "623",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "public/js/angular/modules/auth/controllers/login.js",
"mode": "33261",
"license": "bsd-3-clause",
"language": [
{
"name": "ApacheConf",
"bytes": "711"
},
{
"name": "CSS",
"bytes": "1042"
},
{
"name": "HTML",
"bytes": "12142"
},
{
"name": "PHP",
"bytes": "35387"
}
],
"symlink_target": ""
} |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.beans;
import com.util.ReasignacionMasivaRun;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import javax.faces.application.FacesMessage;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
import javax.servlet.http.HttpSession;
import org.primefaces.context.RequestContext;
import procuradoria.map.Uzatcaso;
import procuradoria.crud.ProcuradoriaMethods;
import procuradoria.map.Uzatasign;
import procuradoria.map.UzatasignId;
import procuradoria.map.Uzatfunci;
/**
*
* @author FANNY
*/
@ManagedBean
@ViewScoped
public class ReasignarCasoBean {
/**
* Creates a new instance of ResumenProcuBean
*/
private String NumCausa;
private Uzatcaso selectedCaso;
private Uzatasign asignold;
private String cedulaAbo;
private Uzatfunci nuevofunci;
private Uzatasign nuevaasign;
private String motivo;
private String valueFindCasos;
private List<Uzatasign> casosAsigandos;
private List<Uzatasign> casosSeleccionados;
public ReasignarCasoBean() {
this.selectedCaso = null;
this.asignold = null;
this.nuevofunci = null;
this.nuevaasign = new Uzatasign();
}
public void ReasignarValidacion(ActionEvent event) {
if (this.casosSeleccionados.isEmpty()) {
addMessage("Seleccione los casos que desea reasignar.");
} else {
this.nuevofunci = null;
this.cedulaAbo = "";
this.motivo = "";
RequestContext.getCurrentInstance().execute("PF('multiCarDialog').show()");
}
}
public void cargarCaso() {
if (NumCausa.equals("")) {
addMessage("Ingrese el número de causa que desea buscar.");
this.selectedCaso = null;
this.asignold = null;
} else {
this.selectedCaso = ProcuradoriaMethods.FindCasobyNumCausa(NumCausa);
if (this.selectedCaso == null) {
addMessage("No se ha encontrado ningún caso.");
this.asignold = null;
} else {
this.asignold = ProcuradoriaMethods.GetActiveAbogadosByIdCaso(this.selectedCaso.getUzatcasoId());
}
}
}
public void findAbobyCedula() {
if (cedulaAbo.equals("")) {
addMessage("Ingrese el número de cédula del abogado que desea buscar.");
this.nuevofunci = null;
} else {
this.nuevofunci = ProcuradoriaMethods.FindFuncionarioByCedula(cedulaAbo);
if (this.nuevofunci == null) {
addMessage("No se ha encontrado ningún abogado.");
}
}
}
public void loadCasosAsignados() {
if (this.valueFindCasos.equals("")) {
this.casosAsigandos = null;
addMessage("Ingrese la cédula del abogado que desea buscar sus casos.");
} else {
this.casosAsigandos = ProcuradoriaMethods.FindCasosReasignar(valueFindCasos);
if (this.casosAsigandos.isEmpty()) {
this.casosAsigandos = null;
addMessage("No se han encontrado casos relacionados con dicha cédula.");
}
}
}
public void asignarcaso() {
if (this.nuevofunci != null) {
nuevaasign.setId(new UzatasignId(this.nuevofunci.getUzatfuncionarioId(), this.selectedCaso.getUzatcasoId()));
nuevaasign.setUzatasignarFechaIn(getDate());
nuevaasign.setUzatasignarMotivo(motivo);
nuevaasign.setUzatasignarFlag(BigDecimal.ONE);
nuevaasign.setUzatasignarId(getUserAttribute());
if (ProcuradoriaMethods.insertAsign(nuevaasign)) {
this.NumCausa = "";
this.asignold = ProcuradoriaMethods.GetActiveAbogadosByIdCaso(this.selectedCaso.getUzatcasoId());
RequestContext.getCurrentInstance().execute("PF('wabo').hide();");
addMessage("Se ha reasignado el caso satisfactoriamente");
} else {
addMessage("Ha ocurrido un error");
}
} else {
addMessage("Seleccione el abogado al que desea hacer la reasignación.");
}
}
public void inicializarReasig() {
this.nuevofunci = null;
this.cedulaAbo = "";
this.motivo = "";
RequestContext.getCurrentInstance().execute("PF('wabo').show();");
}
public void asignarcasoMasivo() {
if (this.nuevofunci != null) {
ReasignacionMasivaRun Hilo = new ReasignacionMasivaRun(nuevofunci, nuevaasign, casosSeleccionados, motivo, getUserAttribute());
Hilo.run();
Boolean exito = Hilo.getExito();
if (exito) {
RequestContext.getCurrentInstance().execute("PF('multiCarDialog').hide();");
this.casosAsigandos.clear();
this.valueFindCasos = "";
addMessage("Se han reasignado los casos satisfactoriamente.");
} else {
addMessage("Ha ocurrido un error.");
}
} else {
this.nuevofunci = null;
addMessage("Seleccione algún abogado para realizar la acción.");
}
}
private BigDecimal getUserAttribute() {
String UserAttribute = "";
BigDecimal id = new BigDecimal(BigInteger.ZERO);
FacesContext facesContext = FacesContext.getCurrentInstance();
HttpSession session = (HttpSession) facesContext.getExternalContext().getSession(false);
if (session == null) {
} else {
Object IdBanner = session.getAttribute("uzatfuncionarioId");
UserAttribute = IdBanner.toString();
id = new BigDecimal(UserAttribute);
}
return id;
}
public static String getDate() {
SimpleDateFormat sdfDate = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");//dd/MM/yyyy
Date now = new Date();
String strDate = sdfDate.format(now);
return strDate;
}
public void addMessage(String summary) {
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO, summary, null);
FacesContext.getCurrentInstance().addMessage(null, message);
}
public String getNumCausa() {
return NumCausa;
}
public void setNumCausa(String NumCausa) {
this.NumCausa = NumCausa;
}
public Uzatcaso getSelectedCaso() {
return selectedCaso;
}
public void setSelectedCaso(Uzatcaso selectedCaso) {
this.selectedCaso = selectedCaso;
}
public Uzatasign getAsignold() {
return asignold;
}
public void setAsignold(Uzatasign asignold) {
this.asignold = asignold;
}
public String getCedulaAbo() {
return cedulaAbo;
}
public void setCedulaAbo(String cedulaAbo) {
this.cedulaAbo = cedulaAbo;
}
public Uzatfunci getNuevofunci() {
return nuevofunci;
}
public void setNuevofunci(Uzatfunci nuevofunci) {
this.nuevofunci = nuevofunci;
}
public Uzatasign getNuevaasign() {
return nuevaasign;
}
public void setNuevaasign(Uzatasign nuevaasign) {
this.nuevaasign = nuevaasign;
}
public String getMotivo() {
return motivo;
}
public void setMotivo(String motivo) {
this.motivo = motivo;
}
public String getValueFindCasos() {
return valueFindCasos;
}
public void setValueFindCasos(String valueFindCasos) {
this.valueFindCasos = valueFindCasos;
}
public List<Uzatasign> getCasosAsigandos() {
return casosAsigandos;
}
public void setCasosAsigandos(List<Uzatasign> casosAsigandos) {
this.casosAsigandos = casosAsigandos;
}
public List<Uzatasign> getCasosSeleccionados() {
return casosSeleccionados;
}
public void setCasosSeleccionados(List<Uzatasign> casosSeleccionados) {
this.casosSeleccionados = casosSeleccionados;
}
}
| {
"content_hash": "13d15816be8b6967f9a40cbf7374a245",
"timestamp": "",
"source": "github",
"line_count": 267,
"max_line_length": 139,
"avg_line_length": 32.161048689138575,
"alnum_prop": 0.6141842319785723,
"repo_name": "LawyerOffice/LawyerOfficeApp",
"id": "a9fc11c140f0d374e465ac6e5a6a66173982ac67",
"size": "8597",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/java/com/beans/ReasignarCasoBean.java",
"mode": "33261",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "7012"
},
{
"name": "HTML",
"bytes": "193351"
},
{
"name": "Java",
"bytes": "155275"
},
{
"name": "JavaScript",
"bytes": "294"
}
],
"symlink_target": ""
} |
<?php
$installer = $this;
/* @var $installer Mage_Sales_Model_Entity_Setup */
$installer->startSetup();
$installer->run("
CREATE TABLE `{$installer->getTable('sales_flat_quote')}` (
`entity_id` int(10) unsigned NOT NULL auto_increment,
`store_id` smallint(5) unsigned NOT NULL default '0',
`created_at` datetime NOT NULL default '0000-00-00 00:00:00',
`updated_at` datetime NOT NULL default '0000-00-00 00:00:00',
`converted_at` datetime NOT NULL default '0000-00-00 00:00:00',
`is_active` tinyint(1) unsigned default '1',
`is_virtual` tinyint(1) unsigned default '0',
`is_multi_shipping` tinyint(1) unsigned default '0',
`items_count` int(10) unsigned default '0',
`items_qty` decimal(12,4) default '0.0000',
`orig_order_id` int(10) unsigned default '0',
`store_to_base_rate` decimal(12,4) default '0.0000',
`store_to_quote_rate` decimal(12,4) default '0.0000',
`base_currency_code` varchar(255) default NULL,
`store_currency_code` varchar(255) default NULL,
`quote_currency_code` varchar(255) default NULL,
`grand_total` decimal(12,4) default '0.0000',
`base_grand_total` decimal(12,4) default '0.0000',
`checkout_method` varchar(255) default NULL,
`customer_id` int(10) unsigned default '0',
`customer_tax_class_id` int(10) unsigned default '0',
`customer_group_id` int(10) unsigned default '0',
`customer_email` varchar(255) default NULL,
`customer_prefix` varchar(40) default NULL,
`customer_firstname` varchar(255) default NULL,
`customer_middlename` varchar(40) default NULL,
`customer_lastname` varchar(255) default NULL,
`customer_suffix` varchar(40) default NULL,
`customer_dob` datetime default NULL,
`customer_note` varchar(255) default NULL,
`customer_note_notify` tinyint(1) unsigned default '1',
`customer_is_guest` tinyint(1) unsigned default '0',
`remote_ip` varchar(32) default NULL,
`applied_rule_ids` varchar(255) default NULL,
`reserved_order_id` varchar(64) default '',
`password_hash` varchar(255) default NULL,
`coupon_code` varchar(255) default NULL,
PRIMARY KEY (`entity_id`),
KEY `FK_SALES_QUOTE_STORE` (`store_id`),
KEY `IDX_CUSTOMER` (`customer_id`,`store_id`,`is_active`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `{$installer->getTable('sales_flat_quote_address')}` (
`address_id` int(10) unsigned NOT NULL auto_increment,
`quote_id` int(10) unsigned NOT NULL default '0',
`created_at` datetime NOT NULL default '0000-00-00 00:00:00',
`updated_at` datetime NOT NULL default '0000-00-00 00:00:00',
`customer_id` int(10) unsigned default NULL,
`save_in_address_book` tinyint(1) default '0',
`customer_address_id` int(10) unsigned default NULL,
`address_type` varchar(255) default NULL,
`email` varchar(255) default NULL,
`prefix` varchar(40) default NULL,
`firstname` varchar(255) default NULL,
`middlename` varchar(40) default NULL,
`lastname` varchar(255) default NULL,
`suffix` varchar(40) default NULL,
`company` varchar(255) default NULL,
`street` varchar(255) default NULL,
`city` varchar(255) default NULL,
`region` varchar(255) default NULL,
`region_id` int(10) unsigned default NULL,
`postcode` varchar(255) default NULL,
`country_id` varchar(255) default NULL,
`telephone` varchar(255) default NULL,
`fax` varchar(255) default NULL,
`same_as_billing` tinyint(1) unsigned NOT NULL default '0',
`free_shipping` tinyint(1) unsigned NOT NULL default '0',
`collect_shipping_rates` tinyint(1) unsigned NOT NULL default '0',
`shipping_method` varchar(255) NOT NULL default '',
`shipping_description` varchar(255) NOT NULL default '',
`weight` decimal(12,4) NOT NULL default '0.0000',
`subtotal` decimal(12,4) NOT NULL default '0.0000',
`base_subtotal` decimal(12,4) NOT NULL default '0.0000',
`subtotal_with_discount` decimal(12,4) NOT NULL default '0.0000',
`base_subtotal_with_discount` decimal(12,4) NOT NULL default '0.0000',
`tax_amount` decimal(12,4) NOT NULL default '0.0000',
`base_tax_amount` decimal(12,4) NOT NULL default '0.0000',
`shipping_amount` decimal(12,4) NOT NULL default '0.0000',
`base_shipping_amount` decimal(12,4) NOT NULL default '0.0000',
`shipping_tax_amount` decimal(12,4) default NULL,
`base_shipping_tax_amount` decimal(12,4) default NULL,
`discount_amount` decimal(12,4) NOT NULL default '0.0000',
`base_discount_amount` decimal(12,4) NOT NULL default '0.0000',
`grand_total` decimal(12,4) NOT NULL default '0.0000',
`base_grand_total` decimal(12,4) NOT NULL default '0.0000',
`customer_notes` text,
PRIMARY KEY (`address_id`),
KEY `FK_SALES_QUOTE_ADDRESS_SALES_QUOTE` (`quote_id`),
CONSTRAINT `FK_SALES_QUOTE_ADDRESS_SALES_QUOTE` FOREIGN KEY (`quote_id`) REFERENCES `{$installer->getTable('sales_flat_quote')}` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `{$installer->getTable('sales_flat_quote_address_item')}` (
`address_item_id` int(10) unsigned NOT NULL auto_increment,
`quote_address_id` int(10) unsigned NOT NULL default '0',
`quote_item_id` int(10) unsigned NOT NULL default '0',
`created_at` datetime NOT NULL default '0000-00-00 00:00:00',
`updated_at` datetime NOT NULL default '0000-00-00 00:00:00',
`applied_rule_ids` text,
`additional_data` text,
`weight` decimal(12,4) default '0.0000',
`qty` decimal(12,4) NOT NULL default '0.0000',
`discount_amount` decimal(12,4) default '0.0000',
`tax_amount` decimal(12,4) default '0.0000',
`row_total` decimal(12,4) NOT NULL default '0.0000',
`base_row_total` decimal(12,4) NOT NULL default '0.0000',
`row_total_with_discount` decimal(12,4) default '0.0000',
`base_discount_amount` decimal(12,4) default '0.0000',
`base_tax_amount` decimal(12,4) default '0.0000',
`row_weight` decimal(12,4) default '0.0000',
PRIMARY KEY (`address_item_id`),
KEY `FK_QUOTE_ADDRESS_ITEM_QUOTE_ADDRESS` (`quote_address_id`),
KEY `FK_SALES_QUOTE_ADDRESS_ITEM_QUOTE_ITEM` (`quote_item_id`),
CONSTRAINT `FK_QUOTE_ADDRESS_ITEM_QUOTE_ADDRESS` FOREIGN KEY (`quote_address_id`) REFERENCES `{$installer->getTable('sales_flat_quote_address')}` (`address_id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `FK_SALES_QUOTE_ADDRESS_ITEM_QUOTE_ITEM` FOREIGN KEY (`quote_item_id`) REFERENCES `{$installer->getTable('sales_flat_quote_item')}` (`item_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `{$installer->getTable('sales_flat_quote_item')}` (
`item_id` int(10) unsigned NOT NULL auto_increment,
`quote_id` int(10) unsigned NOT NULL default '0',
`created_at` datetime NOT NULL default '0000-00-00 00:00:00',
`updated_at` datetime NOT NULL default '0000-00-00 00:00:00',
`product_id` int(10) unsigned default NULL,
`super_product_id` int(10) unsigned default NULL,
`parent_product_id` int(10) unsigned default NULL,
`is_virtual` tinyint(1) unsigned default NULL,
`sku` varchar(255) NOT NULL default '',
`name` varchar(255) default NULL,
`description` text,
`applied_rule_ids` text,
`additional_data` text,
`free_shipping` tinyint(1) unsigned NOT NULL default '0',
`is_qty_decimal` tinyint(1) unsigned default NULL,
`no_discount` tinyint(1) unsigned default '0',
`weight` decimal(12,4) default '0.0000',
`qty` decimal(12,4) NOT NULL default '0.0000',
`price` decimal(12,4) NOT NULL default '0.0000',
`base_price` decimal(12,4) NOT NULL default '0.0000',
`custom_price` decimal(12,4) default NULL,
`discount_percent` decimal(12,4) default '0.0000',
`discount_amount` decimal(12,4) default '0.0000',
`base_discount_amount` decimal(12,4) default '0.0000',
`tax_percent` decimal(12,4) default '0.0000',
`tax_amount` decimal(12,4) default '0.0000',
`base_tax_amount` decimal(12,4) default '0.0000',
`row_total` decimal(12,4) NOT NULL default '0.0000',
`base_row_total` decimal(12,4) NOT NULL default '0.0000',
`row_total_with_discount` decimal(12,4) default '0.0000',
`row_weight` decimal(12,4) default '0.0000',
PRIMARY KEY (`item_id`),
KEY `FK_SALES_QUOTE_ITEM_SALES_QUOTE` (`quote_id`),
CONSTRAINT `FK_SALES_QUOTE_ITEM_SALES_QUOTE` FOREIGN KEY (`quote_id`) REFERENCES `{$installer->getTable('sales_flat_quote')}` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `{$installer->getTable('sales_flat_quote_item_option')}` (
`option_id` int(10) unsigned NOT NULL auto_increment,
`item_id` int(10) unsigned NOT NULL,
`product_id` int(10) unsigned NOT NULL,
`code` varchar(255) NOT NULL,
`value` text NOT NULL,
PRIMARY KEY (`option_id`),
KEY `FK_SALES_QUOTE_ITEM_OPTION_ITEM_ID` (`item_id`),
CONSTRAINT `FK_SALES_QUOTE_ITEM_OPTION_ITEM_ID` FOREIGN KEY (`item_id`) REFERENCES `{$installer->getTable('sales_flat_quote_item')}` (`item_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Additional options for quote item';
CREATE TABLE `{$installer->getTable('sales_flat_quote_payment')}` (
`payment_id` int(10) unsigned NOT NULL auto_increment,
`quote_id` int(10) unsigned NOT NULL default '0',
`created_at` datetime NOT NULL default '0000-00-00 00:00:00',
`updated_at` datetime NOT NULL default '0000-00-00 00:00:00',
`method` varchar(255) default '',
`cc_type` varchar(255) default '',
`cc_number_enc` varchar(255) default '',
`cc_last4` varchar(255) default '',
`cc_cid_enc` varchar(255) default '',
`cc_owner` varchar(255) default '',
`cc_exp_month` tinyint(2) unsigned default '0',
`cc_exp_year` smallint(4) unsigned default '0',
`cc_ss_owner` varchar(255) default '',
`cc_ss_start_month` tinyint(2) unsigned default '0',
`cc_ss_start_year` smallint(4) unsigned default '0',
`cybersource_token` varchar(255) default '',
`paypal_correlation_id` varchar(255) default '',
`paypal_payer_id` varchar(255) default '',
`paypal_payer_status` varchar(255) default '',
`po_number` varchar(255) default '',
PRIMARY KEY (`payment_id`),
KEY `FK_SALES_QUOTE_PAYMENT_SALES_QUOTE` (`quote_id`),
CONSTRAINT `FK_SALES_QUOTE_PAYMENT_SALES_QUOTE` FOREIGN KEY (`quote_id`) REFERENCES `{$installer->getTable('sales_flat_quote')}` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `{$installer->getTable('sales_flat_quote_shipping_rate')}` (
`rate_id` int(10) unsigned NOT NULL auto_increment,
`address_id` int(10) unsigned NOT NULL default '0',
`created_at` datetime NOT NULL default '0000-00-00 00:00:00',
`updated_at` datetime NOT NULL default '0000-00-00 00:00:00',
`carrier` varchar(255) default NULL,
`carrier_title` varchar(255) default NULL,
`code` varchar(255) default NULL,
`method` varchar(255) default NULL,
`method_description` text,
`price` decimal(12,4) NOT NULL default '0.0000',
PRIMARY KEY (`rate_id`),
KEY `FK_SALES_QUOTE_SHIPPING_RATE_ADDRESS` (`address_id`),
CONSTRAINT `FK_SALES_QUOTE_SHIPPING_RATE_ADDRESS` FOREIGN KEY (`address_id`) REFERENCES `{$installer->getTable('sales_flat_quote_address')}` (`address_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DELETE FROM `{$installer->getTable('log_quote')}`;
");
$installer->addAttribute('order_item', 'is_virtual', array('type'=>'int'));
$installer->endSetup();
/**
* Copy old quotes
*/
@set_time_limit(0);
$quoteFields = array_keys($installer->getConnection()->describeTable($installer->getTable('sales_flat_quote')));
$itemFields = array_keys($installer->getConnection()->describeTable($installer->getTable('sales_flat_quote_item')));
$quoteRows = array();
$query = $installer->getConnection()->query(
$installer->getConnection()->select()
->from($installer->getTable('sales_quote'), 'entity_id')
);
while ($row = $query->fetch()) {
$quoteRows[] = $row['entity_id'];
}
foreach ($quoteRows as $oldQuoteId) {
$quoteInfo = $installer->getConnection()->fetchRow(
$installer->getConnection()->select()
->from($installer->getTable('sales_quote'))
->where('entity_id=?', $oldQuoteId)
);
$quoteItems = $installer->getConnection()->fetchAll(
$installer->getConnection()->select()
->from($installer->getTable('sales_quote_item'))
->where('parent_id=?', $oldQuoteId)
);
if (!empty($quoteItems)) {
unset($quoteInfo['entity_id']);
$quoteData = array();
foreach ($quoteFields as $field) {
if (isset($quoteInfo[$field])) {
$quoteData[$field] = $quoteInfo[$field];
}
}
$installer->getConnection()->insert($installer->getTable('sales_flat_quote'), $quoteData);
$quoteId = $installer->getConnection()->lastInsertId();
foreach ($quoteItems as $itemInfo) {
$itemData = array(
'quote_id' => $quoteId
);
foreach ($itemFields as $field) {
if (isset($itemInfo[$field])) {
$itemData[$field] = $itemInfo[$field];
}
}
$installer->getConnection()->insert($installer->getTable('sales_flat_quote_item'), $itemData);
}
}
}
$installer->startSetup();
$installer->run("
DROP TABLE IF EXISTS {$this->getTable('sales_quote')};
DROP TABLE IF EXISTS {$this->getTable('sales_quote_address')};
DROP TABLE IF EXISTS {$this->getTable('sales_quote_address_decimal')};
DROP TABLE IF EXISTS {$this->getTable('sales_quote_address_int')};
DROP TABLE IF EXISTS {$this->getTable('sales_quote_address_text')};
DROP TABLE IF EXISTS {$this->getTable('sales_quote_address_varchar')};
DROP TABLE IF EXISTS {$this->getTable('sales_quote_decimal')};
DROP TABLE IF EXISTS {$this->getTable('sales_quote_entity')};
DROP TABLE IF EXISTS {$this->getTable('sales_quote_entity_datetime')};
DROP TABLE IF EXISTS {$this->getTable('sales_quote_entity_decimal')};
DROP TABLE IF EXISTS {$this->getTable('sales_quote_entity_int')};
DROP TABLE IF EXISTS {$this->getTable('sales_quote_entity_text')};
DROP TABLE IF EXISTS {$this->getTable('sales_quote_entity_varchar')};
DROP TABLE IF EXISTS {$this->getTable('sales_quote_int')};
DROP TABLE IF EXISTS {$this->getTable('sales_quote_item')};
DROP TABLE IF EXISTS {$this->getTable('sales_quote_item_decimal')};
DROP TABLE IF EXISTS {$this->getTable('sales_quote_item_int')};
DROP TABLE IF EXISTS {$this->getTable('sales_quote_item_text')};
DROP TABLE IF EXISTS {$this->getTable('sales_quote_item_varchar')};
DROP TABLE IF EXISTS {$this->getTable('sales_quote_text')};
DROP TABLE IF EXISTS {$this->getTable('sales_quote_varchar')};
DROP TABLE IF EXISTS {$this->getTable('sales_quote_rule')};
DROP TABLE IF EXISTS {$this->getTable('sales_counter')};
DROP TABLE IF EXISTS {$this->getTable('sales_discount_coupon')};
");
$installer->endSetup();
| {
"content_hash": "11aa9a7396cee8ed89bcf4fd09578531",
"timestamp": "",
"source": "github",
"line_count": 330,
"max_line_length": 201,
"avg_line_length": 45.86363636363637,
"alnum_prop": 0.6703666997026759,
"repo_name": "5452/durex",
"id": "6b7ea8294be17dd225543aac916b9f1fe60ac85d",
"size": "16089",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.8.29-0.9.0.php",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "ActionScript",
"bytes": "19946"
},
{
"name": "CSS",
"bytes": "2190550"
},
{
"name": "JavaScript",
"bytes": "1290492"
},
{
"name": "PHP",
"bytes": "102689019"
},
{
"name": "Shell",
"bytes": "642"
},
{
"name": "XSLT",
"bytes": "2066"
}
],
"symlink_target": ""
} |
namespace app {
namespace Android {
namespace com {
namespace fuse {
namespace Native {
struct Camera;
extern jclass Camera___javaClass_1;
extern jclass Camera___javaProxyClass_1;
extern jmethodID Camera__Camera_44276_ID_c;
extern jmethodID Camera__Camera_44276_ID_c_prox;
extern jmethodID Camera__IntentCallback_44278_ID;
extern jmethodID Camera__TakePicture_44277_ID;
struct Camera__uType : ::app::Android::Base::Wrappers::JWrapper__uType
{
};
Camera__uType* Camera__typeof();
void Camera___Init_1(::uStatic* __this);
void Camera___InitProxy_1(::uStatic* __this);
bool Camera___IsThisType_1(::uStatic* __this, ::uObject* obj_);
void Camera___ObjInit_2(Camera* __this);
void Camera___ObjInit_3(Camera* __this, jobject obj, ::uType* utype, bool hasFallbackClass, bool resolveType);
jobject Camera__Camera_IMPL_44276(::uStatic* __this, ::uObject* arg0_);
void Camera__IntentCallback(::uStatic* __this, int arg0, int arg1, ::uObject* arg2);
void Camera__IntentCallback_IMPL_44278(::uStatic* __this, int arg0_, int arg1_, ::uObject* arg2_);
Camera* Camera__New_3(::uStatic* __this);
Camera* Camera__New_4(::uStatic* __this, jobject obj, ::uType* utype, bool hasFallbackClass, bool resolveType);
void Camera__TakePicture(::uStatic* __this, ::uObject* arg0);
void Camera__TakePicture_IMPL_44277(::uStatic* __this, ::uObject* arg0_);
struct Camera : ::app::Android::Base::Wrappers::JWrapper
{
void _ObjInit_2() { Camera___ObjInit_2(this); }
void _ObjInit_3(jobject obj, ::uType* utype, bool hasFallbackClass, bool resolveType) { Camera___ObjInit_3(this, obj, utype, hasFallbackClass, resolveType); }
};
}}}}}
#endif
| {
"content_hash": "0f6d7afdcb74a679e37134b6256932fa",
"timestamp": "",
"source": "github",
"line_count": 44,
"max_line_length": 162,
"avg_line_length": 36.97727272727273,
"alnum_prop": 0.7135832821143209,
"repo_name": "blyk/BlackCode-Fuse",
"id": "3156a90b51668c824032ce10ba3e6db88ef70b4a",
"size": "2062",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "AndroidUI/.build/Simulator/Android/include/app/Android.com.fuse.Native.Camera.h",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "31111"
},
{
"name": "C",
"bytes": "22885804"
},
{
"name": "C++",
"bytes": "197750292"
},
{
"name": "Java",
"bytes": "951083"
},
{
"name": "JavaScript",
"bytes": "578555"
},
{
"name": "Logos",
"bytes": "48297"
},
{
"name": "Makefile",
"bytes": "6592573"
},
{
"name": "Shell",
"bytes": "19985"
}
],
"symlink_target": ""
} |
using System.Threading;
namespace YAF.Lucene.Net.Support.Threading
{
internal class ReentrantLock
{
// .NET Port: lock object used to emulate ReentrantLock
private readonly object _lock = new object();
// .NET Port: Estimated monitor queue length
private int _queueLength = 0;
// .NET Port: mimic ReentrantLock -- Monitor is re-entrant
public void Lock()
{
// note about queue length: in java's ReentrantLock, getQueueLength() returns the number
// of threads waiting on entering the lock. So here, we're incrementing the count before trying to enter,
// meaning that until enter has completed the thread is waiting so the queue is incremented. Once
// we enter the lock, then we immediately decrement it because that thread is no longer in the queue.
// Due to race conditions, the queue length is an estimate only.
Interlocked.Increment(ref _queueLength);
UninterruptableMonitor.Enter(_lock);
Interlocked.Decrement(ref _queueLength);
}
// .NET Port: mimic ReentrantLock -- Monitor is re-entrant
public void Unlock()
{
UninterruptableMonitor.Exit(_lock);
}
public bool TryLock()
{
Interlocked.Increment(ref _queueLength);
bool success = UninterruptableMonitor.TryEnter(_lock);
Interlocked.Decrement(ref _queueLength);
return success;
}
public int QueueLength
{
get
{
// hold onto the estimate for the length of this method
int estimate = _queueLength;
// should never be < 0, but just in case, as a negative number doesn't make sense.
return estimate <= 0 ? 0 : estimate;
}
}
public bool HasQueuedThreads => _queueLength > 0;
public bool IsHeldByCurrentThread => UninterruptableMonitor.IsEntered(_lock);
}
} | {
"content_hash": "ffb34a96bc6ded29978add878d4a9864",
"timestamp": "",
"source": "github",
"line_count": 59,
"max_line_length": 117,
"avg_line_length": 34.79661016949152,
"alnum_prop": 0.602532878714077,
"repo_name": "YAFNET/YAFNET",
"id": "ab4d508bbc4fb9c7c89feee397db0057bd1408ad",
"size": "2916",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "yafsrc/Lucene.Net/Lucene.Net/Support/Threading/ReentrantLock.cs",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ASP.NET",
"bytes": "1129715"
},
{
"name": "Batchfile",
"bytes": "2517"
},
{
"name": "C#",
"bytes": "34814757"
},
{
"name": "CSS",
"bytes": "867182"
},
{
"name": "HTML",
"bytes": "205990"
},
{
"name": "JavaScript",
"bytes": "3884632"
},
{
"name": "Ruby",
"bytes": "5694"
},
{
"name": "SCSS",
"bytes": "512946"
},
{
"name": "TSQL",
"bytes": "18061"
}
],
"symlink_target": ""
} |
layout: post
title: "Progressive Web Apps Resources"
excerpt: "Progressive Web Apps usefull resources"
comments: true
categories:
- Progressive Web Apps
tags:
- pwa
- push notification
- progressive web apps
- service worker
- precache
- offline
---
## Service Workers
1. [Service Worker Precache](https://github.com/GoogleChrome/sw-precache){:target="_blank"}
1. [Service Workers in Production](https://developers.google.com/web/showcase/2015/service-workers-iowa){:target="_blank"}
1. [Service Workers: an Introduction](https://developers.google.com/web/fundamentals/getting-started/primers/service-workers){:target="_blank"}
## Offline Web Apps
1. [The offline cookbook](https://jakearchibald.com/2014/offline-cookbook/){:target="_blank"}
## Progressive Web Apps
1. [Your First Progressive Web App](https://developers.google.com/web/fundamentals/getting-started/codelabs/your-first-pwapp/){:target="_blank"}
## Push Norification
1. [Adding Push Notifications to a Web App](https://developers.google.com/web/fundamentals/getting-started/codelabs/push-notifications/){:target="_blank"} | {
"content_hash": "29e8c1a296193757dbfb5186b3dfc9ba",
"timestamp": "",
"source": "github",
"line_count": 32,
"max_line_length": 154,
"avg_line_length": 34.65625,
"alnum_prop": 0.7547339945897205,
"repo_name": "aeleftheriadis/aeleftheriadis.github.io",
"id": "aeeacd524aea91d71ba6219601263b4e1a09455b",
"size": "1113",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "_posts/2017-02-25-pwa.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "31764"
},
{
"name": "HTML",
"bytes": "22972"
},
{
"name": "JavaScript",
"bytes": "2340"
},
{
"name": "Ruby",
"bytes": "1967"
}
],
"symlink_target": ""
} |
SYNONYM
#### According to
Integrated Taxonomic Information System
#### Published in
null
#### Original name
null
### Remarks
null | {
"content_hash": "b35aa429721e63f243dac57d210a2804",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 39,
"avg_line_length": 10.23076923076923,
"alnum_prop": 0.7218045112781954,
"repo_name": "mdoering/backbone",
"id": "06baeaf11a57fd508f06ab2c0ca8f546472acf6f",
"size": "206",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "life/Plantae/Magnoliophyta/Liliopsida/Poales/Cyperaceae/Rhynchospora/Rhynchospora cephalantha/ Syn. Rhynchospora cephalantha cephalantha/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
"""
This module contains the classes needed for querying vector data.
It contains the following import shortcuts:
```python
from pygw.query.vector import SpatialTemporalConstraintsBuilder
from pygw.query.vector import VectorQueryConstraintsFactory
from pygw.query.vector import FilterFactory
from pygw.query.vector import VectorQueryBuilder
from pygw.query.vector import VectorAggregationQueryBuilder
```
"""
from .spatial_temporal_constraints_builder import SpatialTemporalConstraintsBuilder
from .vector_query_constraints_factory import VectorQueryConstraintsFactory
from .filter_factory import FilterFactory
from .vector_query_builder import VectorQueryBuilder
from .vector_aggregation_query_builder import VectorAggregationQueryBuilder
| {
"content_hash": "f5cf9c4909f6f0ff6382b06942a83e65",
"timestamp": "",
"source": "github",
"line_count": 18,
"max_line_length": 83,
"avg_line_length": 41.22222222222222,
"alnum_prop": 0.8611859838274932,
"repo_name": "locationtech/geowave",
"id": "a118f12a74bf56937d8c7e137a3b816187a1cbdc",
"size": "1261",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "python/src/main/python/pygw/query/vector/__init__.py",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ANTLR",
"bytes": "10168"
},
{
"name": "Dockerfile",
"bytes": "3268"
},
{
"name": "FreeMarker",
"bytes": "2879"
},
{
"name": "Gnuplot",
"bytes": "57750"
},
{
"name": "Java",
"bytes": "11564564"
},
{
"name": "Puppet",
"bytes": "8849"
},
{
"name": "Python",
"bytes": "418256"
},
{
"name": "Scheme",
"bytes": "20491"
},
{
"name": "Shell",
"bytes": "100172"
}
],
"symlink_target": ""
} |
package org.apache.hyracks.dataflow.std.group.aggregators;
import java.io.DataOutput;
import java.io.IOException;
import java.nio.ByteBuffer;
import org.apache.hyracks.api.comm.IFrameTupleAccessor;
import org.apache.hyracks.api.context.IHyracksTaskContext;
import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
import org.apache.hyracks.api.exceptions.HyracksDataException;
import org.apache.hyracks.data.std.primitive.IntegerPointable;
import org.apache.hyracks.dataflow.common.data.marshalling.IntegerSerializerDeserializer;
import org.apache.hyracks.dataflow.std.group.AggregateState;
import org.apache.hyracks.dataflow.std.group.IFieldAggregateDescriptor;
import org.apache.hyracks.dataflow.std.group.IFieldAggregateDescriptorFactory;
/**
*
*/
public class AvgFieldMergeAggregatorFactory implements IFieldAggregateDescriptorFactory {
private static final long serialVersionUID = 1L;
private final int aggField;
private final boolean useObjectState;
public AvgFieldMergeAggregatorFactory(int aggField, boolean useObjectState) {
this.aggField = aggField;
this.useObjectState = useObjectState;
}
/*
* (non-Javadoc)
*
* @see org.apache.hyracks.dataflow.std.aggregations.
* IFieldAggregateDescriptorFactory
* #createAggregator(org.apache.hyracks.api.context.IHyracksTaskContext,
* org.apache.hyracks.api.dataflow.value.RecordDescriptor,
* org.apache.hyracks.api.dataflow.value.RecordDescriptor)
*/
@Override
public IFieldAggregateDescriptor createAggregator(IHyracksTaskContext ctx, RecordDescriptor inRecordDescriptor,
RecordDescriptor outRecordDescriptor) throws HyracksDataException {
return new IFieldAggregateDescriptor() {
@Override
public void reset() {
}
@Override
public void outputPartialResult(DataOutput fieldOutput, byte[] data, int offset, AggregateState state)
throws HyracksDataException {
int sum, count;
if (!useObjectState) {
sum = IntegerPointable.getInteger(data, offset);
count = IntegerPointable.getInteger(data, offset + 4);
} else {
Integer[] fields = (Integer[]) state.state;
sum = fields[0];
count = fields[1];
}
try {
fieldOutput.writeInt(sum);
fieldOutput.writeInt(count);
} catch (IOException e) {
throw new HyracksDataException("I/O exception when writing aggregation to the output buffer.");
}
}
@Override
public void outputFinalResult(DataOutput fieldOutput, byte[] data, int offset, AggregateState state)
throws HyracksDataException {
int sum, count;
if (!useObjectState) {
sum = IntegerPointable.getInteger(data, offset);
count = IntegerPointable.getInteger(data, offset + 4);
} else {
Integer[] fields = (Integer[]) state.state;
sum = fields[0];
count = fields[1];
}
try {
fieldOutput.writeFloat((float) sum / count);
} catch (IOException e) {
throw new HyracksDataException("I/O exception when writing aggregation to the output buffer.");
}
}
@Override
public void close() {
// TODO Auto-generated method stub
}
@Override
public void aggregate(IFrameTupleAccessor accessor, int tIndex, byte[] data, int offset,
AggregateState state) throws HyracksDataException {
int sum = 0, count = 0;
int tupleOffset = accessor.getTupleStartOffset(tIndex);
int fieldStart = accessor.getFieldStartOffset(tIndex, aggField);
sum += IntegerPointable.getInteger(accessor.getBuffer().array(), tupleOffset + accessor.getFieldSlotsLength() + fieldStart);
count += 1;
if (!useObjectState) {
ByteBuffer buf = ByteBuffer.wrap(data);
sum += buf.getInt(offset);
count += buf.getInt(offset + 4);
buf.putInt(offset, sum);
buf.putInt(offset + 4, count);
} else {
Integer[] fields = (Integer[]) state.state;
sum += fields[0];
count += fields[1];
state.state = new Integer[] { sum, count };
}
}
@Override
public boolean needsObjectState() {
return useObjectState;
}
@Override
public boolean needsBinaryState() {
return !useObjectState;
}
@Override
public AggregateState createState() {
return new AggregateState(new Integer[] { 0, 0 });
}
@Override
public void init(IFrameTupleAccessor accessor, int tIndex, DataOutput fieldOutput, AggregateState state)
throws HyracksDataException {
int sum = 0;
int count = 0;
int tupleOffset = accessor.getTupleStartOffset(tIndex);
int fieldStart = accessor.getFieldStartOffset(tIndex, aggField);
sum += IntegerPointable.getInteger(accessor.getBuffer().array(), tupleOffset + accessor.getFieldSlotsLength() + fieldStart);
count += IntegerPointable.getInteger(accessor.getBuffer().array(), tupleOffset + accessor.getFieldSlotsLength() + fieldStart + 4);
if (!useObjectState) {
try {
fieldOutput.writeInt(sum);
fieldOutput.writeInt(count);
} catch (IOException e) {
throw new HyracksDataException("I/O exception when initializing the aggregator.");
}
} else {
state.state = new Integer[] { sum, count };
}
}
};
}
}
| {
"content_hash": "ef686fecc2dbf96bad8b1ea58d6c250c",
"timestamp": "",
"source": "github",
"line_count": 158,
"max_line_length": 146,
"avg_line_length": 40.51898734177215,
"alnum_prop": 0.5734145579506404,
"repo_name": "tectronics/hyracks",
"id": "8727b836dc233ecbbc12cf08f3d26809570714f5",
"size": "7037",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/group/aggregators/AvgFieldMergeAggregatorFactory.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "2606"
},
{
"name": "CSS",
"bytes": "722"
},
{
"name": "HTML",
"bytes": "8070"
},
{
"name": "Java",
"bytes": "8126194"
},
{
"name": "JavaScript",
"bytes": "24354"
},
{
"name": "Shell",
"bytes": "14510"
}
],
"symlink_target": ""
} |
/* Generated automatically. DO NOT EDIT! */
#define SIMD_HEADER "simd-support/simd-sse2.h"
#include "../common/n2fv_4.c"
| {
"content_hash": "c041b8b8619b0d65ce0ca403ddf779b9",
"timestamp": "",
"source": "github",
"line_count": 3,
"max_line_length": 46,
"avg_line_length": 40.666666666666664,
"alnum_prop": 0.7049180327868853,
"repo_name": "termoshtt/rust-fftw3",
"id": "e2df86a6fd922b6206e0f3c795009ba5bd9e1940",
"size": "122",
"binary": false,
"copies": "6",
"ref": "refs/heads/master",
"path": "fftw-src/fftw-3.3.8/dft/simd/sse2/n2fv_4.c",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Rust",
"bytes": "55672"
}
],
"symlink_target": ""
} |
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
/**
* CreateVolumePermissionItemType.java
*
* This file was auto-generated from WSDL
* by the Apache Axis2 version: 1.5.6 Built on : Aug 30, 2011 (10:01:01 CEST)
*/
package com.amazon.ec2;
/**
* CreateVolumePermissionItemType bean class
*/
public class CreateVolumePermissionItemType
implements org.apache.axis2.databinding.ADBBean{
/* This type was generated from the piece of schema that had
name = CreateVolumePermissionItemType
Namespace URI = http://ec2.amazonaws.com/doc/2012-08-15/
Namespace Prefix = ns1
*/
private static java.lang.String generatePrefix(java.lang.String namespace) {
if(namespace.equals("http://ec2.amazonaws.com/doc/2012-08-15/")){
return "ns1";
}
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
}
/** Whenever a new property is set ensure all others are unset
* There can be only one choice and the last one wins
*/
private void clearAllSettingTrackers() {
localUserIdTracker = false;
localGroupTracker = false;
}
/**
* field for UserId
*/
protected java.lang.String localUserId ;
/* This tracker boolean wil be used to detect whether the user called the set method
* for this attribute. It will be used to determine whether to include this field
* in the serialized XML
*/
protected boolean localUserIdTracker = false ;
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getUserId(){
return localUserId;
}
/**
* Auto generated setter method
* @param param UserId
*/
public void setUserId(java.lang.String param){
clearAllSettingTrackers();
if (param != null){
//update the setting tracker
localUserIdTracker = true;
} else {
localUserIdTracker = false;
}
this.localUserId=param;
}
/**
* field for Group
*/
protected java.lang.String localGroup ;
/* This tracker boolean wil be used to detect whether the user called the set method
* for this attribute. It will be used to determine whether to include this field
* in the serialized XML
*/
protected boolean localGroupTracker = false ;
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getGroup(){
return localGroup;
}
/**
* Auto generated setter method
* @param param Group
*/
public void setGroup(java.lang.String param){
clearAllSettingTrackers();
if (param != null){
//update the setting tracker
localGroupTracker = true;
} else {
localGroupTracker = false;
}
this.localGroup=param;
}
/**
* isReaderMTOMAware
* @return true if the reader supports MTOM
*/
public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
boolean isReaderMTOMAware = false;
try{
isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
}catch(java.lang.IllegalArgumentException e){
isReaderMTOMAware = false;
}
return isReaderMTOMAware;
}
/**
*
* @param parentQName
* @param factory
* @return org.apache.axiom.om.OMElement
*/
public org.apache.axiom.om.OMElement getOMElement (
final javax.xml.namespace.QName parentQName,
final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{
org.apache.axiom.om.OMDataSource dataSource =
new org.apache.axis2.databinding.ADBDataSource(this,parentQName){
public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
CreateVolumePermissionItemType.this.serialize(parentQName,factory,xmlWriter);
}
};
return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
parentQName,factory,dataSource);
}
public void serialize(final javax.xml.namespace.QName parentQName,
final org.apache.axiom.om.OMFactory factory,
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
serialize(parentQName,factory,xmlWriter,false);
}
public void serialize(final javax.xml.namespace.QName parentQName,
final org.apache.axiom.om.OMFactory factory,
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter,
boolean serializeType)
throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
java.lang.String prefix = null;
java.lang.String namespace = null;
prefix = parentQName.getPrefix();
namespace = parentQName.getNamespaceURI();
if ((namespace != null) && (namespace.trim().length() > 0)) {
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
if (writerPrefix != null) {
xmlWriter.writeStartElement(namespace, parentQName.getLocalPart());
} else {
if (prefix == null) {
prefix = generatePrefix(namespace);
}
xmlWriter.writeStartElement(prefix, parentQName.getLocalPart(), namespace);
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
}
} else {
xmlWriter.writeStartElement(parentQName.getLocalPart());
}
if (serializeType){
java.lang.String namespacePrefix = registerPrefix(xmlWriter,"http://ec2.amazonaws.com/doc/2012-08-15/");
if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)){
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
namespacePrefix+":CreateVolumePermissionItemType",
xmlWriter);
} else {
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
"CreateVolumePermissionItemType",
xmlWriter);
}
}
if (localUserIdTracker){
namespace = "http://ec2.amazonaws.com/doc/2012-08-15/";
if (! namespace.equals("")) {
prefix = xmlWriter.getPrefix(namespace);
if (prefix == null) {
prefix = generatePrefix(namespace);
xmlWriter.writeStartElement(prefix,"userId", namespace);
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
} else {
xmlWriter.writeStartElement(namespace,"userId");
}
} else {
xmlWriter.writeStartElement("userId");
}
if (localUserId==null){
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException("userId cannot be null!!");
}else{
xmlWriter.writeCharacters(localUserId);
}
xmlWriter.writeEndElement();
} if (localGroupTracker){
namespace = "http://ec2.amazonaws.com/doc/2012-08-15/";
if (! namespace.equals("")) {
prefix = xmlWriter.getPrefix(namespace);
if (prefix == null) {
prefix = generatePrefix(namespace);
xmlWriter.writeStartElement(prefix,"group", namespace);
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
} else {
xmlWriter.writeStartElement(namespace,"group");
}
} else {
xmlWriter.writeStartElement("group");
}
if (localGroup==null){
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException("group cannot be null!!");
}else{
xmlWriter.writeCharacters(localGroup);
}
xmlWriter.writeEndElement();
}
xmlWriter.writeEndElement();
}
/**
* Util method to write an attribute with the ns prefix
*/
private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
if (xmlWriter.getPrefix(namespace) == null) {
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
}
xmlWriter.writeAttribute(namespace,attName,attValue);
}
/**
* Util method to write an attribute without the ns prefix
*/
private void writeAttribute(java.lang.String namespace,java.lang.String attName,
java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
if (namespace.equals(""))
{
xmlWriter.writeAttribute(attName,attValue);
}
else
{
registerPrefix(xmlWriter, namespace);
xmlWriter.writeAttribute(namespace,attName,attValue);
}
}
/**
* Util method to write an attribute without the ns prefix
*/
private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
java.lang.String attributeNamespace = qname.getNamespaceURI();
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
if (attributePrefix == null) {
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
}
java.lang.String attributeValue;
if (attributePrefix.trim().length() > 0) {
attributeValue = attributePrefix + ":" + qname.getLocalPart();
} else {
attributeValue = qname.getLocalPart();
}
if (namespace.equals("")) {
xmlWriter.writeAttribute(attName, attributeValue);
} else {
registerPrefix(xmlWriter, namespace);
xmlWriter.writeAttribute(namespace, attName, attributeValue);
}
}
/**
* method to handle Qnames
*/
private void writeQName(javax.xml.namespace.QName qname,
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
java.lang.String namespaceURI = qname.getNamespaceURI();
if (namespaceURI != null) {
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
if (prefix == null) {
prefix = generatePrefix(namespaceURI);
xmlWriter.writeNamespace(prefix, namespaceURI);
xmlWriter.setPrefix(prefix,namespaceURI);
}
if (prefix.trim().length() > 0){
xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
} else {
// i.e this is the default namespace
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
}
} else {
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
}
}
private void writeQNames(javax.xml.namespace.QName[] qnames,
javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
if (qnames != null) {
// we have to store this data until last moment since it is not possible to write any
// namespace data after writing the charactor data
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
java.lang.String namespaceURI = null;
java.lang.String prefix = null;
for (int i = 0; i < qnames.length; i++) {
if (i > 0) {
stringToWrite.append(" ");
}
namespaceURI = qnames[i].getNamespaceURI();
if (namespaceURI != null) {
prefix = xmlWriter.getPrefix(namespaceURI);
if ((prefix == null) || (prefix.length() == 0)) {
prefix = generatePrefix(namespaceURI);
xmlWriter.writeNamespace(prefix, namespaceURI);
xmlWriter.setPrefix(prefix,namespaceURI);
}
if (prefix.trim().length() > 0){
stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
} else {
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
}
} else {
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
}
}
xmlWriter.writeCharacters(stringToWrite.toString());
}
}
/**
* Register a namespace prefix
*/
private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
java.lang.String prefix = xmlWriter.getPrefix(namespace);
if (prefix == null) {
prefix = generatePrefix(namespace);
while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
}
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
}
return prefix;
}
/**
* databinding method to get an XML representation of this object
*
*/
public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
throws org.apache.axis2.databinding.ADBException{
java.util.ArrayList elementList = new java.util.ArrayList();
java.util.ArrayList attribList = new java.util.ArrayList();
if (localUserIdTracker){
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2012-08-15/",
"userId"));
if (localUserId != null){
elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localUserId));
} else {
throw new org.apache.axis2.databinding.ADBException("userId cannot be null!!");
}
} if (localGroupTracker){
elementList.add(new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2012-08-15/",
"group"));
if (localGroup != null){
elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localGroup));
} else {
throw new org.apache.axis2.databinding.ADBException("group cannot be null!!");
}
}
return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());
}
/**
* Factory class that keeps the parse method
*/
public static class Factory{
/**
* static method to create the object
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
* Postcondition: If this object is an element, the reader is positioned at its end element
* If this object is a complex type, the reader is positioned at the end element of its outer element
*/
public static CreateVolumePermissionItemType parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
CreateVolumePermissionItemType object =
new CreateVolumePermissionItemType();
int event;
java.lang.String nillableValue = null;
java.lang.String prefix ="";
java.lang.String namespaceuri ="";
try {
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","type")!=null){
java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"type");
if (fullTypeName!=null){
java.lang.String nsPrefix = null;
if (fullTypeName.indexOf(":") > -1){
nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(":"));
}
nsPrefix = nsPrefix==null?"":nsPrefix;
java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":")+1);
if (!"CreateVolumePermissionItemType".equals(type)){
//find namespace for the prefix
java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
return (CreateVolumePermissionItemType)com.amazon.ec2.ExtensionMapper.getTypeObject(
nsUri,type,reader);
}
}
}
// Note all attributes that were handled. Used to differ normal attributes
// from anyAttributes.
java.util.Vector handledAttributes = new java.util.Vector();
reader.next();
while(!reader.isEndElement()) {
if (reader.isStartElement() ){
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2012-08-15/","userId").equals(reader.getName())){
java.lang.String content = reader.getElementText();
object.setUserId(
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
reader.next();
} // End of if for expected property start element
else
if (reader.isStartElement() && new javax.xml.namespace.QName("http://ec2.amazonaws.com/doc/2012-08-15/","group").equals(reader.getName())){
java.lang.String content = reader.getElementText();
object.setGroup(
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
reader.next();
} // End of if for expected property start element
} else {
reader.next();
}
} // end of while loop
} catch (javax.xml.stream.XMLStreamException e) {
throw new java.lang.Exception(e);
}
return object;
}
}//end of factory class
}
| {
"content_hash": "7c77dc2d4cfb079fab59fd49ddc7cc98",
"timestamp": "",
"source": "github",
"line_count": 621,
"max_line_length": 176,
"avg_line_length": 45.17874396135266,
"alnum_prop": 0.44218705446250356,
"repo_name": "mufaddalq/cloudstack-datera-driver",
"id": "56dd4767d3920c3a1b8062a00206d40b2a29da7a",
"size": "28056",
"binary": false,
"copies": "1",
"ref": "refs/heads/4.2",
"path": "awsapi/src/com/amazon/ec2/CreateVolumePermissionItemType.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ApacheConf",
"bytes": "250"
},
{
"name": "Batchfile",
"bytes": "6317"
},
{
"name": "CSS",
"bytes": "302008"
},
{
"name": "FreeMarker",
"bytes": "4917"
},
{
"name": "HTML",
"bytes": "38671"
},
{
"name": "Java",
"bytes": "79758943"
},
{
"name": "JavaScript",
"bytes": "4237188"
},
{
"name": "Perl",
"bytes": "1879"
},
{
"name": "Python",
"bytes": "5187499"
},
{
"name": "Shell",
"bytes": "803262"
}
],
"symlink_target": ""
} |
package com.dolzzo.twelve.menu;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import com.dolzzo.twelve.Config;
import com.dolzzo.twelve.R;
import com.dolzzo.twelve.cache.ImageFetcher;
import com.dolzzo.twelve.utils.ApolloUtils;
import com.dolzzo.twelve.utils.MusicUtils;
/**
* Alert dialog used to delete tracks.
* <p>
* TODO: Remove albums from the recents list upon deletion.
*
* @author Andrew Neal ([email protected])
*/
public class DeleteDialog extends DialogFragment {
/**
* The item(s) to delete
*/
private long[] mItemList;
/**
* The image cache
*/
private ImageFetcher mFetcher;
/**
* Empty constructor as per the {@link Fragment} documentation
*/
public DeleteDialog() {
}
/**
* @param title The title of the artist, album, or song to delete
* @param items The item(s) to delete
* @param key The key used to remove items from the cache.
* @return A new instance of the dialog
*/
public static DeleteDialog newInstance(final String title, final long[] items, final String key) {
final DeleteDialog frag = new DeleteDialog();
final Bundle args = new Bundle();
args.putString(Config.NAME, title);
args.putLongArray("items", items);
args.putString("cachekey", key);
frag.setArguments(args);
return frag;
}
/**
* {@inheritDoc}
*/
@Override
public Dialog onCreateDialog(final Bundle savedInstanceState) {
final String delete = getString(R.string.context_menu_delete);
final Bundle arguments = getArguments();
// Get the image cache key
final String key = arguments.getString("cachekey");
// Get the track(s) to delete
mItemList = arguments.getLongArray("items");
// Get the dialog title
final String title = arguments.getString(Config.NAME);
final String dialogTitle = getString(R.string.delete_dialog_title, title);
// Initialize the image cache
mFetcher = ApolloUtils.getImageFetcher(getActivity());
// Build the dialog
return new AlertDialog.Builder(getActivity()).setTitle(dialogTitle)
.setMessage(R.string.cannot_be_undone)
.setPositiveButton(delete, new OnClickListener() {
@Override
public void onClick(final DialogInterface dialog, final int which) {
// Remove the items from the image cache
mFetcher.removeFromCache(key);
// Delete the selected item(s)
MusicUtils.deleteTracks(getActivity(), mItemList);
if (getActivity() instanceof DeleteDialogCallback) {
((DeleteDialogCallback) getActivity()).onDelete(mItemList);
}
dialog.dismiss();
}
}).setNegativeButton(R.string.cancel, new OnClickListener() {
@Override
public void onClick(final DialogInterface dialog, final int which) {
dialog.dismiss();
}
}).create();
}
public interface DeleteDialogCallback {
void onDelete(long[] id);
}
}
| {
"content_hash": "96d66c90c56893068ca37cba47ede579",
"timestamp": "",
"source": "github",
"line_count": 102,
"max_line_length": 102,
"avg_line_length": 34.36274509803921,
"alnum_prop": 0.6119828815977175,
"repo_name": "YouKim/ExoPlayer",
"id": "6bc7747e406ccb006170ecb83dae0fda0abfdbfc",
"size": "4133",
"binary": false,
"copies": "1",
"ref": "refs/heads/dev-twelve",
"path": "twelve/src/main/java/com/dolzzo/twelve/menu/DeleteDialog.java",
"mode": "33261",
"license": "apache-2.0",
"language": [
{
"name": "C++",
"bytes": "52984"
},
{
"name": "HTML",
"bytes": "2941"
},
{
"name": "Java",
"bytes": "4933484"
},
{
"name": "Makefile",
"bytes": "13872"
},
{
"name": "Shell",
"bytes": "5691"
}
],
"symlink_target": ""
} |
namespace GUI
{
Text_Box::Text_Box( unsigned maxTextLength,
const sf::Vector2f& size,
const std::string& labelText,
std::string& inputString)
: m_inputtedText (&inputString)
, m_maxLength (maxTextLength)
{
m_quad.setSize(size);
m_quad.setTexture(&ResourceHolder::getTexure("GUI"));
m_quad.setOutlineColor(sf::Color::Black);
m_quad.setOutlineThickness(2);
initText(m_text, 30, "");
initText(m_label, 10, labelText);
}
void Text_Box::input(const sf::Event& e)
{
if (e.type == sf::Event::TextEntered)
{
if (m_isActive)
{
char code = e.text.unicode;
if ((code >= 32 && code <= 126) &&
(code != 47) && //Back slash
(code != 92) && //Forward slash
m_inputtedText->length() <= m_maxLength) //Lowercase
{
*m_inputtedText += (static_cast<char>(e.text.unicode));
}
else if (code == 8 && m_inputtedText->length() >= 1)
{
m_inputtedText->pop_back();
}
}
}
else if (e.type == sf::Event::MouseButtonPressed)
{
if (e.mouseButton.button == sf::Mouse::Left)
{
if (touchingMouse(m_quad))
{
m_quad.setFillColor({200, 200, 200});
m_isActive = true;
}
else
{
m_quad.setFillColor(sf::Color::White);
m_isActive = false;
}
}
}
}
void Text_Box::update()
{
m_text.setString(*m_inputtedText);
}
void Text_Box::draw(MasterRenderer& renderer)
{
renderer.draw(m_quad);
renderer.draw(m_text);
renderer.draw(m_label);
}
void Text_Box::setPosition(const sf::Vector2f& position)
{
m_label.setPosition(position);
m_quad.setPosition(position.x, position.y + 12);
m_text.setPosition(position.x, position.y + 12);
m_text.move(10, m_quad.getSize().y / 2 - m_text.getGlobalBounds().height / 2);
}
const sf::Vector2f Text_Box::getSize() const
{
return {m_quad.getSize().x,
m_quad.getSize().y + 15};
}
}
| {
"content_hash": "0cfe84606a163af6519f77e463f9aaf0",
"timestamp": "",
"source": "github",
"line_count": 84,
"max_line_length": 86,
"avg_line_length": 29.511904761904763,
"alnum_prop": 0.4594594594594595,
"repo_name": "Hopson97/HopsonCraft",
"id": "6f041f34a733375c9e1e1f1814933e53f8e23d8c",
"size": "2616",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Source/GUI/Text_Box.cpp",
"mode": "33261",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "171624"
},
{
"name": "C++",
"bytes": "302462"
},
{
"name": "GLSL",
"bytes": "3846"
},
{
"name": "Lua",
"bytes": "554"
}
],
"symlink_target": ""
} |
var deamdify = require('deamdify');
describe('deamdify', function() {
it('should export function', function() {
expect(deamdify).to.be.a('function');
});
});
| {
"content_hash": "3738a4d867e0ebcd67d99079e1d29d75",
"timestamp": "",
"source": "github",
"line_count": 10,
"max_line_length": 43,
"avg_line_length": 17.6,
"alnum_prop": 0.6079545454545454,
"repo_name": "Automattic/deamdify",
"id": "ecc4d906c3fcb8c4e76b09ea8a0c4b52f7f2e176",
"size": "176",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "test/index.test.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "JavaScript",
"bytes": "17914"
}
],
"symlink_target": ""
} |
<?xml version="1.0" encoding="UTF-8"?>
<Form xmlns="http://v8.1c.ru/8.3/xcf/logform" xmlns:app="http://v8.1c.ru/8.2/managed-application/core" xmlns:cfg="http://v8.1c.ru/8.1/data/enterprise/current-config" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:ent="http://v8.1c.ru/8.1/data/enterprise" xmlns:lf="http://v8.1c.ru/8.2/managed-application/logform" xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web" xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<VerticalScroll>useIfNecessary</VerticalScroll>
<AutoCommandBar name="ФормаКоманднаяПанель" id="-1">
<Autofill>false</Autofill>
</AutoCommandBar>
<Events>
<Event name="OnCreateAtServer">ПриСозданииНаСервере</Event>
</Events>
<ChildItems>
<Table name="Список" id="1">
<UseAlternationRowColor>true</UseAlternationRowColor>
<EnableStartDrag>true</EnableStartDrag>
<DataPath>Список</DataPath>
<RowPictureDataPath>Список.DefaultPicture</RowPictureDataPath>
<CommandSet>
<ExcludedCommand>Copy</ExcludedCommand>
<ExcludedCommand>Create</ExcludedCommand>
<ExcludedCommand>SetDeletionMark</ExcludedCommand>
<ExcludedCommand>Delete</ExcludedCommand>
</CommandSet>
<SearchStringLocation>None</SearchStringLocation>
<ViewStatusLocation>None</ViewStatusLocation>
<SearchControlLocation>None</SearchControlLocation>
<AutoRefresh>false</AutoRefresh>
<AutoRefreshPeriod>60</AutoRefreshPeriod>
<Period xsi:type="v8:StandardPeriod">
<v8:variant xsi:type="v8:StandardPeriodVariant">Custom</v8:variant>
<v8:startDate>0001-01-01T00:00:00</v8:startDate>
<v8:endDate>0001-01-01T00:00:00</v8:endDate>
</Period>
<ChoiceFoldersAndItems>Items</ChoiceFoldersAndItems>
<RestoreCurrentRow>false</RestoreCurrentRow>
<TopLevelParent xsi:nil="true"/>
<ShowRoot>true</ShowRoot>
<AllowRootChoice>false</AllowRootChoice>
<UpdateOnDataChange>Auto</UpdateOnDataChange>
<ContextMenu name="СписокКонтекстноеМеню" id="2"/>
<AutoCommandBar name="СписокКоманднаяПанель" id="3">
<ChildItems>
<ButtonGroup name="СписокКомандыФормы" id="14">
<Title>
<v8:item>
<v8:lang>ru</v8:lang>
<v8:content>Команды формы</v8:content>
</v8:item>
</Title>
<ToolTip>
<v8:item>
<v8:lang>ru</v8:lang>
<v8:content>Команды формы</v8:content>
</v8:item>
</ToolTip>
<CommandSource>Form</CommandSource>
<ExtendedTooltip name="СписокКомандыФормыExtendedTooltip" id="28"/>
</ButtonGroup>
<Button name="СписокСправка" id="25">
<Type>CommandBarButton</Type>
<CommandName>Form.StandardCommand.Help</CommandName>
<Parameter xsi:nil="true"/>
<ExtendedTooltip name="СписокСправкаExtendedTooltip" id="29"/>
</Button>
</ChildItems>
</AutoCommandBar>
<ExtendedTooltip name="СписокExtendedTooltip" id="30"/>
<SearchStringAddition name="СписокSearchString" id="31">
<Source>
<lf:elementId>1</lf:elementId>
<lf:additionId>0</lf:additionId>
</Source>
<ContextMenu name="СписокSearchStringContextMenu" id="32"/>
<ExtendedTooltip name="СписокSearchStringExtendedTooltip" id="33"/>
</SearchStringAddition>
<ViewStatusAddition name="СписокViewStatus" id="34">
<Source>
<lf:elementId>1</lf:elementId>
<lf:additionId>1</lf:additionId>
</Source>
<ContextMenu name="СписокViewStatusContextMenu" id="35"/>
<ExtendedTooltip name="СписокViewStatusExtendedTooltip" id="36"/>
</ViewStatusAddition>
<SearchControlAddition name="СписокSearchControl" id="37">
<Source>
<lf:elementId>1</lf:elementId>
<lf:additionId>2</lf:additionId>
</Source>
<ContextMenu name="СписокSearchControlContextMenu" id="38"/>
<ExtendedTooltip name="СписокSearchControlExtendedTooltip" id="39"/>
</SearchControlAddition>
<Events>
<Event name="Selection">СписокВыбор</Event>
</Events>
<ChildItems>
<LabelField name="СписокНаименование" id="15">
<DataPath>Список.Description</DataPath>
<Title>
<v8:item>
<v8:lang>ru</v8:lang>
<v8:content>Вид карты лояльности</v8:content>
</v8:item>
</Title>
<ContextMenu name="СписокНаименованиеКонтекстноеМеню" id="16"/>
<ExtendedTooltip name="СписокНаименованиеExtendedTooltip" id="40"/>
</LabelField>
<LabelField name="СписокСтатус" id="17">
<DataPath>Список.Статус</DataPath>
<Title>
<v8:item>
<v8:lang>ru</v8:lang>
<v8:content>Статус</v8:content>
</v8:item>
</Title>
<ContextMenu name="СписокСтатусКонтекстноеМеню" id="18"/>
<ExtendedTooltip name="СписокСтатусExtendedTooltip" id="41"/>
</LabelField>
<LabelField name="СписокДатаНачалаДействия" id="21">
<DataPath>Список.ДатаНачалаДействия</DataPath>
<Title>
<v8:item>
<v8:lang>ru</v8:lang>
<v8:content>Дата начала действия</v8:content>
</v8:item>
</Title>
<Width>8</Width>
<ContextMenu name="СписокДатаНачалаДействияКонтекстноеМеню" id="22"/>
<ExtendedTooltip name="СписокДатаНачалаДействияExtendedTooltip" id="42"/>
</LabelField>
<LabelField name="СписокДатаОкончанияДействия" id="23">
<DataPath>Список.ДатаОкончанияДействия</DataPath>
<Title>
<v8:item>
<v8:lang>ru</v8:lang>
<v8:content>Дата окончания действия</v8:content>
</v8:item>
</Title>
<Width>8</Width>
<ContextMenu name="СписокДатаОкончанияДействияКонтекстноеМеню" id="24"/>
<ExtendedTooltip name="СписокДатаОкончанияДействияExtendedTooltip" id="43"/>
</LabelField>
<LabelField name="СписокСсылка" id="26">
<DataPath>Список.Ref</DataPath>
<UserVisible>
<xr:Common>false</xr:Common>
</UserVisible>
<ContextMenu name="СписокСсылкаКонтекстноеМеню" id="27"/>
<ExtendedTooltip name="СписокСсылкаExtendedTooltip" id="44"/>
</LabelField>
</ChildItems>
</Table>
</ChildItems>
<Attributes>
<Attribute name="ТекущаяДата" id="1">
<Title>
<v8:item>
<v8:lang>ru</v8:lang>
<v8:content>Текущая дата</v8:content>
</v8:item>
</Title>
<Type>
<v8:Type>xs:dateTime</v8:Type>
<v8:DateQualifiers>
<v8:DateFractions>Date</v8:DateFractions>
</v8:DateQualifiers>
</Type>
</Attribute>
<Attribute name="Список" id="2">
<Title>
<v8:item>
<v8:lang>ru</v8:lang>
<v8:content>Список</v8:content>
</v8:item>
</Title>
<Type>
<v8:Type>cfg:DynamicList</v8:Type>
</Type>
<UseAlways>
<Field>Список.Ref</Field>
</UseAlways>
<Settings xsi:type="DynamicList">
<ManualQuery>true</ManualQuery>
<DynamicDataRead>true</DynamicDataRead>
<QueryText>ВЫБРАТЬ
ВидыКартЛояльности.Ссылка,
ВидыКартЛояльности.Предопределенный,
ВидыКартЛояльности.ПометкаУдаления,
ВидыКартЛояльности.Наименование,
ВидыКартЛояльности.ДатаНачалаДействия,
ВидыКартЛояльности.ДатаОкончанияДействия,
ВидыКартЛояльности.Статус
ИЗ
Справочник.ВидыКартЛояльности.СкидкиНаценки КАК ТаблицаСкидкиНаценки
ВНУТРЕННЕЕ СОЕДИНЕНИЕ Справочник.ВидыКартЛояльности КАК ВидыКартЛояльности
ПО ТаблицаСкидкиНаценки.Ссылка = ВидыКартЛояльности.Ссылка
{ГДЕ
ТаблицаСкидкиНаценки.СкидкаНаценка.*}</QueryText>
<MainTable>Catalog.ВидыКартЛояльности</MainTable>
<ListSettings>
<dcsset:filter>
<dcsset:viewMode>Normal</dcsset:viewMode>
<dcsset:userSettingID>dfcece9d-5077-440b-b6b3-45a5cb4538eb</dcsset:userSettingID>
</dcsset:filter>
<dcsset:order>
<dcsset:viewMode>Normal</dcsset:viewMode>
<dcsset:userSettingID>88619765-ccb3-46c6-ac52-38e9c992ebd4</dcsset:userSettingID>
</dcsset:order>
<dcsset:conditionalAppearance>
<dcsset:viewMode>Normal</dcsset:viewMode>
<dcsset:userSettingID>b75fecce-942b-4aed-abc9-e6a02e460fb3</dcsset:userSettingID>
</dcsset:conditionalAppearance>
</ListSettings>
</Settings>
</Attribute>
<ConditionalAppearance>
<dcsset:item>
<dcsset:selection>
<dcsset:item>
<dcsset:field>Список</dcsset:field>
</dcsset:item>
</dcsset:selection>
<dcsset:filter>
<dcsset:item xsi:type="dcsset:FilterItemComparison">
<dcsset:left xsi:type="dcscor:Field">Список.ДатаОкончанияДействия</dcsset:left>
<dcsset:comparisonType>Less</dcsset:comparisonType>
<dcsset:right xsi:type="dcscor:Field">ТекущаяДата</dcsset:right>
</dcsset:item>
<dcsset:item xsi:type="dcsset:FilterItemComparison">
<dcsset:left xsi:type="dcscor:Field">Список.ДатаНачалаДействия</dcsset:left>
<dcsset:comparisonType>Filled</dcsset:comparisonType>
</dcsset:item>
</dcsset:filter>
<dcsset:appearance>
<dcscor:item xsi:type="dcsset:SettingsParameterValue">
<dcscor:parameter>TextColor</dcscor:parameter>
<dcscor:value xsi:type="v8ui:Color">web:DarkGray</dcscor:value>
</dcscor:item>
</dcsset:appearance>
</dcsset:item>
<dcsset:item>
<dcsset:selection>
<dcsset:item>
<dcsset:field>Список</dcsset:field>
</dcsset:item>
</dcsset:selection>
<dcsset:filter>
<dcsset:item xsi:type="dcsset:FilterItemComparison">
<dcsset:left xsi:type="dcscor:Field">Список.ДатаНачалаДействия</dcsset:left>
<dcsset:comparisonType>Greater</dcsset:comparisonType>
<dcsset:right xsi:type="dcscor:Field">ТекущаяДата</dcsset:right>
</dcsset:item>
<dcsset:item xsi:type="dcsset:FilterItemComparison">
<dcsset:left xsi:type="dcscor:Field">Список.ДатаНачалаДействия</dcsset:left>
<dcsset:comparisonType>Filled</dcsset:comparisonType>
</dcsset:item>
</dcsset:filter>
<dcsset:appearance>
<dcscor:item xsi:type="dcsset:SettingsParameterValue">
<dcscor:parameter>TextColor</dcscor:parameter>
<dcscor:value xsi:type="v8ui:Color">web:HoneyDew</dcscor:value>
</dcscor:item>
</dcsset:appearance>
</dcsset:item>
</ConditionalAppearance>
</Attributes>
<Parameters>
<Parameter name="Ссылка">
<Type>
<v8:Type>cfg:CatalogRef.СкидкиНаценки</v8:Type>
</Type>
</Parameter>
</Parameters>
</Form> | {
"content_hash": "5d164694d52c5ed407c4b918423396bf",
"timestamp": "",
"source": "github",
"line_count": 271,
"max_line_length": 836,
"avg_line_length": 38.542435424354245,
"alnum_prop": 0.6969842029679273,
"repo_name": "stop-time/pm_ut11",
"id": "43758a7de10b5893dae3a2c1b936b5524b2e9609",
"size": "11856",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/Catalog/СкидкиНаценки/Form/ИспользованиеВВидахКартЛояльности/Form.xml",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "HTML",
"bytes": "8991065"
}
],
"symlink_target": ""
} |
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("nil-runtime")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("nil-runtime")]
[assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
//In order to begin building localizable applications, set
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
//inside a <PropertyGroup>. For example, if you are using US english
//in your source files, set the <UICulture> to en-US. Then uncomment
//the NeutralResourceLanguage attribute below. Update the "en-US" in
//the line below to match the UICulture setting in the project file.
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
| {
"content_hash": "77481f0647e02de905ab2c3f50bc9b00",
"timestamp": "",
"source": "github",
"line_count": 55,
"max_line_length": 98,
"avg_line_length": 43.236363636363635,
"alnum_prop": 0.7060555088309504,
"repo_name": "zhongzf/nativescript-dotnet-runtime",
"id": "9bfbc4e51d7048250d63d6d0c6a7f02e1c6095eb",
"size": "2381",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "nil-runtime/Properties/AssemblyInfo.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "85788"
},
{
"name": "JavaScript",
"bytes": "2760248"
}
],
"symlink_target": ""
} |
package com.pixable.trackingwrap.demo;
public class Constants {
public enum Traces { LOGCAT, TOASTS }
public enum PlatformIds { FLURRY, MIXPANEL, GOOGLE_ANALYTICS, FACEBOOK }
}
| {
"content_hash": "7a94271095dbeef8a2ff6c823d5a6e5d",
"timestamp": "",
"source": "github",
"line_count": 8,
"max_line_length": 76,
"avg_line_length": 23.5,
"alnum_prop": 0.7393617021276596,
"repo_name": "androidsx/pixalytics",
"id": "ffb573a409f470a009524959914a74a316dad88c",
"size": "188",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "demo/src/main/java/com/pixable/trackingwrap/demo/Constants.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Java",
"bytes": "55063"
}
],
"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_45) on Tue Nov 12 20:31:45 CET 2013 -->
<title>Server</title>
<meta name="date" content="2013-11-12">
<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="Server";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Server.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../com/esotericsoftware/kryonet/Serialization.html" title="interface in com.esotericsoftware.kryonet"><span class="strong">Prev Class</span></a></li>
<li>Next Class</li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?com/esotericsoftware/kryonet/Server.html" target="_top">Frames</a></li>
<li><a href="Server.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>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li><a href="#constructor_summary">Constr</a> | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li><a href="#constructor_detail">Constr</a> | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">com.esotericsoftware.kryonet</div>
<h2 title="Class Server" class="title">Class Server</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>com.esotericsoftware.kryonet.Server</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="../../../com/esotericsoftware/kryonet/EndPoint.html" title="interface in com.esotericsoftware.kryonet">EndPoint</a>, java.lang.Runnable</dd>
</dl>
<hr>
<br>
<pre>public class <span class="strong">Server</span>
extends java.lang.Object
implements <a href="../../../com/esotericsoftware/kryonet/EndPoint.html" title="interface in com.esotericsoftware.kryonet">EndPoint</a></pre>
<div class="block">Manages TCP and optionally UDP connections from many <a href="../../../com/esotericsoftware/kryonet/Client.html" title="class in com.esotericsoftware.kryonet"><code>Clients</code></a>.</div>
<dl><dt><span class="strong">Author:</span></dt>
<dd>Nathan Sweet <[email protected]></dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../com/esotericsoftware/kryonet/Server.html#Server()">Server</a></strong>()</code>
<div class="block">Creates a Server with a write buffer size of 16384 and an object buffer size of 2048.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../com/esotericsoftware/kryonet/Server.html#Server(int, int)">Server</a></strong>(int writeBufferSize,
int objectBufferSize)</code> </td>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../com/esotericsoftware/kryonet/Server.html#Server(int, int, com.esotericsoftware.kryonet.Serialization)">Server</a></strong>(int writeBufferSize,
int objectBufferSize,
<a href="../../../com/esotericsoftware/kryonet/Serialization.html" title="interface in com.esotericsoftware.kryonet">Serialization</a> serialization)</code> </td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/esotericsoftware/kryonet/Server.html#addListener(com.esotericsoftware.kryonet.Listener)">addListener</a></strong>(<a href="../../../com/esotericsoftware/kryonet/Listener.html" title="class in com.esotericsoftware.kryonet">Listener</a> listener)</code>
<div class="block">If the listener already exists, it is not added again.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/esotericsoftware/kryonet/Server.html#bind(java.net.InetSocketAddress, java.net.InetSocketAddress)">bind</a></strong>(java.net.InetSocketAddress tcpPort,
java.net.InetSocketAddress udpPort)</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/esotericsoftware/kryonet/Server.html#bind(int)">bind</a></strong>(int tcpPort)</code>
<div class="block">Opens a TCP only server.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/esotericsoftware/kryonet/Server.html#bind(int, int)">bind</a></strong>(int tcpPort,
int udpPort)</code>
<div class="block">Opens a TCP and UDP server.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/esotericsoftware/kryonet/Server.html#close()">close</a></strong>()</code>
<div class="block">Closes all open connections and the server port(s).</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../com/esotericsoftware/kryonet/Connection.html" title="class in com.esotericsoftware.kryonet">Connection</a>[]</code></td>
<td class="colLast"><code><strong><a href="../../../com/esotericsoftware/kryonet/Server.html#getConnections()">getConnections</a></strong>()</code>
<div class="block">Returns the current connections.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../com/esotericsoftware/kryo/Kryo.html" title="class in com.esotericsoftware.kryo">Kryo</a></code></td>
<td class="colLast"><code><strong><a href="../../../com/esotericsoftware/kryonet/Server.html#getKryo()">getKryo</a></strong>()</code>
<div class="block">Gets the Kryo instance that will be used to serialize and deserialize objects.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../com/esotericsoftware/kryonet/Serialization.html" title="interface in com.esotericsoftware.kryonet">Serialization</a></code></td>
<td class="colLast"><code><strong><a href="../../../com/esotericsoftware/kryonet/Server.html#getSerialization()">getSerialization</a></strong>()</code>
<div class="block">Gets the serialization instance that will be used to serialize and deserialize objects.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>java.lang.Thread</code></td>
<td class="colLast"><code><strong><a href="../../../com/esotericsoftware/kryonet/Server.html#getUpdateThread()">getUpdateThread</a></strong>()</code>
<div class="block">Returns the last thread that called <a href="../../../com/esotericsoftware/kryonet/EndPoint.html#update(int)"><code>EndPoint.update(int)</code></a> for this end point.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/esotericsoftware/kryonet/Server.html#removeListener(com.esotericsoftware.kryonet.Listener)">removeListener</a></strong>(<a href="../../../com/esotericsoftware/kryonet/Listener.html" title="class in com.esotericsoftware.kryonet">Listener</a> listener)</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/esotericsoftware/kryonet/Server.html#run()">run</a></strong>()</code>
<div class="block">Continually updates this end point until <a href="../../../com/esotericsoftware/kryonet/EndPoint.html#stop()"><code>EndPoint.stop()</code></a> is called.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/esotericsoftware/kryonet/Server.html#sendToAllExceptTCP(int, java.lang.Object)">sendToAllExceptTCP</a></strong>(int connectionID,
java.lang.Object object)</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/esotericsoftware/kryonet/Server.html#sendToAllExceptUDP(int, java.lang.Object)">sendToAllExceptUDP</a></strong>(int connectionID,
java.lang.Object object)</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/esotericsoftware/kryonet/Server.html#sendToAllTCP(java.lang.Object)">sendToAllTCP</a></strong>(java.lang.Object object)</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/esotericsoftware/kryonet/Server.html#sendToAllUDP(java.lang.Object)">sendToAllUDP</a></strong>(java.lang.Object object)</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/esotericsoftware/kryonet/Server.html#sendToTCP(int, java.lang.Object)">sendToTCP</a></strong>(int connectionID,
java.lang.Object object)</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/esotericsoftware/kryonet/Server.html#sendToUDP(int, java.lang.Object)">sendToUDP</a></strong>(int connectionID,
java.lang.Object object)</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/esotericsoftware/kryonet/Server.html#start()">start</a></strong>()</code>
<div class="block">Starts a new thread that calls <a href="../../../com/esotericsoftware/kryonet/EndPoint.html#run()"><code>EndPoint.run()</code></a>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/esotericsoftware/kryonet/Server.html#stop()">stop</a></strong>()</code>
<div class="block">Closes this end point and causes <a href="../../../com/esotericsoftware/kryonet/EndPoint.html#run()"><code>EndPoint.run()</code></a> to return.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/esotericsoftware/kryonet/Server.html#update(int)">update</a></strong>(int timeout)</code>
<div class="block">Accepts any new connections and reads or writes any pending data for the current connections.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class java.lang.Object</h3>
<code>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="Server()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Server</h4>
<pre>public Server()</pre>
<div class="block">Creates a Server with a write buffer size of 16384 and an object buffer size of 2048.</div>
</li>
</ul>
<a name="Server(int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Server</h4>
<pre>public Server(int writeBufferSize,
int objectBufferSize)</pre>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>writeBufferSize</code> - One buffer of this size is allocated for each connected client. Objects are serialized to the write
buffer where the bytes are queued until they can be written to the TCP socket.
<p>
Normally the socket is writable and the bytes are written immediately. If the socket cannot be written to and
enough serialized objects are queued to overflow the buffer, then the connection will be closed.
<p>
The write buffer should be sized at least as large as the largest object that will be sent, plus some head room to
allow for some serialized objects to be queued in case the buffer is temporarily not writable. The amount of head
room needed is dependent upon the size of objects being sent and how often they are sent.</dd><dd><code>objectBufferSize</code> - One (using only TCP) or three (using both TCP and UDP) buffers of this size are allocated. These
buffers are used to hold the bytes for a single object graph until it can be sent over the network or
deserialized.
<p>
The object buffers should be sized at least as large as the largest object that will be sent or received.</dd></dl>
</li>
</ul>
<a name="Server(int, int, com.esotericsoftware.kryonet.Serialization)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Server</h4>
<pre>public Server(int writeBufferSize,
int objectBufferSize,
<a href="../../../com/esotericsoftware/kryonet/Serialization.html" title="interface in com.esotericsoftware.kryonet">Serialization</a> serialization)</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getSerialization()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSerialization</h4>
<pre>public <a href="../../../com/esotericsoftware/kryonet/Serialization.html" title="interface in com.esotericsoftware.kryonet">Serialization</a> getSerialization()</pre>
<div class="block"><strong>Description copied from interface: <code><a href="../../../com/esotericsoftware/kryonet/EndPoint.html#getSerialization()">EndPoint</a></code></strong></div>
<div class="block">Gets the serialization instance that will be used to serialize and deserialize objects.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../com/esotericsoftware/kryonet/EndPoint.html#getSerialization()">getSerialization</a></code> in interface <code><a href="../../../com/esotericsoftware/kryonet/EndPoint.html" title="interface in com.esotericsoftware.kryonet">EndPoint</a></code></dd>
</dl>
</li>
</ul>
<a name="getKryo()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getKryo</h4>
<pre>public <a href="../../../com/esotericsoftware/kryo/Kryo.html" title="class in com.esotericsoftware.kryo">Kryo</a> getKryo()</pre>
<div class="block"><strong>Description copied from interface: <code><a href="../../../com/esotericsoftware/kryonet/EndPoint.html#getKryo()">EndPoint</a></code></strong></div>
<div class="block">Gets the Kryo instance that will be used to serialize and deserialize objects. This is only valid if
<a href="../../../com/esotericsoftware/kryonet/KryoSerialization.html" title="class in com.esotericsoftware.kryonet"><code>KryoSerialization</code></a> is being used, which is the default.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../com/esotericsoftware/kryonet/EndPoint.html#getKryo()">getKryo</a></code> in interface <code><a href="../../../com/esotericsoftware/kryonet/EndPoint.html" title="interface in com.esotericsoftware.kryonet">EndPoint</a></code></dd>
</dl>
</li>
</ul>
<a name="bind(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>bind</h4>
<pre>public void bind(int tcpPort)
throws java.io.IOException</pre>
<div class="block">Opens a TCP only server.</div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code> - if the server could not be opened.</dd></dl>
</li>
</ul>
<a name="bind(int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>bind</h4>
<pre>public void bind(int tcpPort,
int udpPort)
throws java.io.IOException</pre>
<div class="block">Opens a TCP and UDP server.</div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code> - if the server could not be opened.</dd></dl>
</li>
</ul>
<a name="bind(java.net.InetSocketAddress, java.net.InetSocketAddress)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>bind</h4>
<pre>public void bind(java.net.InetSocketAddress tcpPort,
java.net.InetSocketAddress udpPort)
throws java.io.IOException</pre>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>udpPort</code> - May be null.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd></dl>
</li>
</ul>
<a name="update(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>update</h4>
<pre>public void update(int timeout)
throws java.io.IOException</pre>
<div class="block">Accepts any new connections and reads or writes any pending data for the current connections.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../com/esotericsoftware/kryonet/EndPoint.html#update(int)">update</a></code> in interface <code><a href="../../../com/esotericsoftware/kryonet/EndPoint.html" title="interface in com.esotericsoftware.kryonet">EndPoint</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>timeout</code> - Wait for up to the specified milliseconds for a connection to be ready to process. May be zero to return
immediately if there are no connections to process.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../com/esotericsoftware/kryonet/Client.html#update(int)"><code>Client.update(int)</code></a>,
<a href="../../../com/esotericsoftware/kryonet/Server.html#update(int)"><code>update(int)</code></a></dd></dl>
</li>
</ul>
<a name="run()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>run</h4>
<pre>public void run()</pre>
<div class="block"><strong>Description copied from interface: <code><a href="../../../com/esotericsoftware/kryonet/EndPoint.html#run()">EndPoint</a></code></strong></div>
<div class="block">Continually updates this end point until <a href="../../../com/esotericsoftware/kryonet/EndPoint.html#stop()"><code>EndPoint.stop()</code></a> is called.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../com/esotericsoftware/kryonet/EndPoint.html#run()">run</a></code> in interface <code><a href="../../../com/esotericsoftware/kryonet/EndPoint.html" title="interface in com.esotericsoftware.kryonet">EndPoint</a></code></dd>
<dt><strong>Specified by:</strong></dt>
<dd><code>run</code> in interface <code>java.lang.Runnable</code></dd>
</dl>
</li>
</ul>
<a name="start()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>start</h4>
<pre>public void start()</pre>
<div class="block"><strong>Description copied from interface: <code><a href="../../../com/esotericsoftware/kryonet/EndPoint.html#start()">EndPoint</a></code></strong></div>
<div class="block">Starts a new thread that calls <a href="../../../com/esotericsoftware/kryonet/EndPoint.html#run()"><code>EndPoint.run()</code></a>.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../com/esotericsoftware/kryonet/EndPoint.html#start()">start</a></code> in interface <code><a href="../../../com/esotericsoftware/kryonet/EndPoint.html" title="interface in com.esotericsoftware.kryonet">EndPoint</a></code></dd>
</dl>
</li>
</ul>
<a name="stop()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>stop</h4>
<pre>public void stop()</pre>
<div class="block"><strong>Description copied from interface: <code><a href="../../../com/esotericsoftware/kryonet/EndPoint.html#stop()">EndPoint</a></code></strong></div>
<div class="block">Closes this end point and causes <a href="../../../com/esotericsoftware/kryonet/EndPoint.html#run()"><code>EndPoint.run()</code></a> to return.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../com/esotericsoftware/kryonet/EndPoint.html#stop()">stop</a></code> in interface <code><a href="../../../com/esotericsoftware/kryonet/EndPoint.html" title="interface in com.esotericsoftware.kryonet">EndPoint</a></code></dd>
</dl>
</li>
</ul>
<a name="sendToAllTCP(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sendToAllTCP</h4>
<pre>public void sendToAllTCP(java.lang.Object object)</pre>
</li>
</ul>
<a name="sendToAllExceptTCP(int, java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sendToAllExceptTCP</h4>
<pre>public void sendToAllExceptTCP(int connectionID,
java.lang.Object object)</pre>
</li>
</ul>
<a name="sendToTCP(int, java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sendToTCP</h4>
<pre>public void sendToTCP(int connectionID,
java.lang.Object object)</pre>
</li>
</ul>
<a name="sendToAllUDP(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sendToAllUDP</h4>
<pre>public void sendToAllUDP(java.lang.Object object)</pre>
</li>
</ul>
<a name="sendToAllExceptUDP(int, java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sendToAllExceptUDP</h4>
<pre>public void sendToAllExceptUDP(int connectionID,
java.lang.Object object)</pre>
</li>
</ul>
<a name="sendToUDP(int, java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sendToUDP</h4>
<pre>public void sendToUDP(int connectionID,
java.lang.Object object)</pre>
</li>
</ul>
<a name="addListener(com.esotericsoftware.kryonet.Listener)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addListener</h4>
<pre>public void addListener(<a href="../../../com/esotericsoftware/kryonet/Listener.html" title="class in com.esotericsoftware.kryonet">Listener</a> listener)</pre>
<div class="block"><strong>Description copied from interface: <code><a href="../../../com/esotericsoftware/kryonet/EndPoint.html#addListener(com.esotericsoftware.kryonet.Listener)">EndPoint</a></code></strong></div>
<div class="block">If the listener already exists, it is not added again.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../com/esotericsoftware/kryonet/EndPoint.html#addListener(com.esotericsoftware.kryonet.Listener)">addListener</a></code> in interface <code><a href="../../../com/esotericsoftware/kryonet/EndPoint.html" title="interface in com.esotericsoftware.kryonet">EndPoint</a></code></dd>
</dl>
</li>
</ul>
<a name="removeListener(com.esotericsoftware.kryonet.Listener)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeListener</h4>
<pre>public void removeListener(<a href="../../../com/esotericsoftware/kryonet/Listener.html" title="class in com.esotericsoftware.kryonet">Listener</a> listener)</pre>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../com/esotericsoftware/kryonet/EndPoint.html#removeListener(com.esotericsoftware.kryonet.Listener)">removeListener</a></code> in interface <code><a href="../../../com/esotericsoftware/kryonet/EndPoint.html" title="interface in com.esotericsoftware.kryonet">EndPoint</a></code></dd>
</dl>
</li>
</ul>
<a name="close()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>close</h4>
<pre>public void close()</pre>
<div class="block">Closes all open connections and the server port(s).</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../com/esotericsoftware/kryonet/EndPoint.html#close()">close</a></code> in interface <code><a href="../../../com/esotericsoftware/kryonet/EndPoint.html" title="interface in com.esotericsoftware.kryonet">EndPoint</a></code></dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../com/esotericsoftware/kryonet/Client.html" title="class in com.esotericsoftware.kryonet"><code>Client</code></a>,
<a href="../../../com/esotericsoftware/kryonet/Server.html" title="class in com.esotericsoftware.kryonet"><code>Server</code></a></dd></dl>
</li>
</ul>
<a name="getUpdateThread()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getUpdateThread</h4>
<pre>public java.lang.Thread getUpdateThread()</pre>
<div class="block"><strong>Description copied from interface: <code><a href="../../../com/esotericsoftware/kryonet/EndPoint.html#getUpdateThread()">EndPoint</a></code></strong></div>
<div class="block">Returns the last thread that called <a href="../../../com/esotericsoftware/kryonet/EndPoint.html#update(int)"><code>EndPoint.update(int)</code></a> for this end point. This can be useful to detect when long running
code will be run on the update thread.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../com/esotericsoftware/kryonet/EndPoint.html#getUpdateThread()">getUpdateThread</a></code> in interface <code><a href="../../../com/esotericsoftware/kryonet/EndPoint.html" title="interface in com.esotericsoftware.kryonet">EndPoint</a></code></dd>
</dl>
</li>
</ul>
<a name="getConnections()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getConnections</h4>
<pre>public <a href="../../../com/esotericsoftware/kryonet/Connection.html" title="class in com.esotericsoftware.kryonet">Connection</a>[] getConnections()</pre>
<div class="block">Returns the current connections. The array returned should not be modified.</div>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Server.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../com/esotericsoftware/kryonet/Serialization.html" title="interface in com.esotericsoftware.kryonet"><span class="strong">Prev Class</span></a></li>
<li>Next Class</li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?com/esotericsoftware/kryonet/Server.html" target="_top">Frames</a></li>
<li><a href="Server.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>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li><a href="#constructor_summary">Constr</a> | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li><a href="#constructor_detail">Constr</a> | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
| {
"content_hash": "c8f7a84c5f493b0e40e259c3101deea8",
"timestamp": "",
"source": "github",
"line_count": 672,
"max_line_length": 329,
"avg_line_length": 45.461309523809526,
"alnum_prop": 0.6766939443535188,
"repo_name": "frankdavid/diss",
"id": "07f02baf6e453bb10a8b25356b6fabed49901195",
"size": "30550",
"binary": false,
"copies": "4",
"ref": "refs/heads/master",
"path": "lib/kryo/javadoc/com/esotericsoftware/kryonet/Server.html",
"mode": "33261",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "12458"
},
{
"name": "Java",
"bytes": "191307"
},
{
"name": "LiveScript",
"bytes": "3151"
},
{
"name": "Perl",
"bytes": "1152"
},
{
"name": "Scala",
"bytes": "57287"
},
{
"name": "Shell",
"bytes": "288"
}
],
"symlink_target": ""
} |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.securityinsights.models;
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonProperty;
/** The available data types for Amazon Web Services S3 data connector. */
@Fluent
public final class AwsS3DataConnectorDataTypes {
/*
* Logs data type.
*/
@JsonProperty(value = "logs", required = true)
private AwsS3DataConnectorDataTypesLogs logs;
/**
* Get the logs property: Logs data type.
*
* @return the logs value.
*/
public AwsS3DataConnectorDataTypesLogs logs() {
return this.logs;
}
/**
* Set the logs property: Logs data type.
*
* @param logs the logs value to set.
* @return the AwsS3DataConnectorDataTypes object itself.
*/
public AwsS3DataConnectorDataTypes withLogs(AwsS3DataConnectorDataTypesLogs logs) {
this.logs = logs;
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (logs() == null) {
throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
"Missing required property logs in model AwsS3DataConnectorDataTypes"));
} else {
logs().validate();
}
}
private static final ClientLogger LOGGER = new ClientLogger(AwsS3DataConnectorDataTypes.class);
}
| {
"content_hash": "6e3735903ed615477a4261c0c54f184f",
"timestamp": "",
"source": "github",
"line_count": 57,
"max_line_length": 99,
"avg_line_length": 29.842105263157894,
"alnum_prop": 0.6549088771310994,
"repo_name": "Azure/azure-sdk-for-java",
"id": "14c7a6754785fb919d2dfeda0d3e71b17648480d",
"size": "1701",
"binary": false,
"copies": "1",
"ref": "refs/heads/main",
"path": "sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3DataConnectorDataTypes.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "8762"
},
{
"name": "Bicep",
"bytes": "15055"
},
{
"name": "CSS",
"bytes": "7676"
},
{
"name": "Dockerfile",
"bytes": "2028"
},
{
"name": "Groovy",
"bytes": "3237482"
},
{
"name": "HTML",
"bytes": "42090"
},
{
"name": "Java",
"bytes": "432409546"
},
{
"name": "JavaScript",
"bytes": "36557"
},
{
"name": "Jupyter Notebook",
"bytes": "95868"
},
{
"name": "PowerShell",
"bytes": "737517"
},
{
"name": "Python",
"bytes": "240542"
},
{
"name": "Scala",
"bytes": "1143898"
},
{
"name": "Shell",
"bytes": "18488"
},
{
"name": "XSLT",
"bytes": "755"
}
],
"symlink_target": ""
} |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE121_Stack_Based_Buffer_Overflow__CWE806_char_alloca_ncpy_74a.cpp
Label Definition File: CWE121_Stack_Based_Buffer_Overflow__CWE806.label.xml
Template File: sources-sink-74a.tmpl.cpp
*/
/*
* @description
* CWE: 121 Stack Based Buffer Overflow
* BadSource: Initialize data as a large string
* GoodSource: Initialize data as a small string
* Sinks: ncpy
* BadSink : Copy data to string using strncpy
* Flow Variant: 74 Data flow: data passed in a map from one function to another in different source files
*
* */
#include "std_testcase.h"
#include <map>
#include <wchar.h>
using namespace std;
namespace CWE121_Stack_Based_Buffer_Overflow__CWE806_char_alloca_ncpy_74
{
#ifndef OMITBAD
/* bad function declaration */
void badSink(map<int, char *> dataMap);
void bad()
{
char * data;
map<int, char *> dataMap;
char * dataBuffer = (char *)ALLOCA(100*sizeof(char));
data = dataBuffer;
/* FLAW: Initialize data as a large buffer that is larger than the small buffer used in the sink */
memset(data, 'A', 100-1); /* fill with 'A's */
data[100-1] = '\0'; /* null terminate */
/* Put data in a map */
dataMap[0] = data;
dataMap[1] = data;
dataMap[2] = data;
badSink(dataMap);
}
#endif /* OMITBAD */
#ifndef OMITGOOD
/* good function declarations */
/* goodG2B uses the GoodSource with the BadSink */
void goodG2BSink(map<int, char *> dataMap);
static void goodG2B()
{
char * data;
map<int, char *> dataMap;
char * dataBuffer = (char *)ALLOCA(100*sizeof(char));
data = dataBuffer;
/* FIX: Initialize data as a small buffer that as small or smaller than the small buffer used in the sink */
memset(data, 'A', 50-1); /* fill with 'A's */
data[50-1] = '\0'; /* null terminate */
/* Put data in a map */
dataMap[0] = data;
dataMap[1] = data;
dataMap[2] = data;
goodG2BSink(dataMap);
}
void good()
{
goodG2B();
}
#endif /* OMITGOOD */
} /* close namespace */
/* Below is the main(). It is only used when building this testcase on
* its own for testing or for building a binary to use in testing binary
* analysis tools. It is not used when compiling all the testcases as one
* application, which is how source code analysis tools are tested.
*/
#ifdef INCLUDEMAIN
using namespace CWE121_Stack_Based_Buffer_Overflow__CWE806_char_alloca_ncpy_74; /* so that we can use good and bad easily */
int main(int argc, char * argv[])
{
/* seed randomness */
srand( (unsigned)time(NULL) );
#ifndef OMITGOOD
printLine("Calling good()...");
good();
printLine("Finished good()");
#endif /* OMITGOOD */
#ifndef OMITBAD
printLine("Calling bad()...");
bad();
printLine("Finished bad()");
#endif /* OMITBAD */
return 0;
}
#endif
| {
"content_hash": "62b5145cd0c9158ff6106ca1160f731a",
"timestamp": "",
"source": "github",
"line_count": 109,
"max_line_length": 124,
"avg_line_length": 26.825688073394495,
"alnum_prop": 0.6395348837209303,
"repo_name": "JianpingZeng/xcc",
"id": "d938b41c02c2bc426c377f3b44d94e7b56e98c3d",
"size": "2924",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "xcc/test/juliet/testcases/CWE121_Stack_Based_Buffer_Overflow/s06/CWE121_Stack_Based_Buffer_Overflow__CWE806_char_alloca_ncpy_74a.cpp",
"mode": "33188",
"license": "bsd-3-clause",
"language": [],
"symlink_target": ""
} |
package org.olat.lms.learn.hello.service;
/**
* Initial Date: 02.11.2011 <br>
*
* @author guretzki
*/
public class MessageTO {
private String message1;
private String message2;
public MessageTO(String message1, String message2) {
this.message1 = message1;
this.message2 = message2;
}
public String getMessage1() {
return message1;
}
public String getMessage2() {
return message2;
}
}
| {
"content_hash": "3f4a3bd39ab78e795b7b7dc634dd675d",
"timestamp": "",
"source": "github",
"line_count": 27,
"max_line_length": 56,
"avg_line_length": 17.037037037037038,
"alnum_prop": 0.6260869565217392,
"repo_name": "huihoo/olat",
"id": "6d7865c3a23bcc9b45ca14208ab5a7e5ced85493",
"size": "1256",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "OLAT-LMS/src/main/java/org/olat/lms/learn/hello/service/MessageTO.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "AMPL",
"bytes": "24445"
},
{
"name": "AspectJ",
"bytes": "36132"
},
{
"name": "CSS",
"bytes": "2135670"
},
{
"name": "HTML",
"bytes": "2950677"
},
{
"name": "Java",
"bytes": "50804277"
},
{
"name": "JavaScript",
"bytes": "31237972"
},
{
"name": "PLSQL",
"bytes": "64492"
},
{
"name": "Perl",
"bytes": "10717"
},
{
"name": "Shell",
"bytes": "79994"
},
{
"name": "XSLT",
"bytes": "186520"
}
],
"symlink_target": ""
} |
package com.github.randomtext.text.history;
import java.util.Objects;
/**
* Created by alexey on 6/17/17.
*/
class TextResponseProcessedEvent {
private String freqWord;
private Integer avgParagraphSize;
private Double avgParagraphProcessingTime;
private Double totalProcessingTime;
private TextResponseProcessedEvent(Builder builder) {
freqWord = builder.freqWord;
avgParagraphSize = builder.avgParagraphSize;
avgParagraphProcessingTime = builder.avgParagraphProcessingTime;
totalProcessingTime = builder.totalProcessingTime;
}
public String getFreqWord() {
return freqWord;
}
public Integer getAvgParagraphSize() {
return avgParagraphSize;
}
public Double getAvgParagraphProcessingTime() {
return avgParagraphProcessingTime;
}
public Double getTotalProcessingTime() {
return totalProcessingTime;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
TextResponseProcessedEvent that = (TextResponseProcessedEvent) o;
return Objects.equals(freqWord, that.freqWord) &&
Objects.equals(avgParagraphSize, that.avgParagraphSize) &&
Objects.equals(avgParagraphProcessingTime, that.avgParagraphProcessingTime) &&
Objects.equals(totalProcessingTime, that.totalProcessingTime);
}
@Override
public int hashCode() {
return Objects.hash(freqWord, avgParagraphSize, avgParagraphProcessingTime, totalProcessingTime);
}
@Override
public String toString() {
return "TextResponseProcessedEvent{" +
"freqWord='" + freqWord + '\'' +
", avgParagraphSize=" + avgParagraphSize +
", avgParagraphProcessingTime=" + avgParagraphProcessingTime +
", totalProcessingTime=" + totalProcessingTime +
'}';
}
static class Builder {
private String freqWord;
private Integer avgParagraphSize;
private Double avgParagraphProcessingTime;
private Double totalProcessingTime;
public Builder freqWord(String value) {
this.freqWord = value;
return this;
}
public Builder avgParagraphSize(Integer value) {
this.avgParagraphSize = value;
return this;
}
public Builder avgParagraphProcessingTime(Double value) {
this.avgParagraphProcessingTime = value;
return this;
}
public Builder totalProcessingTime(Double value) {
this.totalProcessingTime = value;
return this;
}
public TextResponseProcessedEvent build() {
return new TextResponseProcessedEvent(this);
}
}
}
| {
"content_hash": "ee03765a86ef03d2a40b8a242b262ec4",
"timestamp": "",
"source": "github",
"line_count": 94,
"max_line_length": 105,
"avg_line_length": 30.595744680851062,
"alnum_prop": 0.6467315716272601,
"repo_name": "koptenkov/randomtext",
"id": "2a4f3b272c7490c0ea2f3432d130062d65811655",
"size": "2876",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/main/java/com/github/randomtext/text/history/TextResponseProcessedEvent.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "4994"
},
{
"name": "Java",
"bytes": "52568"
},
{
"name": "Shell",
"bytes": "6468"
}
],
"symlink_target": ""
} |
module dojox.mobile.app{
export class StageController{
scenes : any[];
effect : String;
_opInProgress : Object;
domNode : any;
getActiveSceneController () : any;
pushScene (sceneName:any,params:any) : any;
setZIndex (controller:any,idx:any) : any;
popScene (data:any) : any;
popScenesTo (sceneName:any,data:any) : any;
_destroyScene (scene:any) : any;
}
}
| {
"content_hash": "dab64f03a14a20443023bff8db39e2fd",
"timestamp": "",
"source": "github",
"line_count": 14,
"max_line_length": 43,
"avg_line_length": 25.428571428571427,
"alnum_prop": 0.7303370786516854,
"repo_name": "stopyoukid/DojoToTypescriptConverter",
"id": "96ef72b78e9df24b9206dd0791b010ea73a536a0",
"size": "393",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "out/separate/dojox.mobile.app.StageController.d.ts",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "JavaScript",
"bytes": "29092"
}
],
"symlink_target": ""
} |
require 'minitest/spec'
require 'minitest/autorun'
require 'podding-cli' | {
"content_hash": "4e8f1e9a40c46c0a6229105d5129dd01",
"timestamp": "",
"source": "github",
"line_count": 4,
"max_line_length": 26,
"avg_line_length": 18.25,
"alnum_prop": 0.7945205479452054,
"repo_name": "Podding/PoddingCLI",
"id": "66fb24248b8ef44342dd8fd9ff06941052f8f10a",
"size": "92",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "spec/helper.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Ruby",
"bytes": "9458"
}
],
"symlink_target": ""
} |
"""Provides base document support."""
import collections
import logging
from bson.json_util import dumps, loads
from tavi.errors import Errors
from tavi.base.fields import BaseField
logger = logging.getLogger(__name__)
def get_field_attr(cls, field):
"""Custom function for retrieving a tavi.field attribute. Handles nested
attributes for embedded documents as well as embedded lists of documents.
"""
value = getattr(cls, field)
if isinstance(value, BaseDocument):
value = value.field_values
elif (isinstance(value, collections.MutableSequence) and
len(value) and isinstance(value[0], BaseDocument)):
value = [v.field_values for v in value]
if value == []:
value = None
return value
def set_field_attr(cls, field, value):
"""Custom function for setting a tavi.field attribute."""
field_descriptor = cls._field_descriptors[field]
if value is not None and hasattr(field_descriptor, '_type'):
if not isinstance(value, collections.MutableSequence):
raise ValueError('ListField value must be a sequence.')
for item in value:
getattr(cls, field).append(field_descriptor._type(**item))
return
if value is None:
value = field_descriptor.default
if isinstance(value, dict):
value = field_descriptor.doc_class(**value)
setattr(cls, field, value)
class BaseDocumentMetaClass(type):
"""MetaClass for BaseDocuments. Handles initializing the list of fields for
the BaseDocument.
"""
def __init__(cls, name, bases, attrs):
super(BaseDocumentMetaClass, cls).__init__(name, bases, attrs)
sorted_fields = sorted(
[field for field in attrs.iteritems()
if isinstance(field[1], BaseField) and field[1].persist],
key=lambda i: i[1].creation_order
)
cls._field_descriptors = collections.OrderedDict(sorted_fields)
class BaseDocument(object):
"""Base class for Mongo Documents. Provides basic field support."""
__metaclass__ = BaseDocumentMetaClass
def __init__(self, **kwargs):
self._errors = Errors()
for field in self.fields:
set_field_attr(self, field, kwargs.get(field))
for k, v in kwargs.iteritems():
if k not in self.fields:
msg = "Ignoring unknown field for %s: %s = '%s'"
logger.debug(msg, self.__class__.__name__, repr(k), repr(v))
self.changed_fields = set()
@property
def fields(self):
"""Returns the list of fields for the Document."""
return self._field_descriptors.keys()
@property
def field_values(self):
"""Returns a dictionary containing all fields and their values."""
return {field: get_field_attr(self, field) for field in self.fields}
@property
def mongo_field_values(self):
"""Same as field_values except uses the Mongo field names. This way
the document can have a field name that is different from the
field name persisted in Mongo.
"""
return {
v.name: get_field_attr(self, k)
for k, v in self._field_descriptors.items()
}
@property
def errors(self):
"""Returns a tavi.Errors object that contains any errors for the
Document.
"""
return self._errors
@property
def valid(self):
"""Indicates if all the fields in the Document are valid."""
self.__validate__()
return 0 == self.errors.count
def to_json(self, fields=None):
"""Convert Document model object to JSON. Optionally, specify which
fields should be serialized.
"""
include_bson_id = True
if fields:
if "bson_id" not in fields:
include_bson_id = False
else:
fields.remove("bson_id")
field_map = {field: self.field_values[field] for field in fields}
else:
field_map = self.field_values
if include_bson_id:
field_map["id"] = self.bson_id
return dumps(field_map)
@classmethod
def from_json(cls, json_str):
"""Deserialize a JSON string into a Document model object."""
attrs = loads(json_str)
return cls(**attrs)
def __validate__(self):
"""Override for model level validations. This method will be called by
the #valid property.
"""
pass
| {
"content_hash": "a5244979b4cfb7072479170713afe307",
"timestamp": "",
"source": "github",
"line_count": 148,
"max_line_length": 79,
"avg_line_length": 30.405405405405407,
"alnum_prop": 0.6133333333333333,
"repo_name": "bnadlerjr/tavi",
"id": "5a5b9eebf9abc35e8dcb649c872a85af46a4d529",
"size": "4524",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "tavi/base/documents.py",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Python",
"bytes": "127290"
}
],
"symlink_target": ""
} |
FROM ubuntu:14.04
MAINTAINER Wink
RUN apt-get update; apt-get install -y curl default-jdk
# install some stuff we know we'll need to support Python stuff in distribution on the workers
RUN apt-get update; apt-get install -y \
python-dev \
python-pip \
&& pip install \
boto \
bz2file
RUN curl -s http://d3kbcqa49mib13.cloudfront.net/spark-1.6.0-bin-hadoop2.6.tgz | tar -xz -C /usr/local/
RUN cd /usr/local && ln -s spark-1.6.0-bin-hadoop2.6 spark
ENV SPARK_HOME /usr/local/spark
COPY conf /usr/local/spark/conf
RUN mkdir -p /data/spark-events
ENV PATH $SPARK_HOME/bin:$PATH
# set the python path explicitly because spark looks in the wrong spot by default
ENV PYTHONPATH `echo "import sys; print ':'.join(sys.path)" | python`:$PYTHONPATH
ADD bootstrap.sh /usr/local/bootstrap.sh
ENTRYPOINT ["/usr/local/bootstrap.sh"]
WORKDIR /usr/local/spark
| {
"content_hash": "e77016bb978220ab25db499bf829457d",
"timestamp": "",
"source": "github",
"line_count": 25,
"max_line_length": 103,
"avg_line_length": 34.48,
"alnum_prop": 0.734338747099768,
"repo_name": "winkapp/spark-cluster-docker",
"id": "2299a377a7b32b900ecd11836f794591778c41ae",
"size": "862",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Dockerfile",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Shell",
"bytes": "637"
}
],
"symlink_target": ""
} |
@protocol SAVR_FluxManagerDelegate;
@interface SAVR_FluxManager : NSObject <NSTableViewDataSource>
@property (nonatomic, weak) id<SAVR_FluxManagerDelegate> delegate;
+(id) sharedInstance;
-(id) initWithImgurFlux:(NSArray*)imgurFlux;
-(void) reloadActiveFlux:(BOOL)force;
-(void) checkIntegrity;
@end
@protocol SAVR_FluxManagerDelegate <NSObject>
-(void)fluxManagerDidStartReloading:(SAVR_FluxManager*)fluxManager;
-(void)fluxManagerDidFinishReloading:(SAVR_FluxManager*)fluxManager newImages:(int)newImagesCount;
-(void)fluxManager:(SAVR_FluxManager*)fluxManager didFailReloadingWithError:(NSError*)error;
@end
| {
"content_hash": "39230ebfe8894a24c97393834ead9dde",
"timestamp": "",
"source": "github",
"line_count": 19,
"max_line_length": 98,
"avg_line_length": 32.473684210526315,
"alnum_prop": 0.813614262560778,
"repo_name": "jcaille/Savr",
"id": "fc92bf6989e12be62d05e37720eb0bed3f572602",
"size": "793",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Savr/SAVR_FluxManager.h",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Objective-C",
"bytes": "97214"
}
],
"symlink_target": ""
} |
package org.apache.activemq.artemis.rest.topic;
import org.apache.activemq.artemis.rest.queue.DestinationSettings;
public class TopicDeployment extends DestinationSettings
{
private String name;
public TopicDeployment()
{
}
public TopicDeployment(String name, boolean duplicatesAllowed)
{
this.name = name;
this.duplicatesAllowed = duplicatesAllowed;
}
public String getName()
{
return name;
}
public void setName(String name)
{
this.name = name;
}
} | {
"content_hash": "b782f7b96673762400b5e1baeeea4bdf",
"timestamp": "",
"source": "github",
"line_count": 29,
"max_line_length": 66,
"avg_line_length": 17.93103448275862,
"alnum_prop": 0.6942307692307692,
"repo_name": "rogerchina/activemq-artemis",
"id": "f8d28d7ef91934fbd46342546999cd4bd3e5c3fa",
"size": "1319",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "artemis-rest/src/main/java/org/apache/activemq/artemis/rest/topic/TopicDeployment.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "5879"
},
{
"name": "C",
"bytes": "2088"
},
{
"name": "C++",
"bytes": "39402"
},
{
"name": "CSS",
"bytes": "17993"
},
{
"name": "HTML",
"bytes": "658306"
},
{
"name": "Java",
"bytes": "24171053"
},
{
"name": "JavaScript",
"bytes": "31054"
},
{
"name": "Python",
"bytes": "3626"
},
{
"name": "Ruby",
"bytes": "3412"
},
{
"name": "Shell",
"bytes": "11252"
}
],
"symlink_target": ""
} |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>V8 API Reference Guide for io.js v10.0.0: Member List</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">V8 API Reference Guide for io.js v10.0.0
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="classes.html"><span>Class Index</span></a></li>
<li><a href="inherits.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespacev8.html">v8</a></li><li class="navelem"><a class="el" href="classv8_1_1FunctionCallbackInfo.html">FunctionCallbackInfo</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">v8::FunctionCallbackInfo< T > Member List</div> </div>
</div><!--header-->
<div class="contents">
<p>This is the complete list of members for <a class="el" href="classv8_1_1FunctionCallbackInfo.html">v8::FunctionCallbackInfo< T ></a>, including all inherited members.</p>
<table class="directory">
<tr class="even"><td class="entry"><a class="el" href="classv8_1_1FunctionCallbackInfo.html#a1475dcc776c8fdd68eb1be08cd29e5ac">Data</a>() const </td><td class="entry"><a class="el" href="classv8_1_1FunctionCallbackInfo.html">v8::FunctionCallbackInfo< T ></a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>debug::ConsoleCallArguments</b> (defined in <a class="el" href="classv8_1_1FunctionCallbackInfo.html">v8::FunctionCallbackInfo< T ></a>)</td><td class="entry"><a class="el" href="classv8_1_1FunctionCallbackInfo.html">v8::FunctionCallbackInfo< T ></a></td><td class="entry"><span class="mlabel">friend</span></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>FunctionCallbackInfo</b>(internal::Object **implicit_args, internal::Object **values, int length) (defined in <a class="el" href="classv8_1_1FunctionCallbackInfo.html">v8::FunctionCallbackInfo< T ></a>)</td><td class="entry"><a class="el" href="classv8_1_1FunctionCallbackInfo.html">v8::FunctionCallbackInfo< T ></a></td><td class="entry"><span class="mlabel">protected</span></td></tr>
<tr><td class="entry"><a class="el" href="classv8_1_1FunctionCallbackInfo.html#a3b5fe01205c99dca06e388c3d390a40e">GetIsolate</a>() const </td><td class="entry"><a class="el" href="classv8_1_1FunctionCallbackInfo.html">v8::FunctionCallbackInfo< T ></a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classv8_1_1FunctionCallbackInfo.html#abf851b51557b0507ab69c494fddbb3c3">GetReturnValue</a>() const </td><td class="entry"><a class="el" href="classv8_1_1FunctionCallbackInfo.html">v8::FunctionCallbackInfo< T ></a></td><td class="entry"></td></tr>
<tr><td class="entry"><a class="el" href="classv8_1_1FunctionCallbackInfo.html#a5b080ddb61501773dfd32058b26a5238">Holder</a>() const </td><td class="entry"><a class="el" href="classv8_1_1FunctionCallbackInfo.html">v8::FunctionCallbackInfo< T ></a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>implicit_args_</b> (defined in <a class="el" href="classv8_1_1FunctionCallbackInfo.html">v8::FunctionCallbackInfo< T ></a>)</td><td class="entry"><a class="el" href="classv8_1_1FunctionCallbackInfo.html">v8::FunctionCallbackInfo< T ></a></td><td class="entry"><span class="mlabel">protected</span></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>internal::CustomArguments< FunctionCallbackInfo ></b> (defined in <a class="el" href="classv8_1_1FunctionCallbackInfo.html">v8::FunctionCallbackInfo< T ></a>)</td><td class="entry"><a class="el" href="classv8_1_1FunctionCallbackInfo.html">v8::FunctionCallbackInfo< T ></a></td><td class="entry"><span class="mlabel">friend</span></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>internal::FunctionCallbackArguments</b> (defined in <a class="el" href="classv8_1_1FunctionCallbackInfo.html">v8::FunctionCallbackInfo< T ></a>)</td><td class="entry"><a class="el" href="classv8_1_1FunctionCallbackInfo.html">v8::FunctionCallbackInfo< T ></a></td><td class="entry"><span class="mlabel">friend</span></td></tr>
<tr><td class="entry"><a class="el" href="classv8_1_1FunctionCallbackInfo.html#a8b89715c355b707efd3d2bcf21e64d9e">IsConstructCall</a>() const </td><td class="entry"><a class="el" href="classv8_1_1FunctionCallbackInfo.html">v8::FunctionCallbackInfo< T ></a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>kArgsLength</b> (defined in <a class="el" href="classv8_1_1FunctionCallbackInfo.html">v8::FunctionCallbackInfo< T ></a>)</td><td class="entry"><a class="el" href="classv8_1_1FunctionCallbackInfo.html">v8::FunctionCallbackInfo< T ></a></td><td class="entry"><span class="mlabel">static</span></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>kDataIndex</b> (defined in <a class="el" href="classv8_1_1FunctionCallbackInfo.html">v8::FunctionCallbackInfo< T ></a>)</td><td class="entry"><a class="el" href="classv8_1_1FunctionCallbackInfo.html">v8::FunctionCallbackInfo< T ></a></td><td class="entry"><span class="mlabel">protected</span><span class="mlabel">static</span></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>kHolderIndex</b> (defined in <a class="el" href="classv8_1_1FunctionCallbackInfo.html">v8::FunctionCallbackInfo< T ></a>)</td><td class="entry"><a class="el" href="classv8_1_1FunctionCallbackInfo.html">v8::FunctionCallbackInfo< T ></a></td><td class="entry"><span class="mlabel">protected</span><span class="mlabel">static</span></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>kIsolateIndex</b> (defined in <a class="el" href="classv8_1_1FunctionCallbackInfo.html">v8::FunctionCallbackInfo< T ></a>)</td><td class="entry"><a class="el" href="classv8_1_1FunctionCallbackInfo.html">v8::FunctionCallbackInfo< T ></a></td><td class="entry"><span class="mlabel">protected</span><span class="mlabel">static</span></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>kNewTargetIndex</b> (defined in <a class="el" href="classv8_1_1FunctionCallbackInfo.html">v8::FunctionCallbackInfo< T ></a>)</td><td class="entry"><a class="el" href="classv8_1_1FunctionCallbackInfo.html">v8::FunctionCallbackInfo< T ></a></td><td class="entry"><span class="mlabel">protected</span><span class="mlabel">static</span></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>kReturnValueDefaultValueIndex</b> (defined in <a class="el" href="classv8_1_1FunctionCallbackInfo.html">v8::FunctionCallbackInfo< T ></a>)</td><td class="entry"><a class="el" href="classv8_1_1FunctionCallbackInfo.html">v8::FunctionCallbackInfo< T ></a></td><td class="entry"><span class="mlabel">protected</span><span class="mlabel">static</span></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>kReturnValueIndex</b> (defined in <a class="el" href="classv8_1_1FunctionCallbackInfo.html">v8::FunctionCallbackInfo< T ></a>)</td><td class="entry"><a class="el" href="classv8_1_1FunctionCallbackInfo.html">v8::FunctionCallbackInfo< T ></a></td><td class="entry"><span class="mlabel">protected</span><span class="mlabel">static</span></td></tr>
<tr><td class="entry"><a class="el" href="classv8_1_1FunctionCallbackInfo.html#ab27e070d5dca1974adcd1ff9e5482c6e">Length</a>() const </td><td class="entry"><a class="el" href="classv8_1_1FunctionCallbackInfo.html">v8::FunctionCallbackInfo< T ></a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>length_</b> (defined in <a class="el" href="classv8_1_1FunctionCallbackInfo.html">v8::FunctionCallbackInfo< T ></a>)</td><td class="entry"><a class="el" href="classv8_1_1FunctionCallbackInfo.html">v8::FunctionCallbackInfo< T ></a></td><td class="entry"><span class="mlabel">protected</span></td></tr>
<tr><td class="entry"><a class="el" href="classv8_1_1FunctionCallbackInfo.html#a11cd0cd24b181bc6d39c3d0e203c2eee">NewTarget</a>() const </td><td class="entry"><a class="el" href="classv8_1_1FunctionCallbackInfo.html">v8::FunctionCallbackInfo< T ></a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classv8_1_1FunctionCallbackInfo.html#a0d911f2ef4a2afcb9a29fbae9e733d9b">operator[]</a>(int i) const </td><td class="entry"><a class="el" href="classv8_1_1FunctionCallbackInfo.html">v8::FunctionCallbackInfo< T ></a></td><td class="entry"></td></tr>
<tr><td class="entry"><a class="el" href="classv8_1_1FunctionCallbackInfo.html#a14c7f2df117ad879df898f8451a3fa38">This</a>() const </td><td class="entry"><a class="el" href="classv8_1_1FunctionCallbackInfo.html">v8::FunctionCallbackInfo< T ></a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>values_</b> (defined in <a class="el" href="classv8_1_1FunctionCallbackInfo.html">v8::FunctionCallbackInfo< T ></a>)</td><td class="entry"><a class="el" href="classv8_1_1FunctionCallbackInfo.html">v8::FunctionCallbackInfo< T ></a></td><td class="entry"><span class="mlabel">protected</span></td></tr>
</table></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
| {
"content_hash": "f5ccd8882954e11690153fed79a41c93",
"timestamp": "",
"source": "github",
"line_count": 130,
"max_line_length": 456,
"avg_line_length": 98.2,
"alnum_prop": 0.6897227009243303,
"repo_name": "v8-dox/v8-dox.github.io",
"id": "615783ed0526a3ed76b9d591c1e211ce0a2c6448",
"size": "12766",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "2a3f8c3/html/classv8_1_1FunctionCallbackInfo-members.html",
"mode": "33188",
"license": "mit",
"language": [],
"symlink_target": ""
} |
def type_to_string(_type: type) -> str:
"""Gets the string representation of a type.
THe original type can be derived from the returned string representation through
pydoc.locate().
"""
if _type.__module__ == "typing":
return f"{_type.__module__}.{_type._name}"
elif _type.__module__ == "builtins":
return _type.__name__
else:
return f"{_type.__module__}.{_type.__name__}"
| {
"content_hash": "654499ed77ea613b4a4be0b80de46c64",
"timestamp": "",
"source": "github",
"line_count": 12,
"max_line_length": 84,
"avg_line_length": 35.5,
"alnum_prop": 0.5821596244131455,
"repo_name": "ray-project/ray",
"id": "279948c5408b6b0e1a51483dc8575f78bf94d2d3",
"size": "426",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "python/ray/experimental/gradio_utils.py",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "C",
"bytes": "37490"
},
{
"name": "C++",
"bytes": "5972422"
},
{
"name": "CSS",
"bytes": "10912"
},
{
"name": "Cython",
"bytes": "227477"
},
{
"name": "Dockerfile",
"bytes": "20210"
},
{
"name": "HTML",
"bytes": "30382"
},
{
"name": "Java",
"bytes": "1160849"
},
{
"name": "JavaScript",
"bytes": "1128"
},
{
"name": "Jinja",
"bytes": "6371"
},
{
"name": "Jupyter Notebook",
"bytes": "1615"
},
{
"name": "Makefile",
"bytes": "234"
},
{
"name": "PowerShell",
"bytes": "1114"
},
{
"name": "Python",
"bytes": "19539109"
},
{
"name": "Shell",
"bytes": "134583"
},
{
"name": "Starlark",
"bytes": "334862"
},
{
"name": "TypeScript",
"bytes": "190599"
}
],
"symlink_target": ""
} |
package killrvideo.async;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.atomic.AtomicInteger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Custom ThreadFactory.
*
* @author DataStax evangelist team.
*/
public class KillrVideoThreadFactory implements ThreadFactory {
/** Create dedicated logger to trace ERRORS. */
private static final Logger LOGGER = LoggerFactory.getLogger("killrvideo-default-executor");
/** Counter keeping track of thread number in executor. */
private final AtomicInteger threadNumber = new AtomicInteger(10);
/**
* Default constructor required for reflection.
*/
public KillrVideoThreadFactory() {
}
/** {@inheritDoc} */
public Thread newThread(Runnable r) {
Thread thread = new Thread(r);
thread.setName("killrvideo-default-executor-" + this.threadNumber.incrementAndGet());
thread.setDaemon(true);
thread.setUncaughtExceptionHandler(this.uncaughtExceptionHandler);
return thread;
}
/**
* Overriding error handling providing logging.
*/
private Thread.UncaughtExceptionHandler uncaughtExceptionHandler = (t, e) -> {
LOGGER.error("Uncaught asynchronous exception : " + e.getMessage(), e);
};
}
| {
"content_hash": "9aa49872084afad27ce67e52439aa11a",
"timestamp": "",
"source": "github",
"line_count": 46,
"max_line_length": 96,
"avg_line_length": 28.347826086956523,
"alnum_prop": 0.6955521472392638,
"repo_name": "doanduyhai/killrvideo-java",
"id": "807ab8b90e6ed38a15f2adcae25c35a42546cf1d",
"size": "1304",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/main/java/killrvideo/async/KillrVideoThreadFactory.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "247496"
},
{
"name": "PowerShell",
"bytes": "5217"
},
{
"name": "Shell",
"bytes": "4572"
}
],
"symlink_target": ""
} |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MassiveDynamicProxyGenerator.DependencyInjection.Test.Services
{
public interface ITypeC
{
void FooForC();
}
}
| {
"content_hash": "4ea335004123fe48c9b5d5e8d07c3376",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 72,
"avg_line_length": 19.923076923076923,
"alnum_prop": 0.752895752895753,
"repo_name": "harrison314/MassiveDynamicProxyGenerator",
"id": "004731651a3f96b4bdb7e7751e25fb7a0b393e57",
"size": "261",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/Test/MassiveDynamicProxyGenerator.DependencyInjection.Test/Services/ITypeC.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "553817"
},
{
"name": "CSS",
"bytes": "652"
},
{
"name": "HTML",
"bytes": "14371"
},
{
"name": "JavaScript",
"bytes": "34"
}
],
"symlink_target": ""
} |
//
// GEORenderer.cpp
// G3MiOSSDK
//
// Created by Diego Gomez Deck on 11/30/12.
//
//
#include "GEORenderer.hpp"
#include "GEOObject.hpp"
#include "GEOSymbolizer.hpp"
#include "ILogger.hpp"
#include "Context.hpp"
#include "Camera.hpp"
#include "IDownloader.hpp"
#include "IBufferDownloadListener.hpp"
#include "GEOJSONParser.hpp"
#include "IThreadUtils.hpp"
#include "MeshRenderer.hpp"
#include "ShapesRenderer.hpp"
#include "MarksRenderer.hpp"
#include "GEOVectorLayer.hpp"
class GEORenderer_ObjectSymbolizerPair {
public:
const GEOObject* _geoObject;
const GEOSymbolizer* _symbolizer;
GEORenderer_ObjectSymbolizerPair(GEOObject* geoObject,
GEOSymbolizer* symbolizer) :
_geoObject(geoObject),
_symbolizer(symbolizer)
{
}
~GEORenderer_ObjectSymbolizerPair() {
delete _geoObject;
delete _symbolizer;
}
};
GEORenderer::~GEORenderer() {
delete _defaultSymbolizer;
const size_t childrenCount = _children.size();
for (size_t i = 0; i < childrenCount; i++) {
GEORenderer_ObjectSymbolizerPair* pair = _children[i];
delete pair;
}
#ifdef JAVA_CODE
super.dispose();
#endif
}
void GEORenderer::addGEOObject(GEOObject* geoObject,
GEOSymbolizer* symbolizer) {
if ( (symbolizer == NULL) && (_defaultSymbolizer == NULL) ) {
ILogger::instance()->logError("Can't add a geoObject without a symbolizer if the defaultSymbolizer was not given in the GEORenderer constructor");
delete geoObject;
}
else {
_children.push_back( new GEORenderer_ObjectSymbolizerPair(geoObject, symbolizer) );
}
}
void GEORenderer::render(const G3MRenderContext* rc, GLState* glState) {
const size_t childrenCount = _children.size();
if (childrenCount > 0) {
for (size_t i = 0; i < childrenCount; i++) {
const GEORenderer_ObjectSymbolizerPair* pair = _children[i];
if (pair->_geoObject != NULL) {
const GEOSymbolizer* symbolizer = (pair->_symbolizer == NULL) ? _defaultSymbolizer : pair->_symbolizer;
pair->_geoObject->symbolize(rc,
symbolizer,
_meshRenderer,
_shapesRenderer,
_marksRenderer,
_geoVectorLayer);
}
delete pair;
}
_children.clear();
}
}
class GEORenderer_GEOObjectParserAsyncTask : public GAsyncTask {
private:
#ifdef C_CODE
const URL _url;
#endif
#ifdef JAVA_CODE
public final URL _url;
#endif
IByteBuffer* _buffer;
GEORenderer* _geoRenderer;
GEOSymbolizer* _symbolizer;
const bool _isBSON;
GEOObject* _geoObject;
public:
GEORenderer_GEOObjectParserAsyncTask(const URL& url,
IByteBuffer* buffer,
GEORenderer* geoRenderer,
GEOSymbolizer* symbolizer,
bool isBSON) :
_url(url),
_buffer(buffer),
_geoRenderer(geoRenderer),
_symbolizer(symbolizer),
_isBSON(isBSON),
_geoObject(NULL)
{
}
~GEORenderer_GEOObjectParserAsyncTask() {
delete _buffer;
// delete _geoObject;
#ifdef JAVA_CODE
super.dispose();
#endif
}
void runInBackground(const G3MContext* context) {
// ILogger::instance()->logInfo("Parsing GEOObject buffer from \"%s\" (%db)",
// _url._path.c_str(),
// _buffer->size());
if (_isBSON) {
_geoObject = GEOJSONParser::parseBSON(_buffer);
}
else {
_geoObject = GEOJSONParser::parseJSON(_buffer);
}
delete _buffer;
_buffer = NULL;
}
void onPostExecute(const G3MContext* context) {
if (_geoObject == NULL) {
ILogger::instance()->logError("Error parsing GEOJSON from \"%s\"", _url._path.c_str());
}
else {
// ILogger::instance()->logInfo("Adding GEOObject to _geoRenderer");
_geoRenderer->addGEOObject(_geoObject, _symbolizer);
_geoObject = NULL;
}
}
};
class GEORenderer_GEOObjectBufferDownloadListener : public IBufferDownloadListener {
private:
GEORenderer* _geoRenderer;
GEOSymbolizer* _symbolizer;
const IThreadUtils* _threadUtils;
const bool _isBSON;
public:
GEORenderer_GEOObjectBufferDownloadListener(GEORenderer* geoRenderer,
GEOSymbolizer* symbolizer,
const IThreadUtils* threadUtils,
bool isBSON) :
_geoRenderer(geoRenderer),
_symbolizer(symbolizer),
_threadUtils(threadUtils),
_isBSON(isBSON)
{
}
void onDownload(const URL& url,
IByteBuffer* buffer,
bool expired) {
ILogger::instance()->logInfo("Downloaded GEOObject buffer from \"%s\" (%db)",
url._path.c_str(),
buffer->size());
_threadUtils->invokeAsyncTask(new GEORenderer_GEOObjectParserAsyncTask(url,
buffer,
_geoRenderer,
_symbolizer,
_isBSON),
true);
}
void onError(const URL& url) {
ILogger::instance()->logError("Error downloading \"%s\"", url._path.c_str());
}
void onCancel(const URL& url) {
ILogger::instance()->logInfo("Canceled download of \"%s\"", url._path.c_str());
}
void onCanceledDownload(const URL& url,
IByteBuffer* buffer,
bool expired) {
// do nothing
}
};
void GEORenderer::requestBuffer(const URL& url,
GEOSymbolizer* symbolizer,
long long priority,
const TimeInterval& timeToCache,
bool readExpired,
bool isBSON) {
// ILogger::instance()->logInfo("Requesting GEOObject from \"%s\"", url._path.c_str());
IDownloader* downloader = _context->getDownloader();
downloader->requestBuffer(url,
priority,
timeToCache,
readExpired,
new GEORenderer_GEOObjectBufferDownloadListener(this,
symbolizer,
_context->getThreadUtils(),
isBSON),
true);
}
void GEORenderer::drainLoadQueue() {
const size_t loadQueueSize = _loadQueue.size();
for (size_t i = 0; i < loadQueueSize; i++) {
LoadQueueItem* item = _loadQueue[i];
requestBuffer(item->_url,
item->_symbolizer,
item->_priority,
item->_timeToCache,
item->_readExpired,
item->_isBSON);
delete item;
}
_loadQueue.clear();
}
void GEORenderer::cleanLoadQueue() {
const size_t loadQueueSize = _loadQueue.size();
for (size_t i = 0; i < loadQueueSize; i++) {
LoadQueueItem* item = _loadQueue[i];
delete item;
}
_loadQueue.clear();
}
void GEORenderer::onChangedContext() {
if (_context != NULL) {
drainLoadQueue();
}
}
void GEORenderer::onLostContext() {
if (_context == NULL) {
cleanLoadQueue();
}
}
void GEORenderer::loadJSON(const URL& url,
GEOSymbolizer* symbolizer,
long long priority,
const TimeInterval& timeToCache,
bool readExpired) {
if (_context == NULL) {
_loadQueue.push_back(new LoadQueueItem(url,
symbolizer,
priority,
timeToCache,
readExpired,
false /* isBson */));
}
else {
requestBuffer(url,
symbolizer,
priority,
timeToCache,
readExpired,
false /* isBson */);
}
}
void GEORenderer::loadBSON(const URL& url,
GEOSymbolizer* symbolizer,
long long priority,
const TimeInterval& timeToCache,
bool readExpired) {
if (_context == NULL) {
_loadQueue.push_back(new LoadQueueItem(url,
symbolizer,
priority,
timeToCache,
readExpired,
true /* isBson */));
}
else {
requestBuffer(url,
symbolizer,
priority,
timeToCache,
readExpired,
true /* isBson */);
}
}
void GEORenderer::setEnable(bool enable) {
DefaultRenderer::setEnable(enable);
if (_meshRenderer) {
_meshRenderer->setEnable(enable);
}
if (_shapesRenderer) {
_shapesRenderer->setEnable(enable);
}
if (_marksRenderer) {
_marksRenderer->setEnable(enable);
}
if (_geoVectorLayer) {
_geoVectorLayer->setEnable(enable);
}
}
void GEORenderer::setGEOVectorLayer(GEOVectorLayer* geoVectorLayer,
bool deletePrevious) {
if (geoVectorLayer != _geoVectorLayer) {
if (deletePrevious) {
delete _geoVectorLayer;
}
_geoVectorLayer = geoVectorLayer;
}
}
| {
"content_hash": "ef3daf1f26599a105df2a41381cb5718",
"timestamp": "",
"source": "github",
"line_count": 341,
"max_line_length": 150,
"avg_line_length": 29.35190615835777,
"alnum_prop": 0.5136377260465581,
"repo_name": "AeroGlass/g3m",
"id": "36e94f92cee1ea8cd1bd251ac9ea3a05908510b3",
"size": "10009",
"binary": false,
"copies": "2",
"ref": "refs/heads/purgatory",
"path": "iOS/G3MiOSSDK/Commons/GEO/GEORenderer.cpp",
"mode": "33188",
"license": "bsd-2-clause",
"language": [
{
"name": "Batchfile",
"bytes": "7767"
},
{
"name": "C",
"bytes": "12488"
},
{
"name": "C++",
"bytes": "2483573"
},
{
"name": "CSS",
"bytes": "854"
},
{
"name": "HTML",
"bytes": "29099"
},
{
"name": "Java",
"bytes": "2678952"
},
{
"name": "JavaScript",
"bytes": "13022"
},
{
"name": "Objective-C",
"bytes": "152753"
},
{
"name": "Objective-C++",
"bytes": "344579"
},
{
"name": "PostScript",
"bytes": "693603"
},
{
"name": "Python",
"bytes": "26399"
}
],
"symlink_target": ""
} |
require "rails_helper"
describe Repository do
it { should belong_to(:namespace) }
it { should have_many(:tags) }
it { should have_many(:stars) }
describe "starrable behaviour" do
let(:user) { create(:user) }
let(:repository) { create(:repository) }
let(:star) { create(:star, user: user, repository: repository) }
let(:other_user) { create(:user) }
it "should identify if it is already starred by a user" do
expect(star.repository.starred_by?(user)).to be true
expect(star.repository.starred_by?(other_user)).to be false
end
it "should be starrable by a user" do
repository.star(user)
expect(repository.starred_by?(user)).to be true
expect(repository.starred_by?(other_user)).to be false
end
it "should be unstarrable by a user" do
repository = star.repository
repository.unstar(user)
expect(repository.starred_by?(user)).to be false
expect(repository.starred_by?(other_user)).to be false
end
end
describe "handle push event" do
let(:tag_name) { "latest" }
let(:repository_name) { "busybox" }
let(:registry) { create(:registry) }
let(:user) { create(:user) }
context "event does not match regexp of manifest" do
let(:event) do
e = build(:raw_push_manifest_event).to_test_hash
e["target"]["repository"] = repository_name
e["target"]["url"] = "http://registry.test.lan/v2/#{repository_name}/wrong/#{tag_name}"
e["request"]["host"] = registry.hostname
e
end
it "sends event to logger" do
error_msg = "Cannot find tag inside of event url: http://registry.test.lan/v2/busybox/wrong/latest"
expect(Rails.logger).to receive(:error).with(error_msg)
expect do
Repository.handle_push_event(event)
end.to change(Repository, :count).by(0)
end
end
context "event comes from an unknown registry" do
before :each do
@event = build(:raw_push_manifest_event).to_test_hash
@event["target"]["repository"] = repository_name
@event["target"]["url"] = "http://registry.test.lan/v2/#{repository_name}/manifests/#{tag_name}"
@event["request"]["host"] = "unknown-registry.test.lan"
@event["actor"]["name"] = user.username
end
it "sends event to logger" do
expect(Rails.logger).to receive(:info)
expect do
Repository.handle_push_event(@event)
end.to change(Repository, :count).by(0)
end
end
context "event comes from an unknown user" do
before :each do
@event = build(:raw_push_manifest_event).to_test_hash
@event["target"]["repository"] = repository_name
@event["target"]["url"] = "http://registry.test.lan/v2/#{repository_name}/manifests/#{tag_name}"
@event["request"]["host"] = registry.hostname
@event["actor"]["name"] = "a_ghost"
end
it "sends event to logger" do
expect(Rails.logger).to receive(:error)
expect do
Repository.handle_push_event(@event)
end.to change(Repository, :count).by(0)
end
end
context "when dealing with a top level repository" do
before :each do
@event = build(:raw_push_manifest_event).to_test_hash
@event["target"]["repository"] = repository_name
@event["target"]["url"] = "http://registry.test.lan/v2/#{repository_name}/manifests/#{tag_name}"
@event["request"]["host"] = registry.hostname
@event["actor"]["name"] = user.username
end
context "when the repository is not known by Portus" do
it "should create repository and tag objects" do
repository = nil
expect do
repository = Repository.handle_push_event(@event)
end.to change(Namespace, :count).by(0)
expect(repository).not_to be_nil
expect(Repository.count).to eq 1
expect(Tag.count).to eq 1
expect(repository.namespace).to eq(registry.global_namespace)
expect(repository.name).to eq(repository_name)
expect(repository.tags.count).to eq 1
expect(repository.tags.first.name).to eq tag_name
expect(repository.tags.find_by(name: tag_name).author).to eq(user)
end
it "tracks the event" do
repository = nil
expect do
repository = Repository.handle_push_event(@event)
end.to change(PublicActivity::Activity, :count).by(1)
activity = PublicActivity::Activity.last
expect(activity.key).to eq("repository.push")
expect(activity.owner).to eq(user)
expect(activity.trackable).to eq(repository)
expect(activity.recipient).to eq(repository.tags.last)
expect(repository.tags.find_by(name: tag_name).author).to eq(user)
end
end
context "when a new version of an already known repository" do
before :each do
repository = create(:repository, name: repository_name,
namespace: registry.global_namespace)
repository.tags << Tag.new(name: "1.0.0")
end
it "should create a new tag" do
repository = nil
expect do
repository = Repository.handle_push_event(@event)
end.to change(Namespace, :count).by(0)
expect(repository).not_to be_nil
expect(Repository.count).to eq 1
expect(Tag.count).to eq 2
expect(repository.namespace).to eq(registry.global_namespace)
expect(repository.name).to eq(repository_name)
expect(repository.tags.count).to eq 2
expect(repository.tags.map(&:name)).to include("1.0.0", tag_name)
expect(repository.tags.find_by(name: tag_name).author).to eq(user)
end
it "tracks the event" do
repository = nil
expect do
repository = Repository.handle_push_event(@event)
end.to change(PublicActivity::Activity, :count).by(1)
activity = PublicActivity::Activity.last
expect(activity.key).to eq("repository.push")
expect(activity.owner).to eq(user)
expect(activity.recipient).to eq(repository.tags.find_by(name: tag_name))
expect(activity.trackable).to eq(repository)
expect(repository.tags.find_by(name: tag_name).author).to eq(user)
end
end
context "re-tagging of a known image from one namespace to another" do
let(:repository_namespaced_name) { "portus/busybox" }
let(:admin) { create(:admin) }
before :each do
team_user = create(:team, owners: [admin])
@ns = create(:namespace, name: "portus", team: team_user, registry: registry)
create(:repository, name: "busybox", namespace: registry.global_namespace)
end
it "preserves the previous namespace" do
event = @event
event["target"]["repository"] = repository_namespaced_name
event["target"]["url"] = "http://registry.test.lan/v2/#{repository_namespaced_name}/manifests/#{tag_name}"
Repository.handle_push_event(event)
repos = Repository.all.order("id ASC")
expect(repos.count).to be(2)
expect(repos.first.namespace.id).to be(registry.global_namespace.id)
expect(repos.last.namespace.id).to be(@ns.id)
end
end
end
context "not global repository" do
let(:namespace_name) { "suse" }
before :each do
@event = build(:raw_push_manifest_event).to_test_hash
@event["target"]["repository"] = "#{namespace_name}/#{repository_name}"
@event["target"]["url"] = "http://registry.test.lan/v2/#{namespace_name}/#{repository_name}/manifests/#{tag_name}"
@event["request"]["host"] = registry.hostname
@event["actor"]["name"] = user.username
end
context "when the namespace is not known by Portus" do
it "does not create the namespace" do
repository = Repository.handle_push_event(@event)
expect(repository).to be_nil
end
end
context "when the namespace is known by Portus" do
before :each do
@namespace = create(:namespace, name: namespace_name, registry: registry)
end
it "should create repository and tag objects when the repository is unknown to portus" do
repository = Repository.handle_push_event(@event)
expect(repository).not_to be_nil
expect(Repository.count).to eq 1
expect(Repository.count).to eq 1
expect(Tag.count).to eq 1
expect(repository.namespace.name).to eq(namespace_name)
expect(repository.name).to eq(repository_name)
expect(repository.tags.count).to eq 1
expect(repository.tags.first.name).to eq tag_name
expect(repository.tags.find_by(name: tag_name).author).to eq(user)
end
it "should create a new tag when the repository is already known to portus" do
repository = create(:repository, name: repository_name, namespace: @namespace)
repository.tags << Tag.new(name: "1.0.0")
repository = Repository.handle_push_event(@event)
expect(repository).not_to be_nil
expect(Repository.count).to eq 1
expect(Repository.count).to eq 1
expect(Tag.count).to eq 2
expect(repository.namespace.name).to eq(namespace_name)
expect(repository.name).to eq(repository_name)
expect(repository.tags.count).to eq 2
expect(repository.tags.map(&:name)).to include("1.0.0", tag_name)
expect(repository.tags.find_by(name: tag_name).author).to eq(user)
end
end
end
end
end
| {
"content_hash": "ba9826895f334ac36bc9eb50efe16635",
"timestamp": "",
"source": "github",
"line_count": 260,
"max_line_length": 122,
"avg_line_length": 37.676923076923075,
"alnum_prop": 0.6171906900775826,
"repo_name": "mauromorales/Portus",
"id": "0b5aefb25672e3d453bc641f5f72753496db651b",
"size": "9796",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "spec/models/repository_spec.rb",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "8275"
},
{
"name": "CoffeeScript",
"bytes": "3953"
},
{
"name": "HTML",
"bytes": "41816"
},
{
"name": "Ruby",
"bytes": "217085"
},
{
"name": "Shell",
"bytes": "7749"
}
],
"symlink_target": ""
} |
namespace Loon
{
public class UnityBundle
{
public object Bind;
public UnityBundle(object o)
{
this.Bind = o;
}
}
}
| {
"content_hash": "f25a1c4b6eadbf400adbafa9acd93525",
"timestamp": "",
"source": "github",
"line_count": 12,
"max_line_length": 30,
"avg_line_length": 11.083333333333334,
"alnum_prop": 0.631578947368421,
"repo_name": "cping/LGame",
"id": "cc5426cd613736dbe1b4f90a5668ba2a511a20b0",
"size": "133",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "C#/Loon2Unity/Loon/UnityBundle.cs",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "1472"
},
{
"name": "C",
"bytes": "3901"
},
{
"name": "C#",
"bytes": "3682953"
},
{
"name": "C++",
"bytes": "24221"
},
{
"name": "CSS",
"bytes": "115312"
},
{
"name": "HTML",
"bytes": "1782"
},
{
"name": "Java",
"bytes": "26857190"
},
{
"name": "JavaScript",
"bytes": "177232"
},
{
"name": "Shell",
"bytes": "236"
}
],
"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 -->
<title>CredentialNotFoundException (xenon-2.3.0 2.4.1 API for Xenon developers)</title>
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="CredentialNotFoundException (xenon-2.3.0 2.4.1 API for Xenon developers)";
}
}
catch(err) {
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../nl/esciencecenter/xenon/adaptors/shared/ssh/CertificateNotFoundException.html" title="class in nl.esciencecenter.xenon.adaptors.shared.ssh"><span class="typeNameLink">Prev Class</span></a></li>
<li><a href="../../../../../../nl/esciencecenter/xenon/adaptors/shared/ssh/SSHConnection.html" title="class in nl.esciencecenter.xenon.adaptors.shared.ssh"><span class="typeNameLink">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?nl/esciencecenter/xenon/adaptors/shared/ssh/CredentialNotFoundException.html" target="_top">Frames</a></li>
<li><a href="CredentialNotFoundException.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>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li><a href="#field.summary">Field</a> | </li>
<li><a href="#constructor.summary">Constr</a> | </li>
<li><a href="#methods.inherited.from.class.nl.esciencecenter.xenon.XenonException">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li><a href="#field.detail">Field</a> | </li>
<li><a href="#constructor.detail">Constr</a> | </li>
<li>Method</li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">nl.esciencecenter.xenon.adaptors.shared.ssh</div>
<h2 title="Class CredentialNotFoundException" class="title">Class CredentialNotFoundException</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>java.lang.Throwable</li>
<li>
<ul class="inheritance">
<li>java.lang.Exception</li>
<li>
<ul class="inheritance">
<li><a href="../../../../../../nl/esciencecenter/xenon/XenonException.html" title="class in nl.esciencecenter.xenon">nl.esciencecenter.xenon.XenonException</a></li>
<li>
<ul class="inheritance">
<li>nl.esciencecenter.xenon.adaptors.shared.ssh.CredentialNotFoundException</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd>java.io.Serializable</dd>
</dl>
<hr>
<br>
<pre>public class <span class="typeNameLabel">CredentialNotFoundException</span>
extends <a href="../../../../../../nl/esciencecenter/xenon/XenonException.html" title="class in nl.esciencecenter.xenon">XenonException</a></pre>
<div class="block">Signals that a credential could not be found.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../serialized-form.html#nl.esciencecenter.xenon.adaptors.shared.ssh.CredentialNotFoundException">Serialized Form</a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../nl/esciencecenter/xenon/adaptors/shared/ssh/CredentialNotFoundException.html#serialVersionUID">serialVersionUID</a></span></code> </td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../nl/esciencecenter/xenon/adaptors/shared/ssh/CredentialNotFoundException.html#CredentialNotFoundException-java.lang.String-java.lang.String-">CredentialNotFoundException</a></span>(java.lang.String adaptorName,
java.lang.String message)</code> </td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../nl/esciencecenter/xenon/adaptors/shared/ssh/CredentialNotFoundException.html#CredentialNotFoundException-java.lang.String-java.lang.String-java.lang.Throwable-">CredentialNotFoundException</a></span>(java.lang.String adaptorName,
java.lang.String message,
java.lang.Throwable t)</code> </td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.nl.esciencecenter.xenon.XenonException">
<!-- -->
</a>
<h3>Methods inherited from class nl.esciencecenter.xenon.<a href="../../../../../../nl/esciencecenter/xenon/XenonException.html" title="class in nl.esciencecenter.xenon">XenonException</a></h3>
<code><a href="../../../../../../nl/esciencecenter/xenon/XenonException.html#getMessage--">getMessage</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Throwable">
<!-- -->
</a>
<h3>Methods inherited from class java.lang.Throwable</h3>
<code>addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString</code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="serialVersionUID">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>serialVersionUID</h4>
<pre>private static final long serialVersionUID</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#nl.esciencecenter.xenon.adaptors.shared.ssh.CredentialNotFoundException.serialVersionUID">Constant Field Values</a></dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="CredentialNotFoundException-java.lang.String-java.lang.String-java.lang.Throwable-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>CredentialNotFoundException</h4>
<pre>public CredentialNotFoundException(java.lang.String adaptorName,
java.lang.String message,
java.lang.Throwable t)</pre>
</li>
</ul>
<a name="CredentialNotFoundException-java.lang.String-java.lang.String-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>CredentialNotFoundException</h4>
<pre>public CredentialNotFoundException(java.lang.String adaptorName,
java.lang.String message)</pre>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../nl/esciencecenter/xenon/adaptors/shared/ssh/CertificateNotFoundException.html" title="class in nl.esciencecenter.xenon.adaptors.shared.ssh"><span class="typeNameLink">Prev Class</span></a></li>
<li><a href="../../../../../../nl/esciencecenter/xenon/adaptors/shared/ssh/SSHConnection.html" title="class in nl.esciencecenter.xenon.adaptors.shared.ssh"><span class="typeNameLink">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?nl/esciencecenter/xenon/adaptors/shared/ssh/CredentialNotFoundException.html" target="_top">Frames</a></li>
<li><a href="CredentialNotFoundException.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>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li><a href="#field.summary">Field</a> | </li>
<li><a href="#constructor.summary">Constr</a> | </li>
<li><a href="#methods.inherited.from.class.nl.esciencecenter.xenon.XenonException">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li><a href="#field.detail">Field</a> | </li>
<li><a href="#constructor.detail">Constr</a> | </li>
<li>Method</li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
| {
"content_hash": "05538d91361fc1efe8ccdc09f65a6bdd",
"timestamp": "",
"source": "github",
"line_count": 330,
"max_line_length": 315,
"avg_line_length": 37.93030303030303,
"alnum_prop": 0.6504753535192138,
"repo_name": "NLeSC/Xenon",
"id": "d1a31cc4456709f7ce9a4ffc35d9fad8ed46ed17",
"size": "12517",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "docs/versions/2.4.1/javadoc-devel/nl/esciencecenter/xenon/adaptors/shared/ssh/CredentialNotFoundException.html",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "762"
},
{
"name": "Java",
"bytes": "1547681"
},
{
"name": "Shell",
"bytes": "4009"
}
],
"symlink_target": ""
} |
WITH ThreadTimings AS (
SELECT thr.TSCPerMillisecond AS TSCPerMillisecond, thr.StartTime AS StartTime FROM Thread thr, Call c, Segment s, InstructionTagInstance iti, Instruction i WHERE thr.Id = c.Thread AND c.Id = s.Call AND s.Id = i.Segment AND i.Id = iti.Instruction and iti.Tag = t.Id LIMIT 1
)
INSERT INTO TagInstance(Id, Tag, Thread, Counter, Start, End, StartTime, EndTime,
Duration, DurationMs) SELECT
Id,
Tag,
Thread,
Counter,
Start,
End,
strftime('%Y-%m-%dT%H:%M:%fZ', (SELECT StartTime FROM ThreadTimings), '+' || CAST ((t.Start / (SELECT TSCPerMillisecond FROM ThreadTimings) / 1000) AS TEXT) || ' seconds'),
strftime('%Y-%m-%dT%H:%M:%fZ', (SELECT StartTime FROM ThreadTimings), '+' || CAST ((t.End / (SELECT TSCPerMillisecond FROM ThreadTimings) / 1000) AS TEXT) || ' seconds'),
End - Start AS Duration,
(t.End - t.Start) / (SELECT TSCPerMillisecond FROM ThreadTimings)
FROM TagInstanceOld t;
DROP TABLE TagInstanceOld;
| {
"content_hash": "4b66060f7cfa2c757140934d34e1f782",
"timestamp": "",
"source": "github",
"line_count": 17,
"max_line_length": 274,
"avg_line_length": 56.23529411764706,
"alnum_prop": 0.7123430962343096,
"repo_name": "wilhelma/parceive-ui",
"id": "8798fe202f3e6057dfa1f31cf7b74ac9e9a699f4",
"size": "956",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "database/16.tag_instance.sql",
"mode": "33188",
"license": "bsd-2-clause",
"language": [
{
"name": "CSS",
"bytes": "2751"
},
{
"name": "HTML",
"bytes": "2951"
},
{
"name": "JavaScript",
"bytes": "188750"
},
{
"name": "PLSQL",
"bytes": "27"
}
],
"symlink_target": ""
} |
package com.rockhoppertech.music.midi.js;
/*
* #%L
* Rocky Music Core
* %%
* Copyright (C) 1996 - 2013 Rockhopper Technologies
* %%
* 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.
* #L%
*/
import javax.sound.midi.MidiEvent;
/**
* interface <code>MIDIEventFilter</code>
*
* @author <a href="mailto:[email protected]">Gene De Lisa</a>
* @since 1.0
*/
public interface MIDIEventFilter {
/**
* <code>accept</code>
*
* @param me
* a <code>MidiEvent</code> value
* @return a <code>boolean</code> value
*/
public boolean accept(MidiEvent me);
} | {
"content_hash": "88117703995e271b609e50144d3fa854",
"timestamp": "",
"source": "github",
"line_count": 42,
"max_line_length": 75,
"avg_line_length": 27.095238095238095,
"alnum_prop": 0.663444639718805,
"repo_name": "genedelisa/rockymusic",
"id": "ca17c058e3da833c19b6338508db2b56a3de54a4",
"size": "1622",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "rockymusic-core/src/main/java/com/rockhoppertech/music/midi/js/MIDIEventFilter.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "7488"
},
{
"name": "Java",
"bytes": "2900732"
}
],
"symlink_target": ""
} |
[Upgrade Instructions](https://maru.readme.io/docs/upgrade-instructions-from-v09) From v0.9 to v0.10
## v0.10.4 (2016-8-19)
* Enhancements
* support one-line nested list params
* new DSLs for unittest
## v0.10.3 (2016-7-11)
* Enhancements
* add detail and responses for description
* add response helper functions `put_maru_conn/1` and `get_maru_conn/0`
* pass modified conn to `rescue_from` block
## v0.10.2 (2016-6-28)
* Bugfix
* fix v1.3.0 exception warning
## v0.10.1 (2016-6-14)
* Bugfix
* jumbled routes order
* custom type and validation error
## v0.10.0 (2016-6-11)
* Enhancements
* totally rewrite route logic
* totally rewrite params parsing logic and DSLs
* add overridable plug
* support top-level plug
* split Route and Endpoint
* Deprecations
* `coercion` is deprecated in favor of `type`
## v0.9.6 (2016-4-5)
* Bugfix
* define helper functions for all environments except `:prod`
## v0.9.5 (2016-3-15)
* Enhancements
* `mutually_exclusive`, `exactly_one_of` and `at_least_one_of` support `:above_all`
* Bugfix
* param options for route_param DSL
* Deprecated
* Maru.Parsers forked from plug
## v0.9.4 (2016-3-5)
* Enhancements
* Allow param type definition in route_param.
* Bugfix
* parse bool type error.
## v0.9.3 (2016-1-29)
* Enhancements
* `maru.routers` is deprecated in favor of `maru.routes`
* make poison 1.5 and 2.0 compatible
## v0.9.2 (2016-1-6)
* Enhancements
* no longer keep nil value for optional params
## v0.9.1 (2016-1-4)
* Enhancements
* update to elixir v1.2
* Bugfix
* floats can be negative
## v0.9.0 (2015-11-29)
* Enhancements
* import `Plug.Conn` for Maru.Router by default
* reuse `text` `html` and `json` to make response
* Bugfix
* `maru.routers` raise module undefined
* Deprecations
* return NOT Plug.Conn struct by endpoint
* custom response helpers: `assigns` `assign` `headers` `header` `content_type` `status` `present` in faver of functions of Plug.Conn.
## v0.8.5 (2015-11-4)
* Bugfix
* params parser error within `Maru.Test`
## v0.8.4 (2015-10-14)
* Enhancements
* support rename parameter using `source`
* fork plug params for reusing request body
## v0.8.3 (2015-10-3)
* Enhancements
* add paramer type `Json`
* support parameter coercion using `coerce_with`
## v0.8.2 (2015-9-26)
* Documentation
* add documentation
* add ex_doc
* Deprecations
* remove unused plug: Maru.Plugs.Forword
## v0.8.1 (2015-9-21)
* Enhancements
* add `&Maru.Builder.Routers.generate/1` to generate endpoints details
## v0.8.0 (2015-9-20)
* Enhancements
* Update to poison v1.5
## v0.7.2 (2015-9-20)
* Enhancements
* remove deprecated functions
* add build\_embedded and start\_permanent options
* Support configure :port by system environment like {:system, "PORT"}
* add `match` DSL to handle all method
* Support HTTP 405 method not allowed
* `maru.routers` task support `version extend` now
## v0.7.1 (2015-9-7)
* Bugfix
* resolved shared params error
## v0.7.0 (2015-8-20)
* Enhancements
* Support Plug v1.0
## v0.6.0 (2015-8-20)
* Enhancements
* Support Plug v0.14
## v0.5.1 (2015-8-12)
* Enhancements
* router extend support
* Bugfix
* resolved deprecated functions warning
## v0.5.0 (2015-7-23)
* Enhancements
* rewrite Versioning
* return variable itself when present options hasn't `:with` key
* add Maru.version
## v0.4.1 (2015-7-18)
* Enhancements
* print log info when start maru http/https server
* complex path like ":params" within namespace
## v0.4.0 (2015-7-9)
* Enhancements
* Support Plug v0.13
* add Maru.Test
* redirect DSL
## v0.3.1 (2015-7-2)
* Enhancements
* status DSL
* rescue_from DSL
* present DSL
* Maru.Response procotol
* Deprecations
* json/1, json/2, html/1, html/2, text/1, text/2 is deprecated in favor of returning data directly.
* error/2 is deprecated in favor of rescue\_from/2 and rescue\_from/3.
* Bugfix
* param value replaced by identical param keys in group [#5](https://github.com/falood/maru/issues/5).
## v0.3.0 (2015-6-2)
* Enhancements
* Support Plug v0.12
* Update to poison v1.4.0
## v0.2.10 (2015-6-1)
* Enhancements
* Support reusable params by `use` DSL within `params`.
* readd Maru.Middleware
* Bugfix
* resolved params unused warning
| {
"content_hash": "630d7e653cb35ab801af5b3f67022239",
"timestamp": "",
"source": "github",
"line_count": 183,
"max_line_length": 136,
"avg_line_length": 23.540983606557376,
"alnum_prop": 0.6896471680594243,
"repo_name": "Cifer-Y/maru",
"id": "d742b2f57fc9c4205c12f2f552b284d9e596fbc1",
"size": "4322",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "CHANGELOG.md",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "Elixir",
"bytes": "101063"
}
],
"symlink_target": ""
} |
<?php
namespace Chamilo\Application\Weblcms\Integration\Chamilo\Core\Home\Type;
use Chamilo\Application\Weblcms\Course\Storage\DataManager as CourseDataManager;
use Chamilo\Application\Weblcms\Integration\Chamilo\Core\Home\Block;
use Chamilo\Application\Weblcms\Integration\Chamilo\Core\Home\NewBlock;
use Chamilo\Application\Weblcms\Storage\DataClass\ContentObjectPublication;
use Chamilo\Core\Home\Interfaces\AsynchronousBlockInterface;
use Chamilo\Core\Repository\ContentObject\Assignment\Storage\DataClass\Assignment;
use Chamilo\Core\Repository\Storage\DataClass\ContentObject;
use Chamilo\Libraries\Architecture\Application\Application;
use Chamilo\Libraries\File\Redirect;
use Chamilo\Libraries\Storage\Parameters\DataClassRetrievesParameters;
use Chamilo\Libraries\Storage\Query\Condition\AndCondition;
use Chamilo\Libraries\Storage\Query\Condition\EqualityCondition;
use Chamilo\Libraries\Storage\Query\Condition\InCondition;
use Chamilo\Libraries\Storage\Query\Condition\SubselectCondition;
use Chamilo\Libraries\Storage\Query\OrderBy;
use Chamilo\Libraries\Storage\Query\Variable\PropertyConditionVariable;
use Chamilo\Libraries\Storage\Query\Variable\StaticConditionVariable;
use Chamilo\Libraries\Translation\Translation;
use Chamilo\Libraries\Utilities\DatetimeUtilities;
use Chamilo\Libraries\Utilities\Utilities;
/**
* A notificationblock for new assignment submissions (assignmenttool)
*/
class EndingAssignments extends Block implements AsynchronousBlockInterface
{
public function displayContent()
{
// deadline min 1 week (60 * 60 * 24 * 7)
$deadline = time() + 604800;
$courses = CourseDataManager::retrieve_all_courses_from_user($this->getUser());
while ($course = $courses->next_result())
{
$course_ids[$course->get_id()] = $course->get_id();
}
$conditions = array();
$conditions[] = new InCondition(
new PropertyConditionVariable(
\Chamilo\Application\Weblcms\Storage\DataClass\ContentObjectPublication::class_name(),
\Chamilo\Application\Weblcms\Storage\DataClass\ContentObjectPublication::PROPERTY_COURSE_ID
),
$course_ids
);
$conditions[] = new EqualityCondition(
new PropertyConditionVariable(
\Chamilo\Application\Weblcms\Storage\DataClass\ContentObjectPublication::class_name(),
\Chamilo\Application\Weblcms\Storage\DataClass\ContentObjectPublication::PROPERTY_TOOL
),
new StaticConditionVariable('assignment')
);
$subselect_condition = new EqualityCondition(
new PropertyConditionVariable(ContentObject::class_name(), ContentObject::PROPERTY_TYPE),
new StaticConditionVariable(Assignment::class_name())
);
$conditions[] = new SubselectCondition(
new PropertyConditionVariable(
ContentObjectPublication::class_name(),
ContentObjectPublication::PROPERTY_CONTENT_OBJECT_ID
),
new PropertyConditionVariable(ContentObject::class_name(), ContentObject::PROPERTY_ID),
null,
$subselect_condition
);
$condition = new AndCondition($conditions);
$publications = \Chamilo\Application\Weblcms\Storage\DataManager::retrieves(
ContentObjectPublication::class_name(),
new DataClassRetrievesParameters(
$condition,
null,
null,
array(
new OrderBy(
new PropertyConditionVariable(
\Chamilo\Application\Weblcms\Storage\DataClass\ContentObjectPublication::class_name(),
\Chamilo\Application\Weblcms\Storage\DataClass\ContentObjectPublication::PROPERTY_DISPLAY_ORDER_INDEX
)
)
)
)
)->as_array();
$ending_assignments = array();
foreach ($publications as $publication)
{
$assignment = $publication->get_content_object();
if ($assignment->get_end_time() > time() && $assignment->get_end_time() < $deadline)
{
$parameters = array(
\Chamilo\Application\Weblcms\Manager::PARAM_COURSE => $publication->get_course_id(),
Application::PARAM_CONTEXT => \Chamilo\Application\Weblcms\Manager::context(),
Application::PARAM_ACTION => \Chamilo\Application\Weblcms\Manager::ACTION_VIEW_COURSE,
\Chamilo\Application\Weblcms\Manager::PARAM_TOOL => NewBlock::TOOL_ASSIGNMENT,
\Chamilo\Application\Weblcms\Manager::PARAM_TOOL_ACTION => \Chamilo\Application\Weblcms\Tool\Implementation\Assignment\Manager::ACTION_DISPLAY,
\Chamilo\Application\Weblcms\Tool\Manager::PARAM_PUBLICATION_ID => $publication->get_id()
);
$redirect = new Redirect($parameters);
$link = $redirect->getUrl();
$ending_assignments[$assignment->get_end_time() . ' ' . $publication->get_id()] = array(
'title' => $assignment->get_title(),
'link' => $link,
'end_time' => $assignment->get_end_time()
);
}
}
ksort($ending_assignments);
$html = $this->displayNewItems($ending_assignments);
if (count($html) == 0)
{
return Translation::get('NoAssignmentsEndComingWeek');
}
return implode(PHP_EOL, $html);
}
public function displayNewItems($items)
{
$html = array();
foreach ($items as $item)
{
$end_date = DatetimeUtilities::format_locale_date(
Translation::get('DateFormatShort', null, Utilities::COMMON_LIBRARIES) . ', ' . Translation::get(
'TimeNoSecFormat',
null,
Utilities::COMMON_LIBRARIES
),
$item['end_time']
);
$html[] = '<a href="' . $item['link'] . '">' . $item['title'] . '</a>: ' . Translation::get('Until') . ' ' .
$end_date . '<br />';
}
return $html;
}
}
| {
"content_hash": "bd2c2d2413c75ffa661bba0b2df57390",
"timestamp": "",
"source": "github",
"line_count": 150,
"max_line_length": 163,
"avg_line_length": 42.346666666666664,
"alnum_prop": 0.6212216624685138,
"repo_name": "forelo/cosnics",
"id": "a91f55f8818d5e44686a0bb1e80b644586026e50",
"size": "6352",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "src/Chamilo/Application/Weblcms/Integration/Chamilo/Core/Home/Type/EndingAssignments.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ActionScript",
"bytes": "262730"
},
{
"name": "C",
"bytes": "12354"
},
{
"name": "CSS",
"bytes": "1334431"
},
{
"name": "CoffeeScript",
"bytes": "41023"
},
{
"name": "Gherkin",
"bytes": "24033"
},
{
"name": "HTML",
"bytes": "1016812"
},
{
"name": "Hack",
"bytes": "424"
},
{
"name": "JavaScript",
"bytes": "10768095"
},
{
"name": "Less",
"bytes": "331253"
},
{
"name": "Makefile",
"bytes": "3221"
},
{
"name": "PHP",
"bytes": "23623996"
},
{
"name": "Python",
"bytes": "2408"
},
{
"name": "Ruby",
"bytes": "618"
},
{
"name": "SCSS",
"bytes": "163532"
},
{
"name": "Shell",
"bytes": "7965"
},
{
"name": "Smarty",
"bytes": "15750"
},
{
"name": "Twig",
"bytes": "388197"
},
{
"name": "TypeScript",
"bytes": "123212"
},
{
"name": "Vue",
"bytes": "454138"
},
{
"name": "XSLT",
"bytes": "43009"
}
],
"symlink_target": ""
} |
"use strict";
Object.defineProperty(exports, '__esModule', {
value: true
});
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var _base_input = require('./base_input');
var _base_input2 = _interopRequireDefault(_base_input);
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
var _underscore = require('underscore');
var _underscore2 = _interopRequireDefault(_underscore);
var HiddenInput = (function (_BaseInput) {
_inherits(HiddenInput, _BaseInput);
function HiddenInput(props) {
_classCallCheck(this, HiddenInput);
_get(Object.getPrototypeOf(HiddenInput.prototype), 'constructor', this).call(this, props);
}
_createClass(HiddenInput, [{
key: 'render',
value: function render() {
return _react2['default'].createElement('input', {
className: this.props.classes,
onChange: this.debouncedChange,
onBlur: this.onBlur,
type: 'hidden',
ref: this.props.name,
name: this.props.name,
defaultValue: this.props.defaultValue,
placeholder: this.props.placeholder
});
}
}]);
return HiddenInput;
})(_base_input2['default']);
exports['default'] = HiddenInput;
module.exports = exports['default']; | {
"content_hash": "3a1b75445c7e572840a75c3a1ba632c3",
"timestamp": "",
"source": "github",
"line_count": 58,
"max_line_length": 667,
"avg_line_length": 54.6551724137931,
"alnum_prop": 0.6971608832807571,
"repo_name": "Legitcode/forms",
"id": "b8b7839861fc23ea7ba8f6e04d14d95c02257222",
"size": "3170",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "lib/controls/hidden_input.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "13446"
},
{
"name": "HTML",
"bytes": "1684"
},
{
"name": "JavaScript",
"bytes": "174193"
},
{
"name": "Makefile",
"bytes": "135"
}
],
"symlink_target": ""
} |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>User agent detail - Mozilla/4.0 (compatible; MSIE 4.01; AOL 4.0; Mac_68K)</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/css/materialize.min.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="../circle.css" rel="stylesheet">
</head>
<body>
<div class="container">
<div class="section">
<h1 class="header center orange-text">User agent detail</h1>
<div class="row center">
<h5 class="header light">
Mozilla/4.0 (compatible; MSIE 4.01; AOL 4.0; Mac_68K)
</h5>
</div>
</div>
<div class="section">
<table class="striped"><tr><th></th><th colspan="3">General</th><th colspan="5">Device</th><th colspan="3">Bot</th><th colspan="2"></th></tr><tr><th>Provider</th><th>Browser</th><th>Engine</th><th>OS</th><th>Brand</th><th>Model</th><th>Type</th><th>Is mobile</th><th>Is touch</th><th>Is bot</th><th>Name</th><th>Type</th><th>Parse time</th><th>Actions</th></tr><tr><th colspan="14" class="green lighten-3">Test suite</th></tr><tr><td>Browscap<br /><small>6014</small><br /><small>vendor/browscap/browscap/tests/fixtures/issues/issue-900.php</small></td><td>IE 4.01</td><td>Tasman unknown</td><td>Mac68K unknown</td><td style="border-left: 1px solid #555">Apple</td><td>Macintosh</td><td>Desktop</td><td></td><td></td><td style="border-left: 1px solid #555"></td><td></td><td></td><td>0</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-b3ace57b-0c56-4fa0-aa1d-8ee4ba0e42c7">Detail</a>
<!-- Modal Structure -->
<div id="modal-b3ace57b-0c56-4fa0-aa1d-8ee4ba0e42c7" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>Browscap result detail</h4>
<p><pre><code class="php">Array
(
[Comment] => IE 4.01
[Browser] => IE
[Browser_Type] => Browser
[Browser_Bits] => 32
[Browser_Maker] => Microsoft Corporation
[Browser_Modus] => unknown
[Version] => 4.01
[MajorVer] => 4
[MinorVer] => 01
[Platform] => Mac68K
[Platform_Version] => unknown
[Platform_Description] => Mac OS for Motorola 68000 Series
[Platform_Bits] => 32
[Platform_Maker] => Apple Inc
[Alpha] =>
[Beta] =>
[Win16] =>
[Win32] =>
[Win64] =>
[Frames] => 1
[IFrames] => 1
[Tables] => 1
[Cookies] => 1
[BackgroundSounds] =>
[JavaScript] => 1
[VBScript] =>
[JavaApplets] => 1
[ActiveXControls] =>
[isMobileDevice] =>
[isTablet] =>
[isSyndicationReader] =>
[Crawler] =>
[isFake] =>
[isAnonymized] =>
[isModified] =>
[CssVersion] => 1
[AolVersion] => 0
[Device_Name] => Macintosh
[Device_Maker] => Apple Inc
[Device_Type] => Desktop
[Device_Pointing_Method] => mouse
[Device_Code_Name] => Macintosh
[Device_Brand_Name] => Apple
[RenderingEngine_Name] => Tasman
[RenderingEngine_Version] => unknown
[RenderingEngine_Maker] => Apple Inc
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><th colspan="14" class="green lighten-3">Providers</th></tr><tr><td>BrowscapFull<br /><small>6014</small><br /></td><td>IE 4.01</td><td>Tasman </td><td>Mac68K </td><td style="border-left: 1px solid #555">Apple</td><td>Macintosh</td><td>Desktop</td><td></td><td></td><td style="border-left: 1px solid #555"></td><td></td><td></td><td>0.016</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-47a9cd06-e213-4882-bc34-db6aed664223">Detail</a>
<!-- Modal Structure -->
<div id="modal-47a9cd06-e213-4882-bc34-db6aed664223" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>BrowscapFull result detail</h4>
<p><pre><code class="php">stdClass Object
(
[browser_name_regex] => /^mozilla\/.* \(compatible; msie 4\.01.*;.*mac_68k.*$/
[browser_name_pattern] => mozilla/* (compatible; msie 4.01*;*mac_68k*
[parent] => IE 4.01
[comment] => IE 4.01
[browser] => IE
[browser_type] => Browser
[browser_bits] => 32
[browser_maker] => Microsoft Corporation
[browser_modus] => unknown
[version] => 4.01
[majorver] => 4
[minorver] => 01
[platform] => Mac68K
[platform_version] => unknown
[platform_description] => Mac OS for Motorola 68000 Series
[platform_bits] => 32
[platform_maker] => Apple Inc
[alpha] =>
[beta] =>
[win16] =>
[win32] =>
[win64] =>
[frames] => 1
[iframes] => 1
[tables] => 1
[cookies] => 1
[backgroundsounds] =>
[javascript] => 1
[vbscript] =>
[javaapplets] => 1
[activexcontrols] =>
[ismobiledevice] =>
[istablet] =>
[issyndicationreader] =>
[crawler] =>
[isfake] =>
[isanonymized] =>
[ismodified] =>
[cssversion] => 1
[aolversion] => 0
[device_name] => Macintosh
[device_maker] => Apple Inc
[device_type] => Desktop
[device_pointing_method] => mouse
[device_code_name] => Macintosh
[device_brand_name] => Apple
[renderingengine_name] => Tasman
[renderingengine_version] => unknown
[renderingengine_description] => For Internet Explorer 5 for Mac, Microsoft Office 2004 for Mac, and Microsoft Office 2008 for Mac.
[renderingengine_maker] => Apple Inc
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>BrowscapLite<br /><small>6014</small><br /></td>
<td colspan="12" class="center-align red lighten-1">
<strong>No result found</strong>
</td>
</tr><tr><td>BrowscapPhp<br /><small>6014</small><br /></td>
<td colspan="12" class="center-align red lighten-1">
<strong>No result found</strong>
</td>
</tr><tr><td>DonatjUAParser<br /><small>v0.5.1</small><br /></td><td>MSIE 4.01</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-15fbc1f0-2615-4d42-b5d9-a30dd647b050">Detail</a>
<!-- Modal Structure -->
<div id="modal-15fbc1f0-2615-4d42-b5d9-a30dd647b050" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>DonatjUAParser result detail</h4>
<p><pre><code class="php">Array
(
[platform] =>
[browser] => MSIE
[version] => 4.01
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>JenssegersAgent<br /><small>v2.3.3</small><br /></td><td>IE 4.01</td><td><i class="material-icons">close</i></td><td> </td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.001</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-b85a2b91-6a55-4436-a82c-1ea0d46e2e51">Detail</a>
<!-- Modal Structure -->
<div id="modal-b85a2b91-6a55-4436-a82c-1ea0d46e2e51" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>JenssegersAgent result detail</h4>
<p><pre><code class="php">Array
(
[browserName] => IE
[browserVersion] => 4.01
[osName] =>
[osVersion] =>
[deviceModel] =>
[isMobile] =>
[isRobot] =>
[botName] =>
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>NeutrinoApiCom<br /><small></small><br /></td><td>AOL Explorer 4.0</td><td><i class="material-icons">close</i></td><td> </td><td style="border-left: 1px solid #555"></td><td></td><td>desktop-browser</td><td></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.21001</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-8c2a7a4e-3fbf-4df2-8d61-5e730422f67b">Detail</a>
<!-- Modal Structure -->
<div id="modal-8c2a7a4e-3fbf-4df2-8d61-5e730422f67b" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>NeutrinoApiCom result detail</h4>
<p><pre><code class="php">stdClass Object
(
[mobile_screen_height] => 0
[is_mobile] =>
[type] => desktop-browser
[mobile_brand] =>
[mobile_model] =>
[version] => 4.0
[is_android] =>
[browser_name] => AOL Explorer
[operating_system_family] => unknown
[operating_system_version] =>
[is_ios] =>
[producer] => America Online, Inc.
[operating_system] => unknown
[mobile_screen_width] => 0
[mobile_browser] =>
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>PiwikDeviceDetector<br /><small>3.6.1</small><br /></td><td>Internet Explorer 4.01</td><td>Trident </td><td> </td><td style="border-left: 1px solid #555"></td><td></td><td></td><td></td><td></td><td style="border-left: 1px solid #555"></td><td></td><td></td><td>0.003</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-4a941d34-a8d3-4914-9724-346f60ad7046">Detail</a>
<!-- Modal Structure -->
<div id="modal-4a941d34-a8d3-4914-9724-346f60ad7046" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>PiwikDeviceDetector result detail</h4>
<p><pre><code class="php">Array
(
[client] => Array
(
[type] => browser
[name] => Internet Explorer
[short_name] => IE
[version] => 4.01
[engine] => Trident
)
[operatingSystem] => Array
(
)
[device] => Array
(
[brand] =>
[brandName] =>
[model] =>
[device] =>
[deviceName] =>
)
[bot] =>
[extra] => Array
(
[isBot] =>
[isBrowser] => 1
[isFeedReader] =>
[isMobileApp] =>
[isPIM] =>
[isLibrary] =>
[isMediaPlayer] =>
[isCamera] =>
[isCarBrowser] =>
[isConsole] =>
[isFeaturePhone] =>
[isPhablet] =>
[isPortableMediaPlayer] =>
[isSmartDisplay] =>
[isSmartphone] =>
[isTablet] =>
[isTV] =>
[isDesktop] =>
[isMobile] =>
[isTouchEnabled] =>
)
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>SinergiBrowserDetector<br /><small>6.0.1</small><br /></td><td>Internet Explorer 4.01</td><td><i class="material-icons">close</i></td><td> </td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td></td><td><i class="material-icons">close</i></td><td></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-ec1cd248-02b0-457e-8a9d-35bb99af008c">Detail</a>
<!-- Modal Structure -->
<div id="modal-ec1cd248-02b0-457e-8a9d-35bb99af008c" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>SinergiBrowserDetector result detail</h4>
<p><pre><code class="php">Array
(
[browser] => Sinergi\BrowserDetector\Browser Object
(
[userAgent:Sinergi\BrowserDetector\Browser:private] => Sinergi\BrowserDetector\UserAgent Object
(
[userAgentString:Sinergi\BrowserDetector\UserAgent:private] => Mozilla/4.0 (compatible; MSIE 4.01; AOL 4.0; Mac_68K)
)
[name:Sinergi\BrowserDetector\Browser:private] => Internet Explorer
[version:Sinergi\BrowserDetector\Browser:private] => 4.01
[isRobot:Sinergi\BrowserDetector\Browser:private] =>
[isChromeFrame:Sinergi\BrowserDetector\Browser:private] =>
[isFacebookWebView:Sinergi\BrowserDetector\Browser:private] =>
[isCompatibilityMode:Sinergi\BrowserDetector\Browser:private] =>
)
[operatingSystem] => Sinergi\BrowserDetector\Os Object
(
[name:Sinergi\BrowserDetector\Os:private] => unknown
[version:Sinergi\BrowserDetector\Os:private] => unknown
[isMobile:Sinergi\BrowserDetector\Os:private] =>
[userAgent:Sinergi\BrowserDetector\Os:private] => Sinergi\BrowserDetector\UserAgent Object
(
[userAgentString:Sinergi\BrowserDetector\UserAgent:private] => Mozilla/4.0 (compatible; MSIE 4.01; AOL 4.0; Mac_68K)
)
)
[device] => Sinergi\BrowserDetector\Device Object
(
[name:Sinergi\BrowserDetector\Device:private] => unknown
[userAgent:Sinergi\BrowserDetector\Device:private] => Sinergi\BrowserDetector\UserAgent Object
(
[userAgentString:Sinergi\BrowserDetector\UserAgent:private] => Mozilla/4.0 (compatible; MSIE 4.01; AOL 4.0; Mac_68K)
)
)
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>UAParser<br /><small>v3.4.5</small><br /></td><td>IE 4.1</td><td><i class="material-icons">close</i></td><td> </td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.009</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-3160e405-8a8f-46dd-8f47-5115f06462d2">Detail</a>
<!-- Modal Structure -->
<div id="modal-3160e405-8a8f-46dd-8f47-5115f06462d2" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>UAParser result detail</h4>
<p><pre><code class="php">UAParser\Result\Client Object
(
[ua] => UAParser\Result\UserAgent Object
(
[major] => 4
[minor] => 01
[patch] =>
[family] => IE
)
[os] => UAParser\Result\OperatingSystem Object
(
[major] =>
[minor] =>
[patch] =>
[patchMinor] =>
[family] => Other
)
[device] => UAParser\Result\Device Object
(
[brand] =>
[model] =>
[family] => Other
)
[originalUserAgent] => Mozilla/4.0 (compatible; MSIE 4.01; AOL 4.0; Mac_68K)
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>UserAgentApiCom<br /><small></small><br /></td>
<td colspan="12" class="center-align red lighten-1">
<strong>No result found</strong>
</td>
</tr><tr><td>UserAgentStringCom<br /><small></small><br /></td><td>AOL 4.0</td><td><i class="material-icons">close</i></td><td>Macintosh </td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td></td><td>0.065</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-08a9ddfb-838f-48d7-9ede-1d132306b2ee">Detail</a>
<!-- Modal Structure -->
<div id="modal-08a9ddfb-838f-48d7-9ede-1d132306b2ee" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>UserAgentStringCom result detail</h4>
<p><pre><code class="php">stdClass Object
(
[agent_type] => Browser
[agent_name] => AOL
[agent_version] => 4.0
[os_type] => Macintosh
[os_name] => Macintosh
[os_versionName] =>
[os_versionNumber] =>
[os_producer] =>
[os_producerURL] =>
[linux_distibution] => Null
[agent_language] =>
[agent_languageTag] =>
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>WhatIsMyBrowserCom<br /><small></small><br /></td><td>Internet Explorer 4.1</td><td>Trident </td><td> </td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0.25001</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-5fc1ff22-a74d-481b-9ad1-fcfde73ded9c">Detail</a>
<!-- Modal Structure -->
<div id="modal-5fc1ff22-a74d-481b-9ad1-fcfde73ded9c" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>WhatIsMyBrowserCom result detail</h4>
<p><pre><code class="php">stdClass Object
(
[operating_system_name] =>
[simple_sub_description_string] =>
[simple_browser_string] => Internet Explorer 4
[browser_version] => 4
[extra_info] => Array
(
)
[operating_platform] =>
[extra_info_table] => Array
(
)
[layout_engine_name] => Trident
[detected_addons] => Array
(
[0] => America Online v4
)
[operating_system_flavour_code] =>
[hardware_architecture] =>
[operating_system_flavour] =>
[operating_system_frameworks] => Array
(
)
[browser_name_code] => internet-explorer
[operating_system_version] =>
[simple_operating_platform_string] =>
[is_abusive] =>
[layout_engine_version] =>
[browser_capabilities] => Array
(
)
[operating_platform_vendor_name] =>
[operating_system] =>
[operating_system_version_full] =>
[operating_platform_code] =>
[browser_name] => Internet Explorer
[operating_system_name_code] =>
[user_agent] => Mozilla/4.0 (compatible; MSIE 4.01; AOL 4.0; Mac_68K)
[browser_version_full] => 4.1
[browser] => Internet Explorer 4
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>WhichBrowser<br /><small>v2.0.18</small><br /></td><td>Internet Explorer 4.0.1</td><td>Tasman </td><td>Mac OS </td><td style="border-left: 1px solid #555"></td><td></td><td>desktop</td><td></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.004</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-083a336f-5d73-4505-84f3-c5fc9bb78652">Detail</a>
<!-- Modal Structure -->
<div id="modal-083a336f-5d73-4505-84f3-c5fc9bb78652" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>WhichBrowser result detail</h4>
<p><pre><code class="php">Array
(
[browser] => Array
(
[name] => Internet Explorer
[version] => 4.0.1
[type] => browser
)
[engine] => Array
(
[name] => Tasman
)
[os] => Array
(
[name] => Mac OS
)
[device] => Array
(
[type] => desktop
)
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>Woothee<br /><small>v1.2.0</small><br /></td><td>Internet Explorer 4.01</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.001</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-f00e7198-0e22-49fe-bad0-dbb3a9cde9b9">Detail</a>
<!-- Modal Structure -->
<div id="modal-f00e7198-0e22-49fe-bad0-dbb3a9cde9b9" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>Woothee result detail</h4>
<p><pre><code class="php">Array
(
[name] => Internet Explorer
[vendor] => Microsoft
[version] => 4.01
[category] => UNKNOWN
[os] => UNKNOWN
[os_version] => UNKNOWN
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>Wurfl<br /><small>1.7.1.0</small><br /></td><td> </td><td><i class="material-icons">close</i></td><td> </td><td style="border-left: 1px solid #555"></td><td></td><td>Desktop</td><td></td><td></td><td style="border-left: 1px solid #555"></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0.017</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-a2bedf8c-4a95-42a7-96c5-aaf233b2ac50">Detail</a>
<!-- Modal Structure -->
<div id="modal-a2bedf8c-4a95-42a7-96c5-aaf233b2ac50" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>Wurfl result detail</h4>
<p><pre><code class="php">Array
(
[virtual] => Array
(
[is_android] => false
[is_ios] => false
[is_windows_phone] => false
[is_app] => false
[is_full_desktop] => true
[is_largescreen] => true
[is_mobile] => false
[is_robot] => false
[is_smartphone] => false
[is_touchscreen] => false
[is_wml_preferred] => false
[is_xhtmlmp_preferred] => false
[is_html_preferred] => true
[advertised_device_os] =>
[advertised_device_os_version] =>
[advertised_browser] =>
[advertised_browser_version] =>
[complete_device_name] => Microsoft Internet Explorer
[device_name] => Microsoft Internet Explorer
[form_factor] => Desktop
[is_phone] => false
[is_app_webview] => false
)
[all] => Array
(
[brand_name] => Microsoft
[model_name] => Internet Explorer
[unique] => true
[ununiqueness_handler] =>
[is_wireless_device] => false
[device_claims_web_support] => true
[has_qwerty_keyboard] => true
[can_skip_aligned_link_row] => true
[uaprof] =>
[uaprof2] =>
[uaprof3] =>
[nokia_series] => 0
[nokia_edition] => 0
[device_os] => Desktop
[mobile_browser] => MSIE
[mobile_browser_version] => 4.0
[device_os_version] =>
[pointing_method] => mouse
[release_date] => 1997_september
[marketing_name] =>
[model_extra_info] =>
[nokia_feature_pack] => 0
[can_assign_phone_number] => false
[is_tablet] => false
[manufacturer_name] =>
[is_bot] => false
[is_google_glass] => false
[proportional_font] => false
[built_in_back_button_support] => false
[card_title_support] => false
[softkey_support] => false
[table_support] => false
[numbered_menus] => false
[menu_with_select_element_recommended] => false
[menu_with_list_of_links_recommended] => false
[icons_on_menu_items_support] => false
[break_list_of_links_with_br_element_recommended] => false
[access_key_support] => false
[wrap_mode_support] => false
[times_square_mode_support] => false
[deck_prefetch_support] => false
[elective_forms_recommended] => false
[wizards_recommended] => false
[image_as_link_support] => false
[insert_br_element_after_widget_recommended] => false
[wml_can_display_images_and_text_on_same_line] => false
[wml_displays_image_in_center] => false
[opwv_wml_extensions_support] => false
[wml_make_phone_call_string] => none
[chtml_display_accesskey] => false
[emoji] => false
[chtml_can_display_images_and_text_on_same_line] => false
[chtml_displays_image_in_center] => false
[imode_region] => none
[chtml_make_phone_call_string] => tel:
[chtml_table_support] => true
[xhtml_honors_bgcolor] => true
[xhtml_supports_forms_in_table] => true
[xhtml_support_wml2_namespace] => false
[xhtml_autoexpand_select] => false
[xhtml_select_as_dropdown] => true
[xhtml_select_as_radiobutton] => true
[xhtml_select_as_popup] => true
[xhtml_display_accesskey] => false
[xhtml_supports_invisible_text] => false
[xhtml_supports_inline_input] => false
[xhtml_supports_monospace_font] => false
[xhtml_supports_table_for_layout] => false
[xhtml_supports_css_cell_table_coloring] => false
[xhtml_format_as_css_property] => false
[xhtml_format_as_attribute] => false
[xhtml_nowrap_mode] => false
[xhtml_marquee_as_css_property] => false
[xhtml_readable_background_color1] => #FFFFFF
[xhtml_readable_background_color2] => #FFFFFF
[xhtml_allows_disabled_form_elements] => false
[xhtml_document_title_support] => true
[xhtml_preferred_charset] => utf8
[opwv_xhtml_extensions_support] => false
[xhtml_make_phone_call_string] => none
[xhtmlmp_preferred_mime_type] => text/html
[xhtml_table_support] => false
[xhtml_send_sms_string] => none
[xhtml_send_mms_string] => none
[xhtml_file_upload] => supported
[cookie_support] => true
[accept_third_party_cookie] => true
[xhtml_supports_iframe] => full
[xhtml_avoid_accesskeys] => true
[xhtml_can_embed_video] => play_and_stop
[ajax_support_javascript] => true
[ajax_manipulate_css] => true
[ajax_support_getelementbyid] => true
[ajax_support_inner_html] => true
[ajax_xhr_type] => standard
[ajax_manipulate_dom] => true
[ajax_support_events] => true
[ajax_support_event_listener] => true
[ajax_preferred_geoloc_api] => none
[xhtml_support_level] => 4
[preferred_markup] => html_web_4_0
[wml_1_1] => false
[wml_1_2] => false
[wml_1_3] => false
[html_wi_w3_xhtmlbasic] => true
[html_wi_oma_xhtmlmp_1_0] => false
[html_wi_imode_html_1] => false
[html_wi_imode_html_2] => false
[html_wi_imode_html_3] => false
[html_wi_imode_html_4] => false
[html_wi_imode_html_5] => false
[html_wi_imode_htmlx_1] => false
[html_wi_imode_htmlx_1_1] => false
[html_wi_imode_compact_generic] => false
[html_web_3_2] => true
[html_web_4_0] => true
[voicexml] => false
[multipart_support] => false
[total_cache_disable_support] => false
[time_to_live_support] => false
[resolution_width] => 800
[resolution_height] => 600
[columns] => 120
[max_image_width] => 800
[max_image_height] => 600
[rows] => 200
[physical_screen_width] => 400
[physical_screen_height] => 400
[dual_orientation] => false
[density_class] => 1.0
[wbmp] => false
[bmp] => true
[epoc_bmp] => false
[gif_animated] => true
[jpg] => true
[png] => true
[tiff] => false
[transparent_png_alpha] => false
[transparent_png_index] => false
[svgt_1_1] => false
[svgt_1_1_plus] => false
[greyscale] => false
[gif] => true
[colors] => 65536
[webp_lossy_support] => false
[webp_lossless_support] => false
[post_method_support] => true
[basic_authentication_support] => true
[empty_option_value_support] => true
[emptyok] => false
[nokia_voice_call] => false
[wta_voice_call] => false
[wta_phonebook] => false
[wta_misc] => false
[wta_pdc] => false
[https_support] => true
[phone_id_provided] => false
[max_data_rate] => 3200
[wifi] => true
[sdio] => false
[vpn] => false
[has_cellular_radio] => false
[max_deck_size] => 100000
[max_url_length_in_requests] => 128
[max_url_length_homepage] => 0
[max_url_length_bookmark] => 0
[max_url_length_cached_page] => 0
[max_no_of_connection_settings] => 0
[max_no_of_bookmarks] => 0
[max_length_of_username] => 0
[max_length_of_password] => 0
[max_object_size] => 0
[downloadfun_support] => false
[directdownload_support] => false
[inline_support] => false
[oma_support] => false
[ringtone] => false
[ringtone_3gpp] => false
[ringtone_midi_monophonic] => false
[ringtone_midi_polyphonic] => false
[ringtone_imelody] => false
[ringtone_digiplug] => false
[ringtone_compactmidi] => false
[ringtone_mmf] => false
[ringtone_rmf] => false
[ringtone_xmf] => false
[ringtone_amr] => false
[ringtone_awb] => false
[ringtone_aac] => false
[ringtone_wav] => false
[ringtone_mp3] => false
[ringtone_spmidi] => false
[ringtone_qcelp] => false
[ringtone_voices] => 1
[ringtone_df_size_limit] => 0
[ringtone_directdownload_size_limit] => 0
[ringtone_inline_size_limit] => 0
[ringtone_oma_size_limit] => 0
[wallpaper] => false
[wallpaper_max_width] => 0
[wallpaper_max_height] => 0
[wallpaper_preferred_width] => 0
[wallpaper_preferred_height] => 0
[wallpaper_resize] => none
[wallpaper_wbmp] => false
[wallpaper_bmp] => false
[wallpaper_gif] => false
[wallpaper_jpg] => false
[wallpaper_png] => false
[wallpaper_tiff] => false
[wallpaper_greyscale] => false
[wallpaper_colors] => 2
[wallpaper_df_size_limit] => 0
[wallpaper_directdownload_size_limit] => 0
[wallpaper_inline_size_limit] => 0
[wallpaper_oma_size_limit] => 0
[screensaver] => false
[screensaver_max_width] => 0
[screensaver_max_height] => 0
[screensaver_preferred_width] => 0
[screensaver_preferred_height] => 0
[screensaver_resize] => none
[screensaver_wbmp] => false
[screensaver_bmp] => false
[screensaver_gif] => false
[screensaver_jpg] => false
[screensaver_png] => false
[screensaver_greyscale] => false
[screensaver_colors] => 2
[screensaver_df_size_limit] => 0
[screensaver_directdownload_size_limit] => 0
[screensaver_inline_size_limit] => 0
[screensaver_oma_size_limit] => 0
[picture] => false
[picture_max_width] => 0
[picture_max_height] => 0
[picture_preferred_width] => 0
[picture_preferred_height] => 0
[picture_resize] => none
[picture_wbmp] => false
[picture_bmp] => false
[picture_gif] => false
[picture_jpg] => false
[picture_png] => false
[picture_greyscale] => false
[picture_colors] => 2
[picture_df_size_limit] => 0
[picture_directdownload_size_limit] => 0
[picture_inline_size_limit] => 0
[picture_oma_size_limit] => 0
[video] => false
[oma_v_1_0_forwardlock] => false
[oma_v_1_0_combined_delivery] => false
[oma_v_1_0_separate_delivery] => false
[streaming_video] => false
[streaming_3gpp] => false
[streaming_mp4] => false
[streaming_mov] => false
[streaming_video_size_limit] => 0
[streaming_real_media] => none
[streaming_flv] => false
[streaming_3g2] => false
[streaming_vcodec_h263_0] => -1
[streaming_vcodec_h263_3] => -1
[streaming_vcodec_mpeg4_sp] => -1
[streaming_vcodec_mpeg4_asp] => -1
[streaming_vcodec_h264_bp] => -1
[streaming_acodec_amr] => none
[streaming_acodec_aac] => none
[streaming_wmv] => none
[streaming_preferred_protocol] => rtsp
[streaming_preferred_http_protocol] => none
[wap_push_support] => false
[connectionless_service_indication] => false
[connectionless_service_load] => false
[connectionless_cache_operation] => false
[connectionoriented_unconfirmed_service_indication] => false
[connectionoriented_unconfirmed_service_load] => false
[connectionoriented_unconfirmed_cache_operation] => false
[connectionoriented_confirmed_service_indication] => false
[connectionoriented_confirmed_service_load] => false
[connectionoriented_confirmed_cache_operation] => false
[utf8_support] => true
[ascii_support] => false
[iso8859_support] => false
[expiration_date] => false
[j2me_cldc_1_0] => false
[j2me_cldc_1_1] => false
[j2me_midp_1_0] => false
[j2me_midp_2_0] => false
[doja_1_0] => false
[doja_1_5] => false
[doja_2_0] => false
[doja_2_1] => false
[doja_2_2] => false
[doja_3_0] => false
[doja_3_5] => false
[doja_4_0] => false
[j2me_jtwi] => false
[j2me_mmapi_1_0] => false
[j2me_mmapi_1_1] => false
[j2me_wmapi_1_0] => false
[j2me_wmapi_1_1] => false
[j2me_wmapi_2_0] => false
[j2me_btapi] => false
[j2me_3dapi] => false
[j2me_locapi] => false
[j2me_nokia_ui] => false
[j2me_motorola_lwt] => false
[j2me_siemens_color_game] => false
[j2me_siemens_extension] => false
[j2me_heap_size] => 0
[j2me_max_jar_size] => 0
[j2me_storage_size] => 0
[j2me_max_record_store_size] => 0
[j2me_screen_width] => 0
[j2me_screen_height] => 0
[j2me_canvas_width] => 0
[j2me_canvas_height] => 0
[j2me_bits_per_pixel] => 0
[j2me_audio_capture_enabled] => false
[j2me_video_capture_enabled] => false
[j2me_photo_capture_enabled] => false
[j2me_capture_image_formats] => none
[j2me_http] => false
[j2me_https] => false
[j2me_socket] => false
[j2me_udp] => false
[j2me_serial] => false
[j2me_gif] => false
[j2me_gif89a] => false
[j2me_jpg] => false
[j2me_png] => false
[j2me_bmp] => false
[j2me_bmp3] => false
[j2me_wbmp] => false
[j2me_midi] => false
[j2me_wav] => false
[j2me_amr] => false
[j2me_mp3] => false
[j2me_mp4] => false
[j2me_imelody] => false
[j2me_rmf] => false
[j2me_au] => false
[j2me_aac] => false
[j2me_realaudio] => false
[j2me_xmf] => false
[j2me_wma] => false
[j2me_3gpp] => false
[j2me_h263] => false
[j2me_svgt] => false
[j2me_mpeg4] => false
[j2me_realvideo] => false
[j2me_real8] => false
[j2me_realmedia] => false
[j2me_left_softkey_code] => 0
[j2me_right_softkey_code] => 0
[j2me_middle_softkey_code] => 0
[j2me_select_key_code] => 0
[j2me_return_key_code] => 0
[j2me_clear_key_code] => 0
[j2me_datefield_no_accepts_null_date] => false
[j2me_datefield_broken] => false
[receiver] => false
[sender] => false
[mms_max_size] => 0
[mms_max_height] => 0
[mms_max_width] => 0
[built_in_recorder] => false
[built_in_camera] => false
[mms_jpeg_baseline] => false
[mms_jpeg_progressive] => false
[mms_gif_static] => false
[mms_gif_animated] => false
[mms_png] => false
[mms_bmp] => false
[mms_wbmp] => false
[mms_amr] => false
[mms_wav] => false
[mms_midi_monophonic] => false
[mms_midi_polyphonic] => false
[mms_midi_polyphonic_voices] => 0
[mms_spmidi] => false
[mms_mmf] => false
[mms_mp3] => false
[mms_evrc] => false
[mms_qcelp] => false
[mms_ota_bitmap] => false
[mms_nokia_wallpaper] => false
[mms_nokia_operatorlogo] => false
[mms_nokia_3dscreensaver] => false
[mms_nokia_ringingtone] => false
[mms_rmf] => false
[mms_xmf] => false
[mms_symbian_install] => false
[mms_jar] => false
[mms_jad] => false
[mms_vcard] => false
[mms_vcalendar] => false
[mms_wml] => false
[mms_wbxml] => false
[mms_wmlc] => false
[mms_video] => false
[mms_mp4] => false
[mms_3gpp] => false
[mms_3gpp2] => false
[mms_max_frame_rate] => 0
[nokiaring] => false
[picturemessage] => false
[operatorlogo] => false
[largeoperatorlogo] => false
[callericon] => false
[nokiavcard] => false
[nokiavcal] => false
[sckl_ringtone] => false
[sckl_operatorlogo] => false
[sckl_groupgraphic] => false
[sckl_vcard] => false
[sckl_vcalendar] => false
[text_imelody] => false
[ems] => false
[ems_variablesizedpictures] => false
[ems_imelody] => false
[ems_odi] => false
[ems_upi] => false
[ems_version] => 0
[siemens_ota] => false
[siemens_logo_width] => 101
[siemens_logo_height] => 29
[siemens_screensaver_width] => 101
[siemens_screensaver_height] => 50
[gprtf] => false
[sagem_v1] => false
[sagem_v2] => false
[panasonic] => false
[sms_enabled] => false
[wav] => false
[mmf] => false
[smf] => false
[mld] => false
[midi_monophonic] => false
[midi_polyphonic] => false
[sp_midi] => false
[rmf] => false
[xmf] => false
[compactmidi] => false
[digiplug] => false
[nokia_ringtone] => false
[imelody] => false
[au] => false
[amr] => false
[awb] => false
[aac] => false
[mp3] => false
[voices] => 1
[qcelp] => false
[evrc] => false
[flash_lite_version] =>
[fl_wallpaper] => false
[fl_screensaver] => false
[fl_standalone] => false
[fl_browser] => false
[fl_sub_lcd] => false
[full_flash_support] => true
[css_supports_width_as_percentage] => true
[css_border_image] => none
[css_rounded_corners] => none
[css_gradient] => none
[css_spriting] => false
[css_gradient_linear] => none
[is_transcoder] => false
[transcoder_ua_header] => user-agent
[rss_support] => false
[pdf_support] => true
[progressive_download] => true
[playback_vcodec_h263_0] => -1
[playback_vcodec_h263_3] => -1
[playback_vcodec_mpeg4_sp] => -1
[playback_vcodec_mpeg4_asp] => -1
[playback_vcodec_h264_bp] => -1
[playback_real_media] => none
[playback_3gpp] => false
[playback_3g2] => false
[playback_mp4] => false
[playback_mov] => false
[playback_acodec_amr] => none
[playback_acodec_aac] => none
[playback_df_size_limit] => 0
[playback_directdownload_size_limit] => 0
[playback_inline_size_limit] => 0
[playback_oma_size_limit] => 0
[playback_acodec_qcelp] => false
[playback_wmv] => none
[hinted_progressive_download] => false
[html_preferred_dtd] => html4
[viewport_supported] => false
[viewport_width] => width_equals_max_image_width
[viewport_userscalable] =>
[viewport_initial_scale] =>
[viewport_maximum_scale] =>
[viewport_minimum_scale] =>
[mobileoptimized] => false
[handheldfriendly] => false
[canvas_support] => none
[image_inlining] => false
[is_smarttv] => false
[is_console] => false
[nfc_support] => false
[ux_full_desktop] => true
[jqm_grade] => A
[is_sencha_touch_ok] => true
)
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>Zsxsoft<br /><small>1.3</small><br /></td><td>AOL 4.0</td><td><i class="material-icons">close</i></td><td>Macintosh </td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0.001</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-5d43e024-b46c-44f6-8914-529b05569bc2">Detail</a>
<!-- Modal Structure -->
<div id="modal-5d43e024-b46c-44f6-8914-529b05569bc2" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>Zsxsoft result detail</h4>
<p><pre><code class="php">Array
(
[browser] => Array
(
[link] => http://downloads.channel.aol.com/browser
[title] => AOL 4.0
[code] => aol
[version] => 4.0
[name] => AOL
[image] => img/16/browser/aol.png
)
[os] => Array
(
[link] => http://www.apple.com/macosx/
[name] => Macintosh
[version] =>
[code] => mac-1
[x64] =>
[title] => Macintosh
[type] => os
[dir] => os
[image] => img/16/os/mac-1.png
)
[device] => Array
(
[link] =>
[title] =>
[model] =>
[brand] =>
[code] => null
[dir] => device
[type] => device
[image] => img/16/device/null.png
)
[platform] => Array
(
[link] => http://www.apple.com/macosx/
[name] => Macintosh
[version] =>
[code] => mac-1
[x64] =>
[title] => Macintosh
[type] => os
[dir] => os
[image] => img/16/os/mac-1.png
)
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr></table>
</div>
<div class="section">
<h1 class="header center orange-text">About this comparison</h1>
<div class="row center">
<h5 class="header light">
The primary goal of this project is simple<br />
I wanted to know which user agent parser is the most accurate in each part - device detection, bot detection and so on...<br />
<br />
The secondary goal is to provide a source for all user agent parsers to improve their detection based on this results.<br />
<br />
You can also improve this further, by suggesting ideas at <a href="https://github.com/ThaDafinser/UserAgentParserComparison">ThaDafinser/UserAgentParserComparison</a><br />
<br />
The comparison is based on the abstraction by <a href="https://github.com/ThaDafinser/UserAgentParser">ThaDafinser/UserAgentParser</a>
</h5>
</div>
</div>
<div class="card">
<div class="card-content">
Comparison created <i>2016-05-10 07:57:00</i> | by
<a href="https://github.com/ThaDafinser">ThaDafinser</a>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/js/materialize.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/list.js/1.2.0/list.min.js"></script>
<script>
$(document).ready(function(){
// the "href" attribute of .modal-trigger must specify the modal ID that wants to be triggered
$('.modal-trigger').leanModal();
});
</script>
</body>
</html> | {
"content_hash": "7a43dbc21aa2603e39510b11c8478d33",
"timestamp": "",
"source": "github",
"line_count": 1254,
"max_line_length": 798,
"avg_line_length": 39.58452950558214,
"alnum_prop": 0.530590866052902,
"repo_name": "ThaDafinser/UserAgentParserComparison",
"id": "2efcf9cacdd8f1a114d5ea71ec3f8118b26e2a4c",
"size": "49640",
"binary": false,
"copies": "1",
"ref": "refs/heads/gh-pages",
"path": "v5/user-agent-detail/50/a3/50a37205-318b-404d-825d-0965b1a8880e.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "HTML",
"bytes": "2060859160"
}
],
"symlink_target": ""
} |
#ifndef cmVariableWatchCommand_h
#define cmVariableWatchCommand_h
#include "cmCommand.h"
class cmVariableWatchCommandHandler
{
public:
typedef std::vector<std::string> VectorOfCommands;
VectorOfCommands Commands;
};
/** \class cmVariableWatchCommand
* \brief Watch when the variable changes and invoke command
*
*/
class cmVariableWatchCommand : public cmCommand
{
public:
/**
* This is a virtual constructor for the command.
*/
virtual cmCommand* Clone()
{
return new cmVariableWatchCommand;
}
//! Default constructor
cmVariableWatchCommand();
/**
* This is called when the command is first encountered in
* the CMakeLists.txt file.
*/
virtual bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus &status);
/**
* This determines if the command is invoked when in script mode.
*/
virtual bool IsScriptable() { return true; }
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "variable_watch";}
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
{
return "Watch the CMake variable for change.";
}
/**
* More documentation.
*/
virtual const char* GetFullDocumentation()
{
return
" variable_watch(<variable name> [<command to execute>])\n"
"If the specified variable changes, the message will be printed about "
"the variable being changed. If the command is specified, the command "
"will be executed. The command will receive the following arguments:"
" COMMAND(<variable> <access> <value> <current list file> <stack>)";
}
cmTypeMacro(cmVariableWatchCommand, cmCommand);
void VariableAccessed(const std::string& variable, int access_type,
const char* newValue, const cmMakefile* mf);
protected:
std::map<std::string, cmVariableWatchCommandHandler> Handlers;
bool InCallback;
};
#endif
| {
"content_hash": "b1ce50ddbc74a8c5ec5b231149233d14",
"timestamp": "",
"source": "github",
"line_count": 84,
"max_line_length": 77,
"avg_line_length": 23.654761904761905,
"alnum_prop": 0.6854554604932058,
"repo_name": "anasazi/POP-REU-Project",
"id": "469249a2adb05aa6a562d315f99f0c60df1b2a3a",
"size": "2706",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "pkgs/tools/cmake/src/Source/cmVariableWatchCommand.h",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "Ada",
"bytes": "89080"
},
{
"name": "Assembly",
"bytes": "2968894"
},
{
"name": "Awk",
"bytes": "142"
},
{
"name": "C",
"bytes": "78039389"
},
{
"name": "C#",
"bytes": "55726"
},
{
"name": "C++",
"bytes": "14864428"
},
{
"name": "CLIPS",
"bytes": "6933"
},
{
"name": "CSS",
"bytes": "20961"
},
{
"name": "Emacs Lisp",
"bytes": "9437"
},
{
"name": "FORTRAN",
"bytes": "6058"
},
{
"name": "Java",
"bytes": "291"
},
{
"name": "JavaScript",
"bytes": "37584"
},
{
"name": "Logos",
"bytes": "108920"
},
{
"name": "Lua",
"bytes": "9"
},
{
"name": "Objective-C",
"bytes": "362902"
},
{
"name": "PHP",
"bytes": "20640"
},
{
"name": "Pascal",
"bytes": "40318"
},
{
"name": "Perl",
"bytes": "2135645"
},
{
"name": "Pike",
"bytes": "1350"
},
{
"name": "Prolog",
"bytes": "3350"
},
{
"name": "Python",
"bytes": "871836"
},
{
"name": "Rebol",
"bytes": "106436"
},
{
"name": "Ruby",
"bytes": "1237"
},
{
"name": "Scheme",
"bytes": "4249"
},
{
"name": "Shell",
"bytes": "3227172"
},
{
"name": "Tcl",
"bytes": "2809"
},
{
"name": "VimL",
"bytes": "7550"
},
{
"name": "XSLT",
"bytes": "167485"
},
{
"name": "eC",
"bytes": "4568"
}
],
"symlink_target": ""
} |
class CopyMove {
public:
const std::size_t copied = 0;
const std::size_t moved = 0;
CopyMove() = default;
CopyMove(std::size_t cp, std::size_t mv) noexcept : copied(cp), moved(mv) {}
CopyMove(const CopyMove& other) noexcept : copied{other.copied + 1}, moved{other.moved} {}
CopyMove(CopyMove&& other) noexcept : copied(other.copied), moved(other.moved + 1) {}
~CopyMove() = default;
auto operator()() const noexcept { return CopyMove{copied, moved}; }
};
class Intermediary {
int _n;
public:
explicit Intermediary(int n) : _n{n} {}
Intermediary() : Intermediary{0} {}
explicit operator int() const noexcept { return _n; }
};
SCENARIO( "some static assertions on the Wrapper class", "[assertions]" ) {
using Wrapper = calculate::Wrapper<int>;
static_assert(!std::is_default_constructible<Wrapper>::value, "");
static_assert(std::is_copy_constructible<Wrapper>::value, "");
static_assert(std::is_nothrow_move_constructible<Wrapper>::value, "");
static_assert(std::is_copy_assignable<Wrapper>::value, "");
static_assert(std::is_move_assignable<Wrapper>::value, "");
static_assert(std::is_nothrow_destructible<Wrapper>::value, "");
static_assert(!std::has_virtual_destructor<Wrapper>::value, "");
}
SCENARIO( "construction of a wrapper object", "[construction]" ) {
GIVEN( "a copyable and movable callable class" ) {
using Wrapper = calculate::Wrapper<CopyMove>;
WHEN( "a wrapper of a non temporary object is created" ) {
auto callable = CopyMove{};
auto wrapper = Wrapper{callable};
THEN( "the given object is copied and not moved" ) {
CHECK( wrapper().copied == 1 );
CHECK( wrapper().moved == 0 );
}
}
WHEN( "a wrapper of a temporary object is created" ) {
auto wrapper = Wrapper{CopyMove{}};
THEN( "the given object is moved and not copied" ) {
CHECK( wrapper().copied == 0 );
CHECK( wrapper().moved == 1 );
}
}
}
}
SCENARIO( "copy wrapper objects", "[copy]" ) {
using Wrapper = calculate::Wrapper<int>;
const auto hash = std::hash<Wrapper>{};
GIVEN( "a wrapper object" ) {
auto wrapper = Wrapper{[]{ return 0; }};
WHEN( "a shallow copy is performed" ) {
auto copy = wrapper;
THEN( "they share the wrapped callable" ) {
CHECK( wrapper == copy );
CHECK( !(wrapper != copy) );
CHECK( hash(wrapper) == hash(copy) );
}
}
WHEN( "a deep copy is performed" ) {
auto copy = wrapper.copy();
THEN( "they don't share the wrapped callable" ) {
CHECK( !(wrapper == copy) );
CHECK( wrapper != copy );
CHECK( hash(wrapper) != hash(copy) );
}
}
}
}
SCENARIO( "moved from state wrappers", "[move]" ) {
using Wrapper = calculate::Wrapper<int>;
GIVEN( "a wrapper object" ) {
auto wrapper = Wrapper{[]{ return 0; }};
WHEN( "it is moved" ) {
auto other = std::move(wrapper);
CHECK( !wrapper.valid() );
THEN( "it cannot be used again until being reassigned" ) {
wrapper = []{ return 0; };
CHECK( wrapper.valid() );
}
}
}
}
SCENARIO( "calling wrapper objects", "[call]" ) {
using Wrapper = calculate::Wrapper<int>;
GIVEN( "a wrapped callable" ) {
auto wrapper = Wrapper{[](int a, int b) noexcept { return a + b; }};
THEN( "it can be called directly or used on any iterable container" ) {
int carray[] = {1, 2};
auto array = std::array<int, 2>{1, 2};
auto list = std::list<int>{1, 2};
auto vector = std::vector<int>{1, 2};
REQUIRE_NOTHROW( wrapper(1, 2) );
REQUIRE_NOTHROW( wrapper(carray) );
REQUIRE_NOTHROW( wrapper(array) );
REQUIRE_NOTHROW( wrapper(list) );
REQUIRE_NOTHROW( wrapper(vector) );
CHECK( wrapper(1, 2) == 3 );
CHECK( wrapper(carray) == 3 );
CHECK( wrapper(array) == 3 );
CHECK( wrapper(list) == 3 );
CHECK( wrapper(vector) == 3 );
}
WHEN( "the wrapper object is called with the wrong number of arguments" ) {
THEN( "it throws an exception" ) {
CHECK_THROWS_AS( wrapper(1), calculate::ArgumentsMismatch );
CHECK_NOTHROW( wrapper(1, 2));
CHECK_THROWS_AS( wrapper(1, 2, 3), calculate::ArgumentsMismatch );
}
}
}
}
SCENARIO( "evaluating wrapper objects", "[evaluation]" ) {
using Wrapper = calculate::Wrapper<int, Intermediary>;
GIVEN( "a wrapped callable using the default adapter" ) {
auto wrapper = Wrapper{[](int n) noexcept { return n; }};
THEN( "it can be evaluated directly or used on any iterable container" ) {
Intermediary carray[] = {Intermediary{1}};
auto array = std::array<Intermediary, 1>{Intermediary{1}};
auto list = std::list<Intermediary>{Intermediary{1}};
auto vector = std::vector<Intermediary>{Intermediary{1}};
REQUIRE_NOTHROW( wrapper.eval(Intermediary{1}) );
REQUIRE_NOTHROW( wrapper.eval(carray) );
REQUIRE_NOTHROW( wrapper.eval(array) );
REQUIRE_NOTHROW( wrapper.eval(list) );
REQUIRE_NOTHROW( wrapper.eval(vector) );
CHECK( wrapper.eval(Intermediary{1}) == 1 );
CHECK( wrapper.eval(carray) == 1 );
CHECK( wrapper.eval(array) == 1 );
CHECK( wrapper.eval(list) == 1 );
CHECK( wrapper.eval(vector) == 1 );
}
WHEN( "the wrapper object is evaluated with the wrong number of arguments" ) {
THEN( "it throws an exception" ) {
CHECK_THROWS_AS( wrapper.eval(), calculate::ArgumentsMismatch );
CHECK_NOTHROW( wrapper.eval(Intermediary{1}) );
}
}
}
GIVEN ( "a wrapped callable using a custom adapter" ) {
auto wrapper = Wrapper{
[](int n) noexcept { return n; },
[](Intermediary i) noexcept { return static_cast<int>(i) + 1; }
};
WHEN( "it is called the adapter function is not applied" ) {
CHECK( wrapper(Intermediary{1}) != 2 );
}
WHEN( "it is evaluated the adapter function is applied" ) {
CHECK( wrapper.eval(Intermediary{1}) == 2 );
}
}
}
| {
"content_hash": "687232b7178d7335a2c274693c3d87f6",
"timestamp": "",
"source": "github",
"line_count": 190,
"max_line_length": 94,
"avg_line_length": 35.12105263157895,
"alnum_prop": 0.5489285179079874,
"repo_name": "newlawrence/Calculate",
"id": "7ff9dfb49cecca8136db011893750b14568eb69c",
"size": "6815",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "test/source/wrapper.cpp",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C++",
"bytes": "83073"
},
{
"name": "CMake",
"bytes": "125"
}
],
"symlink_target": ""
} |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_45) on Sat Apr 09 10:11:03 EDT 2016 -->
<title>TableMetrics (apache-cassandra API)</title>
<meta name="date" content="2016-04-09">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="TableMetrics (apache-cassandra API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/TableMetrics.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/cassandra/metrics/StreamingMetrics.html" title="class in org.apache.cassandra.metrics"><span class="typeNameLink">Prev Class</span></a></li>
<li><a href="../../../../org/apache/cassandra/metrics/TableMetrics.Sampler.html" title="enum in org.apache.cassandra.metrics"><span class="typeNameLink">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/cassandra/metrics/TableMetrics.html" target="_top">Frames</a></li>
<li><a href="TableMetrics.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>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li><a href="#nested.class.summary">Nested</a> | </li>
<li><a href="#field.summary">Field</a> | </li>
<li><a href="#constructor.summary">Constr</a> | </li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li><a href="#field.detail">Field</a> | </li>
<li><a href="#constructor.detail">Constr</a> | </li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.cassandra.metrics</div>
<h2 title="Class TableMetrics" class="title">Class TableMetrics</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.apache.cassandra.metrics.TableMetrics</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="typeNameLabel">TableMetrics</span>
extends java.lang.Object</pre>
<div class="block">Metrics for <a href="../../../../org/apache/cassandra/db/ColumnFamilyStore.html" title="class in org.apache.cassandra.db"><code>ColumnFamilyStore</code></a>.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class </code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.Sampler.html" title="enum in org.apache.cassandra.metrics">TableMetrics.Sampler</a></span></code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static class </code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.TableHistogram.html" title="class in org.apache.cassandra.metrics">TableMetrics.TableHistogram</a></span></code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class </code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.TableTimer.html" title="class in org.apache.cassandra.metrics">TableMetrics.TableTimer</a></span></code> </td>
</tr>
</table>
</li>
</ul>
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.util.Map<java.lang.String,java.lang.String></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#all">all</a></span></code>
<div class="block">Stores all metric names created that can be used when unregistering, optionally mapped to an alias name.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>com.codahale.metrics.Gauge<java.lang.Long></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#allMemtablesLiveDataSize">allMemtablesLiveDataSize</a></span></code>
<div class="block">Total amount of live data stored in the memtables (2i and pending flush memtables included) that resides off-heap, excluding any data structure overhead</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>com.codahale.metrics.Gauge<java.lang.Long></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#allMemtablesOffHeapSize">allMemtablesOffHeapSize</a></span></code>
<div class="block">Total amount of data stored in the memtables (2i and pending flush memtables included) that resides off-heap.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>com.codahale.metrics.Gauge<java.lang.Long></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#allMemtablesOnHeapSize">allMemtablesOnHeapSize</a></span></code>
<div class="block">Total amount of data stored in the memtables (2i and pending flush memtables included) that resides on-heap.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.util.concurrent.ConcurrentMap<java.lang.String,java.util.Set<com.codahale.metrics.Metric>></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#allTableMetrics">allTableMetrics</a></span></code>
<div class="block">stores metrics that will be rolled into a single global metric</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>com.codahale.metrics.Gauge<java.lang.Long></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#bloomFilterDiskSpaceUsed">bloomFilterDiskSpaceUsed</a></span></code>
<div class="block">Disk space used by bloom filter</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>com.codahale.metrics.Gauge<java.lang.Long></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#bloomFilterFalsePositives">bloomFilterFalsePositives</a></span></code>
<div class="block">Number of false positives in bloom filter</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>com.codahale.metrics.Gauge<java.lang.Double></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#bloomFilterFalseRatio">bloomFilterFalseRatio</a></span></code>
<div class="block">False positive ratio of bloom filter</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>com.codahale.metrics.Gauge<java.lang.Long></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#bloomFilterOffHeapMemoryUsed">bloomFilterOffHeapMemoryUsed</a></span></code>
<div class="block">Off heap memory used by bloom filter</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/cassandra/metrics/LatencyMetrics.html" title="class in org.apache.cassandra.metrics">LatencyMetrics</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#casCommit">casCommit</a></span></code>
<div class="block">CAS Commit metrics</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/cassandra/metrics/LatencyMetrics.html" title="class in org.apache.cassandra.metrics">LatencyMetrics</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#casPrepare">casPrepare</a></span></code>
<div class="block">CAS Prepare metrics</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/cassandra/metrics/LatencyMetrics.html" title="class in org.apache.cassandra.metrics">LatencyMetrics</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#casPropose">casPropose</a></span></code>
<div class="block">CAS Propose metrics</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/cassandra/metrics/TableMetrics.TableHistogram.html" title="class in org.apache.cassandra.metrics">TableMetrics.TableHistogram</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#colUpdateTimeDeltaHistogram">colUpdateTimeDeltaHistogram</a></span></code>
<div class="block">Column update time delta on this CF</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>com.codahale.metrics.Gauge<java.lang.Long></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#compressionMetadataOffHeapMemoryUsed">compressionMetadataOffHeapMemoryUsed</a></span></code>
<div class="block">Off heap memory used by compression meta data</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>com.codahale.metrics.Gauge<java.lang.Double></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#compressionRatio">compressionRatio</a></span></code>
<div class="block">Current compression ratio for all SSTables</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>com.codahale.metrics.Timer</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#coordinatorReadLatency">coordinatorReadLatency</a></span></code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>com.codahale.metrics.Timer</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#coordinatorScanLatency">coordinatorScanLatency</a></span></code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>com.codahale.metrics.Counter</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#droppedMutations">droppedMutations</a></span></code>
<div class="block">Dropped Mutations Count</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static long[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#EMPTY">EMPTY</a></span></code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>com.codahale.metrics.Gauge<long[]></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#estimatedColumnCountHistogram">estimatedColumnCountHistogram</a></span></code>
<div class="block">Histogram of estimated number of columns.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>com.codahale.metrics.Gauge<java.lang.Long></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#estimatedPartitionCount">estimatedPartitionCount</a></span></code>
<div class="block">Approximate number of keys in table.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>com.codahale.metrics.Gauge<long[]></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#estimatedPartitionSizeHistogram">estimatedPartitionSizeHistogram</a></span></code>
<div class="block">Histogram of estimated partition size (in bytes).</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/cassandra/metrics/LatencyMetrics.html" title="class in org.apache.cassandra.metrics">LatencyMetrics</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#globalRangeLatency">globalRangeLatency</a></span></code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/cassandra/metrics/LatencyMetrics.html" title="class in org.apache.cassandra.metrics">LatencyMetrics</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#globalReadLatency">globalReadLatency</a></span></code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/cassandra/metrics/LatencyMetrics.html" title="class in org.apache.cassandra.metrics">LatencyMetrics</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#globalWriteLatency">globalWriteLatency</a></span></code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>com.codahale.metrics.Gauge<java.lang.Long></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#indexSummaryOffHeapMemoryUsed">indexSummaryOffHeapMemoryUsed</a></span></code>
<div class="block">Off heap memory used by index summary</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>com.codahale.metrics.Gauge<java.lang.Double></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#keyCacheHitRate">keyCacheHitRate</a></span></code>
<div class="block">Key cache hit rate for this CF</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>com.codahale.metrics.Counter</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#liveDiskSpaceUsed">liveDiskSpaceUsed</a></span></code>
<div class="block">Disk space used by SSTables belonging to this table</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/cassandra/metrics/TableMetrics.TableHistogram.html" title="class in org.apache.cassandra.metrics">TableMetrics.TableHistogram</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#liveScannedHistogram">liveScannedHistogram</a></span></code>
<div class="block">Live cells scanned in queries on this CF</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>com.codahale.metrics.Gauge<java.lang.Integer></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#liveSSTableCount">liveSSTableCount</a></span></code>
<div class="block">Number of SSTables on disk for this CF</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>com.codahale.metrics.Gauge<java.lang.Long></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#maxPartitionSize">maxPartitionSize</a></span></code>
<div class="block">Size of the largest compacted partition</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>com.codahale.metrics.Gauge<java.lang.Long></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#meanPartitionSize">meanPartitionSize</a></span></code>
<div class="block">Size of the smallest compacted partition</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>com.codahale.metrics.Gauge<java.lang.Long></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#memtableColumnsCount">memtableColumnsCount</a></span></code>
<div class="block">Total number of columns present in the memtable.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>com.codahale.metrics.Gauge<java.lang.Long></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#memtableLiveDataSize">memtableLiveDataSize</a></span></code>
<div class="block">Total amount of live data stored in the memtable, excluding any data structure overhead</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>com.codahale.metrics.Gauge<java.lang.Long></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#memtableOffHeapSize">memtableOffHeapSize</a></span></code>
<div class="block">Total amount of data stored in the memtable that resides off-heap, including column related overhead and partitions overwritten.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>com.codahale.metrics.Gauge<java.lang.Long></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#memtableOnHeapSize">memtableOnHeapSize</a></span></code>
<div class="block">Total amount of data stored in the memtable that resides on-heap, including column related overhead and partitions overwritten.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>com.codahale.metrics.Counter</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#memtableSwitchCount">memtableSwitchCount</a></span></code>
<div class="block">Number of times flush has resulted in the memtable being switched out.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>com.codahale.metrics.Gauge<java.lang.Long></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#minPartitionSize">minPartitionSize</a></span></code>
<div class="block">Size of the smallest compacted partition</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>com.codahale.metrics.Gauge<java.lang.Integer></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#pendingCompactions">pendingCompactions</a></span></code>
<div class="block">Estimate of number of pending compactios for this table</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>com.codahale.metrics.Counter</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#pendingFlushes">pendingFlushes</a></span></code>
<div class="block">Estimated number of tasks pending for this table</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/cassandra/metrics/LatencyMetrics.html" title="class in org.apache.cassandra.metrics">LatencyMetrics</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#rangeLatency">rangeLatency</a></span></code>
<div class="block">(Local) range slice metrics</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/cassandra/metrics/LatencyMetrics.html" title="class in org.apache.cassandra.metrics">LatencyMetrics</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#readLatency">readLatency</a></span></code>
<div class="block">(Local) read metrics</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>com.codahale.metrics.Gauge<java.lang.Long></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#recentBloomFilterFalsePositives">recentBloomFilterFalsePositives</a></span></code>
<div class="block">Number of false positives in bloom filter from last read</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>com.codahale.metrics.Gauge<java.lang.Double></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#recentBloomFilterFalseRatio">recentBloomFilterFalseRatio</a></span></code>
<div class="block">False positive ratio of bloom filter from last read</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>com.codahale.metrics.Counter</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#rowCacheHit">rowCacheHit</a></span></code>
<div class="block">Number of row cache hits</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>com.codahale.metrics.Counter</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#rowCacheHitOutOfRange">rowCacheHitOutOfRange</a></span></code>
<div class="block">Row cache hits, but result out of range</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>com.codahale.metrics.Counter</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#rowCacheMiss">rowCacheMiss</a></span></code>
<div class="block">Number of row cache misses</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.util.Map<<a href="../../../../org/apache/cassandra/metrics/TableMetrics.Sampler.html" title="enum in org.apache.cassandra.metrics">TableMetrics.Sampler</a>,<a href="../../../../org/apache/cassandra/utils/TopKSampler.html" title="class in org.apache.cassandra.utils">TopKSampler</a><java.nio.ByteBuffer>></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#samplers">samplers</a></span></code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>com.codahale.metrics.Counter</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#speculativeRetries">speculativeRetries</a></span></code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/cassandra/metrics/TableMetrics.TableHistogram.html" title="class in org.apache.cassandra.metrics">TableMetrics.TableHistogram</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#sstablesPerReadHistogram">sstablesPerReadHistogram</a></span></code>
<div class="block">Histogram of the number of sstable data files accessed per read</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/cassandra/metrics/TableMetrics.TableHistogram.html" title="class in org.apache.cassandra.metrics">TableMetrics.TableHistogram</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#tombstoneScannedHistogram">tombstoneScannedHistogram</a></span></code>
<div class="block">Tombstones scanned in queries on this CF</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>com.codahale.metrics.Counter</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#totalDiskSpaceUsed">totalDiskSpaceUsed</a></span></code>
<div class="block">Total disk space used by SSTables belonging to this table, including obsolete ones waiting to be GC'd</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>com.codahale.metrics.Gauge<java.lang.Long></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#trueSnapshotsSize">trueSnapshotsSize</a></span></code>
<div class="block">Disk space used by snapshot files which</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/cassandra/metrics/TableMetrics.TableTimer.html" title="class in org.apache.cassandra.metrics">TableMetrics.TableTimer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#viewLockAcquireTime">viewLockAcquireTime</a></span></code>
<div class="block">time taken acquiring the partition lock for materialized view updates for this table</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/cassandra/metrics/TableMetrics.TableTimer.html" title="class in org.apache.cassandra.metrics">TableMetrics.TableTimer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#viewReadTime">viewReadTime</a></span></code>
<div class="block">time taken during the local read of a materialized view update</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>com.codahale.metrics.Histogram</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#waitingOnFreeMemtableSpace">waitingOnFreeMemtableSpace</a></span></code>
<div class="block">Time spent waiting for free memtable space, either on- or off-heap</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/cassandra/metrics/LatencyMetrics.html" title="class in org.apache.cassandra.metrics">LatencyMetrics</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#writeLatency">writeLatency</a></span></code>
<div class="block">(Local) write metrics</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#TableMetrics-org.apache.cassandra.db.ColumnFamilyStore-">TableMetrics</a></span>(<a href="../../../../org/apache/cassandra/db/ColumnFamilyStore.html" title="class in org.apache.cassandra.db">ColumnFamilyStore</a> cfs)</code>
<div class="block">Creates metrics for given <a href="../../../../org/apache/cassandra/db/ColumnFamilyStore.html" title="class in org.apache.cassandra.db"><code>ColumnFamilyStore</code></a>.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>protected com.codahale.metrics.Counter</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#createTableCounter-java.lang.String-">createTableCounter</a></span>(java.lang.String name)</code>
<div class="block">Creates a counter that will also have a global counter thats the sum of all counters across
different column families</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>protected com.codahale.metrics.Counter</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#createTableCounter-java.lang.String-java.lang.String-">createTableCounter</a></span>(java.lang.String name,
java.lang.String alias)</code> </td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>protected <T extends java.lang.Number><br>com.codahale.metrics.Gauge<T></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#createTableGauge-java.lang.String-com.codahale.metrics.Gauge-">createTableGauge</a></span>(java.lang.String name,
com.codahale.metrics.Gauge<T> gauge)</code>
<div class="block">Create a gauge that will be part of a merged version of all column families.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>protected <G,T> com.codahale.metrics.Gauge<T></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#createTableGauge-java.lang.String-com.codahale.metrics.Gauge-com.codahale.metrics.Gauge-">createTableGauge</a></span>(java.lang.String name,
com.codahale.metrics.Gauge<T> gauge,
com.codahale.metrics.Gauge<G> globalGauge)</code>
<div class="block">Create a gauge that will be part of a merged version of all column families.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>protected <G,T> com.codahale.metrics.Gauge<T></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#createTableGauge-java.lang.String-java.lang.String-com.codahale.metrics.Gauge-com.codahale.metrics.Gauge-">createTableGauge</a></span>(java.lang.String name,
java.lang.String alias,
com.codahale.metrics.Gauge<T> gauge,
com.codahale.metrics.Gauge<G> globalGauge)</code> </td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>protected <a href="../../../../org/apache/cassandra/metrics/TableMetrics.TableHistogram.html" title="class in org.apache.cassandra.metrics">TableMetrics.TableHistogram</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#createTableHistogram-java.lang.String-com.codahale.metrics.Histogram-boolean-">createTableHistogram</a></span>(java.lang.String name,
com.codahale.metrics.Histogram keyspaceHistogram,
boolean considerZeroes)</code>
<div class="block">Create a histogram-like interface that will register both a CF, keyspace and global level
histogram and forward any updates to both</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>protected <a href="../../../../org/apache/cassandra/metrics/TableMetrics.TableHistogram.html" title="class in org.apache.cassandra.metrics">TableMetrics.TableHistogram</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#createTableHistogram-java.lang.String-java.lang.String-com.codahale.metrics.Histogram-boolean-">createTableHistogram</a></span>(java.lang.String name,
java.lang.String alias,
com.codahale.metrics.Histogram keyspaceHistogram,
boolean considerZeroes)</code> </td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>protected <a href="../../../../org/apache/cassandra/metrics/TableMetrics.TableTimer.html" title="class in org.apache.cassandra.metrics">TableMetrics.TableTimer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#createTableTimer-java.lang.String-java.lang.String-com.codahale.metrics.Timer-">createTableTimer</a></span>(java.lang.String name,
java.lang.String alias,
com.codahale.metrics.Timer keyspaceTimer)</code> </td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>protected <a href="../../../../org/apache/cassandra/metrics/TableMetrics.TableTimer.html" title="class in org.apache.cassandra.metrics">TableMetrics.TableTimer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#createTableTimer-java.lang.String-com.codahale.metrics.Timer-">createTableTimer</a></span>(java.lang.String name,
com.codahale.metrics.Timer keyspaceTimer)</code> </td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#release--">release</a></span>()</code>
<div class="block">Release all associated metrics.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/metrics/TableMetrics.html#updateSSTableIterated-int-">updateSSTableIterated</a></span>(int count)</code> </td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="EMPTY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>EMPTY</h4>
<pre>public static final long[] EMPTY</pre>
</li>
</ul>
<a name="memtableOnHeapSize">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>memtableOnHeapSize</h4>
<pre>public final com.codahale.metrics.Gauge<java.lang.Long> memtableOnHeapSize</pre>
<div class="block">Total amount of data stored in the memtable that resides on-heap, including column related overhead and partitions overwritten.</div>
</li>
</ul>
<a name="memtableOffHeapSize">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>memtableOffHeapSize</h4>
<pre>public final com.codahale.metrics.Gauge<java.lang.Long> memtableOffHeapSize</pre>
<div class="block">Total amount of data stored in the memtable that resides off-heap, including column related overhead and partitions overwritten.</div>
</li>
</ul>
<a name="memtableLiveDataSize">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>memtableLiveDataSize</h4>
<pre>public final com.codahale.metrics.Gauge<java.lang.Long> memtableLiveDataSize</pre>
<div class="block">Total amount of live data stored in the memtable, excluding any data structure overhead</div>
</li>
</ul>
<a name="allMemtablesOnHeapSize">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>allMemtablesOnHeapSize</h4>
<pre>public final com.codahale.metrics.Gauge<java.lang.Long> allMemtablesOnHeapSize</pre>
<div class="block">Total amount of data stored in the memtables (2i and pending flush memtables included) that resides on-heap.</div>
</li>
</ul>
<a name="allMemtablesOffHeapSize">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>allMemtablesOffHeapSize</h4>
<pre>public final com.codahale.metrics.Gauge<java.lang.Long> allMemtablesOffHeapSize</pre>
<div class="block">Total amount of data stored in the memtables (2i and pending flush memtables included) that resides off-heap.</div>
</li>
</ul>
<a name="allMemtablesLiveDataSize">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>allMemtablesLiveDataSize</h4>
<pre>public final com.codahale.metrics.Gauge<java.lang.Long> allMemtablesLiveDataSize</pre>
<div class="block">Total amount of live data stored in the memtables (2i and pending flush memtables included) that resides off-heap, excluding any data structure overhead</div>
</li>
</ul>
<a name="memtableColumnsCount">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>memtableColumnsCount</h4>
<pre>public final com.codahale.metrics.Gauge<java.lang.Long> memtableColumnsCount</pre>
<div class="block">Total number of columns present in the memtable.</div>
</li>
</ul>
<a name="memtableSwitchCount">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>memtableSwitchCount</h4>
<pre>public final com.codahale.metrics.Counter memtableSwitchCount</pre>
<div class="block">Number of times flush has resulted in the memtable being switched out.</div>
</li>
</ul>
<a name="compressionRatio">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>compressionRatio</h4>
<pre>public final com.codahale.metrics.Gauge<java.lang.Double> compressionRatio</pre>
<div class="block">Current compression ratio for all SSTables</div>
</li>
</ul>
<a name="estimatedPartitionSizeHistogram">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>estimatedPartitionSizeHistogram</h4>
<pre>public final com.codahale.metrics.Gauge<long[]> estimatedPartitionSizeHistogram</pre>
<div class="block">Histogram of estimated partition size (in bytes).</div>
</li>
</ul>
<a name="estimatedPartitionCount">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>estimatedPartitionCount</h4>
<pre>public final com.codahale.metrics.Gauge<java.lang.Long> estimatedPartitionCount</pre>
<div class="block">Approximate number of keys in table.</div>
</li>
</ul>
<a name="estimatedColumnCountHistogram">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>estimatedColumnCountHistogram</h4>
<pre>public final com.codahale.metrics.Gauge<long[]> estimatedColumnCountHistogram</pre>
<div class="block">Histogram of estimated number of columns.</div>
</li>
</ul>
<a name="sstablesPerReadHistogram">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sstablesPerReadHistogram</h4>
<pre>public final <a href="../../../../org/apache/cassandra/metrics/TableMetrics.TableHistogram.html" title="class in org.apache.cassandra.metrics">TableMetrics.TableHistogram</a> sstablesPerReadHistogram</pre>
<div class="block">Histogram of the number of sstable data files accessed per read</div>
</li>
</ul>
<a name="readLatency">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readLatency</h4>
<pre>public final <a href="../../../../org/apache/cassandra/metrics/LatencyMetrics.html" title="class in org.apache.cassandra.metrics">LatencyMetrics</a> readLatency</pre>
<div class="block">(Local) read metrics</div>
</li>
</ul>
<a name="rangeLatency">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>rangeLatency</h4>
<pre>public final <a href="../../../../org/apache/cassandra/metrics/LatencyMetrics.html" title="class in org.apache.cassandra.metrics">LatencyMetrics</a> rangeLatency</pre>
<div class="block">(Local) range slice metrics</div>
</li>
</ul>
<a name="writeLatency">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeLatency</h4>
<pre>public final <a href="../../../../org/apache/cassandra/metrics/LatencyMetrics.html" title="class in org.apache.cassandra.metrics">LatencyMetrics</a> writeLatency</pre>
<div class="block">(Local) write metrics</div>
</li>
</ul>
<a name="pendingFlushes">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>pendingFlushes</h4>
<pre>public final com.codahale.metrics.Counter pendingFlushes</pre>
<div class="block">Estimated number of tasks pending for this table</div>
</li>
</ul>
<a name="pendingCompactions">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>pendingCompactions</h4>
<pre>public final com.codahale.metrics.Gauge<java.lang.Integer> pendingCompactions</pre>
<div class="block">Estimate of number of pending compactios for this table</div>
</li>
</ul>
<a name="liveSSTableCount">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>liveSSTableCount</h4>
<pre>public final com.codahale.metrics.Gauge<java.lang.Integer> liveSSTableCount</pre>
<div class="block">Number of SSTables on disk for this CF</div>
</li>
</ul>
<a name="liveDiskSpaceUsed">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>liveDiskSpaceUsed</h4>
<pre>public final com.codahale.metrics.Counter liveDiskSpaceUsed</pre>
<div class="block">Disk space used by SSTables belonging to this table</div>
</li>
</ul>
<a name="totalDiskSpaceUsed">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>totalDiskSpaceUsed</h4>
<pre>public final com.codahale.metrics.Counter totalDiskSpaceUsed</pre>
<div class="block">Total disk space used by SSTables belonging to this table, including obsolete ones waiting to be GC'd</div>
</li>
</ul>
<a name="minPartitionSize">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>minPartitionSize</h4>
<pre>public final com.codahale.metrics.Gauge<java.lang.Long> minPartitionSize</pre>
<div class="block">Size of the smallest compacted partition</div>
</li>
</ul>
<a name="maxPartitionSize">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>maxPartitionSize</h4>
<pre>public final com.codahale.metrics.Gauge<java.lang.Long> maxPartitionSize</pre>
<div class="block">Size of the largest compacted partition</div>
</li>
</ul>
<a name="meanPartitionSize">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>meanPartitionSize</h4>
<pre>public final com.codahale.metrics.Gauge<java.lang.Long> meanPartitionSize</pre>
<div class="block">Size of the smallest compacted partition</div>
</li>
</ul>
<a name="bloomFilterFalsePositives">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>bloomFilterFalsePositives</h4>
<pre>public final com.codahale.metrics.Gauge<java.lang.Long> bloomFilterFalsePositives</pre>
<div class="block">Number of false positives in bloom filter</div>
</li>
</ul>
<a name="recentBloomFilterFalsePositives">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>recentBloomFilterFalsePositives</h4>
<pre>public final com.codahale.metrics.Gauge<java.lang.Long> recentBloomFilterFalsePositives</pre>
<div class="block">Number of false positives in bloom filter from last read</div>
</li>
</ul>
<a name="bloomFilterFalseRatio">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>bloomFilterFalseRatio</h4>
<pre>public final com.codahale.metrics.Gauge<java.lang.Double> bloomFilterFalseRatio</pre>
<div class="block">False positive ratio of bloom filter</div>
</li>
</ul>
<a name="recentBloomFilterFalseRatio">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>recentBloomFilterFalseRatio</h4>
<pre>public final com.codahale.metrics.Gauge<java.lang.Double> recentBloomFilterFalseRatio</pre>
<div class="block">False positive ratio of bloom filter from last read</div>
</li>
</ul>
<a name="bloomFilterDiskSpaceUsed">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>bloomFilterDiskSpaceUsed</h4>
<pre>public final com.codahale.metrics.Gauge<java.lang.Long> bloomFilterDiskSpaceUsed</pre>
<div class="block">Disk space used by bloom filter</div>
</li>
</ul>
<a name="bloomFilterOffHeapMemoryUsed">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>bloomFilterOffHeapMemoryUsed</h4>
<pre>public final com.codahale.metrics.Gauge<java.lang.Long> bloomFilterOffHeapMemoryUsed</pre>
<div class="block">Off heap memory used by bloom filter</div>
</li>
</ul>
<a name="indexSummaryOffHeapMemoryUsed">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>indexSummaryOffHeapMemoryUsed</h4>
<pre>public final com.codahale.metrics.Gauge<java.lang.Long> indexSummaryOffHeapMemoryUsed</pre>
<div class="block">Off heap memory used by index summary</div>
</li>
</ul>
<a name="compressionMetadataOffHeapMemoryUsed">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>compressionMetadataOffHeapMemoryUsed</h4>
<pre>public final com.codahale.metrics.Gauge<java.lang.Long> compressionMetadataOffHeapMemoryUsed</pre>
<div class="block">Off heap memory used by compression meta data</div>
</li>
</ul>
<a name="keyCacheHitRate">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>keyCacheHitRate</h4>
<pre>public final com.codahale.metrics.Gauge<java.lang.Double> keyCacheHitRate</pre>
<div class="block">Key cache hit rate for this CF</div>
</li>
</ul>
<a name="tombstoneScannedHistogram">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>tombstoneScannedHistogram</h4>
<pre>public final <a href="../../../../org/apache/cassandra/metrics/TableMetrics.TableHistogram.html" title="class in org.apache.cassandra.metrics">TableMetrics.TableHistogram</a> tombstoneScannedHistogram</pre>
<div class="block">Tombstones scanned in queries on this CF</div>
</li>
</ul>
<a name="liveScannedHistogram">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>liveScannedHistogram</h4>
<pre>public final <a href="../../../../org/apache/cassandra/metrics/TableMetrics.TableHistogram.html" title="class in org.apache.cassandra.metrics">TableMetrics.TableHistogram</a> liveScannedHistogram</pre>
<div class="block">Live cells scanned in queries on this CF</div>
</li>
</ul>
<a name="colUpdateTimeDeltaHistogram">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>colUpdateTimeDeltaHistogram</h4>
<pre>public final <a href="../../../../org/apache/cassandra/metrics/TableMetrics.TableHistogram.html" title="class in org.apache.cassandra.metrics">TableMetrics.TableHistogram</a> colUpdateTimeDeltaHistogram</pre>
<div class="block">Column update time delta on this CF</div>
</li>
</ul>
<a name="viewLockAcquireTime">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>viewLockAcquireTime</h4>
<pre>public final <a href="../../../../org/apache/cassandra/metrics/TableMetrics.TableTimer.html" title="class in org.apache.cassandra.metrics">TableMetrics.TableTimer</a> viewLockAcquireTime</pre>
<div class="block">time taken acquiring the partition lock for materialized view updates for this table</div>
</li>
</ul>
<a name="viewReadTime">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>viewReadTime</h4>
<pre>public final <a href="../../../../org/apache/cassandra/metrics/TableMetrics.TableTimer.html" title="class in org.apache.cassandra.metrics">TableMetrics.TableTimer</a> viewReadTime</pre>
<div class="block">time taken during the local read of a materialized view update</div>
</li>
</ul>
<a name="trueSnapshotsSize">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>trueSnapshotsSize</h4>
<pre>public final com.codahale.metrics.Gauge<java.lang.Long> trueSnapshotsSize</pre>
<div class="block">Disk space used by snapshot files which</div>
</li>
</ul>
<a name="rowCacheHitOutOfRange">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>rowCacheHitOutOfRange</h4>
<pre>public final com.codahale.metrics.Counter rowCacheHitOutOfRange</pre>
<div class="block">Row cache hits, but result out of range</div>
</li>
</ul>
<a name="rowCacheHit">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>rowCacheHit</h4>
<pre>public final com.codahale.metrics.Counter rowCacheHit</pre>
<div class="block">Number of row cache hits</div>
</li>
</ul>
<a name="rowCacheMiss">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>rowCacheMiss</h4>
<pre>public final com.codahale.metrics.Counter rowCacheMiss</pre>
<div class="block">Number of row cache misses</div>
</li>
</ul>
<a name="casPrepare">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>casPrepare</h4>
<pre>public final <a href="../../../../org/apache/cassandra/metrics/LatencyMetrics.html" title="class in org.apache.cassandra.metrics">LatencyMetrics</a> casPrepare</pre>
<div class="block">CAS Prepare metrics</div>
</li>
</ul>
<a name="casPropose">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>casPropose</h4>
<pre>public final <a href="../../../../org/apache/cassandra/metrics/LatencyMetrics.html" title="class in org.apache.cassandra.metrics">LatencyMetrics</a> casPropose</pre>
<div class="block">CAS Propose metrics</div>
</li>
</ul>
<a name="casCommit">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>casCommit</h4>
<pre>public final <a href="../../../../org/apache/cassandra/metrics/LatencyMetrics.html" title="class in org.apache.cassandra.metrics">LatencyMetrics</a> casCommit</pre>
<div class="block">CAS Commit metrics</div>
</li>
</ul>
<a name="coordinatorReadLatency">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>coordinatorReadLatency</h4>
<pre>public final com.codahale.metrics.Timer coordinatorReadLatency</pre>
</li>
</ul>
<a name="coordinatorScanLatency">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>coordinatorScanLatency</h4>
<pre>public final com.codahale.metrics.Timer coordinatorScanLatency</pre>
</li>
</ul>
<a name="waitingOnFreeMemtableSpace">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>waitingOnFreeMemtableSpace</h4>
<pre>public final com.codahale.metrics.Histogram waitingOnFreeMemtableSpace</pre>
<div class="block">Time spent waiting for free memtable space, either on- or off-heap</div>
</li>
</ul>
<a name="droppedMutations">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>droppedMutations</h4>
<pre>public final com.codahale.metrics.Counter droppedMutations</pre>
<div class="block">Dropped Mutations Count</div>
</li>
</ul>
<a name="speculativeRetries">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>speculativeRetries</h4>
<pre>public final com.codahale.metrics.Counter speculativeRetries</pre>
</li>
</ul>
<a name="globalReadLatency">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>globalReadLatency</h4>
<pre>public static final <a href="../../../../org/apache/cassandra/metrics/LatencyMetrics.html" title="class in org.apache.cassandra.metrics">LatencyMetrics</a> globalReadLatency</pre>
</li>
</ul>
<a name="globalWriteLatency">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>globalWriteLatency</h4>
<pre>public static final <a href="../../../../org/apache/cassandra/metrics/LatencyMetrics.html" title="class in org.apache.cassandra.metrics">LatencyMetrics</a> globalWriteLatency</pre>
</li>
</ul>
<a name="globalRangeLatency">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>globalRangeLatency</h4>
<pre>public static final <a href="../../../../org/apache/cassandra/metrics/LatencyMetrics.html" title="class in org.apache.cassandra.metrics">LatencyMetrics</a> globalRangeLatency</pre>
</li>
</ul>
<a name="samplers">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>samplers</h4>
<pre>public final java.util.Map<<a href="../../../../org/apache/cassandra/metrics/TableMetrics.Sampler.html" title="enum in org.apache.cassandra.metrics">TableMetrics.Sampler</a>,<a href="../../../../org/apache/cassandra/utils/TopKSampler.html" title="class in org.apache.cassandra.utils">TopKSampler</a><java.nio.ByteBuffer>> samplers</pre>
</li>
</ul>
<a name="allTableMetrics">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>allTableMetrics</h4>
<pre>public static final java.util.concurrent.ConcurrentMap<java.lang.String,java.util.Set<com.codahale.metrics.Metric>> allTableMetrics</pre>
<div class="block">stores metrics that will be rolled into a single global metric</div>
</li>
</ul>
<a name="all">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>all</h4>
<pre>public static final java.util.Map<java.lang.String,java.lang.String> all</pre>
<div class="block">Stores all metric names created that can be used when unregistering, optionally mapped to an alias name.</div>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="TableMetrics-org.apache.cassandra.db.ColumnFamilyStore-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>TableMetrics</h4>
<pre>public TableMetrics(<a href="../../../../org/apache/cassandra/db/ColumnFamilyStore.html" title="class in org.apache.cassandra.db">ColumnFamilyStore</a> cfs)</pre>
<div class="block">Creates metrics for given <a href="../../../../org/apache/cassandra/db/ColumnFamilyStore.html" title="class in org.apache.cassandra.db"><code>ColumnFamilyStore</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>cfs</code> - ColumnFamilyStore to measure metrics</dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="updateSSTableIterated-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>updateSSTableIterated</h4>
<pre>public void updateSSTableIterated(int count)</pre>
</li>
</ul>
<a name="release--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>release</h4>
<pre>public void release()</pre>
<div class="block">Release all associated metrics.</div>
</li>
</ul>
<a name="createTableGauge-java.lang.String-com.codahale.metrics.Gauge-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createTableGauge</h4>
<pre>protected <T extends java.lang.Number> com.codahale.metrics.Gauge<T> createTableGauge(java.lang.String name,
com.codahale.metrics.Gauge<T> gauge)</pre>
<div class="block">Create a gauge that will be part of a merged version of all column families. The global gauge
will merge each CF gauge by adding their values</div>
</li>
</ul>
<a name="createTableGauge-java.lang.String-com.codahale.metrics.Gauge-com.codahale.metrics.Gauge-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createTableGauge</h4>
<pre>protected <G,T> com.codahale.metrics.Gauge<T> createTableGauge(java.lang.String name,
com.codahale.metrics.Gauge<T> gauge,
com.codahale.metrics.Gauge<G> globalGauge)</pre>
<div class="block">Create a gauge that will be part of a merged version of all column families. The global gauge
is defined as the globalGauge parameter</div>
</li>
</ul>
<a name="createTableGauge-java.lang.String-java.lang.String-com.codahale.metrics.Gauge-com.codahale.metrics.Gauge-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createTableGauge</h4>
<pre>protected <G,T> com.codahale.metrics.Gauge<T> createTableGauge(java.lang.String name,
java.lang.String alias,
com.codahale.metrics.Gauge<T> gauge,
com.codahale.metrics.Gauge<G> globalGauge)</pre>
</li>
</ul>
<a name="createTableCounter-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createTableCounter</h4>
<pre>protected com.codahale.metrics.Counter createTableCounter(java.lang.String name)</pre>
<div class="block">Creates a counter that will also have a global counter thats the sum of all counters across
different column families</div>
</li>
</ul>
<a name="createTableCounter-java.lang.String-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createTableCounter</h4>
<pre>protected com.codahale.metrics.Counter createTableCounter(java.lang.String name,
java.lang.String alias)</pre>
</li>
</ul>
<a name="createTableHistogram-java.lang.String-com.codahale.metrics.Histogram-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createTableHistogram</h4>
<pre>protected <a href="../../../../org/apache/cassandra/metrics/TableMetrics.TableHistogram.html" title="class in org.apache.cassandra.metrics">TableMetrics.TableHistogram</a> createTableHistogram(java.lang.String name,
com.codahale.metrics.Histogram keyspaceHistogram,
boolean considerZeroes)</pre>
<div class="block">Create a histogram-like interface that will register both a CF, keyspace and global level
histogram and forward any updates to both</div>
</li>
</ul>
<a name="createTableHistogram-java.lang.String-java.lang.String-com.codahale.metrics.Histogram-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createTableHistogram</h4>
<pre>protected <a href="../../../../org/apache/cassandra/metrics/TableMetrics.TableHistogram.html" title="class in org.apache.cassandra.metrics">TableMetrics.TableHistogram</a> createTableHistogram(java.lang.String name,
java.lang.String alias,
com.codahale.metrics.Histogram keyspaceHistogram,
boolean considerZeroes)</pre>
</li>
</ul>
<a name="createTableTimer-java.lang.String-com.codahale.metrics.Timer-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createTableTimer</h4>
<pre>protected <a href="../../../../org/apache/cassandra/metrics/TableMetrics.TableTimer.html" title="class in org.apache.cassandra.metrics">TableMetrics.TableTimer</a> createTableTimer(java.lang.String name,
com.codahale.metrics.Timer keyspaceTimer)</pre>
</li>
</ul>
<a name="createTableTimer-java.lang.String-java.lang.String-com.codahale.metrics.Timer-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>createTableTimer</h4>
<pre>protected <a href="../../../../org/apache/cassandra/metrics/TableMetrics.TableTimer.html" title="class in org.apache.cassandra.metrics">TableMetrics.TableTimer</a> createTableTimer(java.lang.String name,
java.lang.String alias,
com.codahale.metrics.Timer keyspaceTimer)</pre>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/TableMetrics.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/cassandra/metrics/StreamingMetrics.html" title="class in org.apache.cassandra.metrics"><span class="typeNameLink">Prev Class</span></a></li>
<li><a href="../../../../org/apache/cassandra/metrics/TableMetrics.Sampler.html" title="enum in org.apache.cassandra.metrics"><span class="typeNameLink">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/cassandra/metrics/TableMetrics.html" target="_top">Frames</a></li>
<li><a href="TableMetrics.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>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li><a href="#nested.class.summary">Nested</a> | </li>
<li><a href="#field.summary">Field</a> | </li>
<li><a href="#constructor.summary">Constr</a> | </li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li><a href="#field.detail">Field</a> | </li>
<li><a href="#constructor.detail">Constr</a> | </li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright © 2016 The Apache Software Foundation</small></p>
</body>
</html>
| {
"content_hash": "c7be8f7249540aa1eb09fc1a8f4eea6a",
"timestamp": "",
"source": "github",
"line_count": 1399,
"max_line_length": 391,
"avg_line_length": 46.95925661186562,
"alnum_prop": 0.6972875060886508,
"repo_name": "jasonwee/videoOnCloud",
"id": "8778c180a7dc2da8b583c9eb5cc7cef6ad621926",
"size": "65696",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "ahkl/apache-cassandra-3.5/javadoc/org/apache/cassandra/metrics/TableMetrics.html",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "116270"
},
{
"name": "C",
"bytes": "2209717"
},
{
"name": "C++",
"bytes": "375267"
},
{
"name": "CSS",
"bytes": "1134648"
},
{
"name": "Dockerfile",
"bytes": "1656"
},
{
"name": "HTML",
"bytes": "306558398"
},
{
"name": "Java",
"bytes": "1465506"
},
{
"name": "JavaScript",
"bytes": "9028509"
},
{
"name": "Jupyter Notebook",
"bytes": "30907"
},
{
"name": "Less",
"bytes": "107003"
},
{
"name": "PHP",
"bytes": "856"
},
{
"name": "PowerShell",
"bytes": "77807"
},
{
"name": "Pug",
"bytes": "2968"
},
{
"name": "Python",
"bytes": "1001861"
},
{
"name": "R",
"bytes": "7390"
},
{
"name": "Roff",
"bytes": "3553"
},
{
"name": "Shell",
"bytes": "206191"
},
{
"name": "Thrift",
"bytes": "80564"
},
{
"name": "XSLT",
"bytes": "4740"
}
],
"symlink_target": ""
} |
static float ffmax( float a, float b )
{
return a > b ? a : b;
}
void DoParticles( QVector pos, float percent, const Vector &velocity, float radial_size, float particle_size, int faction )
{
percent = 1-percent;
int i = rand();
static float scale = XMLSupport::parse_float( vs_config->getVariable( "graphics", "sparklescale", "8" ) );
static float sspeed = XMLSupport::parse_float( vs_config->getVariable( "graphics", "sparklespeed", ".5" ) );
static float flare = XMLSupport::parse_float( vs_config->getVariable( "graphics", "sparkleflare", ".15" ) );
static float spread = XMLSupport::parse_float( vs_config->getVariable( "graphics", "sparklespread", ".04" ) );
static float absspeed = XMLSupport::parse_float( vs_config->getVariable( "graphics", "sparkleabsolutespeed", ".02" ) );
static bool fixed_size = XMLSupport::parse_bool( vs_config->getVariable( "graphics", "sparklefixedsize", "0" ) );
if (i < RAND_MAX*percent*scale) {
ParticlePoint pp;
float r1 = rand()/( (float) RAND_MAX*.5 )-1;
float r2 = rand()/( (float) RAND_MAX*.5 )-1;
float r3 = rand()/( (float) RAND_MAX*.5 )-1;
QVector rand( r1, r2, r3 );
pp.loc = pos+rand*radial_size*flare;
const float *col = FactionUtil::GetSparkColor( faction );
pp.col.r = col[0];
pp.col.g = col[1];
pp.col.b = col[2];
pp.col.a = 1.0f;
static float sciz = XMLSupport::parse_float( vs_config->getVariable( "graphics", "sparklesizeenginerelative", ".125" ) );
particleTrail.AddParticle( pp, rand*(ffmax(
velocity.Magnitude(),
absspeed )*spread+absspeed)+velocity*sspeed,
fixed_size ? sciz : (sqrt( particle_size )*sciz) );
}
}
void LaunchOneParticle( const Matrix &mat, const Vector &vel, unsigned int seed, Unit *mush, float hull, int faction )
{
static float sciz =
XMLSupport::parse_float( vs_config->getVariable( "graphics", "sparkleenginesizerelativetoship", "0.1875" ) );
if (mush) {
bool done = false;
collideTrees *colTrees = mush->colTrees;
if (colTrees) {
if ( colTrees->usingColTree() ) {
csOPCODECollider *colTree = colTrees->rapidColliders[0];
unsigned int numvert = colTree->getNumVertex();
if (numvert) {
unsigned int whichvert = seed%numvert;
QVector v( colTree->getVertex( whichvert ).Cast() );
v = Transform( mat, v );
DoParticles( v, hull, vel, 0, mush->rSize()*sciz, faction );
done = true;
}
}
}
if (!done) {
// maybe ray collision?
}
if (!done) {
unsigned int siz = (unsigned int) ( 2*mush->rSize() );
if (siz != 0) {
QVector v( (seed%siz)-siz/2,
(seed%siz)-siz/2,
(seed%siz)-siz/2 );
DoParticles( v, hull, vel, 0, mush->rSize()*sciz, faction );
done = true;
}
}
}
}
HaloSystem::HaloSystem()
{
VSCONSTRUCT2( 'h' )
mesh = NULL;
activation = 0;
oscale = 0;
sparkle_accum = 0;
}
MyIndHalo::MyIndHalo( const QVector &loc, const Vector &size )
{
this->loc = loc;
this->size = size;
}
unsigned int HaloSystem::AddHalo( const char *filename,
const QVector &loc,
const Vector &size,
const GFXColor &col,
std::string type,
float activation_accel )
{
#ifdef CAR_SIM
ani.push_back( new Animation( "flare6.ani", 1, .1, MIPMAP, true, true, col ) );
ani.back()->SetDimensions( size.i, size.j );
ani.back()->SetPosition( loc );
halo_type.push_back( CAR::type_map.lookup( type ) ); //should default to headlights
#endif
if (mesh == NULL) {
int neutralfac = FactionUtil::GetNeutralFaction();
mesh = Mesh::LoadMesh( ( string( filename ) ).c_str(), Vector( 1, 1, 1 ), neutralfac, NULL );
static float gs = XMLSupport::parse_float( vs_config->getVariable( "physics", "game_speed", "1" ) );
activation = activation_accel*gs;
}
static float engine_scale = XMLSupport::parse_float( vs_config->getVariable( "graphics", "engine_radii_scale", ".4" ) );
static float engine_length = XMLSupport::parse_float( vs_config->getVariable( "graphics", "engine_length_scale", "1.25" ) );
halo.push_back( MyIndHalo( loc, Vector( size.i*engine_scale, size.j*engine_scale, size.k*engine_length ) ) );
return halo.size()-1;
}
using std::vector;
void HaloSystem::SetSize( unsigned int which, const Vector &size )
{
halo[which].size = size;
#ifdef CAR_SIM
ani[which]->SetDimensions( size.i, size.j );
#endif
}
void HaloSystem::SetPosition( unsigned int which, const QVector &loc )
{
halo[which].loc = loc;
#ifdef CAR_SIM
ani[which]->SetPosition( loc );
#endif
}
static float mymin( float a, float b )
{
return a > b ? b : a;
}
static float mymax( float a, float b )
{
return a > b ? a : b;
}
static float HaloAccelSmooth( float linaccel, float olinaccel, float maxlinaccel )
{
linaccel = mymax( 0, mymin( maxlinaccel, linaccel ) ); //Clamp input, somehow, sometimes it's not clamped
float phase = pow( ( (linaccel > olinaccel) ? HALO_SMOOTHING_UP_FACTOR : HALO_SMOOTHING_DOWN_FACTOR ), GetElapsedTime() );
float olinaccel2;
if (linaccel > olinaccel)
olinaccel2 = mymin( linaccel, olinaccel+maxlinaccel*HALO_STEERING_UP_FACTOR );
else
olinaccel2 = mymax( linaccel, olinaccel-maxlinaccel*HALO_STEERING_DOWN_FACTOR );
linaccel = (1-phase)*linaccel+phase*olinaccel2;
linaccel = mymax( 0, mymin( maxlinaccel, linaccel ) );
return linaccel;
}
bool HaloSystem::ShouldDraw( const Matrix &trans,
const Vector &velocity,
const Vector &accel,
float maxaccel,
float maxvelocity )
{
static bool halos_by_velocity = XMLSupport::parse_bool( vs_config->getVariable( "graphics", "halos_by_velocity", "false" ) );
if (halo.size() == 0)
return false; //Any doubt?
Vector thrustvector = trans.getR().Normalize();
if (halos_by_velocity) {
float linvel = velocity.Dot( thrustvector );
return linvel > activation;
} else {
if (maxaccel <= 0) maxaccel = 1;
if (maxvelocity <= 0) maxvelocity = 1;
float linaccel = HaloAccelSmooth( accel.Dot( thrustvector )/maxaccel, oscale, 1.0f );
return linaccel > activation*maxaccel;
}
}
void HaloSystem::Draw( const Matrix &trans,
const Vector &scale,
int halo_alpha,
float nebdist,
float hullpercent,
const Vector &velocity,
const Vector &accel,
float maxaccel,
float maxvelocity,
int faction )
{
#ifdef CAR_SIM
for (unsigned int i = 0; i < ani.size(); ++i) {
int bitwise = scale.j;
int typ = 0;
#ifdef CAR_SIM
typ = halo_type[i];
#endif
bool drawnow = (typ == CAR::RUNNINGLIGHTS);
if ( (typ == CAR::BRAKE && scale.k < .01 && scale.k > -.01) )
drawnow = true;
if ( (typ == CAR::REVERSE && scale.k <= -.01) )
drawnow = true;
if (typ == CAR::HEADLIGHTS)
if ( scale.j >= CAR::ON_NO_BLINKEN
|| ( bitwise < CAR::ON_NO_BLINKEN && bitwise > 0 && (bitwise&CAR::FORWARD_BLINKEN) ) )
drawnow = true;
if (typ == CAR::SIREN)
if ( (bitwise > 0) && ( (bitwise >= CAR::ON_NO_BLINKEN) || (bitwise&CAR::SIREN_BLINKEN) ) )
drawnow = true;
float blink_prob = .8;
if (typ == CAR::RIGHTBLINK)
if ( (bitwise > 0) && (bitwise < CAR::ON_NO_BLINKEN) && (bitwise&CAR::RIGHT_BLINKEN) )
if (rand() < RAND_MAX*blink_prob)
drawnow = true;
if (typ == CAR::LEFTBLINK)
if ( (bitwise > 0) && (bitwise < CAR::ON_NO_BLINKEN) && (bitwise&CAR::LEFT_BLINKEN) )
if (rand() < RAND_MAX*blink_prob)
drawnow = true;
if (drawnow) {
ani[i]->SetPosition( Transform( trans, halo[i].loc ) );
ani[i]->SetDimensions( scale.i, scale.i );
ani[i]->Draw();
}
}
#else
if (halo_alpha >= 0) {
halo_alpha /= 2;
if ( (halo_alpha&0x1) == 0 )
halo_alpha += 1;
}
static bool halos_by_velocity = XMLSupport::parse_bool( vs_config->getVariable( "graphics", "halos_by_velocity", "false" ) );
Vector thrustvector = trans.getR().Normalize();
if (maxaccel <= 0) maxaccel = 1;
if (maxvelocity <= 0) maxvelocity = 1;
float value, maxvalue, minvalue;
if (halos_by_velocity) {
value = velocity.Dot( thrustvector );
maxvalue = sqrt( maxvelocity );
minvalue = activation;
} else {
oscale = HaloAccelSmooth( accel.Dot( thrustvector )/maxaccel, oscale, 1.0f );
value = oscale;
maxvalue = 1.0f;
minvalue = activation/maxaccel;
}
if ( (value > minvalue) && (scale.k > 0) ) {
vector< MyIndHalo >::iterator i = halo.begin();
for (; i != halo.end(); ++i) {
Matrix m = trans;
ScaleMatrix( m, Vector( scale.i*i->size.i, scale.j*i->size.j, scale.k*i->size.k*value/maxvalue ) );
m.p = Transform( trans, i->loc );
static float percentColorChange=XMLSupport::parse_float(vs_config->getVariable("graphics","percent_afterburner_color_change",".5"));
static float abRedness=XMLSupport::parse_float(vs_config->getVariable("graphics","afterburner_color_red","1.0"));
static float abGreenness=XMLSupport::parse_float(vs_config->getVariable("graphics","afterburner_color_green","0.0"));
static float abBlueness=XMLSupport::parse_float(vs_config->getVariable("graphics","afterburner_color_blue","0.0"));
static float percentRedness=XMLSupport::parse_float(vs_config->getVariable("graphics","engine_color_red","1.0"));
static float percentGreenness=XMLSupport::parse_float(vs_config->getVariable("graphics","engine_color_green","1.0"));
static float percentBlueness=XMLSupport::parse_float(vs_config->getVariable("graphics","engine_color_blue","1.0"));
GFXColor blend=GFXColor(percentRedness,percentGreenness,percentBlueness,1);
if (value>maxvalue*percentColorChange) {
float test=value-maxvalue*percentColorChange;
test/=maxvalue*percentColorChange;
if (!(test<1.0)) test=1.0;
blend=GFXColor(abRedness*test+percentRedness*(1.0-test),abGreenness*test+percentGreenness*(1.0-test),abBlueness*test+percentBlueness*(1.0-test),1.0);
}
MeshFX xtraFX=MeshFX(1.0,1.0,
true,
GFXColor(1,1,1,1),
GFXColor(1,1,1,1),
GFXColor(1,1,1,1),
blend);
mesh->Draw( 50000000000000.0, m, 1, halo_alpha, nebdist, 0,false,&xtraFX );
if (hullpercent < .99) {
static float sparklerate = XMLSupport::parse_float( vs_config->getVariable( "graphics", "halosparklerate", "20" ) );
sparkle_accum += GetElapsedTime()*sparklerate;
int spawn = (int) (sparkle_accum);
sparkle_accum -= spawn;
while (spawn-- > 0)
DoParticles( m.p, hullpercent, velocity, mesh->rSize()*scale.i, mesh->rSize()*scale.i, faction );
}
}
}
#endif
}
HaloSystem::~HaloSystem()
{
#ifdef CAR_SIM
for (unsigned int i = 0; i < ani.size(); i++)
delete ani[i];
ani.clear();
#endif
VSDESTRUCT2
if (mesh)
delete mesh;
}
| {
"content_hash": "a5a4f6d4268e64f78c7c72434204f567",
"timestamp": "",
"source": "github",
"line_count": 290,
"max_line_length": 165,
"avg_line_length": 42.9,
"alnum_prop": 0.5494735149907564,
"repo_name": "Ezeer/VegaStrike_win32FR",
"id": "7cc05dc5fa59b63a75610193b0c2b4263f76639e",
"size": "13118",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "vegastrike/src/gfx/halo_system.cpp",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "4197693"
},
{
"name": "C++",
"bytes": "99169723"
},
{
"name": "Objective-C",
"bytes": "135840"
},
{
"name": "Perl",
"bytes": "21684"
},
{
"name": "Python",
"bytes": "186872"
},
{
"name": "Shell",
"bytes": "114240"
},
{
"name": "Standard ML",
"bytes": "2678"
}
],
"symlink_target": ""
} |
package cruise.umple.umple;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Anonymous guard 1</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* <ul>
* <li>{@link cruise.umple.umple.Anonymous_guard_1_#getCodeLang_1 <em>Code Lang 1</em>}</li>
* <li>{@link cruise.umple.umple.Anonymous_guard_1_#getCodeLangs_1 <em>Code Langs 1</em>}</li>
* </ul>
* </p>
*
* @see cruise.umple.umple.UmplePackage#getAnonymous_guard_1_()
* @model
* @generated
*/
public interface Anonymous_guard_1_ extends EObject
{
/**
* Returns the value of the '<em><b>Code Lang 1</b></em>' containment reference list.
* The list contents are of type {@link cruise.umple.umple.CodeLang_}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Code Lang 1</em>' containment reference list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Code Lang 1</em>' containment reference list.
* @see cruise.umple.umple.UmplePackage#getAnonymous_guard_1__CodeLang_1()
* @model containment="true"
* @generated
*/
EList<CodeLang_> getCodeLang_1();
/**
* Returns the value of the '<em><b>Code Langs 1</b></em>' containment reference list.
* The list contents are of type {@link cruise.umple.umple.CodeLangs_}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Code Langs 1</em>' containment reference list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Code Langs 1</em>' containment reference list.
* @see cruise.umple.umple.UmplePackage#getAnonymous_guard_1__CodeLangs_1()
* @model containment="true"
* @generated
*/
EList<CodeLangs_> getCodeLangs_1();
} // Anonymous_guard_1_
| {
"content_hash": "5225e516b45d2af784ecc8eb8eaa051e",
"timestamp": "",
"source": "github",
"line_count": 59,
"max_line_length": 96,
"avg_line_length": 33.3728813559322,
"alnum_prop": 0.6465210766886744,
"repo_name": "ahmedvc/umple",
"id": "a46aa90811dd46bf22ccd90d0f560502e77a50a4",
"size": "2010",
"binary": false,
"copies": "4",
"ref": "refs/heads/master",
"path": "cruise.umple.xtext/src-gen/cruise/umple/umple/Anonymous_guard_1_.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ApacheConf",
"bytes": "414"
},
{
"name": "CSS",
"bytes": "79771"
},
{
"name": "GAP",
"bytes": "1064953"
},
{
"name": "HTML",
"bytes": "2051125"
},
{
"name": "Java",
"bytes": "40683436"
},
{
"name": "JavaScript",
"bytes": "1550699"
},
{
"name": "Lex",
"bytes": "11050"
},
{
"name": "Matlab",
"bytes": "1160"
},
{
"name": "PHP",
"bytes": "450839"
},
{
"name": "Ruby",
"bytes": "365551"
},
{
"name": "Shell",
"bytes": "5247"
},
{
"name": "Xtend",
"bytes": "351"
}
],
"symlink_target": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.