text
stringlengths 2
100k
| meta
dict |
---|---|
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>planner.el whoops</title>
<!-- 2015-10-19 Mon 13:59 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="generator" content="Org-mode" />
<link rel="stylesheet" type="text/css" href="../css/foundation.min.css"></link>
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'></link>
<link rel="stylesheet" type="text/css" href="../css/org-export.css"></link>
<link rel="stylesheet" type="text/css" href="../css/style.css"></link>
<link rel="stylesheet" type="text/css" href="../css/emacs-notes.css"></link>
<script src="../js/jquery.min.js"></script>
<script src="../js/emacs-notes.js"></script>
</head>
<body>
<div id="content">
<h1 class="title">planner.el whoops</h1>
<p>
November 20th, 2003 -
<a href="http://sachachua.com/blog/p/1378"><a href="http://sachachua.com/blog/p/1378">http://sachachua.com/blog/p/1378</a></a>
</p>
<p>
Referred to old way of favoring future dates. Silly me. Forgot I renamed
that. Tsk tsk tsk.
</p>
</div>
<div id="postamble" class="status">
<div class="back-to-top"><a href="#top">Back to top</a> | <a href="mailto:[email protected]">E-mail me</a></div>
</div>
</body>
</html>
| {
"pile_set_name": "Github"
} |
# Change Log
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased]
## [2.2.0] - 2019-04-22
- Make signals configurable by event callback (PR [#85](https://github.com/mjphaynes/php-resque/pull/85))
- Provide predis native configuration (PR [#88](https://github.com/mjphaynes/php-resque/pull/88))
- Add travis support and CS check (PR [#72](https://github.com/mjphaynes/php-resque/pull/72))
- Use pcntl_async_signals if available (PR [#65](https://github.com/mjphaynes/php-resque/pull/65))
- Fix cli_set_process_title error on macOS (PR [#92](https://github.com/mjphaynes/php-resque/pull/92))
## [2.1.2] - 2017-09-19
- Fix job processing of the last queue (Issue [#61](https://github.com/mjphaynes/php-resque/issues/61))
## [2.1.1] - 2017-08-31
- Fix "undefined index" notice (Issue [#59](https://github.com/mjphaynes/php-resque/issues/59))
## [2.1.0] - 2017-08-31
- Add JOB_DONE event (PR [#58](https://github.com/mjphaynes/php-resque/pull/58))
- Allow remote shutdown of workers (PR [#50](https://github.com/mjphaynes/php-resque/pull/50))
- Improve documentation
## [2.0.0] - 2017-03-01
- Update required Symfony components to 2.7+ or 3.x
- Update required Predis version to 1.1.x
- Change worker wait log level from INFO to DEBUG (Commit [4915d51](https://github.com/mjphaynes/php-resque/commit/4915d51ca2593a743cecbab9597ad6a1314bdbed))
- Add option to allow phpiredis support (Commit [4e22e0fb](https://github.com/mjphaynes/php-resque/commit/4e22e0fb31d8658c2a1ef73a5a44c927fd88d55c))
- Add option to set Redis read/write timeout (PR [#27](https://github.com/mjphaynes/php-resque/pull/27))
- Change code style to PSR-2 (PR [#25](https://github.com/mjphaynes/php-resque/pull/25))
- Fix closures with whitespace in their declaration (Issue [#30](https://github.com/mjphaynes/php-resque/issues/30))
- Fix job stability by reconnecting to redis after forking (Commit [cadfb09e](https://github.com/mjphaynes/php-resque/commit/cadfb09e81152cf902ef7f20e6883d29e6d1373b))
- Fix crash if the status is not set (Commit [cadfb09e](https://github.com/mjphaynes/php-resque/commit/cadfb09e81152cf902ef7f20e6883d29e6d1373b))
- Improve code style to increase PSR-2 compliance (Commit [36daf9a](https://github.com/mjphaynes/php-resque/commit/36daf9a23128e75eab15522ecc595ece8e4b6874))
- Add this changelog!
## [1.3.0] - 2016-01-22
- Remove optional proctitle extension dependency (PR #18)
## [1.2.4] - 2015-04-17
- Monolog line break fix
## [1.2.3] - 2015-04-02
- Monolog composer fix
## [1.2.2] - 2014-11-05
- Dev dependencies bug fix
## [1.2.1] - 2014-11-05
- Dependencies bug fix
## [1.2.0] - 2014-11-05
- Updated symfony dependencies
## [1.1.3] - 2014-06-23
- ob_clean fix
## [1.1.2] - 2014-06-23
- Config file error fix
## [1.1.1] - 2014-06-23
- Autoload directory fix
## [1.1.0] - 2014-02-18
- Bump lib versions for Monolog & Symfony
## 1.0.0 - 2013-10-09
- First public release of php-resque
[Unreleased]: https://github.com/mjphaynes/php-resque/compare/2.2.0...HEAD
[2.2.0]: https://github.com/mjphaynes/php-resque/compare/2.1.2...2.2.0
[2.1.2]: https://github.com/mjphaynes/php-resque/compare/2.1.1...2.1.2
[2.1.1]: https://github.com/mjphaynes/php-resque/compare/2.1.0...2.1.1
[2.1.0]: https://github.com/mjphaynes/php-resque/compare/2.0.0...2.1.0
[2.0.0]: https://github.com/mjphaynes/php-resque/compare/1.3.0...2.0.0
[1.3.0]: https://github.com/mjphaynes/php-resque/compare/1.2.4...1.3.0
[1.2.4]: https://github.com/mjphaynes/php-resque/compare/1.2.3...1.2.4
[1.2.3]: https://github.com/mjphaynes/php-resque/compare/1.2.2...1.2.3
[1.2.2]: https://github.com/mjphaynes/php-resque/compare/1.2.1...1.2.2
[1.2.1]: https://github.com/mjphaynes/php-resque/compare/1.2.0...1.2.1
[1.2.0]: https://github.com/mjphaynes/php-resque/compare/1.1.3...1.2.0
[1.1.3]: https://github.com/mjphaynes/php-resque/compare/1.1.2...1.1.3
[1.1.2]: https://github.com/mjphaynes/php-resque/compare/1.1.1...1.1.2
[1.1.1]: https://github.com/mjphaynes/php-resque/compare/1.1.0...1.1.1
[1.1.0]: https://github.com/mjphaynes/php-resque/compare/1.0.0...1.1.0
| {
"pile_set_name": "Github"
} |
rows = {[2.640456e+002
2.290894e+002
2.270919e+002
2.260931e+002
2.250944e+002
2.250944e+002
2.260931e+002
2.270919e+002
2.330844e+002
2.350819e+002
2.380781e+002
2.410744e+002
2.450694e+002
2.520606e+002
2.560556e+002
2.600506e+002
2.640456e+002
2.690394e+002
2.780281e+002
2.830219e+002
2.880156e+002
2.980031e+002
3.029969e+002
3.069919e+002
3.119856e+002
3.209744e+002
3.259681e+002
3.299631e+002
3.339581e+002
3.379531e+002
3.429469e+002
3.449444e+002
3.469419e+002
3.479406e+002
3.479406e+002
3.489394e+002
3.479406e+002
3.469419e+002
3.449444e+002
3.429469e+002
3.389519e+002
3.359556e+002
3.329594e+002
3.259681e+002
3.219731e+002
3.179781e+002
3.129844e+002
3.089894e+002
3.049944e+002
3.000006e+002
2.970044e+002
2.930094e+002
2.890144e+002
2.860181e+002
2.810244e+002
2.790269e+002
2.770294e+002
2.750319e+002
2.740331e+002
2.730344e+002
2.750319e+002
2.760306e+002
2.780281e+002
2.810244e+002
2.840206e+002
2.870169e+002
2.900131e+002
2.940081e+002
2.980031e+002
3.079906e+002
3.179781e+002
3.239706e+002
3.289644e+002
3.349569e+002
3.479406e+002
3.549319e+002
3.609244e+002
3.739081e+002
3.808994e+002
3.878906e+002
4.008744e+002
4.078656e+002
4.148569e+002
4.278406e+002
4.338331e+002
4.398256e+002
4.518106e+002
4.568044e+002
4.627969e+002
4.727844e+002
4.777781e+002
4.817731e+002
4.907619e+002
4.947569e+002
5.027469e+002
5.057431e+002
5.087394e+002
5.127344e+002
5.147319e+002
5.157306e+002
5.167294e+002
5.157306e+002
5.147319e+002
5.137331e+002
5.117356e+002
5.087394e+002
5.077406e+002
5.057431e+002
5.007494e+002
4.987519e+002
4.957556e+002
4.897631e+002
4.877656e+002
4.827719e+002
4.807744e+002
4.777781e+002
4.747819e+002
4.707869e+002
4.677906e+002
4.657931e+002
];
};
cols = {[4.279656e+002
4.129844e+002
4.079906e+002
4.049944e+002
3.960056e+002
3.930094e+002
3.890144e+002
3.850194e+002
3.730344e+002
3.690394e+002
3.650444e+002
3.610494e+002
3.570544e+002
3.510619e+002
3.490644e+002
3.470669e+002
3.450694e+002
3.430719e+002
3.400756e+002
3.390769e+002
3.380781e+002
3.370794e+002
3.370794e+002
3.380781e+002
3.390769e+002
3.410744e+002
3.430719e+002
3.450694e+002
3.470669e+002
3.500631e+002
3.570544e+002
3.610494e+002
3.660431e+002
3.700381e+002
3.750319e+002
3.800256e+002
3.890144e+002
3.930094e+002
3.970044e+002
4.019981e+002
4.089894e+002
4.129844e+002
4.169794e+002
4.229719e+002
4.249694e+002
4.279656e+002
4.299631e+002
4.319606e+002
4.339581e+002
4.349569e+002
4.359556e+002
4.369544e+002
4.379531e+002
4.379531e+002
4.389519e+002
4.399506e+002
4.399506e+002
4.399506e+002
4.399506e+002
4.399506e+002
4.399506e+002
4.399506e+002
4.409494e+002
4.409494e+002
4.409494e+002
4.409494e+002
4.409494e+002
4.409494e+002
4.409494e+002
4.419481e+002
4.419481e+002
4.419481e+002
4.419481e+002
4.419481e+002
4.419481e+002
4.409494e+002
4.409494e+002
4.389519e+002
4.379531e+002
4.369544e+002
4.339581e+002
4.319606e+002
4.299631e+002
4.249694e+002
4.229719e+002
4.199756e+002
4.129844e+002
4.099881e+002
4.059931e+002
3.960056e+002
3.910119e+002
3.850194e+002
3.730344e+002
3.670419e+002
3.540581e+002
3.480656e+002
3.410744e+002
3.280906e+002
3.210994e+002
3.151069e+002
3.021231e+002
2.961306e+002
2.831469e+002
2.771544e+002
2.711619e+002
2.591769e+002
2.541831e+002
2.481906e+002
2.392019e+002
2.352069e+002
2.312119e+002
2.242206e+002
2.222231e+002
2.172294e+002
2.152319e+002
2.142331e+002
2.132344e+002
2.142331e+002
2.152319e+002
2.162306e+002
];
};
| {
"pile_set_name": "Github"
} |
#include "Graphics.h"
#include <cmath>
#include <iostream>
#include <cstdlib>
#include <cstring>
#include <bzlib.h>
#include "FontReader.h"
#ifdef HIGH_QUALITY_RESAMPLE
#include "resampler/resampler.h"
#endif
VideoBuffer::VideoBuffer(int width, int height):
Width(width),
Height(height)
{
Buffer = new pixel[width*height];
std::fill(Buffer, Buffer+(width*height), 0);
};
VideoBuffer::VideoBuffer(const VideoBuffer & old):
Width(old.Width),
Height(old.Height)
{
Buffer = new pixel[old.Width*old.Height];
std::copy(old.Buffer, old.Buffer+(old.Width*old.Height), Buffer);
};
VideoBuffer::VideoBuffer(VideoBuffer * old):
Width(old->Width),
Height(old->Height)
{
Buffer = new pixel[old->Width*old->Height];
std::copy(old->Buffer, old->Buffer+(old->Width*old->Height), Buffer);
};
VideoBuffer::VideoBuffer(pixel * buffer, int width, int height):
Width(width),
Height(height)
{
Buffer = new pixel[width*height];
std::copy(buffer, buffer+(width*height), Buffer);
}
void VideoBuffer::Resize(float factor, bool resample)
{
int newWidth = ((float)Width)*factor;
int newHeight = ((float)Height)*factor;
Resize(newWidth, newHeight, resample);
}
void VideoBuffer::Resize(int width, int height, bool resample, bool fixedRatio)
{
int newWidth = width;
int newHeight = height;
pixel * newBuffer;
if(newHeight == -1 && newWidth == -1)
return;
if(newHeight == -1 || newWidth == -1)
{
if(newHeight == -1)
newHeight = ((float)Height)*((float)newWidth/(float)Width);
if(newWidth == -1)
newWidth = ((float)Width)*((float)newHeight/(float)Height);
}
else if(fixedRatio)
{
//Force proportions
if(newWidth*Height > newHeight*Width) // same as nW/W > nH/H
newWidth = (int)(Width * (newHeight/(float)Height));
else
newHeight = (int)(Height * (newWidth/(float)Width));
}
if(resample)
newBuffer = Graphics::resample_img(Buffer, Width, Height, newWidth, newHeight);
else
newBuffer = Graphics::resample_img_nn(Buffer, Width, Height, newWidth, newHeight);
if(newBuffer)
{
delete[] Buffer;
Buffer = newBuffer;
Width = newWidth;
Height = newHeight;
}
}
int VideoBuffer::SetCharacter(int x, int y, String::value_type c, int r, int g, int b, int a)
{
FontReader reader(c);
for (int j = -2; j < FONT_H - 2; j++)
for (int i = 0; i < reader.GetWidth(); i++)
SetPixel(x + i, y + j, r, g, b, reader.NextPixel() * a / 3);
return x + reader.GetWidth();
}
int VideoBuffer::BlendCharacter(int x, int y, String::value_type c, int r, int g, int b, int a)
{
FontReader reader(c);
for (int j = -2; j < FONT_H - 2; j++)
for (int i = 0; i < reader.GetWidth(); i++)
BlendPixel(x + i, y + j, r, g, b, reader.NextPixel() * a / 3);
return x + reader.GetWidth();
}
int VideoBuffer::AddCharacter(int x, int y, String::value_type c, int r, int g, int b, int a)
{
FontReader reader(c);
for (int j = -2; j < FONT_H - 2; j++)
for (int i = 0; i < reader.GetWidth(); i++)
AddPixel(x + i, y + j, r, g, b, reader.NextPixel() * a / 3);
return x + reader.GetWidth();
}
VideoBuffer::~VideoBuffer()
{
delete[] Buffer;
}
/**
* Common graphics functions, mostly static methods that provide
* encoding/decoding of different formats and font metrics
*/
char * Graphics::GenerateGradient(pixel * colours, float * points, int pointcount, int size)
{
int cp, i, j;
pixel ptemp;
char * newdata = (char*)malloc(size * 3);
float poss, pose, temp;
memset(newdata, 0, size*3);
//Sort the Colours and Points
for (i = (pointcount - 1); i > 0; i--)
{
for (j = 1; j <= i; j++)
{
if (points[j-1] > points[j])
{
temp = points[j-1];
points[j-1] = points[j];
points[j] = temp;
ptemp = colours[j-1];
colours[j-1] = colours[j];
colours[j] = ptemp;
}
}
}
i = 0;
j = 1;
poss = points[i];
pose = points[j];
for (cp = 0; cp < size; cp++)
{
float cpos = (float)cp / (float)size, ccpos, cccpos;
if(cpos > pose && j+1 < pointcount)
{
poss = points[++i];
pose = points[++j];
}
ccpos = cpos - poss;
cccpos = ccpos / (pose - poss);
if(cccpos > 1.0f)
cccpos = 1.0f;
newdata[(cp*3)] = PIXR(colours[i])*(1.0f-cccpos) + PIXR(colours[j])*(cccpos);
newdata[(cp*3)+1] = PIXG(colours[i])*(1.0f-cccpos) + PIXG(colours[j])*(cccpos);
newdata[(cp*3)+2] = PIXB(colours[i])*(1.0f-cccpos) + PIXB(colours[j])*(cccpos);
}
return newdata;
}
void *Graphics::ptif_pack(pixel *src, int w, int h, int *result_size){
int i = 0, datalen = (w*h)*3, cx = 0, cy = 0;
unsigned char *red_chan = (unsigned char*)calloc(1, w*h);
unsigned char *green_chan = (unsigned char*)calloc(1, w*h);
unsigned char *blue_chan = (unsigned char*)calloc(1, w*h);
unsigned char *data = (unsigned char*)malloc(((w*h)*3)+8);
unsigned char *result = (unsigned char*)malloc(((w*h)*3)+8);
for(cx = 0; cx<w; cx++){
for(cy = 0; cy<h; cy++){
red_chan[w*(cy)+(cx)] = PIXR(src[w*(cy)+(cx)]);
green_chan[w*(cy)+(cx)] = PIXG(src[w*(cy)+(cx)]);
blue_chan[w*(cy)+(cx)] = PIXB(src[w*(cy)+(cx)]);
}
}
memcpy(data, red_chan, w*h);
memcpy(data+(w*h), green_chan, w*h);
memcpy(data+((w*h)*2), blue_chan, w*h);
free(red_chan);
free(green_chan);
free(blue_chan);
result[0] = 'P';
result[1] = 'T';
result[2] = 'i';
result[3] = 1;
result[4] = w;
result[5] = w>>8;
result[6] = h;
result[7] = h>>8;
i -= 8;
if(BZ2_bzBuffToBuffCompress((char *)(result+8), (unsigned *)&i, (char *)data, datalen, 9, 0, 0) != 0){
free(data);
free(result);
return NULL;
}
*result_size = i+8;
free(data);
return result;
}
pixel *Graphics::ptif_unpack(void *datain, int size, int *w, int *h){
int width, height, i, cx, cy, resCode;
unsigned char *red_chan;
unsigned char *green_chan;
unsigned char *blue_chan;
unsigned char *data = (unsigned char*)datain;
unsigned char *undata;
pixel *result;
if(size<16){
printf("Image empty\n");
return NULL;
}
if(!(data[0]=='P' && data[1]=='T' && data[2]=='i')){
printf("Image header invalid\n");
return NULL;
}
width = data[4]|(data[5]<<8);
height = data[6]|(data[7]<<8);
i = (width*height)*3;
undata = (unsigned char*)calloc(1, (width*height)*3);
red_chan = (unsigned char*)calloc(1, width*height);
green_chan = (unsigned char*)calloc(1, width*height);
blue_chan = (unsigned char *)calloc(1, width*height);
result = (pixel *)calloc(width*height, PIXELSIZE);
resCode = BZ2_bzBuffToBuffDecompress((char *)undata, (unsigned *)&i, (char *)(data+8), size-8, 0, 0);
if (resCode){
printf("Decompression failure, %d\n", resCode);
free(red_chan);
free(green_chan);
free(blue_chan);
free(undata);
free(result);
return NULL;
}
if(i != (width*height)*3){
printf("Result buffer size mismatch, %d != %d\n", i, (width*height)*3);
free(red_chan);
free(green_chan);
free(blue_chan);
free(undata);
free(result);
return NULL;
}
memcpy(red_chan, undata, width*height);
memcpy(green_chan, undata+(width*height), width*height);
memcpy(blue_chan, undata+((width*height)*2), width*height);
for(cx = 0; cx<width; cx++){
for(cy = 0; cy<height; cy++){
result[width*(cy)+(cx)] = PIXRGB(red_chan[width*(cy)+(cx)], green_chan[width*(cy)+(cx)], blue_chan[width*(cy)+(cx)]);
}
}
*w = width;
*h = height;
free(red_chan);
free(green_chan);
free(blue_chan);
free(undata);
return result;
}
pixel *Graphics::resample_img_nn(pixel * src, int sw, int sh, int rw, int rh)
{
int y, x;
pixel *q = NULL;
q = new pixel[rw*rh];
for (y=0; y<rh; y++)
for (x=0; x<rw; x++){
q[rw*y+x] = src[sw*(y*sh/rh)+(x*sw/rw)];
}
return q;
}
pixel *Graphics::resample_img(pixel *src, int sw, int sh, int rw, int rh)
{
#ifdef HIGH_QUALITY_RESAMPLE
unsigned char * source = (unsigned char*)src;
int sourceWidth = sw, sourceHeight = sh;
int resultWidth = rw, resultHeight = rh;
int sourcePitch = sourceWidth*PIXELSIZE, resultPitch = resultWidth*PIXELSIZE;
// Filter scale - values < 1.0 cause aliasing, but create sharper looking mips.
const float filter_scale = 0.75f;
const char* pFilter = "lanczos12";
Resampler * resamplers[PIXELCHANNELS];
float * samples[PIXELCHANNELS];
//Resampler for each colour channel
if (sourceWidth <= 0 || sourceHeight <= 0 || resultWidth <= 0 || resultHeight <= 0)
return NULL;
resamplers[0] = new Resampler(sourceWidth, sourceHeight, resultWidth, resultHeight, Resampler::BOUNDARY_CLAMP, 0.0f, 1.0f, pFilter, NULL, NULL, filter_scale, filter_scale);
samples[0] = new float[sourceWidth];
for (int i = 1; i < PIXELCHANNELS; i++)
{
resamplers[i] = new Resampler(sourceWidth, sourceHeight, resultWidth, resultHeight, Resampler::BOUNDARY_CLAMP, 0.0f, 1.0f, pFilter, resamplers[0]->get_clist_x(), resamplers[0]->get_clist_y(), filter_scale, filter_scale);
samples[i] = new float[sourceWidth];
}
unsigned char * resultImage = new unsigned char[resultHeight * resultPitch];
std::fill(resultImage, resultImage + (resultHeight*resultPitch), 0);
//Resample time
int resultY = 0;
for (int sourceY = 0; sourceY < sourceHeight; sourceY++)
{
unsigned char * sourcePixel = &source[sourceY * sourcePitch];
//Move pixel components into channel samples
for (int c = 0; c < PIXELCHANNELS; c++)
{
for (int x = 0; x < sourceWidth; x++)
{
samples[c][x] = sourcePixel[(x*PIXELSIZE)+c] * (1.0f/255.0f);
}
}
//Put channel sample data into resampler
for (int c = 0; c < PIXELCHANNELS; c++)
{
if (!resamplers[c]->put_line(&samples[c][0]))
{
printf("Out of memory!\n");
return NULL;
}
}
//Perform resample and Copy components from resampler result samples to image buffer
for ( ; ; )
{
int comp_index;
for (comp_index = 0; comp_index < PIXELCHANNELS; comp_index++)
{
const float* resultSamples = resamplers[comp_index]->get_line();
if (!resultSamples)
break;
unsigned char * resultPixel = &resultImage[(resultY * resultPitch) + comp_index];
for (int x = 0; x < resultWidth; x++)
{
int c = (int)(255.0f * resultSamples[x] + .5f);
if (c < 0) c = 0; else if (c > 255) c = 255;
*resultPixel = (unsigned char)c;
resultPixel += PIXELSIZE;
}
}
if (comp_index < PIXELCHANNELS)
break;
resultY++;
}
}
//Clean up
for(int i = 0; i < PIXELCHANNELS; i++)
{
delete resamplers[i];
delete[] samples[i];
}
return (pixel*)resultImage;
#else
#ifdef DEBUG
std::cout << "Resampling " << sw << "x" << sh << " to " << rw << "x" << rh << std::endl;
#endif
bool stairstep = false;
if(rw < sw || rh < sh)
{
float fx = (float)(((float)sw)/((float)rw));
float fy = (float)(((float)sh)/((float)rh));
int fxint, fyint;
double fxintp_t, fyintp_t;
float fxf = modf(fx, &fxintp_t), fyf = modf(fy, &fyintp_t);
fxint = fxintp_t;
fyint = fyintp_t;
if(((fxint & (fxint-1)) == 0 && fxf < 0.1f) || ((fyint & (fyint-1)) == 0 && fyf < 0.1f))
stairstep = true;
#ifdef DEBUG
if(stairstep)
std::cout << "Downsampling by " << fx << "x" << fy << " using stairstepping" << std::endl;
else
std::cout << "Downsampling by " << fx << "x" << fy << " without stairstepping" << std::endl;
#endif
}
int y, x, fxceil, fyceil;
//int i,j,x,y,w,h,r,g,b,c;
pixel *q = NULL;
if(rw == sw && rh == sh){
//Don't resample
q = new pixel[rw*rh];
std::copy(src, src+(rw*rh), q);
} else if(!stairstep) {
float fx, fy, fyc, fxc;
double intp;
pixel tr, tl, br, bl;
q = new pixel[rw*rh];
//Bilinear interpolation for upscaling
for (y=0; y<rh; y++)
for (x=0; x<rw; x++)
{
fx = ((float)x)*((float)sw)/((float)rw);
fy = ((float)y)*((float)sh)/((float)rh);
fxc = modf(fx, &intp);
fyc = modf(fy, &intp);
fxceil = (int)ceil(fx);
fyceil = (int)ceil(fy);
if (fxceil>=sw) fxceil = sw-1;
if (fyceil>=sh) fyceil = sh-1;
tr = src[sw*(int)floor(fy)+fxceil];
tl = src[sw*(int)floor(fy)+(int)floor(fx)];
br = src[sw*fyceil+fxceil];
bl = src[sw*fyceil+(int)floor(fx)];
q[rw*y+x] = PIXRGB(
(int)(((((float)PIXR(tl))*(1.0f-fxc))+(((float)PIXR(tr))*(fxc)))*(1.0f-fyc) + ((((float)PIXR(bl))*(1.0f-fxc))+(((float)PIXR(br))*(fxc)))*(fyc)),
(int)(((((float)PIXG(tl))*(1.0f-fxc))+(((float)PIXG(tr))*(fxc)))*(1.0f-fyc) + ((((float)PIXG(bl))*(1.0f-fxc))+(((float)PIXG(br))*(fxc)))*(fyc)),
(int)(((((float)PIXB(tl))*(1.0f-fxc))+(((float)PIXB(tr))*(fxc)))*(1.0f-fyc) + ((((float)PIXB(bl))*(1.0f-fxc))+(((float)PIXB(br))*(fxc)))*(fyc))
);
}
} else {
//Stairstepping
float fx, fy, fyc, fxc;
double intp;
pixel tr, tl, br, bl;
int rrw = rw, rrh = rh;
pixel * oq;
oq = new pixel[sw*sh];
std::copy(src, src+(sw*sh), oq);
rw = sw;
rh = sh;
while(rrw != rw && rrh != rh){
if(rw > rrw)
rw *= 0.7;
if(rh > rrh)
rh *= 0.7;
if(rw <= rrw)
rw = rrw;
if(rh <= rrh)
rh = rrh;
q = new pixel[rw*rh];
//Bilinear interpolation
for (y=0; y<rh; y++)
for (x=0; x<rw; x++)
{
fx = ((float)x)*((float)sw)/((float)rw);
fy = ((float)y)*((float)sh)/((float)rh);
fxc = modf(fx, &intp);
fyc = modf(fy, &intp);
fxceil = (int)ceil(fx);
fyceil = (int)ceil(fy);
if (fxceil>=sw) fxceil = sw-1;
if (fyceil>=sh) fyceil = sh-1;
tr = oq[sw*(int)floor(fy)+fxceil];
tl = oq[sw*(int)floor(fy)+(int)floor(fx)];
br = oq[sw*fyceil+fxceil];
bl = oq[sw*fyceil+(int)floor(fx)];
q[rw*y+x] = PIXRGB(
(int)(((((float)PIXR(tl))*(1.0f-fxc))+(((float)PIXR(tr))*(fxc)))*(1.0f-fyc) + ((((float)PIXR(bl))*(1.0f-fxc))+(((float)PIXR(br))*(fxc)))*(fyc)),
(int)(((((float)PIXG(tl))*(1.0f-fxc))+(((float)PIXG(tr))*(fxc)))*(1.0f-fyc) + ((((float)PIXG(bl))*(1.0f-fxc))+(((float)PIXG(br))*(fxc)))*(fyc)),
(int)(((((float)PIXB(tl))*(1.0f-fxc))+(((float)PIXB(tr))*(fxc)))*(1.0f-fyc) + ((((float)PIXB(bl))*(1.0f-fxc))+(((float)PIXB(br))*(fxc)))*(fyc))
);
}
delete[] oq;
oq = q;
sw = rw;
sh = rh;
}
}
return q;
#endif
}
pixel *Graphics::rescale_img(pixel *src, int sw, int sh, int *qw, int *qh, int f)
{
int i,j,x,y,w,h,r,g,b,c;
pixel p, *q;
w = (sw+f-1)/f;
h = (sh+f-1)/f;
q = (pixel *)malloc(w*h*PIXELSIZE);
for (y=0; y<h; y++)
for (x=0; x<w; x++)
{
r = g = b = c = 0;
for (j=0; j<f; j++)
for (i=0; i<f; i++)
if (x*f+i<sw && y*f+j<sh)
{
p = src[(y*f+j)*sw + (x*f+i)];
if (p)
{
r += PIXR(p);
g += PIXG(p);
b += PIXB(p);
c ++;
}
}
if (c>1)
{
r = (r+c/2)/c;
g = (g+c/2)/c;
b = (b+c/2)/c;
}
q[y*w+x] = PIXRGB(r, g, b);
}
*qw = w;
*qh = h;
return q;
}
int Graphics::textwidth(String str)
{
int x = 0;
String::value_type const *s = str.c_str();
for (; *s; s++)
{
if(((char)*s)=='\b')
{
if(!s[1]) break;
s++;
continue;
} else if(*s == '\x0F') {
if(!s[1] || !s[2] || !s[3]) break;
s+=3;
continue;
}
x += FontReader(*s).GetWidth();
}
return x-1;
}
int Graphics::CharWidth(String::value_type c)
{
return FontReader(c).GetWidth();
}
int Graphics::textnwidth(String str, int n)
{
int x = 0;
String::value_type const *s = str.c_str();
for (; *s; s++)
{
if (!n)
break;
if(((char)*s)=='\b')
{
if(!s[1]) break;
s++;
continue;
} else if(*s == '\x0F') {
if(!s[1] || !s[2] || !s[3]) break;
s+=3;
continue;
}
x += FontReader(*s).GetWidth();
n--;
}
return x-1;
}
void Graphics::textnpos(String str, int n, int w, int *cx, int *cy)
{
int x = 0;
int y = 0;
int wordlen, charspace;
String::value_type const *s = str.c_str();
while (*s&&n)
{
wordlen = 0;
while(*s && String(" .,!?\n").Contains(*s))
s++;
charspace = textwidthx(s, w-x);
if (charspace<wordlen && wordlen && w-x<w/3)
{
x = 0;
y += FONT_H;
}
for (; *s && --wordlen>=-1; s++)
{
if (!n) {
break;
}
x += FontReader(*s).GetWidth();
if (x>=w)
{
x = 0;
y += FONT_H;
}
n--;
}
}
*cx = x-1;
*cy = y;
}
int Graphics::textwidthx(String str, int w)
{
int x=0,n=0,cw;
String::value_type const *s = str.c_str();
for (; *s; s++)
{
if((char)*s == '\b')
{
if(!s[1]) break;
s++;
continue;
} else if (*s == '\x0F')
{
if(!s[1] || !s[2] || !s[3]) break;
s+=3;
continue;
}
cw = FontReader(*s).GetWidth();
if (x+(cw/2) >= w)
break;
x += cw;
n++;
}
return n;
}
int Graphics::textwrapheight(String str, int width)
{
int x=0, height=FONT_H, cw;
int wordlen;
int charspace;
String::value_type const *s = str.c_str();
while (*s)
{
wordlen = 0;
while(*s && String(" .,!?\n").Contains(*s))
s++;
charspace = textwidthx(s, width-x);
if (charspace<wordlen && wordlen && width-x<width/3)
{
x = 0;
height += FONT_H;
}
for (; *s && --wordlen>=-1; s++)
{
if (*s == '\n')
{
x = 0;
height += FONT_H;
}
else if (*s == '\b')
{
if(!s[1]) break;
s++;
}
else if (*s == '\x0F')
{
if(!s[1] || !s[2] || !s[3]) break;
s+=3;
}
else
{
cw = FontReader(*s).GetWidth();
if (x+cw>=width)
{
x = 0;
height += FONT_H;
}
x += cw;
}
}
}
return height;
}
void Graphics::textsize(String str, int & width, int & height)
{
if(!str.size())
{
width = 0;
height = FONT_H-2;
return;
}
int cHeight = FONT_H-2, cWidth = 0, lWidth = 0;
String::value_type const *s = str.c_str();
for (; *s; s++)
{
if (*s == '\n')
{
cWidth = 0;
cHeight += FONT_H;
}
else if (*s == '\x0F')
{
if(!s[1] || !s[2] || !s[3]) break;
s+=3;
}
else if (*s == '\b')
{
if(!s[1]) break;
s++;
}
else
{
cWidth += FontReader(*s).GetWidth();
if(cWidth>lWidth)
lWidth = cWidth;
}
}
width = lWidth;
height = cHeight;
}
void Graphics::draw_icon(int x, int y, Icon icon, unsigned char alpha, bool invert)
{
y--;
switch(icon)
{
case IconOpen:
if(invert)
drawchar(x, y, 0xE001, 0, 0, 0, alpha);
else
drawchar(x, y, 0xE001, 255, 255, 255, alpha);
break;
case IconReload:
if(invert)
drawchar(x, y, 0xE011, 0, 0, 0, alpha);
else
drawchar(x, y, 0xE011, 255, 255, 255, alpha);
break;
case IconSave:
if(invert)
drawchar(x, y, 0xE002, 0, 0, 0, alpha);
else
drawchar(x, y, 0xE002, 255, 255, 255, alpha);
break;
case IconVoteUp:
if(invert)
{
drawchar(x-11, y+1, 0xE04B, 0, 100, 0, alpha);
drawtext(x+2, y+1, "Vote", 0, 100, 0, alpha);
}
else
{
drawchar(x-11, y+1, 0xE04B, 0, 187, 18, alpha);
drawtext(x+2, y+1, "Vote", 0, 187, 18, alpha);
}
break;
case IconVoteDown:
if(invert)
drawchar(x, y, 0xE04A, 100, 10, 0, alpha);
else
drawchar(x, y, 0xE04A, 187, 40, 0, alpha);
break;
case IconTag:
if(invert)
drawchar(x, y, 0xE003, 0, 0, 0, alpha);
else
drawchar(x, y, 0xE003, 255, 255, 255, alpha);
break;
case IconNew:
if(invert)
drawchar(x, y, 0xE012, 0, 0, 0, alpha);
else
drawchar(x, y, 0xE012, 255, 255, 255, alpha);
break;
case IconLogin:
if(invert)
drawchar(x, y+1, 0xE004, 0, 0, 0, alpha);
else
drawchar(x, y+1, 0xE004, 255, 255, 255, alpha);
break;
case IconSimulationSettings:
if(invert)
drawchar(x, y+1, 0xE04F, 0, 0, 0, alpha);
else
drawchar(x, y+1, 0xE04F, 255, 255, 255, alpha);
break;
case IconRenderSettings:
if(invert)
{
drawchar(x, y+1, 0xE058, 255, 0, 0, alpha);
drawchar(x, y+1, 0xE059, 0, 255, 0, alpha);
drawchar(x, y+1, 0xE05A, 0, 0, 255, alpha);
}
else
{
addchar(x, y+1, 0xE058, 255, 0, 0, alpha);
addchar(x, y+1, 0xE059, 0, 255, 0, alpha);
addchar(x, y+1, 0xE05A, 0, 0, 255, alpha);
}
break;
case IconPause:
if(invert)
drawchar(x, y, 0xE010, 0, 0, 0, alpha);
else
drawchar(x, y, 0xE010, 255, 255, 255, alpha);
break;
case IconFavourite:
if(invert)
drawchar(x, y, 0xE04C, 100, 80, 32, alpha);
else
drawchar(x, y, 0xE04C, 192, 160, 64, alpha);
break;
case IconReport:
if(invert)
drawchar(x, y, 0xE063, 140, 140, 0, alpha);
else
drawchar(x, y, 0xE063, 255, 255, 0, alpha);
break;
case IconUsername:
if(invert)
{
drawchar(x, y, 0xE00B, 32, 64, 128, alpha);
drawchar(x, y, 0xE00A, 0, 0, 0, alpha);
}
else
{
drawchar(x, y, 0xE00B, 32, 64, 128, alpha);
drawchar(x, y, 0xE00A, 255, 255, 255, alpha);
}
break;
case IconPassword:
if(invert)
{
drawchar(x, y, 0xE00C, 160, 144, 32, alpha);
drawchar(x, y, 0xE004, 0, 0, 0, alpha);
}
else
{
drawchar(x, y, 0xE00C, 160, 144, 32, alpha);
drawchar(x, y, 0xE004, 255, 255, 255, alpha);
}
break;
case IconClose:
if(invert)
drawchar(x, y, 0xE02A, 20, 20, 20, alpha);
else
drawchar(x, y, 0xE02A, 230, 230, 230, alpha);
break;
case IconVoteSort:
if (invert)
{
drawchar(x, y, 0xE029, 44, 48, 32, alpha);
drawchar(x, y, 0xE028, 32, 44, 32, alpha);
drawchar(x, y, 0xE027, 128, 128, 128, alpha);
}
else
{
drawchar(x, y, 0xE029, 144, 48, 32, alpha);
drawchar(x, y, 0xE028, 32, 144, 32, alpha);
drawchar(x, y, 0xE027, 255, 255, 255, alpha);
}
break;
case IconDateSort:
if (invert)
{
drawchar(x, y, 0xE026, 32, 32, 32, alpha);
}
else
{
drawchar(x, y, 0xE026, 255, 255, 255, alpha);
}
break;
case IconMyOwn:
if (invert)
{
drawchar(x, y, 0xE014, 192, 160, 64, alpha);
drawchar(x, y, 0xE013, 32, 32, 32, alpha);
}
else
{
drawchar(x, y, 0xE014, 192, 160, 64, alpha);
drawchar(x, y, 0xE013, 255, 255, 255, alpha);
}
break;
case IconSearch:
drawchar(x, y, 0xE00E, 30, 30, 180, alpha);
drawchar(x, y, 0xE00F, 255, 255, 255, alpha);
break;
case IconDelete:
if(invert)
{
drawchar(x, y, 0xE006, 159, 47, 31, alpha);
drawchar(x, y, 0xE005, 0, 0, 0, alpha);
}
else
{
drawchar(x, y, 0xE006, 159, 47, 31, alpha);
drawchar(x, y, 0xE005, 255, 255, 255, alpha);
}
break;
case IconAdd:
if(invert)
{
drawchar(x, y, 0xE006, 32, 144, 32, alpha);
drawchar(x, y, 0xE009, 0, 0, 0, alpha);
}
else
{
drawchar(x, y, 0xE006, 32, 144, 32, alpha);
drawchar(x, y, 0xE009, 255, 255, 255, alpha);
}
break;
case IconVelocity:
drawchar(x+1, y, 0xE018, 128, 160, 255, alpha);
break;
case IconPressure:
if(invert)
drawchar(x+1, y+1, 0xE019, 180, 160, 16, alpha);
else
drawchar(x+1, y+1, 0xE019, 255, 212, 32, alpha);
break;
case IconPersistant:
if(invert)
drawchar(x+1, y+1, 0xE01A, 20, 20, 20, alpha);
else
drawchar(x+1, y+1, 0xE01A, 212, 212, 212, alpha);
break;
case IconFire:
drawchar(x+1, y+1, 0xE01B, 255, 0, 0, alpha);
drawchar(x+1, y+1, 0xE01C, 255, 255, 64, alpha);
break;
case IconBlob:
if(invert)
drawchar(x+1, y, 0xE03F, 55, 180, 55, alpha);
else
drawchar(x+1, y, 0xE03F, 55, 255, 55, alpha);
break;
case IconHeat:
drawchar(x+3, y, 0xE03E, 255, 0, 0, alpha);
if(invert)
drawchar(x+3, y, 0xE03D, 0, 0, 0, alpha);
else
drawchar(x+3, y, 0xE03D, 255, 255, 255, alpha);
break;
case IconBlur:
if(invert)
drawchar(x+1, y, 0xE044, 50, 70, 180, alpha);
else
drawchar(x+1, y, 0xE044, 100, 150, 255, alpha);
break;
case IconGradient:
if(invert)
drawchar(x+1, y+1, 0xE053, 255, 50, 255, alpha);
else
drawchar(x+1, y+1, 0xE053, 205, 50, 205, alpha);
break;
case IconLife:
if(invert)
drawchar(x, y+1, 0xE060, 0, 0, 0, alpha);
else
drawchar(x, y+1, 0xE060, 255, 255, 255, alpha);
break;
case IconEffect:
drawchar(x+1, y, 0xE061, 255, 255, 160, alpha);
break;
case IconGlow:
drawchar(x+1, y, 0xE05F, 200, 255, 255, alpha);
break;
case IconWarp:
drawchar(x+1, y, 0xE05E, 255, 255, 255, alpha);
break;
case IconBasic:
if(invert)
drawchar(x+1, y+1, 0xE05B, 50, 50, 0, alpha);
else
drawchar(x+1, y+1, 0xE05B, 255, 255, 200, alpha);
break;
case IconAltAir:
if(invert) {
drawchar(x+1, y+1, 0xE054, 180, 55, 55, alpha);
drawchar(x+1, y+1, 0xE055, 55, 180, 55, alpha);
} else {
drawchar(x+1, y+1, 0xE054, 255, 55, 55, alpha);
drawchar(x+1, y+1, 0xE055, 55, 255, 55, alpha);
}
break;
default:
if(invert)
drawchar(x, y, 't', 0, 0, 0, alpha);
else
drawchar(x, y, 't', 255, 255, 255, alpha);
break;
}
}
void Graphics::draw_rgba_image(const unsigned char *data_, int x, int y, float alpha)
{
unsigned char w, h;
int i, j;
unsigned char r, g, b, a;
unsigned char *data = (unsigned char*)data_;
if (!data) return;
w = *(data++)&0xFF;
h = *(data++)&0xFF;
for (j=0; j<h; j++)
{
for (i=0; i<w; i++)
{
r = *(data++)&0xFF;
g = *(data++)&0xFF;
b = *(data++)&0xFF;
a = *(data++)&0xFF;
addpixel(x+i, y+j, r, g, b, (int)(a*alpha));
}
}
}
pixel *Graphics::render_packed_rgb(void *image, int width, int height, int cmp_size)
{
unsigned char *tmp;
pixel *res;
int i;
tmp = (unsigned char *)malloc(width*height*3);
if (!tmp)
return NULL;
res = (pixel *)malloc(width*height*PIXELSIZE);
if (!res)
{
free(tmp);
return NULL;
}
i = width*height*3;
if (BZ2_bzBuffToBuffDecompress((char *)tmp, (unsigned *)&i, (char *)image, cmp_size, 0, 0))
{
free(res);
free(tmp);
return NULL;
}
for (i=0; i<width*height; i++)
res[i] = PIXRGB(tmp[3*i], tmp[3*i+1], tmp[3*i+2]);
free(tmp);
return res;
}
VideoBuffer Graphics::DumpFrame()
{
#ifdef OGLI
#else
VideoBuffer newBuffer(WINDOWW, WINDOWH);
std::copy(vid, vid+(WINDOWW*WINDOWH), newBuffer.Buffer);
return newBuffer;
#endif
}
| {
"pile_set_name": "Github"
} |
import { createStackNavigator } from '@react-navigation/stack';
import React from 'react';
import { LocalizationContext } from '../contexts/LocalizationContext';
import LoginScreen from '../screens/Login/LoginScreen';
const Stack = createStackNavigator();
export default function AuthStackNavigator() {
const { t } = React.useContext(LocalizationContext);
return (
<Stack.Navigator initialRouteName="Login">
<Stack.Screen
name="Login"
component={LoginScreen}
options={() => ({
title: t('AbpAccount::Login'),
})}
/>
</Stack.Navigator>
);
}
| {
"pile_set_name": "Github"
} |
#include "pch.h"
#include "Song7K.h"
#include "Logging.h"
#include "PlayerChartData.h"
static double PassThrough(double D)
{
return D;
}
namespace Game {
namespace VSRG {
RowifiedDifficulty::RowifiedDifficulty(Difficulty *Source, bool Quantize, bool CalculateAll)
: Quantizing(Quantize), Parent(Source)
{
assert(Source != nullptr);
if (Quantize)
QuantizeFunction = std::bind(QuantizeBeat, std::placeholders::_1);
else
QuantizeFunction = std::bind(PassThrough, std::placeholders::_1);
BPS = Game::VSRG::PlayerChartState::FromDifficulty(Source).BPS;
CalculateMeasureAccomulation();
if (CalculateAll)
{
CalculateBGMEvents();
CalculateObjects();
}
}
int RowifiedDifficulty::GetRowCount(const std::vector<Event> &In)
{
// literally the only hard part of this
// We have to find the LCM of the set of fractions given by the Fraction of all objects in the vector.
std::vector <int> Denominators;
// Find all different denominators.
for (auto i : In)
{
for (auto k : Denominators)
{
if (i.Sect.Den == k)
goto next_object;
}
Denominators.push_back(i.Sect.Den);
next_object:;
}
if (Denominators.size() == 1) return Denominators.at(0);
// Now get the LCM.
return LCM(Denominators);
}
bool RowifiedDifficulty::IsQuantized()
{
return Quantizing;
}
void RowifiedDifficulty::CalculateMeasureAccomulation()
{
double Acom = 0;
assert(Parent != nullptr);
MeasureAccomulation.clear();
for (auto M : Parent->Data->Measures)
{
// Note: Acom. doesn't need to be quantized.
// Only contents within measure.
MeasureAccomulation.push_back(Acom);
Acom += M.Length;
}
}
IFraction RowifiedDifficulty::FractionForMeasure(int Measure, double Beat)
{
double mStart = MeasureAccomulation[Measure];
double mLen = Parent->Data->Measures[Measure].Length;
double mFrac = (Beat - mStart) / mLen;
IFraction Frac;
if (!IsQuantized())
Frac.fromDouble(mFrac);
else
Frac.fromDouble(QuantizeFractionMeasure(mFrac));
return Frac;
}
int RowifiedDifficulty::MeasureForBeat(double Beat)
{
auto it = upper_bound(MeasureAccomulation.begin(), MeasureAccomulation.end(), QuantizeFunction(Beat));
auto Measure = it - MeasureAccomulation.begin() - 1;
if (Measure >= 0)
{
size_t M = Measure; // eh, do we need more 2^31-1 measures? anyway shut up compiler
if (M < MeasureAccomulation.size())
return Measure;
}
auto s = Utility::Format("Beat %f (Measure %d) outside of bounds (size = %d).",
Beat, Measure, MeasureAccomulation.size());
throw std::runtime_error(s);
}
void RowifiedDifficulty::ResizeMeasures(size_t NewMaxIndex)
{
if (Measures.size() < NewMaxIndex + 1)
Measures.resize(NewMaxIndex + 1);
}
void RowifiedDifficulty::CalculateBGMEvents()
{
for (auto BGM : Parent->Data->BGMEvents)
{
double Beat = QuantizeFunction(IntegrateToTime(BPS, BGM.Time));
int MeasureForEvent = MeasureForBeat(Beat);
ResizeMeasures(MeasureForEvent);
Measures[MeasureForEvent].BGMEvents.push_back({ FractionForMeasure(MeasureForEvent, Beat), BGM.Sound });
}
}
void RowifiedDifficulty::CalculateObjects()
{
for (auto M : Parent->Data->Measures)
{
for (int K = 0; K < Parent->Channels; K++)
{
for (auto N : M.Notes[K])
{
double StartBeat = QuantizeFunction(IntegrateToTime(BPS, N.StartTime));
if (StartBeat < 0)
{
Log::Printf("Object at negative beat (%f), discarded\n", StartBeat);
continue;
}
if (N.EndTime == 0)
{ // Non-hold. Emit channels 11-...
int MeasureForEvent = MeasureForBeat(StartBeat);
ResizeMeasures(MeasureForEvent);
int Snd = N.Sound ? N.Sound : 1;
Measures[MeasureForEvent].Objects[K].push_back({ FractionForMeasure(MeasureForEvent, StartBeat), Snd });
}
else
{ // Hold. Emit channels 51-...
double EndBeat = QuantizeFunction(IntegrateToTime(BPS, N.EndTime));
int MeasureForEvent = MeasureForBeat(StartBeat);
int MeasureForEventEnd = MeasureForBeat(EndBeat);
ResizeMeasures(MeasureForEventEnd);
int Snd = N.Sound ? N.Sound : 1;
Measures[MeasureForEvent].LNObjects[K].push_back({ FractionForMeasure(MeasureForEvent, StartBeat), Snd });
Measures[MeasureForEventEnd].LNObjects[K].push_back({ FractionForMeasure(MeasureForEventEnd, EndBeat), Snd });
}
}
}
}
}
double RowifiedDifficulty::GetStartingBPM()
{
return BPS[0].Value * 60;
}
}
} | {
"pile_set_name": "Github"
} |
# Copyright 2020 The Magma Authors.
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
# 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.
# Dynamodb/metering vars
SHOULD_INIT_METERING_TABLES=false
AWS_ENDPOINT=http://192.168.80.20:8000
DYNAMO_REGION=us-west-1
# Metrics ODS exporter vars
METRICS_PREFIX=magma_dev
METRIC_EXPORT_URL=http://192.168.60.141:8081
FACEBOOK_APP_ID=test
FACEBOOK_APP_SECRET=test123
| {
"pile_set_name": "Github"
} |
/*
* Copyright © 2009 Red Hat, Inc.
*
* This is part of HarfBuzz, a text shaping library.
*
* Permission is hereby granted, without written agreement and without
* license or royalty fees, to use, copy, modify, and distribute this
* software and its documentation for any purpose, provided that the
* above copyright notice and the following two paragraphs appear in
* all copies of this software.
*
* IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
* ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
* IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
* THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
* ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*
* Red Hat Author(s): Behdad Esfahbod
*/
#ifndef HB_H_IN
#error "Include <hb.h> instead."
#endif
#ifndef HB_FONT_H
#define HB_FONT_H
#include "hb-common.h"
#include "hb-face.h"
HB_BEGIN_DECLS
typedef struct hb_font_t hb_font_t;
/*
* hb_font_funcs_t
*/
typedef struct hb_font_funcs_t hb_font_funcs_t;
HB_EXTERN hb_font_funcs_t *
hb_font_funcs_create (void);
HB_EXTERN hb_font_funcs_t *
hb_font_funcs_get_empty (void);
HB_EXTERN hb_font_funcs_t *
hb_font_funcs_reference (hb_font_funcs_t *ffuncs);
HB_EXTERN void
hb_font_funcs_destroy (hb_font_funcs_t *ffuncs);
HB_EXTERN hb_bool_t
hb_font_funcs_set_user_data (hb_font_funcs_t *ffuncs,
hb_user_data_key_t *key,
void * data,
hb_destroy_func_t destroy,
hb_bool_t replace);
HB_EXTERN void *
hb_font_funcs_get_user_data (hb_font_funcs_t *ffuncs,
hb_user_data_key_t *key);
HB_EXTERN void
hb_font_funcs_make_immutable (hb_font_funcs_t *ffuncs);
HB_EXTERN hb_bool_t
hb_font_funcs_is_immutable (hb_font_funcs_t *ffuncs);
/* font and glyph extents */
/* Note that typically ascender is positive and descender negative in coordinate systems that grow up. */
typedef struct hb_font_extents_t
{
hb_position_t ascender; /* typographic ascender. */
hb_position_t descender; /* typographic descender. */
hb_position_t line_gap; /* suggested line spacing gap. */
/*< private >*/
hb_position_t reserved9;
hb_position_t reserved8;
hb_position_t reserved7;
hb_position_t reserved6;
hb_position_t reserved5;
hb_position_t reserved4;
hb_position_t reserved3;
hb_position_t reserved2;
hb_position_t reserved1;
} hb_font_extents_t;
/* Note that height is negative in coordinate systems that grow up. */
typedef struct hb_glyph_extents_t
{
hb_position_t x_bearing; /* left side of glyph from origin. */
hb_position_t y_bearing; /* top side of glyph from origin. */
hb_position_t width; /* distance from left to right side. */
hb_position_t height; /* distance from top to bottom side. */
} hb_glyph_extents_t;
/* func types */
typedef hb_bool_t (*hb_font_get_font_extents_func_t) (hb_font_t *font, void *font_data,
hb_font_extents_t *extents,
void *user_data);
typedef hb_font_get_font_extents_func_t hb_font_get_font_h_extents_func_t;
typedef hb_font_get_font_extents_func_t hb_font_get_font_v_extents_func_t;
typedef hb_bool_t (*hb_font_get_nominal_glyph_func_t) (hb_font_t *font, void *font_data,
hb_codepoint_t unicode,
hb_codepoint_t *glyph,
void *user_data);
typedef hb_bool_t (*hb_font_get_variation_glyph_func_t) (hb_font_t *font, void *font_data,
hb_codepoint_t unicode, hb_codepoint_t variation_selector,
hb_codepoint_t *glyph,
void *user_data);
typedef unsigned int (*hb_font_get_nominal_glyphs_func_t) (hb_font_t *font, void *font_data,
unsigned int count,
const hb_codepoint_t *first_unicode,
unsigned int unicode_stride,
hb_codepoint_t *first_glyph,
unsigned int glyph_stride,
void *user_data);
typedef hb_position_t (*hb_font_get_glyph_advance_func_t) (hb_font_t *font, void *font_data,
hb_codepoint_t glyph,
void *user_data);
typedef hb_font_get_glyph_advance_func_t hb_font_get_glyph_h_advance_func_t;
typedef hb_font_get_glyph_advance_func_t hb_font_get_glyph_v_advance_func_t;
typedef void (*hb_font_get_glyph_advances_func_t) (hb_font_t* font, void* font_data,
unsigned int count,
const hb_codepoint_t *first_glyph,
unsigned glyph_stride,
hb_position_t *first_advance,
unsigned advance_stride,
void *user_data);
typedef hb_font_get_glyph_advances_func_t hb_font_get_glyph_h_advances_func_t;
typedef hb_font_get_glyph_advances_func_t hb_font_get_glyph_v_advances_func_t;
typedef hb_bool_t (*hb_font_get_glyph_origin_func_t) (hb_font_t *font, void *font_data,
hb_codepoint_t glyph,
hb_position_t *x, hb_position_t *y,
void *user_data);
typedef hb_font_get_glyph_origin_func_t hb_font_get_glyph_h_origin_func_t;
typedef hb_font_get_glyph_origin_func_t hb_font_get_glyph_v_origin_func_t;
typedef hb_bool_t (*hb_font_get_glyph_extents_func_t) (hb_font_t *font, void *font_data,
hb_codepoint_t glyph,
hb_glyph_extents_t *extents,
void *user_data);
typedef hb_bool_t (*hb_font_get_glyph_contour_point_func_t) (hb_font_t *font, void *font_data,
hb_codepoint_t glyph, unsigned int point_index,
hb_position_t *x, hb_position_t *y,
void *user_data);
typedef hb_bool_t (*hb_font_get_glyph_name_func_t) (hb_font_t *font, void *font_data,
hb_codepoint_t glyph,
char *name, unsigned int size,
void *user_data);
typedef hb_bool_t (*hb_font_get_glyph_from_name_func_t) (hb_font_t *font, void *font_data,
const char *name, int len, /* -1 means nul-terminated */
hb_codepoint_t *glyph,
void *user_data);
/* func setters */
/**
* hb_font_funcs_set_font_h_extents_func:
* @ffuncs: font functions.
* @func: (closure user_data) (destroy destroy) (scope notified):
* @user_data:
* @destroy:
*
*
*
* Since: 1.1.2
**/
HB_EXTERN void
hb_font_funcs_set_font_h_extents_func (hb_font_funcs_t *ffuncs,
hb_font_get_font_h_extents_func_t func,
void *user_data, hb_destroy_func_t destroy);
/**
* hb_font_funcs_set_font_v_extents_func:
* @ffuncs: font functions.
* @func: (closure user_data) (destroy destroy) (scope notified):
* @user_data:
* @destroy:
*
*
*
* Since: 1.1.2
**/
HB_EXTERN void
hb_font_funcs_set_font_v_extents_func (hb_font_funcs_t *ffuncs,
hb_font_get_font_v_extents_func_t func,
void *user_data, hb_destroy_func_t destroy);
/**
* hb_font_funcs_set_nominal_glyph_func:
* @ffuncs: font functions.
* @func: (closure user_data) (destroy destroy) (scope notified):
* @user_data:
* @destroy:
*
*
*
* Since: 1.2.3
**/
HB_EXTERN void
hb_font_funcs_set_nominal_glyph_func (hb_font_funcs_t *ffuncs,
hb_font_get_nominal_glyph_func_t func,
void *user_data, hb_destroy_func_t destroy);
/**
* hb_font_funcs_set_nominal_glyphs_func:
* @ffuncs: font functions.
* @func: (closure user_data) (destroy destroy) (scope notified):
* @user_data:
* @destroy:
*
*
*
* Since: 2.0.0
**/
HB_EXTERN void
hb_font_funcs_set_nominal_glyphs_func (hb_font_funcs_t *ffuncs,
hb_font_get_nominal_glyphs_func_t func,
void *user_data, hb_destroy_func_t destroy);
/**
* hb_font_funcs_set_variation_glyph_func:
* @ffuncs: font functions.
* @func: (closure user_data) (destroy destroy) (scope notified):
* @user_data:
* @destroy:
*
*
*
* Since: 1.2.3
**/
HB_EXTERN void
hb_font_funcs_set_variation_glyph_func (hb_font_funcs_t *ffuncs,
hb_font_get_variation_glyph_func_t func,
void *user_data, hb_destroy_func_t destroy);
/**
* hb_font_funcs_set_glyph_h_advance_func:
* @ffuncs: font functions.
* @func: (closure user_data) (destroy destroy) (scope notified):
* @user_data:
* @destroy:
*
*
*
* Since: 0.9.2
**/
HB_EXTERN void
hb_font_funcs_set_glyph_h_advance_func (hb_font_funcs_t *ffuncs,
hb_font_get_glyph_h_advance_func_t func,
void *user_data, hb_destroy_func_t destroy);
/**
* hb_font_funcs_set_glyph_v_advance_func:
* @ffuncs: font functions.
* @func: (closure user_data) (destroy destroy) (scope notified):
* @user_data:
* @destroy:
*
*
*
* Since: 0.9.2
**/
HB_EXTERN void
hb_font_funcs_set_glyph_v_advance_func (hb_font_funcs_t *ffuncs,
hb_font_get_glyph_v_advance_func_t func,
void *user_data, hb_destroy_func_t destroy);
/**
* hb_font_funcs_set_glyph_h_advances_func:
* @ffuncs: font functions.
* @func: (closure user_data) (destroy destroy) (scope notified):
* @user_data:
* @destroy:
*
*
*
* Since: 1.8.6
**/
HB_EXTERN void
hb_font_funcs_set_glyph_h_advances_func (hb_font_funcs_t *ffuncs,
hb_font_get_glyph_h_advances_func_t func,
void *user_data, hb_destroy_func_t destroy);
/**
* hb_font_funcs_set_glyph_v_advances_func:
* @ffuncs: font functions.
* @func: (closure user_data) (destroy destroy) (scope notified):
* @user_data:
* @destroy:
*
*
*
* Since: 1.8.6
**/
HB_EXTERN void
hb_font_funcs_set_glyph_v_advances_func (hb_font_funcs_t *ffuncs,
hb_font_get_glyph_v_advances_func_t func,
void *user_data, hb_destroy_func_t destroy);
/**
* hb_font_funcs_set_glyph_h_origin_func:
* @ffuncs: font functions.
* @func: (closure user_data) (destroy destroy) (scope notified):
* @user_data:
* @destroy:
*
*
*
* Since: 0.9.2
**/
HB_EXTERN void
hb_font_funcs_set_glyph_h_origin_func (hb_font_funcs_t *ffuncs,
hb_font_get_glyph_h_origin_func_t func,
void *user_data, hb_destroy_func_t destroy);
/**
* hb_font_funcs_set_glyph_v_origin_func:
* @ffuncs: font functions.
* @func: (closure user_data) (destroy destroy) (scope notified):
* @user_data:
* @destroy:
*
*
*
* Since: 0.9.2
**/
HB_EXTERN void
hb_font_funcs_set_glyph_v_origin_func (hb_font_funcs_t *ffuncs,
hb_font_get_glyph_v_origin_func_t func,
void *user_data, hb_destroy_func_t destroy);
/**
* hb_font_funcs_set_glyph_extents_func:
* @ffuncs: font functions.
* @func: (closure user_data) (destroy destroy) (scope notified):
* @user_data:
* @destroy:
*
*
*
* Since: 0.9.2
**/
HB_EXTERN void
hb_font_funcs_set_glyph_extents_func (hb_font_funcs_t *ffuncs,
hb_font_get_glyph_extents_func_t func,
void *user_data, hb_destroy_func_t destroy);
/**
* hb_font_funcs_set_glyph_contour_point_func:
* @ffuncs: font functions.
* @func: (closure user_data) (destroy destroy) (scope notified):
* @user_data:
* @destroy:
*
*
*
* Since: 0.9.2
**/
HB_EXTERN void
hb_font_funcs_set_glyph_contour_point_func (hb_font_funcs_t *ffuncs,
hb_font_get_glyph_contour_point_func_t func,
void *user_data, hb_destroy_func_t destroy);
/**
* hb_font_funcs_set_glyph_name_func:
* @ffuncs: font functions.
* @func: (closure user_data) (destroy destroy) (scope notified):
* @user_data:
* @destroy:
*
*
*
* Since: 0.9.2
**/
HB_EXTERN void
hb_font_funcs_set_glyph_name_func (hb_font_funcs_t *ffuncs,
hb_font_get_glyph_name_func_t func,
void *user_data, hb_destroy_func_t destroy);
/**
* hb_font_funcs_set_glyph_from_name_func:
* @ffuncs: font functions.
* @func: (closure user_data) (destroy destroy) (scope notified):
* @user_data:
* @destroy:
*
*
*
* Since: 0.9.2
**/
HB_EXTERN void
hb_font_funcs_set_glyph_from_name_func (hb_font_funcs_t *ffuncs,
hb_font_get_glyph_from_name_func_t func,
void *user_data, hb_destroy_func_t destroy);
/* func dispatch */
HB_EXTERN hb_bool_t
hb_font_get_h_extents (hb_font_t *font,
hb_font_extents_t *extents);
HB_EXTERN hb_bool_t
hb_font_get_v_extents (hb_font_t *font,
hb_font_extents_t *extents);
HB_EXTERN hb_bool_t
hb_font_get_nominal_glyph (hb_font_t *font,
hb_codepoint_t unicode,
hb_codepoint_t *glyph);
HB_EXTERN hb_bool_t
hb_font_get_variation_glyph (hb_font_t *font,
hb_codepoint_t unicode, hb_codepoint_t variation_selector,
hb_codepoint_t *glyph);
HB_EXTERN hb_position_t
hb_font_get_glyph_h_advance (hb_font_t *font,
hb_codepoint_t glyph);
HB_EXTERN hb_position_t
hb_font_get_glyph_v_advance (hb_font_t *font,
hb_codepoint_t glyph);
HB_EXTERN void
hb_font_get_glyph_h_advances (hb_font_t* font,
unsigned int count,
const hb_codepoint_t *first_glyph,
unsigned glyph_stride,
hb_position_t *first_advance,
unsigned advance_stride);
HB_EXTERN void
hb_font_get_glyph_v_advances (hb_font_t* font,
unsigned int count,
const hb_codepoint_t *first_glyph,
unsigned glyph_stride,
hb_position_t *first_advance,
unsigned advance_stride);
HB_EXTERN hb_bool_t
hb_font_get_glyph_h_origin (hb_font_t *font,
hb_codepoint_t glyph,
hb_position_t *x, hb_position_t *y);
HB_EXTERN hb_bool_t
hb_font_get_glyph_v_origin (hb_font_t *font,
hb_codepoint_t glyph,
hb_position_t *x, hb_position_t *y);
HB_EXTERN hb_bool_t
hb_font_get_glyph_extents (hb_font_t *font,
hb_codepoint_t glyph,
hb_glyph_extents_t *extents);
HB_EXTERN hb_bool_t
hb_font_get_glyph_contour_point (hb_font_t *font,
hb_codepoint_t glyph, unsigned int point_index,
hb_position_t *x, hb_position_t *y);
HB_EXTERN hb_bool_t
hb_font_get_glyph_name (hb_font_t *font,
hb_codepoint_t glyph,
char *name, unsigned int size);
HB_EXTERN hb_bool_t
hb_font_get_glyph_from_name (hb_font_t *font,
const char *name, int len, /* -1 means nul-terminated */
hb_codepoint_t *glyph);
/* high-level funcs, with fallback */
/* Calls either hb_font_get_nominal_glyph() if variation_selector is 0,
* otherwise calls hb_font_get_variation_glyph(). */
HB_EXTERN hb_bool_t
hb_font_get_glyph (hb_font_t *font,
hb_codepoint_t unicode, hb_codepoint_t variation_selector,
hb_codepoint_t *glyph);
HB_EXTERN void
hb_font_get_extents_for_direction (hb_font_t *font,
hb_direction_t direction,
hb_font_extents_t *extents);
HB_EXTERN void
hb_font_get_glyph_advance_for_direction (hb_font_t *font,
hb_codepoint_t glyph,
hb_direction_t direction,
hb_position_t *x, hb_position_t *y);
HB_EXTERN void
hb_font_get_glyph_advances_for_direction (hb_font_t* font,
hb_direction_t direction,
unsigned int count,
const hb_codepoint_t *first_glyph,
unsigned glyph_stride,
hb_position_t *first_advance,
unsigned advance_stride);
HB_EXTERN void
hb_font_get_glyph_origin_for_direction (hb_font_t *font,
hb_codepoint_t glyph,
hb_direction_t direction,
hb_position_t *x, hb_position_t *y);
HB_EXTERN void
hb_font_add_glyph_origin_for_direction (hb_font_t *font,
hb_codepoint_t glyph,
hb_direction_t direction,
hb_position_t *x, hb_position_t *y);
HB_EXTERN void
hb_font_subtract_glyph_origin_for_direction (hb_font_t *font,
hb_codepoint_t glyph,
hb_direction_t direction,
hb_position_t *x, hb_position_t *y);
HB_EXTERN hb_bool_t
hb_font_get_glyph_extents_for_origin (hb_font_t *font,
hb_codepoint_t glyph,
hb_direction_t direction,
hb_glyph_extents_t *extents);
HB_EXTERN hb_bool_t
hb_font_get_glyph_contour_point_for_origin (hb_font_t *font,
hb_codepoint_t glyph, unsigned int point_index,
hb_direction_t direction,
hb_position_t *x, hb_position_t *y);
/* Generates gidDDD if glyph has no name. */
HB_EXTERN void
hb_font_glyph_to_string (hb_font_t *font,
hb_codepoint_t glyph,
char *s, unsigned int size);
/* Parses gidDDD and uniUUUU strings automatically. */
HB_EXTERN hb_bool_t
hb_font_glyph_from_string (hb_font_t *font,
const char *s, int len, /* -1 means nul-terminated */
hb_codepoint_t *glyph);
/*
* hb_font_t
*/
/* Fonts are very light-weight objects */
HB_EXTERN hb_font_t *
hb_font_create (hb_face_t *face);
HB_EXTERN hb_font_t *
hb_font_create_sub_font (hb_font_t *parent);
HB_EXTERN hb_font_t *
hb_font_get_empty (void);
HB_EXTERN hb_font_t *
hb_font_reference (hb_font_t *font);
HB_EXTERN void
hb_font_destroy (hb_font_t *font);
HB_EXTERN hb_bool_t
hb_font_set_user_data (hb_font_t *font,
hb_user_data_key_t *key,
void * data,
hb_destroy_func_t destroy,
hb_bool_t replace);
HB_EXTERN void *
hb_font_get_user_data (hb_font_t *font,
hb_user_data_key_t *key);
HB_EXTERN void
hb_font_make_immutable (hb_font_t *font);
HB_EXTERN hb_bool_t
hb_font_is_immutable (hb_font_t *font);
HB_EXTERN void
hb_font_set_parent (hb_font_t *font,
hb_font_t *parent);
HB_EXTERN hb_font_t *
hb_font_get_parent (hb_font_t *font);
HB_EXTERN void
hb_font_set_face (hb_font_t *font,
hb_face_t *face);
HB_EXTERN hb_face_t *
hb_font_get_face (hb_font_t *font);
HB_EXTERN void
hb_font_set_funcs (hb_font_t *font,
hb_font_funcs_t *klass,
void *font_data,
hb_destroy_func_t destroy);
/* Be *very* careful with this function! */
HB_EXTERN void
hb_font_set_funcs_data (hb_font_t *font,
void *font_data,
hb_destroy_func_t destroy);
HB_EXTERN void
hb_font_set_scale (hb_font_t *font,
int x_scale,
int y_scale);
HB_EXTERN void
hb_font_get_scale (hb_font_t *font,
int *x_scale,
int *y_scale);
/*
* A zero value means "no hinting in that direction"
*/
HB_EXTERN void
hb_font_set_ppem (hb_font_t *font,
unsigned int x_ppem,
unsigned int y_ppem);
HB_EXTERN void
hb_font_get_ppem (hb_font_t *font,
unsigned int *x_ppem,
unsigned int *y_ppem);
/*
* Point size per EM. Used for optical-sizing in CoreText.
* A value of zero means "not set".
*/
HB_EXTERN void
hb_font_set_ptem (hb_font_t *font, float ptem);
HB_EXTERN float
hb_font_get_ptem (hb_font_t *font);
HB_EXTERN void
hb_font_set_variations (hb_font_t *font,
const hb_variation_t *variations,
unsigned int variations_length);
HB_EXTERN void
hb_font_set_var_coords_design (hb_font_t *font,
const float *coords,
unsigned int coords_length);
HB_EXTERN void
hb_font_set_var_coords_normalized (hb_font_t *font,
const int *coords, /* 2.14 normalized */
unsigned int coords_length);
HB_EXTERN const int *
hb_font_get_var_coords_normalized (hb_font_t *font,
unsigned int *length);
HB_END_DECLS
#endif /* HB_FONT_H */
| {
"pile_set_name": "Github"
} |
<?php
namespace GuzzleHttp\Promise;
/**
* Interface used with classes that return a promise.
*/
interface PromisorInterface
{
/**
* Returns a promise.
*
* @return PromiseInterface
*/
public function promise();
}
| {
"pile_set_name": "Github"
} |
/*
* EMIF programming
*
* (C) Copyright 2010
* Texas Instruments, <www.ti.com>
*
* Aneesh V <[email protected]>
*
* SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
#include <asm/emif.h>
#include <asm/arch/sys_proto.h>
#include <asm/utils.h>
#ifndef CONFIG_SYS_EMIF_PRECALCULATED_TIMING_REGS
u32 *const T_num = (u32 *)OMAP_SRAM_SCRATCH_EMIF_T_NUM;
u32 *const T_den = (u32 *)OMAP_SRAM_SCRATCH_EMIF_T_DEN;
#endif
#ifdef CONFIG_SYS_DEFAULT_LPDDR2_TIMINGS
/* Base AC Timing values specified by JESD209-2 for 400MHz operation */
static const struct lpddr2_ac_timings timings_jedec_400_mhz = {
.max_freq = 400000000,
.RL = 6,
.tRPab = 21,
.tRCD = 18,
.tWR = 15,
.tRASmin = 42,
.tRRD = 10,
.tWTRx2 = 15,
.tXSR = 140,
.tXPx2 = 15,
.tRFCab = 130,
.tRTPx2 = 15,
.tCKE = 3,
.tCKESR = 15,
.tZQCS = 90,
.tZQCL = 360,
.tZQINIT = 1000,
.tDQSCKMAXx2 = 11,
.tRASmax = 70,
.tFAW = 50
};
/* Base AC Timing values specified by JESD209-2 for 200 MHz operation */
static const struct lpddr2_ac_timings timings_jedec_200_mhz = {
.max_freq = 200000000,
.RL = 3,
.tRPab = 21,
.tRCD = 18,
.tWR = 15,
.tRASmin = 42,
.tRRD = 10,
.tWTRx2 = 20,
.tXSR = 140,
.tXPx2 = 15,
.tRFCab = 130,
.tRTPx2 = 15,
.tCKE = 3,
.tCKESR = 15,
.tZQCS = 90,
.tZQCL = 360,
.tZQINIT = 1000,
.tDQSCKMAXx2 = 11,
.tRASmax = 70,
.tFAW = 50
};
/*
* Min tCK values specified by JESD209-2
* Min tCK specifies the minimum duration of some AC timing parameters in terms
* of the number of cycles. If the calculated number of cycles based on the
* absolute time value is less than the min tCK value, min tCK value should
* be used instead. This typically happens at low frequencies.
*/
static const struct lpddr2_min_tck min_tck_jedec = {
.tRL = 3,
.tRP_AB = 3,
.tRCD = 3,
.tWR = 3,
.tRAS_MIN = 3,
.tRRD = 2,
.tWTR = 2,
.tXP = 2,
.tRTP = 2,
.tCKE = 3,
.tCKESR = 3,
.tFAW = 8
};
static const struct lpddr2_ac_timings const*
jedec_ac_timings[MAX_NUM_SPEEDBINS] = {
&timings_jedec_200_mhz,
&timings_jedec_400_mhz
};
const struct lpddr2_device_timings jedec_default_timings = {
.ac_timings = jedec_ac_timings,
.min_tck = &min_tck_jedec
};
void emif_get_device_timings(u32 emif_nr,
const struct lpddr2_device_timings **cs0_device_timings,
const struct lpddr2_device_timings **cs1_device_timings)
{
/* Assume Identical devices on EMIF1 & EMIF2 */
*cs0_device_timings = &jedec_default_timings;
*cs1_device_timings = &jedec_default_timings;
}
#endif /* CONFIG_SYS_DEFAULT_LPDDR2_TIMINGS */
| {
"pile_set_name": "Github"
} |
/*
Copyright 2019 The xridge kubestone contributors.
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 s3bench
import (
perfv1alpha1 "github.com/xridge/kubestone/api/v1alpha1"
"github.com/xridge/kubestone/pkg/k8s"
batchv1 "k8s.io/api/batch/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"strconv"
)
// NewJob creates a s3bench benchmark job
func NewJob(cr *perfv1alpha1.S3Bench) *batchv1.Job {
objectMeta := metav1.ObjectMeta{
Name: cr.Name,
Namespace: cr.Namespace,
}
var s3benchCmdLineArgs []string
s3benchCmdLineArgs = append(s3benchCmdLineArgs, cr.Spec.Mode)
s3benchCmdLineArgs = append(s3benchCmdLineArgs, ProcessS3BenchArgs(&cr.Spec)...)
image := cr.Spec.Image
if (image == perfv1alpha1.ImageSpec{}) {
image = perfv1alpha1.ImageSpec{
Name: "minio/warp:v0.3.5",
PullPolicy: "IfNotPresent",
}
}
job := k8s.NewPerfJob(objectMeta, "s3bench", image, cr.Spec.PodConfig)
job.Spec.Template.Spec.Containers[0].Args = s3benchCmdLineArgs
return job
}
func ProcessS3BenchArgs(spec *perfv1alpha1.S3BenchSpec) []string {
var cmdArgs []string
cmdArgs = append(cmdArgs, "--host", spec.Host)
if (spec.S3BenchOptions != perfv1alpha1.S3BenchOptions{}) {
opts := spec.S3BenchOptions
checkAndAppendBool(&cmdArgs, opts.NoColor, "--no-color")
checkAndAppendBool(&cmdArgs, opts.Debug, "--debug")
checkAndAppendBool(&cmdArgs, opts.Debug, "--insecure")
checkAndAppendString(&cmdArgs, opts.AccessKey, "--access-key")
checkAndAppendString(&cmdArgs, opts.SecretKey, "--secret-key")
checkAndAppendBool(&cmdArgs, opts.Tls, "--tls")
checkAndAppendString(&cmdArgs, opts.Region, "--region")
checkAndAppendBool(&cmdArgs, opts.Encrypt, "--encrypt")
checkAndAppendString(&cmdArgs, opts.Bucket, "--bucket")
checkAndAppendString(&cmdArgs, opts.HostSelect, "--host-select")
checkAndAppendInt(&cmdArgs, opts.Concurrent, "--concurrent")
checkAndAppendBool(&cmdArgs, opts.NoPrefix, "--noprefix")
checkAndAppendString(&cmdArgs, opts.BenchOutput, "--benchdata")
checkAndAppendString(&cmdArgs, opts.Duration, "--duration")
checkAndAppendBool(&cmdArgs, opts.NoClear, "--noclear")
// TODO: Possibly set this to +1 min from create time or something. May be needed if use clients
checkAndAppendString(&cmdArgs, opts.SyncStart, "--syncstart")
checkAndAppendBool(&cmdArgs, opts.Requests, "--requests")
}
if (spec.S3ObjectOptions != perfv1alpha1.S3ObjectOptions{}) {
opts := spec.S3ObjectOptions
checkAndAppendInt(&cmdArgs, opts.Count, "--objects")
checkAndAppendString(&cmdArgs, opts.Size, "--obj.size")
checkAndAppendString(&cmdArgs, opts.Generator, "--obj.generator")
checkAndAppendBool(&cmdArgs, opts.RandomSize, "--obj.randsize")
}
if (spec.S3AutoTermOptions != perfv1alpha1.S3AutoTermOptions{}) {
opts := spec.S3AutoTermOptions
if opts.Enabled {
checkAndAppendBool(&cmdArgs, opts.Enabled, "--autoterm")
checkAndAppendString(&cmdArgs, opts.Duration, "--autoterm.dur")
checkAndAppendString(&cmdArgs, opts.Percent, "--autoterm.pct")
}
}
if (spec.S3AnalysisOptions != perfv1alpha1.S3AnalysisOptions{}) {
opts := spec.S3AnalysisOptions
checkAndAppendString(&cmdArgs, opts.Duration, "--analyze.dur")
checkAndAppendString(&cmdArgs, opts.Output, "--analyze.out")
checkAndAppendString(&cmdArgs, opts.OperationFilter, "--analyze.op")
checkAndAppendBool(&cmdArgs, opts.PrintErrors, "--analyze.errors")
checkAndAppendString(&cmdArgs, opts.HostFilter, "--analyze.host")
checkAndAppendString(&cmdArgs, opts.Skip, "--analyze.skip")
checkAndAppendBool(&cmdArgs, opts.HostDetails, "--analyze.hostdetails")
}
if spec.Mode == "mixed" {
if (spec.MixedDistributionOptions != perfv1alpha1.MixedDistributionOptions{}) {
checkAndAppendInt(&cmdArgs, spec.MixedDistributionOptions.GetDist, "--get-distrib")
checkAndAppendInt(&cmdArgs, spec.MixedDistributionOptions.StatDist, "--stat-distrib")
checkAndAppendInt(&cmdArgs, spec.MixedDistributionOptions.PutDist, "--put-distrib")
checkAndAppendInt(&cmdArgs, spec.MixedDistributionOptions.DeleteDist, "--delete-distrib")
}
}
return cmdArgs
}
func checkAndAppendInt(cmdArgs *[]string, dist int32, arg string) {
if dist > 0 {
*cmdArgs = append(*cmdArgs, arg, strconv.Itoa(int(dist)))
}
}
func checkAndAppendBool(cmdArgs *[]string, dist bool, arg string) {
if dist {
*cmdArgs = append(*cmdArgs, arg)
}
}
func checkAndAppendString(cmdArgs *[]string, dist string, arg string) {
if dist != "" {
*cmdArgs = append(*cmdArgs, arg, dist)
}
}
| {
"pile_set_name": "Github"
} |
//
// Generated by class-dump 3.5 (64 bit) (Debug version compiled Oct 25 2017 03:49:04).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard.
//
#import "NSObject-Protocol.h"
@class NSData, NSString;
@protocol IOBluetoothDaemonNSXPCDelegate <NSObject>
@optional
- (void)aacpCustomDataEvent:(unsigned int)arg1 withData:(NSData *)arg2 forDevice:(NSString *)arg3;
- (void)switchEvent:(unsigned int)arg1;
@end
| {
"pile_set_name": "Github"
} |
using System.Collections.Generic;
using System.Threading.Tasks;
#nullable enable
namespace Couchbase.Management.Users
{
public interface IUserManager
{
Task<UserAndMetaData> GetUserAsync(string username, GetUserOptions? options = null);
Task<IEnumerable<UserAndMetaData>> GetAllUsersAsync(GetAllUsersOptions? options = null);
Task UpsertUserAsync(User user, UpsertUserOptions? options = null);
Task DropUserAsync(string username, DropUserOptions? options = null);
Task<IEnumerable<RoleAndDescription>> GetRolesAsync(AvailableRolesOptions? options = null);
Task<Group> GetGroupAsync(string groupName, GetGroupOptions? options = null);
Task<IEnumerable<Group>> GetAllGroupsAsync(GetAllGroupsOptions? options = null);
Task UpsertGroupAsync(Group group, UpsertGroupOptions? options = null);
Task DropGroupAsync(string groupName, DropGroupOptions? options = null);
}
}
| {
"pile_set_name": "Github"
} |
version https://git-lfs.github.com/spec/v1
oid sha256:44dc549ac4bec50cae42ccdb98ed192d4a58f17c011faac0cc2977459d35c2b6
size 2001
| {
"pile_set_name": "Github"
} |
<?php
/**
* DO NOT EDIT THIS FILE!
*
* This file was automatically generated from external sources.
*
* Any manual change here will be lost the next time the SDK
* is updated. You've been warned!
*/
namespace DTS\eBaySDK\BusinessPoliciesManagement\Types;
/**
*
* @property string $profileName
* @property integer $profileId
* @property \DTS\eBaySDK\BusinessPoliciesManagement\Enums\ProfileType $profileType
* @property integer $profileVersion
* @property string $profileDesc
* @property \DateTime $deletedDate
* @property integer $siteId
* @property \DTS\eBaySDK\BusinessPoliciesManagement\Types\CategoryGroups $categoryGroups
*/
class SellerProfile extends \DTS\eBaySDK\Types\BaseType
{
/**
* @var array Properties belonging to objects of this class.
*/
private static $propertyTypes = [
'profileName' => [
'type' => 'string',
'repeatable' => false,
'attribute' => false,
'elementName' => 'profileName'
],
'profileId' => [
'type' => 'integer',
'repeatable' => false,
'attribute' => false,
'elementName' => 'profileId'
],
'profileType' => [
'type' => 'string',
'repeatable' => false,
'attribute' => false,
'elementName' => 'profileType'
],
'profileVersion' => [
'type' => 'integer',
'repeatable' => false,
'attribute' => false,
'elementName' => 'profileVersion'
],
'profileDesc' => [
'type' => 'string',
'repeatable' => false,
'attribute' => false,
'elementName' => 'profileDesc'
],
'deletedDate' => [
'type' => 'DateTime',
'repeatable' => false,
'attribute' => false,
'elementName' => 'deletedDate'
],
'siteId' => [
'type' => 'integer',
'repeatable' => false,
'attribute' => false,
'elementName' => 'siteId'
],
'categoryGroups' => [
'type' => 'DTS\eBaySDK\BusinessPoliciesManagement\Types\CategoryGroups',
'repeatable' => false,
'attribute' => false,
'elementName' => 'categoryGroups'
]
];
/**
* @param array $values Optional properties and values to assign to the object.
*/
public function __construct(array $values = [])
{
list($parentValues, $childValues) = self::getParentValues(self::$propertyTypes, $values);
parent::__construct($parentValues);
if (!array_key_exists(__CLASS__, self::$properties)) {
self::$properties[__CLASS__] = array_merge(self::$properties[get_parent_class()], self::$propertyTypes);
}
if (!array_key_exists(__CLASS__, self::$xmlNamespaces)) {
self::$xmlNamespaces[__CLASS__] = 'xmlns="http://www.ebay.com/marketplace/selling/v1/services"';
}
$this->setValues(__CLASS__, $childValues);
}
}
| {
"pile_set_name": "Github"
} |
//
// Generated by class-dump 3.5 (64 bit) (Debug version compiled Oct 25 2017 03:49:04).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard.
//
#import "NSObject-Protocol.h"
@protocol OS_xpc_object <NSObject>
@end
| {
"pile_set_name": "Github"
} |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_35) on Tue Oct 16 22:49:42 ICT 2012 -->
<TITLE>
TableCaption (Apache FOP 1.1 API)
</TITLE>
<META NAME="date" CONTENT="2012-10-16">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="TableCaption (Apache FOP 1.1 API)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/TableCaption.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
fop 1.1</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../org/apache/fop/fo/flow/table/TableBody.html" title="class in org.apache.fop.fo.flow.table"><B>PREV CLASS</B></A>
<A HREF="../../../../../../org/apache/fop/fo/flow/table/TableCell.html" title="class in org.apache.fop.fo.flow.table"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../index.html?org/apache/fop/fo/flow/table/TableCaption.html" target="_top"><B>FRAMES</B></A>
<A HREF="TableCaption.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: <A HREF="#nested_classes_inherited_from_class_org.apache.fop.fo.FObj">NESTED</A> | <A HREF="#fields_inherited_from_class_org.apache.fop.fo.FObj">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.fop.fo.flow.table</FONT>
<BR>
Class TableCaption</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../../org/apache/fop/fo/FONode.html" title="class in org.apache.fop.fo">org.apache.fop.fo.FONode</A>
<IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../../org/apache/fop/fo/FObj.html" title="class in org.apache.fop.fo">org.apache.fop.fo.FObj</A>
<IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.fop.fo.flow.table.TableCaption</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD>java.lang.Cloneable, <A HREF="../../../../../../org/apache/fop/fo/Constants.html" title="interface in org.apache.fop.fo">Constants</A>, <A HREF="../../../../../../org/apache/fop/fo/properties/CommonAccessibilityHolder.html" title="interface in org.apache.fop.fo.properties">CommonAccessibilityHolder</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>TableCaption</B><DT>extends <A HREF="../../../../../../org/apache/fop/fo/FObj.html" title="class in org.apache.fop.fo">FObj</A><DT>implements <A HREF="../../../../../../org/apache/fop/fo/properties/CommonAccessibilityHolder.html" title="interface in org.apache.fop.fo.properties">CommonAccessibilityHolder</A></DL>
</PRE>
<P>
Class modelling the <a href="http://www.w3.org/TR/xsl/#fo_table-caption">
<code>fo:table-caption</code></a> object.
<P>
<P>
<HR>
<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->
<A NAME="nested_class_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Nested Class Summary</B></FONT></TH>
</TR>
</TABLE>
<A NAME="nested_classes_inherited_from_class_org.apache.fop.fo.FObj"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Nested classes/interfaces inherited from class org.apache.fop.fo.<A HREF="../../../../../../org/apache/fop/fo/FObj.html" title="class in org.apache.fop.fo">FObj</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../../org/apache/fop/fo/FObj.FObjIterator.html" title="class in org.apache.fop.fo">FObj.FObjIterator</A></CODE></TD>
</TR>
</TABLE>
<A NAME="nested_classes_inherited_from_class_org.apache.fop.fo.FONode"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Nested classes/interfaces inherited from class org.apache.fop.fo.<A HREF="../../../../../../org/apache/fop/fo/FONode.html" title="class in org.apache.fop.fo">FONode</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../../org/apache/fop/fo/FONode.FONodeIterator.html" title="interface in org.apache.fop.fo">FONode.FONodeIterator</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.GatherContextInfoFunction.html" title="class in org.apache.fop.fo">FONode.GatherContextInfoFunction</A></CODE></TD>
</TR>
</TABLE>
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
</TABLE>
<A NAME="fields_inherited_from_class_org.apache.fop.fo.FObj"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Fields inherited from class org.apache.fop.fo.<A HREF="../../../../../../org/apache/fop/fo/FObj.html" title="class in org.apache.fop.fo">FObj</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../../org/apache/fop/fo/FObj.html#firstChild">firstChild</A>, <A HREF="../../../../../../org/apache/fop/fo/FObj.html#lastChild">lastChild</A></CODE></TD>
</TR>
</TABLE>
<A NAME="fields_inherited_from_class_org.apache.fop.fo.FONode"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Fields inherited from class org.apache.fop.fo.<A HREF="../../../../../../org/apache/fop/fo/FONode.html" title="class in org.apache.fop.fo">FONode</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../../org/apache/fop/fo/FONode.html#FO_URI">FO_URI</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#FOX_URI">FOX_URI</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#locator">locator</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#log">log</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#parent">parent</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#siblings">siblings</A></CODE></TD>
</TR>
</TABLE>
<A NAME="fields_inherited_from_class_org.apache.fop.fo.Constants"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Fields inherited from interface org.apache.fop.fo.<A HREF="../../../../../../org/apache/fop/fo/Constants.html" title="interface in org.apache.fop.fo">Constants</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../../org/apache/fop/fo/Constants.html#COMPOUND_COUNT">COMPOUND_COUNT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#COMPOUND_MASK">COMPOUND_MASK</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#COMPOUND_SHIFT">COMPOUND_SHIFT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#CP_BLOCK_PROGRESSION_DIRECTION">CP_BLOCK_PROGRESSION_DIRECTION</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#CP_CONDITIONALITY">CP_CONDITIONALITY</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#CP_INLINE_PROGRESSION_DIRECTION">CP_INLINE_PROGRESSION_DIRECTION</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#CP_LENGTH">CP_LENGTH</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#CP_MAXIMUM">CP_MAXIMUM</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#CP_MINIMUM">CP_MINIMUM</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#CP_OPTIMUM">CP_OPTIMUM</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#CP_PRECEDENCE">CP_PRECEDENCE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#CP_WITHIN_COLUMN">CP_WITHIN_COLUMN</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#CP_WITHIN_LINE">CP_WITHIN_LINE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#CP_WITHIN_PAGE">CP_WITHIN_PAGE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_100">EN_100</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_200">EN_200</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_300">EN_300</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_400">EN_400</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_500">EN_500</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_600">EN_600</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_700">EN_700</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_800">EN_800</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_900">EN_900</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_ABSOLUTE">EN_ABSOLUTE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_ABSOLUTE_COLORMETRIC">EN_ABSOLUTE_COLORMETRIC</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_AFTER">EN_AFTER</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_AFTER_EDGE">EN_AFTER_EDGE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_ALL">EN_ALL</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_ALPHABETIC">EN_ALPHABETIC</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_ALTERNATE">EN_ALTERNATE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_ALWAYS">EN_ALWAYS</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_ANY">EN_ANY</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_AUTO">EN_AUTO</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_AUTO_EVEN">EN_AUTO_EVEN</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_AUTO_ODD">EN_AUTO_ODD</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_AVOID">EN_AVOID</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_BACKSLANT">EN_BACKSLANT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_BASELINE">EN_BASELINE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_BEFORE">EN_BEFORE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_BEFORE_EDGE">EN_BEFORE_EDGE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_BIDI_OVERRIDE">EN_BIDI_OVERRIDE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_BLANK">EN_BLANK</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_BLINK">EN_BLINK</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_BLOCK">EN_BLOCK</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_BOLDER">EN_BOLDER</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_BOTH">EN_BOTH</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_BOTTOM">EN_BOTTOM</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_BOUNDED_IN_ONE_DIMENSION">EN_BOUNDED_IN_ONE_DIMENSION</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_BT">EN_BT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_CAPITALIZE">EN_CAPITALIZE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_CAPTION">EN_CAPTION</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_CENTER">EN_CENTER</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_CENTRAL">EN_CENTRAL</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_CHARACTER_BY_CHARACTER">EN_CHARACTER_BY_CHARACTER</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_COLLAPSE">EN_COLLAPSE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_COLLAPSE_WITH_PRECEDENCE">EN_COLLAPSE_WITH_PRECEDENCE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_COLUMN">EN_COLUMN</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_CONDENSED">EN_CONDENSED</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_CONSIDER_SHIFTS">EN_CONSIDER_SHIFTS</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_DASHED">EN_DASHED</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_DISCARD">EN_DISCARD</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_DISREGARD_SHIFTS">EN_DISREGARD_SHIFTS</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_DOCUMENT">EN_DOCUMENT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_DOTS">EN_DOTS</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_DOTTED">EN_DOTTED</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_DOUBLE">EN_DOUBLE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_EMBED">EN_EMBED</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_END">EN_END</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_END_ON_EVEN">EN_END_ON_EVEN</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_END_ON_ODD">EN_END_ON_ODD</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_ERROR_IF_OVERFLOW">EN_ERROR_IF_OVERFLOW</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_EVEN">EN_EVEN</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_EVEN_PAGE">EN_EVEN_PAGE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_EXPANDED">EN_EXPANDED</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_EXTRA_CONDENSED">EN_EXTRA_CONDENSED</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_EXTRA_EXPANDED">EN_EXTRA_EXPANDED</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_FALSE">EN_FALSE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_FIC">EN_FIC</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_FIRST">EN_FIRST</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_FIRST_STARTING">EN_FIRST_STARTING</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_FIXED">EN_FIXED</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_FONT_HEIGHT">EN_FONT_HEIGHT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_FORCE">EN_FORCE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_FSWP">EN_FSWP</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_GROOVE">EN_GROOVE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_HANGING">EN_HANGING</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_HIDDEN">EN_HIDDEN</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_HIDE">EN_HIDE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_ICON">EN_ICON</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_IDEOGRAPHIC">EN_IDEOGRAPHIC</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_IGNORE">EN_IGNORE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_IGNORE_IF_AFTER_LINEFEED">EN_IGNORE_IF_AFTER_LINEFEED</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_IGNORE_IF_BEFORE_LINEFEED">EN_IGNORE_IF_BEFORE_LINEFEED</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_IGNORE_IF_SURROUNDING_LINEFEED">EN_IGNORE_IF_SURROUNDING_LINEFEED</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_INDEFINITE">EN_INDEFINITE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_INDENT">EN_INDENT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_INHERIT">EN_INHERIT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_INSET">EN_INSET</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_INSIDE">EN_INSIDE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_INTEGER_PIXELS">EN_INTEGER_PIXELS</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_ITALIC">EN_ITALIC</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_JUSTIFY">EN_JUSTIFY</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_LARGER">EN_LARGER</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_LAST">EN_LAST</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_LAST_ENDING">EN_LAST_ENDING</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_LAST_STARTING">EN_LAST_STARTING</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_LEAVE_SEPARATE">EN_LEAVE_SEPARATE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_LEFT">EN_LEFT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_LEWP">EN_LEWP</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_LIGHTER">EN_LIGHTER</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_LINE">EN_LINE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_LINE_HEIGHT">EN_LINE_HEIGHT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_LINE_THROUGH">EN_LINE_THROUGH</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_LINK">EN_LINK</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_LOWERCASE">EN_LOWERCASE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_LR">EN_LR</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_LR_TB">EN_LR_TB</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_LSWP">EN_LSWP</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_LTR">EN_LTR</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_MATHEMATICAL">EN_MATHEMATICAL</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_MAX_HEIGHT">EN_MAX_HEIGHT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_MENU">EN_MENU</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_MERGE">EN_MERGE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_MESSAGE_BOX">EN_MESSAGE_BOX</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_MIDDLE">EN_MIDDLE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_NARROWER">EN_NARROWER</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_NEW">EN_NEW</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_NO_BLINK">EN_NO_BLINK</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_NO_CHANGE">EN_NO_CHANGE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_NO_FORCE">EN_NO_FORCE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_NO_LIMIT">EN_NO_LIMIT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_NO_LINE_THROUGH">EN_NO_LINE_THROUGH</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_NO_LINK">EN_NO_LINK</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_NO_OVERLINE">EN_NO_OVERLINE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_NO_UNDERLINE">EN_NO_UNDERLINE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_NO_WRAP">EN_NO_WRAP</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_NON_UNIFORM">EN_NON_UNIFORM</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_NONE">EN_NONE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_NOREPEAT">EN_NOREPEAT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_NORMAL">EN_NORMAL</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_NOT_BLANK">EN_NOT_BLANK</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_OBLIQUE">EN_OBLIQUE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_ODD">EN_ODD</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_ODD_PAGE">EN_ODD_PAGE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_ONLY">EN_ONLY</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_OUTSET">EN_OUTSET</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_OUTSIDE">EN_OUTSIDE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_OVERLINE">EN_OVERLINE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_PAGE">EN_PAGE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_PAGE_SEQUENCE">EN_PAGE_SEQUENCE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_PAGINATE">EN_PAGINATE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_PERCEPTUAL">EN_PERCEPTUAL</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_PRE">EN_PRE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_PRESERVE">EN_PRESERVE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_REFERENCE_AREA">EN_REFERENCE_AREA</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_RELATIVE">EN_RELATIVE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_RELATIVE_COLOMETRIC">EN_RELATIVE_COLOMETRIC</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_REPEAT">EN_REPEAT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_REPEATX">EN_REPEATX</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_REPEATY">EN_REPEATY</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_REPLACE">EN_REPLACE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_RESAMPLE_ANY_METHOD">EN_RESAMPLE_ANY_METHOD</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_RESET_SIZE">EN_RESET_SIZE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_REST">EN_REST</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_RETAIN">EN_RETAIN</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_RIDGE">EN_RIDGE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_RIGHT">EN_RIGHT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_RL">EN_RL</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_RL_TB">EN_RL_TB</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_RTL">EN_RTL</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_RULE">EN_RULE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_SATURATION">EN_SATURATION</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_SCALE_DOWN_TO_FIT">EN_SCALE_DOWN_TO_FIT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_SCALE_TO_FIT">EN_SCALE_TO_FIT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_SCALE_UP_TO_FIT">EN_SCALE_UP_TO_FIT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_SCROLL">EN_SCROLL</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_SEMI_CONDENSED">EN_SEMI_CONDENSED</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_SEMI_EXPANDED">EN_SEMI_EXPANDED</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_SEPARATE">EN_SEPARATE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_SHOW">EN_SHOW</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_SMALL_CAPS">EN_SMALL_CAPS</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_SMALL_CAPTION">EN_SMALL_CAPTION</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_SMALLER">EN_SMALLER</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_SOLID">EN_SOLID</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_SPACE">EN_SPACE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_START">EN_START</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_STATIC">EN_STATIC</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_STATUS_BAR">EN_STATUS_BAR</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_SUB">EN_SUB</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_SUPER">EN_SUPER</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_SUPPRESS">EN_SUPPRESS</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_TABLE">EN_TABLE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_TABLE_FRAGMENT">EN_TABLE_FRAGMENT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_TB">EN_TB</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_TB_LR">EN_TB_LR</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_TB_RL">EN_TB_RL</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_TEXT_AFTER_EDGE">EN_TEXT_AFTER_EDGE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_TEXT_BEFORE_EDGE">EN_TEXT_BEFORE_EDGE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_TEXT_BOTTOM">EN_TEXT_BOTTOM</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_TEXT_TOP">EN_TEXT_TOP</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_TOP">EN_TOP</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_TRADITIONAL">EN_TRADITIONAL</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_TREAT_AS_SPACE">EN_TREAT_AS_SPACE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_TREAT_AS_ZERO_WIDTH_SPACE">EN_TREAT_AS_ZERO_WIDTH_SPACE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_TRUE">EN_TRUE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_ULTRA_CONDENSED">EN_ULTRA_CONDENSED</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_ULTRA_EXPANDED">EN_ULTRA_EXPANDED</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_UNBOUNDED">EN_UNBOUNDED</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_UNDERLINE">EN_UNDERLINE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_UNIFORM">EN_UNIFORM</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_UPPERCASE">EN_UPPERCASE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_USE_FONT_METRICS">EN_USE_FONT_METRICS</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_USE_SCRIPT">EN_USE_SCRIPT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_USECONTENT">EN_USECONTENT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_VISIBLE">EN_VISIBLE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_WIDER">EN_WIDER</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_WRAP">EN_WRAP</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_X_DISTRIBUTE">EN_X_DISTRIBUTE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#EN_X_FILL">EN_X_FILL</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#ENUM_COUNT">ENUM_COUNT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_BASIC_LINK">FO_BASIC_LINK</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_BIDI_OVERRIDE">FO_BIDI_OVERRIDE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_BLOCK">FO_BLOCK</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_BLOCK_CONTAINER">FO_BLOCK_CONTAINER</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_BOOKMARK">FO_BOOKMARK</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_BOOKMARK_TITLE">FO_BOOKMARK_TITLE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_BOOKMARK_TREE">FO_BOOKMARK_TREE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_CHANGE_BAR_BEGIN">FO_CHANGE_BAR_BEGIN</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_CHANGE_BAR_END">FO_CHANGE_BAR_END</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_CHARACTER">FO_CHARACTER</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_COLOR_PROFILE">FO_COLOR_PROFILE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_CONDITIONAL_PAGE_MASTER_REFERENCE">FO_CONDITIONAL_PAGE_MASTER_REFERENCE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_DECLARATIONS">FO_DECLARATIONS</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_EXTERNAL_GRAPHIC">FO_EXTERNAL_GRAPHIC</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_FLOAT">FO_FLOAT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_FLOW">FO_FLOW</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_FLOW_ASSIGNMENT">FO_FLOW_ASSIGNMENT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_FLOW_MAP">FO_FLOW_MAP</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_FLOW_NAME_SPECIFIER">FO_FLOW_NAME_SPECIFIER</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_FLOW_SOURCE_LIST">FO_FLOW_SOURCE_LIST</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_FLOW_TARGET_LIST">FO_FLOW_TARGET_LIST</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_FOLIO_PREFIX">FO_FOLIO_PREFIX</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_FOLIO_SUFFIX">FO_FOLIO_SUFFIX</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_FOOTNOTE">FO_FOOTNOTE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_FOOTNOTE_BODY">FO_FOOTNOTE_BODY</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_INDEX_KEY_REFERENCE">FO_INDEX_KEY_REFERENCE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_INDEX_PAGE_CITATION_LIST">FO_INDEX_PAGE_CITATION_LIST</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_INDEX_PAGE_CITATION_LIST_SEPARATOR">FO_INDEX_PAGE_CITATION_LIST_SEPARATOR</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_INDEX_PAGE_CITATION_RANGE_SEPARATOR">FO_INDEX_PAGE_CITATION_RANGE_SEPARATOR</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_INDEX_PAGE_NUMBER_PREFIX">FO_INDEX_PAGE_NUMBER_PREFIX</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_INDEX_PAGE_NUMBER_SUFFIX">FO_INDEX_PAGE_NUMBER_SUFFIX</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_INDEX_RANGE_BEGIN">FO_INDEX_RANGE_BEGIN</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_INDEX_RANGE_END">FO_INDEX_RANGE_END</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_INITIAL_PROPERTY_SET">FO_INITIAL_PROPERTY_SET</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_INLINE">FO_INLINE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_INLINE_CONTAINER">FO_INLINE_CONTAINER</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_INSTREAM_FOREIGN_OBJECT">FO_INSTREAM_FOREIGN_OBJECT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_LAYOUT_MASTER_SET">FO_LAYOUT_MASTER_SET</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_LEADER">FO_LEADER</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_LIST_BLOCK">FO_LIST_BLOCK</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_LIST_ITEM">FO_LIST_ITEM</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_LIST_ITEM_BODY">FO_LIST_ITEM_BODY</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_LIST_ITEM_LABEL">FO_LIST_ITEM_LABEL</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_MARKER">FO_MARKER</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_MULTI_CASE">FO_MULTI_CASE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_MULTI_PROPERTIES">FO_MULTI_PROPERTIES</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_MULTI_PROPERTY_SET">FO_MULTI_PROPERTY_SET</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_MULTI_SWITCH">FO_MULTI_SWITCH</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_MULTI_TOGGLE">FO_MULTI_TOGGLE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_PAGE_NUMBER">FO_PAGE_NUMBER</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_PAGE_NUMBER_CITATION">FO_PAGE_NUMBER_CITATION</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_PAGE_NUMBER_CITATION_LAST">FO_PAGE_NUMBER_CITATION_LAST</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_PAGE_SEQUENCE">FO_PAGE_SEQUENCE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_PAGE_SEQUENCE_MASTER">FO_PAGE_SEQUENCE_MASTER</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_PAGE_SEQUENCE_WRAPPER">FO_PAGE_SEQUENCE_WRAPPER</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_REGION_AFTER">FO_REGION_AFTER</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_REGION_BEFORE">FO_REGION_BEFORE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_REGION_BODY">FO_REGION_BODY</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_REGION_END">FO_REGION_END</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_REGION_NAME_SPECIFIER">FO_REGION_NAME_SPECIFIER</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_REGION_START">FO_REGION_START</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_REPEATABLE_PAGE_MASTER_ALTERNATIVES">FO_REPEATABLE_PAGE_MASTER_ALTERNATIVES</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_REPEATABLE_PAGE_MASTER_REFERENCE">FO_REPEATABLE_PAGE_MASTER_REFERENCE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_RETRIEVE_MARKER">FO_RETRIEVE_MARKER</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_RETRIEVE_TABLE_MARKER">FO_RETRIEVE_TABLE_MARKER</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_ROOT">FO_ROOT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_SCALING_VALUE_CITATION">FO_SCALING_VALUE_CITATION</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_SIMPLE_PAGE_MASTER">FO_SIMPLE_PAGE_MASTER</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_SINGLE_PAGE_MASTER_REFERENCE">FO_SINGLE_PAGE_MASTER_REFERENCE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_STATIC_CONTENT">FO_STATIC_CONTENT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_TABLE">FO_TABLE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_TABLE_AND_CAPTION">FO_TABLE_AND_CAPTION</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_TABLE_BODY">FO_TABLE_BODY</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_TABLE_CAPTION">FO_TABLE_CAPTION</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_TABLE_CELL">FO_TABLE_CELL</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_TABLE_COLUMN">FO_TABLE_COLUMN</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_TABLE_FOOTER">FO_TABLE_FOOTER</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_TABLE_HEADER">FO_TABLE_HEADER</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_TABLE_ROW">FO_TABLE_ROW</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_TITLE">FO_TITLE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_UNKNOWN_NODE">FO_UNKNOWN_NODE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_WRAPPER">FO_WRAPPER</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#FRM_OBJ_COUNT">FRM_OBJ_COUNT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#NOT_SET">NOT_SET</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_ABSOLUTE_POSITION">PR_ABSOLUTE_POSITION</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_ACTIVE_STATE">PR_ACTIVE_STATE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_ALIGNMENT_ADJUST">PR_ALIGNMENT_ADJUST</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_ALIGNMENT_BASELINE">PR_ALIGNMENT_BASELINE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_AUTO_RESTORE">PR_AUTO_RESTORE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_AZIMUTH">PR_AZIMUTH</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BACKGROUND">PR_BACKGROUND</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BACKGROUND_ATTACHMENT">PR_BACKGROUND_ATTACHMENT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BACKGROUND_COLOR">PR_BACKGROUND_COLOR</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BACKGROUND_IMAGE">PR_BACKGROUND_IMAGE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BACKGROUND_POSITION">PR_BACKGROUND_POSITION</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BACKGROUND_POSITION_HORIZONTAL">PR_BACKGROUND_POSITION_HORIZONTAL</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BACKGROUND_POSITION_VERTICAL">PR_BACKGROUND_POSITION_VERTICAL</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BACKGROUND_REPEAT">PR_BACKGROUND_REPEAT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BASELINE_SHIFT">PR_BASELINE_SHIFT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BLANK_OR_NOT_BLANK">PR_BLANK_OR_NOT_BLANK</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BLOCK_PROGRESSION_DIMENSION">PR_BLOCK_PROGRESSION_DIMENSION</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BORDER">PR_BORDER</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BORDER_AFTER_COLOR">PR_BORDER_AFTER_COLOR</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BORDER_AFTER_PRECEDENCE">PR_BORDER_AFTER_PRECEDENCE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BORDER_AFTER_STYLE">PR_BORDER_AFTER_STYLE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BORDER_AFTER_WIDTH">PR_BORDER_AFTER_WIDTH</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BORDER_BEFORE_COLOR">PR_BORDER_BEFORE_COLOR</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BORDER_BEFORE_PRECEDENCE">PR_BORDER_BEFORE_PRECEDENCE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BORDER_BEFORE_STYLE">PR_BORDER_BEFORE_STYLE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BORDER_BEFORE_WIDTH">PR_BORDER_BEFORE_WIDTH</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BORDER_BOTTOM">PR_BORDER_BOTTOM</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BORDER_BOTTOM_COLOR">PR_BORDER_BOTTOM_COLOR</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BORDER_BOTTOM_STYLE">PR_BORDER_BOTTOM_STYLE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BORDER_BOTTOM_WIDTH">PR_BORDER_BOTTOM_WIDTH</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BORDER_COLLAPSE">PR_BORDER_COLLAPSE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BORDER_COLOR">PR_BORDER_COLOR</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BORDER_END_COLOR">PR_BORDER_END_COLOR</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BORDER_END_PRECEDENCE">PR_BORDER_END_PRECEDENCE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BORDER_END_STYLE">PR_BORDER_END_STYLE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BORDER_END_WIDTH">PR_BORDER_END_WIDTH</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BORDER_LEFT">PR_BORDER_LEFT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BORDER_LEFT_COLOR">PR_BORDER_LEFT_COLOR</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BORDER_LEFT_STYLE">PR_BORDER_LEFT_STYLE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BORDER_LEFT_WIDTH">PR_BORDER_LEFT_WIDTH</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BORDER_RIGHT">PR_BORDER_RIGHT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BORDER_RIGHT_COLOR">PR_BORDER_RIGHT_COLOR</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BORDER_RIGHT_STYLE">PR_BORDER_RIGHT_STYLE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BORDER_RIGHT_WIDTH">PR_BORDER_RIGHT_WIDTH</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BORDER_SEPARATION">PR_BORDER_SEPARATION</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BORDER_SPACING">PR_BORDER_SPACING</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BORDER_START_COLOR">PR_BORDER_START_COLOR</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BORDER_START_PRECEDENCE">PR_BORDER_START_PRECEDENCE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BORDER_START_STYLE">PR_BORDER_START_STYLE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BORDER_START_WIDTH">PR_BORDER_START_WIDTH</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BORDER_STYLE">PR_BORDER_STYLE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BORDER_TOP">PR_BORDER_TOP</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BORDER_TOP_COLOR">PR_BORDER_TOP_COLOR</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BORDER_TOP_STYLE">PR_BORDER_TOP_STYLE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BORDER_TOP_WIDTH">PR_BORDER_TOP_WIDTH</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BORDER_WIDTH">PR_BORDER_WIDTH</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BOTTOM">PR_BOTTOM</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BREAK_AFTER">PR_BREAK_AFTER</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_BREAK_BEFORE">PR_BREAK_BEFORE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_CAPTION_SIDE">PR_CAPTION_SIDE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_CASE_NAME">PR_CASE_NAME</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_CASE_TITLE">PR_CASE_TITLE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_CHANGE_BAR_CLASS">PR_CHANGE_BAR_CLASS</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_CHANGE_BAR_COLOR">PR_CHANGE_BAR_COLOR</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_CHANGE_BAR_OFFSET">PR_CHANGE_BAR_OFFSET</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_CHANGE_BAR_PLACEMENT">PR_CHANGE_BAR_PLACEMENT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_CHANGE_BAR_STYLE">PR_CHANGE_BAR_STYLE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_CHANGE_BAR_WIDTH">PR_CHANGE_BAR_WIDTH</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_CHARACTER">PR_CHARACTER</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_CLEAR">PR_CLEAR</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_CLIP">PR_CLIP</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_COLOR">PR_COLOR</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_COLOR_PROFILE_NAME">PR_COLOR_PROFILE_NAME</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_COLUMN_COUNT">PR_COLUMN_COUNT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_COLUMN_GAP">PR_COLUMN_GAP</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_COLUMN_NUMBER">PR_COLUMN_NUMBER</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_COLUMN_WIDTH">PR_COLUMN_WIDTH</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_CONTENT_HEIGHT">PR_CONTENT_HEIGHT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_CONTENT_TYPE">PR_CONTENT_TYPE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_CONTENT_WIDTH">PR_CONTENT_WIDTH</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_COUNTRY">PR_COUNTRY</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_CUE">PR_CUE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_CUE_AFTER">PR_CUE_AFTER</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_CUE_BEFORE">PR_CUE_BEFORE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_DESTINATION_PLACEMENT_OFFSET">PR_DESTINATION_PLACEMENT_OFFSET</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_DIRECTION">PR_DIRECTION</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_DISPLAY_ALIGN">PR_DISPLAY_ALIGN</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_DOMINANT_BASELINE">PR_DOMINANT_BASELINE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_ELEVATION">PR_ELEVATION</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_EMPTY_CELLS">PR_EMPTY_CELLS</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_END_INDENT">PR_END_INDENT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_ENDS_ROW">PR_ENDS_ROW</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_EXTENT">PR_EXTENT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_EXTERNAL_DESTINATION">PR_EXTERNAL_DESTINATION</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_FLOAT">PR_FLOAT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_FLOW_MAP_NAME">PR_FLOW_MAP_NAME</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_FLOW_MAP_REFERENCE">PR_FLOW_MAP_REFERENCE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_FLOW_NAME">PR_FLOW_NAME</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_FLOW_NAME_REFERENCE">PR_FLOW_NAME_REFERENCE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_FONT">PR_FONT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_FONT_FAMILY">PR_FONT_FAMILY</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_FONT_SELECTION_STRATEGY">PR_FONT_SELECTION_STRATEGY</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_FONT_SIZE">PR_FONT_SIZE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_FONT_SIZE_ADJUST">PR_FONT_SIZE_ADJUST</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_FONT_STRETCH">PR_FONT_STRETCH</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_FONT_STYLE">PR_FONT_STYLE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_FONT_VARIANT">PR_FONT_VARIANT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_FONT_WEIGHT">PR_FONT_WEIGHT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_FORCE_PAGE_COUNT">PR_FORCE_PAGE_COUNT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_FORMAT">PR_FORMAT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_GLYPH_ORIENTATION_HORIZONTAL">PR_GLYPH_ORIENTATION_HORIZONTAL</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_GLYPH_ORIENTATION_VERTICAL">PR_GLYPH_ORIENTATION_VERTICAL</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_GROUPING_SEPARATOR">PR_GROUPING_SEPARATOR</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_GROUPING_SIZE">PR_GROUPING_SIZE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_HEIGHT">PR_HEIGHT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_HYPHENATE">PR_HYPHENATE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_HYPHENATION_CHARACTER">PR_HYPHENATION_CHARACTER</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_HYPHENATION_KEEP">PR_HYPHENATION_KEEP</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_HYPHENATION_LADDER_COUNT">PR_HYPHENATION_LADDER_COUNT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_HYPHENATION_PUSH_CHARACTER_COUNT">PR_HYPHENATION_PUSH_CHARACTER_COUNT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_HYPHENATION_REMAIN_CHARACTER_COUNT">PR_HYPHENATION_REMAIN_CHARACTER_COUNT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_ID">PR_ID</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_INDEX_CLASS">PR_INDEX_CLASS</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_INDEX_KEY">PR_INDEX_KEY</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_INDICATE_DESTINATION">PR_INDICATE_DESTINATION</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_INITIAL_PAGE_NUMBER">PR_INITIAL_PAGE_NUMBER</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_INLINE_PROGRESSION_DIMENSION">PR_INLINE_PROGRESSION_DIMENSION</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_INTERNAL_DESTINATION">PR_INTERNAL_DESTINATION</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_INTRINSIC_SCALE_VALUE">PR_INTRINSIC_SCALE_VALUE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_INTRUSION_DISPLACE">PR_INTRUSION_DISPLACE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_KEEP_TOGETHER">PR_KEEP_TOGETHER</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_KEEP_WITH_NEXT">PR_KEEP_WITH_NEXT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_KEEP_WITH_PREVIOUS">PR_KEEP_WITH_PREVIOUS</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_LANGUAGE">PR_LANGUAGE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_LAST_LINE_END_INDENT">PR_LAST_LINE_END_INDENT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_LEADER_ALIGNMENT">PR_LEADER_ALIGNMENT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_LEADER_LENGTH">PR_LEADER_LENGTH</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_LEADER_PATTERN">PR_LEADER_PATTERN</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_LEADER_PATTERN_WIDTH">PR_LEADER_PATTERN_WIDTH</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_LEFT">PR_LEFT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_LETTER_SPACING">PR_LETTER_SPACING</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_LETTER_VALUE">PR_LETTER_VALUE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_LINE_HEIGHT">PR_LINE_HEIGHT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_LINE_HEIGHT_SHIFT_ADJUSTMENT">PR_LINE_HEIGHT_SHIFT_ADJUSTMENT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_LINE_STACKING_STRATEGY">PR_LINE_STACKING_STRATEGY</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_LINEFEED_TREATMENT">PR_LINEFEED_TREATMENT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_MARGIN">PR_MARGIN</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_MARGIN_BOTTOM">PR_MARGIN_BOTTOM</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_MARGIN_LEFT">PR_MARGIN_LEFT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_MARGIN_RIGHT">PR_MARGIN_RIGHT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_MARGIN_TOP">PR_MARGIN_TOP</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_MARKER_CLASS_NAME">PR_MARKER_CLASS_NAME</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_MASTER_NAME">PR_MASTER_NAME</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_MASTER_REFERENCE">PR_MASTER_REFERENCE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_MAX_HEIGHT">PR_MAX_HEIGHT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_MAX_WIDTH">PR_MAX_WIDTH</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_MAXIMUM_REPEATS">PR_MAXIMUM_REPEATS</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_MEDIA_USAGE">PR_MEDIA_USAGE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_MERGE_PAGES_ACROSS_INDEX_KEY_REFERENCES">PR_MERGE_PAGES_ACROSS_INDEX_KEY_REFERENCES</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_MERGE_RANGES_ACROSS_INDEX_KEY_REFERENCES">PR_MERGE_RANGES_ACROSS_INDEX_KEY_REFERENCES</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_MERGE_SEQUENTIAL_PAGE_NUMBERS">PR_MERGE_SEQUENTIAL_PAGE_NUMBERS</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_MIN_HEIGHT">PR_MIN_HEIGHT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_MIN_WIDTH">PR_MIN_WIDTH</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_NUMBER_COLUMNS_REPEATED">PR_NUMBER_COLUMNS_REPEATED</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_NUMBER_COLUMNS_SPANNED">PR_NUMBER_COLUMNS_SPANNED</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_NUMBER_ROWS_SPANNED">PR_NUMBER_ROWS_SPANNED</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_ODD_OR_EVEN">PR_ODD_OR_EVEN</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_ORPHANS">PR_ORPHANS</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_OVERFLOW">PR_OVERFLOW</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_PADDING">PR_PADDING</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_PADDING_AFTER">PR_PADDING_AFTER</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_PADDING_BEFORE">PR_PADDING_BEFORE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_PADDING_BOTTOM">PR_PADDING_BOTTOM</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_PADDING_END">PR_PADDING_END</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_PADDING_LEFT">PR_PADDING_LEFT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_PADDING_RIGHT">PR_PADDING_RIGHT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_PADDING_START">PR_PADDING_START</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_PADDING_TOP">PR_PADDING_TOP</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_PAGE_BREAK_AFTER">PR_PAGE_BREAK_AFTER</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_PAGE_BREAK_BEFORE">PR_PAGE_BREAK_BEFORE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_PAGE_BREAK_INSIDE">PR_PAGE_BREAK_INSIDE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_PAGE_CITATION_STRATEGY">PR_PAGE_CITATION_STRATEGY</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_PAGE_HEIGHT">PR_PAGE_HEIGHT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_PAGE_NUMBER_TREATMENT">PR_PAGE_NUMBER_TREATMENT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_PAGE_POSITION">PR_PAGE_POSITION</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_PAGE_WIDTH">PR_PAGE_WIDTH</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_PAUSE">PR_PAUSE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_PAUSE_AFTER">PR_PAUSE_AFTER</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_PAUSE_BEFORE">PR_PAUSE_BEFORE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_PITCH">PR_PITCH</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_PITCH_RANGE">PR_PITCH_RANGE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_PLAY_DURING">PR_PLAY_DURING</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_POSITION">PR_POSITION</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_PRECEDENCE">PR_PRECEDENCE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_PROVISIONAL_DISTANCE_BETWEEN_STARTS">PR_PROVISIONAL_DISTANCE_BETWEEN_STARTS</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_PROVISIONAL_LABEL_SEPARATION">PR_PROVISIONAL_LABEL_SEPARATION</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_REF_ID">PR_REF_ID</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_REF_INDEX_KEY">PR_REF_INDEX_KEY</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_REFERENCE_ORIENTATION">PR_REFERENCE_ORIENTATION</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_REGION_NAME">PR_REGION_NAME</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_REGION_NAME_REFERENCE">PR_REGION_NAME_REFERENCE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_RELATIVE_ALIGN">PR_RELATIVE_ALIGN</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_RELATIVE_POSITION">PR_RELATIVE_POSITION</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_RENDERING_INTENT">PR_RENDERING_INTENT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_RETRIEVE_BOUNDARY">PR_RETRIEVE_BOUNDARY</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_RETRIEVE_BOUNDARY_WITHIN_TABLE">PR_RETRIEVE_BOUNDARY_WITHIN_TABLE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_RETRIEVE_CLASS_NAME">PR_RETRIEVE_CLASS_NAME</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_RETRIEVE_POSITION">PR_RETRIEVE_POSITION</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_RETRIEVE_POSITION_WITHIN_TABLE">PR_RETRIEVE_POSITION_WITHIN_TABLE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_RICHNESS">PR_RICHNESS</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_RIGHT">PR_RIGHT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_ROLE">PR_ROLE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_RULE_STYLE">PR_RULE_STYLE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_RULE_THICKNESS">PR_RULE_THICKNESS</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_SCALING">PR_SCALING</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_SCALING_METHOD">PR_SCALING_METHOD</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_SCORE_SPACES">PR_SCORE_SPACES</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_SCRIPT">PR_SCRIPT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_SHOW_DESTINATION">PR_SHOW_DESTINATION</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_SIZE">PR_SIZE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_SOURCE_DOCUMENT">PR_SOURCE_DOCUMENT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_SPACE_AFTER">PR_SPACE_AFTER</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_SPACE_BEFORE">PR_SPACE_BEFORE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_SPACE_END">PR_SPACE_END</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_SPACE_START">PR_SPACE_START</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_SPAN">PR_SPAN</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_SPEAK">PR_SPEAK</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_SPEAK_HEADER">PR_SPEAK_HEADER</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_SPEAK_NUMERAL">PR_SPEAK_NUMERAL</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_SPEAK_PUNCTUATION">PR_SPEAK_PUNCTUATION</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_SPEECH_RATE">PR_SPEECH_RATE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_SRC">PR_SRC</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_START_INDENT">PR_START_INDENT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_STARTING_STATE">PR_STARTING_STATE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_STARTS_ROW">PR_STARTS_ROW</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_STRESS">PR_STRESS</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_SUPPRESS_AT_LINE_BREAK">PR_SUPPRESS_AT_LINE_BREAK</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_SWITCH_TO">PR_SWITCH_TO</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_TABLE_LAYOUT">PR_TABLE_LAYOUT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_TABLE_OMIT_FOOTER_AT_BREAK">PR_TABLE_OMIT_FOOTER_AT_BREAK</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_TABLE_OMIT_HEADER_AT_BREAK">PR_TABLE_OMIT_HEADER_AT_BREAK</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_TARGET_PRESENTATION_CONTEXT">PR_TARGET_PRESENTATION_CONTEXT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_TARGET_PROCESSING_CONTEXT">PR_TARGET_PROCESSING_CONTEXT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_TARGET_STYLESHEET">PR_TARGET_STYLESHEET</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_TEXT_ALIGN">PR_TEXT_ALIGN</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_TEXT_ALIGN_LAST">PR_TEXT_ALIGN_LAST</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_TEXT_ALTITUDE">PR_TEXT_ALTITUDE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_TEXT_DECORATION">PR_TEXT_DECORATION</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_TEXT_DEPTH">PR_TEXT_DEPTH</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_TEXT_INDENT">PR_TEXT_INDENT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_TEXT_SHADOW">PR_TEXT_SHADOW</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_TEXT_TRANSFORM">PR_TEXT_TRANSFORM</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_TOP">PR_TOP</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_TREAT_AS_WORD_SPACE">PR_TREAT_AS_WORD_SPACE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_UNICODE_BIDI">PR_UNICODE_BIDI</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_VERTICAL_ALIGN">PR_VERTICAL_ALIGN</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_VISIBILITY">PR_VISIBILITY</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_VOICE_FAMILY">PR_VOICE_FAMILY</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_VOLUME">PR_VOLUME</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_WHITE_SPACE">PR_WHITE_SPACE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_WHITE_SPACE_COLLAPSE">PR_WHITE_SPACE_COLLAPSE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_WHITE_SPACE_TREATMENT">PR_WHITE_SPACE_TREATMENT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_WIDOWS">PR_WIDOWS</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_WIDTH">PR_WIDTH</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_WORD_SPACING">PR_WORD_SPACING</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_WRAP_OPTION">PR_WRAP_OPTION</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_WRITING_MODE">PR_WRITING_MODE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_X_ALT_TEXT">PR_X_ALT_TEXT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_X_BLOCK_PROGRESSION_UNIT">PR_X_BLOCK_PROGRESSION_UNIT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_X_DISABLE_COLUMN_BALANCING">PR_X_DISABLE_COLUMN_BALANCING</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_X_NUMBER_CONVERSION_FEATURES">PR_X_NUMBER_CONVERSION_FEATURES</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_X_ORPHAN_CONTENT_LIMIT">PR_X_ORPHAN_CONTENT_LIMIT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_X_WIDOW_CONTENT_LIMIT">PR_X_WIDOW_CONTENT_LIMIT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_X_XML_BASE">PR_X_XML_BASE</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_XML_LANG">PR_XML_LANG</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PR_Z_INDEX">PR_Z_INDEX</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PROPERTY_COUNT">PROPERTY_COUNT</A>, <A HREF="../../../../../../org/apache/fop/fo/Constants.html#PROPERTY_MASK">PROPERTY_MASK</A></CODE></TD>
</TR>
</TABLE>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../../org/apache/fop/fo/flow/table/TableCaption.html#TableCaption(org.apache.fop.fo.FONode)">TableCaption</A></B>(<A HREF="../../../../../../org/apache/fop/fo/FONode.html" title="class in org.apache.fop.fo">FONode</A> parent)</CODE>
<BR>
Create a TableCaption instance with the given <A HREF="../../../../../../org/apache/fop/fo/FONode.html" title="class in org.apache.fop.fo"><CODE>FONode</CODE></A>
as parent.</TD>
</TR>
</TABLE>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/fop/fo/flow/table/TableCaption.html#bind(org.apache.fop.fo.PropertyList)">bind</A></B>(<A HREF="../../../../../../org/apache/fop/fo/PropertyList.html" title="class in org.apache.fop.fo">PropertyList</A> pList)</CODE>
<BR>
Bind property values from the property list to the FO node.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/fop/fo/flow/table/TableCaption.html#endOfNode()">endOfNode</A></B>()</CODE>
<BR>
Primarily used for making final content model validation checks
and/or informing the <A HREF="../../../../../../org/apache/fop/fo/FOEventHandler.html" title="class in org.apache.fop.fo"><CODE>FOEventHandler</CODE></A> that the end of this FO
has been reached.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../../../org/apache/fop/fo/properties/CommonAccessibility.html" title="class in org.apache.fop.fo.properties">CommonAccessibility</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/fop/fo/flow/table/TableCaption.html#getCommonAccessibility()">getCommonAccessibility</A></B>()</CODE>
<BR>
Returns the accessibility properties.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/fop/fo/flow/table/TableCaption.html#getLocalName()">getLocalName</A></B>()</CODE>
<BR>
Returns the local name (i.e.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/fop/fo/flow/table/TableCaption.html#getNameId()">getNameId</A></B>()</CODE>
<BR>
Returns the <A HREF="../../../../../../org/apache/fop/fo/Constants.html" title="interface in org.apache.fop.fo"><CODE>Constants</CODE></A> class integer value of this node</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/fop/fo/flow/table/TableCaption.html#validateChildNode(org.xml.sax.Locator, java.lang.String, java.lang.String)">validateChildNode</A></B>(org.xml.sax.Locator loc,
java.lang.String nsURI,
java.lang.String localName)</CODE>
<BR>
Checks to make sure, during SAX processing of input document, that the
incoming node is valid for this (parent) node (e.g., checking to
see that <code>fo:table</code> is not an immediate child of <code>fo:root</code>)
called from <A HREF="../../../../../../org/apache/fop/fo/FOTreeBuilder.html#startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)"><CODE>FOTreeBuilder.startElement(String, String, String, Attributes)</CODE></A>
before constructing the child <A HREF="../../../../../../org/apache/fop/fo/FObj.html" title="class in org.apache.fop.fo"><CODE>FObj</CODE></A>.</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_org.apache.fop.fo.FObj"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class org.apache.fop.fo.<A HREF="../../../../../../org/apache/fop/fo/FObj.html" title="class in org.apache.fop.fo">FObj</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../../org/apache/fop/fo/FObj.html#addChildNode(org.apache.fop.fo.FONode)">addChildNode</A>, <A HREF="../../../../../../org/apache/fop/fo/FObj.html#addChildTo(org.apache.fop.fo.FONode, org.apache.fop.fo.FONode)">addChildTo</A>, <A HREF="../../../../../../org/apache/fop/fo/FObj.html#addForeignAttribute(org.apache.xmlgraphics.util.QName, java.lang.String)">addForeignAttribute</A>, <A HREF="../../../../../../org/apache/fop/fo/FObj.html#addMarker(org.apache.fop.fo.flow.Marker)">addMarker</A>, <A HREF="../../../../../../org/apache/fop/fo/FObj.html#clearChildNodes()">clearChildNodes</A>, <A HREF="../../../../../../org/apache/fop/fo/FObj.html#clone(org.apache.fop.fo.FONode, boolean)">clone</A>, <A HREF="../../../../../../org/apache/fop/fo/FObj.html#createPropertyList(org.apache.fop.fo.PropertyList, org.apache.fop.fo.FOEventHandler)">createPropertyList</A>, <A HREF="../../../../../../org/apache/fop/fo/FObj.html#findAncestor(int)">findAncestor</A>, <A HREF="../../../../../../org/apache/fop/fo/FObj.html#findNearestAncestorFObj()">findNearestAncestorFObj</A>, <A HREF="../../../../../../org/apache/fop/fo/FObj.html#gatherContextInfo()">gatherContextInfo</A>, <A HREF="../../../../../../org/apache/fop/fo/FObj.html#generatesReferenceAreas()">generatesReferenceAreas</A>, <A HREF="../../../../../../org/apache/fop/fo/FObj.html#getBidiLevel()">getBidiLevel</A>, <A HREF="../../../../../../org/apache/fop/fo/FObj.html#getBidiLevelRecursive()">getBidiLevelRecursive</A>, <A HREF="../../../../../../org/apache/fop/fo/FObj.html#getChildNodes()">getChildNodes</A>, <A HREF="../../../../../../org/apache/fop/fo/FObj.html#getChildNodes(org.apache.fop.fo.FONode)">getChildNodes</A>, <A HREF="../../../../../../org/apache/fop/fo/FObj.html#getContextInfoAlt()">getContextInfoAlt</A>, <A HREF="../../../../../../org/apache/fop/fo/FObj.html#getExtensionAttachments()">getExtensionAttachments</A>, <A HREF="../../../../../../org/apache/fop/fo/FObj.html#getForeignAttributes()">getForeignAttributes</A>, <A HREF="../../../../../../org/apache/fop/fo/FObj.html#getId()">getId</A>, <A HREF="../../../../../../org/apache/fop/fo/FObj.html#getMarkers()">getMarkers</A>, <A HREF="../../../../../../org/apache/fop/fo/FObj.html#getNamespaceURI()">getNamespaceURI</A>, <A HREF="../../../../../../org/apache/fop/fo/FObj.html#getNormalNamespacePrefix()">getNormalNamespacePrefix</A>, <A HREF="../../../../../../org/apache/fop/fo/FObj.html#getPropertyMakerFor(int)">getPropertyMakerFor</A>, <A HREF="../../../../../../org/apache/fop/fo/FObj.html#hasChildren()">hasChildren</A>, <A HREF="../../../../../../org/apache/fop/fo/FObj.html#hasExtensionAttachments()">hasExtensionAttachments</A>, <A HREF="../../../../../../org/apache/fop/fo/FObj.html#hasId()">hasId</A>, <A HREF="../../../../../../org/apache/fop/fo/FObj.html#hasMarkers()">hasMarkers</A>, <A HREF="../../../../../../org/apache/fop/fo/FObj.html#isBidiRangeBlockItem()">isBidiRangeBlockItem</A>, <A HREF="../../../../../../org/apache/fop/fo/FObj.html#isBlockItem(java.lang.String, java.lang.String)">isBlockItem</A>, <A HREF="../../../../../../org/apache/fop/fo/FObj.html#isBlockOrInlineItem(java.lang.String, java.lang.String)">isBlockOrInlineItem</A>, <A HREF="../../../../../../org/apache/fop/fo/FObj.html#isInlineItem(java.lang.String, java.lang.String)">isInlineItem</A>, <A HREF="../../../../../../org/apache/fop/fo/FObj.html#isNeutralItem(java.lang.String, java.lang.String)">isNeutralItem</A>, <A HREF="../../../../../../org/apache/fop/fo/FObj.html#processNode(java.lang.String, org.xml.sax.Locator, org.xml.sax.Attributes, org.apache.fop.fo.PropertyList)">processNode</A>, <A HREF="../../../../../../org/apache/fop/fo/FObj.html#removeChild(org.apache.fop.fo.FONode)">removeChild</A>, <A HREF="../../../../../../org/apache/fop/fo/FObj.html#setBidiLevel(int)">setBidiLevel</A>, <A HREF="../../../../../../org/apache/fop/fo/FObj.html#startOfNode()">startOfNode</A>, <A HREF="../../../../../../org/apache/fop/fo/FObj.html#toString()">toString</A></CODE></TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_org.apache.fop.fo.FONode"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class org.apache.fop.fo.<A HREF="../../../../../../org/apache/fop/fo/FONode.html" title="class in org.apache.fop.fo">FONode</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../../org/apache/fop/fo/FONode.html#addCharacters(char[], int, int, org.apache.fop.fo.PropertyList, org.xml.sax.Locator)">addCharacters</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#attachSiblings(org.apache.fop.fo.FONode, org.apache.fop.fo.FONode)">attachSiblings</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#canHaveMarkers()">canHaveMarkers</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#characters(char[], int, int, org.apache.fop.fo.PropertyList, org.xml.sax.Locator)">characters</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#charIterator()">charIterator</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#clone()">clone</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#collectDelimitedTextRanges(java.util.Stack)">collectDelimitedTextRanges</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#collectDelimitedTextRanges(java.util.Stack, org.apache.fop.complexscripts.bidi.DelimitedTextRange)">collectDelimitedTextRanges</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#decorateWithContextInfo(java.lang.String, org.apache.fop.fo.FONode)">decorateWithContextInfo</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#errorText(org.xml.sax.Locator)">errorText</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#finalizeNode()">finalizeNode</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#getBuilderContext()">getBuilderContext</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#getContentHandlerFactory()">getContentHandlerFactory</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#getContextInfo()">getContextInfo</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#getExtensionAttachment()">getExtensionAttachment</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#getFOEventHandler()">getFOEventHandler</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#getFOValidationEventProducer()">getFOValidationEventProducer</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#getLocator()">getLocator</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#getLocatorString(org.xml.sax.Locator)">getLocatorString</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#getLogger()">getLogger</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#getName()">getName</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#getName(java.lang.String)">getName</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#getNodePrefix(java.lang.String)">getNodePrefix</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#getNodeString(java.lang.String, java.lang.String)">getNodeString</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#getParent()">getParent</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#getRoot()">getRoot</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#getUserAgent()">getUserAgent</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#inMarker()">inMarker</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#invalidChildError(org.xml.sax.Locator, java.lang.String, java.lang.String)">invalidChildError</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#invalidChildError(org.xml.sax.Locator, java.lang.String, java.lang.String, java.lang.String, java.lang.String)">invalidChildError</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#isDelimitedTextRangeBoundary(int)">isDelimitedTextRangeBoundary</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#missingChildElementError(java.lang.String)">missingChildElementError</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#missingChildElementError(java.lang.String, boolean)">missingChildElementError</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#missingPropertyError(java.lang.String)">missingPropertyError</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#nodesOutOfOrderError(org.xml.sax.Locator, java.lang.String, java.lang.String)">nodesOutOfOrderError</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#nodesOutOfOrderError(org.xml.sax.Locator, java.lang.String, java.lang.String, boolean)">nodesOutOfOrderError</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#setLocator(org.xml.sax.Locator)">setLocator</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#setStructureTreeElement(org.apache.fop.accessibility.StructureTreeElement)">setStructureTreeElement</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#tooManyNodesError(org.xml.sax.Locator, org.apache.xmlgraphics.util.QName)">tooManyNodesError</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#tooManyNodesError(org.xml.sax.Locator, java.lang.String)">tooManyNodesError</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#tooManyNodesError(org.xml.sax.Locator, java.lang.String, java.lang.String)">tooManyNodesError</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#validateChildNode(org.apache.fop.fo.FONode, org.xml.sax.Locator, java.lang.String, java.lang.String)">validateChildNode</A>, <A HREF="../../../../../../org/apache/fop/fo/FONode.html#warningText(org.xml.sax.Locator)">warningText</A></CODE></TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="TableCaption(org.apache.fop.fo.FONode)"><!-- --></A><H3>
TableCaption</H3>
<PRE>
public <B>TableCaption</B>(<A HREF="../../../../../../org/apache/fop/fo/FONode.html" title="class in org.apache.fop.fo">FONode</A> parent)</PRE>
<DL>
<DD>Create a TableCaption instance with the given <A HREF="../../../../../../org/apache/fop/fo/FONode.html" title="class in org.apache.fop.fo"><CODE>FONode</CODE></A>
as parent.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>parent</CODE> - <A HREF="../../../../../../org/apache/fop/fo/FONode.html" title="class in org.apache.fop.fo"><CODE>FONode</CODE></A> that is the parent of this object</DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="bind(org.apache.fop.fo.PropertyList)"><!-- --></A><H3>
bind</H3>
<PRE>
public void <B>bind</B>(<A HREF="../../../../../../org/apache/fop/fo/PropertyList.html" title="class in org.apache.fop.fo">PropertyList</A> pList)
throws <A HREF="../../../../../../org/apache/fop/apps/FOPException.html" title="class in org.apache.fop.apps">FOPException</A></PRE>
<DL>
<DD>Bind property values from the property list to the FO node.
Must be overridden in all FObj subclasses that have properties
applying to it.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../../org/apache/fop/fo/FObj.html#bind(org.apache.fop.fo.PropertyList)">bind</A></CODE> in class <CODE><A HREF="../../../../../../org/apache/fop/fo/FObj.html" title="class in org.apache.fop.fo">FObj</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pList</CODE> - the PropertyList where the properties can be found.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../../org/apache/fop/apps/FOPException.html" title="class in org.apache.fop.apps">FOPException</A></CODE> - if there is a problem binding the values</DL>
</DD>
</DL>
<HR>
<A NAME="endOfNode()"><!-- --></A><H3>
endOfNode</H3>
<PRE>
protected void <B>endOfNode</B>()
throws <A HREF="../../../../../../org/apache/fop/apps/FOPException.html" title="class in org.apache.fop.apps">FOPException</A></PRE>
<DL>
<DD>Primarily used for making final content model validation checks
and/or informing the <A HREF="../../../../../../org/apache/fop/fo/FOEventHandler.html" title="class in org.apache.fop.fo"><CODE>FOEventHandler</CODE></A> that the end of this FO
has been reached.
The default implementation simply calls <A HREF="../../../../../../org/apache/fop/fo/FONode.html#finalizeNode()"><CODE>FONode.finalizeNode()</CODE></A>, without
sending any event to the <A HREF="../../../../../../org/apache/fop/fo/FOEventHandler.html" title="class in org.apache.fop.fo"><CODE>FOEventHandler</CODE></A>.
<br/><i>Note: the recommended way to override this method in subclasses is</i>
<br/><br/><code>super.endOfNode(); // invoke finalizeNode()
<br/>getFOEventHandler().endXXX(); // send endOfNode() notification</code>
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../../org/apache/fop/fo/FONode.html#endOfNode()">endOfNode</A></CODE> in class <CODE><A HREF="../../../../../../org/apache/fop/fo/FONode.html" title="class in org.apache.fop.fo">FONode</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../../org/apache/fop/apps/FOPException.html" title="class in org.apache.fop.apps">FOPException</A></CODE> - if there's a problem during processing</DL>
</DD>
</DL>
<HR>
<A NAME="validateChildNode(org.xml.sax.Locator, java.lang.String, java.lang.String)"><!-- --></A><H3>
validateChildNode</H3>
<PRE>
protected void <B>validateChildNode</B>(org.xml.sax.Locator loc,
java.lang.String nsURI,
java.lang.String localName)
throws <A HREF="../../../../../../org/apache/fop/fo/ValidationException.html" title="class in org.apache.fop.fo">ValidationException</A></PRE>
<DL>
<DD>Checks to make sure, during SAX processing of input document, that the
incoming node is valid for this (parent) node (e.g., checking to
see that <code>fo:table</code> is not an immediate child of <code>fo:root</code>)
called from <A HREF="../../../../../../org/apache/fop/fo/FOTreeBuilder.html#startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)"><CODE>FOTreeBuilder.startElement(String, String, String, Attributes)</CODE></A>
before constructing the child <A HREF="../../../../../../org/apache/fop/fo/FObj.html" title="class in org.apache.fop.fo"><CODE>FObj</CODE></A>.
<br>XSL Content Model: marker* (%block;)
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../../org/apache/fop/fo/FONode.html#validateChildNode(org.xml.sax.Locator, java.lang.String, java.lang.String)">validateChildNode</A></CODE> in class <CODE><A HREF="../../../../../../org/apache/fop/fo/FONode.html" title="class in org.apache.fop.fo">FONode</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>loc</CODE> - location in the FO source file<DD><CODE>nsURI</CODE> - namespace of incoming node<DD><CODE>localName</CODE> - name of the incoming node (without namespace prefix)
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../../org/apache/fop/fo/ValidationException.html" title="class in org.apache.fop.fo">ValidationException</A></CODE> - if incoming node not valid for parent</DL>
</DD>
</DL>
<HR>
<A NAME="getLocalName()"><!-- --></A><H3>
getLocalName</H3>
<PRE>
public java.lang.String <B>getLocalName</B>()</PRE>
<DL>
<DD>Returns the local name (i.e. without namespace prefix) of the node
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../../org/apache/fop/fo/FONode.html#getLocalName()">getLocalName</A></CODE> in class <CODE><A HREF="../../../../../../org/apache/fop/fo/FONode.html" title="class in org.apache.fop.fo">FONode</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the local name of this node</DL>
</DD>
</DL>
<HR>
<A NAME="getNameId()"><!-- --></A><H3>
getNameId</H3>
<PRE>
public int <B>getNameId</B>()</PRE>
<DL>
<DD>Returns the <A HREF="../../../../../../org/apache/fop/fo/Constants.html" title="interface in org.apache.fop.fo"><CODE>Constants</CODE></A> class integer value of this node
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../../org/apache/fop/fo/FONode.html#getNameId()">getNameId</A></CODE> in class <CODE><A HREF="../../../../../../org/apache/fop/fo/FONode.html" title="class in org.apache.fop.fo">FONode</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD><A HREF="../../../../../../org/apache/fop/fo/Constants.html#FO_TABLE_CAPTION"><CODE>Constants.FO_TABLE_CAPTION</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getCommonAccessibility()"><!-- --></A><H3>
getCommonAccessibility</H3>
<PRE>
public <A HREF="../../../../../../org/apache/fop/fo/properties/CommonAccessibility.html" title="class in org.apache.fop.fo.properties">CommonAccessibility</A> <B>getCommonAccessibility</B>()</PRE>
<DL>
<DD>Returns the accessibility properties.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../../org/apache/fop/fo/properties/CommonAccessibilityHolder.html#getCommonAccessibility()">getCommonAccessibility</A></CODE> in interface <CODE><A HREF="../../../../../../org/apache/fop/fo/properties/CommonAccessibilityHolder.html" title="interface in org.apache.fop.fo.properties">CommonAccessibilityHolder</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the accessibility properties</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/TableCaption.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
fop 1.1</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../org/apache/fop/fo/flow/table/TableBody.html" title="class in org.apache.fop.fo.flow.table"><B>PREV CLASS</B></A>
<A HREF="../../../../../../org/apache/fop/fo/flow/table/TableCell.html" title="class in org.apache.fop.fo.flow.table"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../index.html?org/apache/fop/fo/flow/table/TableCaption.html" target="_top"><B>FRAMES</B></A>
<A HREF="TableCaption.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: <A HREF="#nested_classes_inherited_from_class_org.apache.fop.fo.FObj">NESTED</A> | <A HREF="#fields_inherited_from_class_org.apache.fop.fo.FObj">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
Copyright 1999-2012 The Apache Software Foundation. All Rights Reserved.
</BODY>
</HTML>
| {
"pile_set_name": "Github"
} |
# ***** BEGIN GPL LICENSE BLOCK *****
#
# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# The Original Code is Copyright (C) 2014, Blender Foundation
# All rights reserved.
# ***** END GPL LICENSE BLOCK *****
set(INC
.
)
set(INC_SYS
${GLEW_INCLUDE_PATH}
)
set(SRC
intern/glew-mx.c
glew-mx.h
intern/gl-deprecated.h
intern/symbol-binding.h
)
set(LIB
)
add_definitions(${GL_DEFINITIONS})
blender_add_lib(bf_intern_glew_mx "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
| {
"pile_set_name": "Github"
} |
//Copyright (c) 2018 Yardi Technology Limited. Http://www.kooboo.com
//All rights reserved.
using System.Threading.Tasks;
using Kooboo.Api.ApiResponse;
using Kooboo.Data.Context;
using Kooboo.Data.Server;
using System;
using System.Collections.Generic;
namespace Kooboo.Api
{
public class ApiMiddleware : IKoobooMiddleWare
{
public ApiMiddleware(IApiProvider apiprovider)
{
this.ApiProvider = apiprovider;
if (!string.IsNullOrEmpty(this.ApiProvider.ApiPrefix))
{
this.Prefix = this.ApiProvider.ApiPrefix;
}
}
public string Prefix { get; set; }
private string _beforeapi;
internal string BeforeApi
{
get
{
if (string.IsNullOrEmpty(_beforeapi))
{
if (!string.IsNullOrEmpty(this.Prefix))
{
if (this.Prefix.StartsWith("/"))
{
_beforeapi = this.Prefix.Substring(1);
}
else
{
_beforeapi = this.Prefix;
}
}
}
if (string.IsNullOrEmpty(_beforeapi))
{
_beforeapi = "_api";
}
return _beforeapi;
}
set
{ _beforeapi = value; }
}
public Action<Kooboo.Data.Context.RenderContext, IResponse> Log { get; set; }
public IApiProvider ApiProvider { get; set; }
public IKoobooMiddleWare Next
{
get; set;
}
public async Task Invoke(RenderContext context)
{
context.Request.Channel = RequestChannel.API;
if (!string.IsNullOrEmpty(this.Prefix) && !context.Request.RawRelativeUrl.ToLower().StartsWith(this.Prefix))
{
await Next.Invoke(context); return;
}
ApiCommand command;
if (!ApiRoute.ApiRouting.TryParseCommand(context.Request.RelativeUrl, context.Request.Method, out command, this.BeforeApi))
{
context.Response.StatusCode = 500;
context.Response.Body = System.Text.Encoding.UTF8.GetBytes("Invalid Api command");
if (Log != null)
{
Log(context, null);
}
return;
}
ApiCall apirequest = new ApiCall() { Command = command, Context = context };
var response = ApiManager.Execute(apirequest, this.ApiProvider);
if (Log != null)
{
Log(context, response);
}
if (response is MetaResponse)
{
var dataresponse = response as MetaResponse;
foreach (var item in dataresponse.Headers)
{
context.Response.Headers.Add(item.Key, string.Join(null, item.Value));
}
foreach (var item in dataresponse.DeletedCookieNames)
{
context.Response.DeleteCookie(item);
}
foreach (var item in dataresponse.AppendedCookies)
{
context.Response.AddCookie(item);
}
dataresponse.DeletedCookieNames.Clear();
dataresponse.AppendedCookies.Clear();
dataresponse.Headers.Clear();
context.Response.StatusCode = dataresponse.StatusCode;
if (!string.IsNullOrEmpty(dataresponse.RedirectUrl))
{
context.Response.Redirect(302, dataresponse.RedirectUrl);
return;
}
}
if (response is BinaryResponse)
{
RenderBinary(context, response as BinaryResponse);
}
else if (response is NoResponse)
{
// do nothing.
}
else if (response is PlainResponse)
{
RenderPlainResponse(context, response as PlainResponse);
}
else
{
MultilingualService.EnsureLangText(response, context);
var jsonbody = Lib.Helper.JsonHelper.Serialize(response);
context.Response.ContentType = "application/json";
context.Response.Body = System.Text.Encoding.UTF8.GetBytes(jsonbody);
context.Response.StatusCode = 200;
}
// k.response.setHeader("Access-Control-Allow-Origin", "*");
// k.response.setHeader("Access-Control-Allow-Headers", "*");
foreach (var item in DefaultHeaders)
{
if (!context.Response.Headers.ContainsKey(item.Key))
{
context.Response.Headers.Add(item.Key, item.Value);
}
}
}
private Dictionary<string, string> _defaultheaders;
public Dictionary<string, string> DefaultHeaders
{
get
{
if (_defaultheaders == null)
{
_defaultheaders = new Dictionary<string, string>();
_defaultheaders.Add("Access-Control-Allow-Origin", "*");
_defaultheaders.Add("Access-Control-Allow-Headers", "*");
_defaultheaders.Add("Pragma", "no-cache");
_defaultheaders.Add("Cache-Control", "private, no-cache, no-store, proxy-revalidate, no-transform");
}
return _defaultheaders;
}
}
public void RenderBinary(RenderContext context, BinaryResponse resposne)
{
if (resposne == null)
{
return;
}
context.Response.ContentType = resposne.ContentType;
context.Response.StatusCode = 200;
foreach (var item in resposne.Headers)
{
string value = string.Join("", item.Value);
context.Response.Headers.Add(item.Key, value);
}
context.Response.Body = resposne.BinaryBytes;
}
public void RenderPlainResponse(RenderContext context, PlainResponse resposne)
{
if (resposne == null)
{
return;
}
context.Response.ContentType = resposne.ContentType;
context.Response.StatusCode = resposne.statusCode;
context.Response.Body = System.Text.Encoding.UTF8.GetBytes(resposne.Content);
}
}
} | {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="300"
android:shareInterpolator="false">
<scale
android:fillAfter="false"
android:fromXScale="1.0"
android:fromYScale="1.0"
android:interpolator="@android:anim/accelerate_decelerate_interpolator"
android:pivotX="0%"
android:pivotY="50%"
android:toXScale="0.0"
android:toYScale="0.0" />
<alpha
android:fromAlpha="1.0"
android:toAlpha="0.0" />
</set> | {
"pile_set_name": "Github"
} |
/* Soot - a Java Optimization Framework
* Copyright (C) 2012 Michael Markert, Frank Hartmann
*
* (c) 2012 University of Luxembourg - Interdisciplinary Centre for
* Security Reliability and Trust (SnT) - All rights reserved
* Alexandre Bartel
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
package soot.dexpler.instructions;
import org.jf.dexlib2.iface.instruction.Instruction;
import org.jf.dexlib2.iface.instruction.ReferenceInstruction;
import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction;
import org.jf.dexlib2.iface.reference.FieldReference;
import soot.Local;
import soot.Type;
import soot.dexpler.Debug;
import soot.dexpler.DexBody;
import soot.dexpler.DexType;
import soot.dexpler.IDalvikTyper;
import soot.dexpler.typing.DalvikTyper;
import soot.jimple.AssignStmt;
import soot.jimple.InstanceFieldRef;
import soot.jimple.Jimple;
public class IputInstruction extends FieldInstruction {
AssignStmt assign = null;
public IputInstruction (Instruction instruction, int codeAdress) {
super(instruction, codeAdress);
}
public void jimplify (DexBody body) {
TwoRegisterInstruction i = (TwoRegisterInstruction)instruction;
int source = i.getRegisterA();
int object = i.getRegisterB();
FieldReference f = (FieldReference)((ReferenceInstruction)instruction).getReference();
InstanceFieldRef instanceField = Jimple.v().newInstanceFieldRef(body.getRegisterLocal(object),
getSootFieldRef(f));
Local sourceValue = body.getRegisterLocal(source);
assign = getAssignStmt(body, sourceValue, instanceField);
setUnit(assign);
addTags(assign);
body.add(assign);
if (IDalvikTyper.ENABLE_DVKTYPER) {
Debug.printDbg(IDalvikTyper.DEBUG, "constraint: "+ assign);
int op = (int)instruction.getOpcode().value;
DalvikTyper.v().setType(assign.getRightOpBox(), instanceField.getType(), true);
}
}
@Override
protected Type getTargetType(DexBody body) {
FieldReference f = (FieldReference)((ReferenceInstruction) instruction).getReference();
return DexType.toSoot(f.getType());
}
}
| {
"pile_set_name": "Github"
} |
""
{
"FILE_VERSION" = "9237"
"ENLISTMENT_CHOICE" = "NEVER"
"PROJECT_FILE_RELATIVE_PATH" = ""
"NUMBER_OF_EXCLUDED_FILES" = "0"
"ORIGINAL_PROJECT_FILE_PATH" = ""
"NUMBER_OF_NESTED_PROJECTS" = "0"
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
}
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
bootstrap="Tests/bootstrap.php"
>
<testsuites>
<testsuite name="Symfony Doctrine Bridge Test Suite">
<directory>./Tests/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory>./</directory>
<exclude>
<directory>./Resources</directory>
<directory>./Tests</directory>
</exclude>
</whitelist>
</filter>
</phpunit>
| {
"pile_set_name": "Github"
} |
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2016, Anaconda, Inc. All rights reserved.
#
# Licensed under the terms of the BSD 3-Clause License.
# The full license is in the file LICENSE.txt, distributed with this software.
# -----------------------------------------------------------------------------
from __future__ import absolute_import, print_function
import logging
from anaconda_project import verbose
from anaconda_project.internal import logged_subprocess
class ArrayHandler(logging.Handler):
def __init__(self):
super(ArrayHandler, self).__init__(level=logging.DEBUG)
self.messages = []
def emit(self, record):
self.messages.append(record.msg % record.args)
def _test_logger():
logger = (logging.getLoggerClass())(name="test_logged_subprocess")
logger.setLevel(logging.DEBUG)
handler = ArrayHandler()
logger.addHandler(handler)
logger.messages = handler.messages
return logger
def test_log_subprocess_call(monkeypatch):
recorded = dict(args=(), kwargs=())
def mock_call(*args, **kwargs):
recorded['args'] = args
recorded['kwargs'] = kwargs
monkeypatch.setattr('subprocess.call', mock_call)
logged_subprocess.call(['a', 'b'], foo='bar')
assert recorded == dict(args=(), kwargs=dict(args=['a', 'b'], foo='bar'))
def test_log_subprocess_call_with_logging(monkeypatch):
logger = _test_logger()
verbose.push_verbose_logger(logger)
try:
recorded = dict(args=(), kwargs=())
def mock_call(*args, **kwargs):
recorded['args'] = args
recorded['kwargs'] = kwargs
monkeypatch.setattr('subprocess.call', mock_call)
logged_subprocess.call(['a', 'b'], foo='bar')
assert recorded == dict(args=(), kwargs=dict(args=['a', 'b'], foo='bar'))
assert logger.messages == ['$ a b']
finally:
verbose.pop_verbose_logger()
def test_log_subprocess_Popen(monkeypatch):
recorded = dict(args=(), kwargs=())
def mock_Popen(*args, **kwargs):
recorded['args'] = args
recorded['kwargs'] = kwargs
monkeypatch.setattr('subprocess.Popen', mock_Popen)
logged_subprocess.Popen(['a', 'b'], foo='bar')
assert recorded == dict(args=(), kwargs=dict(args=['a', 'b'], foo='bar'))
def test_log_subprocess_Popen_with_logging(monkeypatch):
logger = _test_logger()
verbose.push_verbose_logger(logger)
try:
recorded = dict(args=(), kwargs=())
def mock_Popen(*args, **kwargs):
recorded['args'] = args
recorded['kwargs'] = kwargs
monkeypatch.setattr('subprocess.Popen', mock_Popen)
logged_subprocess.Popen(['a', 'b'], foo='bar')
assert recorded == dict(args=(), kwargs=dict(args=['a', 'b'], foo='bar'))
assert logger.messages == ['$ a b']
finally:
verbose.pop_verbose_logger()
def test_log_subprocess_check_output(monkeypatch):
recorded = dict(args=(), kwargs=())
def mock_check_output(*args, **kwargs):
recorded['args'] = args
recorded['kwargs'] = kwargs
monkeypatch.setattr('subprocess.check_output', mock_check_output)
logged_subprocess.check_output(['a', 'b'], foo='bar')
assert recorded == dict(args=(), kwargs=dict(args=['a', 'b'], foo='bar'))
def test_log_subprocess_check_output_with_logging(monkeypatch):
logger = _test_logger()
verbose.push_verbose_logger(logger)
try:
recorded = dict(args=(), kwargs=())
def mock_check_output(*args, **kwargs):
recorded['args'] = args
recorded['kwargs'] = kwargs
monkeypatch.setattr('subprocess.check_output', mock_check_output)
logged_subprocess.check_output(['a', 'b'], foo='bar')
assert recorded == dict(args=(), kwargs=dict(args=['a', 'b'], foo='bar'))
assert logger.messages == ['$ a b']
finally:
verbose.pop_verbose_logger()
| {
"pile_set_name": "Github"
} |
---
title: How to contribute a new output to Kapacitor
newversionredirect: about_the_project/custom_output/
menu:
kapacitor_012:
name: Writing your own Output node
identifier: custom_output
weight: 0
parent: contributing
---
If you haven't already check out [this] (https://github.com/influxdb/kapacitor/blob/master/CONTRIBUTING.md)
information to get started contributing.
The Goal
--------
Add a new node to Kapacitor that can output data to a custom endpoint.
For this guide lets say we want to output data to a fictitous in-house database called HouseDB.
Overview
--------
Kapacitor processes data via a pipeline.
A pipeline is formally a directed acyclic graph (DAG).
The basic idea is that each node in the graph represents some form of processing on the data and each edge passes the data between nodes.
In order to add a new type of node there are two components that need to be written:
1.
The API (TICKscript) for creating and configuring the node.
2.
The implementation of the data processing step.
In this case, the implementation of outputting the data to HouseDB.
The code mirrors these requirements with two Go packages.
1.
`pipeline` -- this package defines what types of nodes are available and how they are configured.
2.
`kapacitor` -- this package provides implementations of each of the nodes defined in the `pipeline` package.
The reason for splitting out defining the node from the implementation of the node is to make the API (i.e.
a TICKscript)
clean and easy to follow.
### Updating TICKscript
First things first, we need to update TICKscript so that users can define a our new node.
What should the TICKscript look like in order to send data to a HouseDB instance?
To connect to a HouseDB instance we need both a URL and a database name, so we need a way to provide that information.
How about this?
```javascript
node
|houseDBOut()
.url('house://housedb.example.com')
.database('metrics')
```
In order to update TICKscript to support those new methods we need to write a Go type that implements the `pipeline.Node` interface.
The interface can be found [here](https://github.com/influxdb/kapacitor/blob/master/pipeline/node.go)
as well as a complete implementation via the `pipeline.node` type.
Since the implementation of the `Node` is done for us we just need to use it.
First we need a name, `HouseDBOutNode` follows the convention.
Let's define a Go `struct` that will implement the interface via composition.
Create a file called `housedb_out.go` in the `pipeline` directory with the contents below.
```go
package pipeline
// A HouseDBOutNode will take the incoming data stream and store it in a
// HouseDB instance.
type HouseDBOutNode struct {
// Include the generic node implementation.
node
}
```
Just like that we have a type in Go that implements the needed interface.
In order to allow for the `.url` and `.database` methods we want, just define fields on the type with the same name.
The first letter needs to capitalized so that it is exported the rest of the name should have the same case as the method name.
TICKscript will take care of matching the case at runtime.
Update the `housedb_out.go` file.
```go
package pipeline
// A HouseDBOutNode will take the incoming data stream and store it in a
// HouseDB instance.
type HouseDBOutNode struct {
// Include the generic node implementation.
node
// URL for connecting to HouseDB
Url string
// Database name
Database string
}
```
It's important that the fields be exported since they will be consumed by the node in the `kapacitor` package.
Next we need a consistent way to create a new instance of our node.
But to do so we need to think about how this node connects to other nodes.
Since we are an output node as far as Kapacitor is concerned we are the end of the pipeline and we do not provide any outbound edges.
HouseDB is a flexible datastore and can store data in batches or as single data points,
as a result we do not care what type of data the HouseDBOutNode node receives.
With that in mind we can define a function to create a new HouseDBOutNode.
Add this function to the end of the `housedb_out.go` file.
```go
// Create a new HouseDBOutNode that accepts any edge type.
func newHouseDBOutNode(wants EdgeType) *HouseDBOutNode {
return &HouseDBOutNode{
node: node{
desc: "housedb",
wants: wants,
provides: NoEdge,
}
}
}
```
By explicitly stating what types of edges the node `wants` and `provides` Kapacitor will do the necessary type checking so that users cannot define invalid pipelines.
Finally we need to add a new `chaining method` so that users can connect HouseDBOutNodes to their existing pipelines.
A `chaining method` is one that creates a new node and adds it as a child of the calling node, in effect the method chains nodes together.
The `pipeline.chainnode` type contains the set of all methods that can be used for chaining nodes.
By adding our method to that type automatically any other node can now chain with a HouseDBOutNode.
Add this function to the end of the `pipeline/node.go` file.
```go
// Create a new HouseDBOutNode as a child of the calling node.
func (c *chainnode) HouseDBOut() *HouseDBOutNode {
h := newHouseDBOutNode(c.Provides())
c.linkChild(h)
return h
}
```
That should do it.
In review we now have defined all the necessary pieces so that TICKscripts can define HouseDBOutNodes.
```javascript
node
|houseDBOut() // added as a method to the 'chainnode' type
.url('house://housedb.example.com') // added as a field to the HouseDBOutNode
.database('metrics') // added as a field to the HouseDBOutNode
```
### Implementing the HouseDB output
Now that a TICKscript can define our new output node we need to actually provide an implementation so that Kapacitor knows what to do with the node.
Each node in the `pipeline` package has a node of the same name in the `kapacitor` package.
Create a file called `housedb_out.go` and put it in the root of the repo.
Put the contents below in the file.
```
package kapacitor
import (
"github.com/influxdb/kapacitor/pipeline"
)
type HouseDBOutNode struct {
// Include the generic node implementation
node
// Keep a reference to the pipeline node
h *pipeline.HouseDBOutNode
}
```
The `kapacitor` package also defines an interface named `Node` and provides a default implementation via the `kapacitor.node` type.
Again we use composition to implement the interface.
Notice we also have a field that will contain an instance of the `pipeline.HouseDBOutNode` we just finished defining.
This `pipeline.HouseDBOutNode` acts like a configuration struct telling the `kapacitor.HouseDBOutNode` what it needs to do its job.
Now that we have a struct let's define a function for creating an instance of our new struct.
The `new*Node` methods in the `kapacitor` package follow a convention of:
```go
func newNodeName(et *ExecutingTask, n *pipeline.NodeName) (*NodeName, error) {}
```
In our case we want to define a function called `newHouseDBOutNode` like so:
```go
func newHouseDBOutNode(et *ExecutingTask, n *pipeline.HouseDBOutNode) (*HouseDBOutNode, error) {
h := &HouseDBOutNode{
// pass in necessary fields to the 'node' struct
node: node{Node: n, et: et},
// Keep a reference to the pipeline.HouseDBOutNode
h: n,
}
// Set the function to be called when running the node
// more on this in a bit.
h.node.runF = h.runOut
return h
}
```
Add the above method to the `housedb_out.go` file.
In order for an instance of our node to be created we need to associate it with the node from the `pipeline` package.
This can be done via the switch statement in the method `createNode` in the file `task.go`.
Add a new case like so:
```go
// Create a node from a given pipeline node.
func (et *ExecutingTask) createNode(p pipeline.Node, l *log.Logger) (n Node, err error) {
switch t := p.(type) {
...
case *pipeline.HouseDBOutNode:
n, err = newHouseDBOutNode(et, t, l)
...
}
```
Now that we have associated our two types let's get back to implementing the output code.
Notice the line `h.node.runF = h.runOut` in the `newHouseDBOutNode` function.
This line sets the method of the `kapacitor.HouseDBOutNode` that will be called when the node should start executing.
We need to define the `runOut` method now.
In the file `housedb_out.go` add this method:
```go
func (h *HouseDBOutNode) runOut() error {
return nil
}
```
With that the HouseDBOutNode is complete but obviously won't do anything yet.
As we learned earlier node communicate via edges.
There is a Go type `kapacitor.Edge` that handles this communication.
All that we need to do is read data off the edge and send it to HouseDB.
Remember that we said that a HouseDBOutNode wants whatever edge type we give it?
Because its flexible we will need to define how to read the data whether its stream or batch data.
Lets update the `runOut` method with an appropriate switch statement.
```go
func (h *HouseDBOutNode) runOut() error {
switch h.Wants() {
case pipeline.StreamEdge:
// Read stream data and send to HouseDB
case pipeline.BatchEdge:
// Read batch data and send to HouseDB
}
return nil
}
```
The `node` type we included via composition in the HouseDBOutNode provides us with a list of edges in the field named `ins`.
Since we can only have one parent the edge we are concerned about is only the 0th edge.
The `Edge` type provides two methods:
* `NextPoint` for reading stream data.
* `NextBatch` for reading batch data.
Update the cases in the switch statements to loop through all data.
```go
func (h *HouseDBOutNode) runOut() error {
switch h.Wants() {
case pipeline.StreamEdge:
// Read stream data and send to HouseDB
for p, ok := h.ins[0].NextPoint(); ok; p, ok = h.ins[0].NextPoint() {
// Process a single point
}
case pipeline.BatchEdge:
// Read batch data and send to HouseDB
for b, ok := h.ins[0].NextBatch(); ok; b, ok = h.ins[0].NextBatch() {
// Process a batch of points
}
}
return nil
}
```
To make it easy on ourselves we can convert the single point into a batch of just that point.
Then all we need to do is write a function that takes a batch and writes it to HouseDB.
```go
func (h *HouseDBOutNode) runOut() error {
switch h.Wants() {
case pipeline.StreamEdge:
// Read stream data and send to HouseDB
for p, ok := h.ins[0].NextPoint(); ok; p, ok = h.ins[0].NextPoint() {
// Turn the point into a batch with just one point.
batch := models.Batch{
Name: p.Name,
Group: p.Group,
Tags: p.Tags,
Points: []models.TimeFields{{Time: p.Time, Fields: p.Fields}},
}
// Write the batch
err := h.write(batch)
if err != nil {
return err
}
}
case pipeline.BatchEdge:
// Read batch data and send to HouseDB
for b, ok := h.ins[0].NextBatch(); ok; b, ok = h.ins[0].NextBatch() {
// Write the batch
err := h.write(b)
if err != nil {
return err
}
}
}
return nil
}
// Write a batch of data to HouseDB
func (h *HouseDBOutNode) write(batch models.Batch) error {
// Implement writing to HouseDB here...
return nil
}
```
Once you have implemented the `write` method you are done, now as the data arrives
it will be written to the specified HouseDB instance.
### Summary
In summary we first wrote a node in the `pipeline` package (filepath: `pipeline/housedb_out.go`) that defines how the TICKscript API will work for sending data to a HouseDB instance.
Then we wrote the implementation of that node in the `kapacitor` package (filepath: `housedb_out.go`).
We also had to update two existing files `pipeline/node.go` to add a new chaining method, and `task.go` to associate the two types.
Here are the complete file contents:
pipeline/housedb_out.go:
```go
package pipeline
// A HouseDBOutNode will take the incoming data stream and store it in a
// HouseDB instance.
type HouseDBOutNode struct {
// Include the generic node implementation.
node
// URL for connecting to HouseDB
Url string
// Database name
Database string
}
// Create a new HouseDBOutNode that accepts any edge type.
func newHouseDBOutNode(wants EdgeType) *HouseDBOutNode {
return &HouseDBOutNode{
node: node{
desc: "housedb",
wants: wants,
provides: NoEdge,
}
}
}
```
housedb_out.go
```go
package kapacitor
import (
"github.com/influxdb/kapacitor/pipeline"
)
type HouseDBOutNode struct {
// Include the generic node implementation
node
// Keep a reference to the pipeline node
h *pipeline.HouseDBOutNode
}
func newHouseDBOutNode(et *ExecutingTask, n *pipeline.HouseDBOutNode) (*HouseDBOutNode, error) {
h := &HouseDBOutNode{
// pass in necessary fields to the 'node' struct
node: node{Node: n, et: et},
// Keep a reference to the pipeline.HouseDBOutNode
h: n,
}
// Set the function to be called when running the node
h.node.runF = h.runOut
return h
}
func (h *HouseDBOutNode) runOut() error {
switch h.Wants() {
case pipeline.StreamEdge:
// Read stream data and send to HouseDB
for p, ok := h.ins[0].NextPoint(); ok; p, ok = h.ins[0].NextPoint() {
// Turn the point into a batch with just one point.
batch := models.Batch{
Name: p.Name,
Group: p.Group,
Tags: p.Tags,
Points: []models.TimeFields{{Time: p.Time, Fields: p.Fields}},
}
// Write the batch
err := h.write(batch)
if err != nil {
return err
}
}
case pipeline.BatchEdge:
// Read batch data and send to HouseDB
for b, ok := h.ins[0].NextBatch(); ok; b, ok = h.ins[0].NextBatch() {
// Write the batch
err := h.write(b)
if err != nil {
return err
}
}
}
return nil
}
// Write a batch of data to HouseDB
func (h *HouseDBOutNode) write(batch models.Batch) error {
// Implement writing to HouseDB here...
return nil
}
```
pipeline/node.go (just the new chaining method is shown):
```go
// Create a new HouseDBOutNode as a child of the calling node.
func (c *chainnode) HouseDBOut() *HouseDBOutNode {
h := newHouseDBOutNode(c.Provides())
c.linkChild(h)
return h
}
```
task.go (just the new case is shown):
```go
// Create a node from a given pipeline node.
func (et *ExecutingTask) createNode(p pipeline.Node, l *log.Logger) (n Node, err error) {
switch t := p.(type) {
...
case *pipeline.HouseDBOutNode:
n, err = newHouseDBOutNode(et, t, l)
...
}
```
### Documenting your new node
Since TICKscript is its own language we have built a small utility similiar to [godoc](https://godoc.org/golang.org/x/tools/cmd/godoc) named [tickdoc](https://github.com/influxdb/kapacitor/tree/master/tick/cmd/tickdoc)
that generates documentation from the comments in the code.
The `tickdoc` utility understands two special comments to help it generate clean documentation.
1.
`tick:ignore` -- can be added to any field, method, function or struct and tickdoc will simply skip it and not
generate any documentation for it.
Useful for ignore fields that are set via property methods.
2.
`tick:property` -- is only added to methods and informs tickdoc that the method is a `property method` not a `chaining method`.
Just place one of these comments on a line all by itself and tickdoc will find it and behave accordingly.
Otherwise just document your code normaly and tickdoc will do the rest.
### Contributing non output node.
Writing any node not just an output node is a very similar process and is left as an exercise to the reader.
There are few things that are different.
First is that your new node in the `pipeline` package will want to use the `pipeline.chainnode` implementation
of the `pipeline.Node` interface if it wishes to send data on to children.
For example:
```go
package pipeline
type MyCustomNode struct {
// Include pipeline.chainnode so we have all the chaining methods available
// to our new node
chainnode
}
func newMyCustomNode(e EdgeType, n Node) *MyCustomNode {
m := &MyCustomNode{
chainnode: newBasicChainNode("mycustom", e, e),
}
n.linkChild(m)
return m
}
```
Second it is possible to define a method that sets fields on a pipeline Node and just return the same instance
in order to create a `property method`.
For example:
```go
package pipeline
type MyCustomNode struct {
// Include pipeline.chainnode so we have all the chaining methods available
// to our new node
chainnode
// Mark this field as ignored for docs
// Since it is set via the Names method below
// tick:ignore
NameList []string `tick:"Names"`
}
func newMyCustomNode(e EdgeType, n Node) *MyCustomNode {
m := &MyCustomNode{
chainnode: newBasicChainNode("mycustom", e, e),
}
n.linkChild(m)
return m
}
// Set the NameList field on the node via this method.
//
// Example:
// node.names('name0', 'name1')
//
// Use the tickdoc comment 'tick:property' to mark this method
// as a 'property method'
// tick:property
func (m *MyCustomNode) Names(name ...string) *MyCustomNode {
m.NameList = name
return m
}
```
| {
"pile_set_name": "Github"
} |
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Linq;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Game.Online.Chat;
using osu.Game.Overlays.Chat;
using osu.Game.Tournament.IPC;
using osu.Game.Tournament.Models;
namespace osu.Game.Tournament.Components
{
public class TournamentMatchChatDisplay : StandAloneChatDisplay
{
private readonly Bindable<string> chatChannel = new Bindable<string>();
private ChannelManager manager;
public TournamentMatchChatDisplay()
{
RelativeSizeAxes = Axes.X;
Height = 144;
Anchor = Anchor.BottomLeft;
Origin = Anchor.BottomLeft;
CornerRadius = 0;
}
[BackgroundDependencyLoader(true)]
private void load(MatchIPCInfo ipc)
{
if (ipc != null)
{
chatChannel.BindTo(ipc.ChatChannel);
chatChannel.BindValueChanged(c =>
{
if (string.IsNullOrWhiteSpace(c.NewValue))
return;
int id = int.Parse(c.NewValue);
if (id <= 0) return;
if (manager == null)
{
AddInternal(manager = new ChannelManager());
Channel.BindTo(manager.CurrentChannel);
}
foreach (var ch in manager.JoinedChannels.ToList())
manager.LeaveChannel(ch);
var channel = new Channel
{
Id = id,
Type = ChannelType.Public
};
manager.JoinChannel(channel);
manager.CurrentChannel.Value = channel;
}, true);
}
}
public void Expand() => this.FadeIn(300);
public void Contract() => this.FadeOut(200);
protected override ChatLine CreateMessage(Message message) => new MatchMessage(message);
protected override StandAloneDrawableChannel CreateDrawableChannel(Channel channel) => new MatchChannel(channel);
public class MatchChannel : StandAloneDrawableChannel
{
public MatchChannel(Channel channel)
: base(channel)
{
ScrollbarVisible = false;
}
}
protected class MatchMessage : StandAloneMessage
{
public MatchMessage(Message message)
: base(message)
{
}
private void load(LadderInfo info)
{
// if (info.CurrentMatch.Value.Team1.Value.Players.Any(u => u.Id == Message.Sender.Id))
// SenderText.Colour = TournamentGame.COLOUR_RED;
// else if (info.CurrentMatch.Value.Team2.Value.Players.Any(u => u.Id == Message.Sender.Id))
// SenderText.Colour = TournamentGame.COLOUR_BLUE;
// else if (Message.Sender.Colour != null)
// SenderText.Colour = ColourBox.Colour = Color4Extensions.FromHex(Message.Sender.Colour);
}
}
}
}
| {
"pile_set_name": "Github"
} |
/*!
* Express - Router
* Copyright(c) 2010 TJ Holowaychuk <[email protected]>
* MIT Licensed
*/
/**
* Module dependencies.
*/
var Route = require('./route')
, Collection = require('./collection')
, utils = require('../utils')
, parse = require('url').parse
, toArray = utils.toArray;
/**
* Expose `Router` constructor.
*/
exports = module.exports = Router;
/**
* Expose HTTP methods.
*/
var methods = exports.methods = require('./methods');
/**
* Initialize a new `Router` with the given `app`.
*
* @param {express.HTTPServer} app
* @api private
*/
function Router(app) {
var self = this;
this.app = app;
this.routes = {};
this.params = {};
this._params = [];
this.middleware = function(req, res, next){
self._dispatch(req, res, next);
};
}
/**
* Register a param callback `fn` for the given `name`.
*
* @param {String|Function} name
* @param {Function} fn
* @return {Router} for chaining
* @api public
*/
Router.prototype.param = function(name, fn){
// param logic
if ('function' == typeof name) {
this._params.push(name);
return;
}
// apply param functions
var params = this._params
, len = params.length
, ret;
for (var i = 0; i < len; ++i) {
if (ret = params[i](name, fn)) {
fn = ret;
}
}
// ensure we end up with a
// middleware function
if ('function' != typeof fn) {
throw new Error('invalid param() call for ' + name + ', got ' + fn);
}
(this.params[name] = this.params[name] || []).push(fn);
return this;
};
/**
* Return a `Collection` of all routes defined.
*
* @return {Collection}
* @api public
*/
Router.prototype.all = function(){
return this.find(function(){
return true;
});
};
/**
* Remove the given `route`, returns
* a bool indicating if the route was present
* or not.
*
* @param {Route} route
* @return {Boolean}
* @api public
*/
Router.prototype.remove = function(route){
var routes = this.routes[route.method]
, len = routes.length;
for (var i = 0; i < len; ++i) {
if (route == routes[i]) {
routes.splice(i, 1);
return true;
}
}
};
/**
* Return routes with route paths matching `path`.
*
* @param {String} method
* @param {String} path
* @return {Collection}
* @api public
*/
Router.prototype.lookup = function(method, path){
return this.find(function(route){
return path == route.path
&& (route.method == method
|| method == 'all');
});
};
/**
* Return routes with regexps that match the given `url`.
*
* @param {String} method
* @param {String} url
* @return {Collection}
* @api public
*/
Router.prototype.match = function(method, url){
return this.find(function(route){
return route.match(url)
&& (route.method == method
|| method == 'all');
});
};
/**
* Find routes based on the return value of `fn`
* which is invoked once per route.
*
* @param {Function} fn
* @return {Collection}
* @api public
*/
Router.prototype.find = function(fn){
var len = methods.length
, ret = new Collection(this)
, method
, routes
, route;
for (var i = 0; i < len; ++i) {
method = methods[i];
routes = this.routes[method];
if (!routes) continue;
for (var j = 0, jlen = routes.length; j < jlen; ++j) {
route = routes[j];
if (fn(route)) ret.push(route);
}
}
return ret;
};
/**
* Route dispatcher aka the route "middleware".
*
* @param {IncomingMessage} req
* @param {ServerResponse} res
* @param {Function} next
* @api private
*/
Router.prototype._dispatch = function(req, res, next){
var params = this.params
, self = this;
// route dispatch
(function pass(i, err){
var paramCallbacks
, paramIndex = 0
, paramVal
, route
, keys
, key
, ret;
// match next route
function nextRoute(err) {
pass(req._route_index + 1, err);
}
// match route
req.route = route = self._match(req, i);
// implied OPTIONS
if (!route && 'OPTIONS' == req.method) return self._options(req, res);
// no route
if (!route) return next(err);
// we have a route
// start at param 0
req.params = route.params;
keys = route.keys;
i = 0;
// param callbacks
function param(err) {
paramIndex = 0;
key = keys[i++];
paramVal = key && req.params[key.name];
paramCallbacks = key && params[key.name];
try {
if ('route' == err) {
nextRoute();
} else if (err) {
i = 0;
callbacks(err);
} else if (paramCallbacks && undefined !== paramVal) {
paramCallback();
} else if (key) {
param();
} else {
i = 0;
callbacks();
}
} catch (err) {
param(err);
}
};
param(err);
// single param callbacks
function paramCallback(err) {
var fn = paramCallbacks[paramIndex++];
if (err || !fn) return param(err);
fn(req, res, paramCallback, paramVal, key.name);
}
// invoke route callbacks
function callbacks(err) {
var fn = route.callbacks[i++];
try {
if ('route' == err) {
nextRoute();
} else if (err && fn) {
if (fn.length < 4) return callbacks(err);
fn(err, req, res, callbacks);
} else if (fn) {
fn(req, res, callbacks);
} else {
nextRoute(err);
}
} catch (err) {
callbacks(err);
}
}
})(0);
};
/**
* Respond to __OPTIONS__ method.
*
* @param {IncomingMessage} req
* @param {ServerResponse} res
* @api private
*/
Router.prototype._options = function(req, res){
var path = parse(req.url).pathname
, body = this._optionsFor(path).join(',');
res.send(body, { Allow: body });
};
/**
* Return an array of HTTP verbs or "options" for `path`.
*
* @param {String} path
* @return {Array}
* @api private
*/
Router.prototype._optionsFor = function(path){
var self = this;
return methods.filter(function(method){
var routes = self.routes[method];
if (!routes || 'options' == method) return;
for (var i = 0, len = routes.length; i < len; ++i) {
if (routes[i].match(path)) return true;
}
}).map(function(method){
return method.toUpperCase();
});
};
/**
* Attempt to match a route for `req`
* starting from offset `i`.
*
* @param {IncomingMessage} req
* @param {Number} i
* @return {Route}
* @api private
*/
Router.prototype._match = function(req, i){
var method = req.method.toLowerCase()
, url = parse(req.url)
, path = url.pathname
, routes = this.routes
, captures
, route
, keys;
// pass HEAD to GET routes
if ('head' == method) method = 'get';
// routes for this method
if (routes = routes[method]) {
// matching routes
for (var len = routes.length; i < len; ++i) {
route = routes[i];
if (captures = route.match(path)) {
keys = route.keys;
route.params = [];
// params from capture groups
for (var j = 1, jlen = captures.length; j < jlen; ++j) {
var key = keys[j-1]
, val = 'string' == typeof captures[j]
? decodeURIComponent(captures[j])
: captures[j];
if (key) {
route.params[key.name] = val;
} else {
route.params.push(val);
}
}
// all done
req._route_index = i;
return route;
}
}
}
};
/**
* Route `method`, `path`, and one or more callbacks.
*
* @param {String} method
* @param {String} path
* @param {Function} callback...
* @return {Router} for chaining
* @api private
*/
Router.prototype._route = function(method, path, callbacks){
var app = this.app
, callbacks = utils.flatten(toArray(arguments, 2));
// ensure path was given
if (!path) throw new Error('app.' + method + '() requires a path');
// create the route
var route = new Route(method, path, callbacks, {
sensitive: app.enabled('case sensitive routes')
, strict: app.enabled('strict routing')
});
// add it
(this.routes[method] = this.routes[method] || [])
.push(route);
return this;
};
| {
"pile_set_name": "Github"
} |
/* ResidualVM - A 3D game interpreter
*
* ResidualVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the AUTHORS
* file distributed with this source distribution.
*
* Additional copyright for this file:
* Copyright (C) 1999-2000 Revolution Software Ltd.
* This code is based on source code created by Revolution Software,
* used with permission.
*
* 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#ifndef PSX_CLUT_H
#define PSX_CLUT_H
namespace ICB {
// Where the actor cluts go
#define CHARACTER_CLUT_X (0)
#define CHARACTER_CLUT_Y (240)
// Where the actor alternate cluts go
#define CHARACTER_ALTERNATE_CLUT_X (512)
#define CHARACTER_ALTERNATE_CLUT_Y (500)
// Where the background goes
#define BACKGROUND_CLUT_X (0)
#define BACKGROUND_CLUT_Y (496)
// Where the icons put their CLUT's
#define ICONS_CLUT_X (0)
#define ICONS_CLUT_Y (497)
// Where the text CLUT lives
#define TEXT_CLUT_X (0)
#define TEXT_CLUT_Y (498)
// Where the layer Z-map CLUT lives
#define LAYERS_ZMAP_CLUT_X (0)
#define LAYERS_ZMAP_CLUT_Y (499)
// Where the solid layers CLUT lives
#define LAYERS_SOLID_CLUT_X (0)
#define LAYERS_SOLID_CLUT_Y (500)
// Where the solid layers CLUT lives
#define LAYERS_SOLIDFG_CLUT_X (0)
#define LAYERS_SOLIDFG_CLUT_Y (501)
// Where the semi-trans additive CLUT lives
#define LAYERS_SEMIADD_CLUT_X (0)
#define LAYERS_SEMIADD_CLUT_Y (502)
// Where the semi-trans average CLUT lives
#define LAYERS_SEMIAVG_CLUT_X (0)
#define LAYERS_SEMIAVG_CLUT_Y (503)
// Where the remora sprites CLUT lives
#define REMORA_SPRITE_CLUT_X (0)
#define REMORA_SPRITE_CLUT_Y (504)
// Where the props put their CLUT's
#define PROPS_CLUT_X (256)
#define PROPS_CLUT_Y (240)
#define PROPS_CLUT_MAX_Y (255)
// Where the layer CLUT's live
#define LAYER_CLUT_X (512 + 128)
#define LAYER_CLUT_MAX_Y (511)
// Where the PSX debug font lives
#define FNTLOAD_X (768)
#define FNTLOAD_Y (256)
// Where the text characters get loaded into
#define TEXT_FONT_X (512)
#define TEXT_FONT_Y (240)
#define TEXT_FONT_MAX_X (1024)
#define TEXT_FONT_MAX_Y (256)
} // End of namespace ICB
#endif // #ifndef PSX_CLUT_H
| {
"pile_set_name": "Github"
} |
Additional IP Rights Grant (Patents)
"This implementation" means the copyrightable works distributed by
Google as part of the Go project.
Google hereby grants to You a perpetual, worldwide, non-exclusive,
no-charge, royalty-free, irrevocable (except as stated in this section)
patent license to make, have made, use, offer to sell, sell, import,
transfer and otherwise run, modify and propagate the contents of this
implementation of Go, where such license applies only to those patent
claims, both currently owned or controlled by Google and acquired in
the future, licensable by Google that are necessarily infringed by this
implementation of Go. This grant does not include claims that would be
infringed only as a consequence of further modification of this
implementation. If you or your agent or exclusive licensee institute or
order or agree to the institution of patent litigation against any
entity (including a cross-claim or counterclaim in a lawsuit) alleging
that this implementation of Go or any code incorporated within this
implementation of Go constitutes direct or contributory patent
infringement, or inducement of patent infringement, then any patent
rights granted to you under this License for this implementation of Go
shall terminate as of the date such litigation is filed.
| {
"pile_set_name": "Github"
} |
//
// CombineLatest+Collection.swift
// RxSwift
//
// Created by Krunoslav Zaher on 8/29/15.
// Copyright © 2015 Krunoslav Zaher. All rights reserved.
//
extension Observable {
/**
Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element.
- seealso: [combinelatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html)
- parameter resultSelector: Function to invoke whenever any of the sources produces an element.
- returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function.
*/
public static func combineLatest<C: Collection>(_ collection: C, _ resultSelector: @escaping ([C.Iterator.Element.E]) throws -> Element) -> Observable<Element>
where C.Iterator.Element: ObservableType {
return CombineLatestCollectionType(sources: collection, resultSelector: resultSelector)
}
/**
Merges the specified observable sequences into one observable sequence whenever any of the observable sequences produces an element.
- seealso: [combinelatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html)
- returns: An observable sequence containing the result of combining elements of the sources.
*/
public static func combineLatest<C: Collection>(_ collection: C) -> Observable<[Element]>
where C.Iterator.Element: ObservableType, C.Iterator.Element.E == Element {
return CombineLatestCollectionType(sources: collection, resultSelector: { $0 })
}
}
final fileprivate class CombineLatestCollectionTypeSink<C: Collection, O: ObserverType>
: Sink<O> where C.Iterator.Element : ObservableConvertibleType {
typealias R = O.E
typealias Parent = CombineLatestCollectionType<C, R>
typealias SourceElement = C.Iterator.Element.E
let _parent: Parent
let _lock = RecursiveLock()
// state
var _numberOfValues = 0
var _values: [SourceElement?]
var _isDone: [Bool]
var _numberOfDone = 0
var _subscriptions: [SingleAssignmentDisposable]
init(parent: Parent, observer: O, cancel: Cancelable) {
_parent = parent
_values = [SourceElement?](repeating: nil, count: parent._count)
_isDone = [Bool](repeating: false, count: parent._count)
_subscriptions = Array<SingleAssignmentDisposable>()
_subscriptions.reserveCapacity(parent._count)
for _ in 0 ..< parent._count {
_subscriptions.append(SingleAssignmentDisposable())
}
super.init(observer: observer, cancel: cancel)
}
func on(_ event: Event<SourceElement>, atIndex: Int) {
_lock.lock(); defer { _lock.unlock() } // {
switch event {
case .next(let element):
if _values[atIndex] == nil {
_numberOfValues += 1
}
_values[atIndex] = element
if _numberOfValues < _parent._count {
let numberOfOthersThatAreDone = self._numberOfDone - (_isDone[atIndex] ? 1 : 0)
if numberOfOthersThatAreDone == self._parent._count - 1 {
forwardOn(.completed)
dispose()
}
return
}
do {
let result = try _parent._resultSelector(_values.map { $0! })
forwardOn(.next(result))
}
catch let error {
forwardOn(.error(error))
dispose()
}
case .error(let error):
forwardOn(.error(error))
dispose()
case .completed:
if _isDone[atIndex] {
return
}
_isDone[atIndex] = true
_numberOfDone += 1
if _numberOfDone == self._parent._count {
forwardOn(.completed)
dispose()
}
else {
_subscriptions[atIndex].dispose()
}
}
// }
}
func run() -> Disposable {
var j = 0
for i in _parent._sources {
let index = j
let source = i.asObservable()
let disposable = source.subscribe(AnyObserver { event in
self.on(event, atIndex: index)
})
_subscriptions[j].setDisposable(disposable)
j += 1
}
if _parent._sources.isEmpty {
self.forwardOn(.completed)
}
return Disposables.create(_subscriptions)
}
}
final fileprivate class CombineLatestCollectionType<C: Collection, R> : Producer<R> where C.Iterator.Element : ObservableConvertibleType {
typealias ResultSelector = ([C.Iterator.Element.E]) throws -> R
let _sources: C
let _resultSelector: ResultSelector
let _count: Int
init(sources: C, resultSelector: @escaping ResultSelector) {
_sources = sources
_resultSelector = resultSelector
_count = Int(self._sources.count.toIntMax())
}
override func run<O : ObserverType>(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R {
let sink = CombineLatestCollectionTypeSink(parent: self, observer: observer, cancel: cancel)
let subscription = sink.run()
return (sink: sink, subscription: subscription)
}
}
| {
"pile_set_name": "Github"
} |
.include <bsd.own.mk>
SUBDIR+= ds input mib pm rs sched vfs vm
.if ${MKIMAGEONLY} == "no"
SUBDIR+= ipc is devman
.endif
.include <bsd.subdir.mk>
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="utf-8"?>
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<!--
In the example below, the "SetAttributes" transform will change the value of
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
finds an attribute "name" that has a value of "MyDB".
<connectionStrings>
<add name="MyDB"
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
</connectionStrings>
-->
<system.web>
<!--
In the example below, the "Replace" transform will replace the entire
<customErrors> section of your web.config file.
Note that because there is only one customErrors section under the
<system.web> node, there is no need to use the "xdt:Locator" attribute.
<customErrors defaultRedirect="GenericError.htm"
mode="RemoteOnly" xdt:Transform="Replace">
<error statusCode="500" redirect="InternalError.htm"/>
</customErrors>
-->
</system.web>
</configuration> | {
"pile_set_name": "Github"
} |
# Combined Plots
#plot, histogram, pie, boxplot, linechart, correlation plot
#plot
women
?women
str(women)
plot(women)
plot(x=women$height, y=women$weight)
?plot
plot(women, type='p', pch=17)
plot(women, type='l')
plot(women, type='b', pch=18, lty=2, col=2)
plot(women, xlim=c(30,100), ylim=c(min(women$weight)-10, 200), pch=10)
data()
#more features with plot
plot(y=women$height, x=women$weight, pch=15, xlab='Weight', ylab='Height', col='red', cex=2, type='b')
title(main='Main Title- PDU', sub='Sub Title')
#see cheat sheet on base graphs
plot(women)
abline(lm(women$weight ~ women$height), col='red', lty=2, lwd=4)
abline(h = c(130, 150), col='green')
abline(v=c(62, 66, 70), col='blue')
abline(v=women$height, col='purple')
#boxplot
boxplot(women$height)
boxplot(df$marks1)
abline(h=c(58, 62,65,68,72))
#draw lines on plot for number summary
summary(women)
quantile(women$height)
boxplot(women$height, col='green')
abline(h=quantile(women$height))
#histogram
hist(women$height)
hist(women$height, breaks=10)
hist(women$height, breaks=5, col=1:5)
hist(df$marks2, breaks=3)
#histogram2
?rnorm
x = rnorm(n=100000,mean=50,sd=10)
hist(x)
hist(x, freq=F, col=1:5)
lines(density(x))
#density plot : shape of data
plot(density(x), col='red')
#pie
x = c(10,20,40,50)
pie(x)
xlabels = c('A','B','C','D')
pie(x, labels=xlabels)
pie(x, labels=paste(round(x/sum(x) * 100,0),'%') )
x
#barplot
barplot(x,col=1:4)
barplot(x,col=1:4, horiz = T)
#correlation plot
pairs(women)
cor(women$height,women$weight)
names(mtcars)
cor(mtcars)
pairs(mtcars)
options(digits=4)
pairs(mtcars[1:4])
| {
"pile_set_name": "Github"
} |
# Run svn log -l <some number>
import re
import numpy as np
import os
names = re.compile(r'r\d+\s[|]\s(.*)\s[|]\s200')
def get_count(filename, repo):
mystr = open(filename).read()
result = names.findall(mystr)
u = np.unique(result)
count = [(x, result.count(x), repo) for x in u]
return count
command = 'svn log -l 2300 > output.txt'
os.chdir('..')
os.system(command)
count = get_count('output.txt', 'NumPy')
os.chdir('../scipy')
os.system(command)
count.extend(get_count('output.txt', 'SciPy'))
os.chdir('../scikits')
os.system(command)
count.extend(get_count('output.txt', 'SciKits'))
count.sort()
print("** SciPy and NumPy **")
print("=====================")
for val in count:
print(val)
| {
"pile_set_name": "Github"
} |
package com.artemzin.android.wail.receiver.music;
import android.content.Context;
import android.content.Intent;
public class HtcMusicAppReceiver extends CommonMusicAppReceiver {
@Override
protected Intent handleIntent(Context context, Intent originalIntent) {
return super.handleIntent(context, originalIntent)
.putExtra(EXTRA_PLAYER_PACKAGE_NAME, "com.htc.music");
}
}
| {
"pile_set_name": "Github"
} |
#!amber
# Copyright 2020 The Amber Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DEVICE_FEATURE shaderStorageImageMultisample
SHADER compute compute_shader GLSL
#version 430
layout(local_size_x = 16, local_size_y = 16) in;
uniform layout(set=0, binding=0, rgba8) image2DMS texture;
uniform layout(set=0, binding=1, rgba8) image2D sample0;
uniform layout(set=0, binding=2, rgba8) image2D sample1;
uniform layout(set=0, binding=3, rgba8) image2D sample2;
uniform layout(set=0, binding=4, rgba8) image2D sample3;
void main()
{
ivec2 uv = ivec2(gl_GlobalInvocationID.xy);
imageStore(texture, uv, 0, vec4(1, 0, 0, 1));
imageStore(texture, uv, 1, vec4(0, 1, 0, 1));
imageStore(texture, uv, 2, vec4(0, 0, 1, 1));
imageStore(texture, uv, 3, vec4(1, 1, 0, 1));
imageStore(sample0, uv, imageLoad(texture, uv, 3));
imageStore(sample1, uv, imageLoad(texture, uv, 2));
imageStore(sample2, uv, imageLoad(texture, uv, 1));
imageStore(sample3, uv, imageLoad(texture, uv, 0));
}
END
IMAGE texture FORMAT R8G8B8A8_UNORM DIM_2D WIDTH 256 HEIGHT 256 SAMPLES 4
IMAGE sample0 FORMAT R8G8B8A8_UNORM DIM_2D WIDTH 256 HEIGHT 256
IMAGE sample1 FORMAT R8G8B8A8_UNORM DIM_2D WIDTH 256 HEIGHT 256
IMAGE sample2 FORMAT R8G8B8A8_UNORM DIM_2D WIDTH 256 HEIGHT 256
IMAGE sample3 FORMAT R8G8B8A8_UNORM DIM_2D WIDTH 256 HEIGHT 256
PIPELINE compute pipeline
ATTACH compute_shader
BIND BUFFER texture AS storage_image DESCRIPTOR_SET 0 BINDING 0
BIND BUFFER sample0 AS storage_image DESCRIPTOR_SET 0 BINDING 1
BIND BUFFER sample1 AS storage_image DESCRIPTOR_SET 0 BINDING 2
BIND BUFFER sample2 AS storage_image DESCRIPTOR_SET 0 BINDING 3
BIND BUFFER sample3 AS storage_image DESCRIPTOR_SET 0 BINDING 4
END
RUN pipeline 16 16 1
EXPECT sample0 IDX 0 0 SIZE 256 256 EQ_RGBA 255 255 0 255
EXPECT sample1 IDX 0 0 SIZE 256 256 EQ_RGBA 0 0 255 255
EXPECT sample2 IDX 0 0 SIZE 256 256 EQ_RGBA 0 255 0 255
EXPECT sample3 IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yfax.task.htt.vo.HttAwardHisVo">
<!-- 添加 -->
<insert id="insertHttAwardHis" parameterType="com.yfax.task.htt.vo.HttAwardHisVo">
insert into htt_award_his
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" > id, </if>
<if test="phoneNum != null" > phoneNum, </if>
<if test="awardType != null" > awardType, </if>
<if test="awardName != null" > awardName, </if>
<if test="gold != null" > gold, </if>
<if test="isCal != null" > isCal, </if>
<if test="createDate != null" > createDate, </if>
<if test="updateDate != null" > updateDate, </if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" > #{id}, </if>
<if test="phoneNum != null" > #{phoneNum}, </if>
<if test="awardType != null" > #{awardType}, </if>
<if test="awardName != null" > #{awardName}, </if>
<if test="gold != null" > #{gold}, </if>
<if test="isCal != null" > #{isCal}, </if>
<if test="createDate != null" > #{createDate}, </if>
<if test="updateDate != null" > null, </if>
</trim>
</insert>
</mapper> | {
"pile_set_name": "Github"
} |
# Agent Status Page
This information is available in the Datadog documentation:<br>
[docs.datadoghq.com/agent/guide/agent-status-page][1]
[1]: https://docs.datadoghq.com/agent/guide/agent-status-page
| {
"pile_set_name": "Github"
} |
define([
"../var/support"
], function( support ) {
support.focusinBubbles = "onfocusin" in window;
return support;
});
| {
"pile_set_name": "Github"
} |
const sinon = require('sinon')
const chai = require('chai')
const Serverless = require('serverless/lib/Serverless')
const AwsProvider = require('serverless/lib/plugins/aws/provider/awsProvider')
const ServerlessApigatewayServiceProxy = require('./../../index')
chai.use(require('sinon-chai'))
const expect = chai.expect
describe('#compileS3ServiceProxy', () => {
let serverless
let serverlessApigatewayServiceProxy
beforeEach(() => {
serverless = new Serverless()
serverless.servicePath = true
serverless.service.service = 'apigw-service-proxy'
const options = {
stage: 'dev',
region: 'us-east-1'
}
serverless.setProvider('aws', new AwsProvider(serverless))
serverless.service.provider.compiledCloudFormationTemplate = { Resources: {} }
serverlessApigatewayServiceProxy = new ServerlessApigatewayServiceProxy(serverless, options)
})
it('should call compileIamRoleToS3 and compileMethodsToS3 once', () => {
const compileIamRoleToS3Stub = sinon.stub(
serverlessApigatewayServiceProxy,
'compileIamRoleToS3'
)
const compileMethodsToS3Stub = sinon.stub(
serverlessApigatewayServiceProxy,
'compileMethodsToS3'
)
serverlessApigatewayServiceProxy.compileS3ServiceProxy()
expect(compileIamRoleToS3Stub).to.have.been.calledOnce
expect(compileMethodsToS3Stub).to.have.been.calledOnce
serverlessApigatewayServiceProxy.compileIamRoleToS3.restore()
serverlessApigatewayServiceProxy.compileMethodsToS3.restore()
})
})
| {
"pile_set_name": "Github"
} |
#! /bin/sh
PROJECT=manos
FILE=
CONFIGURE=configure.ac
: ${AUTOCONF=autoconf}
: ${AUTOHEADER=autoheader}
: ${AUTOMAKE=automake}
: ${LIBTOOLIZE=libtoolize}
: ${ACLOCAL=aclocal}
: ${LIBTOOL=libtool}
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
ORIGDIR=`pwd`
cd $srcdir
TEST_TYPE=-f
aclocalinclude="-I . $ACLOCAL_FLAGS"
DIE=0
# MacPorts on OS X only seems to have glibtoolize
WHICHLIBTOOLIZE=$(which glibtoolize || which libtoolize)
if [ x"$WHICHLIBTOOLIZE" == x"" ]; then
error "libtool is required to configure $PROJECT"
fi
LIBTOOLIZE=$(basename $WHICHLIBTOOLIZE)
# MacPorts on OS X only seems to have glibtool
WHICHLIBTOOL=$(which glibtool || which libtool)
if [ x"$WHICHLIBTOOL" == x"" ]; then
error "libtool is required to configure $PROJECT"
fi
LIBTOOL=$(basename $WHICHLIBTOOL)
($AUTOCONF --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have autoconf installed to compile $PROJECT."
echo "Download the appropriate package for your distribution,"
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
DIE=1
}
($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have automake installed to compile $PROJECT."
echo "Get ftp://sourceware.cygnus.com/pub/automake/automake-1.4.tar.gz"
echo "(or a newer version if it is available)"
DIE=1
}
(grep "^AM_PROG_LIBTOOL" $CONFIGURE >/dev/null) && {
($LIBTOOL --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`libtool' installed to compile $PROJECT."
echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz"
echo "(or a newer version if it is available)"
DIE=1
}
}
if test "$DIE" -eq 1; then
exit 1
fi
#test $TEST_TYPE $FILE || {
# echo "You must run this script in the top-level $PROJECT directory"
# exit 1
#}
if test -z "$*"; then
echo "I am going to run ./configure with no arguments - if you wish "
echo "to pass any to it, please specify them on the $0 command line."
fi
case $CC in
*xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;;
esac
(grep "^AM_PROG_LIBTOOL" $CONFIGURE >/dev/null) && {
echo "Running $LIBTOOLIZE ..."
$LIBTOOLIZE --force --copy
}
echo "Running $ACLOCAL $aclocalinclude ..."
$ACLOCAL $aclocalinclude
echo "Running $AUTOMAKE --gnu $am_opt ..."
$AUTOMAKE --add-missing --gnu $am_opt
echo "Running $AUTOCONF ..."
$AUTOCONF
echo Running $srcdir/configure $conf_flags "$@" ...
$srcdir/configure --enable-maintainer-mode $conf_flags "$@" \
| {
"pile_set_name": "Github"
} |
SET @start_global_value = @@global.join_buffer_size;
SELECT @start_global_value;
@start_global_value
131072
SET @start_session_value = @@session.join_buffer_size;
SELECT @start_session_value;
@start_session_value
131072
'#--------------------FN_DYNVARS_053_01-------------------------#'
SET @@global.join_buffer_size = DEFAULT;
SELECT @@global.join_buffer_size;
@@global.join_buffer_size
131072
SET @@session.join_buffer_size = DEFAULT;
SELECT @@session.join_buffer_size;
@@session.join_buffer_size
131072
'#--------------------FN_DYNVARS_053_03-------------------------#'
SET @@global.join_buffer_size = 8200;
Warnings:
Warning 1292 Truncated incorrect join_buffer_size value: '8200'
SELECT @@global.join_buffer_size;
@@global.join_buffer_size
8192
SET @@global.join_buffer_size = 65536;
SELECT @@global.join_buffer_size;
@@global.join_buffer_size
65536
SET @@global.join_buffer_size = 4294967295;
Warnings:
Warning 1292 Truncated incorrect join_buffer_size value: '4294967295'
SELECT @@global.join_buffer_size;
@@global.join_buffer_size
4294967168
'#--------------------FN_DYNVARS_053_04-------------------------#'
SET @@session.join_buffer_size = 8200;
Warnings:
Warning 1292 Truncated incorrect join_buffer_size value: '8200'
SELECT @@session.join_buffer_size;
@@session.join_buffer_size
8192
SET @@session.join_buffer_size = 65536;
SELECT @@session.join_buffer_size;
@@session.join_buffer_size
65536
SET @@session.join_buffer_size = 4294967295;
Warnings:
Warning 1292 Truncated incorrect join_buffer_size value: '4294967295'
SELECT @@session.join_buffer_size;
@@session.join_buffer_size
4294967168
'#------------------FN_DYNVARS_053_05-----------------------#'
SET @@global.join_buffer_size = 0;
Warnings:
Warning 1292 Truncated incorrect join_buffer_size value: '0'
SELECT @@global.join_buffer_size;
@@global.join_buffer_size
128
SET @@global.join_buffer_size = -1024;
Warnings:
Warning 1292 Truncated incorrect join_buffer_size value: '-1024'
SELECT @@global.join_buffer_size;
@@global.join_buffer_size
128
SET @@global.join_buffer_size = 127;
Warnings:
Warning 1292 Truncated incorrect join_buffer_size value: '127'
SELECT @@global.join_buffer_size;
@@global.join_buffer_size
128
SET @@global.join_buffer_size = 42949672951;
Warnings:
Warning 1292 Truncated incorrect join_buffer_size value: '42949672951'
SELECT @@global.join_buffer_size;
@@global.join_buffer_size
42949672832
SET @@global.join_buffer_size = 65530.34;
ERROR 42000: Incorrect argument type to variable 'join_buffer_size'
SELECT @@global.join_buffer_size;
@@global.join_buffer_size
42949672832
SET @@global.join_buffer_size = test;
ERROR 42000: Incorrect argument type to variable 'join_buffer_size'
SELECT @@global.join_buffer_size;
@@global.join_buffer_size
42949672832
SET @@session.join_buffer_size = 0;
Warnings:
Warning 1292 Truncated incorrect join_buffer_size value: '0'
SELECT @@session.join_buffer_size;
@@session.join_buffer_size
128
SET @@session.join_buffer_size = -1024;
Warnings:
Warning 1292 Truncated incorrect join_buffer_size value: '-1024'
SELECT @@session.join_buffer_size;
@@session.join_buffer_size
128
SET @@session.join_buffer_size = 127;
Warnings:
Warning 1292 Truncated incorrect join_buffer_size value: '127'
SELECT @@session.join_buffer_size;
@@session.join_buffer_size
128
SET @@session.join_buffer_size = 42949672951;
Warnings:
Warning 1292 Truncated incorrect join_buffer_size value: '42949672951'
SELECT @@session.join_buffer_size;
@@session.join_buffer_size
42949672832
SET @@session.join_buffer_size = 65530.34;
ERROR 42000: Incorrect argument type to variable 'join_buffer_size'
SELECT @@session.join_buffer_size;
@@session.join_buffer_size
42949672832
SET @@session.join_buffer_size = test;
ERROR 42000: Incorrect argument type to variable 'join_buffer_size'
SELECT @@session.join_buffer_size;
@@session.join_buffer_size
42949672832
'#------------------FN_DYNVARS_053_06-----------------------#'
SELECT @@global.join_buffer_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='join_buffer_size';
@@global.join_buffer_size = VARIABLE_VALUE
1
'#------------------FN_DYNVARS_053_07-----------------------#'
SELECT @@session.join_buffer_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='join_buffer_size';
@@session.join_buffer_size = VARIABLE_VALUE
1
'#------------------FN_DYNVARS_053_08-----------------------#'
SET @@global.join_buffer_size = TRUE;
Warnings:
Warning 1292 Truncated incorrect join_buffer_size value: '1'
SET @@global.join_buffer_size = FALSE;
Warnings:
Warning 1292 Truncated incorrect join_buffer_size value: '0'
'#---------------------FN_DYNVARS_001_09----------------------#'
SET @@global.join_buffer_size = 10;
Warnings:
Warning 1292 Truncated incorrect join_buffer_size value: '10'
SELECT @@join_buffer_size = @@global.join_buffer_size;
@@join_buffer_size = @@global.join_buffer_size
0
'#---------------------FN_DYNVARS_001_10----------------------#'
SET @@join_buffer_size = 100;
Warnings:
Warning 1292 Truncated incorrect join_buffer_size value: '100'
SELECT @@join_buffer_size = @@local.join_buffer_size;
@@join_buffer_size = @@local.join_buffer_size
1
SELECT @@local.join_buffer_size = @@session.join_buffer_size;
@@local.join_buffer_size = @@session.join_buffer_size
1
'#---------------------FN_DYNVARS_001_11----------------------#'
SET join_buffer_size = 1;
Warnings:
Warning 1292 Truncated incorrect join_buffer_size value: '1'
SELECT @@join_buffer_size;
@@join_buffer_size
128
SELECT local.join_buffer_size;
ERROR 42S02: Unknown table 'local' in field list
SELECT session.join_buffer_size;
ERROR 42S02: Unknown table 'session' in field list
SELECT join_buffer_size = @@session.join_buffer_size;
ERROR 42S22: Unknown column 'join_buffer_size' in 'field list'
SET @@global.join_buffer_size = @start_global_value;
SELECT @@global.join_buffer_size;
@@global.join_buffer_size
131072
SET @@session.join_buffer_size = @start_session_value;
SELECT @@session.join_buffer_size;
@@session.join_buffer_size
131072
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:dc="http://purl.org/dc/terms/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:spdx="http://spdx.org/rdf/terms#">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="sites/all/themes/cpstandard/favicon.ico" type="image/vnd.microsoft.icon" />
<title>No Limit Public License | Software Package Data Exchange (SPDX)</title>
<link rel="shortcut icon" href="sites/all/themes/cpstandard/favicon.ico" type="image/vnd.microsoft.icon" />
<link type="text/css" rel="stylesheet" media="all" href="sites/all/themes/cpstandard/css/style.css" />
<link type="text/css" rel="stylesheet" media="all" href="sites/all/themes/cpstandard/css/colors.css" />
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet" />
<!-- GOOGLE FONTS -->
<link href='//fonts.googleapis.com/css?family=Roboto:400,400italic,300,300italic,100italic,100,500,500italic,700,700italic,900,900italic' rel='stylesheet' type='text/css' />
<style type="text/css">
.page {
color: #58595b;
}
#header {
border-bottom: 3px solid #4597cb;
padding-bottom: 50px;
}
.breadcrumb {
margin-top: 25px;
}
#content-header h1 {
color: #58595b;
}
.page h2, h3, h4, h5 {
color: #4597cb;
}
.page h1 {
font-size: 2em;
}
.page h2 {
font-size: 1.5em;
}
a, a:visited, a:hover {
color: #4597cb;
}
#footer-copyright {
margin-top: 25px;
}
.replacable-license-text {
color: #CC0000;
}
.replacable-license-text p var {
color: #CC0000;
}
.optional-license-text {
color: #0000cc;
}
.optional-license-text p var {
color: #0000cc;
}
ul, ol, li {
margin: 10px 0 10px 0;
}
</style>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-3676394-2']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body typeof="spdx:License">
<div id="lf-header" class="collaborative-projects">
<div class="gray-diagonal">
<div class="container">
<a id="collaborative-projects-logo" href="http://collabprojects.linuxfoundation.org">Linux Foundation Collaborative Projects</a>
</div>
</div>
</div>
<div id="header">
<div id="header-inner">
<a href="/" title="Home" rel="home" id="logo">
<img src="https://spdx.org/sites/cpstandard/files/logo_spdx_250.png" alt="Home" />
</a>
<div id="name-and-slogan">
<div id="site-name">
<h1><a href="/" title="Home" rel="home">Software Package Data Exchange (SPDX)</a></h1>
</div>
</div>
</div>
</div> <!-- /header -->
<div id="highlighted">
<div class="region region-highlighted">
</div>
</div>
<div id="page" class="page">
<div class="breadcrumb"><a href="/">Home</a> » <a href="/licenses">Licenses</a></div>
<h1 property="dc:title">No Limit Public License</h1>
<div style="display:none;"><code property="spdx:deprecated">false</code></div>
<h2>Full name</h2>
<p style="margin-left: 20px;"><code property="spdx:name">No Limit Public License</code></p>
<h2>Short identifier</h2>
<p style="margin-left: 20px;"><code property="spdx:licenseId">NLPL</code></p>
<h2>Other web pages for this license</h2>
<div style="margin-left: 20px;">
<ul>
<li><a href="https://fedoraproject.org/wiki/Licensing/NLPL" rel="rdfs:seeAlso">https://fedoraproject.org/wiki/Licensing/NLPL</a></li>
</ul>
</div>
<div property="spdx:isOsiApproved" style="display: none;">false</div>
<h2 id="notes">Notes</h2>
<p style="margin-left: 20px;">None</p>
<h2 id="licenseText">Text</h2>
<div property="spdx:licenseText" class="license-text">
<div class="optional-license-text">
<p>NO LIMIT PUBLIC LICENSE</p>
<p>Version 0, June 2012</p>
</div>
<div class="optional-license-text">
<p>Gilles LAMIRAL</p>
<p>La Billais</p>
<p>35580 Baulon</p>
<p>France</p>
</div>
<div class="optional-license-text">
<p>NO LIMIT PUBLIC LICENSE</p>
</div>
<p>Terms and conditions for copying, distribution, modification or anything else.</p>
<ul style="list-style:none">
<li>
<var class="replacable-license-text">0.</var>
No limit to do anything with this work and this license.
</li>
</ul>
</div>
<h2 id="licenseHeader">Standard License Header</h2>
<div property="spdx:standardLicenseHeader" class="license-text">
<p style="font-style: italic">There is no standard license header for the license</p>
</div>
<div property="spdx:standardLicenseTemplate" style="display: none;">
<<beginOptional>> NO LIMIT PUBLIC LICENSE Version 0, June 2012<<endOptional>><<beginOptional>> Gilles LAMIRAL La Billais 35580 Baulon France<<endOptional>><<beginOptional>> NO LIMIT PUBLIC LICENSE<<endOptional>> Terms and conditions for copying, distribution, modification or anything else. <<var;name="bullet";original="0.";match=".{0,20}">> No limit to do anything with this work and this license.
</div>
</div> <!-- /page -->
<div class="collaborative-projects">
<div class="gray-diagonal">
<div class="container">
<div id="footer-copyright">
<p>© 2018 SPDX Workgroup a Linux Foundation Project. All Rights Reserved. </p>
<p>Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered <a href="http://www.linuxfoundation.org/programs/legal/trademark" title="Linux Mark Institute">trademark</a> of Linus Torvalds.</p>
<p>Please see our <a href="http://www.linuxfoundation.org/privacy">privacy policy</a> and <a href="http://www.linuxfoundation.org/terms">terms of use</a>.</p>
</div>
</div>
</div>
</div>
<div id="top-page-link">
<a href="#"><i class="fa fa-arrow-circle-up"></i><span>top of page</span></a>
</div>
</body>
</html>
| {
"pile_set_name": "Github"
} |
import type { Fn, Nullable, Pair } from "@thi.ng/api";
import { isNumber } from "@thi.ng/checks";
import { Heap } from "@thi.ng/heaps";
import { clamp } from "@thi.ng/math";
import { addN3, distSq3, ReadonlyVec, subN3, Vec } from "@thi.ng/vectors";
import { ASpatialGrid } from "./aspatial-grid";
import { addResults, CMP } from "./utils";
const TMP: Vec = [];
export class SpatialGrid3<K extends ReadonlyVec, V> extends ASpatialGrid<K, V> {
protected _stride: ReadonlyVec;
constructor(
min: ReadonlyVec,
size: ReadonlyVec,
res: ReadonlyVec | number
) {
super(min, size, isNumber(res) ? [res, res, res] : res);
this._cells = new Array(this._res[0] * this._res[1] * this._res[2]);
this._stride = [this._res[0], this._res[0] * this._res[1]];
}
copy(): SpatialGrid3<K, V> {
return <SpatialGrid3<K, V>>super.copy();
}
empty() {
return new SpatialGrid3<K, V>(this._min, this._size, this._res);
}
protected doQuery<T>(
fn: Fn<Pair<K, V>, T>,
k: K,
r: number,
limit = Infinity,
acc: T[] = []
) {
const id1 = this.findIndex(subN3(TMP, k, r));
const id2 = this.findIndex(addN3(TMP, k, r));
const [width, slice] = this._stride;
const x1 = id1 % width;
const x2 = id2 % width;
const y1 = ((id1 / width) | 0) * width;
const y2 = ((id2 / width) | 0) * width;
const z1 = ((id1 / slice) | 0) * slice;
const z2 = ((id2 / slice) | 0) * slice;
const cells = this._cells;
let c: Nullable<Pair<K, V>[]>;
let x: number, y: number, z: number;
r *= r;
const heap = new Heap<[number, Nullable<Pair<K, V>>?]>([[r]], {
compare: CMP,
});
const sel = heap.values;
for (z = z1; z <= z2; z += slice) {
for (y = y1; y <= y2; y += width) {
for (x = x1; x <= x2; x++) {
c = cells[z + y + x];
c && c.length && this.queryCell(distSq3, heap, c, k, limit);
}
}
}
return addResults(fn, sel, acc);
}
protected findIndex(k: ReadonlyVec) {
const { _min: min, _res1: res1, _invSize: invSize } = this;
const kx = clamp((k[0] - min[0]) * invSize[0], 0, res1[0]);
const ky = clamp((k[1] - min[1]) * invSize[1], 0, res1[1]);
const kz = clamp((k[2] - min[2]) * invSize[2], 0, res1[2]);
return (
(kx | 0) + (ky | 0) * this._stride[0] + (kz | 0) * this._stride[1]
);
}
}
| {
"pile_set_name": "Github"
} |
package com.loopeer.codereaderkt.ui.adapter
import android.content.Context
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.BaseAdapter
import android.widget.ImageView
import android.widget.TextView
import com.loopeer.codereaderkt.Navigator
import com.loopeer.codereaderkt.R
import com.loopeer.codereaderkt.model.MainHeaderItem
class MainHeaderAdapter() : BaseAdapter() {
private var mDatas: ArrayList<MainHeaderItem> = ArrayList<MainHeaderItem>()
private lateinit var mContext: Context
constructor(context: Context) : this() {
mContext = context
}
override fun getCount(): Int = mDatas.size
override fun getItem(i: Int): Any = mDatas[i]
override fun getItemId(i: Int): Long = i.toLong()
override fun getView(i: Int, convertView: View?, viewGroup: ViewGroup): View {
val view = LayoutInflater.from(mContext).inflate(R.layout.grid_item_main_header, viewGroup, false)
bindView(mDatas[i], view)
bindClick(view, mDatas[i], i)
return view
}
private fun bindClick(view: View, item: MainHeaderItem, i: Int) {
view.setOnClickListener { view1 ->
when (i) {
0 -> Navigator().startSearchActivity(mContext)
1 -> Navigator().startWebActivity(mContext, item.link)
}
}
}
private fun bindView(item: MainHeaderItem, view: View) {
val textView = view.findViewById<TextView>(R.id.text_grid_item)
val imageView = view.findViewById<ImageView>(R.id.img_grid_item)
textView.setText(item.name)
imageView.setImageResource(item.icon)
}
fun updateData(items: List<MainHeaderItem>) {
setData(items)
notifyDataSetChanged()
}
private fun setData(items: List<MainHeaderItem>) {
mDatas.clear()
mDatas.addAll(items)
}
}
| {
"pile_set_name": "Github"
} |
/*
* Copyright (C) 2013-2015 RoboVM AB
*
* 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.bugvm.apple.dispatch;
/*<imports>*/
import java.io.*;
import java.nio.*;
import java.util.*;
import com.bugvm.objc.*;
import com.bugvm.objc.annotation.*;
import com.bugvm.objc.block.*;
import com.bugvm.rt.*;
import com.bugvm.rt.annotation.*;
import com.bugvm.rt.bro.*;
import com.bugvm.rt.bro.annotation.*;
import com.bugvm.rt.bro.ptr.*;
/*</imports>*/
/*<javadoc>*/
/*</javadoc>*/
/*<annotations>*/@Library("System")/*</annotations>*/
/*<visibility>*/public/*</visibility>*/ class /*<name>*/DispatchSource/*</name>*/
extends /*<extends>*/DispatchObject/*</extends>*/
/*<implements>*//*</implements>*/ {
/*<ptr>*/public static class DispatchSourcePtr extends Ptr<DispatchSource, DispatchSourcePtr> {}/*</ptr>*/
/*<bind>*/static { Bro.bind(DispatchSource.class); }/*</bind>*/
/*<constants>*/
public static final int MACH_SEND_DEAD = 0x1;
public static final int MEMORYPRESSURE_NORMAL = 0x01;
public static final int MEMORYPRESSURE_WARN = 0x02;
public static final int MEMORYPRESSURE_CRITICAL = 0x04;
public static final int PROC_EXIT = 0x80000000;
public static final int PROC_FORK = 0x40000000;
public static final int PROC_EXEC = 0x20000000;
public static final int PROC_SIGNAL = 0x08000000;
public static final int VNODE_DELETE = 0x1;
public static final int VNODE_WRITE = 0x2;
public static final int VNODE_EXTEND = 0x4;
public static final int VNODE_ATTRIB = 0x8;
public static final int VNODE_LINK = 0x10;
public static final int VNODE_RENAME = 0x20;
public static final int VNODE_REVOKE = 0x40;
public static final int TIMER_STRICT = 0x1;
/*</constants>*/
/*<constructors>*/
protected DispatchSource() {}
/*</constructors>*/
/*<properties>*//*</properties>*/
/*<members>*//*</members>*/
/*<methods>*/
/**
* @since Available in iOS 4.0 and later.
*/
@Bridge(symbol="dispatch_source_create", optional=true)
public static native DispatchSource create(DispatchSourceType type, @MachineSizedUInt long handle, @MachineSizedUInt long mask, DispatchQueue queue);
/**
* @since Available in iOS 4.0 and later.
*/
@Bridge(symbol="dispatch_source_set_event_handler", optional=true)
public native void setEventHandler(@Block Runnable handler);
/**
* @since Available in iOS 4.0 and later.
*/
@Bridge(symbol="dispatch_source_set_cancel_handler", optional=true)
public native void setCancelHandler(@Block Runnable handler);
/**
* @since Available in iOS 4.0 and later.
*/
@Bridge(symbol="dispatch_source_cancel", optional=true)
public native void cancel();
/**
* @since Available in iOS 4.0 and later.
*/
@Bridge(symbol="dispatch_source_testcancel", optional=true)
public native @MachineSizedSInt long testCancel();
/**
* @since Available in iOS 4.0 and later.
*/
@Bridge(symbol="dispatch_source_get_handle", optional=true)
public native @MachineSizedUInt long getSourceHandle();
/**
* @since Available in iOS 4.0 and later.
*/
@Bridge(symbol="dispatch_source_get_mask", optional=true)
public native @MachineSizedUInt long getMask();
/**
* @since Available in iOS 4.0 and later.
*/
@Bridge(symbol="dispatch_source_get_data", optional=true)
public native @MachineSizedUInt long getData();
/**
* @since Available in iOS 4.0 and later.
*/
@Bridge(symbol="dispatch_source_merge_data", optional=true)
public native void mergeData(@MachineSizedUInt long value);
/**
* @since Available in iOS 4.0 and later.
*/
@Bridge(symbol="dispatch_source_set_timer", optional=true)
public native void setTimer(long start, long interval, long leeway);
/**
* @since Available in iOS 4.3 and later.
*/
@Bridge(symbol="dispatch_source_set_registration_handler", optional=true)
public native void setRegistrationHandler(@Block Runnable handler);
/*</methods>*/
}
| {
"pile_set_name": "Github"
} |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Rhino.Render;
namespace MockingBirdViewport
{
public class MockingRealtimeDisplayModeInfo : RealtimeDisplayModeClassInfo
{
public override string Name => "MockingRealtimeMode";
public override Guid GUID => new Guid("F14A3A24-C2FB-4216-9D2A-9636EF3869FA");
public override Type RealtimeDisplayModeType => typeof(MockingRealtimeDisplayMode);
public override bool DrawOpenGl => false;
}
}
| {
"pile_set_name": "Github"
} |
package cloud.nio.spi
/**
* Contains a listing of paths/keys under some host/bucket. The keys must be absolute paths but should not begin with a
* slash.
*/
case class CloudNioFileList(paths: Iterable[String], markerOption: Option[String])
| {
"pile_set_name": "Github"
} |
/**
* @license
*
* Copyright IBM Corp. 2020
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import { render } from 'lit-html';
import '../../src/components/link/link';
import { defaultStory } from '../../src/components/link/link-story';
const template = (props?) =>
defaultStory({
parameters: {
props: {
'bx-link': props,
},
},
});
describe('bx-link', function() {
describe('Misc attributes', function() {
it('should render with minimum attributes', async function() {
render(template({ href: 'about:blank' }), document.body);
await Promise.resolve();
expect(document.body.querySelector('bx-link')).toMatchSnapshot({ mode: 'shadow' });
});
it('should render with various attributes', async function() {
render(
template({
download: 'file-name-foo',
href: 'about:blank',
hreflang: 'en',
linkRole: 'button',
ping: 'about:blank',
rel: 'noopener',
target: '_blank',
type: 'text/plain',
}),
document.body
);
await Promise.resolve();
expect(document.body.querySelector('bx-link')).toMatchSnapshot({ mode: 'shadow' });
});
it('should render disabled state', async function() {
render(
template({
disabled: true,
download: 'file-name-foo',
href: 'about:blank',
hreflang: 'en',
linkRole: 'button',
ping: 'about:blank',
rel: 'noopener',
target: '_blank',
type: 'text/plain',
}),
document.body
);
await Promise.resolve();
expect(document.body.querySelector('bx-link')).toMatchSnapshot({ mode: 'shadow' });
});
});
afterEach(async function() {
await render(undefined!, document.body);
});
});
| {
"pile_set_name": "Github"
} |
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Text;
namespace BinLogReader
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.MainMenu mainMenu1;
private System.Windows.Forms.MenuItem menuItem1;
private System.Windows.Forms.MenuItem menuItem3;
private System.Windows.Forms.MenuItem menuItem4;
private System.Windows.Forms.MenuItem menuItem5;
private System.Windows.Forms.MenuItem menuItem6;
private System.Windows.Forms.OpenFileDialog ofd;
private System.Windows.Forms.MenuItem MenuFileOpen;
private System.Windows.Forms.TabPage PluginsTab;
private System.Windows.Forms.ListView PluginList;
private System.Windows.Forms.TabPage LogTextTab;
private System.Windows.Forms.RichTextBox TextLog;
private System.Windows.Forms.TabPage LogListTab;
private System.Windows.Forms.TabControl MainTab;
private IContainer components;
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
private BinLog binlog;
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.mainMenu1 = new System.Windows.Forms.MainMenu(this.components);
this.menuItem1 = new System.Windows.Forms.MenuItem();
this.MenuFileOpen = new System.Windows.Forms.MenuItem();
this.menuItem3 = new System.Windows.Forms.MenuItem();
this.menuItem4 = new System.Windows.Forms.MenuItem();
this.menuItem5 = new System.Windows.Forms.MenuItem();
this.menuItem6 = new System.Windows.Forms.MenuItem();
this.ofd = new System.Windows.Forms.OpenFileDialog();
this.PluginsTab = new System.Windows.Forms.TabPage();
this.PluginList = new System.Windows.Forms.ListView();
this.LogTextTab = new System.Windows.Forms.TabPage();
this.TextLog = new System.Windows.Forms.RichTextBox();
this.LogListTab = new System.Windows.Forms.TabPage();
this.MainTab = new System.Windows.Forms.TabControl();
this.PluginsTab.SuspendLayout();
this.LogTextTab.SuspendLayout();
this.MainTab.SuspendLayout();
this.SuspendLayout();
//
// mainMenu1
//
this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem1,
this.menuItem5});
//
// menuItem1
//
this.menuItem1.Index = 0;
this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.MenuFileOpen,
this.menuItem3,
this.menuItem4});
this.menuItem1.Text = "&File";
//
// MenuFileOpen
//
this.MenuFileOpen.Index = 0;
this.MenuFileOpen.Text = "&Open";
this.MenuFileOpen.Click += new System.EventHandler(this.MenuFileOpen_Click);
//
// menuItem3
//
this.menuItem3.Index = 1;
this.menuItem3.Text = "-";
//
// menuItem4
//
this.menuItem4.Index = 2;
this.menuItem4.Text = "E&xit";
this.menuItem4.Click += new System.EventHandler(this.menuItem4_Click);
//
// menuItem5
//
this.menuItem5.Index = 1;
this.menuItem5.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem6});
this.menuItem5.Text = "&Help";
//
// menuItem6
//
this.menuItem6.Index = 0;
this.menuItem6.Text = "&About";
//
// ofd
//
this.ofd.Filter = "Binary Log Files|*.blg";
//
// PluginsTab
//
this.PluginsTab.Controls.Add(this.PluginList);
this.PluginsTab.Location = new System.Drawing.Point(4, 22);
this.PluginsTab.Name = "PluginsTab";
this.PluginsTab.Size = new System.Drawing.Size(648, 346);
this.PluginsTab.TabIndex = 0;
this.PluginsTab.Text = "Plugins";
//
// PluginList
//
this.PluginList.AllowColumnReorder = true;
this.PluginList.AutoArrange = false;
this.PluginList.Dock = System.Windows.Forms.DockStyle.Fill;
this.PluginList.FullRowSelect = true;
this.PluginList.Location = new System.Drawing.Point(0, 0);
this.PluginList.MultiSelect = false;
this.PluginList.Name = "PluginList";
this.PluginList.Size = new System.Drawing.Size(648, 346);
this.PluginList.TabIndex = 0;
this.PluginList.UseCompatibleStateImageBehavior = false;
this.PluginList.View = System.Windows.Forms.View.Details;
//
// LogTextTab
//
this.LogTextTab.Controls.Add(this.TextLog);
this.LogTextTab.Location = new System.Drawing.Point(4, 22);
this.LogTextTab.Name = "LogTextTab";
this.LogTextTab.Size = new System.Drawing.Size(648, 346);
this.LogTextTab.TabIndex = 1;
this.LogTextTab.Text = "Event Log (Text)";
//
// TextLog
//
this.TextLog.Dock = System.Windows.Forms.DockStyle.Fill;
this.TextLog.Font = new System.Drawing.Font("Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.TextLog.Location = new System.Drawing.Point(0, 0);
this.TextLog.Name = "TextLog";
this.TextLog.Size = new System.Drawing.Size(648, 346);
this.TextLog.TabIndex = 0;
this.TextLog.Text = "";
//
// LogListTab
//
this.LogListTab.Location = new System.Drawing.Point(4, 22);
this.LogListTab.Name = "LogListTab";
this.LogListTab.Size = new System.Drawing.Size(648, 346);
this.LogListTab.TabIndex = 3;
this.LogListTab.Text = "Event Log (List)";
//
// MainTab
//
this.MainTab.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.MainTab.Controls.Add(this.PluginsTab);
this.MainTab.Controls.Add(this.LogTextTab);
this.MainTab.Controls.Add(this.LogListTab);
this.MainTab.ItemSize = new System.Drawing.Size(46, 18);
this.MainTab.Location = new System.Drawing.Point(8, 12);
this.MainTab.Name = "MainTab";
this.MainTab.SelectedIndex = 0;
this.MainTab.Size = new System.Drawing.Size(656, 372);
this.MainTab.TabIndex = 0;
this.MainTab.SelectedIndexChanged += new System.EventHandler(this.MainTab_SelectedIndexChanged);
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(676, 393);
this.Controls.Add(this.MainTab);
this.Menu = this.mainMenu1;
this.Name = "Form1";
this.Text = "AMX Mod X BinLog Reader";
this.Load += new System.EventHandler(this.Form1_Load);
this.PluginsTab.ResumeLayout(false);
this.LogTextTab.ResumeLayout(false);
this.MainTab.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
public enum ViewAreas
{
Update_All=0,
Update_Plugins=1,
Update_Text=2,
}
private ViewAreas g_UpdateViews;
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.DoEvents();
Application.Run(new Form1());
}
private void Form1_Load(object sender, System.EventArgs e)
{
binlog = null;
g_UpdateViews = ViewAreas.Update_All;
}
private void menuItem4_Click(object sender, System.EventArgs e)
{
Application.Exit();
}
private void ClearViews(ViewAreas v)
{
if (v == ViewAreas.Update_All ||
((v & ViewAreas.Update_Plugins) == ViewAreas.Update_Plugins))
{
PluginList.Clear();
PluginList.Columns.Clear();
}
if (v == ViewAreas.Update_Text ||
((v & ViewAreas.Update_Text) == ViewAreas.Update_Text))
{
TextLog.Clear();
}
}
private void UpdateViews(ViewAreas v, BinLogFlags b)
{
ClearViews(v);
if (v == ViewAreas.Update_All ||
((v & ViewAreas.Update_Plugins) == ViewAreas.Update_Plugins)
&& (binlog.GetPluginDB() != null))
{
PluginDb plugdb = binlog.GetPluginDB();
PluginList.View = View.Details;
PluginList.Columns.Add("Number", 60, HorizontalAlignment.Left);
PluginList.Columns.Add("File", 100, HorizontalAlignment.Left);
PluginList.Columns.Add("Title", 120, HorizontalAlignment.Left);
PluginList.Columns.Add("Version", 60, HorizontalAlignment.Left);
PluginList.Columns.Add("Status", 60, HorizontalAlignment.Left);
int num = plugdb.Count;
ListViewItem[] items = new ListViewItem[num];
for (int i=0; i<num; i++)
{
Plugin pl = plugdb.GetPluginById(i);
ListViewItem item = new ListViewItem(i.ToString());
item.SubItems.Add(pl.File);
item.SubItems.Add(pl.Title);
item.SubItems.Add(pl.Version);
item.SubItems.Add(pl.Status);
items[i] = item;
}
PluginList.Items.AddRange(items);
}
if (v == ViewAreas.Update_Text ||
((v & ViewAreas.Update_Text) == ViewAreas.Update_Text)
&& (binlog != null))
{
ArrayList al = binlog.OpList;
BinLogEntry ble;
StringBuilder sb = new StringBuilder(al.Count * 10);
BinLogFlags flags = (BinLogFlags.Show_GameTime | BinLogFlags.Show_PlugFile | BinLogFlags.Show_PlugId);
for (int i=0; i<al.Count; i++)
{
ble = (BinLogEntry)al[i];
BinLogEntry.BinLogString(sb, ble, flags);
sb.Append("\n");
}
TextLog.Text = sb.ToString();
}
}
private void MenuFileOpen_Click(object sender, System.EventArgs e)
{
DialogResult res = ofd.ShowDialog(this);
if (res != DialogResult.OK)
{
return;
}
try
{
binlog = BinLog.FromFile(ofd.FileName);
if (binlog == null)
{
throw new Exception("Stream failure in log file");
}
MainTab.SelectedTab = MainTab.TabPages[0];
ClearViews(ViewAreas.Update_All);
UpdateViews(ViewAreas.Update_Plugins, BinLogFlags.Show_PlugFile | BinLogFlags.Show_GameTime);
g_UpdateViews = ViewAreas.Update_Text;
}
catch (Exception ex)
{
string msg = "Failed to open binary log";
if (ex.Message != null)
msg += ": " + ex.Message;
MessageBox.Show(this,
msg,
"AMX Mod X Binary Log Reader",
MessageBoxButtons.OK,
MessageBoxIcon.Error);
}
}
private void MainTab_SelectedIndexChanged(object sender, System.EventArgs e)
{
if ((g_UpdateViews & ViewAreas.Update_Text) == ViewAreas.Update_Text)
{
UpdateViews(ViewAreas.Update_Text, BinLogFlags.Show_PlugFile|BinLogFlags.Show_GameTime);
g_UpdateViews &= ~(ViewAreas.Update_Text);
}
}
}
}
| {
"pile_set_name": "Github"
} |
/*-------------------------------------------------------------------------
*
* oid.c
* Functions for the built-in type Oid ... also oidvector.
*
* Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
*
* IDENTIFICATION
* src/backend/utils/adt/oid.c
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
#include <ctype.h>
#include <limits.h>
#include "catalog/pg_type.h"
#include "libpq/pqformat.h"
#include "nodes/value.h"
#include "utils/array.h"
#include "utils/builtins.h"
#define OidVectorSize(n) (offsetof(oidvector, values) + (n) * sizeof(Oid))
/*****************************************************************************
* USER I/O ROUTINES *
*****************************************************************************/
static Oid
oidin_subr(const char *s, char **endloc)
{
unsigned long cvt;
char *endptr;
Oid result;
if (*s == '\0')
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("invalid input syntax for type %s: \"%s\"",
"oid", s)));
errno = 0;
cvt = strtoul(s, &endptr, 10);
/*
* strtoul() normally only sets ERANGE. On some systems it also may set
* EINVAL, which simply means it couldn't parse the input string. This is
* handled by the second "if" consistent across platforms.
*/
if (errno && errno != ERANGE && errno != EINVAL)
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("invalid input syntax for type %s: \"%s\"",
"oid", s)));
if (endptr == s && *s != '\0')
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("invalid input syntax for type %s: \"%s\"",
"oid", s)));
if (errno == ERANGE)
ereport(ERROR,
(errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
errmsg("value \"%s\" is out of range for type %s",
s, "oid")));
if (endloc)
{
/* caller wants to deal with rest of string */
*endloc = endptr;
}
else
{
/* allow only whitespace after number */
while (*endptr && isspace((unsigned char) *endptr))
endptr++;
if (*endptr)
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("invalid input syntax for type %s: \"%s\"",
"oid", s)));
}
result = (Oid) cvt;
/*
* Cope with possibility that unsigned long is wider than Oid, in which
* case strtoul will not raise an error for some values that are out of
* the range of Oid.
*
* For backwards compatibility, we want to accept inputs that are given
* with a minus sign, so allow the input value if it matches after either
* signed or unsigned extension to long.
*
* To ensure consistent results on 32-bit and 64-bit platforms, make sure
* the error message is the same as if strtoul() had returned ERANGE.
*/
#if OID_MAX != ULONG_MAX
if (cvt != (unsigned long) result &&
cvt != (unsigned long) ((int) result))
ereport(ERROR,
(errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
errmsg("value \"%s\" is out of range for type %s",
s, "oid")));
#endif
return result;
}
Datum
oidin(PG_FUNCTION_ARGS)
{
char *s = PG_GETARG_CSTRING(0);
Oid result;
result = oidin_subr(s, NULL);
PG_RETURN_OID(result);
}
Datum
oidout(PG_FUNCTION_ARGS)
{
Oid o = PG_GETARG_OID(0);
char *result = (char *) palloc(12);
snprintf(result, 12, "%u", o);
PG_RETURN_CSTRING(result);
}
/*
* oidrecv - converts external binary format to oid
*/
Datum
oidrecv(PG_FUNCTION_ARGS)
{
StringInfo buf = (StringInfo) PG_GETARG_POINTER(0);
PG_RETURN_OID((Oid) pq_getmsgint(buf, sizeof(Oid)));
}
/*
* oidsend - converts oid to binary format
*/
Datum
oidsend(PG_FUNCTION_ARGS)
{
Oid arg1 = PG_GETARG_OID(0);
StringInfoData buf;
pq_begintypsend(&buf);
pq_sendint32(&buf, arg1);
PG_RETURN_BYTEA_P(pq_endtypsend(&buf));
}
/*
* construct oidvector given a raw array of Oids
*
* If oids is NULL then caller must fill values[] afterward
*/
oidvector *
buildoidvector(const Oid *oids, int n)
{
oidvector *result;
result = (oidvector *) palloc0(OidVectorSize(n));
if (n > 0 && oids)
memcpy(result->values, oids, n * sizeof(Oid));
/*
* Attach standard array header. For historical reasons, we set the index
* lower bound to 0 not 1.
*/
SET_VARSIZE(result, OidVectorSize(n));
result->ndim = 1;
result->dataoffset = 0; /* never any nulls */
result->elemtype = OIDOID;
result->dim1 = n;
result->lbound1 = 0;
return result;
}
/*
* oidvectorin - converts "num num ..." to internal form
*/
Datum
oidvectorin(PG_FUNCTION_ARGS)
{
char *oidString = PG_GETARG_CSTRING(0);
oidvector *result;
int n;
result = (oidvector *) palloc0(OidVectorSize(FUNC_MAX_ARGS));
for (n = 0; n < FUNC_MAX_ARGS; n++)
{
while (*oidString && isspace((unsigned char) *oidString))
oidString++;
if (*oidString == '\0')
break;
result->values[n] = oidin_subr(oidString, &oidString);
}
while (*oidString && isspace((unsigned char) *oidString))
oidString++;
if (*oidString)
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("oidvector has too many elements")));
SET_VARSIZE(result, OidVectorSize(n));
result->ndim = 1;
result->dataoffset = 0; /* never any nulls */
result->elemtype = OIDOID;
result->dim1 = n;
result->lbound1 = 0;
PG_RETURN_POINTER(result);
}
/*
* oidvectorout - converts internal form to "num num ..."
*/
Datum
oidvectorout(PG_FUNCTION_ARGS)
{
oidvector *oidArray = (oidvector *) PG_GETARG_POINTER(0);
int num,
nnums = oidArray->dim1;
char *rp;
char *result;
/* assumes sign, 10 digits, ' ' */
rp = result = (char *) palloc(nnums * 12 + 1);
for (num = 0; num < nnums; num++)
{
if (num != 0)
*rp++ = ' ';
sprintf(rp, "%u", oidArray->values[num]);
while (*++rp != '\0')
;
}
*rp = '\0';
PG_RETURN_CSTRING(result);
}
/*
* oidvectorrecv - converts external binary format to oidvector
*/
Datum
oidvectorrecv(PG_FUNCTION_ARGS)
{
LOCAL_FCINFO(locfcinfo, 3);
StringInfo buf = (StringInfo) PG_GETARG_POINTER(0);
oidvector *result;
/*
* Normally one would call array_recv() using DirectFunctionCall3, but
* that does not work since array_recv wants to cache some data using
* fcinfo->flinfo->fn_extra. So we need to pass it our own flinfo
* parameter.
*/
InitFunctionCallInfoData(*locfcinfo, fcinfo->flinfo, 3,
InvalidOid, NULL, NULL);
locfcinfo->args[0].value = PointerGetDatum(buf);
locfcinfo->args[0].isnull = false;
locfcinfo->args[1].value = ObjectIdGetDatum(OIDOID);
locfcinfo->args[1].isnull = false;
locfcinfo->args[2].value = Int32GetDatum(-1);
locfcinfo->args[2].isnull = false;
result = (oidvector *) DatumGetPointer(array_recv(locfcinfo));
Assert(!locfcinfo->isnull);
/* sanity checks: oidvector must be 1-D, 0-based, no nulls */
if (ARR_NDIM(result) != 1 ||
ARR_HASNULL(result) ||
ARR_ELEMTYPE(result) != OIDOID ||
ARR_LBOUND(result)[0] != 0)
ereport(ERROR,
(errcode(ERRCODE_INVALID_BINARY_REPRESENTATION),
errmsg("invalid oidvector data")));
/* check length for consistency with oidvectorin() */
if (ARR_DIMS(result)[0] > FUNC_MAX_ARGS)
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("oidvector has too many elements")));
PG_RETURN_POINTER(result);
}
/*
* oidvectorsend - converts oidvector to binary format
*/
Datum
oidvectorsend(PG_FUNCTION_ARGS)
{
return array_send(fcinfo);
}
/*
* oidparse - get OID from IConst/FConst node
*/
Oid
oidparse(Node *node)
{
switch (nodeTag(node))
{
case T_Integer:
return intVal(node);
case T_Float:
/*
* Values too large for int4 will be represented as Float
* constants by the lexer. Accept these if they are valid OID
* strings.
*/
return oidin_subr(strVal(node), NULL);
default:
elog(ERROR, "unrecognized node type: %d", (int) nodeTag(node));
}
return InvalidOid; /* keep compiler quiet */
}
/* qsort comparison function for Oids */
int
oid_cmp(const void *p1, const void *p2)
{
Oid v1 = *((const Oid *) p1);
Oid v2 = *((const Oid *) p2);
if (v1 < v2)
return -1;
if (v1 > v2)
return 1;
return 0;
}
/*****************************************************************************
* PUBLIC ROUTINES *
*****************************************************************************/
Datum
oideq(PG_FUNCTION_ARGS)
{
Oid arg1 = PG_GETARG_OID(0);
Oid arg2 = PG_GETARG_OID(1);
PG_RETURN_BOOL(arg1 == arg2);
}
Datum
oidne(PG_FUNCTION_ARGS)
{
Oid arg1 = PG_GETARG_OID(0);
Oid arg2 = PG_GETARG_OID(1);
PG_RETURN_BOOL(arg1 != arg2);
}
Datum
oidlt(PG_FUNCTION_ARGS)
{
Oid arg1 = PG_GETARG_OID(0);
Oid arg2 = PG_GETARG_OID(1);
PG_RETURN_BOOL(arg1 < arg2);
}
Datum
oidle(PG_FUNCTION_ARGS)
{
Oid arg1 = PG_GETARG_OID(0);
Oid arg2 = PG_GETARG_OID(1);
PG_RETURN_BOOL(arg1 <= arg2);
}
Datum
oidge(PG_FUNCTION_ARGS)
{
Oid arg1 = PG_GETARG_OID(0);
Oid arg2 = PG_GETARG_OID(1);
PG_RETURN_BOOL(arg1 >= arg2);
}
Datum
oidgt(PG_FUNCTION_ARGS)
{
Oid arg1 = PG_GETARG_OID(0);
Oid arg2 = PG_GETARG_OID(1);
PG_RETURN_BOOL(arg1 > arg2);
}
Datum
oidlarger(PG_FUNCTION_ARGS)
{
Oid arg1 = PG_GETARG_OID(0);
Oid arg2 = PG_GETARG_OID(1);
PG_RETURN_OID((arg1 > arg2) ? arg1 : arg2);
}
Datum
oidsmaller(PG_FUNCTION_ARGS)
{
Oid arg1 = PG_GETARG_OID(0);
Oid arg2 = PG_GETARG_OID(1);
PG_RETURN_OID((arg1 < arg2) ? arg1 : arg2);
}
Datum
oidvectoreq(PG_FUNCTION_ARGS)
{
int32 cmp = DatumGetInt32(btoidvectorcmp(fcinfo));
PG_RETURN_BOOL(cmp == 0);
}
Datum
oidvectorne(PG_FUNCTION_ARGS)
{
int32 cmp = DatumGetInt32(btoidvectorcmp(fcinfo));
PG_RETURN_BOOL(cmp != 0);
}
Datum
oidvectorlt(PG_FUNCTION_ARGS)
{
int32 cmp = DatumGetInt32(btoidvectorcmp(fcinfo));
PG_RETURN_BOOL(cmp < 0);
}
Datum
oidvectorle(PG_FUNCTION_ARGS)
{
int32 cmp = DatumGetInt32(btoidvectorcmp(fcinfo));
PG_RETURN_BOOL(cmp <= 0);
}
Datum
oidvectorge(PG_FUNCTION_ARGS)
{
int32 cmp = DatumGetInt32(btoidvectorcmp(fcinfo));
PG_RETURN_BOOL(cmp >= 0);
}
Datum
oidvectorgt(PG_FUNCTION_ARGS)
{
int32 cmp = DatumGetInt32(btoidvectorcmp(fcinfo));
PG_RETURN_BOOL(cmp > 0);
}
| {
"pile_set_name": "Github"
} |
<!--
~ Copyright (c) 2018 Wolfram Research, Inc. All rights reserved.
~ Redistribution or use of this work in any form, with or without modification,
~ requires written permission from the copyright holder.
-->
<h3><a href="http://reference.wolfram.com/search/?q=SetDelayedSpecialSymbol">SetDelayedSpecialSymbol</a></h3><p><b>Attributes:</b>HoldAll,
Protected</p><p><b>Symbol has no options.</b></p> | {
"pile_set_name": "Github"
} |
File: RenameOnImport.a.kt - 1d4b4e7321208835dd8c4f2a731b8ced
packageHeader
PACKAGE("package")
identifier
simpleIdentifier
Identifier("a")
semi
NL("\n")
NL("\n")
importList
topLevelObject
declaration
propertyDeclaration
VAL("val")
variableDeclaration
simpleIdentifier
Identifier("x")
ASSIGNMENT("=")
expression
disjunction
conjunction
equality
comparison
genericCallLikeComparison
infixOperation
elvisExpression
infixFunctionCall
rangeExpression
additiveExpression
multiplicativeExpression
asExpression
prefixUnaryExpression
postfixUnaryExpression
primaryExpression
literalConstant
IntegerLiteral("1")
NL("\n")
topLevelObject
declaration
propertyDeclaration
VAL("val")
variableDeclaration
simpleIdentifier
Identifier("y")
ASSIGNMENT("=")
expression
disjunction
conjunction
equality
comparison
genericCallLikeComparison
infixOperation
elvisExpression
infixFunctionCall
rangeExpression
additiveExpression
multiplicativeExpression
asExpression
prefixUnaryExpression
postfixUnaryExpression
primaryExpression
literalConstant
IntegerLiteral("1")
NL("\n")
NL("\n")
semis
EOF("<EOF>")
EOF("<EOF>")
| {
"pile_set_name": "Github"
} |
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="./../../helpwin.css">
<title>MATLAB File Help: prtRvVq/probabilities</title>
</head>
<body>
<!--Single-page help-->
<table border="0" cellspacing="0" width="100%">
<tr class="subheader">
<td class="headertitle">MATLAB File Help: prtRvVq/probabilities</td>
</tr>
</table>
<div class="title">prtRvVq/probabilities</div>
<div class="helptext"><pre><!--helptext --> probabilities - The probabilities</pre></div><!--after help -->
<!--Property-->
<div class="sectiontitle">Property Details</div>
<table class="class-details">
<tr>
<td class="class-detail-label">Constant</td>
<td>false</td>
</tr>
<tr>
<td class="class-detail-label">Dependent</td>
<td>true</td>
</tr>
<tr>
<td class="class-detail-label">Sealed</td>
<td>false</td>
</tr>
<tr>
<td class="class-detail-label">Transient</td>
<td>false</td>
</tr>
<tr>
<td class="class-detail-label">GetAccess</td>
<td>public</td>
</tr>
<tr>
<td class="class-detail-label">SetAccess</td>
<td>public</td>
</tr>
<tr>
<td class="class-detail-label">GetObservable</td>
<td>false</td>
</tr>
<tr>
<td class="class-detail-label">SetObservable</td>
<td>false</td>
</tr>
</table>
</body>
</html> | {
"pile_set_name": "Github"
} |
package qunar.tc.bistoury.agent.common.kv;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import qunar.tc.bistoury.clientside.common.store.BistouryStore;
import qunar.tc.bistoury.common.FileUtil;
import java.io.File;
import java.util.Map;
import java.util.concurrent.TimeUnit;
/**
* @author leix.xie
* @date 2020/5/9 18:06
* @describe
*/
public class KvDbWrapper implements KvDb {
private static final Logger LOG = LoggerFactory.getLogger(KvDbWrapper.class);
private static final int DEFAULT_TTL = (int) TimeUnit.DAYS.toSeconds(3);
private static final String ROCKS_DB = "rocksdb";
private static final String SQLITE = "sqlite";
private static final int DEFAULT_MAX_COMPACTIONS = 3;
private final KvDb kvdb;
public KvDbWrapper() {
final String dbType = System.getProperty("bistoury.store.db", ROCKS_DB);
if (SQLITE.equalsIgnoreCase(dbType)) {
final String rocksDbPath = BistouryStore.getStorePath(ROCKS_DB);
final File file = new File(rocksDbPath);
if (file.exists()) {
LOG.info("clean rocksDb data, path:{}", file.getPath());
FileUtil.deleteDirectory(file, true);
}
kvdb = new SQLiteStoreImpl(BistouryStore.getStorePath(SQLITE), DEFAULT_TTL);
} else {
kvdb = new RocksDBStoreImpl(BistouryStore.getStorePath(ROCKS_DB), DEFAULT_TTL, DEFAULT_MAX_COMPACTIONS);
}
}
@Override
public String get(String key) {
return kvdb.get(key);
}
@Override
public void put(String key, String value) {
kvdb.put(key, value);
}
@Override
public void putBatch(Map<String, String> data) {
kvdb.putBatch(data);
}
}
| {
"pile_set_name": "Github"
} |
#!/bin/bash
for f in *.pdf ; do
echo "$f => ${f%.pdf}.eps"
pdftops -eps "$f"
done
for f in *-1.eps ; do
r="${f%-1.eps}".eps
echo cp "$f" "$r"
cp "$f" "$r"
done
| {
"pile_set_name": "Github"
} |
import tensorflow as tf
import numpy as np
from net.roipooling_op import *
def weight_variable(shape):
initial = tf.truncated_normal(shape, stddev=0.1)
return tf.Variable(initial)
def conv2d(x, W):
return tf.nn.conv2d(x, W, strides=[1, 1, 1, 1], padding='SAME')
# main --------------------------------------------------------------------------
if __name__ == '__main__':
print( '%s: calling main function ... ' % os.path.basename(__file__))
data_array = np.random.rand(32, 100, 100, 3)
data = tf.convert_to_tensor(data_array, dtype=tf.float32)
rois = tf.convert_to_tensor([[0, 10, 10, 20, 20], [31, 30, 30, 40, 40]], dtype=tf.float32)
#dummy net
W = weight_variable([3, 3, 3, 1])
h = conv2d(data, W)
y, argmax = roi_pool(h, rois, 6, 6, 1.0/3)
#loss
y_hat = tf.convert_to_tensor(np.ones((2, 6, 6, 1)), dtype=tf.float32)
loss = tf.reduce_mean(tf.square(y - y_hat)) # Minimize the mean squared errors.
optimizer = tf.train.GradientDescentOptimizer(learning_rate=0.008)
optimizer_step = optimizer.minimize(loss)
print ('-----------------------------')
print ('y_hat, y, argmax')
print (y_hat, y, argmax)
#start training here! ---------------------------------
sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))
sess.run(tf.global_variables_initializer())
for iter in range(500):
_,ls = sess.run([optimizer_step,loss])
print ('-----------------------------')
print ('iter=%d, loss=%f'%(iter,ls))
#weights = sess.run(W)
#estimates = sess.run(y)
#print ('weights:\n',weights)
#print ('estimates:\n',estimates)
print ('')
weights = sess.run(W)
estimates = sess.run(y)
features = sess.run(h)
print ('weights:\n',weights)
print ('estimates:\n',estimates)
print ('features:\n',features)
#with tf.device('/gpu:0'):
# result = module.roi_pool(data, rois, 1, 1, 1.0/1)
# print result.eval()
#with tf.device('/cpu:0'):
# run(init)
| {
"pile_set_name": "Github"
} |
display: 40
average_loss: 40
test_iter: 1000
test_interval: 1000
base_lr: 0.01
gamma: 0.1
weight_decay: 0.0005
solver_type: SGD
momentum: 0.9
lr_policy: "multistep"
stepvalue: 40000
stepvalue: 60000
stepvalue: 80000
max_iter: 90000
snapshot: 5000
snapshot_prefix: "snapshots/fitnet4_relu_ortho"
solver_mode: GPU
net_param {
name: "CIFAR10_FitNet4_relu"
layer {
name: "cifar"
type: "Data"
top: "data"
top: "label"
include {
phase: TRAIN
}
transform_param {
mirror: true
crop_size: 32
mean_file: "cifar100-gcn-leveldb-splits/paddedmean.binaryproto"
}
data_param {
source: "cifar100-gcn-leveldb-splits/cifar10_full_train_leveldb_padded"
batch_size: 128
backend: LEVELDB
}
}
layer {
name: "cifar"
type: "Data"
top: "data"
top: "label"
include {
phase: TEST
}
transform_param {
mean_file: "cifar100-gcn-leveldb-splits/mean.binaryproto"
}
data_param {
source: "cifar100-gcn-leveldb-splits/cifar10_test_leveldb"
batch_size: 100
backend: LEVELDB
}
}
layer {
name: "data_drop"
type: "Dropout"
top: "data"
bottom: "data"
dropout_param {
dropout_ratio: 0.2
}
}
layer {
name: "conv1_1"
type: "Convolution"
bottom: "data"
top: "conv1_1"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 1
decay_mult: 0
}
convolution_param {
num_output: 32
kernel_size: 3
stride: 1
pad: 1
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
}
}
}
layer {
name: "relu1_1"
bottom: "conv1_1"
top: "relu1_1"
type: "ReLU"
}
layer {
name: "conv1_2"
type: "Convolution"
bottom: "relu1_1"
top: "conv1_2"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 1
decay_mult: 0
}
convolution_param {
num_output: 32
kernel_size: 3
stride: 1
pad: 1
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
}
}
}
layer {
name: "relu1_2"
bottom: "conv1_2"
top: "relu1_2"
type: "ReLU"
}
layer {
name: "conv1_3"
type: "Convolution"
bottom: "relu1_2"
top: "conv1_3"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 1
decay_mult: 0
}
convolution_param {
num_output: 32
kernel_size: 3
stride: 1
pad: 1
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
}
}
}
layer {
name: "relu1_3"
bottom: "conv1_3"
top: "relu1_3"
type: "ReLU"
}
layer {
name: "conv1_4"
type: "Convolution"
bottom: "relu1_3"
top: "conv1_4"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 1
decay_mult: 0
}
convolution_param {
num_output: 48
kernel_size: 3
stride: 1
pad: 1
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
}
}
}
layer {
name: "relu1_4"
bottom: "conv1_4"
top: "relu1_4"
type: "ReLU"
}
layer {
name: "conv1_5"
type: "Convolution"
bottom: "relu1_4"
top: "conv1_5"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 1
decay_mult: 0
}
convolution_param {
num_output: 48
kernel_size: 3
stride: 1
pad: 1
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
}
}
}
layer {
name: "relu1_5"
bottom: "conv1_5"
top: "relu1_5"
type: "ReLU"
}
layer {
name: "pool1"
type: "Pooling"
bottom: "relu1_5"
top: "pool1"
pooling_param {
pool: MAX
kernel_size: 2
stride: 2
}
}
layer {
name: "pool1_drop"
type: "Dropout"
top: "pool1_drop"
bottom: "pool1"
dropout_param {
dropout_ratio: 0.2
}
}
########
layer {
name: "conv2_1"
type: "Convolution"
bottom: "pool1_drop"
top: "conv2_1"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 1
decay_mult: 0
}
convolution_param {
num_output: 80
kernel_size: 3
stride: 1
pad: 1
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
}
}
}
layer {
name: "relu2_1"
bottom: "conv2_1"
top: "relu2_1"
type: "ReLU"
}
layer {
name: "conv2_2"
type: "Convolution"
bottom: "relu2_1"
top: "conv2_2"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 1
decay_mult: 0
}
convolution_param {
num_output: 80
kernel_size: 3
stride: 1
pad: 1
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
}
}
}
layer {
name: "relu2_2"
bottom: "conv2_2"
top: "relu2_2"
type: "ReLU"
}
layer {
name: "conv2_3"
type: "Convolution"
bottom: "relu2_2"
top: "conv2_3"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 1
decay_mult: 0
}
convolution_param {
num_output: 80
kernel_size: 3
stride: 1
pad: 1
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
}
}
}
layer {
name: "relu2_3"
bottom: "conv2_3"
top: "relu2_3"
type: "ReLU"
}
layer {
name: "conv2_4"
type: "Convolution"
bottom: "relu2_3"
top: "conv2_4"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 1
decay_mult: 0
}
convolution_param {
num_output: 80
kernel_size: 3
stride: 1
pad: 1
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
}
}
}
layer {
name: "relu2_4"
bottom: "conv2_4"
top: "relu2_4"
type: "ReLU"
}
layer {
name: "conv2_5"
type: "Convolution"
bottom: "relu2_4"
top: "conv2_5"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 1
decay_mult: 0
}
convolution_param {
num_output: 80
kernel_size: 3
stride: 1
pad: 1
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
}
}
}
layer {
name: "relu2_5"
bottom: "conv2_5"
top: "relu2_5"
type: "ReLU"
}
layer {
name: "conv2_6"
type: "Convolution"
bottom: "relu2_5"
top: "conv2_6"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 1
decay_mult: 0
}
convolution_param {
num_output: 80
kernel_size: 3
stride: 1
pad: 1
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
}
}
}
layer {
name: "relu2_6"
bottom: "conv2_6"
top: "relu2_6"
type: "ReLU"
}
layer {
name: "pool2"
type: "Pooling"
bottom: "relu2_6"
top: "pool2"
pooling_param {
pool: MAX
kernel_size: 2
stride: 2
}
}
###########
layer {
name: "pool2_drop"
type: "Dropout"
top: "pool2_drop"
bottom: "pool2"
dropout_param {
dropout_ratio: 0.2
}
}
########
layer {
name: "conv3_1"
type: "Convolution"
bottom: "pool2_drop"
top: "conv3_1"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 1
decay_mult: 0
}
convolution_param {
num_output: 128
kernel_size: 3
stride: 1
pad: 1
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
}
}
}
layer {
name: "relu3_1"
bottom: "conv3_1"
top: "relu3_1"
type: "ReLU"
}
layer {
name: "conv3_2"
type: "Convolution"
bottom: "relu3_1"
top: "conv3_2"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 1
decay_mult: 0
}
convolution_param {
num_output: 128
kernel_size: 3
stride: 1
pad: 1
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
}
}
}
layer {
name: "relu3_2"
bottom: "conv3_2"
top: "relu3_2"
type: "ReLU"
}
layer {
name: "conv3_3"
type: "Convolution"
bottom: "relu3_2"
top: "conv3_3"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 1
decay_mult: 0
}
convolution_param {
num_output: 128
kernel_size: 3
stride: 1
pad: 1
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
}
}
}
layer {
name: "relu3_3"
bottom: "conv3_3"
top: "relu3_3"
type: "ReLU"
}
layer {
name: "conv3_4"
type: "Convolution"
bottom: "relu3_3"
top: "conv3_4"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 1
decay_mult: 0
}
convolution_param {
num_output: 128
kernel_size: 3
stride: 1
pad: 1
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
}
}
}
layer {
name: "relu3_4"
bottom: "conv3_4"
top: "relu3_4"
type: "ReLU"
}
layer {
name: "conv3_5"
type: "Convolution"
bottom: "relu3_4"
top: "conv3_5"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 1
decay_mult: 0
}
convolution_param {
num_output: 128
kernel_size: 3
stride: 1
pad: 1
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
}
}
}
layer {
name: "relu3_5"
bottom: "conv3_5"
top: "relu3_5"
type: "ReLU"
}
layer {
name: "conv3_6"
type: "Convolution"
bottom: "relu3_5"
top: "conv3_6"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 1
decay_mult: 0
}
convolution_param {
num_output: 128
kernel_size: 3
stride: 1
pad: 1
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
}
}
}
layer {
name: "relu3_6"
bottom: "conv3_6"
top: "relu3_6"
type: "ReLU"
}
layer {
name: "pool3"
type: "Pooling"
bottom: "relu3_6"
top: "pool3"
pooling_param {
pool: MAX
global_pooling: true
}
}
layer {
name: "pool3_drop"
type: "Dropout"
top: "pool3_drop"
bottom: "pool3"
dropout_param {
dropout_ratio: 0.2
}
}
layer {
name: "ip1"
type: "InnerProduct"
bottom: "pool3_drop"
top: "ip1"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 1
decay_mult: 0
}
inner_product_param {
num_output: 500
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
}
}
}
layer {
name: "relu_ip1"
bottom: "ip1"
top: "relu_ip1"
type: "ReLU"
}
layer {
name: "ip1_drop"
type: "Dropout"
top: "ip1_drop"
bottom: "relu_ip1"
dropout_param {
dropout_ratio: 0.2
}
}
layer {
name: "clf"
type: "InnerProduct"
bottom: "ip1_drop"
top: "clf"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 1
decay_mult: 0
}
inner_product_param {
num_output: 100
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
}
}
}
layer {
name: "accuracy"
type: "Accuracy"
bottom: "clf"
bottom: "label"
top: "accuracy"
include {
phase: TEST
}
}
layer {
name: "loss"
type: "SoftmaxWithLoss"
bottom: "clf"
bottom: "label"
top: "loss"
}
}
| {
"pile_set_name": "Github"
} |
#include <algorithm>
#include <vector>
#include "gtest/gtest.h"
#include "caffe/blob.hpp"
#include "caffe/common.hpp"
#include "caffe/filler.hpp"
#include "caffe/layers/bias_layer.hpp"
#include "caffe/test/test_caffe_main.hpp"
#include "caffe/test/test_gradient_check_util.hpp"
namespace caffe {
template <typename TypeParam>
class BiasLayerTest : public MultiDeviceTest<TypeParam> {
typedef typename TypeParam::Dtype Dtype;
protected:
BiasLayerTest()
: blob_bottom_(new Blob<Dtype>(2, 3, 4, 5)),
blob_bottom_eltwise_(new Blob<Dtype>(2, 3, 4, 5)),
blob_bottom_broadcast_0_(new Blob<Dtype>()),
blob_bottom_broadcast_1_(new Blob<Dtype>()),
blob_bottom_broadcast_2_(new Blob<Dtype>()),
blob_bottom_bias_(new Blob<Dtype>(vector<int>())),
blob_top_(new Blob<Dtype>()) {
Caffe::set_random_seed(1701);
vector<int> broadcast_shape(2);
broadcast_shape[0] = 2; broadcast_shape[1] = 3;
this->blob_bottom_broadcast_0_->Reshape(broadcast_shape);
broadcast_shape[0] = 3; broadcast_shape[1] = 4;
this->blob_bottom_broadcast_1_->Reshape(broadcast_shape);
broadcast_shape[0] = 4; broadcast_shape[1] = 5;
this->blob_bottom_broadcast_2_->Reshape(broadcast_shape);
FillerParameter filler_param;
filler_param.set_min(1);
filler_param.set_max(10);
UniformFiller<Dtype> filler(filler_param);
filler.Fill(this->blob_bottom_);
filler.Fill(this->blob_bottom_eltwise_);
filler.Fill(this->blob_bottom_broadcast_0_);
filler.Fill(this->blob_bottom_broadcast_1_);
filler.Fill(this->blob_bottom_broadcast_2_);
filler.Fill(this->blob_bottom_bias_);
blob_bottom_vec_.push_back(blob_bottom_);
blob_top_vec_.push_back(blob_top_);
}
virtual ~BiasLayerTest() {
delete blob_bottom_;
delete blob_bottom_eltwise_;
delete blob_bottom_broadcast_0_;
delete blob_bottom_broadcast_1_;
delete blob_bottom_broadcast_2_;
delete blob_bottom_bias_;
delete blob_top_;
}
Blob<Dtype>* const blob_bottom_;
Blob<Dtype>* const blob_bottom_eltwise_;
Blob<Dtype>* const blob_bottom_broadcast_0_;
Blob<Dtype>* const blob_bottom_broadcast_1_;
Blob<Dtype>* const blob_bottom_broadcast_2_;
Blob<Dtype>* const blob_bottom_bias_;
Blob<Dtype>* const blob_top_;
vector<Blob<Dtype>*> blob_bottom_vec_;
vector<Blob<Dtype>*> blob_top_vec_;
};
TYPED_TEST_CASE(BiasLayerTest, TestDtypesAndDevices);
TYPED_TEST(BiasLayerTest, TestForwardEltwise) {
typedef typename TypeParam::Dtype Dtype;
this->blob_bottom_vec_.push_back(this->blob_bottom_eltwise_);
LayerParameter layer_param;
layer_param.mutable_bias_param()->set_axis(0);
shared_ptr<BiasLayer<Dtype> > layer(new BiasLayer<Dtype>(layer_param));
layer->SetUp(this->blob_bottom_vec_, this->blob_top_vec_);
ASSERT_EQ(this->blob_bottom_->shape(), this->blob_top_->shape());
layer->Forward(this->blob_bottom_vec_, this->blob_top_vec_);
const Dtype* data = this->blob_top_->cpu_data();
const int count = this->blob_top_->count();
const Dtype* in_data_a = this->blob_bottom_->cpu_data();
const Dtype* in_data_b = this->blob_bottom_eltwise_->cpu_data();
for (int i = 0; i < count; ++i) {
EXPECT_NEAR(data[i], in_data_a[i] + in_data_b[i], 1e-5);
}
}
TYPED_TEST(BiasLayerTest, TestForwardEltwiseInPlace) {
typedef typename TypeParam::Dtype Dtype;
this->blob_top_vec_[0] = this->blob_bottom_; // in-place computation
Blob<Dtype> orig_bottom(this->blob_bottom_->shape());
orig_bottom.CopyFrom(*this->blob_bottom_);
this->blob_bottom_vec_.push_back(this->blob_bottom_eltwise_);
LayerParameter layer_param;
layer_param.mutable_bias_param()->set_axis(0);
shared_ptr<BiasLayer<Dtype> > layer(new BiasLayer<Dtype>(layer_param));
layer->SetUp(this->blob_bottom_vec_, this->blob_top_vec_);
layer->Forward(this->blob_bottom_vec_, this->blob_top_vec_);
const Dtype* data = this->blob_bottom_->cpu_data();
const int count = this->blob_bottom_->count();
const Dtype* in_data_a = orig_bottom.cpu_data();
const Dtype* in_data_b = this->blob_bottom_eltwise_->cpu_data();
for (int i = 0; i < count; ++i) {
EXPECT_NEAR(data[i], in_data_a[i] + in_data_b[i], 1e-5);
}
}
TYPED_TEST(BiasLayerTest, TestBackwardEltwiseInPlace) {
typedef typename TypeParam::Dtype Dtype;
Blob<Dtype> orig_bottom(this->blob_bottom_->shape());
orig_bottom.CopyFrom(*this->blob_bottom_);
this->blob_bottom_vec_.push_back(this->blob_bottom_eltwise_);
LayerParameter layer_param;
layer_param.mutable_bias_param()->set_axis(0);
shared_ptr<BiasLayer<Dtype> > layer(new BiasLayer<Dtype>(layer_param));
Blob<Dtype> top_diff(this->blob_bottom_->shape());
FillerParameter filler_param;
filler_param.set_type("gaussian");
filler_param.set_std(1);
GaussianFiller<Dtype> filler(filler_param);
filler.Fill(&top_diff);
vector<bool> propagate_down(2, true);
// Run forward + backward without in-place computation;
// save resulting bottom diffs.
layer->SetUp(this->blob_bottom_vec_, this->blob_top_vec_);
layer->Forward(this->blob_bottom_vec_, this->blob_top_vec_);
caffe_copy(top_diff.count(), top_diff.cpu_data(),
this->blob_top_->mutable_cpu_diff());
layer->Backward(this->blob_top_vec_, propagate_down, this->blob_bottom_vec_);
const bool kReshape = true;
const bool kCopyDiff = true;
Blob<Dtype> orig_bottom_diff;
orig_bottom_diff.CopyFrom(*this->blob_bottom_, kCopyDiff, kReshape);
Blob<Dtype> orig_bias_diff;
orig_bias_diff.CopyFrom(*this->blob_bottom_eltwise_,
kCopyDiff, kReshape);
// Rerun forward + backward with in-place computation;
// check that resulting bottom diffs are the same.
this->blob_top_vec_[0] = this->blob_bottom_; // in-place computation
layer->Forward(this->blob_bottom_vec_, this->blob_top_vec_);
caffe_copy(top_diff.count(), top_diff.cpu_data(),
this->blob_bottom_->mutable_cpu_diff());
layer->Backward(this->blob_top_vec_, propagate_down, this->blob_bottom_vec_);
for (int i = 0; i < this->blob_bottom_->count(); ++i) {
EXPECT_NEAR(orig_bottom_diff.cpu_diff()[i],
this->blob_bottom_->cpu_diff()[i], 1e-5);
}
for (int i = 0; i < this->blob_bottom_eltwise_->count(); ++i) {
EXPECT_NEAR(orig_bias_diff.cpu_diff()[i],
this->blob_bottom_eltwise_->cpu_diff()[i], 1e-5);
}
}
TYPED_TEST(BiasLayerTest, TestForwardEltwiseWithParam) {
typedef typename TypeParam::Dtype Dtype;
LayerParameter layer_param;
BiasParameter* bias_param = layer_param.mutable_bias_param();
bias_param->set_axis(0);
bias_param->set_num_axes(-1);
bias_param->mutable_filler()->set_type("gaussian");
shared_ptr<BiasLayer<Dtype> > layer(new BiasLayer<Dtype>(layer_param));
layer->SetUp(this->blob_bottom_vec_, this->blob_top_vec_);
ASSERT_EQ(this->blob_bottom_->shape(), this->blob_top_->shape());
layer->Forward(this->blob_bottom_vec_, this->blob_top_vec_);
const Dtype* data = this->blob_top_->cpu_data();
const int count = this->blob_top_->count();
const Dtype* in_data_a = this->blob_bottom_->cpu_data();
const Dtype* in_data_b = layer->blobs()[0]->cpu_data();
for (int i = 0; i < count; ++i) {
EXPECT_NEAR(data[i], in_data_a[i] + in_data_b[i], 1e-5);
}
}
TYPED_TEST(BiasLayerTest, TestForwardBroadcastBegin) {
typedef typename TypeParam::Dtype Dtype;
this->blob_bottom_vec_.push_back(this->blob_bottom_broadcast_0_);
LayerParameter layer_param;
layer_param.mutable_bias_param()->set_axis(0);
shared_ptr<BiasLayer<Dtype> > layer(new BiasLayer<Dtype>(layer_param));
layer->SetUp(this->blob_bottom_vec_, this->blob_top_vec_);
ASSERT_EQ(this->blob_bottom_->shape(), this->blob_top_->shape());
layer->Forward(this->blob_bottom_vec_, this->blob_top_vec_);
for (int n = 0; n < this->blob_bottom_->num(); ++n) {
for (int c = 0; c < this->blob_bottom_->channels(); ++c) {
for (int h = 0; h < this->blob_bottom_->height(); ++h) {
for (int w = 0; w < this->blob_bottom_->width(); ++w) {
EXPECT_NEAR(this->blob_top_->data_at(n, c, h, w),
this->blob_bottom_->data_at(n, c, h, w) +
this->blob_bottom_broadcast_0_->data_at(n, c, 0, 0),
1e-5);
}
}
}
}
}
TYPED_TEST(BiasLayerTest, TestForwardBroadcastMiddle) {
typedef typename TypeParam::Dtype Dtype;
this->blob_bottom_vec_.push_back(this->blob_bottom_broadcast_1_);
LayerParameter layer_param;
layer_param.mutable_bias_param()->set_axis(1);
shared_ptr<BiasLayer<Dtype> > layer(new BiasLayer<Dtype>(layer_param));
layer->SetUp(this->blob_bottom_vec_, this->blob_top_vec_);
ASSERT_EQ(this->blob_bottom_->shape(), this->blob_top_->shape());
layer->Forward(this->blob_bottom_vec_, this->blob_top_vec_);
for (int n = 0; n < this->blob_bottom_->num(); ++n) {
for (int c = 0; c < this->blob_bottom_->channels(); ++c) {
for (int h = 0; h < this->blob_bottom_->height(); ++h) {
for (int w = 0; w < this->blob_bottom_->width(); ++w) {
EXPECT_NEAR(this->blob_top_->data_at(n, c, h, w),
this->blob_bottom_->data_at(n, c, h, w) +
this->blob_bottom_broadcast_1_->data_at(c, h, 0, 0),
1e-5);
}
}
}
}
}
TYPED_TEST(BiasLayerTest, TestForwardBroadcastMiddleInPlace) {
typedef typename TypeParam::Dtype Dtype;
this->blob_top_vec_[0] = this->blob_bottom_; // in-place computation
Blob<Dtype> orig_bottom(this->blob_bottom_->shape());
orig_bottom.CopyFrom(*this->blob_bottom_);
this->blob_bottom_vec_.push_back(this->blob_bottom_broadcast_1_);
LayerParameter layer_param;
layer_param.mutable_bias_param()->set_axis(1);
shared_ptr<BiasLayer<Dtype> > layer(new BiasLayer<Dtype>(layer_param));
layer->SetUp(this->blob_bottom_vec_, this->blob_top_vec_);
layer->Forward(this->blob_bottom_vec_, this->blob_top_vec_);
for (int n = 0; n < this->blob_bottom_->num(); ++n) {
for (int c = 0; c < this->blob_bottom_->channels(); ++c) {
for (int h = 0; h < this->blob_bottom_->height(); ++h) {
for (int w = 0; w < this->blob_bottom_->width(); ++w) {
EXPECT_NEAR(this->blob_bottom_->data_at(n, c, h, w),
orig_bottom.data_at(n, c, h, w) +
this->blob_bottom_broadcast_1_->data_at(c, h, 0, 0),
1e-5);
}
}
}
}
}
TYPED_TEST(BiasLayerTest, TestBackwardBroadcastMiddleInPlace) {
typedef typename TypeParam::Dtype Dtype;
Blob<Dtype> orig_bottom(this->blob_bottom_->shape());
orig_bottom.CopyFrom(*this->blob_bottom_);
this->blob_bottom_vec_.push_back(this->blob_bottom_broadcast_1_);
LayerParameter layer_param;
layer_param.mutable_bias_param()->set_axis(1);
shared_ptr<BiasLayer<Dtype> > layer(new BiasLayer<Dtype>(layer_param));
Blob<Dtype> top_diff(this->blob_bottom_->shape());
FillerParameter filler_param;
filler_param.set_type("gaussian");
filler_param.set_std(1);
GaussianFiller<Dtype> filler(filler_param);
filler.Fill(&top_diff);
vector<bool> propagate_down(2, true);
// Run forward + backward without in-place computation;
// save resulting bottom diffs.
layer->SetUp(this->blob_bottom_vec_, this->blob_top_vec_);
layer->Forward(this->blob_bottom_vec_, this->blob_top_vec_);
caffe_copy(top_diff.count(), top_diff.cpu_data(),
this->blob_top_->mutable_cpu_diff());
layer->Backward(this->blob_top_vec_, propagate_down, this->blob_bottom_vec_);
const bool kReshape = true;
const bool kCopyDiff = true;
Blob<Dtype> orig_bottom_diff;
orig_bottom_diff.CopyFrom(*this->blob_bottom_, kCopyDiff, kReshape);
Blob<Dtype> orig_bias_diff;
orig_bias_diff.CopyFrom(*this->blob_bottom_broadcast_1_,
kCopyDiff, kReshape);
// Rerun forward + backward with in-place computation;
// check that resulting bottom diffs are the same.
this->blob_top_vec_[0] = this->blob_bottom_; // in-place computation
layer->Forward(this->blob_bottom_vec_, this->blob_top_vec_);
caffe_copy(top_diff.count(), top_diff.cpu_data(),
this->blob_bottom_->mutable_cpu_diff());
layer->Backward(this->blob_top_vec_, propagate_down, this->blob_bottom_vec_);
for (int i = 0; i < this->blob_bottom_->count(); ++i) {
EXPECT_NEAR(orig_bottom_diff.cpu_diff()[i],
this->blob_bottom_->cpu_diff()[i], 1e-5);
}
for (int i = 0; i < this->blob_bottom_broadcast_1_->count(); ++i) {
EXPECT_NEAR(orig_bias_diff.cpu_diff()[i],
this->blob_bottom_broadcast_1_->cpu_diff()[i], 1e-5);
}
}
TYPED_TEST(BiasLayerTest, TestForwardBroadcastMiddleWithParam) {
typedef typename TypeParam::Dtype Dtype;
LayerParameter layer_param;
BiasParameter* bias_param = layer_param.mutable_bias_param();
bias_param->set_axis(1);
bias_param->set_num_axes(2);
bias_param->mutable_filler()->set_type("gaussian");
shared_ptr<BiasLayer<Dtype> > layer(new BiasLayer<Dtype>(layer_param));
layer->SetUp(this->blob_bottom_vec_, this->blob_top_vec_);
ASSERT_EQ(this->blob_bottom_->shape(), this->blob_top_->shape());
layer->Forward(this->blob_bottom_vec_, this->blob_top_vec_);
for (int n = 0; n < this->blob_bottom_->num(); ++n) {
for (int c = 0; c < this->blob_bottom_->channels(); ++c) {
for (int h = 0; h < this->blob_bottom_->height(); ++h) {
for (int w = 0; w < this->blob_bottom_->width(); ++w) {
EXPECT_NEAR(this->blob_top_->data_at(n, c, h, w),
this->blob_bottom_->data_at(n, c, h, w) +
layer->blobs()[0]->data_at(c, h, 0, 0), 1e-5);
}
}
}
}
}
TYPED_TEST(BiasLayerTest, TestForwardBroadcastEnd) {
typedef typename TypeParam::Dtype Dtype;
this->blob_bottom_vec_.push_back(this->blob_bottom_broadcast_2_);
LayerParameter layer_param;
layer_param.mutable_bias_param()->set_axis(2);
shared_ptr<BiasLayer<Dtype> > layer(new BiasLayer<Dtype>(layer_param));
layer->SetUp(this->blob_bottom_vec_, this->blob_top_vec_);
ASSERT_EQ(this->blob_bottom_->shape(), this->blob_top_->shape());
layer->Forward(this->blob_bottom_vec_, this->blob_top_vec_);
for (int n = 0; n < this->blob_bottom_->num(); ++n) {
for (int c = 0; c < this->blob_bottom_->channels(); ++c) {
for (int h = 0; h < this->blob_bottom_->height(); ++h) {
for (int w = 0; w < this->blob_bottom_->width(); ++w) {
EXPECT_NEAR(this->blob_top_->data_at(n, c, h, w),
this->blob_bottom_->data_at(n, c, h, w) +
this->blob_bottom_broadcast_2_->data_at(h, w, 0, 0),
1e-5);
}
}
}
}
}
TYPED_TEST(BiasLayerTest, TestForwardBias) {
typedef typename TypeParam::Dtype Dtype;
this->blob_bottom_vec_.push_back(this->blob_bottom_bias_);
LayerParameter layer_param;
shared_ptr<BiasLayer<Dtype> > layer(new BiasLayer<Dtype>(layer_param));
layer->SetUp(this->blob_bottom_vec_, this->blob_top_vec_);
ASSERT_EQ(this->blob_bottom_->shape(), this->blob_top_->shape());
layer->Forward(this->blob_bottom_vec_, this->blob_top_vec_);
const Dtype* data = this->blob_top_->cpu_data();
const int count = this->blob_top_->count();
const Dtype* in_data = this->blob_bottom_->cpu_data();
const Dtype bias = *this->blob_bottom_bias_->cpu_data();
for (int i = 0; i < count; ++i) {
EXPECT_NEAR(data[i], in_data[i] + bias, 1e-5);
}
}
TYPED_TEST(BiasLayerTest, TestForwardBiasAxis2) {
typedef typename TypeParam::Dtype Dtype;
this->blob_bottom_vec_.push_back(this->blob_bottom_bias_);
LayerParameter layer_param;
layer_param.mutable_bias_param()->set_axis(2);
shared_ptr<BiasLayer<Dtype> > layer(new BiasLayer<Dtype>(layer_param));
layer->SetUp(this->blob_bottom_vec_, this->blob_top_vec_);
ASSERT_EQ(this->blob_bottom_->shape(), this->blob_top_->shape());
layer->Forward(this->blob_bottom_vec_, this->blob_top_vec_);
const Dtype* data = this->blob_top_->cpu_data();
const int count = this->blob_top_->count();
const Dtype* in_data = this->blob_bottom_->cpu_data();
const Dtype bias = *this->blob_bottom_bias_->cpu_data();
for (int i = 0; i < count; ++i) {
EXPECT_NEAR(data[i], in_data[i] + bias, 1e-5);
}
}
TYPED_TEST(BiasLayerTest, TestGradientEltwise) {
typedef typename TypeParam::Dtype Dtype;
this->blob_bottom_vec_.push_back(this->blob_bottom_eltwise_);
LayerParameter layer_param;
layer_param.mutable_bias_param()->set_axis(0);
BiasLayer<Dtype> layer(layer_param);
GradientChecker<Dtype> checker(1e-2, 1e-3);
checker.CheckGradientEltwise(&layer, this->blob_bottom_vec_,
this->blob_top_vec_);
}
TYPED_TEST(BiasLayerTest, TestGradientEltwiseWithParam) {
typedef typename TypeParam::Dtype Dtype;
LayerParameter layer_param;
BiasParameter* bias_param = layer_param.mutable_bias_param();
bias_param->set_axis(0);
bias_param->set_num_axes(-1);
bias_param->mutable_filler()->set_type("gaussian");
BiasLayer<Dtype> layer(layer_param);
GradientChecker<Dtype> checker(1e-2, 1e-3);
checker.CheckGradientExhaustive(&layer, this->blob_bottom_vec_,
this->blob_top_vec_);
}
TYPED_TEST(BiasLayerTest, TestGradientBroadcastBegin) {
typedef typename TypeParam::Dtype Dtype;
this->blob_bottom_vec_.push_back(this->blob_bottom_broadcast_0_);
LayerParameter layer_param;
layer_param.mutable_bias_param()->set_axis(0);
BiasLayer<Dtype> layer(layer_param);
GradientChecker<Dtype> checker(1e-2, 1e-3);
checker.CheckGradientExhaustive(&layer, this->blob_bottom_vec_,
this->blob_top_vec_);
}
TYPED_TEST(BiasLayerTest, TestGradientBroadcastMiddle) {
typedef typename TypeParam::Dtype Dtype;
this->blob_bottom_vec_.push_back(this->blob_bottom_broadcast_1_);
LayerParameter layer_param;
layer_param.mutable_bias_param()->set_axis(1);
BiasLayer<Dtype> layer(layer_param);
GradientChecker<Dtype> checker(1e-2, 1e-3);
checker.CheckGradientExhaustive(&layer, this->blob_bottom_vec_,
this->blob_top_vec_);
}
TYPED_TEST(BiasLayerTest, TestGradientBroadcastMiddleWithParam) {
typedef typename TypeParam::Dtype Dtype;
this->blob_bottom_vec_.push_back(this->blob_bottom_broadcast_1_);
LayerParameter layer_param;
BiasParameter* bias_param = layer_param.mutable_bias_param();
bias_param->set_axis(1);
bias_param->set_num_axes(2);
bias_param->mutable_filler()->set_type("gaussian");
BiasLayer<Dtype> layer(layer_param);
GradientChecker<Dtype> checker(1e-2, 1e-3);
checker.CheckGradientExhaustive(&layer, this->blob_bottom_vec_,
this->blob_top_vec_);
}
TYPED_TEST(BiasLayerTest, TestGradientBroadcastEnd) {
typedef typename TypeParam::Dtype Dtype;
this->blob_bottom_vec_.push_back(this->blob_bottom_broadcast_2_);
LayerParameter layer_param;
layer_param.mutable_bias_param()->set_axis(2);
BiasLayer<Dtype> layer(layer_param);
GradientChecker<Dtype> checker(1e-2, 1e-3);
checker.CheckGradientExhaustive(&layer, this->blob_bottom_vec_,
this->blob_top_vec_);
}
TYPED_TEST(BiasLayerTest, TestGradientBias) {
typedef typename TypeParam::Dtype Dtype;
this->blob_bottom_vec_.push_back(this->blob_bottom_bias_);
LayerParameter layer_param;
BiasLayer<Dtype> layer(layer_param);
GradientChecker<Dtype> checker(1e-2, 1e-3);
checker.CheckGradientExhaustive(&layer, this->blob_bottom_vec_,
this->blob_top_vec_);
}
TYPED_TEST(BiasLayerTest, TestGradientBiasAxis2) {
typedef typename TypeParam::Dtype Dtype;
this->blob_bottom_vec_.push_back(this->blob_bottom_bias_);
LayerParameter layer_param;
layer_param.mutable_bias_param()->set_axis(2);
BiasLayer<Dtype> layer(layer_param);
GradientChecker<Dtype> checker(1e-2, 1e-3);
checker.CheckGradientExhaustive(&layer, this->blob_bottom_vec_,
this->blob_top_vec_);
}
} // namespace caffe
| {
"pile_set_name": "Github"
} |
/**
* This source code is licensed under the terms found in the LICENSE file in
* node-jsc's root directory.
*/
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
@end
| {
"pile_set_name": "Github"
} |
#ifndef DUST3D_IMAGE_SKELETON_EXTRACTOR_H
#define DUST3D_IMAGE_SKELETON_EXTRACTOR_H
#include <QImage>
#include <QObject>
#include <vector>
#include <set>
class ImageSkeletonExtractor : QObject
{
Q_OBJECT
public:
const std::vector<std::pair<int, int>> neighborOffsets = {
{ 0, -1},
{ 1, -1},
{ 1, 0},
{ 1, 1},
{ 0, 1},
{-1, 1},
{-1, 0},
{-1, -1},
};
enum {
P2 = 0,
P3,
P4,
P5,
P6,
P7,
P8,
P9
};
~ImageSkeletonExtractor();
void setImage(QImage *image);
void extract();
QImage *takeResultGrayscaleImage();
void getSkeleton(std::vector<std::pair<int, int>> *skeleton);
int getArea();
const std::set<std::pair<int, int>> &getBlackPixels();
private:
QImage *m_image = nullptr;
QImage *m_grayscaleImage = nullptr;
int m_area = 0;
std::set<std::pair<int, int>> m_blackPixels;
bool isBlack(int i, int j)
{
return QColor(m_grayscaleImage->pixel(i, j)).black() > 0;
}
bool isWhite(int i, int j)
{
return !isBlack(i, j);
}
void setWhite(int i, int j)
{
m_grayscaleImage->setPixel(i, j, qRgb(255, 255, 255));
}
int countNeighborTransitions(int i, int j)
{
int num = 0;
for (size_t m = 0; m < neighborOffsets.size(); ++m) {
size_t n = (m + 1) % neighborOffsets.size();
if (isWhite(i + neighborOffsets[m].first, j + neighborOffsets[m].second) &&
isBlack(i + neighborOffsets[n].first, j + neighborOffsets[n].second)) {
++num;
}
}
return num;
}
int countBlackNeighbors(int i, int j)
{
int num = 0;
for (const auto &it: neighborOffsets) {
if (isBlack(i + it.first, j + it.second))
++num;
}
return num;
}
bool firstSubiterationSatisfied(int i, int j);
bool secondSubiterationSatisfied(int i, int j);
void calculateAreaAndBlackPixels();
};
#endif
| {
"pile_set_name": "Github"
} |
import { typografRuleTest } from '../../../../test/helpers';
typografRuleTest(['ru/punctuation/exclamationQuestion', [
['!?', '?!'],
['Может домой!?', 'Может домой?!']
]]);
| {
"pile_set_name": "Github"
} |
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
// This source code is licensed under both the GPLv2 (found in the
// COPYING file in the root directory) and Apache 2.0 License
// (found in the LICENSE.Apache file in the root directory).
//
// Copyright (c) 2011 The LevelDB Authors. All rights reserved. Use of
// this source code is governed by a BSD-style license that can be found
// in the LICENSE file. See the AUTHORS file for names of contributors.
//
// InlineSkipList is derived from SkipList (skiplist.h), but it optimizes
// the memory layout by requiring that the key storage be allocated through
// the skip list instance. For the common case of SkipList<const char*,
// Cmp> this saves 1 pointer per skip list node and gives better cache
// locality, at the expense of wasted padding from using AllocateAligned
// instead of Allocate for the keys. The unused padding will be from
// 0 to sizeof(void*)-1 bytes, and the space savings are sizeof(void*)
// bytes, so despite the padding the space used is always less than
// SkipList<const char*, ..>.
//
// Thread safety -------------
//
// Writes via Insert require external synchronization, most likely a mutex.
// InsertConcurrently can be safely called concurrently with reads and
// with other concurrent inserts. Reads require a guarantee that the
// InlineSkipList will not be destroyed while the read is in progress.
// Apart from that, reads progress without any internal locking or
// synchronization.
//
// Invariants:
//
// (1) Allocated nodes are never deleted until the InlineSkipList is
// destroyed. This is trivially guaranteed by the code since we never
// delete any skip list nodes.
//
// (2) The contents of a Node except for the next/prev pointers are
// immutable after the Node has been linked into the InlineSkipList.
// Only Insert() modifies the list, and it is careful to initialize a
// node and use release-stores to publish the nodes in one or more lists.
//
// ... prev vs. next pointer ordering ...
//
#pragma once
#include <assert.h>
#include <stdlib.h>
#include <algorithm>
#include <atomic>
#include <type_traits>
#include "port/likely.h"
#include "port/port.h"
#include "rocksdb/slice.h"
#include "util/allocator.h"
#include "util/coding.h"
#include "util/random.h"
namespace rocksdb {
template <class Comparator>
class InlineSkipList {
private:
struct Node;
struct Splice;
public:
using DecodedKey = \
typename std::remove_reference<Comparator>::type::DecodedType;
static const uint16_t kMaxPossibleHeight = 32;
// Create a new InlineSkipList object that will use "cmp" for comparing
// keys, and will allocate memory using "*allocator". Objects allocated
// in the allocator must remain allocated for the lifetime of the
// skiplist object.
explicit InlineSkipList(Comparator cmp, Allocator* allocator,
int32_t max_height = 12,
int32_t branching_factor = 4);
// Allocates a key and a skip-list node, returning a pointer to the key
// portion of the node. This method is thread-safe if the allocator
// is thread-safe.
char* AllocateKey(size_t key_size);
// Allocate a splice using allocator.
Splice* AllocateSplice();
// Inserts a key allocated by AllocateKey, after the actual key value
// has been filled in.
//
// REQUIRES: nothing that compares equal to key is currently in the list.
// REQUIRES: no concurrent calls to any of inserts.
bool Insert(const char* key);
// Inserts a key allocated by AllocateKey with a hint of last insert
// position in the skip-list. If hint points to nullptr, a new hint will be
// populated, which can be used in subsequent calls.
//
// It can be used to optimize the workload where there are multiple groups
// of keys, and each key is likely to insert to a location close to the last
// inserted key in the same group. One example is sequential inserts.
//
// REQUIRES: nothing that compares equal to key is currently in the list.
// REQUIRES: no concurrent calls to any of inserts.
bool InsertWithHint(const char* key, void** hint);
// Like Insert, but external synchronization is not required.
bool InsertConcurrently(const char* key);
// Inserts a node into the skip list. key must have been allocated by
// AllocateKey and then filled in by the caller. If UseCAS is true,
// then external synchronization is not required, otherwise this method
// may not be called concurrently with any other insertions.
//
// Regardless of whether UseCAS is true, the splice must be owned
// exclusively by the current thread. If allow_partial_splice_fix is
// true, then the cost of insertion is amortized O(log D), where D is
// the distance from the splice to the inserted key (measured as the
// number of intervening nodes). Note that this bound is very good for
// sequential insertions! If allow_partial_splice_fix is false then
// the existing splice will be ignored unless the current key is being
// inserted immediately after the splice. allow_partial_splice_fix ==
// false has worse running time for the non-sequential case O(log N),
// but a better constant factor.
template <bool UseCAS>
bool Insert(const char* key, Splice* splice, bool allow_partial_splice_fix);
// Returns true iff an entry that compares equal to key is in the list.
bool Contains(const char* key) const;
// Return estimated number of entries smaller than `key`.
uint64_t EstimateCount(const char* key) const;
// Validate correctness of the skip-list.
void TEST_Validate() const;
// Iteration over the contents of a skip list
class Iterator {
public:
// Initialize an iterator over the specified list.
// The returned iterator is not valid.
explicit Iterator(const InlineSkipList* list);
// Change the underlying skiplist used for this iterator
// This enables us not changing the iterator without deallocating
// an old one and then allocating a new one
void SetList(const InlineSkipList* list);
// Returns true iff the iterator is positioned at a valid node.
bool Valid() const;
// Returns the key at the current position.
// REQUIRES: Valid()
const char* key() const;
// Advances to the next position.
// REQUIRES: Valid()
void Next();
// Advances to the previous position.
// REQUIRES: Valid()
void Prev();
// Advance to the first entry with a key >= target
void Seek(const char* target);
// Retreat to the last entry with a key <= target
void SeekForPrev(const char* target);
// Position at the first entry in list.
// Final state of iterator is Valid() iff list is not empty.
void SeekToFirst();
// Position at the last entry in list.
// Final state of iterator is Valid() iff list is not empty.
void SeekToLast();
private:
const InlineSkipList* list_;
Node* node_;
// Intentionally copyable
};
private:
const uint16_t kMaxHeight_;
const uint16_t kBranching_;
const uint32_t kScaledInverseBranching_;
Allocator* const allocator_; // Allocator used for allocations of nodes
// Immutable after construction
Comparator const compare_;
Node* const head_;
// Modified only by Insert(). Read racily by readers, but stale
// values are ok.
std::atomic<int> max_height_; // Height of the entire list
// seq_splice_ is a Splice used for insertions in the non-concurrent
// case. It caches the prev and next found during the most recent
// non-concurrent insertion.
Splice* seq_splice_;
inline int GetMaxHeight() const {
return max_height_.load(std::memory_order_relaxed);
}
int RandomHeight();
Node* AllocateNode(size_t key_size, int height);
bool Equal(const char* a, const char* b) const {
return (compare_(a, b) == 0);
}
bool LessThan(const char* a, const char* b) const {
return (compare_(a, b) < 0);
}
// Return true if key is greater than the data stored in "n". Null n
// is considered infinite. n should not be head_.
bool KeyIsAfterNode(const char* key, Node* n) const;
bool KeyIsAfterNode(const DecodedKey& key, Node* n) const;
// Returns the earliest node with a key >= key.
// Return nullptr if there is no such node.
Node* FindGreaterOrEqual(const char* key) const;
// Return the latest node with a key < key.
// Return head_ if there is no such node.
// Fills prev[level] with pointer to previous node at "level" for every
// level in [0..max_height_-1], if prev is non-null.
Node* FindLessThan(const char* key, Node** prev = nullptr) const;
// Return the latest node with a key < key on bottom_level. Start searching
// from root node on the level below top_level.
// Fills prev[level] with pointer to previous node at "level" for every
// level in [bottom_level..top_level-1], if prev is non-null.
Node* FindLessThan(const char* key, Node** prev, Node* root, int top_level,
int bottom_level) const;
// Return the last node in the list.
// Return head_ if list is empty.
Node* FindLast() const;
// Traverses a single level of the list, setting *out_prev to the last
// node before the key and *out_next to the first node after. Assumes
// that the key is not present in the skip list. On entry, before should
// point to a node that is before the key, and after should point to
// a node that is after the key. after should be nullptr if a good after
// node isn't conveniently available.
template<bool prefetch_before>
void FindSpliceForLevel(const DecodedKey& key, Node* before, Node* after, int level,
Node** out_prev, Node** out_next);
// Recomputes Splice levels from highest_level (inclusive) down to
// lowest_level (inclusive).
void RecomputeSpliceLevels(const DecodedKey& key, Splice* splice,
int recompute_level);
// No copying allowed
InlineSkipList(const InlineSkipList&);
InlineSkipList& operator=(const InlineSkipList&);
};
// Implementation details follow
template <class Comparator>
struct InlineSkipList<Comparator>::Splice {
// The invariant of a Splice is that prev_[i+1].key <= prev_[i].key <
// next_[i].key <= next_[i+1].key for all i. That means that if a
// key is bracketed by prev_[i] and next_[i] then it is bracketed by
// all higher levels. It is _not_ required that prev_[i]->Next(i) ==
// next_[i] (it probably did at some point in the past, but intervening
// or concurrent operations might have inserted nodes in between).
int height_ = 0;
Node** prev_;
Node** next_;
};
// The Node data type is more of a pointer into custom-managed memory than
// a traditional C++ struct. The key is stored in the bytes immediately
// after the struct, and the next_ pointers for nodes with height > 1 are
// stored immediately _before_ the struct. This avoids the need to include
// any pointer or sizing data, which reduces per-node memory overheads.
template <class Comparator>
struct InlineSkipList<Comparator>::Node {
// Stores the height of the node in the memory location normally used for
// next_[0]. This is used for passing data from AllocateKey to Insert.
void StashHeight(const int height) {
assert(sizeof(int) <= sizeof(next_[0]));
memcpy(static_cast<void*>(&next_[0]), &height, sizeof(int));
}
// Retrieves the value passed to StashHeight. Undefined after a call
// to SetNext or NoBarrier_SetNext.
int UnstashHeight() const {
int rv;
memcpy(&rv, &next_[0], sizeof(int));
return rv;
}
const char* Key() const { return reinterpret_cast<const char*>(&next_[1]); }
// Accessors/mutators for links. Wrapped in methods so we can add
// the appropriate barriers as necessary, and perform the necessary
// addressing trickery for storing links below the Node in memory.
Node* Next(int n) {
assert(n >= 0);
// Use an 'acquire load' so that we observe a fully initialized
// version of the returned Node.
return ((&next_[0] - n)->load(std::memory_order_acquire));
}
void SetNext(int n, Node* x) {
assert(n >= 0);
// Use a 'release store' so that anybody who reads through this
// pointer observes a fully initialized version of the inserted node.
(&next_[0] - n)->store(x, std::memory_order_release);
}
bool CASNext(int n, Node* expected, Node* x) {
assert(n >= 0);
return (&next_[0] - n)->compare_exchange_strong(expected, x);
}
// No-barrier variants that can be safely used in a few locations.
Node* NoBarrier_Next(int n) {
assert(n >= 0);
return (&next_[0] - n)->load(std::memory_order_relaxed);
}
void NoBarrier_SetNext(int n, Node* x) {
assert(n >= 0);
(&next_[0] - n)->store(x, std::memory_order_relaxed);
}
// Insert node after prev on specific level.
void InsertAfter(Node* prev, int level) {
// NoBarrier_SetNext() suffices since we will add a barrier when
// we publish a pointer to "this" in prev.
NoBarrier_SetNext(level, prev->NoBarrier_Next(level));
prev->SetNext(level, this);
}
private:
// next_[0] is the lowest level link (level 0). Higher levels are
// stored _earlier_, so level 1 is at next_[-1].
std::atomic<Node*> next_[1];
};
template <class Comparator>
inline InlineSkipList<Comparator>::Iterator::Iterator(
const InlineSkipList* list) {
SetList(list);
}
template <class Comparator>
inline void InlineSkipList<Comparator>::Iterator::SetList(
const InlineSkipList* list) {
list_ = list;
node_ = nullptr;
}
template <class Comparator>
inline bool InlineSkipList<Comparator>::Iterator::Valid() const {
return node_ != nullptr;
}
template <class Comparator>
inline const char* InlineSkipList<Comparator>::Iterator::key() const {
assert(Valid());
return node_->Key();
}
template <class Comparator>
inline void InlineSkipList<Comparator>::Iterator::Next() {
assert(Valid());
node_ = node_->Next(0);
}
template <class Comparator>
inline void InlineSkipList<Comparator>::Iterator::Prev() {
// Instead of using explicit "prev" links, we just search for the
// last node that falls before key.
assert(Valid());
node_ = list_->FindLessThan(node_->Key());
if (node_ == list_->head_) {
node_ = nullptr;
}
}
template <class Comparator>
inline void InlineSkipList<Comparator>::Iterator::Seek(const char* target) {
node_ = list_->FindGreaterOrEqual(target);
}
template <class Comparator>
inline void InlineSkipList<Comparator>::Iterator::SeekForPrev(
const char* target) {
Seek(target);
if (!Valid()) {
SeekToLast();
}
while (Valid() && list_->LessThan(target, key())) {
Prev();
}
}
template <class Comparator>
inline void InlineSkipList<Comparator>::Iterator::SeekToFirst() {
node_ = list_->head_->Next(0);
}
template <class Comparator>
inline void InlineSkipList<Comparator>::Iterator::SeekToLast() {
node_ = list_->FindLast();
if (node_ == list_->head_) {
node_ = nullptr;
}
}
template <class Comparator>
int InlineSkipList<Comparator>::RandomHeight() {
auto rnd = Random::GetTLSInstance();
// Increase height with probability 1 in kBranching
int height = 1;
while (height < kMaxHeight_ && height < kMaxPossibleHeight &&
rnd->Next() < kScaledInverseBranching_) {
height++;
}
assert(height > 0);
assert(height <= kMaxHeight_);
assert(height <= kMaxPossibleHeight);
return height;
}
template <class Comparator>
bool InlineSkipList<Comparator>::KeyIsAfterNode(const char* key,
Node* n) const {
// nullptr n is considered infinite
assert(n != head_);
return (n != nullptr) && (compare_(n->Key(), key) < 0);
}
template <class Comparator>
bool InlineSkipList<Comparator>::KeyIsAfterNode(const DecodedKey& key,
Node* n) const {
// nullptr n is considered infinite
assert(n != head_);
return (n != nullptr) && (compare_(n->Key(), key) < 0);
}
template <class Comparator>
typename InlineSkipList<Comparator>::Node*
InlineSkipList<Comparator>::FindGreaterOrEqual(const char* key) const {
// Note: It looks like we could reduce duplication by implementing
// this function as FindLessThan(key)->Next(0), but we wouldn't be able
// to exit early on equality and the result wouldn't even be correct.
// A concurrent insert might occur after FindLessThan(key) but before
// we get a chance to call Next(0).
Node* x = head_;
int level = GetMaxHeight() - 1;
Node* last_bigger = nullptr;
const DecodedKey key_decoded = compare_.decode_key(key);
while (true) {
Node* next = x->Next(level);
if (next != nullptr) {
PREFETCH(next->Next(level), 0, 1);
}
// Make sure the lists are sorted
assert(x == head_ || next == nullptr || KeyIsAfterNode(next->Key(), x));
// Make sure we haven't overshot during our search
assert(x == head_ || KeyIsAfterNode(key_decoded, x));
int cmp = (next == nullptr || next == last_bigger)
? 1
: compare_(next->Key(), key_decoded);
if (cmp == 0 || (cmp > 0 && level == 0)) {
return next;
} else if (cmp < 0) {
// Keep searching in this list
x = next;
} else {
// Switch to next list, reuse compare_() result
last_bigger = next;
level--;
}
}
}
template <class Comparator>
typename InlineSkipList<Comparator>::Node*
InlineSkipList<Comparator>::FindLessThan(const char* key, Node** prev) const {
return FindLessThan(key, prev, head_, GetMaxHeight(), 0);
}
template <class Comparator>
typename InlineSkipList<Comparator>::Node*
InlineSkipList<Comparator>::FindLessThan(const char* key, Node** prev,
Node* root, int top_level,
int bottom_level) const {
assert(top_level > bottom_level);
int level = top_level - 1;
Node* x = root;
// KeyIsAfter(key, last_not_after) is definitely false
Node* last_not_after = nullptr;
const DecodedKey key_decoded = compare_.decode_key(key);
while (true) {
assert(x != nullptr);
Node* next = x->Next(level);
if (next != nullptr) {
PREFETCH(next->Next(level), 0, 1);
}
assert(x == head_ || next == nullptr || KeyIsAfterNode(next->Key(), x));
assert(x == head_ || KeyIsAfterNode(key_decoded, x));
if (next != last_not_after && KeyIsAfterNode(key_decoded, next)) {
// Keep searching in this list
assert(next != nullptr);
x = next;
} else {
if (prev != nullptr) {
prev[level] = x;
}
if (level == bottom_level) {
return x;
} else {
// Switch to next list, reuse KeyIsAfterNode() result
last_not_after = next;
level--;
}
}
}
}
template <class Comparator>
typename InlineSkipList<Comparator>::Node*
InlineSkipList<Comparator>::FindLast() const {
Node* x = head_;
int level = GetMaxHeight() - 1;
while (true) {
Node* next = x->Next(level);
if (next == nullptr) {
if (level == 0) {
return x;
} else {
// Switch to next list
level--;
}
} else {
x = next;
}
}
}
template <class Comparator>
uint64_t InlineSkipList<Comparator>::EstimateCount(const char* key) const {
uint64_t count = 0;
Node* x = head_;
int level = GetMaxHeight() - 1;
const DecodedKey key_decoded = compare_.decode_key(key);
while (true) {
assert(x == head_ || compare_(x->Key(), key_decoded) < 0);
Node* next = x->Next(level);
if (next != nullptr) {
PREFETCH(next->Next(level), 0, 1);
}
if (next == nullptr || compare_(next->Key(), key_decoded) >= 0) {
if (level == 0) {
return count;
} else {
// Switch to next list
count *= kBranching_;
level--;
}
} else {
x = next;
count++;
}
}
}
template <class Comparator>
InlineSkipList<Comparator>::InlineSkipList(const Comparator cmp,
Allocator* allocator,
int32_t max_height,
int32_t branching_factor)
: kMaxHeight_(static_cast<uint16_t>(max_height)),
kBranching_(static_cast<uint16_t>(branching_factor)),
kScaledInverseBranching_((Random::kMaxNext + 1) / kBranching_),
allocator_(allocator),
compare_(cmp),
head_(AllocateNode(0, max_height)),
max_height_(1),
seq_splice_(AllocateSplice()) {
assert(max_height > 0 && kMaxHeight_ == static_cast<uint32_t>(max_height));
assert(branching_factor > 1 &&
kBranching_ == static_cast<uint32_t>(branching_factor));
assert(kScaledInverseBranching_ > 0);
for (int i = 0; i < kMaxHeight_; ++i) {
head_->SetNext(i, nullptr);
}
}
template <class Comparator>
char* InlineSkipList<Comparator>::AllocateKey(size_t key_size) {
return const_cast<char*>(AllocateNode(key_size, RandomHeight())->Key());
}
template <class Comparator>
typename InlineSkipList<Comparator>::Node*
InlineSkipList<Comparator>::AllocateNode(size_t key_size, int height) {
auto prefix = sizeof(std::atomic<Node*>) * (height - 1);
// prefix is space for the height - 1 pointers that we store before
// the Node instance (next_[-(height - 1) .. -1]). Node starts at
// raw + prefix, and holds the bottom-mode (level 0) skip list pointer
// next_[0]. key_size is the bytes for the key, which comes just after
// the Node.
char* raw = allocator_->AllocateAligned(prefix + sizeof(Node) + key_size);
Node* x = reinterpret_cast<Node*>(raw + prefix);
// Once we've linked the node into the skip list we don't actually need
// to know its height, because we can implicitly use the fact that we
// traversed into a node at level h to known that h is a valid level
// for that node. We need to convey the height to the Insert step,
// however, so that it can perform the proper links. Since we're not
// using the pointers at the moment, StashHeight temporarily borrow
// storage from next_[0] for that purpose.
x->StashHeight(height);
return x;
}
template <class Comparator>
typename InlineSkipList<Comparator>::Splice*
InlineSkipList<Comparator>::AllocateSplice() {
// size of prev_ and next_
size_t array_size = sizeof(Node*) * (kMaxHeight_ + 1);
char* raw = allocator_->AllocateAligned(sizeof(Splice) + array_size * 2);
Splice* splice = reinterpret_cast<Splice*>(raw);
splice->height_ = 0;
splice->prev_ = reinterpret_cast<Node**>(raw + sizeof(Splice));
splice->next_ = reinterpret_cast<Node**>(raw + sizeof(Splice) + array_size);
return splice;
}
template <class Comparator>
bool InlineSkipList<Comparator>::Insert(const char* key) {
return Insert<false>(key, seq_splice_, false);
}
template <class Comparator>
bool InlineSkipList<Comparator>::InsertConcurrently(const char* key) {
Node* prev[kMaxPossibleHeight];
Node* next[kMaxPossibleHeight];
Splice splice;
splice.prev_ = prev;
splice.next_ = next;
return Insert<true>(key, &splice, false);
}
template <class Comparator>
bool InlineSkipList<Comparator>::InsertWithHint(const char* key, void** hint) {
assert(hint != nullptr);
Splice* splice = reinterpret_cast<Splice*>(*hint);
if (splice == nullptr) {
splice = AllocateSplice();
*hint = reinterpret_cast<void*>(splice);
}
return Insert<false>(key, splice, true);
}
template <class Comparator>
template <bool prefetch_before>
void InlineSkipList<Comparator>::FindSpliceForLevel(const DecodedKey& key,
Node* before, Node* after,
int level, Node** out_prev,
Node** out_next) {
while (true) {
Node* next = before->Next(level);
if (next != nullptr) {
PREFETCH(next->Next(level), 0, 1);
}
if (prefetch_before == true) {
if (next != nullptr && level>0) {
PREFETCH(next->Next(level-1), 0, 1);
}
}
assert(before == head_ || next == nullptr ||
KeyIsAfterNode(next->Key(), before));
assert(before == head_ || KeyIsAfterNode(key, before));
if (next == after || !KeyIsAfterNode(key, next)) {
// found it
*out_prev = before;
*out_next = next;
return;
}
before = next;
}
}
template <class Comparator>
void InlineSkipList<Comparator>::RecomputeSpliceLevels(const DecodedKey& key,
Splice* splice,
int recompute_level) {
assert(recompute_level > 0);
assert(recompute_level <= splice->height_);
for (int i = recompute_level - 1; i >= 0; --i) {
FindSpliceForLevel<true>(key, splice->prev_[i + 1], splice->next_[i + 1], i,
&splice->prev_[i], &splice->next_[i]);
}
}
template <class Comparator>
template <bool UseCAS>
bool InlineSkipList<Comparator>::Insert(const char* key, Splice* splice,
bool allow_partial_splice_fix) {
Node* x = reinterpret_cast<Node*>(const_cast<char*>(key)) - 1;
const DecodedKey key_decoded = compare_.decode_key(key);
int height = x->UnstashHeight();
assert(height >= 1 && height <= kMaxHeight_);
int max_height = max_height_.load(std::memory_order_relaxed);
while (height > max_height) {
if (max_height_.compare_exchange_weak(max_height, height)) {
// successfully updated it
max_height = height;
break;
}
// else retry, possibly exiting the loop because somebody else
// increased it
}
assert(max_height <= kMaxPossibleHeight);
int recompute_height = 0;
if (splice->height_ < max_height) {
// Either splice has never been used or max_height has grown since
// last use. We could potentially fix it in the latter case, but
// that is tricky.
splice->prev_[max_height] = head_;
splice->next_[max_height] = nullptr;
splice->height_ = max_height;
recompute_height = max_height;
} else {
// Splice is a valid proper-height splice that brackets some
// key, but does it bracket this one? We need to validate it and
// recompute a portion of the splice (levels 0..recompute_height-1)
// that is a superset of all levels that don't bracket the new key.
// Several choices are reasonable, because we have to balance the work
// saved against the extra comparisons required to validate the Splice.
//
// One strategy is just to recompute all of orig_splice_height if the
// bottom level isn't bracketing. This pessimistically assumes that
// we will either get a perfect Splice hit (increasing sequential
// inserts) or have no locality.
//
// Another strategy is to walk up the Splice's levels until we find
// a level that brackets the key. This strategy lets the Splice
// hint help for other cases: it turns insertion from O(log N) into
// O(log D), where D is the number of nodes in between the key that
// produced the Splice and the current insert (insertion is aided
// whether the new key is before or after the splice). If you have
// a way of using a prefix of the key to map directly to the closest
// Splice out of O(sqrt(N)) Splices and we make it so that splices
// can also be used as hints during read, then we end up with Oshman's
// and Shavit's SkipTrie, which has O(log log N) lookup and insertion
// (compare to O(log N) for skip list).
//
// We control the pessimistic strategy with allow_partial_splice_fix.
// A good strategy is probably to be pessimistic for seq_splice_,
// optimistic if the caller actually went to the work of providing
// a Splice.
while (recompute_height < max_height) {
if (splice->prev_[recompute_height]->Next(recompute_height) !=
splice->next_[recompute_height]) {
// splice isn't tight at this level, there must have been some inserts
// to this
// location that didn't update the splice. We might only be a little
// stale, but if
// the splice is very stale it would be O(N) to fix it. We haven't used
// up any of
// our budget of comparisons, so always move up even if we are
// pessimistic about
// our chances of success.
++recompute_height;
} else if (splice->prev_[recompute_height] != head_ &&
!KeyIsAfterNode(key_decoded,
splice->prev_[recompute_height])) {
// key is from before splice
if (allow_partial_splice_fix) {
// skip all levels with the same node without more comparisons
Node* bad = splice->prev_[recompute_height];
while (splice->prev_[recompute_height] == bad) {
++recompute_height;
}
} else {
// we're pessimistic, recompute everything
recompute_height = max_height;
}
} else if (KeyIsAfterNode(key_decoded,
splice->next_[recompute_height])) {
// key is from after splice
if (allow_partial_splice_fix) {
Node* bad = splice->next_[recompute_height];
while (splice->next_[recompute_height] == bad) {
++recompute_height;
}
} else {
recompute_height = max_height;
}
} else {
// this level brackets the key, we won!
break;
}
}
}
assert(recompute_height <= max_height);
if (recompute_height > 0) {
RecomputeSpliceLevels(key_decoded, splice, recompute_height);
}
bool splice_is_valid = true;
if (UseCAS) {
for (int i = 0; i < height; ++i) {
while (true) {
// Checking for duplicate keys on the level 0 is sufficient
if (UNLIKELY(i == 0 && splice->next_[i] != nullptr &&
compare_(x->Key(), splice->next_[i]->Key()) >= 0)) {
// duplicate key
return false;
}
if (UNLIKELY(i == 0 && splice->prev_[i] != head_ &&
compare_(splice->prev_[i]->Key(), x->Key()) >= 0)) {
// duplicate key
return false;
}
assert(splice->next_[i] == nullptr ||
compare_(x->Key(), splice->next_[i]->Key()) < 0);
assert(splice->prev_[i] == head_ ||
compare_(splice->prev_[i]->Key(), x->Key()) < 0);
x->NoBarrier_SetNext(i, splice->next_[i]);
if (splice->prev_[i]->CASNext(i, splice->next_[i], x)) {
// success
break;
}
// CAS failed, we need to recompute prev and next. It is unlikely
// to be helpful to try to use a different level as we redo the
// search, because it should be unlikely that lots of nodes have
// been inserted between prev[i] and next[i]. No point in using
// next[i] as the after hint, because we know it is stale.
FindSpliceForLevel<false>(key_decoded, splice->prev_[i], nullptr, i,
&splice->prev_[i], &splice->next_[i]);
// Since we've narrowed the bracket for level i, we might have
// violated the Splice constraint between i and i-1. Make sure
// we recompute the whole thing next time.
if (i > 0) {
splice_is_valid = false;
}
}
}
} else {
for (int i = 0; i < height; ++i) {
if (i >= recompute_height &&
splice->prev_[i]->Next(i) != splice->next_[i]) {
FindSpliceForLevel<false>(key_decoded, splice->prev_[i], nullptr, i,
&splice->prev_[i], &splice->next_[i]);
}
// Checking for duplicate keys on the level 0 is sufficient
if (UNLIKELY(i == 0 && splice->next_[i] != nullptr &&
compare_(x->Key(), splice->next_[i]->Key()) >= 0)) {
// duplicate key
return false;
}
if (UNLIKELY(i == 0 && splice->prev_[i] != head_ &&
compare_(splice->prev_[i]->Key(), x->Key()) >= 0)) {
// duplicate key
return false;
}
assert(splice->next_[i] == nullptr ||
compare_(x->Key(), splice->next_[i]->Key()) < 0);
assert(splice->prev_[i] == head_ ||
compare_(splice->prev_[i]->Key(), x->Key()) < 0);
assert(splice->prev_[i]->Next(i) == splice->next_[i]);
x->NoBarrier_SetNext(i, splice->next_[i]);
splice->prev_[i]->SetNext(i, x);
}
}
if (splice_is_valid) {
for (int i = 0; i < height; ++i) {
splice->prev_[i] = x;
}
assert(splice->prev_[splice->height_] == head_);
assert(splice->next_[splice->height_] == nullptr);
for (int i = 0; i < splice->height_; ++i) {
assert(splice->next_[i] == nullptr ||
compare_(key, splice->next_[i]->Key()) < 0);
assert(splice->prev_[i] == head_ ||
compare_(splice->prev_[i]->Key(), key) <= 0);
assert(splice->prev_[i + 1] == splice->prev_[i] ||
splice->prev_[i + 1] == head_ ||
compare_(splice->prev_[i + 1]->Key(), splice->prev_[i]->Key()) <
0);
assert(splice->next_[i + 1] == splice->next_[i] ||
splice->next_[i + 1] == nullptr ||
compare_(splice->next_[i]->Key(), splice->next_[i + 1]->Key()) <
0);
}
} else {
splice->height_ = 0;
}
return true;
}
template <class Comparator>
bool InlineSkipList<Comparator>::Contains(const char* key) const {
Node* x = FindGreaterOrEqual(key);
if (x != nullptr && Equal(key, x->Key())) {
return true;
} else {
return false;
}
}
template <class Comparator>
void InlineSkipList<Comparator>::TEST_Validate() const {
// Interate over all levels at the same time, and verify nodes appear in
// the right order, and nodes appear in upper level also appear in lower
// levels.
Node* nodes[kMaxPossibleHeight];
int max_height = GetMaxHeight();
assert(max_height > 0);
for (int i = 0; i < max_height; i++) {
nodes[i] = head_;
}
while (nodes[0] != nullptr) {
Node* l0_next = nodes[0]->Next(0);
if (l0_next == nullptr) {
break;
}
assert(nodes[0] == head_ || compare_(nodes[0]->Key(), l0_next->Key()) < 0);
nodes[0] = l0_next;
int i = 1;
while (i < max_height) {
Node* next = nodes[i]->Next(i);
if (next == nullptr) {
break;
}
auto cmp = compare_(nodes[0]->Key(), next->Key());
assert(cmp <= 0);
if (cmp == 0) {
assert(next == nodes[0]);
nodes[i] = next;
} else {
break;
}
i++;
}
}
for (int i = 1; i < max_height; i++) {
assert(nodes[i] != nullptr && nodes[i]->Next(i) == nullptr);
}
}
} // namespace rocksdb
| {
"pile_set_name": "Github"
} |
/*
* init/noinitramfs.c
*
* Copyright (C) 2006, NXP Semiconductors, All Rights Reserved
* Author: Jean-Paul Saman <[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; 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <linux/init.h>
#include <linux/stat.h>
#include <linux/kdev_t.h>
#include <linux/syscalls.h>
#include <linux/kconfig.h>
#include <linux/initramfs.h>
/*
* Create a simple rootfs that is similar to the default initramfs
*/
#if !IS_BUILTIN(CONFIG_BLK_DEV_INITRD)
static
#endif
int __init default_rootfs(void)
{
int err;
err = sys_mkdir((const char __user __force *) "/dev", 0755);
if (err < 0)
goto out;
err = sys_mknod((const char __user __force *) "/dev/console",
S_IFCHR | S_IRUSR | S_IWUSR,
new_encode_dev(MKDEV(5, 1)));
if (err < 0)
goto out;
err = sys_mkdir((const char __user __force *) "/root", 0700);
if (err < 0)
goto out;
return 0;
out:
printk(KERN_WARNING "Failed to create a rootfs\n");
return err;
}
#if !IS_BUILTIN(CONFIG_BLK_DEV_INITRD)
rootfs_initcall(default_rootfs);
#endif
| {
"pile_set_name": "Github"
} |
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (14.0.1) on Fri Jul 17 14:15:42 EDT 2020 -->
<title>oracle.kubernetes.operator.helpers Class Hierarchy (weblogic-kubernetes-operator 3.0.0 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2020-07-17">
<meta name="description" content="tree: package: oracle.kubernetes.operator.helpers">
<meta name="generator" content="javadoc/PackageTreeWriter">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../script-dir/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
<script type="text/javascript" src="../../../../script-dir/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../script-dir/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../script-dir/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../script-dir/jquery-3.4.1.js"></script>
<script type="text/javascript" src="../../../../script-dir/jquery-ui.js"></script>
</head>
<body class="package-tree">
<script type="text/javascript">var pathtoroot = "../../../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flexBox">
<header role="banner" class="flexHeader">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li>Class</li>
<li>Use</li>
<li class="navBarCell1Rev">Tree</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">
<div class="navListSearch"><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="skipNav"><a id="skip.navbar.top">
<!-- -->
</a></div>
</nav>
</header>
<div class="flexContent">
<main role="main">
<div class="header">
<h1 class="title">Hierarchy For Package oracle.kubernetes.operator.helpers</h1>
<span class="packageHierarchyLabel">Package Hierarchies:</span>
<ul class="horizontal">
<li><a href="../../../../overview-tree.html">All Packages</a></li>
</ul>
</div>
<div class="contentContainer">
<section class="hierarchy">
<h2 title="Class Hierarchy">Class Hierarchy</h2>
<ul>
<li class="circle">java.lang.Object
<ul>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="AnnotationHelper.html" title="class in oracle.kubernetes.operator.helpers"><span class="typeNameLink">AnnotationHelper</span></a></li>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="AuthenticationProxy.html" title="class in oracle.kubernetes.operator.helpers"><span class="typeNameLink">AuthenticationProxy</span></a></li>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="AuthorizationProxy.html" title="class in oracle.kubernetes.operator.helpers"><span class="typeNameLink">AuthorizationProxy</span></a></li>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="CallBuilder.html" title="class in oracle.kubernetes.operator.helpers"><span class="typeNameLink">CallBuilder</span></a></li>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="CallBuilderFactory.html" title="class in oracle.kubernetes.operator.helpers"><span class="typeNameLink">CallBuilderFactory</span></a></li>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="ClusterConfig.html" title="class in oracle.kubernetes.operator.helpers"><span class="typeNameLink">ClusterConfig</span></a></li>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="ConfigMapConsumer.html" title="class in oracle.kubernetes.operator.helpers"><span class="typeNameLink">ConfigMapConsumer</span></a> (implements java.util.Map<K,​V>)</li>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="ConfigMapHelper.html" title="class in oracle.kubernetes.operator.helpers"><span class="typeNameLink">ConfigMapHelper</span></a></li>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="CrdHelper.html" title="class in oracle.kubernetes.operator.helpers"><span class="typeNameLink">CrdHelper</span></a></li>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="DomainConfig.html" title="class in oracle.kubernetes.operator.helpers"><span class="typeNameLink">DomainConfig</span></a></li>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="DomainPresenceInfo.html" title="class in oracle.kubernetes.operator.helpers"><span class="typeNameLink">DomainPresenceInfo</span></a></li>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="DomainPresenceInfo.ServerStartupInfo.html" title="class in oracle.kubernetes.operator.helpers"><span class="typeNameLink">DomainPresenceInfo.ServerStartupInfo</span></a></li>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="DomainStatusPatch.html" title="class in oracle.kubernetes.operator.helpers"><span class="typeNameLink">DomainStatusPatch</span></a></li>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="DomainTopology.html" title="class in oracle.kubernetes.operator.helpers"><span class="typeNameLink">DomainTopology</span></a></li>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="DomainValidationSteps.html" title="class in oracle.kubernetes.operator.helpers"><span class="typeNameLink">DomainValidationSteps</span></a></li>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="HealthCheckHelper.html" title="class in oracle.kubernetes.operator.helpers"><span class="typeNameLink">HealthCheckHelper</span></a></li>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="JobHelper.html" title="class in oracle.kubernetes.operator.helpers"><span class="typeNameLink">JobHelper</span></a></li>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="KubernetesUtils.html" title="class in oracle.kubernetes.operator.helpers"><span class="typeNameLink">KubernetesUtils</span></a></li>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="LastKnownStatus.html" title="class in oracle.kubernetes.operator.helpers"><span class="typeNameLink">LastKnownStatus</span></a></li>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="LegalNames.html" title="class in oracle.kubernetes.operator.helpers"><span class="typeNameLink">LegalNames</span></a></li>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="PodHelper.html" title="class in oracle.kubernetes.operator.helpers"><span class="typeNameLink">PodHelper</span></a></li>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="Pool.html" title="class in oracle.kubernetes.operator.helpers"><span class="typeNameLink">Pool</span></a><T>
<ul>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="ClientPool.html" title="class in oracle.kubernetes.operator.helpers"><span class="typeNameLink">ClientPool</span></a></li>
</ul>
</li>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="ResourceVersion.html" title="class in oracle.kubernetes.operator.helpers"><span class="typeNameLink">ResourceVersion</span></a> (implements java.lang.Comparable<T>)</li>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="RollingHelper.html" title="class in oracle.kubernetes.operator.helpers"><span class="typeNameLink">RollingHelper</span></a></li>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="SecretHelper.html" title="class in oracle.kubernetes.operator.helpers"><span class="typeNameLink">SecretHelper</span></a></li>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="SemanticVersion.html" title="class in oracle.kubernetes.operator.helpers"><span class="typeNameLink">SemanticVersion</span></a> (implements java.lang.Comparable<T>)
<ul>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="KubernetesVersion.html" title="class in oracle.kubernetes.operator.helpers"><span class="typeNameLink">KubernetesVersion</span></a></li>
</ul>
</li>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="ServerConfig.html" title="class in oracle.kubernetes.operator.helpers"><span class="typeNameLink">ServerConfig</span></a>
<ul>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="ClusteredServerConfig.html" title="class in oracle.kubernetes.operator.helpers"><span class="typeNameLink">ClusteredServerConfig</span></a></li>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="NonClusteredServerConfig.html" title="class in oracle.kubernetes.operator.helpers"><span class="typeNameLink">NonClusteredServerConfig</span></a></li>
</ul>
</li>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="ServiceHelper.html" title="class in oracle.kubernetes.operator.helpers"><span class="typeNameLink">ServiceHelper</span></a></li>
<li class="circle">oracle.kubernetes.operator.work.<a href="../work/Step.html" title="class in oracle.kubernetes.operator.work"><span class="typeNameLink">Step</span></a>
<ul>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="ResponseStep.html" title="class in oracle.kubernetes.operator.helpers"><span class="typeNameLink">ResponseStep</span></a><T></li>
</ul>
</li>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="StepContextBase.html" title="class in oracle.kubernetes.operator.helpers"><span class="typeNameLink">StepContextBase</span></a> (implements oracle.kubernetes.operator.helpers.<a href="StepContextConstants.html" title="interface in oracle.kubernetes.operator.helpers">StepContextConstants</a>)
<ul>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="BasePodStepContext.html" title="class in oracle.kubernetes.operator.helpers"><span class="typeNameLink">BasePodStepContext</span></a>
<ul>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="JobStepContext.html" title="class in oracle.kubernetes.operator.helpers"><span class="typeNameLink">JobStepContext</span></a></li>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="PodStepContext.html" title="class in oracle.kubernetes.operator.helpers"><span class="typeNameLink">PodStepContext</span></a></li>
</ul>
</li>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="ConfigMapHelper.IntrospectorConfigMapContext.html" title="class in oracle.kubernetes.operator.helpers"><span class="typeNameLink">ConfigMapHelper.IntrospectorConfigMapContext</span></a></li>
</ul>
</li>
</ul>
</li>
</ul>
</section>
<section class="hierarchy">
<h2 title="Interface Hierarchy">Interface Hierarchy</h2>
<ul>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="AsyncRequestStepFactory.html" title="interface in oracle.kubernetes.operator.helpers"><span class="typeNameLink">AsyncRequestStepFactory</span></a></li>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="ConflictRetry.html" title="interface in oracle.kubernetes.operator.helpers"><span class="typeNameLink">ConflictRetry</span></a><T></li>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="StepContextConstants.html" title="interface in oracle.kubernetes.operator.helpers"><span class="typeNameLink">StepContextConstants</span></a></li>
<li class="circle">java.util.function.Supplier<T>
<ul>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="ClientFactory.html" title="interface in oracle.kubernetes.operator.helpers"><span class="typeNameLink">ClientFactory</span></a></li>
</ul>
</li>
</ul>
</section>
<section class="hierarchy">
<h2 title="Enum Hierarchy">Enum Hierarchy</h2>
<ul>
<li class="circle">java.lang.Object
<ul>
<li class="circle">java.lang.Enum<E> (implements java.lang.Comparable<T>, java.lang.constant.Constable, java.io.Serializable)
<ul>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="AuthorizationProxy.Operation.html" title="enum in oracle.kubernetes.operator.helpers"><span class="typeNameLink">AuthorizationProxy.Operation</span></a></li>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="AuthorizationProxy.Resource.html" title="enum in oracle.kubernetes.operator.helpers"><span class="typeNameLink">AuthorizationProxy.Resource</span></a></li>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="AuthorizationProxy.Scope.html" title="enum in oracle.kubernetes.operator.helpers"><span class="typeNameLink">AuthorizationProxy.Scope</span></a></li>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="OperatorServiceType.html" title="enum in oracle.kubernetes.operator.helpers"><span class="typeNameLink">OperatorServiceType</span></a></li>
<li class="circle">oracle.kubernetes.operator.helpers.<a href="SecretType.html" title="enum in oracle.kubernetes.operator.helpers"><span class="typeNameLink">SecretType</span></a></li>
</ul>
</li>
</ul>
</li>
</ul>
</section>
</div>
</main>
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li>Class</li>
<li>Use</li>
<li class="navBarCell1Rev">Tree</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>
<a id="skip.navbar.bottom">
<!-- -->
</a>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
<p class="legalCopy"><small>Copyright © 2017–2020. All rights reserved.</small></p>
</footer>
</div>
</div>
</body>
</html>
| {
"pile_set_name": "Github"
} |
// Copyright 2016 The Draco Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// 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.
//
#ifndef DRACO_COMPRESSION_ENTROPY_SHANNON_ENTROPY_H_
#define DRACO_COMPRESSION_ENTROPY_SHANNON_ENTROPY_H_
#include <stdint.h>
#include <vector>
namespace draco {
// Computes an approximate Shannon entropy of symbols stored in the provided
// input array |symbols|. The entropy corresponds to the number of bits that is
// required to represent/store all the symbols using an optimal entropy coding
// algorithm. See for example "A mathematical theory of communication" by
// Shannon'48 (http://ieeexplore.ieee.org/document/6773024/).
//
// |max_value| is a required input that define the maximum value in the input
// |symbols| array.
//
// |out_num_unique_symbols| is an optional output argument that stores the
// number of unique symbols contained within the |symbols| array.
// TODO(ostava): This should be renamed or the return value should be changed to
// return the actual entropy and not the number of bits needed to represent the
// input symbols.
int64_t ComputeShannonEntropy(const uint32_t *symbols, int num_symbols,
int max_value, int *out_num_unique_symbols);
// Computes the Shannon entropy of |num_values| Boolean entries, where
// |num_true_values| are set to true.
// Returns entropy between 0-1.
double ComputeBinaryShannonEntropy(uint32_t num_values,
uint32_t num_true_values);
// Class that can be used to keep track of the Shannon entropy on streamed data.
// As new symbols are pushed to the tracker, the entropy is automatically
// recomputed. The class also support recomputing the entropy without actually
// pushing the symbols to the tracker through the Peek() method.
class ShannonEntropyTracker {
public:
ShannonEntropyTracker();
// Struct for holding entropy data about the symbols added to the tracker.
// It can be used to compute the number of bits needed to store the data using
// the method:
// ShannonEntropyTracker::GetNumberOfDataBits(entropy_data);
// or to compute the approximate size of the frequency table needed by the
// rans coding using method:
// ShannonEntropyTracker::GetNumberOfRAnsTableBits(entropy_data);
struct EntropyData {
double entropy_norm;
int num_values;
int max_symbol;
int num_unique_symbols;
EntropyData()
: entropy_norm(0.0),
num_values(0),
max_symbol(0),
num_unique_symbols(0) {}
};
// Adds new symbols to the tracker and recomputes the entropy accordingly.
EntropyData Push(const uint32_t *symbols, int num_symbols);
// Returns new entropy data for the tracker as if |symbols| were added to the
// tracker without actually changing the status of the tracker.
EntropyData Peek(const uint32_t *symbols, int num_symbols);
// Gets the number of bits needed for encoding symbols added to the tracker.
int64_t GetNumberOfDataBits() const {
return GetNumberOfDataBits(entropy_data_);
}
// Gets the number of bits needed for encoding frequency table using the rans
// encoder.
int64_t GetNumberOfRAnsTableBits() const {
return GetNumberOfRAnsTableBits(entropy_data_);
}
// Gets the number of bits needed for encoding given |entropy_data|.
static int64_t GetNumberOfDataBits(const EntropyData &entropy_data);
// Gets the number of bits needed for encoding frequency table using the rans
// encoder for the given |entropy_data|.
static int64_t GetNumberOfRAnsTableBits(const EntropyData &entropy_data);
private:
EntropyData UpdateSymbols(const uint32_t *symbols, int num_symbols,
bool push_changes);
std::vector<int32_t> frequencies_;
EntropyData entropy_data_;
};
} // namespace draco
#endif // DRACO_COMPRESSION_ENTROPY_SHANNON_ENTROPY_H_
| {
"pile_set_name": "Github"
} |
<?php
/////////////////////////////////////////////////////////////////
/// getID3() by James Heinrich <[email protected]> //
// available at http://getid3.sourceforge.net //
// or http://www.getid3.org //
// also https://github.com/JamesHeinrich/getID3 //
/////////////////////////////////////////////////////////////////
// See readme.txt for more details //
/////////////////////////////////////////////////////////////////
// //
// module.audio.ac3.php //
// module for analyzing AC-3 (aka Dolby Digital) audio files //
// dependencies: NONE //
// ///
/////////////////////////////////////////////////////////////////
class getid3_ac3 extends getid3_handler
{
private $AC3header = array();
private $BSIoffset = 0;
const syncword = "\x0B\x77";
public function Analyze() {
$info = &$this->getid3->info;
///AH
$info['ac3']['raw']['bsi'] = array();
$thisfile_ac3 = &$info['ac3'];
$thisfile_ac3_raw = &$thisfile_ac3['raw'];
$thisfile_ac3_raw_bsi = &$thisfile_ac3_raw['bsi'];
// http://www.atsc.org/standards/a_52a.pdf
$info['fileformat'] = 'ac3';
// An AC-3 serial coded audio bit stream is made up of a sequence of synchronization frames
// Each synchronization frame contains 6 coded audio blocks (AB), each of which represent 256
// new audio samples per channel. A synchronization information (SI) header at the beginning
// of each frame contains information needed to acquire and maintain synchronization. A
// bit stream information (BSI) header follows SI, and contains parameters describing the coded
// audio service. The coded audio blocks may be followed by an auxiliary data (Aux) field. At the
// end of each frame is an error check field that includes a CRC word for error detection. An
// additional CRC word is located in the SI header, the use of which, by a decoder, is optional.
//
// syncinfo() | bsi() | AB0 | AB1 | AB2 | AB3 | AB4 | AB5 | Aux | CRC
// syncinfo() {
// syncword 16
// crc1 16
// fscod 2
// frmsizecod 6
// } /* end of syncinfo */
$this->fseek($info['avdataoffset']);
$this->AC3header['syncinfo'] = $this->fread(5);
if (strpos($this->AC3header['syncinfo'], self::syncword) === 0) {
$thisfile_ac3_raw['synchinfo']['synchword'] = self::syncword;
$offset = 2;
} else {
if (!$this->isDependencyFor('matroska')) {
unset($info['fileformat'], $info['ac3']);
return $this->error('Expecting "'.getid3_lib::PrintHexBytes(self::syncword).'" at offset '.$info['avdataoffset'].', found "'.getid3_lib::PrintHexBytes(substr($this->AC3header['syncinfo'], 0, 2)).'"');
}
$offset = 0;
$this->fseek(-2, SEEK_CUR);
}
$info['audio']['dataformat'] = 'ac3';
$info['audio']['bitrate_mode'] = 'cbr';
$info['audio']['lossless'] = false;
$thisfile_ac3_raw['synchinfo']['crc1'] = getid3_lib::LittleEndian2Int(substr($this->AC3header['syncinfo'], $offset, 2));
$ac3_synchinfo_fscod_frmsizecod = getid3_lib::LittleEndian2Int(substr($this->AC3header['syncinfo'], ($offset + 2), 1));
$thisfile_ac3_raw['synchinfo']['fscod'] = ($ac3_synchinfo_fscod_frmsizecod & 0xC0) >> 6;
$thisfile_ac3_raw['synchinfo']['frmsizecod'] = ($ac3_synchinfo_fscod_frmsizecod & 0x3F);
$thisfile_ac3['sample_rate'] = self::sampleRateCodeLookup($thisfile_ac3_raw['synchinfo']['fscod']);
if ($thisfile_ac3_raw['synchinfo']['fscod'] <= 3) {
$info['audio']['sample_rate'] = $thisfile_ac3['sample_rate'];
}
$thisfile_ac3['frame_length'] = self::frameSizeLookup($thisfile_ac3_raw['synchinfo']['frmsizecod'], $thisfile_ac3_raw['synchinfo']['fscod']);
$thisfile_ac3['bitrate'] = self::bitrateLookup($thisfile_ac3_raw['synchinfo']['frmsizecod']);
$info['audio']['bitrate'] = $thisfile_ac3['bitrate'];
$this->AC3header['bsi'] = getid3_lib::BigEndian2Bin($this->fread(15));
$ac3_bsi_offset = 0;
$thisfile_ac3_raw_bsi['bsid'] = $this->readHeaderBSI(5);
if ($thisfile_ac3_raw_bsi['bsid'] > 8) {
// Decoders which can decode version 8 will thus be able to decode version numbers less than 8.
// If this standard is extended by the addition of additional elements or features, a value of bsid greater than 8 will be used.
// Decoders built to this version of the standard will not be able to decode versions with bsid greater than 8.
$this->error('Bit stream identification is version '.$thisfile_ac3_raw_bsi['bsid'].', but getID3() only understands up to version 8');
unset($info['ac3']);
return false;
}
$thisfile_ac3_raw_bsi['bsmod'] = $this->readHeaderBSI(3);
$thisfile_ac3_raw_bsi['acmod'] = $this->readHeaderBSI(3);
$thisfile_ac3['service_type'] = self::serviceTypeLookup($thisfile_ac3_raw_bsi['bsmod'], $thisfile_ac3_raw_bsi['acmod']);
$ac3_coding_mode = self::audioCodingModeLookup($thisfile_ac3_raw_bsi['acmod']);
foreach($ac3_coding_mode as $key => $value) {
$thisfile_ac3[$key] = $value;
}
switch ($thisfile_ac3_raw_bsi['acmod']) {
case 0:
case 1:
$info['audio']['channelmode'] = 'mono';
break;
case 3:
case 4:
$info['audio']['channelmode'] = 'stereo';
break;
default:
$info['audio']['channelmode'] = 'surround';
break;
}
$info['audio']['channels'] = $thisfile_ac3['num_channels'];
if ($thisfile_ac3_raw_bsi['acmod'] & 0x01) {
// If the lsb of acmod is a 1, center channel is in use and cmixlev follows in the bit stream.
$thisfile_ac3_raw_bsi['cmixlev'] = $this->readHeaderBSI(2);
$thisfile_ac3['center_mix_level'] = self::centerMixLevelLookup($thisfile_ac3_raw_bsi['cmixlev']);
}
if ($thisfile_ac3_raw_bsi['acmod'] & 0x04) {
// If the msb of acmod is a 1, surround channels are in use and surmixlev follows in the bit stream.
$thisfile_ac3_raw_bsi['surmixlev'] = $this->readHeaderBSI(2);
$thisfile_ac3['surround_mix_level'] = self::surroundMixLevelLookup($thisfile_ac3_raw_bsi['surmixlev']);
}
if ($thisfile_ac3_raw_bsi['acmod'] == 0x02) {
// When operating in the two channel mode, this 2-bit code indicates whether or not the program has been encoded in Dolby Surround.
$thisfile_ac3_raw_bsi['dsurmod'] = $this->readHeaderBSI(2);
$thisfile_ac3['dolby_surround_mode'] = self::dolbySurroundModeLookup($thisfile_ac3_raw_bsi['dsurmod']);
}
$thisfile_ac3_raw_bsi['lfeon'] = (bool) $this->readHeaderBSI(1);
$thisfile_ac3['lfe_enabled'] = $thisfile_ac3_raw_bsi['lfeon'];
if ($thisfile_ac3_raw_bsi['lfeon']) {
//$info['audio']['channels']++;
$info['audio']['channels'] .= '.1';
}
$thisfile_ac3['channels_enabled'] = self::channelsEnabledLookup($thisfile_ac3_raw_bsi['acmod'], $thisfile_ac3_raw_bsi['lfeon']);
// This indicates how far the average dialogue level is below digital 100 percent. Valid values are 1-31.
// The value of 0 is reserved. The values of 1 to 31 are interpreted as -1 dB to -31 dB with respect to digital 100 percent.
$thisfile_ac3_raw_bsi['dialnorm'] = $this->readHeaderBSI(5);
$thisfile_ac3['dialogue_normalization'] = '-'.$thisfile_ac3_raw_bsi['dialnorm'].'dB';
$thisfile_ac3_raw_bsi['compre_flag'] = (bool) $this->readHeaderBSI(1);
if ($thisfile_ac3_raw_bsi['compre_flag']) {
$thisfile_ac3_raw_bsi['compr'] = $this->readHeaderBSI(8);
$thisfile_ac3['heavy_compression'] = self::heavyCompression($thisfile_ac3_raw_bsi['compr']);
}
$thisfile_ac3_raw_bsi['langcode_flag'] = (bool) $this->readHeaderBSI(1);
if ($thisfile_ac3_raw_bsi['langcode_flag']) {
$thisfile_ac3_raw_bsi['langcod'] = $this->readHeaderBSI(8);
}
$thisfile_ac3_raw_bsi['audprodie'] = (bool) $this->readHeaderBSI(1);
if ($thisfile_ac3_raw_bsi['audprodie']) {
$thisfile_ac3_raw_bsi['mixlevel'] = $this->readHeaderBSI(5);
$thisfile_ac3_raw_bsi['roomtyp'] = $this->readHeaderBSI(2);
$thisfile_ac3['mixing_level'] = (80 + $thisfile_ac3_raw_bsi['mixlevel']).'dB';
$thisfile_ac3['room_type'] = self::roomTypeLookup($thisfile_ac3_raw_bsi['roomtyp']);
}
if ($thisfile_ac3_raw_bsi['acmod'] == 0x00) {
// If acmod is 0, then two completely independent program channels (dual mono)
// are encoded into the bit stream, and are referenced as Ch1, Ch2. In this case,
// a number of additional items are present in BSI or audblk to fully describe Ch2.
// This indicates how far the average dialogue level is below digital 100 percent. Valid values are 1-31.
// The value of 0 is reserved. The values of 1 to 31 are interpreted as -1 dB to -31 dB with respect to digital 100 percent.
$thisfile_ac3_raw_bsi['dialnorm2'] = $this->readHeaderBSI(5);
$thisfile_ac3['dialogue_normalization2'] = '-'.$thisfile_ac3_raw_bsi['dialnorm2'].'dB';
$thisfile_ac3_raw_bsi['compre_flag2'] = (bool) $this->readHeaderBSI(1);
if ($thisfile_ac3_raw_bsi['compre_flag2']) {
$thisfile_ac3_raw_bsi['compr2'] = $this->readHeaderBSI(8);
$thisfile_ac3['heavy_compression2'] = self::heavyCompression($thisfile_ac3_raw_bsi['compr2']);
}
$thisfile_ac3_raw_bsi['langcode_flag2'] = (bool) $this->readHeaderBSI(1);
if ($thisfile_ac3_raw_bsi['langcode_flag2']) {
$thisfile_ac3_raw_bsi['langcod2'] = $this->readHeaderBSI(8);
}
$thisfile_ac3_raw_bsi['audprodie2'] = (bool) $this->readHeaderBSI(1);
if ($thisfile_ac3_raw_bsi['audprodie2']) {
$thisfile_ac3_raw_bsi['mixlevel2'] = $this->readHeaderBSI(5);
$thisfile_ac3_raw_bsi['roomtyp2'] = $this->readHeaderBSI(2);
$thisfile_ac3['mixing_level2'] = (80 + $thisfile_ac3_raw_bsi['mixlevel2']).'dB';
$thisfile_ac3['room_type2'] = self::roomTypeLookup($thisfile_ac3_raw_bsi['roomtyp2']);
}
}
$thisfile_ac3_raw_bsi['copyright'] = (bool) $this->readHeaderBSI(1);
$thisfile_ac3_raw_bsi['original'] = (bool) $this->readHeaderBSI(1);
$thisfile_ac3_raw_bsi['timecode1_flag'] = (bool) $this->readHeaderBSI(1);
if ($thisfile_ac3_raw_bsi['timecode1_flag']) {
$thisfile_ac3_raw_bsi['timecode1'] = $this->readHeaderBSI(14);
}
$thisfile_ac3_raw_bsi['timecode2_flag'] = (bool) $this->readHeaderBSI(1);
if ($thisfile_ac3_raw_bsi['timecode2_flag']) {
$thisfile_ac3_raw_bsi['timecode2'] = $this->readHeaderBSI(14);
}
$thisfile_ac3_raw_bsi['addbsi_flag'] = (bool) $this->readHeaderBSI(1);
if ($thisfile_ac3_raw_bsi['addbsi_flag']) {
$thisfile_ac3_raw_bsi['addbsi_length'] = $this->readHeaderBSI(6);
$this->AC3header['bsi'] .= getid3_lib::BigEndian2Bin($this->fread($thisfile_ac3_raw_bsi['addbsi_length']));
$thisfile_ac3_raw_bsi['addbsi_data'] = substr($this->AC3header['bsi'], $this->BSIoffset, $thisfile_ac3_raw_bsi['addbsi_length'] * 8);
$this->BSIoffset += $thisfile_ac3_raw_bsi['addbsi_length'] * 8;
}
return true;
}
private function readHeaderBSI($length) {
$data = substr($this->AC3header['bsi'], $this->BSIoffset, $length);
$this->BSIoffset += $length;
return bindec($data);
}
public static function sampleRateCodeLookup($fscod) {
static $sampleRateCodeLookup = array(
0 => 48000,
1 => 44100,
2 => 32000,
3 => 'reserved' // If the reserved code is indicated, the decoder should not attempt to decode audio and should mute.
);
return (isset($sampleRateCodeLookup[$fscod]) ? $sampleRateCodeLookup[$fscod] : false);
}
public static function serviceTypeLookup($bsmod, $acmod) {
static $serviceTypeLookup = array();
if (empty($serviceTypeLookup)) {
for ($i = 0; $i <= 7; $i++) {
$serviceTypeLookup[0][$i] = 'main audio service: complete main (CM)';
$serviceTypeLookup[1][$i] = 'main audio service: music and effects (ME)';
$serviceTypeLookup[2][$i] = 'associated service: visually impaired (VI)';
$serviceTypeLookup[3][$i] = 'associated service: hearing impaired (HI)';
$serviceTypeLookup[4][$i] = 'associated service: dialogue (D)';
$serviceTypeLookup[5][$i] = 'associated service: commentary (C)';
$serviceTypeLookup[6][$i] = 'associated service: emergency (E)';
}
$serviceTypeLookup[7][1] = 'associated service: voice over (VO)';
for ($i = 2; $i <= 7; $i++) {
$serviceTypeLookup[7][$i] = 'main audio service: karaoke';
}
}
return (isset($serviceTypeLookup[$bsmod][$acmod]) ? $serviceTypeLookup[$bsmod][$acmod] : false);
}
public static function audioCodingModeLookup($acmod) {
// array(channel configuration, # channels (not incl LFE), channel order)
static $audioCodingModeLookup = array (
0 => array('channel_config'=>'1+1', 'num_channels'=>2, 'channel_order'=>'Ch1,Ch2'),
1 => array('channel_config'=>'1/0', 'num_channels'=>1, 'channel_order'=>'C'),
2 => array('channel_config'=>'2/0', 'num_channels'=>2, 'channel_order'=>'L,R'),
3 => array('channel_config'=>'3/0', 'num_channels'=>3, 'channel_order'=>'L,C,R'),
4 => array('channel_config'=>'2/1', 'num_channels'=>3, 'channel_order'=>'L,R,S'),
5 => array('channel_config'=>'3/1', 'num_channels'=>4, 'channel_order'=>'L,C,R,S'),
6 => array('channel_config'=>'2/2', 'num_channels'=>4, 'channel_order'=>'L,R,SL,SR'),
7 => array('channel_config'=>'3/2', 'num_channels'=>5, 'channel_order'=>'L,C,R,SL,SR'),
);
return (isset($audioCodingModeLookup[$acmod]) ? $audioCodingModeLookup[$acmod] : false);
}
public static function centerMixLevelLookup($cmixlev) {
static $centerMixLevelLookup;
if (empty($centerMixLevelLookup)) {
$centerMixLevelLookup = array(
0 => pow(2, -3.0 / 6), // 0.707 (-3.0 dB)
1 => pow(2, -4.5 / 6), // 0.595 (-4.5 dB)
2 => pow(2, -6.0 / 6), // 0.500 (-6.0 dB)
3 => 'reserved'
);
}
return (isset($centerMixLevelLookup[$cmixlev]) ? $centerMixLevelLookup[$cmixlev] : false);
}
public static function surroundMixLevelLookup($surmixlev) {
static $surroundMixLevelLookup;
if (empty($surroundMixLevelLookup)) {
$surroundMixLevelLookup = array(
0 => pow(2, -3.0 / 6),
1 => pow(2, -6.0 / 6),
2 => 0,
3 => 'reserved'
);
}
return (isset($surroundMixLevelLookup[$surmixlev]) ? $surroundMixLevelLookup[$surmixlev] : false);
}
public static function dolbySurroundModeLookup($dsurmod) {
static $dolbySurroundModeLookup = array(
0 => 'not indicated',
1 => 'Not Dolby Surround encoded',
2 => 'Dolby Surround encoded',
3 => 'reserved'
);
return (isset($dolbySurroundModeLookup[$dsurmod]) ? $dolbySurroundModeLookup[$dsurmod] : false);
}
public static function channelsEnabledLookup($acmod, $lfeon) {
$lookup = array(
'ch1'=>(bool) ($acmod == 0),
'ch2'=>(bool) ($acmod == 0),
'left'=>(bool) ($acmod > 1),
'right'=>(bool) ($acmod > 1),
'center'=>(bool) ($acmod & 0x01),
'surround_mono'=>false,
'surround_left'=>false,
'surround_right'=>false,
'lfe'=>$lfeon);
switch ($acmod) {
case 4:
case 5:
$lookup['surround_mono'] = true;
break;
case 6:
case 7:
$lookup['surround_left'] = true;
$lookup['surround_right'] = true;
break;
}
return $lookup;
}
public static function heavyCompression($compre) {
// The first four bits indicate gain changes in 6.02dB increments which can be
// implemented with an arithmetic shift operation. The following four bits
// indicate linear gain changes, and require a 5-bit multiply.
// We will represent the two 4-bit fields of compr as follows:
// X0 X1 X2 X3 . Y4 Y5 Y6 Y7
// The meaning of the X values is most simply described by considering X to represent a 4-bit
// signed integer with values from -8 to +7. The gain indicated by X is then (X + 1) * 6.02 dB. The
// following table shows this in detail.
// Meaning of 4 msb of compr
// 7 +48.16 dB
// 6 +42.14 dB
// 5 +36.12 dB
// 4 +30.10 dB
// 3 +24.08 dB
// 2 +18.06 dB
// 1 +12.04 dB
// 0 +6.02 dB
// -1 0 dB
// -2 -6.02 dB
// -3 -12.04 dB
// -4 -18.06 dB
// -5 -24.08 dB
// -6 -30.10 dB
// -7 -36.12 dB
// -8 -42.14 dB
$fourbit = str_pad(decbin(($compre & 0xF0) >> 4), 4, '0', STR_PAD_LEFT);
if ($fourbit{0} == '1') {
$log_gain = -8 + bindec(substr($fourbit, 1));
} else {
$log_gain = bindec(substr($fourbit, 1));
}
$log_gain = ($log_gain + 1) * getid3_lib::RGADamplitude2dB(2);
// The value of Y is a linear representation of a gain change of up to -6 dB. Y is considered to
// be an unsigned fractional integer, with a leading value of 1, or: 0.1 Y4 Y5 Y6 Y7 (base 2). Y can
// represent values between 0.111112 (or 31/32) and 0.100002 (or 1/2). Thus, Y can represent gain
// changes from -0.28 dB to -6.02 dB.
$lin_gain = (16 + ($compre & 0x0F)) / 32;
// The combination of X and Y values allows compr to indicate gain changes from
// 48.16 - 0.28 = +47.89 dB, to
// -42.14 - 6.02 = -48.16 dB.
return $log_gain - $lin_gain;
}
public static function roomTypeLookup($roomtyp) {
static $roomTypeLookup = array(
0 => 'not indicated',
1 => 'large room, X curve monitor',
2 => 'small room, flat monitor',
3 => 'reserved'
);
return (isset($roomTypeLookup[$roomtyp]) ? $roomTypeLookup[$roomtyp] : false);
}
public static function frameSizeLookup($frmsizecod, $fscod) {
$padding = (bool) ($frmsizecod % 2);
$framesizeid = floor($frmsizecod / 2);
static $frameSizeLookup = array();
if (empty($frameSizeLookup)) {
$frameSizeLookup = array (
0 => array(128, 138, 192),
1 => array(40, 160, 174, 240),
2 => array(48, 192, 208, 288),
3 => array(56, 224, 242, 336),
4 => array(64, 256, 278, 384),
5 => array(80, 320, 348, 480),
6 => array(96, 384, 416, 576),
7 => array(112, 448, 486, 672),
8 => array(128, 512, 556, 768),
9 => array(160, 640, 696, 960),
10 => array(192, 768, 834, 1152),
11 => array(224, 896, 974, 1344),
12 => array(256, 1024, 1114, 1536),
13 => array(320, 1280, 1392, 1920),
14 => array(384, 1536, 1670, 2304),
15 => array(448, 1792, 1950, 2688),
16 => array(512, 2048, 2228, 3072),
17 => array(576, 2304, 2506, 3456),
18 => array(640, 2560, 2786, 3840)
);
}
if (($fscod == 1) && $padding) {
// frame lengths are padded by 1 word (16 bits) at 44100
$frameSizeLookup[$frmsizecod] += 2;
}
return (isset($frameSizeLookup[$framesizeid][$fscod]) ? $frameSizeLookup[$framesizeid][$fscod] : false);
}
public static function bitrateLookup($frmsizecod) {
$framesizeid = floor($frmsizecod / 2);
static $bitrateLookup = array(
0 => 32000,
1 => 40000,
2 => 48000,
3 => 56000,
4 => 64000,
5 => 80000,
6 => 96000,
7 => 112000,
8 => 128000,
9 => 160000,
10 => 192000,
11 => 224000,
12 => 256000,
13 => 320000,
14 => 384000,
15 => 448000,
16 => 512000,
17 => 576000,
18 => 640000
);
return (isset($bitrateLookup[$framesizeid]) ? $bitrateLookup[$framesizeid] : false);
}
}
| {
"pile_set_name": "Github"
} |
# Copyright 1998-2019 Lawrence Livermore National Security, LLC and other
# HYPRE Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
add_definitions (-DHYPRE_TIMING)
if (MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif ()
set(TEST_SRCS
ij.c
sstruct.c
struct.c
ams_driver.c
maxwell_unscaled.c
struct_migrate.c
sstruct_fac.c
ij_mv.c
)
add_hypre_executables(TEST_SRCS)
| {
"pile_set_name": "Github"
} |
/***************************************************************************/
/* */
/* ttpic.h */
/* */
/* The FreeType position independent code services for truetype module. */
/* */
/* Copyright 2009-2018 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* modified, and distributed under the terms of the FreeType project */
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
/* this file you indicate that you have read the license and */
/* understand and accept it fully. */
/* */
/***************************************************************************/
#ifndef TTPIC_H_
#define TTPIC_H_
#include FT_INTERNAL_PIC_H
#ifndef FT_CONFIG_OPTION_PIC
#define TT_SERVICES_GET tt_services
#define TT_SERVICE_GX_MULTI_MASTERS_GET tt_service_gx_multi_masters
#define TT_SERVICE_METRICS_VARIATIONS_GET tt_service_metrics_variations
#define TT_SERVICE_TRUETYPE_GLYF_GET tt_service_truetype_glyf
#define TT_SERVICE_PROPERTIES_GET tt_service_properties
#else /* FT_CONFIG_OPTION_PIC */
#include FT_MULTIPLE_MASTERS_H
#include FT_SERVICE_MULTIPLE_MASTERS_H
#include FT_SERVICE_METRICS_VARIATIONS_H
#include FT_SERVICE_TRUETYPE_GLYF_H
#include FT_SERVICE_PROPERTIES_H
FT_BEGIN_HEADER
typedef struct TTModulePIC_
{
FT_ServiceDescRec* tt_services;
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
FT_Service_MultiMastersRec tt_service_gx_multi_masters;
FT_Service_MetricsVariationsRec tt_service_metrics_variations;
#endif
FT_Service_TTGlyfRec tt_service_truetype_glyf;
FT_Service_PropertiesRec tt_service_properties;
} TTModulePIC;
#define GET_PIC( lib ) \
( (TTModulePIC*)((lib)->pic_container.truetype) )
#define TT_SERVICES_GET \
( GET_PIC( library )->tt_services )
#define TT_SERVICE_METRICS_VARIATIONS_GET \
( GET_PIC( library )->tt_service_metrics_variations )
#define TT_SERVICE_GX_MULTI_MASTERS_GET \
( GET_PIC( library )->tt_service_gx_multi_masters )
#define TT_SERVICE_TRUETYPE_GLYF_GET \
( GET_PIC( library )->tt_service_truetype_glyf )
#define TT_SERVICE_PROPERTIES_GET \
( GET_PIC( library )->tt_service_properties )
/* see ttpic.c for the implementation */
void
tt_driver_class_pic_free( FT_Library library );
FT_Error
tt_driver_class_pic_init( FT_Library library );
FT_END_HEADER
#endif /* FT_CONFIG_OPTION_PIC */
/* */
#endif /* TTPIC_H_ */
/* END */
| {
"pile_set_name": "Github"
} |
from collections import deque
class MovingAverage(object):
def __init__(self, size):
"""
Initialize your data structure here.
:type size: int
"""
self.size = size
self.nums = deque()
def next(self, val):
"""
:type val: int
:rtype: float
"""
if len(self.nums) >= self.size:
self.nums.popleft()
self.nums.append(val)
return float(float(sum(self.nums)) / float(len(self.nums)))
# Your MovingAverage object will be instantiated and called as such:
# obj = MovingAverage(size)
# param_1 = obj.next(val)
| {
"pile_set_name": "Github"
} |
// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package http2
import (
"net/http"
"strings"
)
var (
commonLowerHeader = map[string]string{} // Go-Canonical-Case -> lower-case
commonCanonHeader = map[string]string{} // lower-case -> Go-Canonical-Case
)
func init() {
for _, v := range []string{
"accept",
"accept-charset",
"accept-encoding",
"accept-language",
"accept-ranges",
"age",
"access-control-allow-origin",
"allow",
"authorization",
"cache-control",
"content-disposition",
"content-encoding",
"content-language",
"content-length",
"content-location",
"content-range",
"content-type",
"cookie",
"date",
"etag",
"expect",
"expires",
"from",
"host",
"if-match",
"if-modified-since",
"if-none-match",
"if-unmodified-since",
"last-modified",
"link",
"location",
"max-forwards",
"proxy-authenticate",
"proxy-authorization",
"range",
"referer",
"refresh",
"retry-after",
"server",
"set-cookie",
"strict-transport-security",
"trailer",
"transfer-encoding",
"user-agent",
"vary",
"via",
"www-authenticate",
} {
chk := http.CanonicalHeaderKey(v)
commonLowerHeader[chk] = v
commonCanonHeader[v] = chk
}
}
func lowerHeader(v string) string {
if s, ok := commonLowerHeader[v]; ok {
return s
}
return strings.ToLower(v)
}
| {
"pile_set_name": "Github"
} |
; RUN: opt -S -march=r600 -mcpu=cayman -loop-vectorize -force-vector-interleave=1 -force-vector-width=4 -dce -instcombine < %s | FileCheck %s
; Artificial datalayout
target datalayout = "e-p:32:32:32-p1:16:16:16-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-v16:16:16-v24:32:32-v32:32:32-v48:64:64-v64:64:64-v96:128:128-v128:128:128-v192:256:256-v256:256:256-v512:512:512-v1024:1024:1024-v2048:2048:2048-n32:64"
define void @add_ints_1_1_1(i32 addrspace(1)* %a, i32 addrspace(1)* %b, i32 addrspace(1)* %c) #0 {
; CHECK-LABEL: @add_ints_1_1_1(
; CHECK: <4 x i32>
; CHECK: ret
entry:
br label %for.body
for.body: ; preds = %entry, %for.body
%i.01 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%arrayidx = getelementptr inbounds i32, i32 addrspace(1)* %b, i64 %i.01
%0 = load i32, i32 addrspace(1)* %arrayidx, align 4
%arrayidx1 = getelementptr inbounds i32, i32 addrspace(1)* %c, i64 %i.01
%1 = load i32, i32 addrspace(1)* %arrayidx1, align 4
%add = add nsw i32 %0, %1
%arrayidx2 = getelementptr inbounds i32, i32 addrspace(1)* %a, i64 %i.01
store i32 %add, i32 addrspace(1)* %arrayidx2, align 4
%inc = add i64 %i.01, 1
%cmp = icmp ult i64 %inc, 200
br i1 %cmp, label %for.body, label %for.end
for.end: ; preds = %for.body
ret void
}
define void @add_ints_as_1_0_0(i32 addrspace(1)* %a, i32* %b, i32* %c) #0 {
; CHECK-LABEL: @add_ints_as_1_0_0(
; CHECK-NOT: <4 x i32>
; CHECK: ret
entry:
br label %for.body
for.body: ; preds = %entry, %for.body
%i.01 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%arrayidx = getelementptr inbounds i32, i32* %b, i64 %i.01
%0 = load i32, i32* %arrayidx, align 4
%arrayidx1 = getelementptr inbounds i32, i32* %c, i64 %i.01
%1 = load i32, i32* %arrayidx1, align 4
%add = add nsw i32 %0, %1
%arrayidx2 = getelementptr inbounds i32, i32 addrspace(1)* %a, i64 %i.01
store i32 %add, i32 addrspace(1)* %arrayidx2, align 4
%inc = add i64 %i.01, 1
%cmp = icmp ult i64 %inc, 200
br i1 %cmp, label %for.body, label %for.end
for.end: ; preds = %for.body
ret void
}
define void @add_ints_as_0_1_0(i32* %a, i32 addrspace(1)* %b, i32* %c) #0 {
; CHECK-LABEL: @add_ints_as_0_1_0(
; CHECK-NOT: <4 x i32>
; CHECK: ret
entry:
br label %for.body
for.body: ; preds = %entry, %for.body
%i.01 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%arrayidx = getelementptr inbounds i32, i32 addrspace(1)* %b, i64 %i.01
%0 = load i32, i32 addrspace(1)* %arrayidx, align 4
%arrayidx1 = getelementptr inbounds i32, i32* %c, i64 %i.01
%1 = load i32, i32* %arrayidx1, align 4
%add = add nsw i32 %0, %1
%arrayidx2 = getelementptr inbounds i32, i32* %a, i64 %i.01
store i32 %add, i32* %arrayidx2, align 4
%inc = add i64 %i.01, 1
%cmp = icmp ult i64 %inc, 200
br i1 %cmp, label %for.body, label %for.end
for.end: ; preds = %for.body
ret void
}
define void @add_ints_as_0_1_1(i32* %a, i32 addrspace(1)* %b, i32 addrspace(1)* %c) #0 {
; CHECK-LABEL: @add_ints_as_0_1_1(
; CHECK-NOT: <4 x i32>
; CHECK: ret
entry:
br label %for.body
for.body: ; preds = %entry, %for.body
%i.01 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%arrayidx = getelementptr inbounds i32, i32 addrspace(1)* %b, i64 %i.01
%0 = load i32, i32 addrspace(1)* %arrayidx, align 4
%arrayidx1 = getelementptr inbounds i32, i32 addrspace(1)* %c, i64 %i.01
%1 = load i32, i32 addrspace(1)* %arrayidx1, align 4
%add = add nsw i32 %0, %1
%arrayidx2 = getelementptr inbounds i32, i32* %a, i64 %i.01
store i32 %add, i32* %arrayidx2, align 4
%inc = add i64 %i.01, 1
%cmp = icmp ult i64 %inc, 200
br i1 %cmp, label %for.body, label %for.end
for.end: ; preds = %for.body
ret void
}
define void @add_ints_as_0_1_2(i32* %a, i32 addrspace(1)* %b, i32 addrspace(2)* %c) #0 {
; CHECK-LABEL: @add_ints_as_0_1_2(
; CHECK-NOT: <4 x i32>
; CHECK: ret
entry:
br label %for.body
for.body: ; preds = %entry, %for.body
%i.01 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%arrayidx = getelementptr inbounds i32, i32 addrspace(1)* %b, i64 %i.01
%0 = load i32, i32 addrspace(1)* %arrayidx, align 4
%arrayidx1 = getelementptr inbounds i32, i32 addrspace(2)* %c, i64 %i.01
%1 = load i32, i32 addrspace(2)* %arrayidx1, align 4
%add = add nsw i32 %0, %1
%arrayidx2 = getelementptr inbounds i32, i32* %a, i64 %i.01
store i32 %add, i32* %arrayidx2, align 4
%inc = add i64 %i.01, 1
%cmp = icmp ult i64 %inc, 200
br i1 %cmp, label %for.body, label %for.end
for.end: ; preds = %for.body
ret void
}
attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
| {
"pile_set_name": "Github"
} |
/*
Copyright 2014 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
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 runtime
import (
"fmt"
"reflect"
"k8s.io/apimachinery/pkg/runtime/schema"
)
type notRegisteredErr struct {
schemeName string
gvk schema.GroupVersionKind
target GroupVersioner
t reflect.Type
}
func NewNotRegisteredErrForKind(schemeName string, gvk schema.GroupVersionKind) error {
return ¬RegisteredErr{schemeName: schemeName, gvk: gvk}
}
func NewNotRegisteredErrForType(schemeName string, t reflect.Type) error {
return ¬RegisteredErr{schemeName: schemeName, t: t}
}
func NewNotRegisteredErrForTarget(schemeName string, t reflect.Type, target GroupVersioner) error {
return ¬RegisteredErr{schemeName: schemeName, t: t, target: target}
}
func NewNotRegisteredGVKErrForTarget(schemeName string, gvk schema.GroupVersionKind, target GroupVersioner) error {
return ¬RegisteredErr{schemeName: schemeName, gvk: gvk, target: target}
}
func (k *notRegisteredErr) Error() string {
if k.t != nil && k.target != nil {
return fmt.Sprintf("%v is not suitable for converting to %q in scheme %q", k.t, k.target, k.schemeName)
}
nullGVK := schema.GroupVersionKind{}
if k.gvk != nullGVK && k.target != nil {
return fmt.Sprintf("%q is not suitable for converting to %q in scheme %q", k.gvk.GroupVersion(), k.target, k.schemeName)
}
if k.t != nil {
return fmt.Sprintf("no kind is registered for the type %v in scheme %q", k.t, k.schemeName)
}
if len(k.gvk.Kind) == 0 {
return fmt.Sprintf("no version %q has been registered in scheme %q", k.gvk.GroupVersion(), k.schemeName)
}
if k.gvk.Version == APIVersionInternal {
return fmt.Sprintf("no kind %q is registered for the internal version of group %q in scheme %q", k.gvk.Kind, k.gvk.Group, k.schemeName)
}
return fmt.Sprintf("no kind %q is registered for version %q in scheme %q", k.gvk.Kind, k.gvk.GroupVersion(), k.schemeName)
}
// IsNotRegisteredError returns true if the error indicates the provided
// object or input data is not registered.
func IsNotRegisteredError(err error) bool {
if err == nil {
return false
}
_, ok := err.(*notRegisteredErr)
return ok
}
type missingKindErr struct {
data string
}
func NewMissingKindErr(data string) error {
return &missingKindErr{data}
}
func (k *missingKindErr) Error() string {
return fmt.Sprintf("Object 'Kind' is missing in '%s'", k.data)
}
// IsMissingKind returns true if the error indicates that the provided object
// is missing a 'Kind' field.
func IsMissingKind(err error) bool {
if err == nil {
return false
}
_, ok := err.(*missingKindErr)
return ok
}
type missingVersionErr struct {
data string
}
func NewMissingVersionErr(data string) error {
return &missingVersionErr{data}
}
func (k *missingVersionErr) Error() string {
return fmt.Sprintf("Object 'apiVersion' is missing in '%s'", k.data)
}
// IsMissingVersion returns true if the error indicates that the provided object
// is missing a 'Version' field.
func IsMissingVersion(err error) bool {
if err == nil {
return false
}
_, ok := err.(*missingVersionErr)
return ok
}
// strictDecodingError is a base error type that is returned by a strict Decoder such
// as UniversalStrictDecoder.
type strictDecodingError struct {
message string
data string
}
// NewStrictDecodingError creates a new strictDecodingError object.
func NewStrictDecodingError(message string, data string) error {
return &strictDecodingError{
message: message,
data: data,
}
}
func (e *strictDecodingError) Error() string {
return fmt.Sprintf("strict decoder error for %s: %s", e.data, e.message)
}
// IsStrictDecodingError returns true if the error indicates that the provided object
// strictness violations.
func IsStrictDecodingError(err error) bool {
if err == nil {
return false
}
_, ok := err.(*strictDecodingError)
return ok
}
| {
"pile_set_name": "Github"
} |
//
// SKCloudServiceSetupViewController.h
// StoreKit
//
// Copyright © 2016-2017 Apple Inc. All rights reserved.
//
#import <StoreKit/StoreKitDefines.h>
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
typedef NSString * SKCloudServiceSetupOptionsKey NS_STRING_ENUM;
typedef NSString * SKCloudServiceSetupAction NS_STRING_ENUM;
typedef NSString * SKCloudServiceSetupMessageIdentifier NS_STRING_ENUM;
@protocol SKCloudServiceSetupViewControllerDelegate;
/// View controller to allow user to setup iTunes Store account for cloud service, such as Apple Music subscription.
SK_EXTERN_CLASS_AVAILABLE(10_1) __TVOS_PROHIBITED @interface SKCloudServiceSetupViewController : UIViewController
/// Optional delegate.
@property (nonatomic, nullable, weak) id <SKCloudServiceSetupViewControllerDelegate> delegate;
/// Load cloud service setup view with the given options.
/// Block is invoked on the main thread when the load finishes.
- (void)loadWithOptions:(NSDictionary<SKCloudServiceSetupOptionsKey, id> *)options completionHandler:(nullable void (^)(BOOL result, NSError * _Nullable error))completionHandler;
@end
@protocol SKCloudServiceSetupViewControllerDelegate <NSObject>
@optional
/// Sent when the view controller was dismissed.
- (void)cloudServiceSetupViewControllerDidDismiss:(SKCloudServiceSetupViewController *)cloudServiceSetupViewController __TVOS_PROHIBITED NS_AVAILABLE_IOS(10_1);
@end
/// Action for setup entry point (of type SKCloudServiceSetupAction).
SK_EXTERN SKCloudServiceSetupOptionsKey const SKCloudServiceSetupOptionsActionKey NS_SWIFT_NAME(action) NS_AVAILABLE_IOS(10_1);
/// Identifier of the iTunes Store item the user is trying to access which requires cloud service setup (NSNumber).
SK_EXTERN SKCloudServiceSetupOptionsKey const SKCloudServiceSetupOptionsITunesItemIdentifierKey NS_SWIFT_NAME(iTunesItemIdentifier) NS_AVAILABLE_IOS(10_1);
/// iTunes Store affiliate token (NSString).
SK_EXTERN SKCloudServiceSetupOptionsKey const SKCloudServiceSetupOptionsAffiliateTokenKey NS_SWIFT_NAME(affiliateToken) NS_AVAILABLE_IOS(10_3);
/// iTunes Store affiliate campaign token (NSString).
SK_EXTERN SKCloudServiceSetupOptionsKey const SKCloudServiceSetupOptionsCampaignTokenKey NS_SWIFT_NAME(campaignToken) NS_AVAILABLE_IOS(10_3);
/// Identifier used to select the main message presented to the user for this setup view (SKCloudServiceSetupMessageIdentifier).
/// When missing, the setup view will be configured in a way that is equivalent to using SKCloudServiceSetupMessageIdentifierJoin.
SK_EXTERN SKCloudServiceSetupOptionsKey const SKCloudServiceSetupOptionsMessageIdentifierKey NS_SWIFT_NAME(messageIdentifier) NS_AVAILABLE_IOS(11_0);
// Supported actions for setup entry point.
SK_EXTERN SKCloudServiceSetupAction const SKCloudServiceSetupActionSubscribe NS_AVAILABLE_IOS(10_1);
// Supported message identifiers.
SK_EXTERN SKCloudServiceSetupMessageIdentifier const SKCloudServiceSetupMessageIdentifierJoin NS_AVAILABLE_IOS(11_0);
SK_EXTERN SKCloudServiceSetupMessageIdentifier const SKCloudServiceSetupMessageIdentifierConnect NS_AVAILABLE_IOS(11_0);
SK_EXTERN SKCloudServiceSetupMessageIdentifier const SKCloudServiceSetupMessageIdentifierAddMusic NS_AVAILABLE_IOS(11_0);
SK_EXTERN SKCloudServiceSetupMessageIdentifier const SKCloudServiceSetupMessageIdentifierPlayMusic NS_AVAILABLE_IOS(11_0);
NS_ASSUME_NONNULL_END
| {
"pile_set_name": "Github"
} |
/**
* @file oscserver.h
*
*/
/* Copyright (C) 2017-2020 by Arjan van Vught mailto:[email protected]
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef OSCSERVER_H_
#define OSCSERVER_H_
#include <stdint.h>
#include "oscserverhandler.h"
#include "lightset.h"
struct OscServerDefaultPort {
static constexpr auto INCOMING = 8000;
static constexpr auto OUTGOING = 9000;
};
struct OscServerMax {
static constexpr auto PATH_LENGTH = 128;
};
class OscServer {
public:
OscServer(void);
~OscServer(void);
void SetOscServerHandler(OscServerHandler *pOscServerHandler);
void SetOutput(LightSet *pLightSet);
void SetPortIncoming(uint16_t nPortIncoming = OscServerDefaultPort::INCOMING);
uint16_t GetPortIncoming(void) const;
void SetPortOutgoing(uint16_t nPortOutgoing = OscServerDefaultPort::OUTGOING);
uint16_t GetPortOutgoing(void) const;
void SetPath(const char *pPath);
const char *GetPath(void);
void SetPathInfo(const char *pPathInfo);
const char *GetPathInfo(void);
void SetPathBlackOut(const char *pPathBlackOut);
const char *GetPathBlackOut(void);
void SetPartialTransmission(bool bPartialTransmission = false);
bool IsPartialTransmission(void) const;
void SetEnableNoChangeUpdate(bool bEnableNoChangeUpdate) {
m_bEnableNoChangeUpdate = bEnableNoChangeUpdate;
}
bool GetEnableNoChangeUpdate(void) {
return m_bEnableNoChangeUpdate;
}
void Print(void);
void Start(void);
void Stop(void);
void Run(void);
private:
int GetChannel(const char *p);
bool IsDmxDataChanged(const uint8_t *pData, uint16_t nStartChannel, uint16_t nLength);
private:
uint16_t m_nPortIncoming = OscServerDefaultPort::INCOMING;
uint16_t m_nPortOutgoing = OscServerDefaultPort::OUTGOING;
int32_t m_nHandle = -1;
bool m_bPartialTransmission = false;
bool m_bEnableNoChangeUpdate = false;
uint16_t m_nLastChannel;
char m_aPath[OscServerMax::PATH_LENGTH];
char m_aPathSecond[OscServerMax::PATH_LENGTH];
char m_aPathInfo[OscServerMax::PATH_LENGTH];
char m_aPathBlackOut[OscServerMax::PATH_LENGTH];
OscServerHandler *m_pOscServerHandler = 0;
LightSet *m_pLightSet = 0;
char *m_pBuffer = 0;
uint8_t *m_pData = 0;
uint8_t *m_pOsc = 0;
char m_Os[32];
const char *m_pModel;
const char *m_pSoC;
};
#endif /* OSCSERVER_H_ */
| {
"pile_set_name": "Github"
} |
/*
* Copyright © 2016 Cask Data, Inc.
*
* 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 io.cdap.cdap.internal.app.runtime.schedule.store;
import org.quartz.Trigger;
import org.quartz.listeners.TriggerListenerSupport;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Logs schedule trigger misfires.
*/
public class TriggerMisfireLogger extends TriggerListenerSupport {
private static final Logger LOG = LoggerFactory.getLogger(TriggerMisfireLogger.class);
@Override
public String getName() {
return getClass().getSimpleName();
}
@Override
protected Logger getLog() {
return LOG;
}
@Override
public void triggerMisfired(Trigger trigger) {
getLog().warn("Trigger {}.{} misfired job {}.{} at: {}. Should have fired at: {}.",
trigger.getKey().getGroup(), trigger.getKey().getName(),
trigger.getJobKey().getGroup(), trigger.getJobKey().getName(), new java.util.Date(),
trigger.getNextFireTime());
}
}
| {
"pile_set_name": "Github"
} |
# Scalable Multi-Hop Relational Reasoning for Knowledge-Aware Question Answering
```
@inproceedings{mhgrn_emnlp20,
title = {Scalable Multi-Hop Relational Reasoning for Knowledge-Aware Question Answering},
author = {Yanlin Feng and Xinyue Chen and Bill Yuchen Lin and Peifeng Wang and Jun Yan and Xiang Ren},
booktitle = {Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)},
year = {2020}
}
```
links
- [arXiv](https://arxiv.org/abs/2005.00646)
- [code](https://github.com/INK-USC/MHGRN)
| {
"pile_set_name": "Github"
} |
[ x + 1 ]
| {
"pile_set_name": "Github"
} |
<phone:PhoneApplicationPage
x:Class="TaskyWinPhone.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="696"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="Portrait" Orientation="Portrait"
shell:SystemTray.IsVisible="True">
<!--LayoutRoot is the root grid where all page content is placed-->
<Grid x:Name="LayoutRoot" Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!--TitlePanel contains the name of the application and page title-->
<StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
<TextBlock x:Name="ApplicationTitle" Text="TASKY" Style="{StaticResource PhoneTextNormalStyle}"/>
<TextBlock x:Name="PageTitle" Text="task list" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
</StackPanel>
<ListBox Grid.Row="1"
ItemsSource="{Binding Items}"
Visibility="{Binding ListVisibility}">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid
Margin="{Binding Margin}"
toolkit:TiltEffect.IsTiltEnabled="True"
Width="400"
Tap="HandleTaskTap">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBlock
Grid.Row="0"
Grid.Column="0"
Foreground="White"
Style="{StaticResource PhoneTextLargeStyle}"
Margin="0,0,0,0"
Text="{Binding Name}" />
<TextBlock
Grid.Row="1"
Grid.Column="0"
Foreground="LightGray"
Margin="0,0,0,0"
Text="{Binding Notes}" />
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
<phone:PhoneApplicationPage.ApplicationBar>
<shell:ApplicationBar Opacity="1" IsVisible="True" IsMenuEnabled="True">
<shell:ApplicationBarIconButton
IconUri="/Images/add.png"
Text="add"
Click="HandleAdd"/>
</shell:ApplicationBar>
</phone:PhoneApplicationPage.ApplicationBar>
</phone:PhoneApplicationPage> | {
"pile_set_name": "Github"
} |
$.extend(UI, {
sendJobToTranslator: function (email, date, timezone, job, project) {
API.JOB.sendTranslatorRequest(email, date, timezone, job).done(function (data) {
APP.ModalWindow.onCloseModal();
if (data.job) {
UI.checkShareToTranslatorResponse(data, email, date, job, project);
} else {
UI.showShareTranslatorError();
}
}).fail(function () {
UI.showShareTranslatorError();
});
},
checkShareToTranslatorResponse: function (response, mail, date, job, project) {
var message = '';
if (job.translator) {
var newDate = new Date(date);
var oldDate = new Date(job.translator.delivery_date);
if (oldDate.getTime() !== newDate.getTime()) {
message = this.shareToTranslatorDateChangeNotification(mail, oldDate, newDate);
} else if (job.translator.email !== mail) {
message = this.shareToTranslatorMailChangeNotification(mail);
} else {
message = this.shareToTranslatorNotification(mail, job);
}
} else {
message = this.shareToTranslatorNotification(mail, job);
}
var notification = {
title: message.title,
text: message.text,
type: 'success',
position: 'bl',
allowHtml: true,
timer: 10000
};
var boxUndo = APP.addNotification(notification);
ManageActions.changeJobPasswordFromOutsource(project.id ,job.id, job.password, response.job.password);
ManageActions.assignTranslator(project.id ,job.id, job.password, response.job.translator);
},
shareToTranslatorNotification : function (mail, job) {
return message = {
title: 'Job sent',
text: '<div style="margin-top: 16px;">To: <a href="mailto:' + mail + '">' + mail + '</a> ' +
'<div class="job-reference" style="display: inline-block; width: 100%; margin-top: 10px;"> ' +
'<div class style="display: inline-block; font-size: 14px; color: grey;">' + job.id + ' </div> ' +
'<div class="source-target languages-tooltip" style="display: inline-block; font-weight: 700;"> ' +
'<div class="source-box" style="display: inherit;">' + job.sourceTxt + '</div> ' +
'<div class="in-to" style="top: 3px; display: inherit; position: relative;"> <i class="icon-chevron-right icon"></i> </div> ' +
'<div class="target-box" style="display: inherit;">' + job.targetTxt + '</div> </div> </div></div>'
} ;
},
shareToTranslatorDateChangeNotification : function (email, oldDate, newDate) {
oldDate = $.format.date(oldDate, "yyyy-MM-d hh:mm a");
oldDate = APP.getGMTDate(oldDate);
newDate = $.format.date(newDate, "yyyy-MM-d hh:mm a");
newDate = APP.getGMTDate(newDate);
return message = {
title: 'Job delivery update',
text: '<div style="margin-top: 16px;"><div class="job-reference" style="display: inline-block; width: 100%;"> To: ' +
'<div class="job-delivery" title="Delivery date" style="display: inline-block; margin-bottom: 10px; font-weight: 700; margin-right: 10px;"> ' +
'<div class="outsource-day-text" style="display: inline-block; margin-right: 3px;">'+ newDate.day +'</div> ' +
'<div class="outsource-month-text" style="display: inline-block; margin-right: 5px;">'+ newDate.month +'</div> ' +
'<div class="outsource-time-text" style="display: inline-block;">'+ newDate.time +'</div> ' +
'<div class="outsource-gmt-text" style="display: inline-block; font-weight: 100;color: grey;">('+ newDate.gmt +')</div> ' +
'</div> <div class="job-delivery not-used" title="Delivery date" style="display: inline-block; margin-bottom: 10px; font-weight: 700; text-decoration: line-through; position: relative;"> ' +
'<div class="outsource-day-text" style="display: inline-block; margin-right: 3px;">'+ oldDate.day +'</div> ' +
'<div class="outsource-month-text" style="display: inline-block; margin-right: 5px;">'+ oldDate.month +'</div> ' +
'<div class="outsource-time-text" style="display: inline-block;">'+ oldDate.time +'</div> ' +
'<div class="outsource-gmt-text" style="display: inline-block; font-weight: 100; color: grey;">('+ oldDate.gmt +')</div> ' +
'<div class="old" style="width: 100%; height: 1px; border-top: 1px solid black; top: -10px; position: relative;"></div> </div> ' +
'</div>Translator: <a href="mailto:'+email+'">'+email+'</a> </div></div>'
} ;
},
shareToTranslatorMailChangeNotification : function (mail) {
return message = {
title: 'Job sent with <div class="green-label" style="display: inline; background-color: #5ea400; color: white; padding: 2px 5px;">new password </div>',
text: '<div style="margin-top: 16px;">To: <a href="mailto:' + mail + '">' + mail + '</a> ' +
'<div class="job-reference" style="display: inline-block; width: 100%; margin-top: 10px;"> ' +
'<div class style="display: inline-block; font-size: 14px; color: grey;">(' + UI.currentOutsourceJob.id +')</div> ' +
'<div class="source-target languages-tooltip" style="display: inline-block; font-weight: 700;"> ' +
'<div class="source-box" style="display: inherit;">' + UI.currentOutsourceJob.sourceTxt + '</div> ' +
'<div class="in-to" style="top: 3px; display: inherit; position: relative;"> <i class="icon-chevron-right icon"></i> </div> ' +
'<div class="target-box" style="display: inherit;">' + UI.currentOutsourceJob.targetTxt + '</div> </div> </div></div>'
} ;
},
showShareTranslatorError: function () {
APP.ModalWindow.onCloseModal();
var notification = {
title: 'Problems sending the job',
text: 'Please try later or contact <a href="mailto:[email protected]">[email protected]</a>',
type: 'error',
position: 'bl',
allowHtml: true,
timer: 10000
};
APP.addNotification(notification);
}
});
| {
"pile_set_name": "Github"
} |
// Copyright 2017-2019 Parity Technologies (UK) Ltd.
// This file is part of Substrate.
// Substrate is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Substrate 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 Substrate. If not, see <http://www.gnu.org/licenses/>.
use super::*;
use assert_matches::assert_matches;
use test_client::{
consensus::BlockOrigin,
prelude::*,
runtime::{Block, Header, H256},
};
#[test]
fn should_return_header() {
let core = ::tokio::runtime::Runtime::new().unwrap();
let remote = core.executor();
let client = Chain {
client: Arc::new(test_client::new()),
subscriptions: Subscriptions::new(remote),
};
assert_matches!(
client.header(Some(client.client.genesis_hash()).into()),
Ok(Some(ref x)) if x == &Header {
parent_hash: H256::from_low_u64_be(0),
number: 0,
state_root: x.state_root.clone(),
extrinsics_root: "03170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c111314".parse().unwrap(),
digest: Default::default(),
}
);
assert_matches!(
client.header(None.into()),
Ok(Some(ref x)) if x == &Header {
parent_hash: H256::from_low_u64_be(0),
number: 0,
state_root: x.state_root.clone(),
extrinsics_root: "03170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c111314".parse().unwrap(),
digest: Default::default(),
}
);
assert_matches!(
client.header(Some(H256::from_low_u64_be(5)).into()),
Ok(None)
);
}
#[test]
fn should_return_a_block() {
let core = ::tokio::runtime::Runtime::new().unwrap();
let remote = core.executor();
let api = Chain {
client: Arc::new(test_client::new()),
subscriptions: Subscriptions::new(remote),
};
let block = api.client.new_block().unwrap().bake().unwrap();
let block_hash = block.hash();
api.client.import(BlockOrigin::Own, block).unwrap();
// Genesis block is not justified
assert_matches!(
api.block(Some(api.client.genesis_hash()).into()),
Ok(Some(SignedBlock {
justification: None,
..
}))
);
assert_matches!(
api.block(Some(block_hash).into()),
Ok(Some(ref x)) if x.block == Block {
header: Header {
parent_hash: api.client.genesis_hash(),
number: 1,
state_root: x.block.header.state_root.clone(),
extrinsics_root: "03170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c111314".parse().unwrap(),
digest: Default::default(),
},
extrinsics: vec![],
}
);
assert_matches!(
api.block(None.into()),
Ok(Some(ref x)) if x.block == Block {
header: Header {
parent_hash: api.client.genesis_hash(),
number: 1,
state_root: x.block.header.state_root.clone(),
extrinsics_root: "03170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c111314".parse().unwrap(),
digest: Default::default(),
},
extrinsics: vec![],
}
);
assert_matches!(api.block(Some(H256::from_low_u64_be(5)).into()), Ok(None));
}
#[test]
fn should_return_block_hash() {
let core = ::tokio::runtime::Runtime::new().unwrap();
let remote = core.executor();
let client = Chain {
client: Arc::new(test_client::new()),
subscriptions: Subscriptions::new(remote),
};
assert_matches!(
client.block_hash(None.into()),
Ok(Some(ref x)) if x == &client.client.genesis_hash()
);
assert_matches!(
client.block_hash(Some(0u64.into()).into()),
Ok(Some(ref x)) if x == &client.client.genesis_hash()
);
assert_matches!(client.block_hash(Some(1u64.into()).into()), Ok(None));
let block = client.client.new_block().unwrap().bake().unwrap();
client
.client
.import(BlockOrigin::Own, block.clone())
.unwrap();
assert_matches!(
client.block_hash(Some(0u64.into()).into()),
Ok(Some(ref x)) if x == &client.client.genesis_hash()
);
assert_matches!(
client.block_hash(Some(1u64.into()).into()),
Ok(Some(ref x)) if x == &block.hash()
);
assert_matches!(
client.block_hash(Some(::primitives::U256::from(1u64).into()).into()),
Ok(Some(ref x)) if x == &block.hash()
);
}
#[test]
fn should_return_finalized_hash() {
let core = ::tokio::runtime::Runtime::new().unwrap();
let remote = core.executor();
let client = Chain {
client: Arc::new(test_client::new()),
subscriptions: Subscriptions::new(remote),
};
assert_matches!(
client.finalized_head(),
Ok(ref x) if x == &client.client.genesis_hash()
);
// import new block
let builder = client.client.new_block().unwrap();
client
.client
.import(BlockOrigin::Own, builder.bake().unwrap())
.unwrap();
// no finalization yet
assert_matches!(
client.finalized_head(),
Ok(ref x) if x == &client.client.genesis_hash()
);
// finalize
client
.client
.finalize_block(BlockId::number(1), None, true)
.unwrap();
assert_matches!(
client.finalized_head(),
Ok(ref x) if x == &client.client.block_hash(1).unwrap().unwrap()
);
}
#[test]
fn should_notify_about_latest_block() {
let mut core = ::tokio::runtime::Runtime::new().unwrap();
let remote = core.executor();
let (subscriber, id, transport) = Subscriber::new_test("test");
{
let api = Chain {
client: Arc::new(test_client::new()),
subscriptions: Subscriptions::new(remote),
};
api.subscribe_new_head(Default::default(), subscriber);
// assert id assigned
assert_eq!(core.block_on(id), Ok(Ok(SubscriptionId::Number(1))));
let builder = api.client.new_block().unwrap();
api.client
.import(BlockOrigin::Own, builder.bake().unwrap())
.unwrap();
}
// assert initial head sent.
let (notification, next) = core.block_on(transport.into_future()).unwrap();
assert!(notification.is_some());
// assert notification sent to transport
let (notification, next) = core.block_on(next.into_future()).unwrap();
assert!(notification.is_some());
// no more notifications on this channel
assert_eq!(core.block_on(next.into_future()).unwrap().0, None);
}
#[test]
fn should_notify_about_finalized_block() {
let mut core = ::tokio::runtime::Runtime::new().unwrap();
let remote = core.executor();
let (subscriber, id, transport) = Subscriber::new_test("test");
{
let api = Chain {
client: Arc::new(test_client::new()),
subscriptions: Subscriptions::new(remote),
};
api.subscribe_finalized_heads(Default::default(), subscriber);
// assert id assigned
assert_eq!(core.block_on(id), Ok(Ok(SubscriptionId::Number(1))));
let builder = api.client.new_block().unwrap();
api.client
.import(BlockOrigin::Own, builder.bake().unwrap())
.unwrap();
api.client
.finalize_block(BlockId::number(1), None, true)
.unwrap();
}
// assert initial head sent.
let (notification, next) = core.block_on(transport.into_future()).unwrap();
assert!(notification.is_some());
// assert notification sent to transport
let (notification, next) = core.block_on(next.into_future()).unwrap();
assert!(notification.is_some());
// no more notifications on this channel
assert_eq!(core.block_on(next.into_future()).unwrap().0, None);
}
| {
"pile_set_name": "Github"
} |
// File: lzham_prefix_coding.h
// See Copyright Notice and license at the end of include/lzham.h
#pragma once
namespace lzham
{
namespace prefix_coding
{
const uint cMaxExpectedCodeSize = 16;
const uint cMaxSupportedSyms = 1024;
// This value can be tuned for a specific CPU.
const uint cMaxTableBits = 11;
bool limit_max_code_size(uint num_syms, uint8* pCodesizes, uint max_code_size);
bool generate_codes(uint num_syms, const uint8* pCodesizes, uint16* pCodes);
class decoder_tables
{
public:
inline decoder_tables() :
m_table_shift(0), m_table_max_code(0), m_decode_start_code_size(0), m_cur_lookup_size(0), m_lookup(NULL), m_cur_sorted_symbol_order_size(0), m_sorted_symbol_order(NULL)
{
}
inline decoder_tables(const decoder_tables& other) :
m_table_shift(0), m_table_max_code(0), m_decode_start_code_size(0), m_cur_lookup_size(0), m_lookup(NULL), m_cur_sorted_symbol_order_size(0), m_sorted_symbol_order(NULL)
{
*this = other;
}
inline decoder_tables& operator= (const decoder_tables& rhs)
{
assign(rhs);
return *this;
}
inline bool assign(const decoder_tables& rhs)
{
if (this == &rhs)
return true;
uint32* pCur_lookup = m_lookup;
uint16* pCur_sorted_symbol_order = m_sorted_symbol_order;
memcpy(this, &rhs, sizeof(*this));
if ((pCur_lookup) && (pCur_sorted_symbol_order) && (rhs.m_cur_lookup_size == m_cur_lookup_size) && (rhs.m_cur_sorted_symbol_order_size == m_cur_sorted_symbol_order_size))
{
m_lookup = pCur_lookup;
m_sorted_symbol_order = pCur_sorted_symbol_order;
memcpy(m_lookup, rhs.m_lookup, sizeof(m_lookup[0]) * m_cur_lookup_size);
memcpy(m_sorted_symbol_order, rhs.m_sorted_symbol_order, sizeof(m_sorted_symbol_order[0]) * m_cur_sorted_symbol_order_size);
}
else
{
lzham_delete_array(pCur_lookup);
m_lookup = NULL;
if (rhs.m_lookup)
{
m_lookup = lzham_new_array<uint32>(m_cur_lookup_size);
if (!m_lookup)
return false;
memcpy(m_lookup, rhs.m_lookup, sizeof(m_lookup[0]) * m_cur_lookup_size);
}
lzham_delete_array(pCur_sorted_symbol_order);
m_sorted_symbol_order = NULL;
if (rhs.m_sorted_symbol_order)
{
m_sorted_symbol_order = lzham_new_array<uint16>(m_cur_sorted_symbol_order_size);
if (!m_sorted_symbol_order)
return false;
memcpy(m_sorted_symbol_order, rhs.m_sorted_symbol_order, sizeof(m_sorted_symbol_order[0]) * m_cur_sorted_symbol_order_size);
}
}
return true;
}
inline void clear()
{
if (m_lookup)
{
lzham_delete_array(m_lookup);
m_lookup = 0;
m_cur_lookup_size = 0;
}
if (m_sorted_symbol_order)
{
lzham_delete_array(m_sorted_symbol_order);
m_sorted_symbol_order = NULL;
m_cur_sorted_symbol_order_size = 0;
}
}
inline ~decoder_tables()
{
if (m_lookup)
lzham_delete_array(m_lookup);
if (m_sorted_symbol_order)
lzham_delete_array(m_sorted_symbol_order);
}
// DO NOT use any complex classes here - it is bitwise copied.
uint m_num_syms;
uint m_total_used_syms;
uint m_table_bits;
uint m_table_shift;
uint m_table_max_code;
uint m_decode_start_code_size;
uint8 m_min_code_size;
uint8 m_max_code_size;
uint m_max_codes[cMaxExpectedCodeSize + 1];
int m_val_ptrs[cMaxExpectedCodeSize + 1];
uint m_cur_lookup_size;
uint32* m_lookup;
uint m_cur_sorted_symbol_order_size;
uint16* m_sorted_symbol_order;
inline uint get_unshifted_max_code(uint len) const
{
LZHAM_ASSERT( (len >= 1) && (len <= cMaxExpectedCodeSize) );
uint k = m_max_codes[len - 1];
if (!k)
return UINT_MAX;
return (k - 1) >> (16 - len);
}
};
bool generate_decoder_tables(uint num_syms, const uint8* pCodesizes, decoder_tables* pTables, uint table_bits);
} // namespace prefix_coding
} // namespace lzham
| {
"pile_set_name": "Github"
} |
import { Component } from '@angular/core';
@Component({
selector: 'app-welcome',
templateUrl: './welcome.component.html',
styleUrls: ['./welcome.component.scss'],
})
export class WelcomeComponent {
title = 'angular';
}
| {
"pile_set_name": "Github"
} |
julia 0.6
BinDeps
@osx Homebrew
| {
"pile_set_name": "Github"
} |
<!--
*Copyright 2018 T Mobile, Inc. or its affiliates. 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. A copy of the License is located at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* or in the "license" file accompanying this file. This file is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or
* implied. See the License for the specific language governing permissions and
* limitations under the License.
-->
<div (click)="linkClicked($event)" class="app-link">
<a>{{linkText}}</a>
</div> | {
"pile_set_name": "Github"
} |
<div class="apiDetail">
<div>
<h2><span>String</span><span class="path">treeNode.</span>iconSkin</h2>
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
<div class="desc">
<p></p>
<div class="longdesc">
<p>The className of node's custom icon.</p>
<p class="highlight_red">1. You need to modify the css, add the definition of className.</p>
<p class="highlight_red">2. The css is simple, convenient, and support the parent node to switch icons when it is expanded or collapsed.</p>
<p class="highlight_red">3. Recommend the use of CSS Sprites, can reduce repeating load the image, to avoid image flicker.</p>
<p class="highlight_red">4. The 'iconSkin' support IE6 in zTree v3.x.</p>
<p class="highlight_red">5. If you need to use image's URL to set the custom icon, please set the 'treeNode.icon' or 'treeNode.iconOpen' or 'treeNode.iconClose' attribute.</p>
<p>Default: undefined</p>
</div>
</div>
<h3>String Format</h3>
<div class="desc">
<p>The string about custom icon's className.</p>
</div>
<h3>Examples of css & treeNode</h3>
<h4>1. Set the custom icon</h4>
<pre xmlns=""><code>css example:
.ztree li span.button.diy01_ico_open, .ztree li span.button.diy01_ico_close{...}
.ztree li span.button.diy02_ico_open{...}
.ztree li span.button.diy02_ico_close{...}
.ztree li span.button.diy03_ico_docu{...}
node's data example:
var nodes = [
//Only show one icon when it is expanded or collapsed.
{ name:"Parent Node 1", iconSkin:"diy01"},
//Show two icons when it is expanded or collapsed.
{ name:"Parent Node 2", iconSkin:"diy02"},
//the custom icon for leaf node
{ name:"Leaf Node", iconSkin:"diy03"}
]</code></pre>
</div>
</div> | {
"pile_set_name": "Github"
} |
{
"name": "solarized-dark-syntax",
"theme": "syntax",
"version": "1.3.0",
"description": "A dark syntax theme using the solarized colors",
"repository": "https://github.com/atom/atom",
"license": "MIT",
"engines": {
"atom": ">0.50.0"
}
}
| {
"pile_set_name": "Github"
} |
//------------------------------------------------------------------------------
// <auto-generated />
//
// This file was automatically generated by SWIG (http://www.swig.org).
// Version 3.0.12
//
// Do not make changes to this file unless you know what you are doing--modify
// the SWIG interface file instead.
//------------------------------------------------------------------------------
namespace Fbx {
public class FbxAnimCurveFilterTSS : FbxAnimCurveFilter {
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
internal FbxAnimCurveFilterTSS(global::System.IntPtr cPtr, bool cMemoryOwn) : base(FbxWrapperNativePINVOKE.FbxAnimCurveFilterTSS_SWIGUpcast(cPtr), cMemoryOwn) {
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
}
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(FbxAnimCurveFilterTSS obj) {
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
}
~FbxAnimCurveFilterTSS() {
Dispose();
}
public override void Dispose() {
lock(this) {
if (swigCPtr.Handle != global::System.IntPtr.Zero) {
if (swigCMemOwn) {
swigCMemOwn = false;
FbxWrapperNativePINVOKE.delete_FbxAnimCurveFilterTSS(swigCPtr);
}
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
}
global::System.GC.SuppressFinalize(this);
base.Dispose();
}
}
public FbxAnimCurveFilterTSS() : this(FbxWrapperNativePINVOKE.new_FbxAnimCurveFilterTSS(), true) {
}
public override string GetName() {
string ret = FbxWrapperNativePINVOKE.FbxAnimCurveFilterTSS_GetName(swigCPtr);
return ret;
}
public override bool Apply(FbxAnimStack pAnimStack, FbxStatus pStatus) {
bool ret = FbxWrapperNativePINVOKE.FbxAnimCurveFilterTSS_Apply__SWIG_0(swigCPtr, FbxAnimStack.getCPtr(pAnimStack), FbxStatus.getCPtr(pStatus));
return ret;
}
public override bool Apply(FbxAnimStack pAnimStack) {
bool ret = FbxWrapperNativePINVOKE.FbxAnimCurveFilterTSS_Apply__SWIG_1(swigCPtr, FbxAnimStack.getCPtr(pAnimStack));
return ret;
}
public override bool Apply(FbxObject pObj, FbxAnimStack pAnimStack, FbxStatus pStatus) {
bool ret = FbxWrapperNativePINVOKE.FbxAnimCurveFilterTSS_Apply__SWIG_2(swigCPtr, FbxObject.getCPtr(pObj), FbxAnimStack.getCPtr(pAnimStack), FbxStatus.getCPtr(pStatus));
return ret;
}
public override bool Apply(FbxObject pObj, FbxAnimStack pAnimStack) {
bool ret = FbxWrapperNativePINVOKE.FbxAnimCurveFilterTSS_Apply__SWIG_3(swigCPtr, FbxObject.getCPtr(pObj), FbxAnimStack.getCPtr(pAnimStack));
return ret;
}
public override bool Apply(FbxAnimCurveNode pCurveNode, FbxStatus pStatus) {
bool ret = FbxWrapperNativePINVOKE.FbxAnimCurveFilterTSS_Apply__SWIG_4(swigCPtr, FbxAnimCurveNode.getCPtr(pCurveNode), FbxStatus.getCPtr(pStatus));
if (FbxWrapperNativePINVOKE.SWIGPendingException.Pending) throw FbxWrapperNativePINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public override bool Apply(FbxAnimCurveNode pCurveNode) {
bool ret = FbxWrapperNativePINVOKE.FbxAnimCurveFilterTSS_Apply__SWIG_5(swigCPtr, FbxAnimCurveNode.getCPtr(pCurveNode));
if (FbxWrapperNativePINVOKE.SWIGPendingException.Pending) throw FbxWrapperNativePINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public override bool Apply(SWIGTYPE_p_p_FbxAnimCurve pCurve, int pCount, FbxStatus pStatus) {
bool ret = FbxWrapperNativePINVOKE.FbxAnimCurveFilterTSS_Apply__SWIG_6(swigCPtr, SWIGTYPE_p_p_FbxAnimCurve.getCPtr(pCurve), pCount, FbxStatus.getCPtr(pStatus));
return ret;
}
public override bool Apply(SWIGTYPE_p_p_FbxAnimCurve pCurve, int pCount) {
bool ret = FbxWrapperNativePINVOKE.FbxAnimCurveFilterTSS_Apply__SWIG_7(swigCPtr, SWIGTYPE_p_p_FbxAnimCurve.getCPtr(pCurve), pCount);
return ret;
}
public override bool Apply(FbxAnimCurve pCurve, FbxStatus pStatus) {
bool ret = FbxWrapperNativePINVOKE.FbxAnimCurveFilterTSS_Apply__SWIG_8(swigCPtr, FbxAnimCurve.getCPtr(pCurve), FbxStatus.getCPtr(pStatus));
if (FbxWrapperNativePINVOKE.SWIGPendingException.Pending) throw FbxWrapperNativePINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public override bool Apply(FbxAnimCurve pCurve) {
bool ret = FbxWrapperNativePINVOKE.FbxAnimCurveFilterTSS_Apply__SWIG_9(swigCPtr, FbxAnimCurve.getCPtr(pCurve));
if (FbxWrapperNativePINVOKE.SWIGPendingException.Pending) throw FbxWrapperNativePINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public override void Reset() {
FbxWrapperNativePINVOKE.FbxAnimCurveFilterTSS_Reset(swigCPtr);
}
public FbxTime GetShift() {
FbxTime ret = new FbxTime(FbxWrapperNativePINVOKE.FbxAnimCurveFilterTSS_GetShift(swigCPtr), true);
return ret;
}
public void SetShift(FbxTime pShift) {
FbxWrapperNativePINVOKE.FbxAnimCurveFilterTSS_SetShift(swigCPtr, FbxTime.getCPtr(pShift));
if (FbxWrapperNativePINVOKE.SWIGPendingException.Pending) throw FbxWrapperNativePINVOKE.SWIGPendingException.Retrieve();
}
public double GetScale() {
double ret = FbxWrapperNativePINVOKE.FbxAnimCurveFilterTSS_GetScale(swigCPtr);
return ret;
}
public void SetScale(double pScale) {
FbxWrapperNativePINVOKE.FbxAnimCurveFilterTSS_SetScale(swigCPtr, pScale);
}
}
}
| {
"pile_set_name": "Github"
} |
// Copyright (C) 2019 Caio Lima (Igalia SL). All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: Private field is visible on initializer with direct eval
esid: sec-privatefieldget
info: |
PrivateFieldGet (P, O)
1. Assert: P is a Private Name.
2. If O is not an object, throw a TypeError exception.
3. If P.[[Kind]] is "field",
a. Let entry be PrivateFieldFind(P, O).
b. If entry is empty, throw a TypeError exception.
c. Return entry.[[PrivateFieldValue]].
4. Perform ? PrivateBrandCheck(O, P).
5. If P.[[Kind]] is "method",
a. Return P.[[Value]].
6. Else,
a. Assert: P.[[Kind]] is "accessor".
b. If P does not have a [[Get]] field, throw a TypeError exception.
c. Let getter be P.[[Get]].
d. Return ? Call(getter, O).
ClassElementName : PrivateIdentifier
1. Let privateIdentifier be StringValue of PrivateIdentifier.
2. Let privateName be NewPrivateName(privateIdentifier).
3. Let scope be the running execution context's PrivateEnvironment.
4. Let scopeEnvRec be scope's EnvironmentRecord.
5. Perform ! scopeEnvRec.InitializeBinding(privateIdentifier, privateName).
6. Return privateName.
MakePrivateReference ( baseValue, privateIdentifier )
1. Let env be the running execution context's PrivateEnvironment.
2. Let privateNameBinding be ? ResolveBinding(privateIdentifier, env).
3. Let privateName be GetValue(privateNameBinding).
4. Assert: privateName is a Private Name.
5. Return a value of type Reference whose base value is baseValue, whose referenced name is privateName, whose strict reference flag is true.
features: [class-fields-private, class-fields-public, class]
---*/
class C {
#m = 44;
v = eval("this.#m");
}
let c = new C();
assert.sameValue(c.v, 44);
| {
"pile_set_name": "Github"
} |
Additional IP Rights Grant (Patents)
"This implementation" means the copyrightable works distributed by
Google as part of the Go project.
Google hereby grants to You a perpetual, worldwide, non-exclusive,
no-charge, royalty-free, irrevocable (except as stated in this section)
patent license to make, have made, use, offer to sell, sell, import,
transfer and otherwise run, modify and propagate the contents of this
implementation of Go, where such license applies only to those patent
claims, both currently owned or controlled by Google and acquired in
the future, licensable by Google that are necessarily infringed by this
implementation of Go. This grant does not include claims that would be
infringed only as a consequence of further modification of this
implementation. If you or your agent or exclusive licensee institute or
order or agree to the institution of patent litigation against any
entity (including a cross-claim or counterclaim in a lawsuit) alleging
that this implementation of Go or any code incorporated within this
implementation of Go constitutes direct or contributory patent
infringement, or inducement of patent infringement, then any patent
rights granted to you under this License for this implementation of Go
shall terminate as of the date such litigation is filed.
| {
"pile_set_name": "Github"
} |
<Page
x:Class="Param_RootNamespace.Views.wts.ItemNamePage"
<!--{[{-->
Style="{DynamicResource MahApps.Styles.Page}"
<!--}]}-->
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
</Page> | {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="utf-8"?>
<item xmlns="http://www.supermemo.net/2006/smux">
<lesson-title>GRE词汇:《再要你命三千》</lesson-title>
<chapter-title>List 28</chapter-title>
<question-title>根据单词,回想词义</question-title>
<question><span style="font-size:18; font-family:Comic Sans MS; font-weight:normal; font-style:normal; color:#550000">dampen</span><br /><span style="font-size:14; font-family:微软雅黑; font-weight:normal; font-style:normal; color:#000000">[<font face="Kingsoft Phonetic">5dAmpEn</font>]</span><br /></question>
<answer>【考法 1】 vt. (特指稍稍地)弄湿: to make or become slightly or moderately wet<br />
【例】 dampen a paper towel with water and use it to clean up the mess 把纸巾弄湿用来清扫<br />
【近】 bedew, damp, douse , drench, impregnate, saturate, soak, souse, steep<br />
【反】 dehydrate, desiccate, dry, parch, scorch, sear 使脱水,烤干<br />
<br />
【考法 2】 vt. 抑制,压抑,泼冷水: to check or diminish the feeling, activity or vigor of<br />
【例】 Nothing could dampen their enthusiasm. 没有什么能扼杀他们的激情。‖The oppressive heat dampened our spirits. 让人难以忍受的酷暑让我们精神不振。<br />
【近】 benumb, blunt, castrate, deaden, devitalize, enervate, geld, lobotomize, petrify<br />
【反】 brace, energize, enliven, invigorate, quicken, stimulate, vitalize, vivify 使充满活力<br />
<br />
【记】 dam + 音:破,泼,大坝破了,大坝泼水会潮湿;damp + en 使→使潮湿<br />
</answer>
<modified>2015-10-04</modified>
<template-id>10028</template-id>
<question-audio>true</question-audio>
</item> | {
"pile_set_name": "Github"
} |
{
"id": "35264453",
"url": "https:\/\/collection.cooperhewitt.org\/types\/35264453\/",
"name": "Cupid",
"count_objects": "1",
"supersedes": "0",
"superseded_by": "0"
} | {
"pile_set_name": "Github"
} |
dependencies: \
/Users/nikhilsridhar/Desktop/Geofirestore-ios/Example/Pods/gRPC-RxLibrary/src/objective-c/RxLibrary/GRXImmediateWriter.m \
/Users/nikhilsridhar/Desktop/Geofirestore-ios/Example/Build/Intermediates/Pods.build/Debug-iphonesimulator/gRPC-RxLibrary.build/module.modulemap \
/Users/nikhilsridhar/Desktop/Geofirestore-ios/Example/Pods/Target\ Support\ Files/gRPC-RxLibrary/gRPC-RxLibrary-prefix.pch \
/Users/nikhilsridhar/Desktop/Geofirestore-ios/Example/Pods/gRPC-RxLibrary/src/objective-c/RxLibrary/GRXImmediateWriter.h \
/Users/nikhilsridhar/Desktop/Geofirestore-ios/Example/Pods/gRPC-RxLibrary/src/objective-c/RxLibrary/GRXWriter.h \
/Users/nikhilsridhar/Desktop/Geofirestore-ios/Example/Pods/gRPC-RxLibrary/src/objective-c/RxLibrary/GRXWriteable.h \
/Users/nikhilsridhar/Desktop/Geofirestore-ios/Example/Pods/gRPC-RxLibrary/src/objective-c/RxLibrary/NSEnumerator+GRXUtil.h
| {
"pile_set_name": "Github"
} |
---
layout: news_post
title: "开始使用 Fastly 分发源码"
author: "hsbt"
translator: "Andor Chen"
date: 2013-09-07 11:30:00 +0000
lang: zh_cn
---
ruby-lang.org 开始通过 https://cache.ruby-lang.org 分发 Ruby 的官方源码。
现在的分发速度很快,因为我们使用了“内容分发网络”(Content Delivery Network,CDN)。
我们使用的 CDN 由 [Fastly][1] 的开源计划提供。感谢 Fastly 的大力支持。
[1]: http://www.fastly.com
| {
"pile_set_name": "Github"
} |
// AFSecurityPolicy.h
// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#import <Foundation/Foundation.h>
#import <Security/Security.h>
typedef NS_ENUM(NSUInteger, AFSSLPinningMode) {
AFSSLPinningModeNone,
AFSSLPinningModePublicKey,
AFSSLPinningModeCertificate,
};
/**
`AFSecurityPolicy` evaluates server trust against pinned X.509 certificates and public keys over secure connections.
Adding pinned SSL certificates to your app helps prevent man-in-the-middle attacks and other vulnerabilities. Applications dealing with sensitive customer data or financial information are strongly encouraged to route all communication over an HTTPS connection with SSL pinning configured and enabled.
*/
NS_ASSUME_NONNULL_BEGIN
@interface AFSecurityPolicy : NSObject <NSSecureCoding, NSCopying>
/**
The criteria by which server trust should be evaluated against the pinned SSL certificates. Defaults to `AFSSLPinningModeNone`.
*/
@property (readonly, nonatomic, assign) AFSSLPinningMode SSLPinningMode;
/**
The certificates used to evaluate server trust according to the SSL pinning mode.
By default, this property is set to any (`.cer`) certificates included in the target compiling AFNetworking. Note that if you are using AFNetworking as embedded framework, no certificates will be pinned by default. Use `certificatesInBundle` to load certificates from your target, and then create a new policy by calling `policyWithPinningMode:withPinnedCertificates`.
Note that if pinning is enabled, `evaluateServerTrust:forDomain:` will return true if any pinned certificate matches.
*/
@property (nonatomic, strong, nullable) NSSet <NSData *> *pinnedCertificates;
/**
Whether or not to trust servers with an invalid or expired SSL certificates. Defaults to `NO`.
*/
@property (nonatomic, assign) BOOL allowInvalidCertificates;
/**
Whether or not to validate the domain name in the certificate's CN field. Defaults to `YES`.
*/
@property (nonatomic, assign) BOOL validatesDomainName;
///-----------------------------------------
/// @name Getting Certificates from the Bundle
///-----------------------------------------
/**
Returns any certificates included in the bundle. If you are using AFNetworking as an embedded framework, you must use this method to find the certificates you have included in your app bundle, and use them when creating your security policy by calling `policyWithPinningMode:withPinnedCertificates`.
@return The certificates included in the given bundle.
*/
+ (NSSet <NSData *> *)certificatesInBundle:(NSBundle *)bundle;
///-----------------------------------------
/// @name Getting Specific Security Policies
///-----------------------------------------
/**
Returns the shared default security policy, which does not allow invalid certificates, validates domain name, and does not validate against pinned certificates or public keys.
@return The default security policy.
*/
+ (instancetype)defaultPolicy;
///---------------------
/// @name Initialization
///---------------------
/**
Creates and returns a security policy with the specified pinning mode.
@param pinningMode The SSL pinning mode.
@return A new security policy.
*/
+ (instancetype)policyWithPinningMode:(AFSSLPinningMode)pinningMode;
/**
Creates and returns a security policy with the specified pinning mode.
@param pinningMode The SSL pinning mode.
@param pinnedCertificates The certificates to pin against.
@return A new security policy.
*/
+ (instancetype)policyWithPinningMode:(AFSSLPinningMode)pinningMode withPinnedCertificates:(NSSet <NSData *> *)pinnedCertificates;
///------------------------------
/// @name Evaluating Server Trust
///------------------------------
/**
Whether or not the specified server trust should be accepted, based on the security policy.
This method should be used when responding to an authentication challenge from a server.
@param serverTrust The X.509 certificate trust of the server.
@param domain The domain of serverTrust. If `nil`, the domain will not be validated.
@return Whether or not to trust the server.
*/
- (BOOL)evaluateServerTrust:(SecTrustRef)serverTrust
forDomain:(nullable NSString *)domain;
@end
NS_ASSUME_NONNULL_END
///----------------
/// @name Constants
///----------------
/**
## SSL Pinning Modes
The following constants are provided by `AFSSLPinningMode` as possible SSL pinning modes.
enum {
AFSSLPinningModeNone,
AFSSLPinningModePublicKey,
AFSSLPinningModeCertificate,
}
`AFSSLPinningModeNone`
Do not used pinned certificates to validate servers.
`AFSSLPinningModePublicKey`
Validate host certificates against public keys of pinned certificates.
`AFSSLPinningModeCertificate`
Validate host certificates against pinned certificates.
*/
| {
"pile_set_name": "Github"
} |
<?php
/**
* Template English lexicon topic
*
* @language en
* @package modx
* @subpackage lexicon
*/
$_lang['access'] = 'Åtkomst';
$_lang['filter_by_category'] = 'Filtrera efter kategori...';
$_lang['rank'] = 'Rang';
$_lang['template'] = 'Mall';
$_lang['template_assignedtv_tab'] = 'Tilldelade mallvariabler';
$_lang['template_code'] = 'Mall-kod (html)';
$_lang['template_desc'] = 'Beskrivning';
$_lang['template_desc_category'] = 'Den kategori som denna mall hör till.';
$_lang['template_desc_description'] = 'En kort beskrivning av denna mall.';
$_lang['template_desc_name'] = 'Mallens namn.';
$_lang['template_delete_confirm'] = 'Är du säker på att du vill ta bort denna mall?';
$_lang['template_duplicate_confirm'] = 'Är du säker på att du vill duplicera denna mall?';
$_lang['template_edit_tab'] = 'Redigera mall';
$_lang['template_empty'] = '(tom)';
$_lang['template_err_default_template'] = 'Denna mall är angiven som standardmall. Ange en ny standardmall i MODX inställningar innan du tar bort denna mall.<br />';
$_lang['template_err_delete'] = 'Ett fel inträffade när mallen skulle tas bort.';
$_lang['template_err_duplicate'] = 'Ett fel inträffade när mallen skulle dupliceras.';
$_lang['template_err_ae'] = 'Det finns redan en mall med namnet "[[+name]]".';
$_lang['template_err_in_use'] = 'Denna mall används. Ange en ny mall för de dokument som använder mallen. Dokument som använder mallen:<br />';
$_lang['template_err_locked'] = 'Mallen är låst för redigering.';
$_lang['template_err_nf'] = 'Mallen kunde inte hittas!';
$_lang['template_err_ns'] = 'Ingen mall angiven.';
$_lang['template_err_ns_name'] = 'Ange ett namn på mallen.';
$_lang['template_err_remove'] = 'Ett fel inträffade när mallen skulle tas bort.';
$_lang['template_err_save'] = 'Ett fel inträffade när mallen skulle sparas.';
$_lang['template_icon'] = 'Ikon';
$_lang['template_icon_description'] = 'Valfri. En anpassad ikonklass för alla resurser med denna mall.';
$_lang['template_lock'] = 'Lås mall för redigering';
$_lang['template_lock_msg'] = 'Användare måste ha attributet edit_locked för att kunna redigera denna mall.';
$_lang['template_locked_message'] = 'Denna mall är låst.';
$_lang['template_management_msg'] = 'Här kan du skapa en ny mall eller välja en redan befintlig för redigering.';
$_lang['template_msg'] = 'Skapa och redigera mallar här. Ändrade eller nya mallar kommer inte att synas på din webbplats cachade sidor förrän cachen har tömts. Du kan däremot använda förhandsgranskningen för att se hur den uppdaterade mallen kommer att se ut.';
$_lang['template_name'] = 'Namn på mall';
$_lang['template_new'] = 'Ny mall';
$_lang['template_no_tv'] = 'Inga mallvariabler har tilldelats den här mallen än.';
$_lang['template_properties'] = 'Standardegenskaper';
$_lang['template_reset_all'] = 'Återställ alla sidor så de använder standardmallen';
$_lang['template_reset_specific'] = 'Återställ endast "%s" sidor';
$_lang['template_title'] = 'Skapa/redigera mallar';
$_lang['template_tv_edit'] = 'Redigera mallvariablernas sorteringsordning';
$_lang['template_tv_msg'] = 'Mallvariablerna som tilldelats den här mallen visas nedan.';
$_lang['template_untitled'] = 'Namnlös mall';
$_lang['templates'] = 'Mallar';
$_lang['tvt_err_nf'] = 'Mallvariabeln har inte tillgång till den angivna mallen.';
$_lang['tvt_err_remove'] = 'Ett fel inträffade när mallvariabeln skulle tas bort från mallen.';
| {
"pile_set_name": "Github"
} |
// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2012 Gael Guennebaud <[email protected]>
//
// This Source Code Form is subject to the terms of the Mozilla
// Public License v. 2.0. If a copy of the MPL was not distributed
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
#ifndef EIGEN_REF_H
#define EIGEN_REF_H
namespace Eigen {
template<typename Derived> class RefBase;
template<typename PlainObjectType, int Options = 0,
typename StrideType = typename internal::conditional<PlainObjectType::IsVectorAtCompileTime,InnerStride<1>,OuterStride<> >::type > class Ref;
/** \class Ref
* \ingroup Core_Module
*
* \brief A matrix or vector expression mapping an existing expressions
*
* \tparam PlainObjectType the equivalent matrix type of the mapped data
* \tparam Options specifies whether the pointer is \c #Aligned, or \c #Unaligned.
* The default is \c #Unaligned.
* \tparam StrideType optionally specifies strides. By default, Ref implies a contiguous storage along the inner dimension (inner stride==1),
* but accept a variable outer stride (leading dimension).
* This can be overridden by specifying strides.
* The type passed here must be a specialization of the Stride template, see examples below.
*
* This class permits to write non template functions taking Eigen's object as parameters while limiting the number of copies.
* A Ref<> object can represent either a const expression or a l-value:
* \code
* // in-out argument:
* void foo1(Ref<VectorXf> x);
*
* // read-only const argument:
* void foo2(const Ref<const VectorXf>& x);
* \endcode
*
* In the in-out case, the input argument must satisfies the constraints of the actual Ref<> type, otherwise a compilation issue will be triggered.
* By default, a Ref<VectorXf> can reference any dense vector expression of float having a contiguous memory layout.
* Likewise, a Ref<MatrixXf> can reference any column major dense matrix expression of float whose column's elements are contiguously stored with
* the possibility to have a constant space inbetween each column, i.e.: the inner stride mmust be equal to 1, but the outer-stride (or leading dimension),
* can be greater than the number of rows.
*
* In the const case, if the input expression does not match the above requirement, then it is evaluated into a temporary before being passed to the function.
* Here are some examples:
* \code
* MatrixXf A;
* VectorXf a;
* foo1(a.head()); // OK
* foo1(A.col()); // OK
* foo1(A.row()); // compilation error because here innerstride!=1
* foo2(A.row()); // The row is copied into a contiguous temporary
* foo2(2*a); // The expression is evaluated into a temporary
* foo2(A.col().segment(2,4)); // No temporary
* \endcode
*
* The range of inputs that can be referenced without temporary can be enlarged using the last two template parameter.
* Here is an example accepting an innerstride!=1:
* \code
* // in-out argument:
* void foo3(Ref<VectorXf,0,InnerStride<> > x);
* foo3(A.row()); // OK
* \endcode
* The downside here is that the function foo3 might be significantly slower than foo1 because it won't be able to exploit vectorization, and will involved more
* expensive address computations even if the input is contiguously stored in memory. To overcome this issue, one might propose to overloads internally calling a
* template function, e.g.:
* \code
* // in the .h:
* void foo(const Ref<MatrixXf>& A);
* void foo(const Ref<MatrixXf,0,Stride<> >& A);
*
* // in the .cpp:
* template<typename TypeOfA> void foo_impl(const TypeOfA& A) {
* ... // crazy code goes here
* }
* void foo(const Ref<MatrixXf>& A) { foo_impl(A); }
* void foo(const Ref<MatrixXf,0,Stride<> >& A) { foo_impl(A); }
* \endcode
*
*
* \sa PlainObjectBase::Map(), \ref TopicStorageOrders
*/
namespace internal {
template<typename _PlainObjectType, int _Options, typename _StrideType>
struct traits<Ref<_PlainObjectType, _Options, _StrideType> >
: public traits<Map<_PlainObjectType, _Options, _StrideType> >
{
typedef _PlainObjectType PlainObjectType;
typedef _StrideType StrideType;
enum {
Options = _Options,
Flags = traits<Map<_PlainObjectType, _Options, _StrideType> >::Flags | NestByRefBit
};
template<typename Derived> struct match {
enum {
HasDirectAccess = internal::has_direct_access<Derived>::ret,
StorageOrderMatch = PlainObjectType::IsVectorAtCompileTime || Derived::IsVectorAtCompileTime || ((PlainObjectType::Flags&RowMajorBit)==(Derived::Flags&RowMajorBit)),
InnerStrideMatch = int(StrideType::InnerStrideAtCompileTime)==int(Dynamic)
|| int(StrideType::InnerStrideAtCompileTime)==int(Derived::InnerStrideAtCompileTime)
|| (int(StrideType::InnerStrideAtCompileTime)==0 && int(Derived::InnerStrideAtCompileTime)==1),
OuterStrideMatch = Derived::IsVectorAtCompileTime
|| int(StrideType::OuterStrideAtCompileTime)==int(Dynamic) || int(StrideType::OuterStrideAtCompileTime)==int(Derived::OuterStrideAtCompileTime),
AlignmentMatch = (_Options!=Aligned) || ((PlainObjectType::Flags&AlignedBit)==0) || ((traits<Derived>::Flags&AlignedBit)==AlignedBit),
MatchAtCompileTime = HasDirectAccess && StorageOrderMatch && InnerStrideMatch && OuterStrideMatch && AlignmentMatch
};
typedef typename internal::conditional<MatchAtCompileTime,internal::true_type,internal::false_type>::type type;
};
};
template<typename Derived>
struct traits<RefBase<Derived> > : public traits<Derived> {};
}
template<typename Derived> class RefBase
: public MapBase<Derived>
{
typedef typename internal::traits<Derived>::PlainObjectType PlainObjectType;
typedef typename internal::traits<Derived>::StrideType StrideType;
public:
typedef MapBase<Derived> Base;
EIGEN_DENSE_PUBLIC_INTERFACE(RefBase)
inline Index innerStride() const
{
return StrideType::InnerStrideAtCompileTime != 0 ? m_stride.inner() : 1;
}
inline Index outerStride() const
{
return StrideType::OuterStrideAtCompileTime != 0 ? m_stride.outer()
: IsVectorAtCompileTime ? this->size()
: int(Flags)&RowMajorBit ? this->cols()
: this->rows();
}
RefBase()
: Base(0,RowsAtCompileTime==Dynamic?0:RowsAtCompileTime,ColsAtCompileTime==Dynamic?0:ColsAtCompileTime),
// Stride<> does not allow default ctor for Dynamic strides, so let' initialize it with dummy values:
m_stride(StrideType::OuterStrideAtCompileTime==Dynamic?0:StrideType::OuterStrideAtCompileTime,
StrideType::InnerStrideAtCompileTime==Dynamic?0:StrideType::InnerStrideAtCompileTime)
{}
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(RefBase)
protected:
typedef Stride<StrideType::OuterStrideAtCompileTime,StrideType::InnerStrideAtCompileTime> StrideBase;
template<typename Expression>
void construct(Expression& expr)
{
if(PlainObjectType::RowsAtCompileTime==1)
{
eigen_assert(expr.rows()==1 || expr.cols()==1);
::new (static_cast<Base*>(this)) Base(expr.data(), 1, expr.size());
}
else if(PlainObjectType::ColsAtCompileTime==1)
{
eigen_assert(expr.rows()==1 || expr.cols()==1);
::new (static_cast<Base*>(this)) Base(expr.data(), expr.size(), 1);
}
else
::new (static_cast<Base*>(this)) Base(expr.data(), expr.rows(), expr.cols());
if(Expression::IsVectorAtCompileTime && (!PlainObjectType::IsVectorAtCompileTime) && ((Expression::Flags&RowMajorBit)!=(PlainObjectType::Flags&RowMajorBit)))
::new (&m_stride) StrideBase(expr.innerStride(), StrideType::InnerStrideAtCompileTime==0?0:1);
else
::new (&m_stride) StrideBase(StrideType::OuterStrideAtCompileTime==0?0:expr.outerStride(),
StrideType::InnerStrideAtCompileTime==0?0:expr.innerStride());
}
StrideBase m_stride;
};
template<typename PlainObjectType, int Options, typename StrideType> class Ref
: public RefBase<Ref<PlainObjectType, Options, StrideType> >
{
typedef internal::traits<Ref> Traits;
template<typename Derived>
inline Ref(const PlainObjectBase<Derived>& expr);
public:
typedef RefBase<Ref> Base;
EIGEN_DENSE_PUBLIC_INTERFACE(Ref)
#ifndef EIGEN_PARSED_BY_DOXYGEN
template<typename Derived>
inline Ref(PlainObjectBase<Derived>& expr)
{
EIGEN_STATIC_ASSERT(static_cast<bool>(Traits::template match<Derived>::MatchAtCompileTime), STORAGE_LAYOUT_DOES_NOT_MATCH);
Base::construct(expr.derived());
}
template<typename Derived>
inline Ref(const DenseBase<Derived>& expr)
#else
template<typename Derived>
inline Ref(DenseBase<Derived>& expr)
#endif
{
EIGEN_STATIC_ASSERT(static_cast<bool>(internal::is_lvalue<Derived>::value), THIS_EXPRESSION_IS_NOT_A_LVALUE__IT_IS_READ_ONLY);
EIGEN_STATIC_ASSERT(static_cast<bool>(Traits::template match<Derived>::MatchAtCompileTime), STORAGE_LAYOUT_DOES_NOT_MATCH);
enum { THIS_EXPRESSION_IS_NOT_A_LVALUE__IT_IS_READ_ONLY = Derived::ThisConstantIsPrivateInPlainObjectBase};
Base::construct(expr.const_cast_derived());
}
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Ref)
};
// this is the const ref version
template<typename TPlainObjectType, int Options, typename StrideType> class Ref<const TPlainObjectType, Options, StrideType>
: public RefBase<Ref<const TPlainObjectType, Options, StrideType> >
{
typedef internal::traits<Ref> Traits;
public:
typedef RefBase<Ref> Base;
EIGEN_DENSE_PUBLIC_INTERFACE(Ref)
template<typename Derived>
inline Ref(const DenseBase<Derived>& expr)
{
// std::cout << match_helper<Derived>::HasDirectAccess << "," << match_helper<Derived>::OuterStrideMatch << "," << match_helper<Derived>::InnerStrideMatch << "\n";
// std::cout << int(StrideType::OuterStrideAtCompileTime) << " - " << int(Derived::OuterStrideAtCompileTime) << "\n";
// std::cout << int(StrideType::InnerStrideAtCompileTime) << " - " << int(Derived::InnerStrideAtCompileTime) << "\n";
construct(expr.derived(), typename Traits::template match<Derived>::type());
}
protected:
template<typename Expression>
void construct(const Expression& expr,internal::true_type)
{
Base::construct(expr);
}
template<typename Expression>
void construct(const Expression& expr, internal::false_type)
{
m_object.lazyAssign(expr);
Base::construct(m_object);
}
protected:
TPlainObjectType m_object;
};
} // end namespace Eigen
#endif // EIGEN_REF_H
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" version="1.0" default-locale="en-US">
<!-- Elsevier - Generated with https://github.com/citation-style-language/utilities/tree/master/generate_dependent_styles -->
<info>
<title>Journal of Complexity</title>
<id>http://www.zotero.org/styles/journal-of-complexity</id>
<link href="http://www.zotero.org/styles/journal-of-complexity" rel="self"/>
<link href="http://www.zotero.org/styles/elsevier-with-titles" rel="independent-parent"/>
<category citation-format="numeric"/>
<issn>0885-064X</issn>
<updated>2013-08-19T12:00:00+00:00</updated>
<rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
</info>
</style>
| {
"pile_set_name": "Github"
} |
'use strict'
// Template version: 1.3.1
// see http://vuejs-templates.github.io/webpack for documentation.
const path = require('path')
module.exports = {
dev: {
// Paths
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {},
// Various Dev Server settings
host: 'localhost', // can be overwritten by process.env.HOST
port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: false,
errorOverlay: true,
notifyOnErrors: true,
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
/**
* Source Maps
*/
// https://webpack.js.org/configuration/devtool/#development
devtool: 'cheap-module-eval-source-map',
// If you have problems debugging vue-files in devtools,
// set this to false - it *may* help
// https://vue-loader.vuejs.org/en/options.html#cachebusting
cacheBusting: true,
cssSourceMap: true
},
build: {
// Template for index.html
index: path.resolve(__dirname, '../dist/index.html'),
// Paths
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
assetsPublicPath: '/',
/**
* Source Maps
*/
productionSourceMap: true,
// https://webpack.js.org/configuration/devtool/#production
devtool: '#source-map',
// Gzip off by default as many popular static hosts such as
// Surge or Netlify already gzip all static assets for you.
// Before setting to `true`, make sure to:
// npm install --save-dev compression-webpack-plugin
productionGzip: false,
productionGzipExtensions: ['js', 'css'],
// Run the build command with an extra argument to
// View the bundle analyzer report after build finishes:
// `npm run build --report`
// Set to `true` or `false` to always turn it on or off
bundleAnalyzerReport: process.env.npm_config_report
}
}
| {
"pile_set_name": "Github"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.