text
stringlengths 4
5.48M
| meta
stringlengths 14
6.54k
|
---|---|
var util = require('util');
var LuisActions = require('../core');
var FindHotelsAction = {
intentName: 'FindHotels',
friendlyName: 'Find Hotel Room',
confirmOnContextSwitch: true, // true by default
// Property validation based on schema-inspector - https://github.com/Atinux/schema-inspector#v_properties
schema: {
Place: {
type: 'string',
builtInType: LuisActions.BuiltInTypes.Geography.City,
message: 'Please provide a location'
},
Checkin: {
type: 'date',
builtInType: LuisActions.BuiltInTypes.DateTime.Date,
validDate: true, message: 'Please provide the check-in date'
},
Checkout: {
type: 'date',
builtInType: LuisActions.BuiltInTypes.DateTime.Date,
validDate: true, message: 'Please provide the check-out date'
},
Category: {
type: 'string',
optional: true
},
RoomType: {
type: 'string',
optional: true
}
},
// Action fulfillment method, recieves parameters as keyed-object (parameters argument) and a callback function to invoke with the fulfillment result.
fulfill: function (parameters, callback) {
callback(util.format('Sorry, there are no %s rooms available at %s for your chosen dates (%s) to (%s), please try another search.',
parameters.RoomType || '', parameters.Place, formatDate(parameters.Checkin), formatDate(parameters.Checkout)));
}
};
// Contextual action that changes location for the FindHotelsAction
var FindHotelsAction_ChangeLocation = {
intentName: 'FindHotels-ChangeLocation',
friendlyName: 'Change the Hotel Location',
parentAction: FindHotelsAction,
canExecuteWithoutContext: true, // true by default
schema: {
Place: {
type: 'string',
builtInType: LuisActions.BuiltInTypes.Geography.City,
message: 'Please provide a new location for your hotel'
}
},
fulfill: function (parameters, callback, parentContextParameters) {
// assign new location to FindHotelsAction
parentContextParameters.Place = parameters.Place;
callback('Hotel location changed to ' + parameters.Place);
}
};
// Contextual action that changes Checkin for the FindHotelsAction
var FindHotelsAction_ChangeCheckin = {
intentName: 'FindHotels-ChangeCheckin',
friendlyName: 'Change the hotel check-in date',
parentAction: FindHotelsAction,
canExecuteWithoutContext: false,
schema: {
Checkin: {
type: 'date',
builtInType: LuisActions.BuiltInTypes.DateTime.Date,
validDate: true, message: 'Please provide the new check-in date'
}
},
fulfill: function (parameters, callback, parentContextParameters) {
parentContextParameters.Checkin = parameters.Checkin;
callback('Hotel check-in date changed to ' + formatDate(parameters.Checkin));
}
};
// Contextual action that changes CheckOut for the FindHotelsAction
var FindHotelsAction_ChangeCheckout = {
intentName: 'FindHotels-ChangeCheckout',
friendlyName: 'Change the hotel check-out date',
parentAction: FindHotelsAction,
canExecuteWithoutContext: false,
schema: {
Checkout: {
type: 'date',
builtInType: LuisActions.BuiltInTypes.DateTime.Date,
validDate: true, message: 'Please provide the new check-out date'
}
},
fulfill: function (parameters, callback, parentContextParameters) {
parentContextParameters.Checkout = parameters.Checkout;
callback('Hotel check-out date changed to ' + formatDate(parameters.Checkout));
}
};
module.exports = [
FindHotelsAction,
FindHotelsAction_ChangeLocation,
FindHotelsAction_ChangeCheckin,
FindHotelsAction_ChangeCheckout
];
function formatDate(date) {
var offset = date.getTimezoneOffset() * 60000;
return new Date(date.getTime() + offset).toDateString();
} | {'content_hash': '363d085d6c0d0d1eceeac7303e08c1ae', 'timestamp': '', 'source': 'github', 'line_count': 110, 'max_line_length': 154, 'avg_line_length': 37.1, 'alnum_prop': 0.6571918647390346, 'repo_name': 'DeniseMak/bot-projects', 'id': '1e6d8b115f7dd1084a76703efa2a2399f07e6e34', 'size': '4081', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'Node/blog-LUISActionBinding/samples/hotels.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'ASP', 'bytes': '545'}, {'name': 'C#', 'bytes': '138943'}, {'name': 'CSS', 'bytes': '1226'}, {'name': 'HTML', 'bytes': '8382'}, {'name': 'JavaScript', 'bytes': '203089'}]} |
package org.apache.syncope.client.cli.commands.task;
import java.util.LinkedList;
import javax.xml.ws.WebServiceException;
import org.apache.syncope.client.cli.Input;
import org.apache.syncope.common.lib.SyncopeClientException;
import org.apache.syncope.common.lib.to.AbstractTaskTO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class TaskRead extends AbstractTaskCommand {
private static final Logger LOG = LoggerFactory.getLogger(TaskRead.class);
private static final String READ_HELP_MESSAGE = "task --read {TASK-KEY} {TASK-KEY} [...]";
private final Input input;
public TaskRead(final Input input) {
this.input = input;
}
public void read() {
if (input.parameterNumber() >= 1) {
final LinkedList<AbstractTaskTO> taskTOs = new LinkedList<>();
for (final String parameter : input.getParameters()) {
try {
taskTOs.add(taskSyncopeOperations.read(parameter));
} catch (final NumberFormatException ex) {
LOG.error("Error reading task", ex);
taskResultManager.notBooleanDeletedError("task", parameter);
} catch (final SyncopeClientException | WebServiceException ex) {
LOG.error("Error reading task", ex);
if (ex.getMessage().startsWith("NotFound")) {
taskResultManager.notFoundError("Task", parameter);
} else {
taskResultManager.genericError(ex.getMessage());
}
break;
}
}
taskResultManager.printTasks(taskTOs);
} else {
taskResultManager.commandOptionError(READ_HELP_MESSAGE);
}
}
}
| {'content_hash': 'f30ddb6f56a13e18c26d34c6819b306a', 'timestamp': '', 'source': 'github', 'line_count': 48, 'max_line_length': 94, 'avg_line_length': 37.541666666666664, 'alnum_prop': 0.6082130965593785, 'repo_name': 'giacomolm/syncope', 'id': 'b1fd01ab335fdd0509a08900358f8f615361125e', 'size': '2609', 'binary': False, 'copies': '3', 'ref': 'refs/heads/master', 'path': 'client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskRead.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Batchfile', 'bytes': '2079'}, {'name': 'CSS', 'bytes': '254597'}, {'name': 'Groovy', 'bytes': '34664'}, {'name': 'HTML', 'bytes': '393522'}, {'name': 'Java', 'bytes': '7855706'}, {'name': 'JavaScript', 'bytes': '129179'}, {'name': 'PLpgSQL', 'bytes': '20311'}, {'name': 'Shell', 'bytes': '12870'}, {'name': 'XSLT', 'bytes': '25736'}]} |
require_relative '../spec_helper'
describe ActiveEvent::EventServer do
class TestEvent
end
before :all do
@server = ActiveEvent::EventServer.instance
@event = TestEvent.new
end
describe 'resend_events_after' do
it 'starts the replay server if its not running' do
expect(ActiveEvent::ReplayServer).to receive(:start)
@server.resend_events_after(1).join
end
it 'updates the replay server if its running' do
@server.instance_variable_set(:@replay_server_thread, Thread.new { sleep 1 })
expect(ActiveEvent::ReplayServer).to receive(:update)
@server.resend_events_after 1
end
end
it 'publishes an event' do
allow(@server).to receive(:event_exchange).and_return(Object)
expect(@server.event_exchange).to receive(:publish).with('Test2', type: 'TestEvent', headers: 'Test')
expect(@event).to receive(:store_infos).and_return('Test')
expect(@event).to receive(:to_json).and_return('Test2')
@server.class.publish(@event)
end
end
| {'content_hash': 'ef375c92e286fdc5940101f325b30c5b', 'timestamp': '', 'source': 'github', 'line_count': 29, 'max_line_length': 105, 'avg_line_length': 34.86206896551724, 'alnum_prop': 0.6983184965380811, 'repo_name': 'hicknhack-software/rails-disco', 'id': '293e8324dff9d719d5b100f1428c15ee583c9989', 'size': '1011', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'active_event/spec/lib/event_server_spec.rb', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '173'}, {'name': 'HTML', 'bytes': '1650'}, {'name': 'JavaScript', 'bytes': '743'}, {'name': 'Ruby', 'bytes': '120093'}]} |
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v6.4.2
* @link http://www.ag-grid.com/
* @license MIT
*/
var utils_1 = require('../utils');
var BorderLayout = (function () {
function BorderLayout(params) {
this.centerHeightLastTime = -1;
this.centerWidthLastTime = -1;
this.centerLeftMarginLastTime = -1;
this.visibleLastTime = false;
this.sizeChangeListeners = [];
this.isLayoutPanel = true;
this.fullHeight = !params.north && !params.south;
var template;
if (!params.dontFill) {
if (this.fullHeight) {
template = BorderLayout.TEMPLATE_FULL_HEIGHT;
}
else {
template = BorderLayout.TEMPLATE_NORMAL;
}
this.layoutActive = true;
}
else {
template = BorderLayout.TEMPLATE_DONT_FILL;
this.layoutActive = false;
}
this.eGui = utils_1.Utils.loadTemplate(template);
this.id = 'borderLayout';
if (params.name) {
this.id += '_' + params.name;
}
this.eGui.setAttribute('id', this.id);
this.childPanels = [];
if (params) {
this.setupPanels(params);
}
this.overlays = params.overlays;
this.setupOverlays();
}
BorderLayout.prototype.addSizeChangeListener = function (listener) {
this.sizeChangeListeners.push(listener);
};
BorderLayout.prototype.fireSizeChanged = function () {
this.sizeChangeListeners.forEach(function (listener) {
listener();
});
};
BorderLayout.prototype.setupPanels = function (params) {
this.eNorthWrapper = this.eGui.querySelector('#north');
this.eSouthWrapper = this.eGui.querySelector('#south');
this.eEastWrapper = this.eGui.querySelector('#east');
this.eWestWrapper = this.eGui.querySelector('#west');
this.eCenterWrapper = this.eGui.querySelector('#center');
this.eOverlayWrapper = this.eGui.querySelector('#overlay');
this.eCenterRow = this.eGui.querySelector('#centerRow');
this.eNorthChildLayout = this.setupPanel(params.north, this.eNorthWrapper);
this.eSouthChildLayout = this.setupPanel(params.south, this.eSouthWrapper);
this.eEastChildLayout = this.setupPanel(params.east, this.eEastWrapper);
this.eWestChildLayout = this.setupPanel(params.west, this.eWestWrapper);
this.eCenterChildLayout = this.setupPanel(params.center, this.eCenterWrapper);
};
BorderLayout.prototype.setupPanel = function (content, ePanel) {
if (!ePanel) {
return;
}
if (content) {
if (content.isLayoutPanel) {
this.childPanels.push(content);
ePanel.appendChild(content.getGui());
return content;
}
else {
ePanel.appendChild(content);
return null;
}
}
else {
ePanel.parentNode.removeChild(ePanel);
return null;
}
};
BorderLayout.prototype.getGui = function () {
return this.eGui;
};
// returns true if any item changed size, otherwise returns false
BorderLayout.prototype.doLayout = function () {
var _this = this;
var isVisible = utils_1.Utils.isVisible(this.eGui);
if (!isVisible) {
this.visibleLastTime = false;
return false;
}
var atLeastOneChanged = false;
if (this.visibleLastTime !== isVisible) {
atLeastOneChanged = true;
}
this.visibleLastTime = true;
var childLayouts = [this.eNorthChildLayout, this.eSouthChildLayout, this.eEastChildLayout, this.eWestChildLayout];
childLayouts.forEach(function (childLayout) {
var childChangedSize = _this.layoutChild(childLayout);
if (childChangedSize) {
atLeastOneChanged = true;
}
});
if (this.layoutActive) {
var ourHeightChanged = this.layoutHeight();
var ourWidthChanged = this.layoutWidth();
if (ourHeightChanged || ourWidthChanged) {
atLeastOneChanged = true;
}
}
var centerChanged = this.layoutChild(this.eCenterChildLayout);
if (centerChanged) {
atLeastOneChanged = true;
}
if (atLeastOneChanged) {
this.fireSizeChanged();
}
return atLeastOneChanged;
};
BorderLayout.prototype.layoutChild = function (childPanel) {
if (childPanel) {
return childPanel.doLayout();
}
else {
return false;
}
};
BorderLayout.prototype.layoutHeight = function () {
if (this.fullHeight) {
return this.layoutHeightFullHeight();
}
else {
return this.layoutHeightNormal();
}
};
// full height never changes the height, because the center is always 100%,
// however we do check for change, to inform the listeners
BorderLayout.prototype.layoutHeightFullHeight = function () {
var centerHeight = utils_1.Utils.offsetHeight(this.eGui);
if (centerHeight < 0) {
centerHeight = 0;
}
if (this.centerHeightLastTime !== centerHeight) {
this.centerHeightLastTime = centerHeight;
return true;
}
else {
return false;
}
};
BorderLayout.prototype.layoutHeightNormal = function () {
var totalHeight = utils_1.Utils.offsetHeight(this.eGui);
var northHeight = utils_1.Utils.offsetHeight(this.eNorthWrapper);
var southHeight = utils_1.Utils.offsetHeight(this.eSouthWrapper);
var centerHeight = totalHeight - northHeight - southHeight;
if (centerHeight < 0) {
centerHeight = 0;
}
if (this.centerHeightLastTime !== centerHeight) {
this.eCenterRow.style.height = centerHeight + 'px';
this.centerHeightLastTime = centerHeight;
return true; // return true because there was a change
}
else {
return false;
}
};
BorderLayout.prototype.getCentreHeight = function () {
return this.centerHeightLastTime;
};
BorderLayout.prototype.layoutWidth = function () {
var totalWidth = utils_1.Utils.offsetWidth(this.eGui);
var eastWidth = utils_1.Utils.offsetWidth(this.eEastWrapper);
var westWidth = utils_1.Utils.offsetWidth(this.eWestWrapper);
var centerWidth = totalWidth - eastWidth - westWidth;
if (centerWidth < 0) {
centerWidth = 0;
}
var atLeastOneChanged = false;
if (this.centerLeftMarginLastTime !== westWidth) {
this.centerLeftMarginLastTime = westWidth;
this.eCenterWrapper.style.marginLeft = westWidth + 'px';
atLeastOneChanged = true;
}
if (this.centerWidthLastTime !== centerWidth) {
this.centerWidthLastTime = centerWidth;
this.eCenterWrapper.style.width = centerWidth + 'px';
atLeastOneChanged = true;
}
return atLeastOneChanged;
};
BorderLayout.prototype.setEastVisible = function (visible) {
if (this.eEastWrapper) {
this.eEastWrapper.style.display = visible ? '' : 'none';
}
this.doLayout();
};
BorderLayout.prototype.setupOverlays = function () {
// if no overlays, just remove the panel
if (!this.overlays) {
this.eOverlayWrapper.parentNode.removeChild(this.eOverlayWrapper);
return;
}
this.hideOverlay();
};
BorderLayout.prototype.hideOverlay = function () {
utils_1.Utils.removeAllChildren(this.eOverlayWrapper);
this.eOverlayWrapper.style.display = 'none';
};
BorderLayout.prototype.showOverlay = function (key) {
var overlay = this.overlays ? this.overlays[key] : null;
if (overlay) {
utils_1.Utils.removeAllChildren(this.eOverlayWrapper);
this.eOverlayWrapper.style.display = '';
this.eOverlayWrapper.appendChild(overlay);
}
else {
console.log('ag-Grid: unknown overlay');
this.hideOverlay();
}
};
BorderLayout.TEMPLATE_FULL_HEIGHT = '<div class="ag-bl ag-bl-full-height">' +
' <div class="ag-bl-west ag-bl-full-height-west" id="west"></div>' +
' <div class="ag-bl-east ag-bl-full-height-east" id="east"></div>' +
' <div class="ag-bl-center ag-bl-full-height-center" id="center"></div>' +
' <div class="ag-bl-overlay" id="overlay"></div>' +
'</div>';
BorderLayout.TEMPLATE_NORMAL = '<div class="ag-bl ag-bl-normal">' +
' <div id="north"></div>' +
' <div class="ag-bl-center-row ag-bl-normal-center-row" id="centerRow">' +
' <div class="ag-bl-west ag-bl-normal-west" id="west"></div>' +
' <div class="ag-bl-east ag-bl-normal-east" id="east"></div>' +
' <div class="ag-bl-center ag-bl-normal-center" id="center"></div>' +
' </div>' +
' <div id="south"></div>' +
' <div class="ag-bl-overlay" id="overlay"></div>' +
'</div>';
BorderLayout.TEMPLATE_DONT_FILL = '<div class="ag-bl ag-bl-dont-fill">' +
' <div id="north"></div>' +
' <div id="centerRow">' +
' <div id="west"></div>' +
' <div id="east"></div>' +
' <div id="center"></div>' +
' </div>' +
' <div id="south"></div>' +
' <div class="ag-bl-overlay" id="overlay"></div>' +
'</div>';
return BorderLayout;
})();
exports.BorderLayout = BorderLayout;
| {'content_hash': 'fbfd81c8bff1329d290a8fc3b7f33c6a', 'timestamp': '', 'source': 'github', 'line_count': 255, 'max_line_length': 122, 'avg_line_length': 38.89411764705882, 'alnum_prop': 0.5796531558782012, 'repo_name': 'dc-js/cdnjs', 'id': '4f7cc57f9f01c37c1961e81752217e458bb37bc2', 'size': '9918', 'binary': False, 'copies': '39', 'ref': 'refs/heads/master', 'path': 'ajax/libs/ag-grid/6.4.2/lib/layout/borderLayout.js', 'mode': '33188', 'license': 'mit', 'language': []} |
namespace {
class CreateDirWorkItemTest : public testing::Test {
protected:
void SetUp() override { ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); }
base::ScopedTempDir temp_dir_;
};
};
TEST_F(CreateDirWorkItemTest, CreatePath) {
base::FilePath parent_dir(temp_dir_.path());
parent_dir = parent_dir.AppendASCII("a");
base::CreateDirectory(parent_dir);
ASSERT_TRUE(base::PathExists(parent_dir));
base::FilePath top_dir_to_create(parent_dir);
top_dir_to_create = top_dir_to_create.AppendASCII("b");
base::FilePath dir_to_create(top_dir_to_create);
dir_to_create = dir_to_create.AppendASCII("c");
dir_to_create = dir_to_create.AppendASCII("d");
std::unique_ptr<CreateDirWorkItem> work_item(
WorkItem::CreateCreateDirWorkItem(dir_to_create));
EXPECT_TRUE(work_item->Do());
EXPECT_TRUE(base::PathExists(dir_to_create));
work_item->Rollback();
// Rollback should delete all the paths up to top_dir_to_create.
EXPECT_FALSE(base::PathExists(top_dir_to_create));
EXPECT_TRUE(base::PathExists(parent_dir));
}
TEST_F(CreateDirWorkItemTest, CreateExistingPath) {
base::FilePath dir_to_create(temp_dir_.path());
dir_to_create = dir_to_create.AppendASCII("aa");
base::CreateDirectory(dir_to_create);
ASSERT_TRUE(base::PathExists(dir_to_create));
std::unique_ptr<CreateDirWorkItem> work_item(
WorkItem::CreateCreateDirWorkItem(dir_to_create));
EXPECT_TRUE(work_item->Do());
EXPECT_TRUE(base::PathExists(dir_to_create));
work_item->Rollback();
// Rollback should not remove the path since it exists before
// the CreateDirWorkItem is called.
EXPECT_TRUE(base::PathExists(dir_to_create));
}
TEST_F(CreateDirWorkItemTest, CreateSharedPath) {
base::FilePath dir_to_create_1(temp_dir_.path());
dir_to_create_1 = dir_to_create_1.AppendASCII("aaa");
base::FilePath dir_to_create_2(dir_to_create_1);
dir_to_create_2 = dir_to_create_2.AppendASCII("bbb");
base::FilePath dir_to_create_3(dir_to_create_2);
dir_to_create_3 = dir_to_create_3.AppendASCII("ccc");
std::unique_ptr<CreateDirWorkItem> work_item(
WorkItem::CreateCreateDirWorkItem(dir_to_create_3));
EXPECT_TRUE(work_item->Do());
EXPECT_TRUE(base::PathExists(dir_to_create_3));
// Create another directory under dir_to_create_2
base::FilePath dir_to_create_4(dir_to_create_2);
dir_to_create_4 = dir_to_create_4.AppendASCII("ddd");
base::CreateDirectory(dir_to_create_4);
ASSERT_TRUE(base::PathExists(dir_to_create_4));
work_item->Rollback();
// Rollback should delete dir_to_create_3.
EXPECT_FALSE(base::PathExists(dir_to_create_3));
// Rollback should not delete dir_to_create_2 as it is shared.
EXPECT_TRUE(base::PathExists(dir_to_create_2));
EXPECT_TRUE(base::PathExists(dir_to_create_4));
}
TEST_F(CreateDirWorkItemTest, RollbackWithMissingDir) {
base::FilePath dir_to_create_1(temp_dir_.path());
dir_to_create_1 = dir_to_create_1.AppendASCII("aaaa");
base::FilePath dir_to_create_2(dir_to_create_1);
dir_to_create_2 = dir_to_create_2.AppendASCII("bbbb");
base::FilePath dir_to_create_3(dir_to_create_2);
dir_to_create_3 = dir_to_create_3.AppendASCII("cccc");
std::unique_ptr<CreateDirWorkItem> work_item(
WorkItem::CreateCreateDirWorkItem(dir_to_create_3));
EXPECT_TRUE(work_item->Do());
EXPECT_TRUE(base::PathExists(dir_to_create_3));
RemoveDirectory(dir_to_create_3.value().c_str());
ASSERT_FALSE(base::PathExists(dir_to_create_3));
work_item->Rollback();
// dir_to_create_3 has already been deleted, Rollback should delete
// the rest.
EXPECT_FALSE(base::PathExists(dir_to_create_1));
}
| {'content_hash': '552d820db6538134e17a84c99b557f28', 'timestamp': '', 'source': 'github', 'line_count': 115, 'max_line_length': 75, 'avg_line_length': 31.51304347826087, 'alnum_prop': 0.7077814569536424, 'repo_name': 'heke123/chromium-crosswalk', 'id': 'dca22367570c41fcbff31aa211efe534b554472e', 'size': '4126', 'binary': False, 'copies': '5', 'ref': 'refs/heads/master', 'path': 'chrome/installer/util/create_dir_work_item_unittest.cc', 'mode': '33188', 'license': 'bsd-3-clause', 'language': []} |
package com.graphhopper.jsprit.core.algorithm.ruin;
import com.graphhopper.jsprit.core.algorithm.ruin.distance.AvgServiceAndShipmentDistance;
import com.graphhopper.jsprit.core.problem.Location;
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
import com.graphhopper.jsprit.core.problem.job.Job;
import com.graphhopper.jsprit.core.problem.job.Service;
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
import com.graphhopper.jsprit.core.problem.vehicle.VehicleImpl;
import com.graphhopper.jsprit.core.util.RandomNumberGeneration;
import junit.framework.Assert;
import org.junit.Test;
import java.util.Arrays;
import java.util.Collection;
import java.util.Random;
/**
* Created by schroeder on 06/03/15.
*/
public class RuinClustersTest {
@Test
public void itShouldRuinTwoObviousClusters() {
Service s0 = Service.Builder.newInstance("s0").setLocation(Location.newInstance(9, 0)).build();
Service s1 = Service.Builder.newInstance("s1").setLocation(Location.newInstance(9, 1)).build();
Service s2 = Service.Builder.newInstance("s2").setLocation(Location.newInstance(9, 10)).build();
Service s3 = Service.Builder.newInstance("s3").setLocation(Location.newInstance(9, 9)).build();
Service s4 = Service.Builder.newInstance("s4").setLocation(Location.newInstance(9, 16)).build();
Service s5 = Service.Builder.newInstance("s5").setLocation(Location.newInstance(9, 17)).build();
Service s6 = Service.Builder.newInstance("s6").setLocation(Location.newInstance(9, 15.5)).build();
Service s7 = Service.Builder.newInstance("s7").setLocation(Location.newInstance(9, 30)).build();
VehicleImpl v = VehicleImpl.Builder.newInstance("v").setStartLocation(Location.newInstance(0, 0)).build();
VehicleRoutingProblem vrp = VehicleRoutingProblem.Builder.newInstance().addJob(s1).addJob(s2)
.addJob(s6).addJob(s7).addJob(s0).addJob(s3).addJob(s4).addJob(s5).addVehicle(v).build();
VehicleRoute vr1 = VehicleRoute.Builder.newInstance(v).addService(s0).addService(s1).addService(s2).addService(s3).setJobActivityFactory(vrp.getJobActivityFactory()).build();
VehicleRoute vr2 = VehicleRoute.Builder.newInstance(v)
.addService(s6).addService(s7).addService(s4).addService(s5).setJobActivityFactory(vrp.getJobActivityFactory()).build();
JobNeighborhoods n = new JobNeighborhoodsFactory().createNeighborhoods(vrp, new AvgServiceAndShipmentDistance(vrp.getTransportCosts()));
n.initialise();
RuinClusters rc = new RuinClusters(vrp, 5, n);
Random r = RandomNumberGeneration.newInstance();
rc.setRandom(r);
Collection<Job> ruined = rc.ruinRoutes(Arrays.asList(vr1, vr2));
Assert.assertEquals(5, ruined.size());
}
}
| {'content_hash': '16845c65a72fcffbd847cfdff03cd7e7', 'timestamp': '', 'source': 'github', 'line_count': 56, 'max_line_length': 182, 'avg_line_length': 50.42857142857143, 'alnum_prop': 0.7407932011331445, 'repo_name': 'terryturner/VRPinGMapFx', 'id': '93e23eb2269369cb8302c12e34beeb45cf2972ba', 'size': '3617', 'binary': False, 'copies': '9', 'ref': 'refs/heads/master', 'path': 'jsprit-master/jsprit-core/src/test/java/com/graphhopper/jsprit/core/algorithm/ruin/RuinClustersTest.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '1912'}, {'name': 'HTML', 'bytes': '15898'}, {'name': 'Java', 'bytes': '3253124'}, {'name': 'JavaScript', 'bytes': '45837'}]} |
module Ebay # :nodoc:
module Types # :nodoc:
class ListingSubtypeCode
extend Enumerable
extend Enumeration
ClassifiedAd = 'ClassifiedAd'
LocalMarketBestOfferOnly = 'LocalMarketBestOfferOnly'
end
end
end
| {'content_hash': 'd8da68653cf871b51df3241edb3905db', 'timestamp': '', 'source': 'github', 'line_count': 11, 'max_line_length': 59, 'avg_line_length': 21.818181818181817, 'alnum_prop': 0.7, 'repo_name': 'CPlus/ebayapi-19', 'id': '9198d930f610a0ac716e302ff322b9539e0f1f32', 'size': '240', 'binary': False, 'copies': '11', 'ref': 'refs/heads/master', 'path': 'lib/ebay/types/listing_subtype_code.rb', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Ruby', 'bytes': '1187019'}]} |
<component name="libraryTable">
<library name="support-annotations-24.2.1">
<CLASSES>
<root url="jar://F:/AndroidStudio_SDK/extras/android/m2repository/com/android/support/support-annotations/24.2.1/support-annotations-24.2.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://F:/AndroidStudio_SDK/extras/android/m2repository/com/android/support/support-annotations/24.2.1/support-annotations-24.2.1-sources.jar!/" />
<root url="jar://D:/StudioSDK/extras/android/m2repository/com/android/support/support-annotations/24.2.1/support-annotations-24.2.1-sources.jar!/" />
</SOURCES>
</library>
</component> | {'content_hash': 'be87e92dd4ee6fe921503b007ec28048', 'timestamp': '', 'source': 'github', 'line_count': 12, 'max_line_length': 163, 'avg_line_length': 54.416666666666664, 'alnum_prop': 0.7105666156202144, 'repo_name': 'SimpleCD/Other', 'id': '3bf9bab86499617bf1f5ee1fe3dcffc0a9837e02', 'size': '653', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': '.idea/libraries/support_annotations_24_2_1.xml', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Java', 'bytes': '8956'}]} |
title: Navigating by marker in Vim
date: "2017-07-12T19:17:57-04:00"
tags:
- Vim
- Neovim
---
If you use Vim, you would be amazed that you can still find something super useful after a long time. Marker navigation is the same case for me. I've used Vim for over a year, daily, and have a configuration of 800 lines, yet hadn't met that trick. But today is the day.
Try marking a position with a/b/c... for quick navigation and `''`for jumping back/forward; it's super easy and productive.
| normal mode shortcut | usage |
| -------------------- | ----------------------------------- |
| `m{mark name}` | e.g. `ma` for marking position a |
| `'{mark name]` | e.g. `ma` for jumping to position a |
| {'content_hash': '5c7c40941e620d71bd142b62760b0380', 'timestamp': '', 'source': 'github', 'line_count': 15, 'max_line_length': 270, 'avg_line_length': 49.86666666666667, 'alnum_prop': 0.6056149732620321, 'repo_name': 'wangsongiam/songwang.io', 'id': '0d76097310d0b327e3d2e7d529ce32003650dbce', 'size': '752', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'content/blog/navigating-by-marker-in-vim/index.md', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'JavaScript', 'bytes': '47499'}]} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/ads/googleads/v10/resources/account_budget.proto
namespace Google\Ads\GoogleAds\V10\Resources\AccountBudget;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* A pending proposal associated with the enclosing account-level budget,
* if applicable.
*
* Generated from protobuf message <code>google.ads.googleads.v10.resources.AccountBudget.PendingAccountBudgetProposal</code>
*/
class PendingAccountBudgetProposal extends \Google\Protobuf\Internal\Message
{
/**
* Output only. The resource name of the proposal.
* AccountBudgetProposal resource names have the form:
* `customers/{customer_id}/accountBudgetProposals/{account_budget_proposal_id}`
*
* Generated from protobuf field <code>optional string account_budget_proposal = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
*/
protected $account_budget_proposal = null;
/**
* Output only. The type of this proposal, e.g. END to end the budget associated
* with this proposal.
*
* Generated from protobuf field <code>.google.ads.googleads.v10.enums.AccountBudgetProposalTypeEnum.AccountBudgetProposalType proposal_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
*/
protected $proposal_type = 0;
/**
* Output only. The name to assign to the account-level budget.
*
* Generated from protobuf field <code>optional string name = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
*/
protected $name = null;
/**
* Output only. The start time in yyyy-MM-dd HH:mm:ss format.
*
* Generated from protobuf field <code>optional string start_date_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
*/
protected $start_date_time = null;
/**
* Output only. A purchase order number is a value that helps users reference this budget
* in their monthly invoices.
*
* Generated from protobuf field <code>optional string purchase_order_number = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
*/
protected $purchase_order_number = null;
/**
* Output only. Notes associated with this budget.
*
* Generated from protobuf field <code>optional string notes = 18 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
*/
protected $notes = null;
/**
* Output only. The time when this account-level budget proposal was created.
* Formatted as yyyy-MM-dd HH:mm:ss.
*
* Generated from protobuf field <code>optional string creation_date_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
*/
protected $creation_date_time = null;
protected $end_time;
protected $spending_limit;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $account_budget_proposal
* Output only. The resource name of the proposal.
* AccountBudgetProposal resource names have the form:
* `customers/{customer_id}/accountBudgetProposals/{account_budget_proposal_id}`
* @type int $proposal_type
* Output only. The type of this proposal, e.g. END to end the budget associated
* with this proposal.
* @type string $name
* Output only. The name to assign to the account-level budget.
* @type string $start_date_time
* Output only. The start time in yyyy-MM-dd HH:mm:ss format.
* @type string $purchase_order_number
* Output only. A purchase order number is a value that helps users reference this budget
* in their monthly invoices.
* @type string $notes
* Output only. Notes associated with this budget.
* @type string $creation_date_time
* Output only. The time when this account-level budget proposal was created.
* Formatted as yyyy-MM-dd HH:mm:ss.
* @type string $end_date_time
* Output only. The end time in yyyy-MM-dd HH:mm:ss format.
* @type int $end_time_type
* Output only. The end time as a well-defined type, e.g. FOREVER.
* @type int|string $spending_limit_micros
* Output only. The spending limit in micros. One million is equivalent to
* one unit.
* @type int $spending_limit_type
* Output only. The spending limit as a well-defined type, e.g. INFINITE.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Ads\GoogleAds\V10\Resources\AccountBudget::initOnce();
parent::__construct($data);
}
/**
* Output only. The resource name of the proposal.
* AccountBudgetProposal resource names have the form:
* `customers/{customer_id}/accountBudgetProposals/{account_budget_proposal_id}`
*
* Generated from protobuf field <code>optional string account_budget_proposal = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
* @return string
*/
public function getAccountBudgetProposal()
{
return isset($this->account_budget_proposal) ? $this->account_budget_proposal : '';
}
public function hasAccountBudgetProposal()
{
return isset($this->account_budget_proposal);
}
public function clearAccountBudgetProposal()
{
unset($this->account_budget_proposal);
}
/**
* Output only. The resource name of the proposal.
* AccountBudgetProposal resource names have the form:
* `customers/{customer_id}/accountBudgetProposals/{account_budget_proposal_id}`
*
* Generated from protobuf field <code>optional string account_budget_proposal = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
* @param string $var
* @return $this
*/
public function setAccountBudgetProposal($var)
{
GPBUtil::checkString($var, True);
$this->account_budget_proposal = $var;
return $this;
}
/**
* Output only. The type of this proposal, e.g. END to end the budget associated
* with this proposal.
*
* Generated from protobuf field <code>.google.ads.googleads.v10.enums.AccountBudgetProposalTypeEnum.AccountBudgetProposalType proposal_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @return int
*/
public function getProposalType()
{
return $this->proposal_type;
}
/**
* Output only. The type of this proposal, e.g. END to end the budget associated
* with this proposal.
*
* Generated from protobuf field <code>.google.ads.googleads.v10.enums.AccountBudgetProposalTypeEnum.AccountBudgetProposalType proposal_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @param int $var
* @return $this
*/
public function setProposalType($var)
{
GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V10\Enums\AccountBudgetProposalTypeEnum\AccountBudgetProposalType::class);
$this->proposal_type = $var;
return $this;
}
/**
* Output only. The name to assign to the account-level budget.
*
* Generated from protobuf field <code>optional string name = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @return string
*/
public function getName()
{
return isset($this->name) ? $this->name : '';
}
public function hasName()
{
return isset($this->name);
}
public function clearName()
{
unset($this->name);
}
/**
* Output only. The name to assign to the account-level budget.
*
* Generated from protobuf field <code>optional string name = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @param string $var
* @return $this
*/
public function setName($var)
{
GPBUtil::checkString($var, True);
$this->name = $var;
return $this;
}
/**
* Output only. The start time in yyyy-MM-dd HH:mm:ss format.
*
* Generated from protobuf field <code>optional string start_date_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @return string
*/
public function getStartDateTime()
{
return isset($this->start_date_time) ? $this->start_date_time : '';
}
public function hasStartDateTime()
{
return isset($this->start_date_time);
}
public function clearStartDateTime()
{
unset($this->start_date_time);
}
/**
* Output only. The start time in yyyy-MM-dd HH:mm:ss format.
*
* Generated from protobuf field <code>optional string start_date_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @param string $var
* @return $this
*/
public function setStartDateTime($var)
{
GPBUtil::checkString($var, True);
$this->start_date_time = $var;
return $this;
}
/**
* Output only. A purchase order number is a value that helps users reference this budget
* in their monthly invoices.
*
* Generated from protobuf field <code>optional string purchase_order_number = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @return string
*/
public function getPurchaseOrderNumber()
{
return isset($this->purchase_order_number) ? $this->purchase_order_number : '';
}
public function hasPurchaseOrderNumber()
{
return isset($this->purchase_order_number);
}
public function clearPurchaseOrderNumber()
{
unset($this->purchase_order_number);
}
/**
* Output only. A purchase order number is a value that helps users reference this budget
* in their monthly invoices.
*
* Generated from protobuf field <code>optional string purchase_order_number = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @param string $var
* @return $this
*/
public function setPurchaseOrderNumber($var)
{
GPBUtil::checkString($var, True);
$this->purchase_order_number = $var;
return $this;
}
/**
* Output only. Notes associated with this budget.
*
* Generated from protobuf field <code>optional string notes = 18 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @return string
*/
public function getNotes()
{
return isset($this->notes) ? $this->notes : '';
}
public function hasNotes()
{
return isset($this->notes);
}
public function clearNotes()
{
unset($this->notes);
}
/**
* Output only. Notes associated with this budget.
*
* Generated from protobuf field <code>optional string notes = 18 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @param string $var
* @return $this
*/
public function setNotes($var)
{
GPBUtil::checkString($var, True);
$this->notes = $var;
return $this;
}
/**
* Output only. The time when this account-level budget proposal was created.
* Formatted as yyyy-MM-dd HH:mm:ss.
*
* Generated from protobuf field <code>optional string creation_date_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @return string
*/
public function getCreationDateTime()
{
return isset($this->creation_date_time) ? $this->creation_date_time : '';
}
public function hasCreationDateTime()
{
return isset($this->creation_date_time);
}
public function clearCreationDateTime()
{
unset($this->creation_date_time);
}
/**
* Output only. The time when this account-level budget proposal was created.
* Formatted as yyyy-MM-dd HH:mm:ss.
*
* Generated from protobuf field <code>optional string creation_date_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @param string $var
* @return $this
*/
public function setCreationDateTime($var)
{
GPBUtil::checkString($var, True);
$this->creation_date_time = $var;
return $this;
}
/**
* Output only. The end time in yyyy-MM-dd HH:mm:ss format.
*
* Generated from protobuf field <code>string end_date_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @return string
*/
public function getEndDateTime()
{
return $this->readOneof(15);
}
public function hasEndDateTime()
{
return $this->hasOneof(15);
}
/**
* Output only. The end time in yyyy-MM-dd HH:mm:ss format.
*
* Generated from protobuf field <code>string end_date_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @param string $var
* @return $this
*/
public function setEndDateTime($var)
{
GPBUtil::checkString($var, True);
$this->writeOneof(15, $var);
return $this;
}
/**
* Output only. The end time as a well-defined type, e.g. FOREVER.
*
* Generated from protobuf field <code>.google.ads.googleads.v10.enums.TimeTypeEnum.TimeType end_time_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @return int
*/
public function getEndTimeType()
{
return $this->readOneof(6);
}
public function hasEndTimeType()
{
return $this->hasOneof(6);
}
/**
* Output only. The end time as a well-defined type, e.g. FOREVER.
*
* Generated from protobuf field <code>.google.ads.googleads.v10.enums.TimeTypeEnum.TimeType end_time_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @param int $var
* @return $this
*/
public function setEndTimeType($var)
{
GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V10\Enums\TimeTypeEnum\TimeType::class);
$this->writeOneof(6, $var);
return $this;
}
/**
* Output only. The spending limit in micros. One million is equivalent to
* one unit.
*
* Generated from protobuf field <code>int64 spending_limit_micros = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @return int|string
*/
public function getSpendingLimitMicros()
{
return $this->readOneof(16);
}
public function hasSpendingLimitMicros()
{
return $this->hasOneof(16);
}
/**
* Output only. The spending limit in micros. One million is equivalent to
* one unit.
*
* Generated from protobuf field <code>int64 spending_limit_micros = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @param int|string $var
* @return $this
*/
public function setSpendingLimitMicros($var)
{
GPBUtil::checkInt64($var);
$this->writeOneof(16, $var);
return $this;
}
/**
* Output only. The spending limit as a well-defined type, e.g. INFINITE.
*
* Generated from protobuf field <code>.google.ads.googleads.v10.enums.SpendingLimitTypeEnum.SpendingLimitType spending_limit_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @return int
*/
public function getSpendingLimitType()
{
return $this->readOneof(8);
}
public function hasSpendingLimitType()
{
return $this->hasOneof(8);
}
/**
* Output only. The spending limit as a well-defined type, e.g. INFINITE.
*
* Generated from protobuf field <code>.google.ads.googleads.v10.enums.SpendingLimitTypeEnum.SpendingLimitType spending_limit_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @param int $var
* @return $this
*/
public function setSpendingLimitType($var)
{
GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V10\Enums\SpendingLimitTypeEnum\SpendingLimitType::class);
$this->writeOneof(8, $var);
return $this;
}
/**
* @return string
*/
public function getEndTime()
{
return $this->whichOneof("end_time");
}
/**
* @return string
*/
public function getSpendingLimit()
{
return $this->whichOneof("spending_limit");
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(PendingAccountBudgetProposal::class, \Google\Ads\GoogleAds\V10\Resources\AccountBudget_PendingAccountBudgetProposal::class);
| {'content_hash': 'c916d2d7713566dd688013e6709655b9', 'timestamp': '', 'source': 'github', 'line_count': 508, 'max_line_length': 201, 'avg_line_length': 32.87795275590551, 'alnum_prop': 0.6292060831038199, 'repo_name': 'googleads/google-ads-php', 'id': 'b2a20926f75b2d23bcba80a07138e5b4d42a606c', 'size': '16702', 'binary': False, 'copies': '1', 'ref': 'refs/heads/main', 'path': 'src/Google/Ads/GoogleAds/V10/Resources/AccountBudget/PendingAccountBudgetProposal.php', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Dockerfile', 'bytes': '899'}, {'name': 'PHP', 'bytes': '9952711'}, {'name': 'Shell', 'bytes': '338'}]} |
"""Constants for the NFAndroidTV integration."""
DOMAIN: str = "nfandroidtv"
CONF_DURATION = "duration"
CONF_FONTSIZE = "fontsize"
CONF_POSITION = "position"
CONF_TRANSPARENCY = "transparency"
CONF_COLOR = "color"
CONF_INTERRUPT = "interrupt"
DEFAULT_NAME = "Android TV / Fire TV"
DEFAULT_TIMEOUT = 5
ATTR_DURATION = "duration"
ATTR_FONTSIZE = "fontsize"
ATTR_POSITION = "position"
ATTR_TRANSPARENCY = "transparency"
ATTR_COLOR = "color"
ATTR_BKGCOLOR = "bkgcolor"
ATTR_INTERRUPT = "interrupt"
ATTR_IMAGE = "image"
# Attributes contained in image
ATTR_IMAGE_URL = "url"
ATTR_IMAGE_PATH = "path"
ATTR_IMAGE_USERNAME = "username"
ATTR_IMAGE_PASSWORD = "password"
ATTR_IMAGE_AUTH = "auth"
ATTR_ICON = "icon"
# Attributes contained in icon
ATTR_ICON_URL = "url"
ATTR_ICON_PATH = "path"
ATTR_ICON_USERNAME = "username"
ATTR_ICON_PASSWORD = "password"
ATTR_ICON_AUTH = "auth"
# Any other value or absence of 'auth' lead to basic authentication being used
ATTR_IMAGE_AUTH_DIGEST = "digest"
ATTR_ICON_AUTH_DIGEST = "digest"
| {'content_hash': 'd55989448d3e5be2a0899d1508911dd8', 'timestamp': '', 'source': 'github', 'line_count': 36, 'max_line_length': 78, 'avg_line_length': 28.27777777777778, 'alnum_prop': 0.7337917485265226, 'repo_name': 'GenericStudent/home-assistant', 'id': '12449a9b0460d2cbc46b3b0ec241dd7be5f7b2ee', 'size': '1018', 'binary': False, 'copies': '5', 'ref': 'refs/heads/dev', 'path': 'homeassistant/components/nfandroidtv/const.py', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Dockerfile', 'bytes': '3070'}, {'name': 'Python', 'bytes': '44491729'}, {'name': 'Shell', 'bytes': '5092'}]} |
[View 1.X CHANGELOG](https://github.com/edgycircle/ember-pikaday/blob/stable-1/CHANGELOG.md)
## 2.2.2
- Fix infinite rendering invalidation detected (Contribution by [@jedrula](https://github.com/jedrula))
- Fix 2.12 deprecation of arguments in component life cycle hooks (Contribution by [@leizhao4](https://github.com/leizhao4))
- Fix enforcing minDate to allow null value (Contribution by [@ilucin](https://github.com/ilucin))
## 2.2.1
- Enforce current date to be between specified min & max date, also on changes of those (Contribution by [@showy](https://github.com/showy))
- Replace deprecated `Ember.K` syntax with JavaScript alternative (Contribution by [@locks](https://github.com/locks))
## 2.2.0
- Fix test helper. (Contribution by [@duizendnegen](https://github.com/duizendnegen))
- Use Pikaday through npm instead of bower. (Contribution by [@josemarluedke](https://github.com/josemarluedke))
- Fix setting date to wait after min / max date to be updated. (Contribution by [@sl249](https://github.com/sl249))
- Fix firing min/max date changes. (Contribution by [@patrickberkeley](https://github.com/patrickberkeley))
- Basic Fastboot compatibility, by merely rendering an input and excluding Pikaday.js in Fastboot mode. (Contribution by [@josemarluedke](https://github.com/josemarluedke))
- Support for modern `ember-i18n`. (Contribution by [@lcpriest](https://github.com/lcpriest))
## 2.1.0
- Remove Moment.js deprecation warning due to passed non-parsable arguments. (Contribution by [@mdentremont](https://github.com/mdentremont))
- Allow binding of `tabindex` attribute. (Contribution by [@FUT](https://github.com/FUT))
- Add inputless component. (Contribution by [@lan0](https://github.com/lan0))
## 2.0.0
- Add support for `onOpen`, `onClose` and `onDraw` actions. (Contribution by [@leizhao4](https://github.com/leizhao4))
## 2.0.0-beta.2
- Passed in values respect `useUTC` setting. (Contribution by [@DanLatimer](https://github.com/DanLatimer))
- Correctly call `onSelection` action when datepicker is cleared. (Contribution by [@DanLatimer](https://github.com/DanLatimer))
- Allow binding of `hidden` and `title` attributes. (Contribution by [@ykaragol](https://github.com/ykaragol))
## 2.0.0-beta.1
- Use the DDAU paradigm prefered by Ember. (Contribution by [@Fed03](https://github.com/Fed03))
- Support all Pikaday options via an hash. (Contribution by [@Fed03](https://github.com/Fed03))
| {'content_hash': 'fdb3d4fac1904b0cc28f71e0bca4def2', 'timestamp': '', 'source': 'github', 'line_count': 35, 'max_line_length': 172, 'avg_line_length': 69.25714285714285, 'alnum_prop': 0.7479372937293729, 'repo_name': 'leizhao4/ember-pikaday', 'id': '10e2c7768f9ee259b78720bee7b2b89bdba134ad', 'size': '2424', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'CHANGELOG.md', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '31'}, {'name': 'HTML', 'bytes': '2526'}, {'name': 'JavaScript', 'bytes': '33485'}]} |
<application>
<vendor>Apache Software Foundation (C) 2004</vendor>
<author>Daniel Florey</author>
<name>admin</name>
<version>1.0</version>
<display-name>Slide administration application</display-name>
<description>Administration application for Slide 2.x</description>
<dependencies>
<requires application="core" version="1.x"/>
</dependencies>
<content>
<processors uri="config/coreProcessors.xml" />
<processors uri="config/templateProcessors.xml" />
<processors uri="config/pageProcessors.xml" />
<messages uri="i18n/text.xml" />
<messages uri="i18n/sitemap.xml" />
<jobs uri="config/jobs.xml" />
<classes uri="classes/" />
</content>
</application> | {'content_hash': 'e016273e419c1789cc7dc9324ebb740c', 'timestamp': '', 'source': 'github', 'line_count': 20, 'max_line_length': 68, 'avg_line_length': 34.15, 'alnum_prop': 0.718887262079063, 'repo_name': 'integrated/jakarta-slide-server', 'id': '1bc9f26a1efa10b34ca4ccd162b9ae14ae2382ee', 'size': '683', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'projector/src/content/applications/admin/application.xml', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Java', 'bytes': '7980335'}, {'name': 'XSLT', 'bytes': '19468'}]} |
if (@available(iOS iOS_atLeast, *)) { \
NSMutableDictionary *attrs = [NSMutableDictionary dictionaryWithDictionary:@{ \
kFLEXPropertyAttributeKeyTypeEncoding : @(type), \
__VA_ARGS__ \
}]; \
[FLEXRuntimeUtility \
tryAddPropertyWithName:#name \
attributes:attrs \
toClass:cls \
]; \
} \
})
/// Takes: min iOS version, property name, target class, property type, and a list of attributes
#define FLEXRuntimeUtilityTryAddNonatomicProperty(iOS_atLeast, name, cls, type, ...) \
FLEXRuntimeUtilityTryAddProperty(iOS_atLeast, name, cls, @encode(type), PropertyKey(NonAtomic), __VA_ARGS__);
/// Takes: min iOS version, property name, target class, property type (class name), and a list of attributes
#define FLEXRuntimeUtilityTryAddObjectProperty(iOS_atLeast, name, cls, type, ...) \
FLEXRuntimeUtilityTryAddProperty(iOS_atLeast, name, cls, FLEXEncodeClass(type), PropertyKey(NonAtomic), __VA_ARGS__);
@interface FLEXRuntimeUtility : NSObject
// General Helpers
+ (BOOL)pointerIsValidObjcObject:(const void *)pointer;
/// Unwraps raw pointers to objects stored in NSValue, and re-boxes C strings into NSStrings.
+ (id)potentiallyUnwrapBoxedPointer:(id)returnedObjectOrNil type:(const FLEXTypeEncoding *)returnType;
/// Some fields have a name in their encoded string (e.g. \"width\"d)
/// @return the offset to skip the field name, 0 if there is no name
+ (NSUInteger)fieldNameOffsetForTypeEncoding:(const FLEXTypeEncoding *)typeEncoding;
/// Given name "foo" and type "int" this would return "int foo", but
/// given name "foo" and type "T *" it would return "T *foo"
+ (NSString *)appendName:(NSString *)name toType:(NSString *)typeEncoding;
/// @return The class hierarchy for the given object or class,
/// from the current class to the root-most class.
+ (NSArray<Class> *)classHierarchyOfObject:(id)objectOrClass;
/// Used to describe an object in brief within an explorer row
+ (NSString *)summaryForObject:(id)value;
+ (NSString *)safeDescriptionForObject:(id)object;
+ (NSString *)safeDebugDescriptionForObject:(id)object;
// Property Helpers
+ (BOOL)tryAddPropertyWithName:(const char *)name
attributes:(NSDictionary<NSString *, NSString *> *)attributePairs
toClass:(__unsafe_unretained Class)theClass;
+ (NSArray<NSString *> *)allPropertyAttributeKeys;
// Method Helpers
+ (NSArray *)prettyArgumentComponentsForMethod:(Method)method;
// Method Calling/Field Editing
+ (id)performSelector:(SEL)selector onObject:(id)object;
+ (id)performSelector:(SEL)selector
onObject:(id)object
withArguments:(NSArray *)arguments
error:(NSError * __autoreleasing *)error;
+ (NSString *)editableJSONStringForObject:(id)object;
+ (id)objectValueFromEditableJSONString:(NSString *)string;
+ (NSValue *)valueForNumberWithObjCType:(const char *)typeEncoding fromInputString:(NSString *)inputString;
+ (void)enumerateTypesInStructEncoding:(const char *)structEncoding
usingBlock:(void (^)(NSString *structName,
const char *fieldTypeEncoding,
NSString *prettyTypeEncoding,
NSUInteger fieldIndex,
NSUInteger fieldOffset))typeBlock;
+ (NSValue *)valueForPrimitivePointer:(void *)pointer objCType:(const char *)type;
#pragma mark - Metadata Helpers
+ (NSString *)readableTypeForEncoding:(NSString *)encodingString;
@end
| {'content_hash': '3ac8fb017dc332b67b7156d1faed708d', 'timestamp': '', 'source': 'github', 'line_count': 73, 'max_line_length': 121, 'avg_line_length': 49.602739726027394, 'alnum_prop': 0.6807511737089202, 'repo_name': 'NSExceptional/FLEX', 'id': 'ce34797e6c9b673fa43643f327a57d63349fb152', 'size': '4271', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'Classes/Utility/Runtime/FLEXRuntimeUtility.h', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'C', 'bytes': '6960'}, {'name': 'Objective-C', 'bytes': '1448930'}, {'name': 'Objective-C++', 'bytes': '5583'}, {'name': 'Ruby', 'bytes': '2764'}]} |
/*Problem 1. StringBuilder.Substring
* Implement an extension method Substring(int index, int length) for the class StringBuilder that returns new StringBuilder and has the same functionality as Substring in the class String.
*/
namespace StringBuilder.Substring
{
using System.Text;
public static class StringBuilderExtension
{
public static StringBuilder Substring(this StringBuilder input, int index, int length)
{
return new StringBuilder(input.ToString().Substring(index, length));
}
}
}
| {'content_hash': '88d766c238e93d51fff21f614b311894', 'timestamp': '', 'source': 'github', 'line_count': 15, 'max_line_length': 189, 'avg_line_length': 36.6, 'alnum_prop': 0.726775956284153, 'repo_name': 'YaneYosifov/TelerikAcademy', 'id': '5366f3a6e482323f22ac191cfc2ec73004c3f882', 'size': '551', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'C# OOP/Homeworks/03.Extension-Methods-Delegates-Lambda-LINQ/01.StringBuilder.Substring/StringBuilder.cs', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'ASP', 'bytes': '104820'}, {'name': 'Batchfile', 'bytes': '524'}, {'name': 'C#', 'bytes': '1470931'}, {'name': 'CSS', 'bytes': '83613'}, {'name': 'CoffeeScript', 'bytes': '3700'}, {'name': 'HTML', 'bytes': '271804'}, {'name': 'JavaScript', 'bytes': '412546'}, {'name': 'Python', 'bytes': '111725'}, {'name': 'Smalltalk', 'bytes': '219384'}, {'name': 'XSLT', 'bytes': '3327'}]} |
&& !defined(BOOST_INTERPROCESS_DISABLE_VARIADIC_TMPL)
#define BOOST_CONTAINERS_PERFECT_FORWARDING
#endif
#include <boost/container/detail/config_end.hpp>
#endif //#ifndef BOOST_CONTAINERS_DETAIL_WORKAROUND_HPP
| {'content_hash': '69d3dce45b205af844b429fcf3de9abc', 'timestamp': '', 'source': 'github', 'line_count': 8, 'max_line_length': 57, 'avg_line_length': 27.375, 'alnum_prop': 0.776255707762557, 'repo_name': 'ghisguth/tasks', 'id': '1d620815ea5fbe90e22d647570bc92447f10bb77', 'size': '867', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'libs/boost.move/boost/container/detail/workaround.hpp', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'C++', 'bytes': '838987'}]} |
import * as ts from 'typescript';
import {AbsoluteFsPath} from '../../../src/ngtsc/file_system';
import {NgccReflectionHost, SwitchableVariableDeclaration} from '../host/ngcc_host';
import {isWithinPackage} from './util';
export interface SwitchMarkerAnalysis {
sourceFile: ts.SourceFile;
declarations: SwitchableVariableDeclaration[];
}
export type SwitchMarkerAnalyses = Map<ts.SourceFile, SwitchMarkerAnalysis>;
export const SwitchMarkerAnalyses = Map;
/**
* This Analyzer will analyse the files that have an R3 switch marker in them
* that will be replaced.
*/
export class SwitchMarkerAnalyzer {
constructor(private host: NgccReflectionHost, private packagePath: AbsoluteFsPath) {}
/**
* Analyze the files in the program to identify declarations that contain R3
* switch markers.
* @param program The program to analyze.
* @return A map of source files to analysis objects. The map will contain only the
* source files that had switch markers, and the analysis will contain an array of
* the declarations in that source file that contain the marker.
*/
analyzeProgram(program: ts.Program): SwitchMarkerAnalyses {
const analyzedFiles = new SwitchMarkerAnalyses();
program.getSourceFiles()
.filter(sourceFile => isWithinPackage(this.packagePath, sourceFile))
.forEach(sourceFile => {
const declarations = this.host.getSwitchableDeclarations(sourceFile);
if (declarations.length) {
analyzedFiles.set(sourceFile, {sourceFile, declarations});
}
});
return analyzedFiles;
}
}
| {'content_hash': '2d5b45bf68016d1f1976f3bb13e6dba1', 'timestamp': '', 'source': 'github', 'line_count': 41, 'max_line_length': 87, 'avg_line_length': 38.853658536585364, 'alnum_prop': 0.7288135593220338, 'repo_name': 'Toxicable/angular', 'id': 'fc8b3a0fa65ee1e7529551d7f460bb4afdd49b7a', 'size': '1795', 'binary': False, 'copies': '10', 'ref': 'refs/heads/master', 'path': 'packages/compiler-cli/ngcc/src/analysis/switch_marker_analyzer.ts', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Batchfile', 'bytes': '247'}, {'name': 'CSS', 'bytes': '339178'}, {'name': 'Dockerfile', 'bytes': '14612'}, {'name': 'HTML', 'bytes': '325270'}, {'name': 'JavaScript', 'bytes': '790962'}, {'name': 'PHP', 'bytes': '7222'}, {'name': 'PowerShell', 'bytes': '4065'}, {'name': 'Python', 'bytes': '234982'}, {'name': 'Shell', 'bytes': '106103'}, {'name': 'TypeScript', 'bytes': '15928063'}]} |
ACCEPTED
#### According to
The Catalogue of Life, 3rd January 2011
#### Published in
null
#### Original name
null
### Remarks
null | {'content_hash': '9bff552993e8f06ad634da537cfde0f7', 'timestamp': '', 'source': 'github', 'line_count': 13, 'max_line_length': 39, 'avg_line_length': 10.307692307692308, 'alnum_prop': 0.6940298507462687, 'repo_name': 'mdoering/backbone', 'id': 'b98dda08d4f7a83e0ca870e953523f0cb1e8bad1', 'size': '196', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'life/Plantae/Rhodophyta/Florideophyceae/Ceramiales/Rhodomelaceae/Laurencia/Laurencia lata/README.md', 'mode': '33188', 'license': 'apache-2.0', 'language': []} |
// Warning: This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if the
// code is regenerated.
package com.microsoft.azure.management.network;
import com.microsoft.azure.management.network.models.AzureAsyncOperationResponse;
import com.microsoft.azure.management.network.models.UpdateOperationResponse;
import com.microsoft.azure.management.network.models.VirtualNetwork;
import com.microsoft.azure.management.network.models.VirtualNetworkGetResponse;
import com.microsoft.azure.management.network.models.VirtualNetworkListResponse;
import com.microsoft.azure.management.network.models.VirtualNetworkPutResponse;
import com.microsoft.windowsazure.core.OperationResponse;
import com.microsoft.windowsazure.exception.ServiceException;
import java.io.IOException;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
/**
* The Network Resource Provider API includes operations for managing the
* Virtual Networks for your subscription.
*/
public interface VirtualNetworkOperations {
/**
* The Put VirtualNetwork operation creates/updates a virtual network in the
* specified resource group.
*
* @param resourceGroupName Required. The name of the resource group.
* @param virtualNetworkName Required. The name of the virtual network.
* @param parameters Required. Parameters supplied to the create/update
* Virtual Network operation
* @throws IOException Signals that an I/O exception of some sort has
* occurred. This class is the general class of exceptions produced by
* failed or interrupted I/O operations.
* @throws ServiceException Thrown if an unexpected response is found.
* @return Response for PutVirtualNetworks API service calls.
*/
VirtualNetworkPutResponse beginCreateOrUpdating(String resourceGroupName, String virtualNetworkName, VirtualNetwork parameters) throws IOException, ServiceException;
/**
* The Put VirtualNetwork operation creates/updates a virtual network in the
* specified resource group.
*
* @param resourceGroupName Required. The name of the resource group.
* @param virtualNetworkName Required. The name of the virtual network.
* @param parameters Required. Parameters supplied to the create/update
* Virtual Network operation
* @return Response for PutVirtualNetworks API service calls.
*/
Future<VirtualNetworkPutResponse> beginCreateOrUpdatingAsync(String resourceGroupName, String virtualNetworkName, VirtualNetwork parameters);
/**
* The Delete VirtualNetwork operation deletes the specifed virtual network
*
* @param resourceGroupName Required. The name of the resource group.
* @param virtualNetworkName Required. The name of the virtual network.
* @throws IOException Signals that an I/O exception of some sort has
* occurred. This class is the general class of exceptions produced by
* failed or interrupted I/O operations.
* @throws ServiceException Thrown if an unexpected response is found.
* @return If the resource provide needs to return an error to any
* operation, it should return the appropriate HTTP error code and a
* message body as can be seen below.The message should be localized per
* the Accept-Language header specified in the original request such thatit
* could be directly be exposed to users
*/
UpdateOperationResponse beginDeleting(String resourceGroupName, String virtualNetworkName) throws IOException, ServiceException;
/**
* The Delete VirtualNetwork operation deletes the specifed virtual network
*
* @param resourceGroupName Required. The name of the resource group.
* @param virtualNetworkName Required. The name of the virtual network.
* @return If the resource provide needs to return an error to any
* operation, it should return the appropriate HTTP error code and a
* message body as can be seen below.The message should be localized per
* the Accept-Language header specified in the original request such thatit
* could be directly be exposed to users
*/
Future<UpdateOperationResponse> beginDeletingAsync(String resourceGroupName, String virtualNetworkName);
/**
* The Put VirtualNetwork operation creates/updates a virtual networkin the
* specified resource group.
*
* @param resourceGroupName Required. The name of the resource group.
* @param virtualNetworkName Required. The name of the virtual network.
* @param parameters Required. Parameters supplied to the create/update
* Virtual Network operation
* @throws InterruptedException Thrown when a thread is waiting, sleeping,
* or otherwise occupied, and the thread is interrupted, either before or
* during the activity. Occasionally a method may wish to test whether the
* current thread has been interrupted, and if so, to immediately throw
* this exception. The following code can be used to achieve this effect:
* @throws ExecutionException Thrown when attempting to retrieve the result
* of a task that aborted by throwing an exception. This exception can be
* inspected using the Throwable.getCause() method.
* @throws IOException Thrown if there was an error setting up tracing for
* the request.
* @return The response body contains the status of the specified
* asynchronous operation, indicating whether it has succeeded, is
* inprogress, or has failed. Note that this status is distinct from the
* HTTP status code returned for the Get Operation Status operation itself.
* If the asynchronous operation succeeded, the response body includes the
* HTTP status code for the successful request. If the asynchronous
* operation failed, the response body includes the HTTP status code for
* the failed request and error information regarding the failure.
*/
AzureAsyncOperationResponse createOrUpdate(String resourceGroupName, String virtualNetworkName, VirtualNetwork parameters) throws InterruptedException, ExecutionException, IOException;
/**
* The Put VirtualNetwork operation creates/updates a virtual networkin the
* specified resource group.
*
* @param resourceGroupName Required. The name of the resource group.
* @param virtualNetworkName Required. The name of the virtual network.
* @param parameters Required. Parameters supplied to the create/update
* Virtual Network operation
* @return The response body contains the status of the specified
* asynchronous operation, indicating whether it has succeeded, is
* inprogress, or has failed. Note that this status is distinct from the
* HTTP status code returned for the Get Operation Status operation itself.
* If the asynchronous operation succeeded, the response body includes the
* HTTP status code for the successful request. If the asynchronous
* operation failed, the response body includes the HTTP status code for
* the failed request and error information regarding the failure.
*/
Future<AzureAsyncOperationResponse> createOrUpdateAsync(String resourceGroupName, String virtualNetworkName, VirtualNetwork parameters);
/**
* The Delete VirtualNetwork operation deletes the specifed virtual network
*
* @param resourceGroupName Required. The name of the resource group.
* @param virtualNetworkName Required. The name of the virtual network.
* @throws InterruptedException Thrown when a thread is waiting, sleeping,
* or otherwise occupied, and the thread is interrupted, either before or
* during the activity. Occasionally a method may wish to test whether the
* current thread has been interrupted, and if so, to immediately throw
* this exception. The following code can be used to achieve this effect:
* @throws ExecutionException Thrown when attempting to retrieve the result
* of a task that aborted by throwing an exception. This exception can be
* inspected using the Throwable.getCause() method.
* @throws IOException Thrown if there was an error setting up tracing for
* the request.
* @return A standard service response including an HTTP status code and
* request ID.
*/
OperationResponse delete(String resourceGroupName, String virtualNetworkName) throws InterruptedException, ExecutionException, IOException;
/**
* The Delete VirtualNetwork operation deletes the specifed virtual network
*
* @param resourceGroupName Required. The name of the resource group.
* @param virtualNetworkName Required. The name of the virtual network.
* @return A standard service response including an HTTP status code and
* request ID.
*/
Future<OperationResponse> deleteAsync(String resourceGroupName, String virtualNetworkName);
/**
* The Get VirtualNetwork operation retrieves information about the
* specified virtual network.
*
* @param resourceGroupName Required. The name of the resource group.
* @param virtualNetworkName Required. The name of the virtual network.
* @throws IOException Signals that an I/O exception of some sort has
* occurred. This class is the general class of exceptions produced by
* failed or interrupted I/O operations.
* @throws ServiceException Thrown if an unexpected response is found.
* @return Response for GetVirtualNetworks API service calls.
*/
VirtualNetworkGetResponse get(String resourceGroupName, String virtualNetworkName) throws IOException, ServiceException;
/**
* The Get VirtualNetwork operation retrieves information about the
* specified virtual network.
*
* @param resourceGroupName Required. The name of the resource group.
* @param virtualNetworkName Required. The name of the virtual network.
* @return Response for GetVirtualNetworks API service calls.
*/
Future<VirtualNetworkGetResponse> getAsync(String resourceGroupName, String virtualNetworkName);
/**
* The list VirtualNetwork returns all Virtual Networks in a resource group
*
* @param resourceGroupName Required. The name of the resource group.
* @throws IOException Signals that an I/O exception of some sort has
* occurred. This class is the general class of exceptions produced by
* failed or interrupted I/O operations.
* @throws ServiceException Thrown if an unexpected response is found.
* @return Response for ListVirtualNetworks Api servive call
*/
VirtualNetworkListResponse list(String resourceGroupName) throws IOException, ServiceException;
/**
* The list VirtualNetwork returns all Virtual Networks in a resource group
*
* @param resourceGroupName Required. The name of the resource group.
* @return Response for ListVirtualNetworks Api servive call
*/
Future<VirtualNetworkListResponse> listAsync(String resourceGroupName);
/**
* The list VirtualNetwork returns all Virtual Networks in a subscription
*
* @throws IOException Signals that an I/O exception of some sort has
* occurred. This class is the general class of exceptions produced by
* failed or interrupted I/O operations.
* @throws ServiceException Thrown if an unexpected response is found.
* @return Response for ListVirtualNetworks Api servive call
*/
VirtualNetworkListResponse listAll() throws IOException, ServiceException;
/**
* The list VirtualNetwork returns all Virtual Networks in a subscription
*
* @return Response for ListVirtualNetworks Api servive call
*/
Future<VirtualNetworkListResponse> listAllAsync();
}
| {'content_hash': '64d52c8f58dabee7e5e7d1a1ba2c51fb', 'timestamp': '', 'source': 'github', 'line_count': 224, 'max_line_length': 188, 'avg_line_length': 52.27232142857143, 'alnum_prop': 0.7574515330087966, 'repo_name': 'jmspring/azure-sdk-for-java', 'id': '429ffde028b51cb5cd6bd186abbf17a89163b190', 'size': '12350', 'binary': False, 'copies': '5', 'ref': 'refs/heads/master', 'path': 'management-network2/src/main/java/com/microsoft/azure/management/network/VirtualNetworkOperations.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'HTML', 'bytes': '10369'}, {'name': 'Java', 'bytes': '24006632'}]} |
window.onload = function () {
var toc = "";
var level = 0;
var counter = 0;
document.getElementById("contents").innerHTML =
document.getElementById("contents").innerHTML.replace(
/<h([\d])>([^<]+)<\/h([\d])>/gi,
function (str, openLevel, titleText, closeLevel) {
if (openLevel != closeLevel) {
return str;
}
if (openLevel > level) {
toc += (new Array(openLevel - level + 1))
.join("<ul>");
} else if (openLevel < level) {
toc += (new Array(level - openLevel + 1))
.join("</ul>");
}
level = parseInt(openLevel);
var anchor = titleText.replace(/ /g, "_");
anchor='ln'+counter+'_'+anchor;
counter++;
toc += "<li><a href=\"#" + anchor + "\">"
+ titleText + "</a></li>";
return "<h" + openLevel + "><a name=\"" + anchor
+ "\">" + titleText + "</a></h" + closeLevel
+ ">";
}
);
if (level) {
toc += (new Array(level + 1)).join("</ul>");
}
document.getElementById("toc").innerHTML += toc;
}; | {'content_hash': 'c22bae1bd0c926ee25c597b59d7b122b', 'timestamp': '', 'source': 'github', 'line_count': 41, 'max_line_length': 64, 'avg_line_length': 32.24390243902439, 'alnum_prop': 0.397125567322239, 'repo_name': 'ShadowZero3000/speechless', 'id': '2db12d98f7f7ebf59aea454f6ce498ac42bbc7fd', 'size': '2738', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'js/auto-toc.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '29'}, {'name': 'JavaScript', 'bytes': '7065'}]} |
layout: story
category: serial
issue: 27, September 2015
issue-cover: issue-27-cover.png
issue-buy-link:
title: "She Wolf and Cub: Coda"
subtitle:
author: lilith-saintcrow
author-2:
author-3:
editor: brian-j-white
illustrator:
copyeditor:
selector:
translator:
narrator:
letterer:
date: 2015-09-06 12:02:00 -0500
permalink: /issue27/chapter/she-wolf-and-cub-chapter-thirteen/
audiourl:
teaser: "They came from below."
art:
artcaption:
spanish-language:
spanish-date:
english-url:
spanish-url:
serial-name: She Wolf and Cub
serial-url: /book/she-wolf-and-cub
part: 13
previous-url: /issue27/chapter/she-wolf-and-cub-chapter-twelve/
next-url: /book/she-wolf-and-cub
contentnote:
generalnote:
published: false
---
_The wheat-haired man crouches in a clearing, his breath a tuneless whistle as he turns a few dials, points the antenna correctly. "Activate relay." A crackling, the scan run through a code or two, time of day and latitude taken into consideration. The machinery picks up a signal, and he stops whistling._
_"Code in, please." An anonymous voice, crackling through the small tinny speaker._
_"739-Jess's Boy, reporting in, foxtrot kilo Juliet, code three-eight."_
_More crackling. A series of clicks. Then another voice, cold even through the layers of atmosphere and the ancient speaker. Nobody scanned for this transmission range anymore. Sometimes, as the Big Man remarked, the old ways were best._
_"There you are."_
_"Been busy."_
_"CoreTech? The Collective?"_
_"Both foxed for now." There are broken bodies all around him — staked through the heart, heads torn off. "Have already dropped bioscans of their pride and joys, so at least we get something out of this. Sendoza's Collective process had some regrettable flaws, and the second-gens are no good at fighting crowds." The lies roll easily from his tongue._
_"Very good. What about the wolf and her cub?"_
_Sam doesn't hesitate. "Casualties. Sendoza went nuts, that was always a risk."_
_A laugh. "Crazy serves our purposes."_
_"I've burned both CoreTech and the Agency now."_
_"That also serves our purposes."_
_So he'd just become expendable. That answered that."Is there anything that doesn't?"_
_"Pointless questions."_
_"Heard and understood." _If you only knew how much I did of both.
_"Good. Continue checking in at scheduled intervals. We'll have a use for you soon. Victory out."_
_The connection is cut, with a small definite snap. Sam sighs. Looks at his blood-covered hands. The Alliance has eyes and ears in every township and City from here to the edge of the continent. Sooner or later someone was going to report Abby and her kid, and Nikor was going to put a couple things together and arrive at a very unpleasant conclusion._
_"Not my problem just yet," Sam mutters. It's a relief to be out of the Cities, to let his face relax. The subroutines to keep him a blank-faced nonentity were second nature by now. Which was the truth, the blankness or the flickers of feeling?_
_Did it matter?_
_It didn't. Now was the time to get moving. He'd catch up to her, observe from a distance. When — not if — Nikor caught wind of them, the capture orders would come out. And Sam would get another chance to play knight in shining, and maybe earn a little… what?_
_Yes, Nikor was going to be surprised. That didn't happen often, and the Big Man never forgave it, for all his cant about freedom and the future of humanity._
_The Agency and corporations, fighting over a dying beast trapped in a waterhole. When the Cities finally broke down, whether under their weight or as a result of the Alliance's constant efforts at destabilization, Nikor was going to get a few more surprises. The vast mass of agents and corporate slaves weren't going to be grateful for long, and some of them might even want the freeform nanos despite the cost. Lots of warmbodies didn't mind being zombies._
_Some of them even preferred it._
_Also, Sam had destroyed the bioscans and the details of Sendoza's Collective procedure — but not before memorizing them. Should Abby and that kid get into trouble, he could trade dribs and drabs of it to get them out._
_"Who owns me now, AbbyJess?" He smiled, and straightened. Time to get the blood off his hands. "Who do you think?"_
_He made sure the bloated bodies would catch sunlight. The blast zone, here where Zion — once, long ago, an Alliance township, then one of Nikor's experiments gone hideously wrong, now a steaming crater — once stood, was the perfect place to leave these little presents. As long as nobody took the stakes out, the second-gens would rot quietly._
_Of course, if they didn't, he had a plan for that too. So many to keep track of, crowding his active brain._
_With that done, he destroyed the relay. No more call-ins. His next one wasn't due for a couple months, anyway._
_"Who owns me now." He kicked the relay's hulk one more time for good measure. "_I do, sweets. You're a bad influence."_
_Five minutes later, the clearing was empty._
_Two hours after that, one of the scattered, headless bodies twitched once. Twice._
_The Vines sighed. Aftershocks rippled through its roots. The sun rose higher._
_And the headless body twitched again…_
| {'content_hash': '809de17a22fc0683150e7233f7b3658c', 'timestamp': '', 'source': 'github', 'line_count': 105, 'max_line_length': 460, 'avg_line_length': 49.58095238095238, 'alnum_prop': 0.7610449481367653, 'repo_name': 'firesidefiction/firesidefiction.github.io', 'id': 'c25763a0a59649f74cbabccb402ccbee2e0edb3c', 'size': '5226', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': '_posts/issues/00-ANTE/issue-27/2015-09-06-she-wolf-and-cub-chapter-thirteen.md', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'HTML', 'bytes': '231773'}, {'name': 'Ruby', 'bytes': '696'}, {'name': 'SCSS', 'bytes': '76993'}]} |
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/include_custom_toolbar" />
<ProgressBar
android:id="@+id/myProgressBar"
style="@style/self_define_ProgressBar"
android:layout_width="match_parent"
android:layout_height="5px" />
<WebView
android:id="@+id/web_view_show"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
| {'content_hash': '3799a7e2244c3e8c00aebdff703bfe6a', 'timestamp': '', 'source': 'github', 'line_count': 18, 'max_line_length': 72, 'avg_line_length': 36.27777777777778, 'alnum_prop': 0.6477794793261868, 'repo_name': 'hanswook/ganknews', 'id': 'f1e97cde34f98dbbabf147123f48d3005c00360c', 'size': '653', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'app/src/main/res/layout/activity_web_view.xml', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Java', 'bytes': '294853'}]} |
<?php
namespace Snail\App\Utils;
class Arr {
/**
* @param $array
* @return array
*
* Returns first array item
* of the given array
*/
public static function first($array) {
return $array[0];
}
/**
* @param $array
* @return mixed
*
* Returns last array item
* of the given array
*/
public static function last($array) {
return $array[count($array) -1];
}
/**
* @param $array
* @return mixed
*
* Returns last array item index
* of the given array
*/
public static function last_index($array) {
$keys = array_keys($array);
return $keys[count($keys) - 1];
}
/**
* @param $array
* @return mixed
*
* Returns first array item index
* of the given array
*/
public static function first_index($array) {
$keys = array_keys($array);
return $keys[0];
}
/**
* @param $array
* @param $key
* @return mixed
*
* Simply returns a value based on the array/key given
*/
public static function get_value($array, $key) {
return $array[$key];
}
/**
* @param $array
* @param $item
* @return bool
*
* Returns true if the given value
* exists in the given array (Non assoc)
*/
public static function contains($array, $item) {
$contains = false;
foreach ($array as $arr) {
if ($arr == $item) {
$contains = true;
}
}
return $contains;
}
/**
* @param $list
* @return array
*
* Shuffles an array (Also for assoc)
*/
public static function shuffle_arr($list) {
if (!is_array($list)) {
return $list;
}
if (self::is_assoc($list)) {
$keys = array_keys($list);
shuffle($keys);
$random = array();
foreach ($keys as $key) {
$random[$key] = $list[$key];
}
return $random;
} else {
$random = shuffle($list);
return $random;
}
}
/**
* @param $array
* @return int
*
* Returns the size of the given array
*/
public static function size($array) {
$size = 0;
if (!empty($array)) {
foreach ($array as $arr) {
$size ++;
}
return $size;
} else {
return $size;
}
}
/**
* @param $array
* @return mixed
*
* Returns random index from given array (Non assoc)
*/
public static function rand($array) {
$random = rand(0, self::size($array) - 1);
return $array[$random];
}
/**
* @param $array
* @return bool
*
* Returns true if the given array is associative
*/
public static function is_assoc($array) {
$isAssoc = false;
if (!empty($array) && is_array($array)) {
$isAssoc = (bool) count(array_filter(array_keys($array), 'is_string'));
}
return $isAssoc;
}
/**
* @param $array
* @param $item
* @return int|null
*
* Algorithm to find array index by given array
*/
public static function find_index($array, $item) {
$index = null;
for ($ii = 0; $ii < count($array); $ii++) {
if ($array[$ii] == $item) {
return $ii;
}
}
return $index;
}
} | {'content_hash': '82eda12f6d9e148ad166a75c59729741', 'timestamp': '', 'source': 'github', 'line_count': 177, 'max_line_length': 74, 'avg_line_length': 16.858757062146893, 'alnum_prop': 0.5596514745308311, 'repo_name': 'dennisslimmers01/Snail-MVC', 'id': '917d18ea5fc05189bbde480388b0b6779c812151', 'size': '3346', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'app/utils/Arr.php', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'ApacheConf', 'bytes': '357'}, {'name': 'CSS', 'bytes': '37'}, {'name': 'JavaScript', 'bytes': '1348'}, {'name': 'PHP', 'bytes': '265936'}]} |
<?php
/**
* @file
* Contains \Drupal\Component\Utility\Timer.
*/
namespace Drupal\Component\Utility;
/**
* Provides helpers to use timers throughout a request.
*/
class Timer {
static protected $timers = array();
/**
* Starts the timer with the specified name.
*
* If you start and stop the same timer multiple times, the measured intervals
* will be accumulated.
*
* @param $name
* The name of the timer.
*/
static public function start($name) {
static::$timers[$name]['start'] = microtime(TRUE);
static::$timers[$name]['count'] = isset(static::$timers[$name]['count']) ? ++static::$timers[$name]['count'] : 1;
}
/**
* Reads the current timer value without stopping the timer.
*
* @param string $name
* The name of the timer.
*
* @return int
* The current timer value in ms.
*/
static public function read($name) {
if (isset(static::$timers[$name]['start'])) {
$stop = microtime(TRUE);
$diff = round(($stop - static::$timers[$name]['start']) * 1000, 2);
if (isset(static::$timers[$name]['time'])) {
$diff += static::$timers[$name]['time'];
}
return $diff;
}
return static::$timers[$name]['time'];
}
/**
* Stops the timer with the specified name.
*
* @param string $name
* The name of the timer.
*
* @return array
* A timer array. The array contains the number of times the timer has been
* started and stopped (count) and the accumulated timer value in ms (time).
*/
static public function stop($name) {
if (isset(static::$timers[$name]['start'])) {
$stop = microtime(TRUE);
$diff = round(($stop - static::$timers[$name]['start']) * 1000, 2);
if (isset(static::$timers[$name]['time'])) {
static::$timers[$name]['time'] += $diff;
}
else {
static::$timers[$name]['time'] = $diff;
}
unset(static::$timers[$name]['start']);
}
return static::$timers[$name];
}
}
| {'content_hash': 'b89e24ce6d49a7719c90b49f41e1c2c1', 'timestamp': '', 'source': 'github', 'line_count': 79, 'max_line_length': 117, 'avg_line_length': 25.417721518987342, 'alnum_prop': 0.5806772908366534, 'repo_name': 'augustash/d8.dev', 'id': '294632c4fbc8a1d0917059023d0a45ec04e18f96', 'size': '2008', 'binary': False, 'copies': '12', 'ref': 'refs/heads/develop', 'path': 'core/lib/Drupal/Component/Utility/Timer.php', 'mode': '33188', 'license': 'mit', 'language': []} |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd" >
<sqlMap namespace="GoodAttrValue">
<resultMap class="com.usst.app.good.goodAttr.model.GoodAttrValue" id="GoodAttrValueResult">
<!-- base -->
<result column="id" property="id" jdbcType="varchar"/>
<result column="sort" property="sort" jdbcType="int"/>
<!-- GoodAttrValue -->
<result column="good_id" property="goodId" jdbcType="varchar"/>
<result column="good_attr_id" property="goodAttrId" jdbcType="varchar"/>
<result column="attr_value" property="attrValue" jdbcType="varchar"/>
</resultMap>
<insert id="GoodAttrValue_insert">
insert into good_attr_value
(id,good_id,good_attr_id,attr_value,sort)
values
(#id#,#goodId#,#goodAttrId#,#attrValue#,#sort#)
</insert>
<update id="GoodAttrValue_update">
update good_attr_value set
good_id = #goodId#,
good_attr_id = #goodAttrId#,
attr_value = #attrValue#,
sort = #sort#
where id = #id#
</update>
<delete id="GoodAttrValue_delete">
delete from good_attr_value
where id = #id:VARCHAR#
</delete>
<delete id="GoodAttrValue_goodId_delete">
delete from good_attr_value
where good_id = #goodId#
</delete>
</sqlMap>
| {'content_hash': 'db54e1cda878142d833bfec14c2a2d58', 'timestamp': '', 'source': 'github', 'line_count': 39, 'max_line_length': 114, 'avg_line_length': 33.15384615384615, 'alnum_prop': 0.671307037896365, 'repo_name': 'shenzeyu/recommend', 'id': '49a11370ff3a1a182daa53b1f1fad4d1a4fd5065', 'size': '1293', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'src/main/java/com/usst/app/good/goodAttr/model/GoodAttrValue_SqlMap.xml', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'ActionScript', 'bytes': '313319'}, {'name': 'ApacheConf', 'bytes': '768'}, {'name': 'CSS', 'bytes': '1458137'}, {'name': 'HTML', 'bytes': '149062'}, {'name': 'Java', 'bytes': '2698815'}, {'name': 'JavaScript', 'bytes': '4706436'}, {'name': 'PHP', 'bytes': '3309'}]} |
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>convert</title>
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../../../index.html" title="Chapter 1. Geometry">
<link rel="up" href="../algorithms.html" title="Algorithms">
<link rel="prev" href="clear.html" title="clear">
<link rel="next" href="convex_hull.html" title="convex_hull">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="clear.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../algorithms.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="convex_hull.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="geometry.reference.algorithms.convert"></a><a class="link" href="convert.html" title="convert">convert</a>
</h4></div></div></div>
<p>
<a class="indexterm" name="idp12640320"></a>
Converts one geometry to another geometry.
</p>
<h6>
<a name="geometry.reference.algorithms.convert.h0"></a>
<span><a name="geometry.reference.algorithms.convert.description"></a></span><a class="link" href="convert.html#geometry.reference.algorithms.convert.description">Description</a>
</h6>
<p>
The convert algorithm converts one geometry, e.g. a BOX, to another geometry,
e.g. a RING. This only if it is possible and applicable. If the point-order
is different, or the closure is different between two geometry types, it
will be converted correctly by explicitly reversing the points or closing
or opening the polygon rings.
</p>
<h6>
<a name="geometry.reference.algorithms.convert.h1"></a>
<span><a name="geometry.reference.algorithms.convert.synopsis"></a></span><a class="link" href="convert.html#geometry.reference.algorithms.convert.synopsis">Synopsis</a>
</h6>
<p>
</p>
<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Geometry1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Geometry2</span><span class="special">></span>
<span class="keyword">void</span> <span class="identifier">convert</span><span class="special">(</span><span class="identifier">Geometry1</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">geometry1</span><span class="special">,</span> <span class="identifier">Geometry2</span> <span class="special">&</span> <span class="identifier">geometry2</span><span class="special">)</span></pre>
<p>
</p>
<h6>
<a name="geometry.reference.algorithms.convert.h2"></a>
<span><a name="geometry.reference.algorithms.convert.parameters"></a></span><a class="link" href="convert.html#geometry.reference.algorithms.convert.parameters">Parameters</a>
</h6>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
Type
</p>
</th>
<th>
<p>
Concept
</p>
</th>
<th>
<p>
Name
</p>
</th>
<th>
<p>
Description
</p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
<p>
Geometry1 const &
</p>
</td>
<td>
<p>
Any type fulfilling a Geometry Concept
</p>
</td>
<td>
<p>
geometry1
</p>
</td>
<td>
<p>
A model of the specified concept (source)
</p>
</td>
</tr>
<tr>
<td>
<p>
Geometry2 &
</p>
</td>
<td>
<p>
Any type fulfilling a Geometry Concept
</p>
</td>
<td>
<p>
geometry2
</p>
</td>
<td>
<p>
A model of the specified concept (target)
</p>
</td>
</tr>
</tbody>
</table></div>
<h6>
<a name="geometry.reference.algorithms.convert.h3"></a>
<span><a name="geometry.reference.algorithms.convert.header"></a></span><a class="link" href="convert.html#geometry.reference.algorithms.convert.header">Header</a>
</h6>
<p>
Either
</p>
<p>
<code class="computeroutput"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
</p>
<p>
Or
</p>
<p>
<code class="computeroutput"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">algorithms</span><span class="special">/</span><span class="identifier">convert</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
</p>
<h6>
<a name="geometry.reference.algorithms.convert.h4"></a>
<span><a name="geometry.reference.algorithms.convert.conformance"></a></span><a class="link" href="convert.html#geometry.reference.algorithms.convert.conformance">Conformance</a>
</h6>
<p>
The function convert is not defined by OGC.
</p>
<h6>
<a name="geometry.reference.algorithms.convert.h5"></a>
<span><a name="geometry.reference.algorithms.convert.supported_geometries"></a></span><a class="link" href="convert.html#geometry.reference.algorithms.convert.supported_geometries">Supported
geometries</a>
</h6>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
<col>
<col>
<col>
<col>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
</th>
<th>
<p>
Point
</p>
</th>
<th>
<p>
Segment
</p>
</th>
<th>
<p>
Box
</p>
</th>
<th>
<p>
Linestring
</p>
</th>
<th>
<p>
Ring
</p>
</th>
<th>
<p>
Polygon
</p>
</th>
<th>
<p>
MultiPoint
</p>
</th>
<th>
<p>
MultiLinestring
</p>
</th>
<th>
<p>
MultiPolygon
</p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
<p>
Point
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/ok.png" alt="ok"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
</tr>
<tr>
<td>
<p>
Segment
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/ok.png" alt="ok"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
</tr>
<tr>
<td>
<p>
Box
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/ok.png" alt="ok"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/ok.png" alt="ok"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
</tr>
<tr>
<td>
<p>
Linestring
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/ok.png" alt="ok"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/ok.png" alt="ok"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
</tr>
<tr>
<td>
<p>
Ring
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/ok.png" alt="ok"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/ok.png" alt="ok"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/ok.png" alt="ok"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
</tr>
<tr>
<td>
<p>
Polygon
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/ok.png" alt="ok"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/ok.png" alt="ok"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/ok.png" alt="ok"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
</tr>
<tr>
<td>
<p>
MultiPoint
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/ok.png" alt="ok"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/ok.png" alt="ok"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
</tr>
<tr>
<td>
<p>
MultiLinestring
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/ok.png" alt="ok"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/ok.png" alt="ok"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/ok.png" alt="ok"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
</tr>
<tr>
<td>
<p>
MultiPolygon
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/ok.png" alt="ok"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/ok.png" alt="ok"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/ok.png" alt="ok"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/nyi.png" alt="nyi"></span>
</p>
</td>
<td>
<p>
<span class="inlinemediaobject"><img src="../../../img/ok.png" alt="ok"></span>
</p>
</td>
</tr>
</tbody>
</table></div>
<div class="note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../../doc/src/images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top"><p>
In this status matrix above: columns are source types and rows are target
types. So a box can be converted to a ring, polygon or multi-polygon,
but not vice versa.
</p></td></tr>
</table></div>
<h6>
<a name="geometry.reference.algorithms.convert.h6"></a>
<span><a name="geometry.reference.algorithms.convert.complexity"></a></span><a class="link" href="convert.html#geometry.reference.algorithms.convert.complexity">Complexity</a>
</h6>
<p>
Linear
</p>
<h6>
<a name="geometry.reference.algorithms.convert.h7"></a>
<span><a name="geometry.reference.algorithms.convert.example"></a></span><a class="link" href="convert.html#geometry.reference.algorithms.convert.example">Example</a>
</h6>
<p>
Shows how to convert a geometry into another geometry
</p>
<p>
</p>
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">geometries</span><span class="special">/</span><span class="identifier">box</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">geometries</span><span class="special">/</span><span class="identifier">point_xy</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">geometries</span><span class="special">/</span><span class="identifier">polygon</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">geometries</span><span class="special">/</span><span class="identifier">adapted</span><span class="special">/</span><span class="identifier">boost_tuple</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
<span class="identifier">BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS</span><span class="special">(</span><span class="identifier">cs</span><span class="special">::</span><span class="identifier">cartesian</span><span class="special">)</span>
<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
<span class="special">{</span>
<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">model</span><span class="special">::</span><span class="identifier">d2</span><span class="special">::</span><span class="identifier">point_xy</span><span class="special"><</span><span class="keyword">double</span><span class="special">></span> <span class="identifier">point</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">model</span><span class="special">::</span><span class="identifier">box</span><span class="special"><</span><span class="identifier">point</span><span class="special">></span> <span class="identifier">box</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">model</span><span class="special">::</span><span class="identifier">polygon</span><span class="special"><</span><span class="identifier">point</span><span class="special">></span> <span class="identifier">polygon</span><span class="special">;</span>
<span class="identifier">point</span> <span class="identifier">p1</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">1</span><span class="special">);</span>
<span class="identifier">box</span> <span class="identifier">bx</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">make</span><span class="special"><</span><span class="identifier">box</span><span class="special">>(</span><span class="number">1</span><span class="special">,</span> <span class="number">1</span><span class="special">,</span> <span class="number">2</span><span class="special">,</span> <span class="number">2</span><span class="special">);</span>
<span class="comment">// Assign a box to a polygon (conversion box->poly)</span>
<span class="identifier">polygon</span> <span class="identifier">poly</span><span class="special">;</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">convert</span><span class="special">(</span><span class="identifier">bx</span><span class="special">,</span> <span class="identifier">poly</span><span class="special">);</span>
<span class="comment">// Convert a point to another point type (conversion of point-type)</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">tuple</span><span class="special"><</span><span class="keyword">double</span><span class="special">,</span> <span class="keyword">double</span><span class="special">></span> <span class="identifier">p2</span><span class="special">;</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">convert</span><span class="special">(</span><span class="identifier">p1</span><span class="special">,</span> <span class="identifier">p2</span><span class="special">);</span> <span class="comment">// source -> target</span>
<span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">dsv</span><span class="special">;</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span>
<span class="special"><<</span> <span class="string">"box: "</span> <span class="special"><<</span> <span class="identifier">dsv</span><span class="special">(</span><span class="identifier">bx</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span>
<span class="special"><<</span> <span class="string">"polygon: "</span> <span class="special"><<</span> <span class="identifier">dsv</span><span class="special">(</span><span class="identifier">poly</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span>
<span class="special"><<</span> <span class="string">"point: "</span> <span class="special"><<</span> <span class="identifier">dsv</span><span class="special">(</span><span class="identifier">p1</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span>
<span class="special"><<</span> <span class="string">"point tuples: "</span> <span class="special"><<</span> <span class="identifier">dsv</span><span class="special">(</span><span class="identifier">p2</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span>
<span class="special">;</span>
<span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
<span class="special">}</span>
</pre>
<p>
</p>
<p>
Output:
</p>
<pre class="programlisting">box: ((1, 1), (2, 2))
polygon: (((1, 1), (1, 2), (2, 2), (2, 1), (1, 1)))
point: (1, 1)
point tuples: (1, 1)
</pre>
<h6>
<a name="geometry.reference.algorithms.convert.h8"></a>
<span><a name="geometry.reference.algorithms.convert.see_also"></a></span><a class="link" href="convert.html#geometry.reference.algorithms.convert.see_also">See
also</a>
</h6>
<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
<a class="link" href="assign/assign.html" title="assign">assign</a>
</li></ul></div>
<div class="note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../../doc/src/images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top"><p>
convert is modelled as source -> target (where assign is modelled
as target := source)
</p></td></tr>
</table></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2009-2012 Barend
Gehrels, Bruno Lalande, Mateusz Loskot<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="clear.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../algorithms.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="convex_hull.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
| {'content_hash': '208313bfb448426698656c5a531b08b2', 'timestamp': '', 'source': 'github', 'line_count': 803, 'max_line_length': 623, 'avg_line_length': 43.743462017434624, 'alnum_prop': 0.4808973410009679, 'repo_name': 'Krugercoin/krugercoins', 'id': 'afe2b577ba7e707e5e1f851576f3259123be9c43', 'size': '35126', 'binary': False, 'copies': '6', 'ref': 'refs/heads/master', 'path': 'BuildDeps/deps/boost/libs/geometry/doc/html/geometry/reference/algorithms/convert.html', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'ASP', 'bytes': '21289'}, {'name': 'Assembly', 'bytes': '956955'}, {'name': 'Awk', 'bytes': '89654'}, {'name': 'C', 'bytes': '23442146'}, {'name': 'C#', 'bytes': '1801043'}, {'name': 'C++', 'bytes': '127633009'}, {'name': 'CSS', 'bytes': '391998'}, {'name': 'DOT', 'bytes': '27186'}, {'name': 'Emacs Lisp', 'bytes': '1639'}, {'name': 'FORTRAN', 'bytes': '1387'}, {'name': 'IDL', 'bytes': '14533'}, {'name': 'Java', 'bytes': '4131730'}, {'name': 'JavaScript', 'bytes': '209934'}, {'name': 'Max', 'bytes': '36857'}, {'name': 'Objective-C', 'bytes': '27715'}, {'name': 'PHP', 'bytes': '60328'}, {'name': 'Perl', 'bytes': '4110742'}, {'name': 'Python', 'bytes': '651396'}, {'name': 'R', 'bytes': '4363'}, {'name': 'Scheme', 'bytes': '4249'}, {'name': 'Shell', 'bytes': '461438'}, {'name': 'Tcl', 'bytes': '2574990'}, {'name': 'TeX', 'bytes': '13404'}, {'name': 'TypeScript', 'bytes': '3810608'}, {'name': 'XSLT', 'bytes': '760331'}, {'name': 'eC', 'bytes': '5079'}]} |
package ol.source;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsProperty;
import jsinterop.annotations.JsType;
import ol.Collection;
import ol.Feature;
import ol.featureloader.FeatureLoader;
/**
* Vector source options.
*
* @author sbaumhekel
*/
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
public class VectorOptions extends SourceOptions {
/**
* Set the features. If provided as {@link ol.Collection}, the features in
* the source and the collection will stay in sync.
*
* @param features features
*/
@JsProperty
public native void setFeatures(Feature[] features);
@JsProperty
public native void setUrl(String url);
@JsProperty
public native void setFormat(ol.format.Feature format);
@JsProperty
public native void setFeatures(Collection<Feature> features);
/**
*
* By default, an RTree is used as spatial index. When features are removed
* and added frequently, and the total number of features is low, setting
* this to false may improve performance. Note that
* ol.source.Vector#getFeaturesInExtent,
* ol.source.Vector#getClosestFeatureToCoordinate and
* ol.source.Vector#getExtent cannot be used when useSpatialIndex is set to
* false, and ol.source.Vector#forEachFeatureInExtent will loop through all
* features. When set to false, the features will be maintained in an
* ol.Collection, which can be retrieved through
* ol.source.Vector#getFeaturesCollection. The default is true.
*
* @param useSpatialIndex use spatial index?
*/
@JsProperty
public native void setUseSpatialIndex(boolean useSpatialIndex);
/**
* The loader function used to load features, from a remote source for example.
* If this is not set and url is set, the source will create and use an XHR feature loader.
*
* @param featureLoader
*/
@JsProperty
public native void setLoader(FeatureLoader featureLoader);
}
| {'content_hash': 'bc159cec2afac47430ef76684594c0f1', 'timestamp': '', 'source': 'github', 'line_count': 64, 'max_line_length': 95, 'avg_line_length': 31.828125, 'alnum_prop': 0.7123220422189495, 'repo_name': 'sebasbaumh/gwt-ol3', 'id': '20612514702f292f18758f024d11172b753a2c21', 'size': '2788', 'binary': False, 'copies': '3', 'ref': 'refs/heads/master', 'path': 'gwt-ol3-client/src/main/java/ol/source/VectorOptions.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '1387'}, {'name': 'HTML', 'bytes': '885'}, {'name': 'Java', 'bytes': '887235'}, {'name': 'Shell', 'bytes': '523'}]} |
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="lt">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="14"/>
<source>About OMFGcoin</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/aboutdialog.ui" line="75"/>
<source><html><head/><body><p><span style=" font-weight:600;">OMFGcoin</span></p></body></html></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/aboutdialog.ui" line="113"/>
<source>Copyright © 2014 OMFGcoin Developers</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/aboutdialog.ui" line="120"/>
<source>Copyright © 2011-2014 OMFGcoin Developers</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/aboutdialog.ui" line="133"/>
<source>Copyright © 2009-2014 Bitcoin Developers
This is experimental software.
Distributed under the MIT/X11 software license, see the accompanying file license.txt or http://www.opensource.org/licenses/mit-license.php.
This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young ([email protected]) and UPnP software written by Thomas Bernard.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AddressBookPage</name>
<message>
<location filename="../forms/addressbookpage.ui" line="14"/>
<source>Address Book</source>
<translation>Adresų knygelė</translation>
</message>
<message>
<location filename="../forms/addressbookpage.ui" line="20"/>
<source>These are your OMFGcoin addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/addressbookpage.ui" line="33"/>
<source>Double-click to edit address or label</source>
<translation>Tam, kad pakeisti ar redaguoti adresą arba žymę turite objektą dukart spragtelti pele.</translation>
</message>
<message>
<location filename="../forms/addressbookpage.ui" line="57"/>
<source>Create a new address</source>
<translation>Sukurti naują adresą</translation>
</message>
<message>
<location filename="../forms/addressbookpage.ui" line="60"/>
<source>&New Address...</source>
<translation>&Naujas adresas...</translation>
</message>
<message>
<location filename="../forms/addressbookpage.ui" line="71"/>
<source>Copy the currently selected address to the system clipboard</source>
<translation>Kopijuoti esamą adresą į mainų atmintį</translation>
</message>
<message>
<location filename="../forms/addressbookpage.ui" line="74"/>
<source>&Copy to Clipboard</source>
<translation>&C Kopijuoti į mainų atmintų</translation>
</message>
<message>
<location filename="../forms/addressbookpage.ui" line="85"/>
<source>Show &QR Code</source>
<translation>Rodyti &QR kodą</translation>
</message>
<message>
<location filename="../forms/addressbookpage.ui" line="96"/>
<source>Sign a message to prove you own this address</source>
<translation>Registruotis žinute įrodančia, kad turite šį adresą</translation>
</message>
<message>
<location filename="../forms/addressbookpage.ui" line="99"/>
<source>&Sign Message</source>
<translation>&S Registruotis žinute</translation>
</message>
<message>
<location filename="../forms/addressbookpage.ui" line="110"/>
<source>Delete the currently selected address from the list. Only sending addresses can be deleted.</source>
<translation>Pašalinti iš sąrašo pažymėtą adresą(gali būti pašalinti tiktai adresų knygelės įrašai).</translation>
</message>
<message>
<location filename="../forms/addressbookpage.ui" line="113"/>
<source>&Delete</source>
<translation>&D Pašalinti</translation>
</message>
<message>
<location filename="../addressbookpage.cpp" line="65"/>
<source>Copy address</source>
<translation>Copijuoti adresą</translation>
</message>
<message>
<location filename="../addressbookpage.cpp" line="66"/>
<source>Copy label</source>
<translation>Kopijuoti žymę</translation>
</message>
<message>
<location filename="../addressbookpage.cpp" line="67"/>
<source>Edit</source>
<translation>Redaguoti</translation>
</message>
<message>
<location filename="../addressbookpage.cpp" line="68"/>
<source>Delete</source>
<translation>Pašalinti</translation>
</message>
<message>
<location filename="../addressbookpage.cpp" line="273"/>
<source>Export Address Book Data</source>
<translation>Eksportuoti adresų knygelės duomenis</translation>
</message>
<message>
<location filename="../addressbookpage.cpp" line="274"/>
<source>Comma separated file (*.csv)</source>
<translation>Kableliais išskirtas failas (*.csv)</translation>
</message>
<message>
<location filename="../addressbookpage.cpp" line="287"/>
<source>Error exporting</source>
<translation>Eksportavimo klaida</translation>
</message>
<message>
<location filename="../addressbookpage.cpp" line="287"/>
<source>Could not write to file %1.</source>
<translation>Nepavyko įrašyti į failą %1.</translation>
</message>
</context>
<context>
<name>AddressTableModel</name>
<message>
<location filename="../addresstablemodel.cpp" line="79"/>
<source>Label</source>
<translation>Žymė</translation>
</message>
<message>
<location filename="../addresstablemodel.cpp" line="79"/>
<source>Address</source>
<translation>Adresas</translation>
</message>
<message>
<location filename="../addresstablemodel.cpp" line="115"/>
<source>(no label)</source>
<translation>(nėra žymės)</translation>
</message>
</context>
<context>
<name>AskPassphraseDialog</name>
<message>
<location filename="../forms/askpassphrasedialog.ui" line="26"/>
<source>Dialog</source>
<translation>Dialogas</translation>
</message>
<message>
<location filename="../forms/askpassphrasedialog.ui" line="94"/>
<source>TextLabel</source>
<translation>Teksto žymė</translation>
</message>
<message>
<location filename="../forms/askpassphrasedialog.ui" line="47"/>
<source>Enter passphrase</source>
<translation>Įvesti slaptažodį</translation>
</message>
<message>
<location filename="../forms/askpassphrasedialog.ui" line="61"/>
<source>New passphrase</source>
<translation>Naujas slaptažodis</translation>
</message>
<message>
<location filename="../forms/askpassphrasedialog.ui" line="75"/>
<source>Repeat new passphrase</source>
<translation>Pakartoti naują slaptažodį</translation>
</message>
<message>
<location filename="../forms/askpassphrasedialog.ui" line="114"/>
<source>Toggle Keyboard</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../askpassphrasedialog.cpp" line="37"/>
<source>Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>10 or more random characters</b>, or <b>eight or more words</b>.</source>
<translation>Įveskite naują slaptažodį piniginei <br/> Prašome naudoti slaptažodį iš <b> 10 ar daugiau atsitiktinių simbolių </b> arba <b> aštuonių ar daugiau žodžių </b>.</translation>
</message>
<message>
<location filename="../askpassphrasedialog.cpp" line="38"/>
<source>Encrypt wallet</source>
<translation>Užšifruoti piniginę</translation>
</message>
<message>
<location filename="../askpassphrasedialog.cpp" line="41"/>
<source>This operation needs your wallet passphrase to unlock the wallet.</source>
<translation>Ši operacija reikalauja jūsų piniginės slaptažodžio jai atrakinti.</translation>
</message>
<message>
<location filename="../askpassphrasedialog.cpp" line="46"/>
<source>Unlock wallet</source>
<translation>Atrakinti piniginę</translation>
</message>
<message>
<location filename="../askpassphrasedialog.cpp" line="49"/>
<source>This operation needs your wallet passphrase to decrypt the wallet.</source>
<translation>Ši operacija reikalauja jūsų piniginės slaptažodžio jai iššifruoti.</translation>
</message>
<message>
<location filename="../askpassphrasedialog.cpp" line="54"/>
<source>Decrypt wallet</source>
<translation>Iššifruoti piniginę</translation>
</message>
<message>
<location filename="../askpassphrasedialog.cpp" line="57"/>
<source>Change passphrase</source>
<translation>Pakeisti slaptažodį</translation>
</message>
<message>
<location filename="../askpassphrasedialog.cpp" line="58"/>
<source>Enter the old and new passphrase to the wallet.</source>
<translation>Įveskite seną ir naują piniginės slaptažodžius</translation>
</message>
<message>
<location filename="../askpassphrasedialog.cpp" line="106"/>
<source>Confirm wallet encryption</source>
<translation>Patvirtinkite piniginės užšifravimą</translation>
</message>
<message>
<location filename="../askpassphrasedialog.cpp" line="116"/>
<location filename="../askpassphrasedialog.cpp" line="165"/>
<source>Wallet encrypted</source>
<translation>Piniginė užšifruota</translation>
</message>
<message>
<location filename="../askpassphrasedialog.cpp" line="213"/>
<location filename="../askpassphrasedialog.cpp" line="237"/>
<source>Warning: The Caps Lock key is on.</source>
<translation>ĮSPĖJIMAS: Įjungtos didžiosios raidės</translation>
</message>
<message>
<location filename="../askpassphrasedialog.cpp" line="122"/>
<location filename="../askpassphrasedialog.cpp" line="129"/>
<location filename="../askpassphrasedialog.cpp" line="171"/>
<location filename="../askpassphrasedialog.cpp" line="177"/>
<source>Wallet encryption failed</source>
<translation>Nepavyko užšifruoti piniginę</translation>
</message>
<message>
<location filename="../askpassphrasedialog.cpp" line="107"/>
<source>WARNING: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR PEERCOINS</b>!
Are you sure you wish to encrypt your wallet?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../askpassphrasedialog.cpp" line="117"/>
<source>OMFGcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your OMFGcoins from being stolen by malware infecting your computer.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../askpassphrasedialog.cpp" line="123"/>
<source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
<translation>Dėl vidinės klaidos nepavyko užšifruoti piniginę.Piniginė neužšifruota.</translation>
</message>
<message>
<location filename="../askpassphrasedialog.cpp" line="130"/>
<location filename="../askpassphrasedialog.cpp" line="178"/>
<source>The supplied passphrases do not match.</source>
<translation>Įvestas slaptažodis nesutampa</translation>
</message>
<message>
<location filename="../askpassphrasedialog.cpp" line="141"/>
<source>Wallet unlock failed</source>
<translation>Nepavyko atrakinti piniginę</translation>
</message>
<message>
<location filename="../askpassphrasedialog.cpp" line="142"/>
<location filename="../askpassphrasedialog.cpp" line="153"/>
<location filename="../askpassphrasedialog.cpp" line="172"/>
<source>The passphrase entered for the wallet decryption was incorrect.</source>
<translation> Neteisingai įvestas slaptažodis piniginės iššifravimui</translation>
</message>
<message>
<location filename="../askpassphrasedialog.cpp" line="152"/>
<source>Wallet decryption failed</source>
<translation>Nepavyko iššifruoti piniginę</translation>
</message>
<message>
<location filename="../askpassphrasedialog.cpp" line="166"/>
<source>Wallet passphrase was succesfully changed.</source>
<translation>Sėkmingai pakeistas piniginės slaptažodis</translation>
</message>
</context>
<context>
<name>BitcoinGUI</name>
<message>
<location filename="../bitcoingui.cpp" line="191"/>
<source>&Overview</source>
<translation type="unfinished">&O Apžvalga</translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="192"/>
<source>Show general overview of wallet</source>
<translation type="unfinished">Rodyti piniginės bendrą apžvalgą</translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="197"/>
<source>&Transactions</source>
<translation type="unfinished">&T Sandoriai</translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="198"/>
<source>Browse transaction history</source>
<translation type="unfinished">Apžvelgti sandorių istoriją</translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="203"/>
<source>&Minting</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="204"/>
<source>Show your minting capacity</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="209"/>
<source>&Address Book</source>
<translation type="unfinished">&Adresų knygelė</translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="210"/>
<source>Edit the list of stored addresses and labels</source>
<translation type="unfinished">Redaguoti išsaugotus adresus bei žymes</translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="215"/>
<source>&Receive coins</source>
<translation type="unfinished">&R Gautos monetos</translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="216"/>
<source>Show the list of addresses for receiving payments</source>
<translation type="unfinished">Parodyti adresų sąraša mokėjimams gauti</translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="221"/>
<source>&Send coins</source>
<translation type="unfinished">&Siųsti monetas</translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="227"/>
<source>Sign/Verify &message</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="228"/>
<source>Prove you control an address</source>
<translation type="unfinished">Įrodyti, kad jūs valdyti adresą</translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="249"/>
<source>E&xit</source>
<translation type="unfinished">&x išėjimas</translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="250"/>
<source>Quit application</source>
<translation type="unfinished">Išjungti programą</translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="254"/>
<source>Show information about OMFGcoin</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="256"/>
<source>About &Qt</source>
<translation type="unfinished">Apie &Qt</translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="257"/>
<source>Show information about Qt</source>
<translation type="unfinished">Rodyti informaciją apie Qt</translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="259"/>
<source>&Options...</source>
<translation type="unfinished">&Opcijos...</translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="264"/>
<source>&Export...</source>
<translation type="unfinished">&Eksportas...</translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="265"/>
<source>Export the data in the current tab to a file</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="266"/>
<source>&Encrypt Wallet</source>
<translation type="unfinished">&E Užšifruoti piniginę</translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="267"/>
<source>Encrypt or decrypt wallet</source>
<translation type="unfinished">Užšifruoti ar iššifruoti piniginę</translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="269"/>
<source>&Unlock Wallet for Minting Only</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="270"/>
<source>Unlock wallet only for minting. Sending coins will still require the passphrase.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="272"/>
<source>&Backup Wallet</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="273"/>
<source>Backup wallet to another location</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="274"/>
<source>&Change Passphrase</source>
<translation type="unfinished">&C Pakeisti slaptažodį</translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="275"/>
<source>Change the passphrase used for wallet encryption</source>
<translation type="unfinished">Pakeisti slaptažodį naudojamą piniginės užšifravimui</translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="276"/>
<source>&Debug window</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="277"/>
<source>Open debugging and diagnostic console</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="301"/>
<source>&File</source>
<translation type="unfinished">&Failas</translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="310"/>
<source>&Settings</source>
<translation type="unfinished">Nu&Statymai</translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="317"/>
<source>&Help</source>
<translation type="unfinished">&H Pagelba</translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="326"/>
<source>Tabs toolbar</source>
<translation type="unfinished">Tabs įrankių juosta</translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="338"/>
<source>Actions toolbar</source>
<translation type="unfinished">Veiksmų įrankių juosta</translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="350"/>
<source>[testnet]</source>
<translation type="unfinished">[testavimotinklas]</translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="658"/>
<source>This transaction is over the size limit. You can still send it for a fee of %1. Do you want to pay the fee?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="76"/>
<source>OMFGcoin Wallet</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="222"/>
<source>Send coins to a OMFGcoin address</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="253"/>
<source>&About OMFGcoin</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="260"/>
<source>Modify configuration options for OMFGcoin</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="262"/>
<source>Show/Hide &OMFGcoin</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="263"/>
<source>Show or hide the OMFGcoin window</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="415"/>
<source>OMFGcoin client</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="443"/>
<source>p-qt</source>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
<location filename="../bitcoingui.cpp" line="507"/>
<source>%n active connection(s) to OMFGcoin network</source>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="531"/>
<source>Synchronizing with network...</source>
<translation type="unfinished">Sinchronizavimas su tinklu ...</translation>
</message>
<message numerus="yes">
<location filename="../bitcoingui.cpp" line="533"/>
<source>~%n block(s) remaining</source>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="544"/>
<source>Downloaded %1 of %2 blocks of transaction history (%3% done).</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="556"/>
<source>Downloaded %1 blocks of transaction history.</source>
<translation type="unfinished">Atsisiuntė %1 iš %2 sandorių istorijos blokų</translation>
</message>
<message numerus="yes">
<location filename="../bitcoingui.cpp" line="571"/>
<source>%n second(s) ago</source>
<translation type="unfinished">
<numerusform>Prieš %n sekundę</numerusform>
<numerusform>Prieš %n sekundes</numerusform>
<numerusform>Prieš %n sekundžių</numerusform>
</translation>
</message>
<message numerus="yes">
<location filename="../bitcoingui.cpp" line="575"/>
<source>%n minute(s) ago</source>
<translation type="unfinished">
<numerusform>Prieš %n minutę</numerusform>
<numerusform>Prieš %n minutes</numerusform>
<numerusform>Prieš %n minutčių</numerusform>
</translation>
</message>
<message numerus="yes">
<location filename="../bitcoingui.cpp" line="579"/>
<source>%n hour(s) ago</source>
<translation type="unfinished">
<numerusform>Prieš %n valandą</numerusform>
<numerusform>Prieš %n valandas</numerusform>
<numerusform>Prieš %n valandų</numerusform>
</translation>
</message>
<message numerus="yes">
<location filename="../bitcoingui.cpp" line="583"/>
<source>%n day(s) ago</source>
<translation type="unfinished">
<numerusform>Prieš %n dieną</numerusform>
<numerusform>Prieš %n dienas</numerusform>
<numerusform>Prieš %n dienų</numerusform>
</translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="589"/>
<source>Up to date</source>
<translation type="unfinished">Iki šiol</translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="594"/>
<source>Catching up...</source>
<translation type="unfinished">Gaudo...</translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="602"/>
<source>Last received block was generated %1.</source>
<translation type="unfinished">Paskutinis gautas blokas buvo sukurtas %1.</translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="661"/>
<source>Sending...</source>
<translation type="unfinished">Siunčiama</translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="688"/>
<source>Sent transaction</source>
<translation type="unfinished">Sandoris nusiųstas</translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="689"/>
<source>Incoming transaction</source>
<translation type="unfinished">Ateinantis sandoris</translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="690"/>
<source>Date: %1
Amount: %2
Type: %3
Address: %4
</source>
<translation type="unfinished">Data: %1
Suma: %2
Tipas: %3
Adresas: %4</translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="821"/>
<source>Wallet is <b>encrypted</b> and currently <b>unlocked for block minting only</b></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="821"/>
<source>Wallet is <b>encrypted</b> and currently <b>unlocked</b></source>
<translation type="unfinished">Piniginė <b>užšifruota</b> ir šiuo metu <b>atrakinta</b></translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="831"/>
<source>Wallet is <b>encrypted</b> and currently <b>locked</b></source>
<translation type="unfinished">Piniginė <b>užšifruota</b> ir šiuo metu <b>užrakinta</b></translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="888"/>
<source>Backup Wallet</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="888"/>
<source>Wallet Data (*.dat)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="891"/>
<source>Backup Failed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoingui.cpp" line="891"/>
<source>There was an error trying to save the wallet data to the new location.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoin.cpp" line="128"/>
<source>A fatal error occured. OMFGcoin can no longer continue safely and will quit.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>CoinControlDialog</name>
<message>
<location filename="../forms/coincontroldialog.ui" line="14"/>
<source>Coin Control</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/coincontroldialog.ui" line="45"/>
<source>Quantity:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/coincontroldialog.ui" line="64"/>
<location filename="../forms/coincontroldialog.ui" line="96"/>
<source>0</source>
<translation type="unfinished">0</translation>
</message>
<message>
<location filename="../forms/coincontroldialog.ui" line="77"/>
<source>Bytes:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/coincontroldialog.ui" line="125"/>
<source>Amount:</source>
<translation type="unfinished">Suma:</translation>
</message>
<message>
<location filename="../forms/coincontroldialog.ui" line="144"/>
<location filename="../forms/coincontroldialog.ui" line="224"/>
<location filename="../forms/coincontroldialog.ui" line="310"/>
<location filename="../forms/coincontroldialog.ui" line="348"/>
<source>0.00 BTC</source>
<translation type="unfinished">123.456 BTC {0.00 ?}</translation>
</message>
<message>
<location filename="../forms/coincontroldialog.ui" line="157"/>
<source>Priority:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/coincontroldialog.ui" line="205"/>
<source>Fee:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/coincontroldialog.ui" line="240"/>
<source>Low Output:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/coincontroldialog.ui" line="262"/>
<location filename="../coincontroldialog.cpp" line="572"/>
<source>no</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/coincontroldialog.ui" line="291"/>
<source>After Fee:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/coincontroldialog.ui" line="326"/>
<source>Change:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/coincontroldialog.ui" line="395"/>
<source>(un)select all</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/coincontroldialog.ui" line="408"/>
<source>Tree mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/coincontroldialog.ui" line="424"/>
<source>List mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/coincontroldialog.ui" line="469"/>
<source>Amount</source>
<translation type="unfinished">Suma</translation>
</message>
<message>
<location filename="../forms/coincontroldialog.ui" line="479"/>
<source>Address</source>
<translation type="unfinished">Adresas</translation>
</message>
<message>
<location filename="../forms/coincontroldialog.ui" line="484"/>
<source>Date</source>
<translation type="unfinished">Data</translation>
</message>
<message>
<location filename="../forms/coincontroldialog.ui" line="489"/>
<source>Confirmations</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/coincontroldialog.ui" line="492"/>
<source>Confirmed</source>
<translation type="unfinished">Patvirtintas</translation>
</message>
<message>
<location filename="../forms/coincontroldialog.ui" line="497"/>
<source>Coin days</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/coincontroldialog.ui" line="502"/>
<source>Priority</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="36"/>
<source>Copy address</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="37"/>
<source>Copy label</source>
<translation type="unfinished">Kopijuoti žymę</translation>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="38"/>
<location filename="../coincontroldialog.cpp" line="64"/>
<source>Copy amount</source>
<translation type="unfinished">Kopijuoti sumą</translation>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="39"/>
<source>Copy transaction ID</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="63"/>
<source>Copy quantity</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="65"/>
<source>Copy fee</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="66"/>
<source>Copy after fee</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="67"/>
<source>Copy bytes</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="68"/>
<source>Copy priority</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="69"/>
<source>Copy low output</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="70"/>
<source>Copy change</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="388"/>
<source>highest</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="389"/>
<source>high</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="390"/>
<source>medium-high</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="391"/>
<source>medium</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="395"/>
<source>low-medium</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="396"/>
<source>low</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="397"/>
<source>lowest</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="572"/>
<source>DUST</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="572"/>
<source>yes</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="582"/>
<source>This label turns red, if the transaction size is bigger than 10000 bytes.
This means a fee of at least %1 per kb is required.
Can vary +/- 1 Byte per input.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="583"/>
<source>Transactions with higher priority get more likely into a block.
This label turns red, if the priority is smaller than "medium".
This means a fee of at least %1 per kb is required.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="584"/>
<source>This label turns red, if any recipient receives an amount smaller than %1.
This means a fee of at least %2 is required.
Amounts below 0.546 times the minimum relay fee are shown as DUST.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="585"/>
<source>This label turns red, if the change is smaller than %1.
This means a fee of at least %2 is required.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="622"/>
<location filename="../coincontroldialog.cpp" line="688"/>
<source>(no label)</source>
<translation type="unfinished">(nėra žymės)</translation>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="679"/>
<source>change from %1 (%2)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="680"/>
<source>(change)</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DisplayOptionsPage</name>
<message>
<location filename="../optionsdialog.cpp" line="275"/>
<source>&Unit to show amounts in: </source>
<translation>&U vienetų rodyti sumas:</translation>
</message>
<message>
<location filename="../optionsdialog.cpp" line="279"/>
<source>Choose the default subdivision unit to show in the interface, and when sending coins</source>
<translation>Rodomų ir siunčiamų monetų kiekio matavimo vienetai</translation>
</message>
<message>
<location filename="../optionsdialog.cpp" line="286"/>
<source>&Display addresses in transaction list</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../optionsdialog.cpp" line="287"/>
<source>Whether to show OMFGcoin addresses in the transaction list</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../optionsdialog.cpp" line="290"/>
<source>Display coin control features (experts only!)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../optionsdialog.cpp" line="291"/>
<source>Whether to show coin control features or not</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>EditAddressDialog</name>
<message>
<location filename="../forms/editaddressdialog.ui" line="14"/>
<source>Edit Address</source>
<translation>Redaguoti adresą</translation>
</message>
<message>
<location filename="../forms/editaddressdialog.ui" line="25"/>
<source>&Label</source>
<translation>&L Žymė</translation>
</message>
<message>
<location filename="../forms/editaddressdialog.ui" line="35"/>
<source>The label associated with this address book entry</source>
<translation>Žymė yra susieta su šios adresų knygelęs turiniu</translation>
</message>
<message>
<location filename="../forms/editaddressdialog.ui" line="42"/>
<source>&Address</source>
<translation>&Adresas</translation>
</message>
<message>
<location filename="../forms/editaddressdialog.ui" line="52"/>
<source>The address associated with this address book entry. This can only be modified for sending addresses.</source>
<translation>Adresas yra susietas su šios adresų knygelęs turiniu. Tai gali būti keičiama tik siuntimo adresams.</translation>
</message>
<message>
<location filename="../editaddressdialog.cpp" line="20"/>
<source>New receiving address</source>
<translation>Naujas gavimo adresas</translation>
</message>
<message>
<location filename="../editaddressdialog.cpp" line="24"/>
<source>New sending address</source>
<translation>Naujas siuntimo adresas</translation>
</message>
<message>
<location filename="../editaddressdialog.cpp" line="27"/>
<source>Edit receiving address</source>
<translation>Taisyti gavimo adresą</translation>
</message>
<message>
<location filename="../editaddressdialog.cpp" line="31"/>
<source>Edit sending address</source>
<translation>Taisyti siuntimo adresą</translation>
</message>
<message>
<location filename="../editaddressdialog.cpp" line="91"/>
<source>The entered address "%1" is already in the address book.</source>
<translation>Įvestas adresas "%1"yra adresų knygelėje</translation>
</message>
<message>
<location filename="../editaddressdialog.cpp" line="96"/>
<source>The entered address "%1" is not a valid OMFGcoin address.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../editaddressdialog.cpp" line="101"/>
<source>Could not unlock wallet.</source>
<translation>Neįmanoma atrakinti piniginės</translation>
</message>
<message>
<location filename="../editaddressdialog.cpp" line="106"/>
<source>New key generation failed.</source>
<translation>Naujas raktas nesukurtas</translation>
</message>
</context>
<context>
<name>MainOptionsPage</name>
<message>
<location filename="../optionsdialog.cpp" line="177"/>
<source>&Minimize to the tray instead of the taskbar</source>
<translation>&M sumažinti langą bet ne užduočių juostą</translation>
</message>
<message>
<location filename="../optionsdialog.cpp" line="178"/>
<source>Show only a tray icon after minimizing the window</source>
<translation>Po programos lango sumažinimo rodyti tik programos ikoną.</translation>
</message>
<message>
<location filename="../optionsdialog.cpp" line="186"/>
<source>Map port using &UPnP</source>
<translation>Prievado struktūra naudojant & UPnP</translation>
</message>
<message>
<location filename="../optionsdialog.cpp" line="181"/>
<source>M&inimize on close</source>
<translation>&i Sumažinti uždarant</translation>
</message>
<message>
<location filename="../optionsdialog.cpp" line="182"/>
<source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source>
<translation>Uždarant langą neuždaryti programos. Kai ši parinktis įjungta, programa bus uždaryta tik pasirinkus meniu komandą Baigti.</translation>
</message>
<message>
<location filename="../optionsdialog.cpp" line="187"/>
<source>Automatically open the OMFGcoin client port on the router. This only works when your router supports UPnP and it is enabled.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../optionsdialog.cpp" line="190"/>
<source>&Connect through SOCKS4 proxy:</source>
<translation>&C Jungtis per socks4 proxy:</translation>
</message>
<message>
<location filename="../optionsdialog.cpp" line="191"/>
<source>Connect to the Bitcon network through a SOCKS4 proxy (e.g. when connecting through Tor)</source>
<translation>Jungtis į Bitkoin tinklą per socks4 proxy (pvz. jungiantis per Tor)</translation>
</message>
<message>
<location filename="../optionsdialog.cpp" line="196"/>
<source>Proxy &IP: </source>
<translation>Proxy &IP: </translation>
</message>
<message>
<location filename="../optionsdialog.cpp" line="202"/>
<source>IP address of the proxy (e.g. 127.0.0.1)</source>
<translation>IP adresas proxy (pvz. 127.0.0.1)</translation>
</message>
<message>
<location filename="../optionsdialog.cpp" line="205"/>
<source>&Port: </source>
<translation>&Prievadas: </translation>
</message>
<message>
<location filename="../optionsdialog.cpp" line="211"/>
<source>Port of the proxy (e.g. 1234)</source>
<translation>Proxy prievadas (pvz. 1234)</translation>
</message>
<message>
<location filename="../optionsdialog.cpp" line="217"/>
<source>Mandatory network transaction fee per kB transferred. Most transactions are 1 kB and incur a 0.01 OMFG fee. Note: transfer size may increase depending on the number of input transactions required to be added together to fund the payment.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../optionsdialog.cpp" line="223"/>
<source>Additional network &fee:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../optionsdialog.cpp" line="234"/>
<source>Detach databases at shutdown</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../optionsdialog.cpp" line="235"/>
<source>Detach block and address databases at shutdown. This means they can be moved to another data directory, but it slows down shutdown. The wallet is always detached.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../optionsdialog.cpp" line="172"/>
<source>&Start OMFGcoin on window system startup</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../optionsdialog.cpp" line="173"/>
<source>Automatically start OMFGcoin after the computer is turned on</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MintingTableModel</name>
<message>
<location filename="../mintingtablemodel.cpp" line="203"/>
<source>Transaction</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mintingtablemodel.cpp" line="203"/>
<source>Address</source>
<translation type="unfinished">Adresas</translation>
</message>
<message>
<location filename="../mintingtablemodel.cpp" line="203"/>
<source>Age</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mintingtablemodel.cpp" line="203"/>
<source>Balance</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mintingtablemodel.cpp" line="203"/>
<source>CoinDay</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mintingtablemodel.cpp" line="203"/>
<source>MintProbability</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mintingtablemodel.cpp" line="284"/>
<source>minutes</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mintingtablemodel.cpp" line="291"/>
<source>hours</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mintingtablemodel.cpp" line="295"/>
<source>days</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mintingtablemodel.cpp" line="298"/>
<source>You have %1 chance to find a POS block if you mint %2 %3 at current difficulty.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mintingtablemodel.cpp" line="418"/>
<source>Destination address of the output.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mintingtablemodel.cpp" line="420"/>
<source>Original transaction id.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mintingtablemodel.cpp" line="422"/>
<source>Age of the transaction in days.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mintingtablemodel.cpp" line="424"/>
<source>Balance of the output.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mintingtablemodel.cpp" line="426"/>
<source>Coin age in the output.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mintingtablemodel.cpp" line="428"/>
<source>Chance to mint a block within given time interval.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MintingView</name>
<message>
<location filename="../mintingview.cpp" line="33"/>
<source>transaction is too young</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mintingview.cpp" line="40"/>
<source>transaction is mature</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mintingview.cpp" line="47"/>
<source>transaction has reached maximum probability</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mintingview.cpp" line="60"/>
<source>Display minting probability within : </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mintingview.cpp" line="62"/>
<source>10 min</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mintingview.cpp" line="63"/>
<source>24 hours</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mintingview.cpp" line="64"/>
<source>30 days</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mintingview.cpp" line="65"/>
<source>90 days</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mintingview.cpp" line="162"/>
<source>Export Minting Data</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mintingview.cpp" line="163"/>
<source>Comma separated file (*.csv)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mintingview.cpp" line="171"/>
<source>Address</source>
<translation type="unfinished">Adresas</translation>
</message>
<message>
<location filename="../mintingview.cpp" line="172"/>
<source>Transaction</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mintingview.cpp" line="173"/>
<source>Age</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mintingview.cpp" line="174"/>
<source>CoinDay</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mintingview.cpp" line="175"/>
<source>Balance</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mintingview.cpp" line="176"/>
<source>MintingProbability</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mintingview.cpp" line="180"/>
<source>Error exporting</source>
<translation type="unfinished">Eksportavimo klaida</translation>
</message>
<message>
<location filename="../mintingview.cpp" line="180"/>
<source>Could not write to file %1.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>OptionsDialog</name>
<message>
<location filename="../optionsdialog.cpp" line="81"/>
<source>Main</source>
<translation>Pagrindinis</translation>
</message>
<message>
<location filename="../optionsdialog.cpp" line="86"/>
<source>Display</source>
<translation>Ekranas</translation>
</message>
<message>
<location filename="../optionsdialog.cpp" line="106"/>
<source>Options</source>
<translation>Opcijos</translation>
</message>
</context>
<context>
<name>OverviewPage</name>
<message>
<location filename="../forms/overviewpage.ui" line="14"/>
<source>Form</source>
<translation>Forma</translation>
</message>
<message>
<location filename="../forms/overviewpage.ui" line="40"/>
<source>Balance:</source>
<translation>Balansas</translation>
</message>
<message>
<location filename="../forms/overviewpage.ui" line="54"/>
<source>Number of transactions:</source>
<translation>Sandorių kiekis</translation>
</message>
<message>
<location filename="../forms/overviewpage.ui" line="61"/>
<source>0</source>
<translation>0</translation>
</message>
<message>
<location filename="../forms/overviewpage.ui" line="68"/>
<source>Unconfirmed:</source>
<translation>Nepatvirtinti:</translation>
</message>
<message>
<location filename="../forms/overviewpage.ui" line="82"/>
<source>Stake:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/overviewpage.ui" line="102"/>
<source>Wallet</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/overviewpage.ui" line="138"/>
<source><b>Recent transactions</b></source>
<translation><b>Naujausi sandoris</b></translation>
</message>
<message>
<location filename="../overviewpage.cpp" line="104"/>
<source>Your current balance</source>
<translation>Jūsų einamasis balansas</translation>
</message>
<message>
<location filename="../overviewpage.cpp" line="109"/>
<source>Your current stake</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../overviewpage.cpp" line="114"/>
<source>Total of transactions that have yet to be confirmed, and do not yet count toward the current balance</source>
<translation>Iš viso sandorių, įskaitant tuos kurie dar turi būti patvirtinti, ir jie dar nėra įskaičiuotii į einamosios sąskaitos balansą</translation>
</message>
<message>
<location filename="../overviewpage.cpp" line="117"/>
<source>Total number of transactions in wallet</source>
<translation>Bandras sandorių kiekis piniginėje</translation>
</message>
</context>
<context>
<name>QRCodeDialog</name>
<message>
<location filename="../forms/qrcodedialog.ui" line="14"/>
<source>Dialog</source>
<translation>Dialogas</translation>
</message>
<message>
<location filename="../forms/qrcodedialog.ui" line="32"/>
<source>QR Code</source>
<translation>QR kodas</translation>
</message>
<message>
<location filename="../forms/qrcodedialog.ui" line="55"/>
<source>Request Payment</source>
<translation>Prašau išmokėti</translation>
</message>
<message>
<location filename="../forms/qrcodedialog.ui" line="70"/>
<source>Amount:</source>
<translation>Suma:</translation>
</message>
<message>
<location filename="../forms/qrcodedialog.ui" line="105"/>
<source>OMFG</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/qrcodedialog.ui" line="121"/>
<source>Label:</source>
<translation>Žymė:</translation>
</message>
<message>
<location filename="../forms/qrcodedialog.ui" line="144"/>
<source>Message:</source>
<translation>Žinutė:</translation>
</message>
<message>
<location filename="../forms/qrcodedialog.ui" line="186"/>
<source>&Save As...</source>
<translation>&S išsaugoti kaip...</translation>
</message>
<message>
<location filename="../qrcodedialog.cpp" line="46"/>
<source>Error encoding URI into QR Code.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qrcodedialog.cpp" line="64"/>
<source>Resulting URI too long, try to reduce the text for label / message.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qrcodedialog.cpp" line="121"/>
<source>Save Image...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qrcodedialog.cpp" line="121"/>
<source>PNG Images (*.png)</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>RPCConsole</name>
<message>
<location filename="../forms/rpcconsole.ui" line="14"/>
<source>OMFGcoin (OMFGcoin) debug window</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/rpcconsole.ui" line="24"/>
<source>Information</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/rpcconsole.ui" line="33"/>
<source>Client name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/rpcconsole.ui" line="40"/>
<location filename="../forms/rpcconsole.ui" line="60"/>
<location filename="../forms/rpcconsole.ui" line="106"/>
<location filename="../forms/rpcconsole.ui" line="156"/>
<location filename="../forms/rpcconsole.ui" line="176"/>
<location filename="../forms/rpcconsole.ui" line="196"/>
<location filename="../forms/rpcconsole.ui" line="229"/>
<location filename="../rpcconsole.cpp" line="338"/>
<source>N/A</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/rpcconsole.ui" line="53"/>
<source>Client version</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/rpcconsole.ui" line="79"/>
<source>Version</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/rpcconsole.ui" line="92"/>
<source>Network</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/rpcconsole.ui" line="99"/>
<source>Number of connections</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/rpcconsole.ui" line="119"/>
<source>On testnet</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/rpcconsole.ui" line="142"/>
<source>Block chain</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/rpcconsole.ui" line="149"/>
<source>Current number of blocks</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/rpcconsole.ui" line="169"/>
<source>Estimated total blocks</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/rpcconsole.ui" line="189"/>
<source>Last block time</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/rpcconsole.ui" line="222"/>
<source>Build date</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/rpcconsole.ui" line="237"/>
<source>Console</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/rpcconsole.ui" line="270"/>
<source>></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/rpcconsole.ui" line="286"/>
<source>Clear console</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../rpcconsole.cpp" line="306"/>
<source>Welcome to the OMFGcoin RPC console.<br>Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen.<br>Type <b>help</b> for an overview of available commands.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SendCoinsDialog</name>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="14"/>
<location filename="../sendcoinsdialog.cpp" line="176"/>
<location filename="../sendcoinsdialog.cpp" line="181"/>
<location filename="../sendcoinsdialog.cpp" line="186"/>
<location filename="../sendcoinsdialog.cpp" line="191"/>
<location filename="../sendcoinsdialog.cpp" line="197"/>
<location filename="../sendcoinsdialog.cpp" line="202"/>
<location filename="../sendcoinsdialog.cpp" line="207"/>
<source>Send Coins</source>
<translation>Siųsti monetas</translation>
</message>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="90"/>
<source>Coin Control Features</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="110"/>
<source>Inputs...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="117"/>
<source>automatically selected</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="136"/>
<source>Insufficient funds!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="213"/>
<source>Quantity:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="235"/>
<location filename="../forms/sendcoinsdialog.ui" line="270"/>
<source>0</source>
<translation type="unfinished">0</translation>
</message>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="251"/>
<source>Bytes:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="302"/>
<source>Amount:</source>
<translation type="unfinished">Suma:</translation>
</message>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="324"/>
<location filename="../forms/sendcoinsdialog.ui" line="410"/>
<location filename="../forms/sendcoinsdialog.ui" line="496"/>
<location filename="../forms/sendcoinsdialog.ui" line="528"/>
<source>0.00 BTC</source>
<translation type="unfinished">123.456 BTC {0.00 ?}</translation>
</message>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="337"/>
<source>Priority:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="356"/>
<source>medium</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="388"/>
<source>Fee:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="423"/>
<source>Low Output:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="442"/>
<source>no</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="474"/>
<source>After Fee:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="509"/>
<source>Change</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="559"/>
<source>custom change address</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="665"/>
<source>Send to multiple recipients at once</source>
<translation>Siųsti keliems gavėjams vienu metu</translation>
</message>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="668"/>
<source>&Add recipient...</source>
<translation>&A Pridėti gavėją</translation>
</message>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="685"/>
<source>Remove all transaction fields</source>
<translation>Pašalinti visus sandorio laukus</translation>
</message>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="688"/>
<source>Clear all</source>
<translation>Ištrinti viską</translation>
</message>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="707"/>
<source>Balance:</source>
<translation>Balansas:</translation>
</message>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="714"/>
<source>123.456 BTC</source>
<translation>123.456 BTC</translation>
</message>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="745"/>
<source>Confirm the send action</source>
<translation>Patvirtinti siuntimo veiksmą</translation>
</message>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="748"/>
<source>&Send</source>
<translation>&Siųsti</translation>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="51"/>
<source>Copy quantity</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="52"/>
<source>Copy amount</source>
<translation type="unfinished">Kopijuoti sumą</translation>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="53"/>
<source>Copy fee</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="54"/>
<source>Copy after fee</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="55"/>
<source>Copy bytes</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="56"/>
<source>Copy priority</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="57"/>
<source>Copy low output</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="58"/>
<source>Copy change</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="144"/>
<source><b>%1</b> to %2 (%3)</source>
<translation><b>%1</b> to %2 (%3)</translation>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="149"/>
<source>Confirm send coins</source>
<translation>Patvirtinti siuntimui monetas</translation>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="150"/>
<source>Are you sure you want to send %1?</source>
<translation>Ar esate įsitikinę, kad norite siųsti %1?</translation>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="150"/>
<source> and </source>
<translation>ir</translation>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="182"/>
<source>The amount to pay must be at least one cent (0.01).</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="457"/>
<source>Warning: Invalid Bitcoin address</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="466"/>
<source>Warning: Unknown change address</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="477"/>
<source>(no label)</source>
<translation type="unfinished">(nėra žymės)</translation>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="187"/>
<source>Amount exceeds your balance</source>
<translation>Suma viršija jūsų balansą</translation>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="36"/>
<source>Enter a OMFGcoin address</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="177"/>
<source>The recipient address is not valid, please recheck.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="192"/>
<source>Total exceeds your balance when the %1 transaction fee is included</source>
<translation>Jei pridedame sandorio mokestį %1 bendra suma viršija jūsų balansą</translation>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="198"/>
<source>Duplicate address found, can only send to each address once in one send operation</source>
<translation>Rastas adreso dublikatas</translation>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="203"/>
<source>Error: Transaction creation failed </source>
<translation>KLAIDA:nepavyko sudaryti sandorio</translation>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="208"/>
<source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
<translation>Klaida: sandoris buvo atmestas.Tai gali įvykti, jei kai kurios monetos iš jūsų piniginėje jau buvo panaudotos, pvz. jei naudojote wallet.dat kopiją ir monetos buvo išleistos kopijoje, bet nepažymėtos kaip skirtos išleisti čia.</translation>
</message>
</context>
<context>
<name>SendCoinsEntry</name>
<message>
<location filename="../forms/sendcoinsentry.ui" line="14"/>
<source>Form</source>
<translation>Forma</translation>
</message>
<message>
<location filename="../forms/sendcoinsentry.ui" line="29"/>
<source>A&mount:</source>
<translation>Su&ma:</translation>
</message>
<message>
<location filename="../forms/sendcoinsentry.ui" line="42"/>
<source>Pay &To:</source>
<translation>Mokėti &T gavėjui:</translation>
</message>
<message>
<location filename="../forms/sendcoinsentry.ui" line="66"/>
<location filename="../sendcoinsentry.cpp" line="26"/>
<source>Enter a label for this address to add it to your address book</source>
<translation>Įveskite žymę šiam adresui kad galėtumėte įtraukti ją į adresų knygelę</translation>
</message>
<message>
<location filename="../forms/sendcoinsentry.ui" line="75"/>
<source>&Label:</source>
<translation>&L žymė:</translation>
</message>
<message>
<location filename="../forms/sendcoinsentry.ui" line="93"/>
<source>The address to send the payment to</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/sendcoinsentry.ui" line="103"/>
<source>Choose address from address book</source>
<translation>Pasirinkite adresą iš adresų knygelės</translation>
</message>
<message>
<location filename="../forms/sendcoinsentry.ui" line="113"/>
<source>Alt+A</source>
<translation>Alt+A</translation>
</message>
<message>
<location filename="../forms/sendcoinsentry.ui" line="120"/>
<source>Paste address from clipboard</source>
<translation>Įvesti adresą iš mainų atminties</translation>
</message>
<message>
<location filename="../forms/sendcoinsentry.ui" line="130"/>
<source>Alt+P</source>
<translation>Alt+P</translation>
</message>
<message>
<location filename="../forms/sendcoinsentry.ui" line="137"/>
<source>Remove this recipient</source>
<translation>Pašalinti šitą gavėją</translation>
</message>
<message>
<location filename="../sendcoinsentry.cpp" line="25"/>
<source>Enter a OMFGcoin address</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SignVerifyMessageDialog</name>
<message>
<location filename="../forms/signverifymessagedialog.ui" line="14"/>
<source>Signatures - Sign / Verify a Message</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/signverifymessagedialog.ui" line="24"/>
<source>&Sign Message</source>
<translation type="unfinished">&S Registruotis žinute</translation>
</message>
<message>
<location filename="../forms/signverifymessagedialog.ui" line="30"/>
<source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/signverifymessagedialog.ui" line="48"/>
<source>The address to sign the message with</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/signverifymessagedialog.ui" line="55"/>
<location filename="../forms/signverifymessagedialog.ui" line="265"/>
<source>Choose previously used address</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/signverifymessagedialog.ui" line="65"/>
<location filename="../forms/signverifymessagedialog.ui" line="275"/>
<source>Alt+A</source>
<translation type="unfinished">Alt+A</translation>
</message>
<message>
<location filename="../forms/signverifymessagedialog.ui" line="75"/>
<source>Paste address from clipboard</source>
<translation type="unfinished">Įvesti adresą iš mainų atminties</translation>
</message>
<message>
<location filename="../forms/signverifymessagedialog.ui" line="85"/>
<source>Alt+P</source>
<translation type="unfinished">Alt+P</translation>
</message>
<message>
<location filename="../forms/signverifymessagedialog.ui" line="97"/>
<source>Enter the message you want to sign here</source>
<translation type="unfinished">Įveskite pranešimą, kurį norite pasirašyti čia</translation>
</message>
<message>
<location filename="../forms/signverifymessagedialog.ui" line="104"/>
<source>Signature</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/signverifymessagedialog.ui" line="131"/>
<source>Copy the current signature to the system clipboard</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/signverifymessagedialog.ui" line="152"/>
<source>Sign the message to prove you own this OMFGcoin address</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/signverifymessagedialog.ui" line="155"/>
<source>Sign &Message</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/signverifymessagedialog.ui" line="169"/>
<source>Reset all sign message fields</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/signverifymessagedialog.ui" line="172"/>
<location filename="../forms/signverifymessagedialog.ui" line="315"/>
<source>Clear &All</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/signverifymessagedialog.ui" line="231"/>
<source>&Verify Message</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/signverifymessagedialog.ui" line="237"/>
<source>Enter the signing address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/signverifymessagedialog.ui" line="258"/>
<source>The address the message was signed with</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/signverifymessagedialog.ui" line="295"/>
<source>Verify the message to ensure it was signed with the specified OMFGcoin address</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/signverifymessagedialog.ui" line="298"/>
<source>Verify &Message</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/signverifymessagedialog.ui" line="312"/>
<source>Reset all verify message fields</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../signverifymessagedialog.cpp" line="29"/>
<source>Click "Sign Message" to generate signature</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../signverifymessagedialog.cpp" line="30"/>
<source>Enter the signature of the message</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../signverifymessagedialog.cpp" line="31"/>
<location filename="../signverifymessagedialog.cpp" line="32"/>
<source>Enter a OMFGcoin address</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../signverifymessagedialog.cpp" line="115"/>
<location filename="../signverifymessagedialog.cpp" line="195"/>
<source>The entered address is invalid.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../signverifymessagedialog.cpp" line="115"/>
<location filename="../signverifymessagedialog.cpp" line="123"/>
<location filename="../signverifymessagedialog.cpp" line="195"/>
<location filename="../signverifymessagedialog.cpp" line="203"/>
<source>Please check the address and try again.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../signverifymessagedialog.cpp" line="123"/>
<location filename="../signverifymessagedialog.cpp" line="203"/>
<source>The entered address does not refer to a key.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../signverifymessagedialog.cpp" line="131"/>
<source>Wallet unlock was cancelled.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../signverifymessagedialog.cpp" line="139"/>
<source>Private key for the entered address is not available.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../signverifymessagedialog.cpp" line="151"/>
<source>Message signing failed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../signverifymessagedialog.cpp" line="156"/>
<source>Message signed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../signverifymessagedialog.cpp" line="214"/>
<source>The signature could not be decoded.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../signverifymessagedialog.cpp" line="214"/>
<location filename="../signverifymessagedialog.cpp" line="227"/>
<source>Please check the signature and try again.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../signverifymessagedialog.cpp" line="227"/>
<source>The signature did not match the message digest.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../signverifymessagedialog.cpp" line="234"/>
<source>Message verification failed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../signverifymessagedialog.cpp" line="239"/>
<source>Message verified.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>TransactionDesc</name>
<message>
<location filename="../transactiondesc.cpp" line="21"/>
<source>Open for %1 blocks</source>
<translation>Atidaryta %1 blokams</translation>
</message>
<message>
<location filename="../transactiondesc.cpp" line="23"/>
<source>Open until %1</source>
<translation>Atidaryta iki %1</translation>
</message>
<message>
<location filename="../transactiondesc.cpp" line="29"/>
<source>%1/offline?</source>
<translation>%1/atjungtas?</translation>
</message>
<message>
<location filename="../transactiondesc.cpp" line="31"/>
<source>%1/unconfirmed</source>
<translation>%1/nepatvirtintas</translation>
</message>
<message>
<location filename="../transactiondesc.cpp" line="33"/>
<source>%1 confirmations</source>
<translation>%1 patvirtinimai</translation>
</message>
<message>
<location filename="../transactiondesc.cpp" line="51"/>
<source><b>Status:</b> </source>
<translation><b>Būsena:</b> </translation>
</message>
<message>
<location filename="../transactiondesc.cpp" line="56"/>
<source>, has not been successfully broadcast yet</source>
<translation>, transliavimas dar nebuvo sėkmingas</translation>
</message>
<message>
<location filename="../transactiondesc.cpp" line="58"/>
<source>, broadcast through %1 node</source>
<translation>, transliuota per %1 mazgą</translation>
</message>
<message>
<location filename="../transactiondesc.cpp" line="60"/>
<source>, broadcast through %1 nodes</source>
<translation>, transliuota per %1 mazgus</translation>
</message>
<message>
<location filename="../transactiondesc.cpp" line="64"/>
<source><b>Date:</b> </source>
<translation><b>Data:</b> </translation>
</message>
<message>
<location filename="../transactiondesc.cpp" line="71"/>
<source><b>Source:</b> Generated<br></source>
<translation><b>Šaltinis:</b> Sukurta<br></translation>
</message>
<message>
<location filename="../transactiondesc.cpp" line="77"/>
<location filename="../transactiondesc.cpp" line="94"/>
<source><b>From:</b> </source>
<translation><b>Nuo:</b> </translation>
</message>
<message>
<location filename="../transactiondesc.cpp" line="94"/>
<source>unknown</source>
<translation>nežinomas</translation>
</message>
<message>
<location filename="../transactiondesc.cpp" line="95"/>
<location filename="../transactiondesc.cpp" line="118"/>
<location filename="../transactiondesc.cpp" line="178"/>
<source><b>To:</b> </source>
<translation><b>Skirta:</b> </translation>
</message>
<message>
<location filename="../transactiondesc.cpp" line="98"/>
<source> (yours, label: </source>
<translation> (jūsų, žymė: </translation>
</message>
<message>
<location filename="../transactiondesc.cpp" line="100"/>
<source> (yours)</source>
<translation> (jūsų)</translation>
</message>
<message>
<location filename="../transactiondesc.cpp" line="136"/>
<location filename="../transactiondesc.cpp" line="150"/>
<location filename="../transactiondesc.cpp" line="195"/>
<location filename="../transactiondesc.cpp" line="212"/>
<source><b>Credit:</b> </source>
<translation><b>Kreditas:</b> </translation>
</message>
<message>
<location filename="../transactiondesc.cpp" line="138"/>
<source>(%1 matures in %2 more blocks)</source>
<translation>(%1 apmokėtinas %2 daugiau blokais)</translation>
</message>
<message>
<location filename="../transactiondesc.cpp" line="142"/>
<source>(not accepted)</source>
<translation>(nepriimta)</translation>
</message>
<message>
<location filename="../transactiondesc.cpp" line="186"/>
<location filename="../transactiondesc.cpp" line="194"/>
<location filename="../transactiondesc.cpp" line="209"/>
<source><b>Debit:</b> </source>
<translation><b>Debitas:</b> </translation>
</message>
<message>
<location filename="../transactiondesc.cpp" line="200"/>
<source><b>Transaction fee:</b> </source>
<translation><b>Sandorio mokestis:</b> </translation>
</message>
<message>
<location filename="../transactiondesc.cpp" line="218"/>
<source><b>Net amount:</b> </source>
<translation><b>Neto suma:</b> </translation>
</message>
<message>
<location filename="../transactiondesc.cpp" line="220"/>
<source><b>Retained amount:</b> %1 until %2 more blocks<br></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../transactiondesc.cpp" line="227"/>
<source>Message:</source>
<translation>Žinutė:</translation>
</message>
<message>
<location filename="../transactiondesc.cpp" line="229"/>
<source>Comment:</source>
<translation>Komentaras:</translation>
</message>
<message>
<location filename="../transactiondesc.cpp" line="231"/>
<source>Transaction ID:</source>
<translation>Sandorio ID:</translation>
</message>
<message>
<location filename="../transactiondesc.cpp" line="234"/>
<source>Generated coins must wait 520 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, it will change to "not accepted" and not be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
<translation type="unfinished">Išgautos monetos turi sulaukti 120 blokų, kol jos gali būti naudojamos. Kai sukūrėte šį bloką, jis buvo transliuojamas tinkle ir turėjo būti įtrauktas į blokų grandinę. Jei nepavyksta patekti į grandinę, bus pakeista į "nepriėmė", o ne "vartojamas". Tai kartais gali atsitikti, jei kitas mazgas per keletą sekundžių sukuria bloką po jūsų bloko. {520 ?}</translation>
</message>
<message>
<location filename="../transactiondesc.cpp" line="236"/>
<source>Staked coins must wait 520 blocks before they can return to balance and be spent. When you generated this proof-of-stake block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, it will change to "not accepted" and not be a valid stake. This may occasionally happen if another node generates a proof-of-stake block within a few seconds of yours.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>TransactionDescDialog</name>
<message>
<location filename="../forms/transactiondescdialog.ui" line="14"/>
<source>Transaction details</source>
<translation>Sandorio išsami informacija</translation>
</message>
<message>
<location filename="../forms/transactiondescdialog.ui" line="20"/>
<source>This pane shows a detailed description of the transaction</source>
<translation>Šis langas sandorio detalų aprašymą</translation>
</message>
</context>
<context>
<name>TransactionTableModel</name>
<message>
<location filename="../transactiontablemodel.cpp" line="214"/>
<source>Date</source>
<translation>Data</translation>
</message>
<message>
<location filename="../transactiontablemodel.cpp" line="214"/>
<source>Type</source>
<translation>Tipas</translation>
</message>
<message>
<location filename="../transactiontablemodel.cpp" line="214"/>
<source>Address</source>
<translation>Adresas</translation>
</message>
<message>
<location filename="../transactiontablemodel.cpp" line="214"/>
<source>Amount</source>
<translation>Suma</translation>
</message>
<message numerus="yes">
<location filename="../transactiontablemodel.cpp" line="281"/>
<source>Open for %n block(s)</source>
<translation>
<numerusform>Atidaryta %n blokui</numerusform>
<numerusform>Atidaryta %n blokams</numerusform>
<numerusform>Atidaryta %n blokų</numerusform>
</translation>
</message>
<message>
<location filename="../transactiontablemodel.cpp" line="284"/>
<source>Open until %1</source>
<translation>Atidaryta kol %n</translation>
</message>
<message>
<location filename="../transactiontablemodel.cpp" line="287"/>
<source>Offline (%1 confirmations)</source>
<translation>Atjungta (%1 patvirtinimai)</translation>
</message>
<message>
<location filename="../transactiontablemodel.cpp" line="290"/>
<source>Unconfirmed (%1 of %2 confirmations)</source>
<translation>Nepatvirtintos (%1 iš %2 patvirtinimų)</translation>
</message>
<message>
<location filename="../transactiontablemodel.cpp" line="293"/>
<source>Confirmed (%1 confirmations)</source>
<translation>Patvirtinta (%1 patvirtinimai)</translation>
</message>
<message numerus="yes">
<location filename="../transactiontablemodel.cpp" line="301"/>
<source>Mined balance will be available in %n more blocks</source>
<translation>
<numerusform>Išgautas balansas bus pasiekiamas po %n bloko</numerusform>
<numerusform>Išgautas balansas bus pasiekiamas po %n blokų</numerusform>
<numerusform>Išgautas balansas bus pasiekiamas po %n blokų</numerusform>
</translation>
</message>
<message>
<location filename="../transactiontablemodel.cpp" line="307"/>
<source>This block was not received by any other nodes and will probably not be accepted!</source>
<translation>Šis blokas negautas nė vienu iš mazgų ir matomai nepriimtas</translation>
</message>
<message>
<location filename="../transactiontablemodel.cpp" line="310"/>
<source>Generated but not accepted</source>
<translation>Išgauta bet nepriimta</translation>
</message>
<message>
<location filename="../transactiontablemodel.cpp" line="353"/>
<source>Received with</source>
<translation>Gauta su</translation>
</message>
<message>
<location filename="../transactiontablemodel.cpp" line="355"/>
<source>Received from</source>
<translation>Gauta iš</translation>
</message>
<message>
<location filename="../transactiontablemodel.cpp" line="358"/>
<source>Sent to</source>
<translation>Siųsta </translation>
</message>
<message>
<location filename="../transactiontablemodel.cpp" line="360"/>
<source>Payment to yourself</source>
<translation>Mokėjimas sau</translation>
</message>
<message>
<location filename="../transactiontablemodel.cpp" line="362"/>
<source>Mined</source>
<translation>Išgauta</translation>
</message>
<message>
<location filename="../transactiontablemodel.cpp" line="364"/>
<source>Mint by stake</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../transactiontablemodel.cpp" line="403"/>
<source>(n/a)</source>
<translation>nepasiekiama</translation>
</message>
<message>
<location filename="../transactiontablemodel.cpp" line="603"/>
<source>Transaction status. Hover over this field to show number of confirmations.</source>
<translation>Sandorio būklė. Užvedus pelės žymeklį ant šios srities matysite patvirtinimų skaičių.</translation>
</message>
<message>
<location filename="../transactiontablemodel.cpp" line="605"/>
<source>Date and time that the transaction was received.</source>
<translation>Sandorio gavimo data ir laikas</translation>
</message>
<message>
<location filename="../transactiontablemodel.cpp" line="607"/>
<source>Type of transaction.</source>
<translation>Sandorio tipas</translation>
</message>
<message>
<location filename="../transactiontablemodel.cpp" line="609"/>
<source>Destination address of transaction.</source>
<translation>Sandorio paskirties adresas</translation>
</message>
<message>
<location filename="../transactiontablemodel.cpp" line="611"/>
<source>Amount removed from or added to balance.</source>
<translation>Suma pridėta ar išskaičiuota iš balanso</translation>
</message>
</context>
<context>
<name>TransactionView</name>
<message>
<location filename="../transactionview.cpp" line="55"/>
<location filename="../transactionview.cpp" line="71"/>
<source>All</source>
<translation>Visi</translation>
</message>
<message>
<location filename="../transactionview.cpp" line="56"/>
<source>Today</source>
<translation>Šiandien</translation>
</message>
<message>
<location filename="../transactionview.cpp" line="57"/>
<source>This week</source>
<translation>Šią savaitę</translation>
</message>
<message>
<location filename="../transactionview.cpp" line="58"/>
<source>This month</source>
<translation>Šį mėnesį</translation>
</message>
<message>
<location filename="../transactionview.cpp" line="59"/>
<source>Last month</source>
<translation>Paskutinį mėnesį</translation>
</message>
<message>
<location filename="../transactionview.cpp" line="60"/>
<source>This year</source>
<translation>Šiais metais</translation>
</message>
<message>
<location filename="../transactionview.cpp" line="61"/>
<source>Range...</source>
<translation>Grupė</translation>
</message>
<message>
<location filename="../transactionview.cpp" line="72"/>
<source>Received with</source>
<translation>Gauta su</translation>
</message>
<message>
<location filename="../transactionview.cpp" line="74"/>
<source>Sent to</source>
<translation>Išsiųsta</translation>
</message>
<message>
<location filename="../transactionview.cpp" line="76"/>
<source>To yourself</source>
<translation>Skirta sau</translation>
</message>
<message>
<location filename="../transactionview.cpp" line="77"/>
<source>Mined</source>
<translation>Išgauta</translation>
</message>
<message>
<location filename="../transactionview.cpp" line="78"/>
<source>Mint by stake</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../transactionview.cpp" line="79"/>
<source>Other</source>
<translation>Kita</translation>
</message>
<message>
<location filename="../transactionview.cpp" line="85"/>
<source>Enter address or label to search</source>
<translation>Įveskite adresą ar žymę į paiešką</translation>
</message>
<message>
<location filename="../transactionview.cpp" line="91"/>
<source>Min amount</source>
<translation>Minimali suma</translation>
</message>
<message>
<location filename="../transactionview.cpp" line="125"/>
<source>Copy address</source>
<translation>Kopijuoti adresą</translation>
</message>
<message>
<location filename="../transactionview.cpp" line="126"/>
<source>Copy label</source>
<translation>Kopijuoti žymę</translation>
</message>
<message>
<location filename="../transactionview.cpp" line="127"/>
<source>Copy amount</source>
<translation>Kopijuoti sumą</translation>
</message>
<message>
<location filename="../transactionview.cpp" line="128"/>
<source>Edit label</source>
<translation>Taisyti žymę</translation>
</message>
<message>
<location filename="../transactionview.cpp" line="129"/>
<source>Show details...</source>
<translation>Parodyti išsamiai</translation>
</message>
<message>
<location filename="../transactionview.cpp" line="130"/>
<source>Clear orphans</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../transactionview.cpp" line="273"/>
<source>Export Transaction Data</source>
<translation>Sandorio duomenų eksportavimas</translation>
</message>
<message>
<location filename="../transactionview.cpp" line="274"/>
<source>Comma separated file (*.csv)</source>
<translation>Kableliais atskirtų duomenų failas (*.csv)</translation>
</message>
<message>
<location filename="../transactionview.cpp" line="282"/>
<source>Confirmed</source>
<translation>Patvirtintas</translation>
</message>
<message>
<location filename="../transactionview.cpp" line="283"/>
<source>Date</source>
<translation>Data</translation>
</message>
<message>
<location filename="../transactionview.cpp" line="284"/>
<source>Type</source>
<translation>Tipas</translation>
</message>
<message>
<location filename="../transactionview.cpp" line="285"/>
<source>Label</source>
<translation>Žymė</translation>
</message>
<message>
<location filename="../transactionview.cpp" line="286"/>
<source>Address</source>
<translation>Adresas</translation>
</message>
<message>
<location filename="../transactionview.cpp" line="287"/>
<source>Amount</source>
<translation>Suma</translation>
</message>
<message>
<location filename="../transactionview.cpp" line="288"/>
<source>ID</source>
<translation>ID</translation>
</message>
<message>
<location filename="../transactionview.cpp" line="292"/>
<source>Error exporting</source>
<translation>Eksportavimo klaida</translation>
</message>
<message>
<location filename="../transactionview.cpp" line="292"/>
<source>Could not write to file %1.</source>
<translation>Neįmanoma įrašyti į failą %1.</translation>
</message>
<message>
<location filename="../transactionview.cpp" line="400"/>
<source>Range:</source>
<translation>Grupė:</translation>
</message>
<message>
<location filename="../transactionview.cpp" line="408"/>
<source>to</source>
<translation>skirta</translation>
</message>
</context>
<context>
<name>WalletModel</name>
<message>
<location filename="../walletmodel.cpp" line="164"/>
<source>Sending...</source>
<translation>Siunčiama</translation>
</message>
</context>
<context>
<name>bitcoin-core</name>
<message>
<location filename="../bitcoinstrings.cpp" line="11"/>
<source>Warning: Disk space is low </source>
<translation type="unfinished">Įspėjimas: nepakanka vietos diske</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="13"/>
<source>Usage:</source>
<translation type="unfinished">Naudojimas:</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="8"/>
<source>Unable to bind to port %d on this computer. OMFGcoin is probably already running.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="12"/>
<source>OMFGcoin version</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="14"/>
<source>Send command to -server or OMFGcoind</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="15"/>
<source>List commands</source>
<translation type="unfinished">Komandų sąrašas</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="16"/>
<source>Get help for a command</source>
<translation type="unfinished">Suteikti pagalba komandai</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="17"/>
<source>Options:</source>
<translation type="unfinished">Opcijos:</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="18"/>
<source>Specify configuration file (default: OMFGcoin.conf)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="19"/>
<source>Specify pid file (default: OMFGcoind.pid)</source>
<translation type="unfinished">Nurodyti pid failą (pagal nutylėjimą: OMFGcoind.pid)</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="20"/>
<source>Generate coins</source>
<translation type="unfinished">Sukurti monetas</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="21"/>
<source>Don't generate coins</source>
<translation type="unfinished">Neišgavinėti monetų</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="22"/>
<source>Start minimized</source>
<translation type="unfinished">Pradžia sumažinta</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="23"/>
<source>Show splash screen on startup (default: 1)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="24"/>
<source>Specify data directory</source>
<translation type="unfinished">Nustatyti duomenų direktoriją</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="25"/>
<source>Set database cache size in megabytes (default: 25)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="26"/>
<source>Set database disk log size in megabytes (default: 100)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="27"/>
<source>Specify connection timeout (in milliseconds)</source>
<translation type="unfinished">Nustatyti sujungimo trukmę (milisekundėmis)</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="28"/>
<source>Connect through socks4 proxy</source>
<translation type="unfinished">Prisijungti per socks4 proxy</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="29"/>
<source>Allow DNS lookups for addnode and connect</source>
<translation type="unfinished">Leisti DNS paiešką sujungimui ir mazgo pridėjimui</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="30"/>
<source>Listen for connections on <port> (default: 9901 or testnet: 9903)</source>
<translation type="unfinished">Sujungimo klausymas prijungčiai <port> (pagal nutylėjimą: 8333 arba testnet: 18333) {9901 ?} {9903)?}</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="31"/>
<source>Maintain at most <n> connections to peers (default: 125)</source>
<translation type="unfinished">Palaikyti ne daugiau <n> jungčių kolegoms (pagal nutylėjimą: 125)</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="32"/>
<source>Add a node to connect to and attempt to keep the connection open</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="33"/>
<source>Connect only to the specified node</source>
<translation type="unfinished">Prisijungti tik prie nurodyto mazgo</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="34"/>
<source>Find peers using internet relay chat (default: 0)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="35"/>
<source>Accept connections from outside (default: 1)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="36"/>
<source>Set language, for example "de_DE" (default: system locale)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="37"/>
<source>Find peers using DNS lookup (default: 1)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="38"/>
<source>Threshold for disconnecting misbehaving peers (default: 100)</source>
<translation type="unfinished">Atjungimo dėl netinkamo kolegų elgesio riba (pagal nutylėjimą: 100)</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="39"/>
<source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
<translation type="unfinished">Sekundžių kiekis eikiamas palaikyti ryšį dėl lygiarangių nestabilumo (pagal nutylėjimą: 86.400)</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="42"/>
<source>Maximum per-connection receive buffer, <n>*1000 bytes (default: 10000)</source>
<translation type="unfinished">Maksimalus buferis priėmimo sujungimui <n>*1000 bitų (pagal nutylėjimą: 10000)</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="43"/>
<source>Maximum per-connection send buffer, <n>*1000 bytes (default: 10000)</source>
<translation type="unfinished">Maksimalus buferis siuntimo sujungimui <n>*1000 bitų (pagal nutylėjimą: 10000)</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="44"/>
<source>Use Universal Plug and Play to map the listening port (default: 1)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="45"/>
<source>Use Universal Plug and Play to map the listening port (default: 0)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="46"/>
<source>Fee per KB to add to transactions you send</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="47"/>
<source>Accept command line and JSON-RPC commands</source>
<translation type="unfinished">Priimti komandinę eilutę ir JSON-RPC komandas</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="48"/>
<source>Run in the background as a daemon and accept commands</source>
<translation type="unfinished">Dirbti fone kaip šešėlyje ir priimti komandas</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="49"/>
<source>Use the test network</source>
<translation type="unfinished">Naudoti testavimo tinklą</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="50"/>
<source>Output extra debugging information</source>
<translation type="unfinished">Išėjimo papildomas derinimo informacija</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="51"/>
<source>Prepend debug output with timestamp</source>
<translation type="unfinished">Prideėti laiko žymę derinimo rezultatams</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="52"/>
<source>Send trace/debug info to console instead of debug.log file</source>
<translation type="unfinished">Siųsti atsekimo/derinimo info į konsolę vietoj debug.log failo</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="53"/>
<source>Send trace/debug info to debugger</source>
<translation type="unfinished">Siųsti sekimo/derinimo info derintojui</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="54"/>
<source>Username for JSON-RPC connections</source>
<translation type="unfinished">Vartotojo vardas JSON-RPC jungimuisi</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="55"/>
<source>Password for JSON-RPC connections</source>
<translation type="unfinished">Slaptažodis JSON-RPC sujungimams</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="56"/>
<source>Listen for JSON-RPC connections on <port> (default: 9902)</source>
<translation type="unfinished">Klausymas JSON-RPC sujungimui prijungčiai <port> (pagal nutylėjimą: 8332) {9902)?}</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="57"/>
<source>Allow JSON-RPC connections from specified IP address</source>
<translation type="unfinished">Leisti JSON-RPC tik iš nurodytų IP adresų</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="58"/>
<source>Send commands to node running on <ip> (default: 127.0.0.1)</source>
<translation type="unfinished">Siųsti komandą mazgui dirbančiam <ip> (pagal nutylėjimą: 127.0.0.1)</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="59"/>
<source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="62"/>
<source>Upgrade wallet to latest format</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="63"/>
<source>Set key pool size to <n> (default: 100)</source>
<translation type="unfinished">Nustatyti rakto apimties dydį <n> (pagal nutylėjimą: 100)</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="64"/>
<source>Rescan the block chain for missing wallet transactions</source>
<translation type="unfinished">Ieškoti prarastų piniginės sandorių blokų grandinėje</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="65"/>
<source>How many blocks to check at startup (default: 2500, 0 = all)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="66"/>
<source>How thorough the block verification is (0-6, default: 1)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="67"/>
<source>
SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="70"/>
<source>Use OpenSSL (https) for JSON-RPC connections</source>
<translation type="unfinished">Naudoti OpenSSL (https) jungimuisi JSON-RPC </translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="71"/>
<source>Server certificate file (default: server.cert)</source>
<translation type="unfinished">Serverio sertifikato failas (pagal nutylėjimą: server.cert)</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="72"/>
<source>Server private key (default: server.pem)</source>
<translation type="unfinished">Serverio privatus raktas (pagal nutylėjimą: server.pem)</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="73"/>
<source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source>
<translation type="unfinished">Priimtini šifrai (pagal nutylėjimą: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="76"/>
<source>This help message</source>
<translation type="unfinished">Pagelbos žinutė</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="77"/>
<source>Usage</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="78"/>
<source>Cannot obtain a lock on data directory %s. OMFGcoin is probably already running.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="81"/>
<source>OMFGcoin</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="88"/>
<source>Error loading wallet.dat: Wallet requires newer version of OMFGcoin</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="89"/>
<source>Wallet needed to be rewritten: restart OMFGcoin to complete</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="103"/>
<source>%s, you must set a rpcpassword in the configuration file:
%s
It is recommended you use the following random password:
rpcuser=peercoinrpc
rpcpassword=%s
(you do not need to remember this password)
If the file does not exist, create it with owner-readable-only file permissions.
</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="119"/>
<source>Warning: Please check that your computer's date and time are correct. If your clock is wrong OMFGcoin will not work properly.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="82"/>
<source>Loading addresses...</source>
<translation type="unfinished">Užkraunami adresai...</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="83"/>
<source>Error loading addr.dat</source>
<translation type="unfinished">addr.dat pakrovimo klaida</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="84"/>
<source>Loading block index...</source>
<translation type="unfinished">Užkraunami blokų indeksai...</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="85"/>
<source>Error loading blkindex.dat</source>
<translation type="unfinished">blkindex.dat pakrovimo klaida</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="86"/>
<source>Loading wallet...</source>
<translation type="unfinished">Užkraunama piniginė...</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="87"/>
<source>Error loading wallet.dat: Wallet corrupted</source>
<translation type="unfinished"> wallet.dat pakrovimo klaida, wallet.dat sugadintas</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="90"/>
<source>Error loading wallet.dat</source>
<translation type="unfinished"> wallet.dat pakrovimo klaida</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="91"/>
<source>Cannot downgrade wallet</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="92"/>
<source>Cannot initialize keypool</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="93"/>
<source>Cannot write default address</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="94"/>
<source>Rescanning...</source>
<translation type="unfinished">Peržiūra</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="95"/>
<source>Done loading</source>
<translation type="unfinished">Pakrovimas baigtas</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="96"/>
<source>Invalid -proxy address</source>
<translation type="unfinished">Neteisingas proxy adresas</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="97"/>
<source>Invalid amount for -paytxfee=<amount></source>
<translation type="unfinished">Neteisinga suma -paytxfee=<amount></translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="98"/>
<source>Warning: -paytxfee is set very high. This is the transaction fee you will pay if you send a transaction.</source>
<translation type="unfinished">Įspėjimas: -paytxfee yra nustatytas per didelis. Tai sandorio mokestis, kurį turėsite mokėti, jei siųsite sandorį.</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="101"/>
<source>Error: CreateThread(StartNode) failed</source>
<translation type="unfinished">Klaida: nepasileidžia CreateThread(StartNode) </translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="102"/>
<source>To use the %s option</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="112"/>
<source>Error</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="113"/>
<source>An error occured while setting up the RPC port %i for listening: %s</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="114"/>
<source>You must set rpcpassword=<password> in the configuration file:
%s
If the file does not exist, create it with owner-readable-only file permissions.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="122"/>
<source>Error: Wallet locked, unable to create transaction </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="123"/>
<source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="126"/>
<source>Error: Transaction creation failed </source>
<translation type="unfinished">KLAIDA:nepavyko sudaryti sandorio</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="127"/>
<source>Sending...</source>
<translation type="unfinished">Siunčiama</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="128"/>
<source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
<translation type="unfinished">Klaida: sandoris buvo atmestas.Tai gali įvykti, jei kai kurios monetos iš jūsų piniginėje jau buvo panaudotos, pvz. jei naudojote wallet.dat kopiją ir monetos buvo išleistos kopijoje, bet nepažymėtos kaip skirtos išleisti čia.</translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="132"/>
<source>Invalid amount</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitcoinstrings.cpp" line="133"/>
<source>Insufficient funds</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>
| {'content_hash': '5605b1dec7a1214a421c134ccb231fd0', 'timestamp': '', 'source': 'github', 'line_count': 3040, 'max_line_length': 432, 'avg_line_length': 42.94375, 'alnum_prop': 0.6396831840917969, 'repo_name': 'Stakemaker/OMFGcoin', 'id': '72b8c056e27b247dab4d8b8ae2f12f536d3c4dac', 'size': '131167', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/qt/locale/bitcoin_lt.ts', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'C', 'bytes': '8328'}, {'name': 'C++', 'bytes': '1587642'}, {'name': 'Groff', 'bytes': '12841'}, {'name': 'Makefile', 'bytes': '7933'}, {'name': 'NSIS', 'bytes': '6174'}, {'name': 'Objective-C', 'bytes': '858'}, {'name': 'Objective-C++', 'bytes': '3537'}, {'name': 'Python', 'bytes': '50532'}, {'name': 'QMake', 'bytes': '22920'}, {'name': 'Shell', 'bytes': '1865'}]} |
<?xml version="1.0" encoding="UTF-8" ?>
<XML>
<Content>UPDATE</Content>
<Clip>
<ClipName>INGFTS0093</ClipName>
<TipoContenido>INGLES</TipoContenido>
<Contenido><![CDATA[ FROM THE SOUTH 01SEP14 0730 Hrs CCS]]></Contenido>
<OriginalTitle></OriginalTitle>
<Description> </Description>
<Notes>a</Notes>
<DurPrev></DurPrev>
<Chapter></Chapter>
<EndDate></EndDate>
<EPG></EPG>
<EPG_Content> </EPG_Content>
<Segments>
<Segment>
<SegTitle>1-1 FROM THE SOUTH - FROM THE SOUTH 01SEP14 0730 Hrs CCS</SegTitle>
<MediaID>INGFTS009301</MediaID>
<Duration>00:07:00.00</Duration>
<SegNumber>1</SegNumber>
<ClipGroup>PROGRAMA</ClipGroup>
<Description> </Description>
</Segment>
</Segments></Clip></XML> | {'content_hash': '1c33f8c5e15bfc0446a1e58f236ed4fe', 'timestamp': '', 'source': 'github', 'line_count': 26, 'max_line_length': 97, 'avg_line_length': 42.07692307692308, 'alnum_prop': 0.4579524680073126, 'repo_name': 'valeraovalles/sait', 'id': 'b7435df1e6a1a067de1fdc6480a3188b5700e3ff', 'size': '1094', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'web/uploads/creatv/xml/INGFTS0093.xml', 'mode': '33261', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '270692'}, {'name': 'Erlang', 'bytes': '4333'}, {'name': 'Java', 'bytes': '65391'}, {'name': 'JavaScript', 'bytes': '1449856'}, {'name': 'PHP', 'bytes': '6514811'}, {'name': 'Perl', 'bytes': '41836'}, {'name': 'Shell', 'bytes': '5701'}]} |
import {ApiRequestBuilder, ApiResult, ApiVersion} from "helpers/api_request_builder";
import {SparkRoutes} from "helpers/spark_routes";
import {Comparison} from "./compare";
import {ComparisonJSON} from "./compare_json";
export class ComparisonCRUD {
private static API_VERSION_HEADER = ApiVersion.v2;
public static getDifference(pipelineName: string, fromCounter: number, toCounter: number) {
return ApiRequestBuilder.GET(SparkRoutes.comparePipelines(pipelineName, fromCounter, toCounter), this.API_VERSION_HEADER)
.then((result: ApiResult<string>) => {
return result.map((body) => {
return Comparison.fromJSON(JSON.parse(body) as ComparisonJSON);
});
});
}
}
| {'content_hash': 'bceaa89b5c95a859325337fcff1a436a', 'timestamp': '', 'source': 'github', 'line_count': 19, 'max_line_length': 125, 'avg_line_length': 43.31578947368421, 'alnum_prop': 0.6245443499392467, 'repo_name': 'GaneshSPatil/gocd', 'id': 'e25ad8e88737001f532af604f702a985a4585ef7', 'size': '1424', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'server/src/main/webapp/WEB-INF/rails/webpack/models/compare/compare_crud.ts', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Batchfile', 'bytes': '466'}, {'name': 'CSS', 'bytes': '1578'}, {'name': 'EJS', 'bytes': '1626'}, {'name': 'FreeMarker', 'bytes': '10183'}, {'name': 'Groovy', 'bytes': '2467987'}, {'name': 'HTML', 'bytes': '330937'}, {'name': 'Java', 'bytes': '21404638'}, {'name': 'JavaScript', 'bytes': '2331039'}, {'name': 'NSIS', 'bytes': '23525'}, {'name': 'PowerShell', 'bytes': '664'}, {'name': 'Ruby', 'bytes': '623850'}, {'name': 'SCSS', 'bytes': '820788'}, {'name': 'Sass', 'bytes': '21277'}, {'name': 'Shell', 'bytes': '169730'}, {'name': 'TypeScript', 'bytes': '4428865'}, {'name': 'XSLT', 'bytes': '207072'}]} |
#ifndef TENSORFLOW_COMPILER_XLA_RUNTIME_MAP_BY_TYPE_H_
#define TENSORFLOW_COMPILER_XLA_RUNTIME_MAP_BY_TYPE_H_
#include <algorithm>
#include <vector>
#include "llvm/ADT/SmallVector.h"
#include "tensorflow/compiler/xla/runtime/type_id.h"
namespace xla {
namespace runtime {
// An optimized map container for storing pointers of different types.
//
// Example:
//
// PtrMapByType<IdSet> map;
//
// int32_t i32 = 0;
// int64_t i64 = 1;
//
// map.insert(&i32);
// map.insert(&i64);
//
// assert(map.contains<int32_t*>());
// assert(map.contains<int64_t*>());
//
template <typename IdSet, unsigned n = 16>
class PtrMapByType {
public:
PtrMapByType() = default;
template <typename... Ts>
explicit PtrMapByType(Ts*... values) {
insert_all<Ts...>(values..., std::make_index_sequence<sizeof...(Ts)>{});
}
template <typename T>
T* insert(T* value) {
size_t id = GetDenseTypeId<T>();
if (id >= data_.size()) {
data_.resize(id + 1);
}
data_[id] = const_cast<std::decay_t<T>*>(value);
return value;
}
template <typename... Ts>
void insert_all(Ts*... values) {
insert_all<Ts...>(values..., std::make_index_sequence<sizeof...(Ts)>{});
}
template <typename T>
T* get() const {
size_t id = GetDenseTypeId<T>();
assert(id < data_.size());
return reinterpret_cast<T*>(data_[id]);
}
template <typename T>
T* getIfExists() const {
size_t id = GetDenseTypeId<T>();
return LLVM_LIKELY(id < data_.size()) ? reinterpret_cast<T*>(data_[id])
: nullptr;
}
template <typename T>
bool contains() const {
size_t id = GetDenseTypeId<T>();
return id < data_.size() && data_[id] != nullptr;
}
private:
template <typename T>
static size_t GetDenseTypeId() {
return DenseTypeId<IdSet>::template get<T>();
}
template <typename... Ts, size_t... Is>
void insert_all(Ts*... values, std::index_sequence<Is...>) {
static constexpr size_t kNumInserted = sizeof...(Ts);
if constexpr (kNumInserted > 0) {
std::array<size_t, kNumInserted> ids = {GetDenseTypeId<Ts>()...};
data_.resize(1 + *std::max_element(ids.begin(), ids.end()), nullptr);
((data_[ids[Is]] = const_cast<std::decay_t<Ts>*>(values)), ...);
}
}
llvm::SmallVector<void*, n> data_;
};
} // namespace runtime
} // namespace xla
#endif // TENSORFLOW_COMPILER_XLA_RUNTIME_MAP_BY_TYPE_H_
| {'content_hash': '610589d0123c3195a791274fea36778c', 'timestamp': '', 'source': 'github', 'line_count': 97, 'max_line_length': 76, 'avg_line_length': 25.02061855670103, 'alnum_prop': 0.6065100947672023, 'repo_name': 'tensorflow/tensorflow-pywrap_saved_model', 'id': '412f058eb94441e07caf779f0a075206a0a68096', 'size': '3095', 'binary': False, 'copies': '5', 'ref': 'refs/heads/master', 'path': 'tensorflow/compiler/xla/runtime/map_by_type.h', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Batchfile', 'bytes': '36962'}, {'name': 'C', 'bytes': '1392153'}, {'name': 'C#', 'bytes': '13584'}, {'name': 'C++', 'bytes': '125860957'}, {'name': 'CMake', 'bytes': '182324'}, {'name': 'Cython', 'bytes': '5003'}, {'name': 'Dockerfile', 'bytes': '416133'}, {'name': 'Go', 'bytes': '2123155'}, {'name': 'HTML', 'bytes': '4686483'}, {'name': 'Java', 'bytes': '1074438'}, {'name': 'Jupyter Notebook', 'bytes': '792906'}, {'name': 'LLVM', 'bytes': '6536'}, {'name': 'MLIR', 'bytes': '11347297'}, {'name': 'Makefile', 'bytes': '2760'}, {'name': 'Objective-C', 'bytes': '172666'}, {'name': 'Objective-C++', 'bytes': '300208'}, {'name': 'Pawn', 'bytes': '5552'}, {'name': 'Perl', 'bytes': '7536'}, {'name': 'Python', 'bytes': '42738981'}, {'name': 'Roff', 'bytes': '5034'}, {'name': 'Ruby', 'bytes': '9214'}, {'name': 'Shell', 'bytes': '621427'}, {'name': 'Smarty', 'bytes': '89545'}, {'name': 'SourcePawn', 'bytes': '14625'}, {'name': 'Starlark', 'bytes': '7720442'}, {'name': 'Swift', 'bytes': '78435'}, {'name': 'Vim Snippet', 'bytes': '58'}]} |
package com.amazonaws.services.elasticbeanstalk.model.transform;
import org.w3c.dom.Node;
import com.amazonaws.AmazonServiceException;
import com.amazonaws.util.XpathUtils;
import com.amazonaws.transform.StandardErrorUnmarshaller;
import com.amazonaws.services.elasticbeanstalk.model.S3SubscriptionRequiredException;
public class S3SubscriptionRequiredExceptionUnmarshaller extends StandardErrorUnmarshaller {
public S3SubscriptionRequiredExceptionUnmarshaller() {
super(S3SubscriptionRequiredException.class);
}
public AmazonServiceException unmarshall(Node node) throws Exception {
// Bail out if this isn't the right error code that this
// marshaller understands.
String errorCode = parseErrorCode(node);
if (errorCode == null || !errorCode.equals("S3SubscriptionRequiredException"))
return null;
S3SubscriptionRequiredException e = (S3SubscriptionRequiredException)super.unmarshall(node);
return e;
}
}
| {'content_hash': '6bf0f25dec63e4cf756ab30e91d304e0', 'timestamp': '', 'source': 'github', 'line_count': 30, 'max_line_length': 100, 'avg_line_length': 33.766666666666666, 'alnum_prop': 0.7611056268509379, 'repo_name': 'galaxynut/aws-sdk-java', 'id': '374198473ae6d2eef14d4e0e5e0186bae6c433aa', 'size': '1600', 'binary': False, 'copies': '5', 'ref': 'refs/heads/master', 'path': 'aws-java-sdk-elasticbeanstalk/src/main/java/com/amazonaws/services/elasticbeanstalk/model/transform/S3SubscriptionRequiredExceptionUnmarshaller.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Java', 'bytes': '84475571'}, {'name': 'Scilab', 'bytes': '2260'}]} |
export * from './leaflet.module';
export * from './leaflet-button/leaflet-button.component';
export * from './leaflet-geocoder/leaflet-geocoder.component';
export * from './leaflet-map/leaflet-map.component';
export * from './leaflet-measure/leaflet-measure.component';
export * from './leaflet-opacity-slider/leaflet-opacity-slider.component';
export * from './leaflet-sidebar/leaflet-sidebar.component';
export * from './leaflet-tile-selector/leaflet-tile-selector.component';
export * from './leaflet-wms-layer/leaflet-wms-layer.component';
export * from './leaflet-map.service';
export * from './leaflet-tile-provider.service';
| {'content_hash': '173d03b88c6755dca4d63f970883153c', 'timestamp': '', 'source': 'github', 'line_count': 15, 'max_line_length': 74, 'avg_line_length': 42.4, 'alnum_prop': 0.7515723270440252, 'repo_name': 'ecsnavarretemit/sarai-interactive-maps', 'id': '8dfedb2e85d2cbdba0df140fea82264538b1db1b', 'size': '755', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'src/app/leaflet/index.ts', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '83665'}, {'name': 'HTML', 'bytes': '36138'}, {'name': 'JavaScript', 'bytes': '2104'}, {'name': 'TypeScript', 'bytes': '292283'}]} |
import logging
import time
from contextlib import closing
from typing import Any, Dict, List, Optional
from flask import g
from superset import app, security_manager
from superset.models.core import Database
from superset.sql_parse import ParsedQuery
from superset.sql_validators.base import BaseSQLValidator, SQLValidationAnnotation
from superset.utils.core import QuerySource
MAX_ERROR_ROWS = 10
config = app.config
logger = logging.getLogger(__name__)
class PrestoSQLValidationError(Exception):
"""Error in the process of asking Presto to validate SQL querytext"""
class PrestoDBSQLValidator(BaseSQLValidator):
"""Validate SQL queries using Presto's built-in EXPLAIN subtype"""
name = "PrestoDBSQLValidator"
@classmethod
def validate_statement(
cls, statement: str, database: Database, cursor: Any, user_name: str
) -> Optional[SQLValidationAnnotation]:
# pylint: disable=too-many-locals
db_engine_spec = database.db_engine_spec
parsed_query = ParsedQuery(statement)
sql = parsed_query.stripped()
# Hook to allow environment-specific mutation (usually comments) to the SQL
sql_query_mutator = config["SQL_QUERY_MUTATOR"]
if sql_query_mutator:
sql = sql_query_mutator(sql, user_name, security_manager, database)
# Transform the final statement to an explain call before sending it on
# to presto to validate
sql = f"EXPLAIN (TYPE VALIDATE) {sql}"
# Invoke the query against presto. NB this deliberately doesn't use the
# engine spec's handle_cursor implementation since we don't record
# these EXPLAIN queries done in validation as proper Query objects
# in the superset ORM.
from pyhive.exc import DatabaseError
try:
db_engine_spec.execute(cursor, sql)
polled = cursor.poll()
while polled:
logger.info("polling presto for validation progress")
stats = polled.get("stats", {})
if stats:
state = stats.get("state")
if state == "FINISHED":
break
time.sleep(0.2)
polled = cursor.poll()
db_engine_spec.fetch_data(cursor, MAX_ERROR_ROWS)
return None
except DatabaseError as db_error:
# The pyhive presto client yields EXPLAIN (TYPE VALIDATE) responses
# as though they were normal queries. In other words, it doesn't
# know that errors here are not exceptional. To map this back to
# ordinary control flow, we have to trap the category of exception
# raised by the underlying client, match the exception arguments
# pyhive provides against the shape of dictionary for a presto query
# invalid error, and restructure that error as an annotation we can
# return up.
# If the first element in the DatabaseError is not a dictionary, but
# is a string, return that message.
if db_error.args and isinstance(db_error.args[0], str):
raise PrestoSQLValidationError(db_error.args[0]) from db_error
# Confirm the first element in the DatabaseError constructor is a
# dictionary with error information. This is currently provided by
# the pyhive client, but may break if their interface changes when
# we update at some point in the future.
if not db_error.args or not isinstance(db_error.args[0], dict):
raise PrestoSQLValidationError(
"The pyhive presto client returned an unhandled " "database error."
) from db_error
error_args: Dict[str, Any] = db_error.args[0]
# Confirm the two fields we need to be able to present an annotation
# are present in the error response -- a message, and a location.
if "message" not in error_args:
raise PrestoSQLValidationError(
"The pyhive presto client did not report an error message"
) from db_error
if "errorLocation" not in error_args:
# Pylint is confused about the type of error_args, despite the hints
# and checks above.
# pylint: disable=invalid-sequence-index
message = error_args["message"] + "\n(Error location unknown)"
# If we have a message but no error location, return the message and
# set the location as the beginning.
return SQLValidationAnnotation(
message=message, line_number=1, start_column=1, end_column=1
)
# pylint: disable=invalid-sequence-index
message = error_args["message"]
err_loc = error_args["errorLocation"]
line_number = err_loc.get("lineNumber", None)
start_column = err_loc.get("columnNumber", None)
end_column = err_loc.get("columnNumber", None)
return SQLValidationAnnotation(
message=message,
line_number=line_number,
start_column=start_column,
end_column=end_column,
)
except Exception as ex:
logger.exception("Unexpected error running validation query: %s", str(ex))
raise ex
@classmethod
def validate(
cls, sql: str, schema: Optional[str], database: Database
) -> List[SQLValidationAnnotation]:
"""
Presto supports query-validation queries by running them with a
prepended explain.
For example, "SELECT 1 FROM default.mytable" becomes "EXPLAIN (TYPE
VALIDATE) SELECT 1 FROM default.mytable.
"""
user_name = g.user.username if g.user else None
parsed_query = ParsedQuery(sql)
statements = parsed_query.get_statements()
logger.info("Validating %i statement(s)", len(statements))
engine = database.get_sqla_engine(
schema=schema,
nullpool=True,
user_name=user_name,
source=QuerySource.SQL_LAB,
)
# Sharing a single connection and cursor across the
# execution of all statements (if many)
annotations: List[SQLValidationAnnotation] = []
with closing(engine.raw_connection()) as conn:
with closing(conn.cursor()) as cursor:
for statement in parsed_query.get_statements():
annotation = cls.validate_statement(
statement, database, cursor, user_name
)
if annotation:
annotations.append(annotation)
logger.debug("Validation found %i error(s)", len(annotations))
return annotations
| {'content_hash': '8300a0cf96cff41bf8dc3ac2b105adb9', 'timestamp': '', 'source': 'github', 'line_count': 161, 'max_line_length': 87, 'avg_line_length': 42.91925465838509, 'alnum_prop': 0.6141823444283647, 'repo_name': 'airbnb/superset', 'id': 'e2de531f7d5fcf4d4df6b738fef1944e55072cb5', 'size': '7696', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'superset/sql_validators/presto_db.py', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '62654'}, {'name': 'HTML', 'bytes': '99610'}, {'name': 'JavaScript', 'bytes': '585557'}, {'name': 'Mako', 'bytes': '412'}, {'name': 'Python', 'bytes': '715013'}, {'name': 'Shell', 'bytes': '1033'}]} |
<!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" xml:lang="en" lang="en">
<!-- Mirrored from bvs.wikidot.com/forum/t-75267/impossible-mission by HTTrack Website Copier/3.x [XR&CO'2014], Sun, 10 Jul 2022 05:31:47 GMT -->
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=utf-8" /><!-- /Added by HTTrack -->
<head>
<title>Impossible Mission - Billy Vs. SNAKEMAN Wiki</title>
<script type="text/javascript" src="http://d3g0gp89917ko0.cloudfront.net/v--291054f06006/common--javascript/init.combined.js"></script>
<script type="text/javascript">
var URL_HOST = 'www.wikidot.com';
var URL_DOMAIN = 'wikidot.com';
var USE_SSL = true ;
var URL_STATIC = 'http://d3g0gp89917ko0.cloudfront.net/v--291054f06006';
// global request information
var WIKIREQUEST = {};
WIKIREQUEST.info = {};
WIKIREQUEST.info.domain = "bvs.wikidot.com";
WIKIREQUEST.info.siteId = 32011;
WIKIREQUEST.info.siteUnixName = "bvs";
WIKIREQUEST.info.categoryId = 182512;
WIKIREQUEST.info.themeId = 9564;
WIKIREQUEST.info.requestPageName = "forum:thread";
OZONE.request.timestamp = 1657430468;
OZONE.request.date = new Date();
WIKIREQUEST.info.lang = 'en';
WIKIREQUEST.info.pageUnixName = "forum:thread";
WIKIREQUEST.info.pageId = 2987325;
WIKIREQUEST.info.lang = "en";
OZONE.lang = "en";
var isUAMobile = !!/Android|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
</script>
<script type="text/javascript">
require.config({
baseUrl: URL_STATIC + '/common--javascript',
paths: {
'jquery.ui': 'jquery-ui.min',
'jquery.form': 'jquery.form'
}
});
</script>
<meta http-equiv="content-type" content="text/html;charset=UTF-8"/>
<meta http-equiv="content-language" content="en"/>
<script type="text/javascript" src="http://d3g0gp89917ko0.cloudfront.net/v--291054f06006/common--javascript/WIKIDOT.combined.js"></script>
<style type="text/css" id="internal-style">
/* modules */
/* theme */
@import url(http://d3g0gp89917ko0.cloudfront.net/v--291054f06006/common--theme/base/css/style.css);
@import url(http://bvs.wdfiles.com/local--theme/north/style.css);
</style>
<link rel="shortcut icon" href="../../local--favicon/favicon.gif"/>
<link rel="icon" type="image/gif" href="../../local--favicon/favicon.gif"/>
<link rel="apple-touch-icon" href="../../common--images/apple-touch-icon-57x57.png" />
<link rel="apple-touch-icon" sizes="72x72" href="../../common--images/apple-touch-icon-72x72.png" />
<link rel="apple-touch-icon" sizes="114x114" href="../../common--images/apple-touch-icon-114x114.png" />
<link rel="alternate" type="application/wiki" title="Edit this page" href="javascript:WIKIDOT.page.listeners.editClick()"/>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-18234656-1']);
_gaq.push(['_setDomainName', 'none']);
_gaq.push(['_setAllowLinker', true]);
_gaq.push(['_trackPageview']);
_gaq.push(['old._setAccount', 'UA-68540-5']);
_gaq.push(['old._setDomainName', 'none']);
_gaq.push(['old._setAllowLinker', true]);
_gaq.push(['old._trackPageview']);
_gaq.push(['userTracker._setAccount', 'UA-3581307-1']);
_gaq.push(['userTracker._trackPageview']);
</script>
<script type="text/javascript">
window.google_analytics_uacct = 'UA-18234656-1';
window.google_analytics_domain_name = 'none';
</script>
<link rel="manifest" href="../../onesignal/manifest.html" />
<script src="https://cdn.onesignal.com/sdks/OneSignalSDK.js" acync=""></script>
<script>
var OneSignal = window.OneSignal || [];
OneSignal.push(function() {
OneSignal.init({
appId: null,
});
});
</script>
<link rel="alternate" type="application/rss+xml" title="Posts in the discussion thread "Impossible Mission"" href="../../feed/forum/t-75267.xml"/><script type="text/javascript" src="http://d3g0gp89917ko0.cloudfront.net/v--291054f06006/common--modules/js/forum/ForumViewThreadModule.js"></script>
<script type="text/javascript" src="http://d3g0gp89917ko0.cloudfront.net/v--291054f06006/common--modules/js/forum/ForumViewThreadPostsModule.js"></script>
</head>
<body id="html-body">
<div id="skrollr-body">
<a name="page-top"></a>
<div id="container-wrap-wrap">
<div id="container-wrap">
<div id="container">
<div id="header">
<h1><a href="../../index.html"><span>Billy Vs. SNAKEMAN Wiki</span></a></h1>
<h2><span>Be the Ultimate Ninja.</span></h2>
<!-- google_ad_section_start(weight=ignore) -->
<div id="search-top-box" class="form-search">
<form id="search-top-box-form" action="http://bvs.wikidot.com/forum/t-75267/dummy" class="input-append">
<input id="search-top-box-input" class="text empty search-query" type="text" size="15" name="query" value="Search this site" onfocus="if(YAHOO.util.Dom.hasClass(this, 'empty')){YAHOO.util.Dom.removeClass(this,'empty'); this.value='';}"/><input class="button btn" type="submit" name="search" value="Search"/>
</form>
</div>
<div id="top-bar">
<ul>
<li><a href="../../allies.html">Allies</a>
<ul>
<li><strong><a href="../../untabbed_allies.html">Allies Untabbed</a></strong></li>
<li><a href="../../allies.html#toc7">Burger Ninja</a></li>
<li><a href="../../allies.html#toc5">Reaper</a></li>
<li><a href="../../allies.html#toc0">Regular</a></li>
<li><a href="../../allies.html#toc8">R00t</a></li>
<li><a href="../../allies.html#toc1">Season 2+</a></li>
<li><a href="../../allies.html#toc2">Season 3+</a></li>
<li><a href="../../allies.html#toc3">Season 4+</a></li>
<li><a href="../../allies.html#toc4">The Trade</a></li>
<li><a href="../../allies.html#toc6">Wasteland</a></li>
<li><a href="../../allies.html#toc9">World Kaiju</a></li>
<li><strong><a href="../../summons.html">Summons</a></strong></li>
<li><strong><a href="../../teams.html">Teams</a></strong></li>
</ul>
</li>
<li><a href="../../missions.html">Missions</a>
<ul>
<li><strong><a href="../../untabbed_missions.html">Missions Untabbed</a></strong></li>
<li><strong><em><a href="../../missions.html#toc0">D-Rank</a></em></strong></li>
<li><strong><em><a href="../../missions.html#toc1">C-Rank</a></em></strong></li>
<li><strong><em><a href="../../missions.html#toc2">B-Rank</a></em></strong></li>
<li><strong><em><a href="../../missions.html#toc3">A-Rank</a></em></strong></li>
<li><strong><em><a href="../../missions.html#toc4">AA-Rank</a></em></strong></li>
<li><strong><em><a href="../../missions.html#toc5">S-Rank</a></em></strong></li>
<li><a href="../../missions.html#toc10">BurgerNinja</a></li>
<li><a href="../../missions.html#toc14">Cave</a></li>
<li><a href="../../missions.html#toc13">Jungle</a></li>
<li><a href="../../missions.html#toc7">Monochrome</a></li>
<li><a href="../../missions.html#toc8">Outskirts</a></li>
<li><a href="../../missions.html#toc11">PizzaWitch</a></li>
<li><a href="../../missions.html#toc6">Reaper</a></li>
<li><a href="../../missions.html#toc9">Wasteland</a></li>
<li><a href="../../missions.html#toc12">Witching Hour</a></li>
<li><strong><em><a href="../../missions.html#toc14">Quests</a></em></strong></li>
<li><a href="../../wota.html">Mission Lady Alley</a></li>
</ul>
</li>
<li><a href="../../items.html">Items</a>
<ul>
<li><strong><a href="../../untabbed_items.html">Items Untabbed</a></strong></li>
<li><a href="../../items.html#toc6">Ally Drops and Other</a></li>
<li><a href="../../items.html#toc0">Permanent Items</a></li>
<li><a href="../../items.html#toc1">Potions/Crafting Items</a>
<ul>
<li><a href="../../items.html#toc4">Crafting</a></li>
<li><a href="../../items.html#toc3">Ingredients</a></li>
<li><a href="../../items.html#toc2">Potions</a></li>
</ul>
</li>
<li><a href="../../items.html#toc5">Wasteland Items</a></li>
<li><a href="../../sponsored-items.html">Sponsored Items</a></li>
</ul>
</li>
<li><a href="../../village.html">Village</a>
<ul>
<li><a href="../../billycon.html">BillyCon</a>
<ul>
<li><a href="../../billycon_billy-idol.html">Billy Idol</a></li>
<li><a href="../../billycon_cosplay.html">Cosplay</a></li>
<li><a href="../../billycon_dealer-s-room.html">Dealer's Room</a></li>
<li><a href="../../billycon_events.html">Events</a></li>
<li><a href="../../billycon_glowslinging.html">Glowslinging</a></li>
<li><a href="../../billycon_rave.html">Rave</a></li>
<li><a href="../../billycon_squee.html">Squee</a></li>
<li><a href="../../billycon_video-game-tournament.html">Video Game Tournament</a></li>
<li><a href="../../billycon_wander.html">Wander</a></li>
</ul>
</li>
<li><a href="../../billytv.html">BillyTV</a></li>
<li><a href="../../bingo-ing.html">Bingo'ing</a></li>
<li><a href="../../candyween.html">Candyween</a></li>
<li><a href="../../festival.html">Festival Day</a>
<ul>
<li><a href="../../festival_bargltron.html">Bargltron</a></li>
<li><a href="../../festival_billymaze.html">BillyMaze</a></li>
<li><a href="../../festival_dance-party.html">Dance Party</a></li>
<li><a href="../../festival_elevensnax.html">ElevenSnax</a></li>
<li><a href="../../festival_marksman.html">Marksman</a></li>
<li><a href="../../festival_raffle.html">Raffle</a></li>
<li><a href="../../festival_rngshack.html">RNGShack</a></li>
<li><a href="../../festival_tsukiroll.html">TsukiRoll</a></li>
<li><a href="../../festival_tunnel.html">Tunnel</a></li>
</ul>
</li>
<li><a href="../../hidden-hoclaus.html">Hidden HoClaus</a></li>
<li><a href="../../kaiju.html">Kaiju</a></li>
<li><a href="../../marketplace.html">Marketplace</a></li>
<li><a href="../../pizzawitch-garage.html">PizzaWitch Garage</a></li>
<li><a href="../../robo-fighto.html">Robo Fighto</a></li>
<li>R00t
<ul>
<li><a href="../../fields.html">Fields</a></li>
<li><a href="../../keys.html">Keys</a></li>
<li><a href="../../phases.html">Phases</a></li>
</ul>
</li>
<li><a href="../../upgrade_science-facility.html#toc2">SCIENCE!</a></li>
<li><a href="../../upgrades.html">Upgrades</a></li>
<li><a href="../../zombjas.html">Zombjas</a></li>
</ul>
</li>
<li><a href="../../misc_party-house.html">Party House</a>
<ul>
<li><a href="../../partyhouse_11dbhk-s-lottery.html">11DBHK's Lottery</a></li>
<li><a href="../../partyhouse_akatsukiball.html">AkaTsukiBall</a></li>
<li><a href="../../upgrade_claw-machines.html">Crane Game!</a></li>
<li><a href="../../upgrade_darts-hall.html">Darts!</a></li>
<li><a href="../../partyhouse_flower-wars.html">Flower Wars</a></li>
<li><a href="../../upgrade_juice-bar.html">'Juice' Bar</a></li>
<li><a href="../../partyhouse_mahjong.html">Mahjong</a></li>
<li><a href="../../partyhouse_ninja-jackpot.html">Ninja Jackpot!</a></li>
<li><a href="../../partyhouse_over-11-000.html">Over 11,000</a></li>
<li><a href="../../partyhouse_pachinko.html">Pachinko</a></li>
<li><a href="../../partyhouse_party-room.html">Party Room</a></li>
<li><a href="../../partyhouse_pigeons.html">Pigeons</a></li>
<li><a href="../../partyhouse_prize-wheel.html">Prize Wheel</a></li>
<li><a href="../../partyhouse_roulette.html">Roulette</a></li>
<li><a href="../../partyhouse_scratchy-tickets.html">Scratchy Tickets</a></li>
<li><a href="../../partyhouse_snakeman.html">SNAKEMAN</a></li>
<li><a href="../../partyhouse_superfail.html">SUPERFAIL</a></li>
<li><a href="../../partyhouse_tip-line.html">Tip Line</a></li>
<li><a href="../../partyhouse_the-big-board.html">The Big Board</a></li>
<li><a href="../../partyhouse_the-first-loser.html">The First Loser</a></li>
</ul>
</li>
<li><a href="../../guides.html">Guides</a>
<ul>
<li><a href="../../guide_billycon.html">BillyCon Guide</a></li>
<li><a href="../../guide_burgerninja.html">BurgerNinja Guide</a></li>
<li><a href="../../guide_candyween.html">Candyween Guide</a></li>
<li><a href="../../guide_glossary.html">Glossary</a></li>
<li><a href="../../guide_gs.html">Glowslinging Strategy Guide</a></li>
<li><a href="../../guide_hq.html">Hero's Quest</a></li>
<li><a href="../../guide_looping.html">Looping Guide</a></li>
<li><a href="../../guide_monochrome.html">Monochrome Guide</a></li>
<li><a href="../../overnight-bonuses.html">Overnight Bonuses</a></li>
<li><a href="../../guide_pizzawitch.html">PizzaWitch Guide</a></li>
<li><a href="../../tabbed_potions-crafting.html">Potions / Crafting</a>
<ul>
<li><a href="../../tabbed_potions-crafting.html#toc3">Crafting</a>
<ul>
<li><a href="../../tabbed_potions-crafting.html#toc4">Items</a></li>
<li><a href="../../tabbed_potions-crafting.html#toc5">Materials</a></li>
</ul>
</li>
<li><a href="../../tabbed_potions-crafting.html#toc0">Potion Mixing</a>
<ul>
<li><a href="../../tabbed_potions-crafting.html#toc2">Mixed Ingredients</a></li>
<li><a href="../../tabbed_potions-crafting.html#toc1">Potions</a></li>
</ul>
</li>
<li><a href="../../tabbed_potions-crafting.html#toc6">Reduction Laboratory</a>
<ul>
<li><a href="../../tabbed_potions-crafting.html#toc8">Potions and Ingredients</a></li>
<li><a href="../../tabbed_potions-crafting.html#toc7">Wasteland Items</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="../../guide_impossible-mission.html">Impossible Mission Guide</a></li>
<li><a href="../../guide_xp.html">Ranking Guide</a></li>
<li><a href="../../guide_reaper.html">Reaper Guide</a></li>
<li><a href="../../guide_rgg.html">Reaper's Game Guide</a></li>
<li><a href="../../guide_r00t.html">R00t Guide</a></li>
<li><a href="../../guide_speed-content.html">Speed Content Guide</a></li>
<li><a href="../../guide_speedlooping.html">Speedlooping Guide</a></li>
<li><a href="../../guide_thetrade.html">The Trade Guide</a></li>
<li><a href="../../guide_wasteland.html">Wasteland Guide</a></li>
</ul>
</li>
<li>Other
<ul>
<li><a href="../../arena.html">Arena</a></li>
<li><a href="../../billy-club.html">Billy Club</a>
<ul>
<li><a href="../../boosters.html">Boosters</a></li>
<li><a href="../../karma.html">Karma</a></li>
</ul>
</li>
<li><a href="../../bloodline.html">Bloodlines</a></li>
<li><a href="../../jutsu.html">Jutsu</a>
<ul>
<li><a href="../../jutsu.html#toc2">Bloodline Jutsu</a></li>
<li><a href="../../jutsu.html#toc0">Regular Jutsu</a></li>
<li><a href="../../jutsu.html#toc1">Special Jutsu</a></li>
</ul>
</li>
<li><a href="../../mission-bonus.html">Mission Bonus</a></li>
<li><a href="../../news-archive.html">News Archive</a></li>
<li><a href="../../number-one.html">Number One</a></li>
<li><a href="../../old-news-archive.html">Old News Archive</a></li>
<li><a href="../../retail_perfect-poker.html">Perfect Poker Bosses</a></li>
<li><a href="../../pets.html">Pets</a></li>
<li><a href="../../retail.html">Retail</a></li>
<li><a href="../../ryo.html">Ryo</a></li>
<li><a href="../../spar.html">Spar With Friends</a></li>
<li><a href="../../sponsored-items.html">Sponsored Items</a></li>
<li><a href="../../store.html">Store</a></li>
<li><a href="../../themes.html">Themes</a></li>
<li><a href="../../trophies.html">Trophies</a></li>
<li><a href="../../untabbed.html">Untabbed</a>
<ul>
<li><a href="../../untabbed_allies.html">Allies</a></li>
<li><a href="../../untabbed_items.html">Items</a></li>
<li><a href="../../untabbed_jutsu.html">Jutsu</a></li>
<li><a href="../../untabbed_missions.html">Missions</a></li>
<li><a href="../../untabbed_potions-crafting.html">Potions / Crafting</a></li>
</ul>
</li>
<li><a href="../../world-kaiju.html">World Kaiju</a></li>
</ul>
</li>
<li><a href="../../utilities.html">Utilities</a>
<ul>
<li><a href="http://www.cobaltknight.clanteam.com/awesomecalc.html">Awesome Calculator</a></li>
<li><a href="http://timothydryke.byethost17.com/billy/itemchecker.php">Item Checker</a></li>
<li><a href="../../utility_calculator.html">Mission Calculator</a></li>
<li><a href="../../utility_r00t-calculator.html">R00t Calculator</a></li>
<li><a href="../../utility_success-calculator.html">Success Calculator</a></li>
<li><a href="../../templates.html">Templates</a></li>
<li><a href="../../utility_chat.html">Wiki Chat Box</a></li>
</ul>
</li>
</ul>
</div>
<div id="login-status"><a href="javascript:;" onclick="WIKIDOT.page.listeners.createAccount(event)" class="login-status-create-account btn">Create account</a> <span>or</span> <a href="javascript:;" onclick="WIKIDOT.page.listeners.loginClick(event)" class="login-status-sign-in btn btn-primary">Sign in</a> </div>
<div id="header-extra-div-1"><span></span></div><div id="header-extra-div-2"><span></span></div><div id="header-extra-div-3"><span></span></div>
</div>
<div id="content-wrap">
<div id="side-bar">
<h3 ><span><a href="http://www.animecubed.com/billy/?57639" onclick="window.open(this.href, '_blank'); return false;">Play BvS Now!</a></span></h3>
<ul>
<li><a href="../../system_members.html">Site members</a></li>
<li><a href="../../system_join.html">Wiki Membership</a></li>
</ul>
<hr />
<ul>
<li><a href="../../forum_start.html">Forum Main</a></li>
<li><a href="../../forum_recent-posts.html">Recent Posts</a></li>
</ul>
<hr />
<ul>
<li><a href="../../system_recent-changes.html">Recent changes</a></li>
<li><a href="../../system_list-all-pages.html">List all pages</a></li>
<li><a href="../../system_page-tags-list.html">Page Tags</a></li>
</ul>
<hr />
<ul>
<li><a href="../../players.html">Players</a></li>
<li><a href="../../villages.html">Villages</a></li>
<li><a href="../../other-resources.html">Other Resources</a></li>
</ul>
<hr />
<p style="text-align: center;"><span style="font-size:smaller;">Notice: Do not send bug reports based on the information on this site. If this site is not matching up with what you're experiencing in game, that is a problem with this site, not with the game.</span></p>
</div>
<!-- google_ad_section_end -->
<div id="main-content">
<div id="action-area-top"></div>
<div id="page-title">Impossible Mission</div>
<div id="page-content">
<div class="forum-thread-box ">
<div class="forum-breadcrumbs">
<a href="../start.html">Forum</a>
» <a href="../c-31951/general.html">Billy Vs. SNAKEMAN / General</a>
» Impossible Mission
</div>
<div class="description-block well">
<div class="statistics">
Started by: <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/lich" onclick="WIKIDOT.page.listeners.userInfo(98769); return false;" ><img class="small" src="http://www.wikidot.com/avatar.php?userid=98769&amp;size=small&amp;timestamp=1657430468" alt="Lich" style="background-image:url(http://www.wikidot.com/userkarma.php?u=98769)"/></a><a href="http://www.wikidot.com/user:info/lich" onclick="WIKIDOT.page.listeners.userInfo(98769); return false;" >Lich</a></span><br/>
Date: <span class="odate time_1216427562 format_%25e%20%25b%20%25Y%2C%20%25H%3A%25M%7Cagohover">19 Jul 2008 00:32</span><br/>
Number of posts: 11<br/>
<span class="rss-icon"><img src="http://www.wikidot.com/common--theme/base/images/feed/feed-icon-14x14.png" alt="rss icon"/></span>
RSS: <a href="../../feed/forum/t-75267.xml">New posts</a>
</div>
<div class="head">Summary:</div>
Doubts about some requirements
</div>
<div class="options">
<a href="javascript:;" onclick="WIKIDOT.modules.ForumViewThreadModule.listeners.unfoldAll(event)" class="btn btn-default btn-small btn-sm">Unfold All</a>
<a href="javascript:;" onclick="WIKIDOT.modules.ForumViewThreadModule.listeners.foldAll(event)" class="btn btn-default btn-small btn-sm">Fold All</a>
<a href="javascript:;" id="thread-toggle-options" onclick="WIKIDOT.modules.ForumViewThreadModule.listeners.toggleThreadOptions(event)" class="btn btn-default btn-small btn-sm"><i class="icon-plus"></i> More Options</a>
</div>
<div id="thread-options-2" class="options" style="display: none">
<a href="javascript:;" onclick="WIKIDOT.modules.ForumViewThreadModule.listeners.editThreadMeta(event)" class="btn btn-default btn-small btn-sm">Edit Title & Description</a>
<a href="javascript:;" onclick="WIKIDOT.modules.ForumViewThreadModule.listeners.editThreadStickiness(event)" class="btn btn-default btn-small btn-sm">Stickness</a>
<a href="javascript:;" onclick="WIKIDOT.modules.ForumViewThreadModule.listeners.editThreadBlock(event)" class="btn btn-default btn-small btn-sm">Lock Thread</a>
<a href="javascript:;" onclick="WIKIDOT.modules.ForumViewThreadModule.listeners.moveThread(event)" class="btn btn-default btn-small btn-sm">Move Thread</a>
</div>
<div id="thread-action-area" class="action-area well" style="display: none"></div>
<div id="thread-container" class="thread-container">
<div id="thread-container-posts" style="display: none">
<div class="pager"><span class="pager-no">page 1 of 2</span><span class="current">1</span><span class="target"><a href="javascript:;" onclick="WIKIDOT.modules.ForumViewThreadPostsModule.listeners.updateList(2)">2</a></span><span class="target"><a href="javascript:;" onclick="WIKIDOT.modules.ForumViewThreadPostsModule.listeners.updateList(2)">next »</a></span></div>
<div class="post-container" id="fpc-223348">
<div class="post" id="post-223348">
<div class="long">
<div class="head">
<div class="options">
<a href="javascript:;" onclick="togglePostFold(event,223348)" class="btn btn-default btn-small btn-sm">Fold</a>
</div>
<div class="title" id="post-title-223348">
Impossible Mission
</div>
<div class="info">
<span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/lich" onclick="WIKIDOT.page.listeners.userInfo(98769); return false;" ><img class="small" src="http://www.wikidot.com/avatar.php?userid=98769&amp;size=small&amp;timestamp=1657430468" alt="Lich" style="background-image:url(http://www.wikidot.com/userkarma.php?u=98769)"/></a><a href="http://www.wikidot.com/user:info/lich" onclick="WIKIDOT.page.listeners.userInfo(98769); return false;" >Lich</a></span> <span class="odate time_1216427562 format_%25e%20%25b%20%25Y%2C%20%25H%3A%25M%7Cagohover">19 Jul 2008 00:32</span>
</div>
</div>
<div class="content" id="post-content-223348">
<p>I read in the wiki page about the Impossible Mission that I must have the 3 Sannin Themes, so, it means that if I didn't run a Sannin Theme since season 1 (and with different bloodlines) I will never complete the Impossible mission?</p>
</div>
<div class="options">
<a href="javascript:;" onclick="togglePostOptions(event,223348)" class="btn btn-default btn-small btn-sm">Options</a>
</div>
<div id="post-options-223348" class="options" style="display: none">
</div>
</div>
<div class="short">
<a class="options btn btn-default btn-mini btn-xs" href="javascript:;" onclick="togglePostFold(event,223348)" c>Unfold</a>
<a class="title" href="javascript:;" onclick="togglePostFold(event,223348)">Impossible Mission</a> by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/lich" onclick="WIKIDOT.page.listeners.userInfo(98769); return false;" ><img class="small" src="http://www.wikidot.com/avatar.php?userid=98769&amp;size=small&amp;timestamp=1657430468" alt="Lich" style="background-image:url(http://www.wikidot.com/userkarma.php?u=98769)"/></a><a href="http://www.wikidot.com/user:info/lich" onclick="WIKIDOT.page.listeners.userInfo(98769); return false;" >Lich</a></span>, <span class="odate time_1216427562 format_%25e%20%25b%20%25Y%2C%20%25H%3A%25M%7Cagohover">19 Jul 2008 00:32</span>
</div>
</div>
</div>
<div class="post-container" id="fpc-223357">
<div class="post" id="post-223357">
<div class="long">
<div class="head">
<div class="options">
<a href="javascript:;" onclick="togglePostFold(event,223357)" class="btn btn-default btn-small btn-sm">Fold</a>
</div>
<div class="title" id="post-title-223357">
Re: Impossible Mission
</div>
<div class="info">
<span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/bvs-uzuki" onclick="WIKIDOT.page.listeners.userInfo(78144); return false;" ><img class="small" src="http://www.wikidot.com/avatar.php?userid=78144&amp;size=small&amp;timestamp=1657430468" alt="BvS-Uzuki" style="background-image:url(http://www.wikidot.com/userkarma.php?u=78144)"/></a><a href="http://www.wikidot.com/user:info/bvs-uzuki" onclick="WIKIDOT.page.listeners.userInfo(78144); return false;" >BvS-Uzuki</a></span> <span class="odate time_1216429410 format_%25e%20%25b%20%25Y%2C%20%25H%3A%25M%7Cagohover">19 Jul 2008 01:03</span>
</div>
</div>
<div class="content" id="post-content-223357">
<p>You can do the impossible mission in Season 5, 6, or 7 if you have to.</p>
</div>
<div class="options">
<a href="javascript:;" onclick="togglePostOptions(event,223357)" class="btn btn-default btn-small btn-sm">Options</a>
</div>
<div id="post-options-223357" class="options" style="display: none">
</div>
</div>
<div class="short">
<a class="options btn btn-default btn-mini btn-xs" href="javascript:;" onclick="togglePostFold(event,223357)" c>Unfold</a>
<a class="title" href="javascript:;" onclick="togglePostFold(event,223357)">Re: Impossible Mission</a> by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/bvs-uzuki" onclick="WIKIDOT.page.listeners.userInfo(78144); return false;" ><img class="small" src="http://www.wikidot.com/avatar.php?userid=78144&amp;size=small&amp;timestamp=1657430468" alt="BvS-Uzuki" style="background-image:url(http://www.wikidot.com/userkarma.php?u=78144)"/></a><a href="http://www.wikidot.com/user:info/bvs-uzuki" onclick="WIKIDOT.page.listeners.userInfo(78144); return false;" >BvS-Uzuki</a></span>, <span class="odate time_1216429410 format_%25e%20%25b%20%25Y%2C%20%25H%3A%25M%7Cagohover">19 Jul 2008 01:03</span>
</div>
</div>
</div>
<div class="post-container" id="fpc-224588">
<div class="post" id="post-224588">
<div class="long">
<div class="head">
<div class="options">
<a href="javascript:;" onclick="togglePostFold(event,224588)" class="btn btn-default btn-small btn-sm">Fold</a>
</div>
<div class="title" id="post-title-224588">
Re: Impossible Mission
</div>
<div class="info">
<span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/lich" onclick="WIKIDOT.page.listeners.userInfo(98769); return false;" ><img class="small" src="http://www.wikidot.com/avatar.php?userid=98769&amp;size=small&amp;timestamp=1657430468" alt="Lich" style="background-image:url(http://www.wikidot.com/userkarma.php?u=98769)"/></a><a href="http://www.wikidot.com/user:info/lich" onclick="WIKIDOT.page.listeners.userInfo(98769); return false;" >Lich</a></span> <span class="odate time_1216651401 format_%25e%20%25b%20%25Y%2C%20%25H%3A%25M%7Cagohover">21 Jul 2008 14:43</span>
</div>
</div>
<div class="content" id="post-content-224588">
<p>Wow! Season 5, 6 and 7?<br />
Only now that you told me I found someone on Season 5.</p>
</div>
<div class="changes">
Last edited on <span class="odate time_1216651638 format_%25e%20%25b%20%25Y%2C%20%25H%3A%25M%7Cagohover">21 Jul 2008 14:47</span>
by <span class="printuser"><a href="http://www.wikidot.com/user:info/lich" onclick="WIKIDOT.page.listeners.userInfo(98769); return false;" >Lich</a></span>
<a href="javascript:;" onclick="WIKIDOT.modules.ForumViewThreadModule.listeners.showHistory(event,224588)"><i class="icon-plus"></i> Show more</a>
</div>
<div class="revisions" style="display: none"></div>
<div class="options">
<a href="javascript:;" onclick="togglePostOptions(event,224588)" class="btn btn-default btn-small btn-sm">Options</a>
</div>
<div id="post-options-224588" class="options" style="display: none">
</div>
</div>
<div class="short">
<a class="options btn btn-default btn-mini btn-xs" href="javascript:;" onclick="togglePostFold(event,224588)" c>Unfold</a>
<a class="title" href="javascript:;" onclick="togglePostFold(event,224588)">Re: Impossible Mission</a> by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/lich" onclick="WIKIDOT.page.listeners.userInfo(98769); return false;" ><img class="small" src="http://www.wikidot.com/avatar.php?userid=98769&amp;size=small&amp;timestamp=1657430468" alt="Lich" style="background-image:url(http://www.wikidot.com/userkarma.php?u=98769)"/></a><a href="http://www.wikidot.com/user:info/lich" onclick="WIKIDOT.page.listeners.userInfo(98769); return false;" >Lich</a></span>, <span class="odate time_1216651401 format_%25e%20%25b%20%25Y%2C%20%25H%3A%25M%7Cagohover">21 Jul 2008 14:43</span>
</div>
</div>
</div>
<div class="post-container" id="fpc-224601">
<div class="post" id="post-224601">
<div class="long">
<div class="head">
<div class="options">
<a href="javascript:;" onclick="togglePostFold(event,224601)" class="btn btn-default btn-small btn-sm">Fold</a>
</div>
<div class="title" id="post-title-224601">
Re: Impossible Mission
</div>
<div class="info">
<span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/deelle" onclick="WIKIDOT.page.listeners.userInfo(103382); return false;" ><img class="small" src="http://www.wikidot.com/avatar.php?userid=103382&amp;size=small&amp;timestamp=1657430468" alt="deelle" style="background-image:url(http://www.wikidot.com/userkarma.php?u=103382)"/></a><a href="http://www.wikidot.com/user:info/deelle" onclick="WIKIDOT.page.listeners.userInfo(103382); return false;" >deelle</a></span> <span class="odate time_1216653005 format_%25e%20%25b%20%25Y%2C%20%25H%3A%25M%7Cagohover">21 Jul 2008 15:10</span>
</div>
</div>
<div class="content" id="post-content-224601">
<p>I think there is already someone in Season 7.</p>
</div>
<div class="options">
<a href="javascript:;" onclick="togglePostOptions(event,224601)" class="btn btn-default btn-small btn-sm">Options</a>
</div>
<div id="post-options-224601" class="options" style="display: none">
</div>
</div>
<div class="short">
<a class="options btn btn-default btn-mini btn-xs" href="javascript:;" onclick="togglePostFold(event,224601)" c>Unfold</a>
<a class="title" href="javascript:;" onclick="togglePostFold(event,224601)">Re: Impossible Mission</a> by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/deelle" onclick="WIKIDOT.page.listeners.userInfo(103382); return false;" ><img class="small" src="http://www.wikidot.com/avatar.php?userid=103382&amp;size=small&amp;timestamp=1657430468" alt="deelle" style="background-image:url(http://www.wikidot.com/userkarma.php?u=103382)"/></a><a href="http://www.wikidot.com/user:info/deelle" onclick="WIKIDOT.page.listeners.userInfo(103382); return false;" >deelle</a></span>, <span class="odate time_1216653005 format_%25e%20%25b%20%25Y%2C%20%25H%3A%25M%7Cagohover">21 Jul 2008 15:10</span>
</div>
</div>
</div>
<div class="post-container" id="fpc-224606">
<div class="post" id="post-224606">
<div class="long">
<div class="head">
<div class="options">
<a href="javascript:;" onclick="togglePostFold(event,224606)" class="btn btn-default btn-small btn-sm">Fold</a>
</div>
<div class="title" id="post-title-224606">
Re: Impossible Mission
</div>
<div class="info">
<span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/bvs-uzuki" onclick="WIKIDOT.page.listeners.userInfo(78144); return false;" ><img class="small" src="http://www.wikidot.com/avatar.php?userid=78144&amp;size=small&amp;timestamp=1657430468" alt="BvS-Uzuki" style="background-image:url(http://www.wikidot.com/userkarma.php?u=78144)"/></a><a href="http://www.wikidot.com/user:info/bvs-uzuki" onclick="WIKIDOT.page.listeners.userInfo(78144); return false;" >BvS-Uzuki</a></span> <span class="odate time_1216653510 format_%25e%20%25b%20%25Y%2C%20%25H%3A%25M%7Cagohover">21 Jul 2008 15:18</span>
</div>
</div>
<div class="content" id="post-content-224606">
<p>I believe jkeezer is in Season 7.</p>
</div>
<div class="options">
<a href="javascript:;" onclick="togglePostOptions(event,224606)" class="btn btn-default btn-small btn-sm">Options</a>
</div>
<div id="post-options-224606" class="options" style="display: none">
</div>
</div>
<div class="short">
<a class="options btn btn-default btn-mini btn-xs" href="javascript:;" onclick="togglePostFold(event,224606)" c>Unfold</a>
<a class="title" href="javascript:;" onclick="togglePostFold(event,224606)">Re: Impossible Mission</a> by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/bvs-uzuki" onclick="WIKIDOT.page.listeners.userInfo(78144); return false;" ><img class="small" src="http://www.wikidot.com/avatar.php?userid=78144&amp;size=small&amp;timestamp=1657430468" alt="BvS-Uzuki" style="background-image:url(http://www.wikidot.com/userkarma.php?u=78144)"/></a><a href="http://www.wikidot.com/user:info/bvs-uzuki" onclick="WIKIDOT.page.listeners.userInfo(78144); return false;" >BvS-Uzuki</a></span>, <span class="odate time_1216653510 format_%25e%20%25b%20%25Y%2C%20%25H%3A%25M%7Cagohover">21 Jul 2008 15:18</span>
</div>
</div>
</div>
<div class="post-container" id="fpc-224683">
<div class="post" id="post-224683">
<div class="long">
<div class="head">
<div class="options">
<a href="javascript:;" onclick="togglePostFold(event,224683)" class="btn btn-default btn-small btn-sm">Fold</a>
</div>
<div class="title" id="post-title-224683">
Re: Impossible Mission
</div>
<div class="info">
<span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/jediwaldo" onclick="WIKIDOT.page.listeners.userInfo(104443); return false;" ><img class="small" src="http://www.wikidot.com/avatar.php?userid=104443&amp;size=small&amp;timestamp=1657430468" alt="jediwaldo" style="background-image:url(http://www.wikidot.com/userkarma.php?u=104443)"/></a><a href="http://www.wikidot.com/user:info/jediwaldo" onclick="WIKIDOT.page.listeners.userInfo(104443); return false;" >jediwaldo</a></span> <span class="odate time_1216660187 format_%25e%20%25b%20%25Y%2C%20%25H%3A%25M%7Cagohover">21 Jul 2008 17:09</span>
</div>
</div>
<div class="content" id="post-content-224683">
<p>jkeezer is in fact in season 7</p>
</div>
<div class="options">
<a href="javascript:;" onclick="togglePostOptions(event,224683)" class="btn btn-default btn-small btn-sm">Options</a>
</div>
<div id="post-options-224683" class="options" style="display: none">
</div>
</div>
<div class="short">
<a class="options btn btn-default btn-mini btn-xs" href="javascript:;" onclick="togglePostFold(event,224683)" c>Unfold</a>
<a class="title" href="javascript:;" onclick="togglePostFold(event,224683)">Re: Impossible Mission</a> by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/jediwaldo" onclick="WIKIDOT.page.listeners.userInfo(104443); return false;" ><img class="small" src="http://www.wikidot.com/avatar.php?userid=104443&amp;size=small&amp;timestamp=1657430468" alt="jediwaldo" style="background-image:url(http://www.wikidot.com/userkarma.php?u=104443)"/></a><a href="http://www.wikidot.com/user:info/jediwaldo" onclick="WIKIDOT.page.listeners.userInfo(104443); return false;" >jediwaldo</a></span>, <span class="odate time_1216660187 format_%25e%20%25b%20%25Y%2C%20%25H%3A%25M%7Cagohover">21 Jul 2008 17:09</span>
</div>
</div>
</div>
<div class="post-container" id="fpc-230573">
<div class="post" id="post-230573">
<div class="long">
<div class="head">
<div class="options">
<a href="javascript:;" onclick="togglePostFold(event,230573)" class="btn btn-default btn-small btn-sm">Fold</a>
</div>
<div class="title" id="post-title-230573">
Re: Impossible Mission
</div>
<div class="info">
<span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/wartooth" onclick="WIKIDOT.page.listeners.userInfo(174414); return false;" ><img class="small" src="http://www.wikidot.com/avatar.php?userid=174414&amp;size=small&amp;timestamp=1657430468" alt="Wartooth" style="background-image:url(http://www.wikidot.com/userkarma.php?u=174414)"/></a><a href="http://www.wikidot.com/user:info/wartooth" onclick="WIKIDOT.page.listeners.userInfo(174414); return false;" >Wartooth</a></span> <span class="odate time_1217434726 format_%25e%20%25b%20%25Y%2C%20%25H%3A%25M%7Cagohover">30 Jul 2008 16:18</span>
</div>
</div>
<div class="content" id="post-content-230573">
<p>Speaking of which, I've added Celeste to the list of those who've completed IM.</p>
</div>
<div class="options">
<a href="javascript:;" onclick="togglePostOptions(event,230573)" class="btn btn-default btn-small btn-sm">Options</a>
</div>
<div id="post-options-230573" class="options" style="display: none">
</div>
</div>
<div class="short">
<a class="options btn btn-default btn-mini btn-xs" href="javascript:;" onclick="togglePostFold(event,230573)" c>Unfold</a>
<a class="title" href="javascript:;" onclick="togglePostFold(event,230573)">Re: Impossible Mission</a> by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/wartooth" onclick="WIKIDOT.page.listeners.userInfo(174414); return false;" ><img class="small" src="http://www.wikidot.com/avatar.php?userid=174414&amp;size=small&amp;timestamp=1657430468" alt="Wartooth" style="background-image:url(http://www.wikidot.com/userkarma.php?u=174414)"/></a><a href="http://www.wikidot.com/user:info/wartooth" onclick="WIKIDOT.page.listeners.userInfo(174414); return false;" >Wartooth</a></span>, <span class="odate time_1217434726 format_%25e%20%25b%20%25Y%2C%20%25H%3A%25M%7Cagohover">30 Jul 2008 16:18</span>
</div>
</div>
</div>
<div class="post-container" id="fpc-231397">
<div class="post" id="post-231397">
<div class="long">
<div class="head">
<div class="options">
<a href="javascript:;" onclick="togglePostFold(event,231397)" class="btn btn-default btn-small btn-sm">Fold</a>
</div>
<div class="title" id="post-title-231397">
Re: Impossible Mission
</div>
<div class="info">
<span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/mynykr" onclick="WIKIDOT.page.listeners.userInfo(167532); return false;" ><img class="small" src="http://www.wikidot.com/avatar.php?userid=167532&amp;size=small&amp;timestamp=1657430468" alt="mynykr" style="background-image:url(http://www.wikidot.com/userkarma.php?u=167532)"/></a><a href="http://www.wikidot.com/user:info/mynykr" onclick="WIKIDOT.page.listeners.userInfo(167532); return false;" >mynykr</a></span> <span class="odate time_1217516351 format_%25e%20%25b%20%25Y%2C%20%25H%3A%25M%7Cagohover">31 Jul 2008 14:59</span>
</div>
</div>
<div class="content" id="post-content-231397">
<p>is celeste new? we just got him as a kaiju<br />
Edit: nevermind just read announcements, it's new :D</p>
</div>
<div class="changes">
Last edited on <span class="odate time_1217516405 format_%25e%20%25b%20%25Y%2C%20%25H%3A%25M%7Cagohover">31 Jul 2008 15:00</span>
by <span class="printuser"><a href="http://www.wikidot.com/user:info/mynykr" onclick="WIKIDOT.page.listeners.userInfo(167532); return false;" >mynykr</a></span>
<a href="javascript:;" onclick="WIKIDOT.modules.ForumViewThreadModule.listeners.showHistory(event,231397)"><i class="icon-plus"></i> Show more</a>
</div>
<div class="revisions" style="display: none"></div>
<div class="options">
<a href="javascript:;" onclick="togglePostOptions(event,231397)" class="btn btn-default btn-small btn-sm">Options</a>
</div>
<div id="post-options-231397" class="options" style="display: none">
</div>
</div>
<div class="short">
<a class="options btn btn-default btn-mini btn-xs" href="javascript:;" onclick="togglePostFold(event,231397)" c>Unfold</a>
<a class="title" href="javascript:;" onclick="togglePostFold(event,231397)">Re: Impossible Mission</a> by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/mynykr" onclick="WIKIDOT.page.listeners.userInfo(167532); return false;" ><img class="small" src="http://www.wikidot.com/avatar.php?userid=167532&amp;size=small&amp;timestamp=1657430468" alt="mynykr" style="background-image:url(http://www.wikidot.com/userkarma.php?u=167532)"/></a><a href="http://www.wikidot.com/user:info/mynykr" onclick="WIKIDOT.page.listeners.userInfo(167532); return false;" >mynykr</a></span>, <span class="odate time_1217516351 format_%25e%20%25b%20%25Y%2C%20%25H%3A%25M%7Cagohover">31 Jul 2008 14:59</span>
</div>
</div>
</div>
<div class="post-container" id="fpc-430399">
<div class="post" id="post-430399">
<div class="long">
<div class="head">
<div class="options">
<a href="javascript:;" onclick="togglePostFold(event,430399)" class="btn btn-default btn-small btn-sm">Fold</a>
</div>
<div class="title" id="post-title-430399">
Re: Impossible Mission
</div>
<div class="info">
<span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/siahposh" onclick="WIKIDOT.page.listeners.userInfo(287203); return false;" ><img class="small" src="http://www.wikidot.com/avatar.php?userid=287203&amp;size=small&amp;timestamp=1657430468" alt="Siahposh" style="background-image:url(http://www.wikidot.com/userkarma.php?u=287203)"/></a><a href="http://www.wikidot.com/user:info/siahposh" onclick="WIKIDOT.page.listeners.userInfo(287203); return false;" >Siahposh</a></span> <span class="odate time_1238096285 format_%25e%20%25b%20%25Y%2C%20%25H%3A%25M%7Cagohover">26 Mar 2009 19:38</span>
</div>
</div>
<div class="content" id="post-content-430399">
<p>yum,i must know,this IM said i must be a leader of village,do i really need to be kage?! TT</p>
</div>
<div class="options">
<a href="javascript:;" onclick="togglePostOptions(event,430399)" class="btn btn-default btn-small btn-sm">Options</a>
</div>
<div id="post-options-430399" class="options" style="display: none">
</div>
</div>
<div class="short">
<a class="options btn btn-default btn-mini btn-xs" href="javascript:;" onclick="togglePostFold(event,430399)" c>Unfold</a>
<a class="title" href="javascript:;" onclick="togglePostFold(event,430399)">Re: Impossible Mission</a> by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/siahposh" onclick="WIKIDOT.page.listeners.userInfo(287203); return false;" ><img class="small" src="http://www.wikidot.com/avatar.php?userid=287203&amp;size=small&amp;timestamp=1657430468" alt="Siahposh" style="background-image:url(http://www.wikidot.com/userkarma.php?u=287203)"/></a><a href="http://www.wikidot.com/user:info/siahposh" onclick="WIKIDOT.page.listeners.userInfo(287203); return false;" >Siahposh</a></span>, <span class="odate time_1238096285 format_%25e%20%25b%20%25Y%2C%20%25H%3A%25M%7Cagohover">26 Mar 2009 19:38</span>
</div>
</div>
</div>
<div class="post-container" id="fpc-430459">
<div class="post" id="post-430459">
<div class="long">
<div class="head">
<div class="options">
<a href="javascript:;" onclick="togglePostFold(event,430459)" class="btn btn-default btn-small btn-sm">Fold</a>
</div>
<div class="title" id="post-title-430459">
Re: Impossible Mission
</div>
<div class="info">
<span class="printuser avatarhover"><a href="javascript:;"><img class="small" src="http://www.gravatar.com/avatar.php?gravatar_id=143592da8c3879047dd89aee9e6a5988&default=http://www.wikidot.com/common--images/avatars/default/a16.png&size=16" alt=""/></a>kaktus143 (guest)</span> <span class="odate time_1238098618 format_%25e%20%25b%20%25Y%2C%20%25H%3A%25M%7Cagohover">26 Mar 2009 20:16</span>
</div>
</div>
<div class="content" id="post-content-430459">
<p>yes</p>
</div>
<div class="options">
<a href="javascript:;" onclick="togglePostOptions(event,430459)" class="btn btn-default btn-small btn-sm">Options</a>
</div>
<div id="post-options-430459" class="options" style="display: none">
</div>
</div>
<div class="short">
<a class="options btn btn-default btn-mini btn-xs" href="javascript:;" onclick="togglePostFold(event,430459)" c>Unfold</a>
<a class="title" href="javascript:;" onclick="togglePostFold(event,430459)">Re: Impossible Mission</a> by <span class="printuser avatarhover"><a href="javascript:;"><img class="small" src="http://www.gravatar.com/avatar.php?gravatar_id=143592da8c3879047dd89aee9e6a5988&default=http://www.wikidot.com/common--images/avatars/default/a16.png&size=16" alt=""/></a>kaktus143 (guest)</span>, <span class="odate time_1238098618 format_%25e%20%25b%20%25Y%2C%20%25H%3A%25M%7Cagohover">26 Mar 2009 20:16</span>
</div>
</div>
</div>
<div class="pager"><span class="pager-no">page 1 of 2</span><span class="current">1</span><span class="target"><a href="javascript:;" onclick="WIKIDOT.modules.ForumViewThreadPostsModule.listeners.updateList(2)">2</a></span><span class="target"><a href="javascript:;" onclick="WIKIDOT.modules.ForumViewThreadPostsModule.listeners.updateList(2)">next »</a></span></div>
</div>
</div>
<div class="new-post">
<a href="javascript:;" id="new-post-button" onclick="WIKIDOT.modules.ForumViewThreadModule.listeners.newPost(event,null)" class="btn btn-default">New Post</a>
</div>
<div style="display:none" id="post-options-template">
<a href="javascript:;" onclick="WIKIDOT.modules.ForumViewThreadModule.listeners.showPermalink(event,'%POST_ID%')" class="btn btn-default btn-small btn-sm">Permanent Link</a>
<a href="javascript:;" onclick="WIKIDOT.modules.ForumViewThreadModule.listeners.editPost(event,'%POST_ID%')" class="btn btn-default btn-small btn-sm">Edit</a>
<a href="javascript:;" onclick="WIKIDOT.modules.ForumViewThreadModule.listeners.deletePost(event,'%POST_ID%')"class="btn btn-danger btn-small btn-sm">Delete</a>
</div>
<div style="display:none" id="post-options-permalink-template">/forum/t-75267/impossible-mission#post-</div>
</div>
<script type="text/javascript">
WIKIDOT.forumThreadId = 75267;
</script>
</div>
<div id="page-info-break"></div>
<div id="page-options-container">
</div>
<div id="action-area" style="display: none;"></div>
</div>
</div>
<div id="footer" style="display: block; visibility: visible;">
<div class="options" style="display: block; visibility: visible;">
<a href="http://www.wikidot.com/doc" id="wikidot-help-button">Help</a>
|
<a href="http://www.wikidot.com/legal:terms-of-service" id="wikidot-tos-button">Terms of Service</a>
|
<a href="http://www.wikidot.com/legal:privacy-policy" id="wikidot-privacy-button">Privacy</a>
|
<a href="javascript:;" id="bug-report-button" onclick="WIKIDOT.page.listeners.pageBugReport(event)">Report a bug</a>
|
<a href="javascript:;" id="abuse-report-button" onclick="WIKIDOT.page.listeners.flagPageObjectionable(event)">Flag as objectionable</a>
</div>
Powered by <a href="http://www.wikidot.com/">Wikidot.com</a>
</div>
<div id="license-area" class="license-area">
Unless otherwise stated, the content of this page is licensed under <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-ShareAlike 3.0 License</a>
</div>
<div id="extrac-div-1"><span></span></div><div id="extrac-div-2"><span></span></div><div id="extrac-div-3"><span></span></div>
</div>
</div>
<!-- These extra divs/spans may be used as catch-alls to add extra imagery. -->
<div id="extra-div-1"><span></span></div><div id="extra-div-2"><span></span></div><div id="extra-div-3"><span></span></div>
<div id="extra-div-4"><span></span></div><div id="extra-div-5"><span></span></div><div id="extra-div-6"><span></span></div>
</div>
</div>
<div id="dummy-ondomready-block" style="display: none;" ></div>
<!-- Google Analytics load -->
<script type="text/javascript">
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<!-- Quantcast -->
<script type="text/javascript">
_qoptions={
qacct:"p-edL3gsnUjJzw-"
};
(function() {
var qc = document.createElement('script'); qc.type = 'text/javascript'; qc.async = true;
qc.src = ('https:' == document.location.protocol ? 'https://secure' : 'http://edge') + '.quantserve.com/quant.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(qc, s);
})();
</script>
<noscript>
<img src="http://pixel.quantserve.com/pixel/p-edL3gsnUjJzw-.gif" style="display: none;" border="0" height="1" width="1" alt="Quantcast"/>
</noscript>
<div id="page-options-bottom-tips" style="display: none;">
<div id="edit-button-hovertip">
Click here to edit contents of this page. </div>
</div>
<div id="page-options-bottom-2-tips" style="display: none;">
<div id="edit-sections-button-hovertip">
Click here to toggle editing of individual sections of the page (if possible). Watch headings for an "edit" link when available. </div>
<div id="edit-append-button-hovertip">
Append content without editing the whole page source. </div>
<div id="history-button-hovertip">
Check out how this page has evolved in the past. </div>
<div id="discuss-button-hovertip">
If you want to discuss contents of this page - this is the easiest way to do it. </div>
<div id="files-button-hovertip">
View and manage file attachments for this page. </div>
<div id="site-tools-button-hovertip">
A few useful tools to manage this Site. </div>
<div id="backlinks-button-hovertip">
See pages that link to and include this page. </div>
<div id="rename-move-button-hovertip">
Change the name (also URL address, possibly the category) of the page. </div>
<div id="view-source-button-hovertip">
View wiki source for this page without editing. </div>
<div id="parent-page-button-hovertip">
View/set parent page (used for creating breadcrumbs and structured layout). </div>
<div id="abuse-report-button-hovertip">
Notify administrators if there is objectionable content in this page. </div>
<div id="bug-report-button-hovertip">
Something does not work as expected? Find out what you can do. </div>
<div id="wikidot-help-button-hovertip">
General Wikidot.com documentation and help section. </div>
<div id="wikidot-tos-button-hovertip">
Wikidot.com Terms of Service - what you can, what you should not etc. </div>
<div id="wikidot-privacy-button-hovertip">
Wikidot.com Privacy Policy.
</div>
</div>
</body>
<!-- Mirrored from bvs.wikidot.com/forum/t-75267/impossible-mission by HTTrack Website Copier/3.x [XR&CO'2014], Sun, 10 Jul 2022 05:31:48 GMT -->
</html> | {'content_hash': '865c1aca1ede8adf63feff84e6ebe503', 'timestamp': '', 'source': 'github', 'line_count': 1119, 'max_line_length': 741, 'avg_line_length': 49.55138516532618, 'alnum_prop': 0.6235031020054826, 'repo_name': 'tn5421/tn5421.github.io', 'id': '446cc1295834142b2eacda1f5edc9e47fbb4475d', 'size': '55448', 'binary': False, 'copies': '1', 'ref': 'refs/heads/main', 'path': 'bvs.wikidot.com/forum/t-75267/impossible-mission.html', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'HTML', 'bytes': '400301089'}]} |
<?php
namespace hipstercreative\user\tests\_pages;
use yii\codeception\BasePage;
class CreatePage extends BasePage
{
/**
* @var string
*/
public $route = '/user/admin/create';
/**
* @param $username
* @param $email
* @param $password
* @param null $role
*/
public function create($username, $email, $password, $role = null)
{
$this->guy->fillField('#user-username', $username);
$this->guy->fillField('#user-email', $email);
$this->guy->fillField('#user-password', $password);
$this->guy->fillField('#user-role', $role);
$this->guy->click('Save');
}
}
| {'content_hash': '7af0354d41f85b06f48db6f31ad8f09b', 'timestamp': '', 'source': 'github', 'line_count': 28, 'max_line_length': 70, 'avg_line_length': 23.357142857142858, 'alnum_prop': 0.573394495412844, 'repo_name': 'HipsterCreative/yii2-user-mongo', 'id': '8cc8674c0b942df4f02a328b74a65e9854359635', 'size': '654', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'tests/_pages/CreatePage.php', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'PHP', 'bytes': '267136'}, {'name': 'Shell', 'bytes': '518'}]} |
namespace installer {
// Remove ready-mode if not multi-install.
void ChromeFrameOperations::NormalizeOptions(
std::set<std::wstring>* options) const {
std::set<std::wstring>::iterator ready_mode(options->find(kOptionReadyMode));
if (ready_mode != options->end() &&
options->find(kOptionMultiInstall) == options->end()) {
LOG(WARNING) << "--ready-mode option does not apply when --multi-install "
"is not also specified; ignoring.";
options->erase(ready_mode);
}
}
void ChromeFrameOperations::ReadOptions(
const MasterPreferences& prefs,
std::set<std::wstring>* options) const {
DCHECK(options);
static const struct PrefToOption {
const char* pref_name;
const wchar_t* option_name;
} map[] = {
{ master_preferences::kChromeFrameReadyMode, kOptionReadyMode },
{ master_preferences::kMultiInstall, kOptionMultiInstall }
};
bool pref_value;
for (const PrefToOption* scan = &map[0], *end = &map[arraysize(map)];
scan != end; ++scan) {
if (prefs.GetBool(scan->pref_name, &pref_value) && pref_value)
options->insert(scan->option_name);
}
NormalizeOptions(options);
}
void ChromeFrameOperations::ReadOptions(
const CommandLine& uninstall_command,
std::set<std::wstring>* options) const {
DCHECK(options);
static const struct FlagToOption {
const char* flag_name;
const wchar_t* option_name;
} map[] = {
{ switches::kChromeFrameReadyMode, kOptionReadyMode },
{ switches::kMultiInstall, kOptionMultiInstall }
};
for (const FlagToOption* scan = &map[0], *end = &map[arraysize(map)];
scan != end; ++scan) {
if (uninstall_command.HasSwitch(scan->flag_name))
options->insert(scan->option_name);
}
NormalizeOptions(options);
}
void ChromeFrameOperations::AddKeyFiles(
const std::set<std::wstring>& options,
std::vector<FilePath>* key_files) const {
DCHECK(key_files);
key_files->push_back(FilePath(installer::kChromeFrameDll));
key_files->push_back(FilePath(installer::kChromeFrameHelperExe));
}
void ChromeFrameOperations::AddComDllList(
const std::set<std::wstring>& options,
std::vector<FilePath>* com_dll_list) const {
DCHECK(com_dll_list);
std::vector<FilePath> dll_list;
com_dll_list->push_back(FilePath(installer::kChromeFrameDll));
}
void ChromeFrameOperations::AppendUninstallFlags(
const std::set<std::wstring>& options,
CommandLine* cmd_line) const {
DCHECK(cmd_line);
bool is_multi_install = options.find(kOptionMultiInstall) != options.end();
// Add --multi-install if it isn't already there.
if (is_multi_install && !cmd_line->HasSwitch(switches::kMultiInstall))
cmd_line->AppendSwitch(switches::kMultiInstall);
// --chrome-frame is always needed.
cmd_line->AppendSwitch(switches::kChromeFrame);
// ready-mode is only supported in multi-installs of Chrome Frame.
if (is_multi_install && options.find(kOptionReadyMode) != options.end())
cmd_line->AppendSwitch(switches::kChromeFrameReadyMode);
}
void ChromeFrameOperations::AppendRenameFlags(
const std::set<std::wstring>& options,
CommandLine* cmd_line) const {
DCHECK(cmd_line);
bool is_multi_install = options.find(kOptionMultiInstall) != options.end();
// Add --multi-install if it isn't already there.
if (is_multi_install && !cmd_line->HasSwitch(switches::kMultiInstall))
cmd_line->AppendSwitch(switches::kMultiInstall);
// --chrome-frame is needed for single installs.
if (!is_multi_install)
cmd_line->AppendSwitch(switches::kChromeFrame);
}
bool ChromeFrameOperations::SetChannelFlags(
const std::set<std::wstring>& options,
bool set,
ChannelInfo* channel_info) const {
#if defined(GOOGLE_CHROME_BUILD)
DCHECK(channel_info);
bool modified = channel_info->SetChromeFrame(set);
// Always remove the options if we're called to remove flags or if the
// corresponding option isn't set.
modified |= channel_info->SetReadyMode(
set && options.find(kOptionReadyMode) != options.end());
return modified;
#else
return false;
#endif
}
bool ChromeFrameOperations::ShouldCreateUninstallEntry(
const std::set<std::wstring>& options) const {
return options.find(kOptionReadyMode) == options.end();
}
} // namespace installer
| {'content_hash': '909c6ab1569a07bbbcc82456931aa7c3', 'timestamp': '', 'source': 'github', 'line_count': 134, 'max_line_length': 79, 'avg_line_length': 31.902985074626866, 'alnum_prop': 0.7015204678362573, 'repo_name': 'aYukiSekiguchi/ACCESS-Chromium', 'id': '7dbd316eaa2951f0ed1c90bc3fae82f9a402a41e', 'size': '4905', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'chrome/installer/util/chrome_frame_operations.cc', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'Assembly', 'bytes': '1174606'}, {'name': 'C', 'bytes': '65916105'}, {'name': 'C++', 'bytes': '113472993'}, {'name': 'F#', 'bytes': '381'}, {'name': 'Go', 'bytes': '10440'}, {'name': 'Java', 'bytes': '11354'}, {'name': 'JavaScript', 'bytes': '8864255'}, {'name': 'Objective-C', 'bytes': '8990130'}, {'name': 'PHP', 'bytes': '97796'}, {'name': 'Perl', 'bytes': '903036'}, {'name': 'Python', 'bytes': '5269405'}, {'name': 'R', 'bytes': '524'}, {'name': 'Shell', 'bytes': '4123452'}, {'name': 'Tcl', 'bytes': '277077'}]} |
module ConverterHelper
end
| {'content_hash': 'd2ada488e0ac8d080d681c3d2c319a68', 'timestamp': '', 'source': 'github', 'line_count': 2, 'max_line_length': 22, 'avg_line_length': 13.5, 'alnum_prop': 0.8888888888888888, 'repo_name': 'tectoid/pod', 'id': '5b52b209e4d82bf05ad2376df21dc629e89d3b17', 'size': '27', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'app/helpers/converter_helper.rb', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Ruby', 'bytes': '18930'}, {'name': 'Shell', 'bytes': '1816'}]} |
package org.elasticsearch.common.xcontent;
import org.elasticsearch.common.bytes.BytesReference;
import java.io.Closeable;
import java.io.Flushable;
import java.io.IOException;
import java.io.InputStream;
public interface XContentGenerator extends Closeable, Flushable {
XContentType contentType();
void usePrettyPrint();
boolean isPrettyPrint();
void usePrintLineFeedAtEnd();
void writeStartObject() throws IOException;
void writeEndObject() throws IOException;
void writeStartArray() throws IOException;
void writeEndArray() throws IOException;
void writeFieldName(String name) throws IOException;
void writeNull() throws IOException;
void writeNullField(String name) throws IOException;
void writeBooleanField(String name, boolean value) throws IOException;
void writeBoolean(boolean value) throws IOException;
void writeNumberField(String name, double value) throws IOException;
void writeNumber(double value) throws IOException;
void writeNumberField(String name, float value) throws IOException;
void writeNumber(float value) throws IOException;
void writeNumberField(String name, int value) throws IOException;
void writeNumber(int value) throws IOException;
void writeNumberField(String name, long value) throws IOException;
void writeNumber(long value) throws IOException;
void writeNumber(short value) throws IOException;
void writeStringField(String name, String value) throws IOException;
void writeString(String value) throws IOException;
void writeString(char[] text, int offset, int len) throws IOException;
void writeUTF8String(byte[] value, int offset, int length) throws IOException;
void writeBinaryField(String name, byte[] value) throws IOException;
void writeBinary(byte[] value) throws IOException;
void writeBinary(byte[] value, int offset, int length) throws IOException;
void writeRawField(String name, InputStream value) throws IOException;
void writeRawField(String name, BytesReference value) throws IOException;
void writeRawValue(BytesReference value) throws IOException;
void copyCurrentStructure(XContentParser parser) throws IOException;
/**
* Returns {@code true} if this XContentGenerator has been closed. A closed generator can not do any more output.
*/
boolean isClosed();
}
| {'content_hash': '7006c6c482d006f1b912cdba0a3fd92a', 'timestamp': '', 'source': 'github', 'line_count': 85, 'max_line_length': 117, 'avg_line_length': 28.28235294117647, 'alnum_prop': 0.7616472545757071, 'repo_name': 'henakamaMSFT/elasticsearch', 'id': '478f3a8a08f82f5fe57e94f56f6028242cfa7d67', 'size': '3192', 'binary': False, 'copies': '8', 'ref': 'refs/heads/master', 'path': 'core/src/main/java/org/elasticsearch/common/xcontent/XContentGenerator.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'ANTLR', 'bytes': '10721'}, {'name': 'Batchfile', 'bytes': '13161'}, {'name': 'Emacs Lisp', 'bytes': '3341'}, {'name': 'FreeMarker', 'bytes': '45'}, {'name': 'Groovy', 'bytes': '296892'}, {'name': 'HTML', 'bytes': '3399'}, {'name': 'Java', 'bytes': '38136523'}, {'name': 'Perl', 'bytes': '7271'}, {'name': 'Python', 'bytes': '53482'}, {'name': 'Shell', 'bytes': '110354'}]} |
"""event_nullability
Revision ID: 3f7f9669cd45
Revises: 4752027f1c40
Create Date: 2013-08-08 16:38:19.523418
"""
# revision identifiers, used by Alembic.
revision = '3f7f9669cd45'
down_revision = '4752027f1c40'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.alter_column('events', 'http_method',
new_column_name='action',
type_ = sa.Enum(u'POST', u'PUT', u'DELETE', u'IMPORT'),
existing_type = sa.Enum(u'POST', u'PUT', u'DELETE'),
nullable = False
)
op.alter_column('events', 'resource_id',
existing_type = sa.Integer(),
nullable = True
)
op.alter_column('events', 'resource_type',
existing_type=sa.VARCHAR(length=250),
nullable = True
)
def downgrade():
op.alter_column('events', 'resource_type',
existing_type=sa.VARCHAR(length=250),
nullable = False
)
op.alter_column('events', 'resource_id',
existing_type = sa.Integer(),
nullable = False
)
op.alter_column('events', 'action',
new_column_name='http_method',
type_ = sa.Enum(u'POST', u'PUT', u'DELETE'),
existing_type = sa.Enum(u'POST', u'PUT', u'DELETE', u'IMPORT'),
nullable = False
)
| {'content_hash': '6b2a2ba62ecd8570bbcf854908f797ed', 'timestamp': '', 'source': 'github', 'line_count': 47, 'max_line_length': 71, 'avg_line_length': 26.404255319148938, 'alnum_prop': 0.6059629331184528, 'repo_name': 'vladan-m/ggrc-core', 'id': '5a56f3e8b3e36b907c20b10fc0e205e9d3fe04a0', 'size': '1479', 'binary': False, 'copies': '7', 'ref': 'refs/heads/develop', 'path': 'src/ggrc/migrations/versions/20130808163819_3f7f9669cd45_event_nullability.py', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '230813'}, {'name': 'Cucumber', 'bytes': '148444'}, {'name': 'HTML', 'bytes': '6041162'}, {'name': 'JavaScript', 'bytes': '1893341'}, {'name': 'Makefile', 'bytes': '5483'}, {'name': 'Mako', 'bytes': '1720'}, {'name': 'Python', 'bytes': '1489657'}, {'name': 'Ruby', 'bytes': '1496'}, {'name': 'Shell', 'bytes': '11555'}]} |
"""A simple three-species chemical kinetics system known as "Robertson's
example", as presented in:
H. H. Robertson, The solution of a set of reaction rate equations, in Numerical
Analysis: An Introduction, J. Walsh, ed., Academic Press, 1966, pp. 178-182.
"""
# This is a simple system often used to study stiffness in systems of
# differential equations. It doesn't leverage the power of rules-based modeling
# or pysb, but it's a useful small model for purposes of experimentation.
#
# A brief report addressing issues of stiffness encountered in numerical
# integration of Robertson's example can be found here:
# http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.53.8603&rep=rep1&type=pdf
#
# The chemical model is as follows:
#
# Reaction Rate
# ------------------------
# A -> B 0.04
# 2B -> B + C 3.0e7
# B + C -> A + C 1.0e4
#
# The resultant system of differential equations is:
#
# y1' = -0.04 * y1 + 1.0e4 * y2 * y3
# y2' = 0.04 * y1 - 1.0e4 * y2 * y3 - 3.0e7 * y2^2
# y3' = 3.0e7 * y2^2
#
# If you run this script directly, it will generate the equations and print them
# in a form very closely resembling that given above. See also run_robertson.py
# which integrates the system and plots the trajectories.
from __future__ import print_function
from pysb import *
Model()
Monomer('A')
Monomer('B')
Monomer('C')
# A -> B 0.04
Rule('A_to_B', A() >> B(), Parameter('k1', 0.04))
# 2B -> B + C 3.0e7
Rule('BB_to_BC', B() + B() >> B() + C(), Parameter('k2', 3.0e7))
# B + C -> A + C 1.0e4
Rule('BC_to_AC', B() + C() >> A() + C(), Parameter('k3', 1.0e4))
# The system is known to be stiff for initial values A=1, B=0, C=0
Initial(A(), Parameter('A_0', 1.0))
Initial(B(), Parameter('B_0', 0.0))
Initial(C(), Parameter('C_0', 0.0))
# Observe total amount of each monomer
Observable('A_total', A())
Observable('B_total', B())
Observable('C_total', C())
if __name__ == '__main__':
from pysb.bng import generate_equations
# This creates model.odes which contains the math
generate_equations(model)
# Build a symbol substitution mapping to help the math look like the
# equations in the comment above, instead of showing the internal pysb
# symbol names
# ==========
substitutions = {}
# Map parameter symbols to their values
substitutions.update((p.name, p.value) for p in model.parameters)
# Map species variables sI to yI+1, e.g. s0 -> y1
substitutions.update(('s%d' % i, 'y%d' % (i+1))
for i in range(len(model.odes)))
print(__doc__, "\n", model, "\n")
# Iterate over each equation
for i, eq in enumerate(model.odes):
# Perform the substitution using the sympy 'subs' method and the
# mappings we built above
eq_sub = eq.subs(substitutions)
# Display the equation
print('y%d\' = %s' % (i+1, eq_sub))
print("""
NOTE: This model code is designed to be imported and programatically
manipulated, not executed directly. The above output is merely a
diagnostic aid. Please see run_robertson.py for example usage.""")
| {'content_hash': '70c65adce41acb705501df60ae39067e', 'timestamp': '', 'source': 'github', 'line_count': 92, 'max_line_length': 84, 'avg_line_length': 34.5, 'alnum_prop': 0.6285444234404537, 'repo_name': 'jmuhlich/pysb', 'id': '08d58695914b946f5a3812f32d8851358c6fa264', 'size': '3174', 'binary': False, 'copies': '5', 'ref': 'refs/heads/master', 'path': 'pysb/examples/robertson.py', 'mode': '33188', 'license': 'bsd-2-clause', 'language': [{'name': 'Dockerfile', 'bytes': '212'}, {'name': 'Puppet', 'bytes': '3461'}, {'name': 'Python', 'bytes': '1123003'}]} |
package com.robin.kafka;
import kafka.consumer.ConsumerIterator;
import kafka.consumer.KafkaStream;
import kafka.javaapi.consumer.ConsumerConnector;
/**
* 处理KafkaStream, pull messages并处理.
*
*
*/
public class ConsumerTest implements Runnable {
private ConsumerConnector consumer;
private KafkaStream<byte[], byte[]> stream;
private int threadNumber;
private long delay;
public ConsumerTest(ConsumerConnector consumer, KafkaStream<byte[], byte[]> stream, int threadNumber, long delay) {
this.consumer = consumer;
this.threadNumber = threadNumber;
this.stream = stream;
this.delay = delay;
}
public void run() {
ConsumerIterator<byte[], byte[]> it = stream.iterator();
while (it.hasNext()) {
//格式: 处理时间,线程编号:消息
String msg = new String(it.next().message());
long t = System.currentTimeMillis() - Long.parseLong(msg.substring(0, msg.indexOf(",")));
if (t < delay) {
try {
Thread.currentThread().sleep(delay -t);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
System.out.println(System.currentTimeMillis() + ",Thread " + threadNumber + ": " + msg);
}
System.out.println("Shutting down Thread: " + threadNumber);
}
public void run0() {
ConsumerIterator<byte[], byte[]> it = stream.iterator();
while (it.hasNext()) {
//格式: 处理时间,线程编号:消息
System.out.println(System.currentTimeMillis() + ",Thread " + threadNumber + ": " + new String(it.next().message()));
}
System.out.println("Shutting down Thread: " + threadNumber);
}
public void run1() {
ConsumerIterator<byte[], byte[]> it = stream.iterator();
int count = 0;
while (it.hasNext()) {
//格式: 处理时间,线程编号:消息
System.out.println(System.currentTimeMillis() + ",Thread " + threadNumber + ": " + new String(it.next().message()));
count++;
if (count == 100) {
consumer.commitOffsets();
count = 0;
}
}
System.out.println("Shutting down Thread: " + threadNumber);
}
} | {'content_hash': '0ee6520790c352749ecb7009097d72bc', 'timestamp': '', 'source': 'github', 'line_count': 80, 'max_line_length': 119, 'avg_line_length': 24.775, 'alnum_prop': 0.6523713420787084, 'repo_name': 'mengyou0304/scala_simple_work', 'id': '528325cda50650ddfbdf133a4251cb45760ca4cc', 'size': '2072', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/main/java/com/robin/kafka/ConsumerTest.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Java', 'bytes': '7450'}, {'name': 'Scala', 'bytes': '24190'}, {'name': 'Shell', 'bytes': '14788'}]} |
<!DOCTYPE html>
<!--
Copyright (c) 2014 Intel Corporation.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of works must retain the original copyright notice, this lis
of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the original copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of Intel Corporation nor the names of its contributors
may be used to endorse or promote products derived from this work withou
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "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 INTEL CORPORATION 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.
Authors:
Tan,Shiyou<[email protected]>
-->
<html>
<head>
<title>Typed Arrays Test: Uint8Array_byteOffset_type</title>
<link rel="author" title="Intel" href="http://www.intel.com" />
<link rel="help" href="https://www.khronos.org/registry/typedarray/specs/1.0/#7" />
<meta name="flags" content="" />
<meta name="assert" content="Check if type of byteOffset of Uint8Array is number" />
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
</head>
<body>
<div id="log"></div>
<script>
test(function () {
var a = new ArrayBuffer(4);
var b = new Uint8Array(a);
var c = b.byteOffset;
assert_equals(typeof c, "number");
});
</script>
</body>
</html>
| {'content_hash': '92b2c48ce6d4cb2bc978a8351ca1ca2b', 'timestamp': '', 'source': 'github', 'line_count': 54, 'max_line_length': 88, 'avg_line_length': 42.05555555555556, 'alnum_prop': 0.7269925143108763, 'repo_name': 'haoyunfeix/crosswalk-test-suite', 'id': '48bf36821898559b35c9c3520a8eba4bc360db52', 'size': '2271', 'binary': False, 'copies': '29', 'ref': 'refs/heads/master', 'path': 'webapi/tct-typedarrays-nonw3c-tests/typedarrays/Uint8Array_byteOffset_type.html', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'C', 'bytes': '30874'}, {'name': 'C#', 'bytes': '1437'}, {'name': 'CSS', 'bytes': '65158'}, {'name': 'Cucumber', 'bytes': '136184'}, {'name': 'GLSL', 'bytes': '2187925'}, {'name': 'HTML', 'bytes': '24438782'}, {'name': 'Java', 'bytes': '1608020'}, {'name': 'JavaScript', 'bytes': '3031031'}, {'name': 'Makefile', 'bytes': '1044'}, {'name': 'PHP', 'bytes': '37474'}, {'name': 'Python', 'bytes': '1881356'}, {'name': 'Shell', 'bytes': '612395'}]} |
package com.zvapps.getvideoat.utils.databinding;
import android.databinding.BindingAdapter;
import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.widget.ImageView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.request.RequestListener;
import com.bumptech.glide.request.target.Target;
import timber.log.Timber;
/**
* Created by Vladislav Nikolaev on 21.05.2017.
*/
public class ImageDataBindingAdapters {
@BindingAdapter(
value = {"imageUrl", "imageError", "placeholder"},
requireAll = false)
public static void loadImage(@NonNull ImageView imageView,
@Nullable String url,
@Nullable Drawable errorImage,
@Nullable Drawable placeholder) {
Uri uri = url == null ? null : Uri.parse(url);
if (uri == null) {
imageView.setImageDrawable(placeholder);
return;
}
Glide.with(imageView.getContext())
.load(uri)
.asBitmap()
.animate(android.R.anim.fade_in)
.error(errorImage)
.placeholder(placeholder)
.fallback(errorImage)
.listener(new RequestListener<Uri, Bitmap>() {
@Override
public boolean onException(Exception e,
Uri model,
Target<Bitmap> target,
boolean isFirstResource) {
Timber.e(e, " onException ");
return false;
}
@Override
public boolean onResourceReady(Bitmap resource,
Uri model,
Target<Bitmap> target,
boolean isFromMemoryCache,
boolean isFirstResource) {
Timber.d(" onResourceReady %s", url);
return false;
}
})
.into(imageView);
}
}
| {'content_hash': '02551fe2f376e2275118b8a58c84d608', 'timestamp': '', 'source': 'github', 'line_count': 65, 'max_line_length': 77, 'avg_line_length': 38.04615384615385, 'alnum_prop': 0.4779619894864537, 'repo_name': 'VladislavNikolaev/getvideo-at-android', 'id': '3b466ca0ffe650fc0dd0323bc2848428f9f22fc9', 'size': '2473', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'app/src/main/java/com/zvapps/getvideoat/utils/databinding/ImageDataBindingAdapters.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Java', 'bytes': '37723'}]} |
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2019 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. -->
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:width="2dp"
android:color="@color/modern_blue_300" />
<corners android:radius="@dimen/tab_list_card_radius" />
</shape> | {'content_hash': '3c39cd84053bbf48ca98ee572ceae859', 'timestamp': '', 'source': 'github', 'line_count': 11, 'max_line_length': 75, 'avg_line_length': 40.09090909090909, 'alnum_prop': 0.6757369614512472, 'repo_name': 'scheib/chromium', 'id': 'df570d9c5d40274fc33f06cbed8bb412b38ec5b7', 'size': '441', 'binary': False, 'copies': '3', 'ref': 'refs/heads/main', 'path': 'chrome/android/features/tab_ui/java/res/drawable/selected_tab_background_incognito.xml', 'mode': '33188', 'license': 'bsd-3-clause', 'language': []} |
#ifndef _FCNTL_H
# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
#endif
#include <bits/wordsize.h>
#define O_APPEND 0x0008
#define O_ASYNC 0x0040
#define O_CREAT 0x0200 /* not fcntl */
#define O_TRUNC 0x0400 /* not fcntl */
#define O_EXCL 0x0800 /* not fcntl */
#define O_SYNC 0x802000
#define O_NONBLOCK 0x4000
#define O_NDELAY (0x0004 | O_NONBLOCK)
#define O_NOCTTY 0x8000 /* not fcntl */
#define __O_DIRECTORY 0x10000 /* must be a directory */
#define __O_NOFOLLOW 0x20000 /* don't follow links */
#define __O_CLOEXEC 0x400000 /* Set close_on_exit. */
#define __O_DIRECT 0x100000 /* direct disk access hint */
#define __O_NOATIME 0x200000 /* Do not set atime. */
#define __O_PATH 0x1000000 /* Resolve pathname but do not open file. */
#define __O_TMPFILE 0x2010000 /* Atomically create nameless file. */
#if __WORDSIZE == 64
# define __O_LARGEFILE 0
#else
# define __O_LARGEFILE 0x40000
#endif
#define __O_DSYNC 0x2000 /* Synchronize data. */
#define __F_GETOWN 5 /* Get owner (process receiving SIGIO). */
#define __F_SETOWN 6 /* Set owner (process receiving SIGIO). */
#ifndef __USE_FILE_OFFSET64
# define F_GETLK 7 /* Get record locking info. */
# define F_SETLK 8 /* Set record locking info (non-blocking). */
# define F_SETLKW 9 /* Set record locking info (blocking). */
#endif
#if __WORDSIZE == 64
# define F_GETLK64 7 /* Get record locking info. */
# define F_SETLK64 8 /* Set record locking info (non-blocking). */
# define F_SETLKW64 9 /* Set record locking info (blocking). */
#endif
/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
#define F_RDLCK 1 /* Read lock. */
#define F_WRLCK 2 /* Write lock. */
#define F_UNLCK 3 /* Remove lock. */
struct flock
{
short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
#ifndef __USE_FILE_OFFSET64
__off_t l_start; /* Offset where the lock begins. */
__off_t l_len; /* Size of the locked area; zero means until EOF. */
#else
__off64_t l_start; /* Offset where the lock begins. */
__off64_t l_len; /* Size of the locked area; zero means until EOF. */
#endif
__pid_t l_pid; /* Process holding the lock. */
short int __glibc_reserved;
};
#ifdef __USE_LARGEFILE64
struct flock64
{
short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
__off64_t l_start; /* Offset where the lock begins. */
__off64_t l_len; /* Size of the locked area; zero means until EOF. */
__pid_t l_pid; /* Process holding the lock. */
short int __glibc_reserved;
};
#endif
/* Include generic Linux declarations. */
#include <bits/fcntl-linux.h> | {'content_hash': 'fb648275a9901141419e2fa17b96674a', 'timestamp': '', 'source': 'github', 'line_count': 85, 'max_line_length': 77, 'avg_line_length': 33.129411764705885, 'alnum_prop': 0.6466619318181818, 'repo_name': 'zig-lang/zig', 'id': 'd5009f12339d79a040246da5c912e8b2447c9837', 'size': '3650', 'binary': False, 'copies': '4', 'ref': 'refs/heads/master', 'path': 'lib/libc/include/sparc-linux-gnu/bits/fcntl.h', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Batchfile', 'bytes': '1667'}, {'name': 'C', 'bytes': '3162495'}, {'name': 'C++', 'bytes': '5842697'}, {'name': 'CMake', 'bytes': '35711'}, {'name': 'Shell', 'bytes': '1643'}]} |
package ucenter
import (
"github.com/atnet/gof/web"
"github.com/atnet/gof/web/mvc"
"go2o/src/app/util"
)
var (
routes *mvc.Route = mvc.NewRoute(nil)
moRoutes *mvc.Route = mvc.NewRoute(nil)
)
func GetRouter() *mvc.Route {
return moRoutes
}
//处理请求
func Handle(ctx *web.Context) {
switch util.GetBrownerDevice(ctx) {
default:
case util.DevicePC:
ctx.Items["device_view_dir"] = "pc"
routes.Handle(ctx)
case util.DeviceTouchPad, util.DeviceMobile:
ctx.Items["device_view_dir"] = "touchpad"
moRoutes.Handle(ctx)
case util.DeviceAppEmbed:
ctx.Items["device_view_dir"] = "app_embed"
routes.Handle(ctx)
}
}
func registerRoutes() {
mc := &mainC{}
bc := &basicC{}
oc := &orderC{}
ac := &accountC{}
lc := &loginC{}
routes.Register("main", mc)
routes.Register("basic", bc)
routes.Register("order", oc)
routes.Register("account", ac)
routes.Register("login", lc)
routes.Add("/logout", mc.Logout)
routes.Add("/", mc.Index)
routes.Add("/static/*", util.HttpStaticFileHandler)
// 注册触屏版路由
moRoutes.Register("main", mc)
moRoutes.Register("basic", bc)
moRoutes.Register("order", oc)
moRoutes.Register("account", ac)
moRoutes.Register("login", lc)
moRoutes.Add("/logout", mc.Logout)
moRoutes.Add("/", mc.Index)
// 为了使用IconFont
moRoutes.Add("/static/*", util.HttpStaticFileHandler)
}
func init() {
registerRoutes()
}
| {'content_hash': '46820b2e69fa4b54aaef28b8ed06ef7d', 'timestamp': '', 'source': 'github', 'line_count': 66, 'max_line_length': 54, 'avg_line_length': 20.53030303030303, 'alnum_prop': 0.6833948339483394, 'repo_name': 'henrylee2cn/go2o', 'id': 'b166f074cf68858a8cc51d00bc0a0874b22460b9', 'size': '1511', 'binary': False, 'copies': '3', 'ref': 'refs/heads/master', 'path': 'src/app/front/ucenter/route.go', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'ASP', 'bytes': '162'}, {'name': 'CSS', 'bytes': '375133'}, {'name': 'Go', 'bytes': '633225'}, {'name': 'HTML', 'bytes': '376060'}, {'name': 'JavaScript', 'bytes': '234044'}]} |
import PropTypes from 'prop-types';
export const directionType = PropTypes.oneOf([
'normal',
'reverse',
'alternate',
'alternate-reverse',
]);
export const fillModeType = PropTypes.oneOf([
'none',
'forwards',
'backwards',
'both',
]);
export const timeType = PropTypes.oneOfType([
PropTypes.number,
PropTypes.string,
]);
| {'content_hash': 'cdcc19fdb62cb10672b79915d6e61c52', 'timestamp': '', 'source': 'github', 'line_count': 20, 'max_line_length': 46, 'avg_line_length': 17.1, 'alnum_prop': 0.6812865497076024, 'repo_name': 'jacobbuck/react-css-animation-group', 'id': 'ec446a3490c2cfd97333980d18162feeef835747', 'size': '342', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/utils/propTypes.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'JavaScript', 'bytes': '6644'}]} |
/// <reference types="node"/>
/**
Show cursor.
@param stream - Default: `process.stderr`.
@example
```
import * as cliCursor from 'cli-cursor';
cliCursor.show();
```
*/
export function show(stream?: NodeJS.WritableStream): void;
/**
Hide cursor.
@param stream - Default: `process.stderr`.
@example
```
import * as cliCursor from 'cli-cursor';
cliCursor.hide();
```
*/
export function hide(stream?: NodeJS.WritableStream): void;
/**
Toggle cursor visibility.
@param force - Is useful to show or hide the cursor based on a boolean.
@param stream - Default: `process.stderr`.
@example
```
import * as cliCursor from 'cli-cursor';
const unicornsAreAwesome = true;
cliCursor.toggle(unicornsAreAwesome);
```
*/
export function toggle(force?: boolean, stream?: NodeJS.WritableStream): void;
| {'content_hash': 'c7be494b08a80578f1806b48de3b1f01', 'timestamp': '', 'source': 'github', 'line_count': 45, 'max_line_length': 78, 'avg_line_length': 17.68888888888889, 'alnum_prop': 0.7060301507537688, 'repo_name': 'jpoeng/jpoeng.github.io', 'id': '2b252d054afe02d38c8836aafd58a6f83f619d34', 'size': '796', 'binary': False, 'copies': '18', 'ref': 'refs/heads/master', 'path': 'node_modules/ink/node_modules/cli-cursor/index.d.ts', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '5765'}, {'name': 'HTML', 'bytes': '53947'}, {'name': 'JavaScript', 'bytes': '1885'}, {'name': 'PHP', 'bytes': '9773'}]} |
<?php
namespace Festival\FestivalBundle\Model;
use Festival\FestivalBundle\Model\om\BaseFestivalLocationContentQuery;
class FestivalLocationContentQuery extends BaseFestivalLocationContentQuery
{
}
| {'content_hash': '5d7fd3caa4dca93ca6f431e337fd4162', 'timestamp': '', 'source': 'github', 'line_count': 9, 'max_line_length': 75, 'avg_line_length': 22.333333333333332, 'alnum_prop': 0.8706467661691543, 'repo_name': 'devrantukan/symfony', 'id': '3e1e32946c0fadf3e248eef98730f9de23f7a52a', 'size': '201', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/Festival/FestivalBundle/Model/FestivalLocationContentQuery.php', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'JavaScript', 'bytes': '89814'}, {'name': 'PHP', 'bytes': '1210940'}, {'name': 'Perl', 'bytes': '1569'}, {'name': 'Ruby', 'bytes': '1514'}, {'name': 'Shell', 'bytes': '214'}]} |
/*
* (c) 2016-2018 Adobe. All rights reserved.
* This file is licensed 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 REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package cloudformation
import "github.com/adobe-platform/porter/cfn"
type (
WaitConditionHandle struct {
cfn.Resource
}
)
func NewWaitConditionHandle() WaitConditionHandle {
return WaitConditionHandle{
Resource: cfn.Resource{
Type: "AWS::CloudFormation::WaitConditionHandle",
},
}
}
| {'content_hash': '46f0f2e9dc1854494c53ebacd446278b', 'timestamp': '', 'source': 'github', 'line_count': 28, 'max_line_length': 89, 'avg_line_length': 32.785714285714285, 'alnum_prop': 0.7559912854030502, 'repo_name': 'adobe-platform/porter', 'id': '2c46dbb21b414857a66f93a15c911a38f978af3a', 'size': '918', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'cfn/cloudformation/wait_condition_handle.go', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Dockerfile', 'bytes': '229'}, {'name': 'Go', 'bytes': '432035'}, {'name': 'Makefile', 'bytes': '2939'}, {'name': 'Perl', 'bytes': '4557'}, {'name': 'Python', 'bytes': '531'}, {'name': 'Shell', 'bytes': '5065'}]} |
<h3>Put your application code here.</h3>
Examples include
<ul>
<li>Functional area specific web page Classes</li>
<li>Webflow Classes which string web pages and other actions together</li>
<li>Helper Classes which you intend to leverage in your test code</li>
</ul>
Delete this file once you understand what to do. | {'content_hash': 'e0f0019c325e9750dc6f24cbf40db13b', 'timestamp': '', 'source': 'github', 'line_count': 10, 'max_line_length': 74, 'avg_line_length': 31.7, 'alnum_prop': 0.7665615141955836, 'repo_name': 'ILikeToNguyen/SeLion', 'id': '4eb8dc00fae803a8d5e0bbcdc2b24dbe2bbdcca9', 'size': '317', 'binary': False, 'copies': '4', 'ref': 'refs/heads/develop', 'path': 'archetype/src/main/resources/archetype-resources/src/main/java/README.html', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '48114'}, {'name': 'HTML', 'bytes': '64965'}, {'name': 'Java', 'bytes': '2688857'}, {'name': 'JavaScript', 'bytes': '136322'}, {'name': 'Objective-C', 'bytes': '24249'}, {'name': 'Shell', 'bytes': '4207'}]} |
package org.pac4j.core.profile.converter;
import java.util.Locale;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* This class tests the {@link org.pac4j.core.profile.converter.LocaleConverter} class.
*
* @author Jerome Leleu
* @since 1.0.0
*/
public final class LocaleConverterTests {
private final LocaleConverter converter = new LocaleConverter();
@Test
public void testNull() {
assertNull(this.converter.convert(null));
}
@Test
public void testNotAString() {
assertNull(this.converter.convert(Boolean.TRUE));
}
@Test
public void testLanguage() {
final Locale locale = this.converter.convert("fr");
assertEquals("fr", locale.getLanguage());
}
@Test
public void testLanguageCountry() {
final Locale locale = this.converter.convert(Locale.FRANCE.toString());
assertEquals(Locale.FRANCE.getLanguage(), locale.getLanguage());
assertEquals(Locale.FRANCE.getCountry(), locale.getCountry());
}
@Test
public void testBadLocale() {
assertNull(this.converter.convert("1_2_3"));
}
}
| {'content_hash': '04a908a8906194d4f73ff812a458d8d9', 'timestamp': '', 'source': 'github', 'line_count': 46, 'max_line_length': 87, 'avg_line_length': 24.717391304347824, 'alnum_prop': 0.6649076517150396, 'repo_name': 'zawn/pac4j', 'id': '35cf8fd3e96868c235a3f6bfaa6a3990c87bb3fd', 'size': '1137', 'binary': False, 'copies': '6', 'ref': 'refs/heads/master', 'path': 'pac4j-core/src/test/java/org/pac4j/core/profile/converter/LocaleConverterTests.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Java', 'bytes': '1980245'}, {'name': 'Shell', 'bytes': '2446'}]} |
import onetime from 'onetime'
export const getApiToken: () => string = onetime(
(): string => {
const meta: HTMLMetaElement = (document.querySelector(
'meta[name="apitoken"]'
): any)
const apiTokenContent = meta.content
const parsedApiTokenContent = JSON.parse(apiTokenContent)
return parsedApiTokenContent.token
}
)
export const getMainBranch: () => string = onetime(
(): string =>
JSON.parse((document.body || {}).dataset.currentRepo).mainbranch.name
)
export function getFirstFileContents(
localUrls: string[],
externalUrl: string
): Promise<string | void> {
const requests = localUrls.map(url =>
fetch(url, { credentials: 'include' })
)
if (externalUrl) {
requests.push(fetch(externalUrl))
}
return getFirstSuccessfulResponseText(requests)
}
export async function getFirstSuccessfulResponseText(
requests: Promise<Response>[]
): Promise<string | void> {
const responses: Array<
| Response
| {
ok: false,
error: any,
}
> = await Promise.all(
requests.map(p => p.catch(error => ({ ok: false, error })))
)
const firstSuccessfulResponse = responses.find(response => response.ok)
if (firstSuccessfulResponse && firstSuccessfulResponse.ok) {
return firstSuccessfulResponse.text()
}
}
| {'content_hash': '3219de86a9c17f00fa0f29c4178b9476', 'timestamp': '', 'source': 'github', 'line_count': 51, 'max_line_length': 77, 'avg_line_length': 27.50980392156863, 'alnum_prop': 0.6293656450463293, 'repo_name': 'andremw/refined-bitbucket', 'id': '452601fe55e33f67874da26ca560eb987d635981', 'size': '1413', 'binary': False, 'copies': '1', 'ref': 'refs/heads/dev', 'path': 'src/utils.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '28'}, {'name': 'HTML', 'bytes': '790'}, {'name': 'JavaScript', 'bytes': '28183'}]} |
set -e
echo Installing master packages.
yum -y install policycoreutils-python
# Disable SELinux until we figure out services start
echo -e 'SELINUX=permissive\nSELINUXTYPE=targeted\n' >/etc/sysconfig/selinux
/sbin/setenforce 0
if [ ! -e /etc/yum.repos.d/treadmill.repo ]; then
curl -L https://s3.amazonaws.com/yum_repo_dev/treadmill.repo -o /etc/yum.repos.d/treadmill.repo
fi
# Install S6, pid1, Java and zookeeper
yum install s6 execline treadmill-pid1 java zookeeper --nogpgcheck -y
| {'content_hash': '3df6c1560155367770fefc17dbe1f241', 'timestamp': '', 'source': 'github', 'line_count': 16, 'max_line_length': 99, 'avg_line_length': 30.875, 'alnum_prop': 0.7631578947368421, 'repo_name': 'Morgan-Stanley/treadmill', 'id': '957d5c825e0a300f1898cebcf54bc95ab446559a', 'size': '507', 'binary': False, 'copies': '5', 'ref': 'refs/heads/master', 'path': 'vagrant/scripts/install-master-packages.sh', 'mode': '33261', 'license': 'apache-2.0', 'language': [{'name': 'PowerShell', 'bytes': '3750'}, {'name': 'Python', 'bytes': '3372983'}, {'name': 'Ruby', 'bytes': '3712'}, {'name': 'Shell', 'bytes': '51646'}]} |
SELECT G.gid, U.username, G.score, G.message, G.timestamp
FROM (
SELECT *
FROM grades
WHERE (grades.aid=:aid)
) AS G
JOIN (
SELECT *
FROM users
) AS U
ON G.uid=U.uid
ORDER BY G.gid ASC
| {'content_hash': '8f5b452126ac8d9086c00e1118f5a2f8', 'timestamp': '', 'source': 'github', 'line_count': 12, 'max_line_length': 57, 'avg_line_length': 15.833333333333334, 'alnum_prop': 0.6789473684210526, 'repo_name': 'xtfc/pyboard2', 'id': '06ab2cda02d813e90bdba8f6e61089405c15557c', 'size': '190', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'sql/grades_aid.sql', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '482'}, {'name': 'JavaScript', 'bytes': '1004'}, {'name': 'Python', 'bytes': '9536'}]} |
// Generated by xsd compiler for android/java
// DO NOT CHANGE!
package ebay.apis.eblbasecomponents;
import java.io.Serializable;
import com.leansoft.nano.annotation.*;
/**
*
* Product ID has an attribute of ProductIDCodeType and a string value.
*
*/
public class ProductIDType implements Serializable {
private static final long serialVersionUID = -1L;
@Value
@Order(value=0)
public String value;
@Attribute
@Order(value=1)
public ProductIDCodeType type;
} | {'content_hash': '37b01e4b9687ee50346abcc6e5f6e14b', 'timestamp': '', 'source': 'github', 'line_count': 26, 'max_line_length': 71, 'avg_line_length': 18.846153846153847, 'alnum_prop': 0.7285714285714285, 'repo_name': 'uaraven/nano', 'id': '724644cedea5c5abd3d5c8dba09e795277369841', 'size': '490', 'binary': False, 'copies': '3', 'ref': 'refs/heads/master', 'path': 'sample/webservice/HelloeBayShopping/src/ebay/apis/eblbasecomponents/ProductIDType.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Java', 'bytes': '5048934'}]} |
'use strict';
// Windows 7-style window-based overscrolling
// These "magic" numbers come from the image assets that this demo is built with.
// There's nothing special about them.
var parentHeight = 550;
var windowWidth = 470;
var windowHeight = 427;
var contentWidth = 450;//427;
var contentHeight = (640/427) * 450;
var windowTop = (parentHeight - windowHeight) / 2;
var contentArea = { x: 10, y: 47, width: 450, height: 370 };
var windowsOverscrollExample = {
// Outer box is the actual window.
box: {
id: "win",
className: "window",
children: [
{
// Inside the window is the clip.
id: "clip",
className: "clip",
children: [
{
// Inside the clip is the content, which is an image.
id: "content",
className: "image"
}
]
}
]
},
constraints: [
// Position the outer window. All of the x values (left, right) in this example are static.
"win.left == 0",
"win.right == " + windowWidth,
"win.top == " + windowTop,
"win.bottom == win.top + " + windowHeight,
// Position the clipping layer. It just occupies the "content area" of the window and has
// an "overflow: hidden" style applied.
"clip.left == " + contentArea.x,
"clip.right == " + (contentArea.x + contentArea.width),
"clip.top == win.top + " + contentArea.y,
"clip.bottom == win.top + " + (contentArea.y + contentArea.height),
// Position the content, the image.
"content.left == " + contentArea.x,
"content.right == " + (contentArea.x + contentArea.width),
// The image can't go past the top of the clip, this is enforced with a linear constraint
// so the clip will move if the content is moved (and the window will move too, because it's
// also attached).
"content.top <= clip.top",
// The image can't go past the clip's bottom; the clip will move so that the image's bottom
// and the clip's bottom stay touching.
"content.bottom >= clip.bottom",
// Specify the height of the image.
"content.bottom == content.top + " + contentHeight,
// Specify a default start position for the image.
"content.top == " + (contentArea.y + windowTop)
],
motionConstraints: [
// Our only motion constraint is that the window's top stays where we started it.
{ lhs: "win.top", op: "==", rhs: windowTop }
],
manipulators: [
// The manipulator moves the image's top up and down.
{ variable: "content.top", box: "win", axis: "y" }
]
}
function makeDeclarativeWindows7Overscroll(parentElement) {
Slalom.Serialization.assemble(windowsOverscrollExample, parentElement);
}
makeDeclarativeWindows7Overscroll(document.getElementById('win7-overscroll-example'));
| {'content_hash': 'd14e07efc9b79c489c7ab2a1be0f4bf8', 'timestamp': '', 'source': 'github', 'line_count': 82, 'max_line_length': 100, 'avg_line_length': 36.91463414634146, 'alnum_prop': 0.582424843078956, 'repo_name': 'iamralpht/slalom', 'id': '4443666dabe13dd22e6b8d43dab095b870569b48', 'size': '3585', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'examples/Windows7Overscroll/win7overscroll.js', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '7025'}, {'name': 'HTML', 'bytes': '15648'}, {'name': 'JavaScript', 'bytes': '186259'}, {'name': 'Shell', 'bytes': '129'}]} |
// Type definitions for serve-favicon 2.2.0
// Project: https://github.com/expressjs/serve-favicon
// Definitions by: Uros Smolnik <https://github.com/urossmolnik>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
/* =================== USAGE ===================
import serveFavicon = require('serve-favicon');
app.use(serveFavicon(__dirname + '/public/favicon.ico'));
=============================================== */
import express = require('express');
/**
* Node.js middleware for serving a favicon.
*/
declare function serveFavicon(path: string, options?: {
/**
* The cache-control max-age directive in ms, defaulting to 1 day. This can also be a string accepted by the ms module.
*/
maxAge?: number;
}): express.RequestHandler;
declare namespace serveFavicon { }
export = serveFavicon;
| {'content_hash': '716e9188d3364a7adb93ab1377f2eede', 'timestamp': '', 'source': 'github', 'line_count': 31, 'max_line_length': 122, 'avg_line_length': 28.193548387096776, 'alnum_prop': 0.6361556064073226, 'repo_name': 'magny/DefinitelyTyped', 'id': '005769b80527a54ee972eb48516603f1bbc92514', 'size': '874', 'binary': False, 'copies': '68', 'ref': 'refs/heads/master', 'path': 'types/serve-favicon/index.d.ts', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'HTML', 'bytes': '308'}, {'name': 'Protocol Buffer', 'bytes': '678'}, {'name': 'TypeScript', 'bytes': '23361616'}]} |
package org.apache.polygene.tutorials.composites.tutorial8;
import org.apache.polygene.api.injection.scope.This;
// START SNIPPET: solution
/**
* This is the implementation of the HelloWorld
* behaviour interface.
* <p>
* This version access the state using Polygene Properties.
* </p>
*/
public class HelloWorldBehaviourMixin
implements HelloWorldBehaviour
{
@This
HelloWorldState state;
@Override
public String say()
{
return state.phrase().get() + " " + state.name().get();
}
}
// END SNIPPET: solution
| {'content_hash': '339f4a40ecf7b66dfae789655e99bebc', 'timestamp': '', 'source': 'github', 'line_count': 27, 'max_line_length': 63, 'avg_line_length': 20.48148148148148, 'alnum_prop': 0.6925858951175407, 'repo_name': 'apache/zest-qi4j', 'id': 'caafd715748b216983ec580603ea786f9843c7dd', 'size': '1378', 'binary': False, 'copies': '3', 'ref': 'refs/heads/master', 'path': 'tutorials/composites/src/main/java/org/apache/polygene/tutorials/composites/tutorial8/HelloWorldBehaviourMixin.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '46292'}, {'name': 'Groovy', 'bytes': '21752'}, {'name': 'HTML', 'bytes': '246264'}, {'name': 'Java', 'bytes': '6969784'}, {'name': 'JavaScript', 'bytes': '19790'}, {'name': 'Python', 'bytes': '6440'}, {'name': 'Scala', 'bytes': '8606'}, {'name': 'Shell', 'bytes': '1233'}, {'name': 'XSLT', 'bytes': '70993'}]} |
package org.cagrid.gaards.ui.gridgrouper.tree;
import gov.nih.nci.cagrid.common.Runner;
import gov.nih.nci.cagrid.common.Utils;
import gov.nih.nci.cagrid.gridgrouper.grouper.StemI;
import java.awt.FlowLayout;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.cagrid.gaards.ui.common.TitlePanel;
import org.cagrid.gaards.ui.gridgrouper.GridGrouperLookAndFeel;
import org.cagrid.grape.ApplicationComponent;
import org.cagrid.grape.GridApplication;
import org.cagrid.grape.utils.ErrorDialog;
/**
* @author <A HREF="MAILTO:[email protected]">Stephen Langella</A>
* @author <A HREF="MAILTO:[email protected]">Scott Oster</A>
* @author <A HREF="MAILTO:[email protected]">Shannon Hastings</A>
* @author <A HREF="MAILTO:[email protected]">David W. Ervin</A>
*/
public class AddGroupWindow extends ApplicationComponent {
private static Log log = LogFactory.getLog(AddGroupWindow.class);
private static final long serialVersionUID = 1L;
private StemTreeNode node;
private JPanel mainPanel = null;
private JLabel jLabel10 = null;
private JTextField childName = null;
private JLabel jLabel11 = null;
private JTextField childDisplayName = null;
private JButton addChildGroup = null;
private JPanel buttonPanel = null;
private JButton cancelButton = null;
private JLabel jLabel1 = null;
private JTextField gridGrouper = null;
private JLabel jLabel2 = null;
private JTextField parentStem = null;
private JPanel infoPanel = null;
private JPanel titlePanel = null;
/**
* This is the default constructor
*/
public AddGroupWindow(StemTreeNode node) {
super();
this.node = node;
initialize();
}
/**
* This method initializes this
*/
private void initialize() {
this.setSize(500, 300);
this.setContentPane(getMainPanel());
this.setTitle("Add Group");
this.setFrameIcon(GridGrouperLookAndFeel.getGroupIcon22x22());
}
/**
* This method initializes mainPanel
*
* @return javax.swing.JPanel
*/
private JPanel getMainPanel() {
if (mainPanel == null) {
GridBagConstraints gridBagConstraints8 = new GridBagConstraints();
gridBagConstraints8.gridx = 0;
gridBagConstraints8.insets = new Insets(2, 2, 2, 2);
gridBagConstraints8.fill = GridBagConstraints.HORIZONTAL;
gridBagConstraints8.weightx = 1.0D;
gridBagConstraints8.gridy = 0;
GridBagConstraints gridBagConstraints10 = new GridBagConstraints();
gridBagConstraints10.gridx = 0;
gridBagConstraints10.insets = new Insets(2, 2, 2, 2);
gridBagConstraints10.fill = GridBagConstraints.BOTH;
gridBagConstraints10.weightx = 1.0D;
gridBagConstraints10.weighty = 1.0D;
gridBagConstraints10.anchor = GridBagConstraints.WEST;
gridBagConstraints10.gridy = 1;
jLabel2 = new JLabel();
jLabel2.setText("Parent Stem");
jLabel1 = new JLabel();
jLabel1.setText("Grid Grouper");
GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
gridBagConstraints1.gridx = 0;
gridBagConstraints1.gridwidth = 1;
gridBagConstraints1.insets = new Insets(2, 2, 2, 2);
gridBagConstraints1.gridy = 2;
jLabel11 = new JLabel();
jLabel11.setText("Local Display Name");
jLabel10 = new JLabel();
jLabel10.setText("Local Name");
mainPanel = new JPanel();
mainPanel.setLayout(new GridBagLayout());
mainPanel.add(getButtonPanel(), gridBagConstraints1);
mainPanel.add(getInfoPanel(), gridBagConstraints10);
mainPanel.add(getTitlePanel(), gridBagConstraints8);
}
return mainPanel;
}
/**
* This method initializes childName
*
* @return javax.swing.JTextField
*/
private JTextField getChildName() {
if (childName == null) {
childName = new JTextField();
}
return childName;
}
/**
* This method initializes childDisplayName
*
* @return javax.swing.JTextField
*/
private JTextField getChildDisplayName() {
if (childDisplayName == null) {
childDisplayName = new JTextField();
}
return childDisplayName;
}
/**
* This method initializes addChildGroup
*
* @return javax.swing.JButton
*/
private JButton getAddChildGroup() {
if (addChildGroup == null) {
addChildGroup = new JButton();
addChildGroup.setText("Add Group");
getRootPane().setDefaultButton(addChildGroup);
addChildGroup.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
Runner runner = new Runner() {
public void execute() {
StemI stem = node.getStem();
int eid = node.getTree().startEvent("Adding a child group....");
try {
String ext = Utils.clean(childName.getText());
if (ext == null) {
ErrorDialog.showError("You must enter a local name for the group!!");
return;
}
String disExt = Utils.clean(childDisplayName.getText());
if (disExt == null) {
ErrorDialog.showError("You must enter a local display name for the group!!!");
return;
}
stem.addChildGroup(ext, disExt);
node.refresh();
node.getTree().stopEvent(eid, "Successfully added a child group!!!");
dispose();
} catch (Exception ex) {
node.getTree().stopEvent(eid, "Error adding a child group!!!");
ErrorDialog.showError(ex);
log.error(ex, ex);
}
}
};
try {
GridApplication.getContext().executeInBackground(runner);
} catch (Exception t) {
t.getMessage();
}
}
});
}
return addChildGroup;
}
/**
* This method initializes buttonPanel
*
* @return javax.swing.JPanel
*/
private JPanel getButtonPanel() {
if (buttonPanel == null) {
GridBagConstraints gridBagConstraints = new GridBagConstraints();
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
gridBagConstraints.gridx = -1;
gridBagConstraints.gridy = -1;
gridBagConstraints.gridwidth = 2;
buttonPanel = new JPanel();
buttonPanel.setLayout(new FlowLayout());
buttonPanel.add(getAddChildGroup(), null);
buttonPanel.add(getCancelButton(), null);
}
return buttonPanel;
}
/**
* This method initializes cancelButton
*
* @return javax.swing.JButton
*/
private JButton getCancelButton() {
if (cancelButton == null) {
cancelButton = new JButton();
cancelButton.setText("Cancel");
cancelButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
dispose();
}
});
}
return cancelButton;
}
/**
* This method initializes gridGrouper
*
* @return javax.swing.JTextField
*/
private JTextField getGridGrouper() {
if (gridGrouper == null) {
gridGrouper = new JTextField();
gridGrouper.setEditable(false);
gridGrouper.setText(node.getGridGrouper().getName());
}
return gridGrouper;
}
/**
* This method initializes parentStem
*
* @return javax.swing.JTextField
*/
private JTextField getParentStem() {
if (parentStem == null) {
parentStem = new JTextField();
parentStem.setEditable(false);
parentStem.setText(this.node.getStem().getDisplayName());
}
return parentStem;
}
/**
* This method initializes infoPanel
*
* @return javax.swing.JPanel
*/
private JPanel getInfoPanel() {
if (infoPanel == null) {
GridBagConstraints gridBagConstraints12 = new GridBagConstraints();
gridBagConstraints12.anchor = GridBagConstraints.WEST;
gridBagConstraints12.insets = new Insets(2, 2, 2, 2);
gridBagConstraints12.gridx = 1;
gridBagConstraints12.gridy = 3;
gridBagConstraints12.weightx = 1.0;
gridBagConstraints12.fill = GridBagConstraints.HORIZONTAL;
GridBagConstraints gridBagConstraints11 = new GridBagConstraints();
gridBagConstraints11.anchor = GridBagConstraints.WEST;
gridBagConstraints11.gridx = 0;
gridBagConstraints11.gridy = 3;
gridBagConstraints11.insets = new Insets(2, 2, 2, 2);
GridBagConstraints gridBagConstraints7 = new GridBagConstraints();
gridBagConstraints7.anchor = GridBagConstraints.WEST;
gridBagConstraints7.insets = new Insets(2, 2, 2, 2);
gridBagConstraints7.gridx = 1;
gridBagConstraints7.gridy = 2;
gridBagConstraints7.weightx = 1.0;
gridBagConstraints7.fill = GridBagConstraints.HORIZONTAL;
GridBagConstraints gridBagConstraints6 = new GridBagConstraints();
gridBagConstraints6.anchor = GridBagConstraints.WEST;
gridBagConstraints6.gridx = 0;
gridBagConstraints6.gridy = 2;
gridBagConstraints6.insets = new Insets(2, 2, 2, 2);
GridBagConstraints gridBagConstraints3 = new GridBagConstraints();
gridBagConstraints3.fill = GridBagConstraints.HORIZONTAL;
gridBagConstraints3.gridx = 1;
gridBagConstraints3.gridy = 1;
gridBagConstraints3.weightx = 1.0;
gridBagConstraints3.anchor = GridBagConstraints.WEST;
gridBagConstraints3.insets = new Insets(2, 2, 2, 2);
GridBagConstraints gridBagConstraints2 = new GridBagConstraints();
gridBagConstraints2.anchor = GridBagConstraints.WEST;
gridBagConstraints2.gridx = 0;
gridBagConstraints2.gridy = 1;
gridBagConstraints2.insets = new Insets(2, 2, 2, 2);
GridBagConstraints gridBagConstraints5 = new GridBagConstraints();
gridBagConstraints5.anchor = GridBagConstraints.WEST;
gridBagConstraints5.insets = new Insets(2, 2, 2, 2);
gridBagConstraints5.gridx = 1;
gridBagConstraints5.gridy = 0;
gridBagConstraints5.weightx = 1.0;
gridBagConstraints5.fill = GridBagConstraints.HORIZONTAL;
GridBagConstraints gridBagConstraints4 = new GridBagConstraints();
gridBagConstraints4.anchor = GridBagConstraints.WEST;
gridBagConstraints4.gridx = 0;
gridBagConstraints4.gridy = 0;
gridBagConstraints4.insets = new Insets(2, 2, 2, 2);
infoPanel = new JPanel();
infoPanel.setLayout(new GridBagLayout());
infoPanel.add(jLabel1, gridBagConstraints4);
infoPanel.add(getGridGrouper(), gridBagConstraints5);
infoPanel.add(jLabel2, gridBagConstraints2);
infoPanel.add(getParentStem(), gridBagConstraints3);
infoPanel.add(jLabel10, gridBagConstraints6);
infoPanel.add(getChildName(), gridBagConstraints7);
infoPanel.add(jLabel11, gridBagConstraints11);
infoPanel.add(getChildDisplayName(), gridBagConstraints12);
}
return infoPanel;
}
/**
* This method initializes titlePanel
*
* @return javax.swing.JPanel
*/
private JPanel getTitlePanel() {
if (titlePanel == null) {
titlePanel = new TitlePanel("Add Group","Add a group to GridGrouper.");
}
return titlePanel;
}
}
| {'content_hash': 'cf8d6ecfefe36ff51ad59cf1dd11adc4', 'timestamp': '', 'source': 'github', 'line_count': 365, 'max_line_length': 114, 'avg_line_length': 35.61917808219178, 'alnum_prop': 0.5904161218367818, 'repo_name': 'NCIP/cagrid', 'id': 'c6a3e5de1072252bf3a195a6a43a491bf1be5a4e', 'size': '13001', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'cagrid/Software/core/caGrid/projects/gaards-ui/src/org/cagrid/gaards/ui/gridgrouper/tree/AddGroupWindow.java', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'CSS', 'bytes': '438360'}, {'name': 'Java', 'bytes': '25536538'}, {'name': 'JavaScript', 'bytes': '265984'}, {'name': 'Perl', 'bytes': '115674'}, {'name': 'Scala', 'bytes': '405'}, {'name': 'Shell', 'bytes': '85928'}, {'name': 'XSLT', 'bytes': '75865'}]} |
cd tests/test-recipes/test-package
python setup.py install
| {'content_hash': '150090d4e2e4bef0b74b6210b6770b4f', 'timestamp': '', 'source': 'github', 'line_count': 3, 'max_line_length': 34, 'avg_line_length': 20.0, 'alnum_prop': 0.8166666666666667, 'repo_name': 'rmcgibbo/conda-build', 'id': '44b5192a539973f552991266cbf6b5fe03fa9767', 'size': '60', 'binary': False, 'copies': '18', 'ref': 'refs/heads/master', 'path': 'tests/test-recipes/metadata/entry_points/build.sh', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'Batchfile', 'bytes': '4537'}, {'name': 'JavaScript', 'bytes': '10'}, {'name': 'Python', 'bytes': '369289'}, {'name': 'Shell', 'bytes': '7751'}]} |
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
var _hasOwn = Object.prototype.hasOwnProperty;
var _renderArbitrary = function _renderArbitrary(child) {
var type = _typeof(child);
if (type === "number" || type === "string" || type === "object" && child instanceof String) {
text(child);
} else if (Array.isArray(child)) {
for (var i = 0; i < child.length; i++) {
_renderArbitrary(child[i]);
}
} else if (type === "object") {
if (child.__jsxDOMWrapper) {
var func = child.func,
args = child.args;
if (args) {
func.apply(this, args);
} else {
func();
}
} else if (String(child) === "[object Object]") {
for (var prop in child) {
if (_hasOwn.call(child, i)) _renderArbitrary(child[i]);
}
}
}
};
function render() {
elementOpen("div");
elementOpen("div");
_renderArbitrary(data.message);
elementClose("div");
return elementClose("div");
} | {'content_hash': '84ad04468673793baa083aeb70873354', 'timestamp': '', 'source': 'github', 'line_count': 40, 'max_line_length': 351, 'avg_line_length': 31.625, 'alnum_prop': 0.5857707509881422, 'repo_name': 'jridgewell/babel-plugin-transform-incremental-dom', 'id': '2eee1bfac629c811e4104162810d427b970d32f0', 'size': '1265', 'binary': False, 'copies': '3', 'ref': 'refs/heads/master', 'path': 'test/fixtures/expression/nested-object-property/expected.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'JavaScript', 'bytes': '56557'}]} |
<?php declare(strict_types=1);
namespace PhpParser\Node\Expr\BinaryOp;
use PhpParser\Node\Expr\BinaryOp;
class LogicalAnd extends BinaryOp
{
public function getOperatorSigil() : string {
return 'and';
}
public function getType() : string {
return 'Expr_BinaryOp_LogicalAnd';
}
}
| {'content_hash': '75d645c94593a47ff68c99296edd579b', 'timestamp': '', 'source': 'github', 'line_count': 16, 'max_line_length': 49, 'avg_line_length': 19.9375, 'alnum_prop': 0.670846394984326, 'repo_name': 'cloudfoundry/php-buildpack', 'id': '2a3afd548f1b87716bd514a1d8fb76ac121ff468', 'size': '319', 'binary': False, 'copies': '40', 'ref': 'refs/heads/master', 'path': 'fixtures/symfony_5_local_deps/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Batchfile', 'bytes': '1724'}, {'name': 'CSS', 'bytes': '27696'}, {'name': 'Go', 'bytes': '73324'}, {'name': 'HTML', 'bytes': '24121'}, {'name': 'JavaScript', 'bytes': '20500'}, {'name': 'Makefile', 'bytes': '295'}, {'name': 'PHP', 'bytes': '541348'}, {'name': 'Python', 'bytes': '584757'}, {'name': 'Ruby', 'bytes': '1102'}, {'name': 'SCSS', 'bytes': '15480'}, {'name': 'Shell', 'bytes': '20264'}, {'name': 'Smalltalk', 'bytes': '8'}, {'name': 'Twig', 'bytes': '86464'}]} |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>mathcomp-character: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel="stylesheet">
<link href="../../../../../bootstrap-custom.css" rel="stylesheet">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<script src="../../../../../moment.min.js"></script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<div class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="../..">clean / released</a></li>
<li class="active"><a href="">8.13.2 / mathcomp-character - 1.11.0</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
mathcomp-character
<small>
1.11.0
<span class="label label-info">Not compatible 👼</span>
</small>
</h1>
<p>📅 <em><script>document.write(moment("2022-10-06 11:12:50 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-10-06 11:12:50 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-threads base
base-unix base
conf-findutils 1 Virtual package relying on findutils
conf-gmp 4 Virtual package relying on a GMP lib system installation
coq 8.13.2 Formal proof management system
num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.06.1 The OCaml compiler (virtual package)
ocaml-base-compiler 4.06.1 Official 4.06.1 release
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.5 A library manager for OCaml
zarith 1.12 Implements arithmetic and logical operations over arbitrary-precision integers
# opam file:
opam-version: "2.0"
maintainer: "Mathematical Components <[email protected]>"
homepage: "https://math-comp.github.io/"
bug-reports: "https://github.com/math-comp/math-comp/issues"
dev-repo: "git+https://github.com/math-comp/math-comp.git"
license: "CECILL-B"
build: [ make "-C" "mathcomp/character" "-j" "%{jobs}%" ]
install: [ make "-C" "mathcomp/character" "install" ]
depends: [ "coq-mathcomp-field" { = version } ]
tags: [ "keyword:algebra" "keyword:character" "keyword:small scale reflection" "keyword:mathematical components" "keyword:odd order theorem" "logpath:mathcomp.character" ]
authors: [ "Jeremy Avigad <>" "Andrea Asperti <>" "Stephane Le Roux <>" "Yves Bertot <>" "Laurence Rideau <>" "Enrico Tassi <>" "Ioana Pasca <>" "Georges Gonthier <>" "Sidi Ould Biha <>" "Cyril Cohen <>" "Francois Garillot <>" "Alexey Solovyev <>" "Russell O'Connor <>" "Laurent Théry <>" "Assia Mahboubi <>" ]
synopsis: "Mathematical Components Library on character theory"
description:"""
This library contains definitions and theorems about group
representations, characters and class functions.
"""
url {
src: "https://github.com/math-comp/math-comp/archive/mathcomp-1.11.0.tar.gz"
checksum: "sha256=b16108320f77d15dd19ecc5aad90775b576edfa50c971682a1a439f6d364fef6"
}
</pre>
<h2>Lint</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Dry install 🏜️</h2>
<p>Dry install with the current Coq version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam install -y --show-action coq-mathcomp-character.1.11.0 coq.8.13.2</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.13.2).
The following dependencies couldn't be met:
- coq-mathcomp-character -> coq-mathcomp-field = 1.11.0 -> coq-mathcomp-solvable = 1.11.0 -> coq-mathcomp-algebra = 1.11.0 -> coq-mathcomp-fingroup = 1.11.0 -> coq-mathcomp-ssreflect = 1.11.0 -> coq < 8.13~ -> ocaml < 4.06.0
base of this switch (use `--unlock-base' to force)
Your request can't be satisfied:
- No available version of coq satisfies the constraints
No solution found, exiting
</pre></dd>
</dl>
<p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-mathcomp-character.1.11.0</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install 🚀</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Missing removes</dt>
<dd>
none
</dd>
<dt>Wrong removes</dt>
<dd>
none
</dd>
</dl>
</div>
</div>
</div>
<hr/>
<div class="footer">
<p class="text-center">
Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
| {'content_hash': '029c918fe9cb57fbcef2f90f4cc47ce3', 'timestamp': '', 'source': 'github', 'line_count': 162, 'max_line_length': 554, 'avg_line_length': 48.48765432098765, 'alnum_prop': 0.5672819859961807, 'repo_name': 'coq-bench/coq-bench.github.io', 'id': '58c2d752f2b91489aa0684b37aae5e1c42d5dd29', 'size': '7881', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'clean/Linux-x86_64-4.06.1-2.0.5/released/8.13.2/mathcomp-character/1.11.0.html', 'mode': '33188', 'license': 'mit', 'language': []} |
namespace {
PW_TRACE_TIME_TYPE time_counter = 0;
} // namespace
// Define trace time as a counter for tests.
PW_TRACE_TIME_TYPE pw_trace_GetTraceTime() { return time_counter++; }
// Return 1 for ticks per second, as it doesn't apply to fake timer.
size_t pw_trace_GetTraceTimeTicksPerSecond() { return 1; }
void pw_trace_ResetFakeTraceTimer() { time_counter = 0; }
| {'content_hash': '4749cb5bff8fafd8787b07b155cb374e', 'timestamp': '', 'source': 'github', 'line_count': 13, 'max_line_length': 69, 'avg_line_length': 28.53846153846154, 'alnum_prop': 0.7169811320754716, 'repo_name': 'google/pigweed', 'id': '353d33f27db3829393f8ca5d29f68e995f63f085', 'size': '1102', 'binary': False, 'copies': '1', 'ref': 'refs/heads/main', 'path': 'pw_trace_tokenized/fake_trace_time.cc', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Batchfile', 'bytes': '8654'}, {'name': 'C', 'bytes': '487991'}, {'name': 'C++', 'bytes': '6119052'}, {'name': 'CMake', 'bytes': '288698'}, {'name': 'CSS', 'bytes': '4820'}, {'name': 'Go', 'bytes': '18932'}, {'name': 'HTML', 'bytes': '1194'}, {'name': 'Java', 'bytes': '327548'}, {'name': 'JavaScript', 'bytes': '12482'}, {'name': 'Jinja', 'bytes': '2467'}, {'name': 'Python', 'bytes': '3578966'}, {'name': 'Rust', 'bytes': '645'}, {'name': 'SCSS', 'bytes': '1382'}, {'name': 'Shell', 'bytes': '22974'}, {'name': 'Smarty', 'bytes': '692'}, {'name': 'Starlark', 'bytes': '489444'}, {'name': 'TypeScript', 'bytes': '235169'}]} |
using namespace Json;
namespace SAPHRON
{
DOSOrderParameter* DOSOrderParameter::Build(const Value& json, Histogram* hist, WorldManager* wm)
{
ObjectRequirement validator;
Value schema;
Reader reader;
if(hist == nullptr || hist == NULL)
throw BuildException(
{"#/orderparameter: Order parameter requires initialized histogram."}
);
DOSOrderParameter* op = nullptr;
auto type = json.get("type", "none").asString();
if(type == "ParticleDistance")
{
reader.parse(JsonSchema::ParticleDistanceOP, schema);
validator.Parse(schema, "#/orderparameter");
// Validate inputs.
validator.Validate(json, "#/orderparameter");
if(validator.HasErrors())
throw BuildException(validator.GetErrors());
ParticleList group1, group2;
auto& plist = Particle::GetParticleMap();
for(auto& id : json["group1"])
{
if(plist.find(id.asInt()) == plist.end())
throw BuildException({"#orderparameter/group1 : unknown particle ID " + id.asString()});
group1.push_back(plist[id.asInt()]);
}
for(auto& id : json["group2"])
{
if(plist.find(id.asInt()) == plist.end())
throw BuildException({"#orderparameter/group1 : unknown particle ID " + id.asString()});
group2.push_back(plist[id.asInt()]);
}
op = new ParticleDistanceOP(*hist, group1, group2);
}
else if(type == "WangLandau")
{
reader.parse(JsonSchema::WangLandauOP, schema);
validator.Parse(schema, "#/orderparameter");
// Validate inputs.
validator.Validate(json, "#/orderparameter");
if(validator.HasErrors())
throw BuildException(validator.GetErrors());
op = new WangLandauOP(*hist);
}
else if(type == "ElasticCoeff")
{
reader.parse(JsonSchema::ElasticCoeffOP, schema);
validator.Parse(schema, "#/orderparameter");
// Validate inputs.
validator.Validate(json, "#/orderparameter");
if(validator.HasErrors())
throw BuildException(validator.GetErrors());
// Get world
auto windex = json.get("world", 0).asInt();
if(windex > (int)wm->GetWorldCount())
throw BuildException({"#/orderparameter/world: "
"Specified index exceeds actual count."
});
auto* w = wm->GetWorld(windex);
// Get range and check bounds.
auto rmin = json["range"][0].asDouble();
auto rmax = json["range"][1].asDouble();
if(rmin > rmax)
throw BuildException({"#orderparameter/range: rmin cannot exceed rmax."});
// Get mode.
auto mode = json["mode"].asString();
ElasticMode elmode;
if(mode == "splay")
elmode = Splay;
else if(mode == "twist")
elmode = Twist;
else
elmode = Bend;
// TODO: Generalize (in particular lambda fxn) for
// many geometries.
const auto& boxvec = w->GetHMatrix();
// Get length of appropriate dimension.
auto rlen = (elmode == Bend) ? boxvec(2,2) : boxvec(0,0);
if(rmin < 0 || rmax > rlen)
throw BuildException({"#orderparameter/range: rmin and rmax must be within world."});
// Compute midpoint for deformation. This assumes
// that the last "layer" is anchored.
double mid = rlen - 0.5*(rmax + rmin);
// Initialize order parameter.
op = new ElasticCoeffOP(*hist, w, mid, {{rmin, rmax}}, elmode);
}
else if(type == "ChargeFraction")
{
reader.parse(JsonSchema::ChargeFractionOP, schema);
validator.Parse(schema, "#/orderparameter");
// Validate inputs.
validator.Validate(json, "#/orderparameter");
if(validator.HasErrors())
throw BuildException(validator.GetErrors());
ParticleList group1;
auto& plist = Particle::GetParticleMap();
for(auto& id : json["group1"])
{
if(plist.find(id.asInt()) == plist.end())
throw BuildException({"#orderparameter/group1 : unknown particle ID " + id.asString()});
group1.push_back(plist[id.asInt()]);
}
double charge = json.get("Charge",0).asDouble();
// Initialize order parameter.
op = new ChargeFractionOP(*hist, group1, charge);
}
else if(type == "Rg")
{
reader.parse(JsonSchema::RgOP, schema);
validator.Parse(schema, "#/orderparameter");
// Validate inputs.
validator.Validate(json, "#/orderparameter");
if(validator.HasErrors())
throw BuildException(validator.GetErrors());
ParticleList group1;
auto& plist = Particle::GetParticleMap();
for(auto& id : json["group1"])
{
if(plist.find(id.asInt()) == plist.end())
throw BuildException({"#orderparameter/group1 : unknown particle ID " + id.asString()});
group1.push_back(plist[id.asInt()]);
}
// Initialize order parameter.
op = new RgOP(*hist, group1);
}
else
{
throw BuildException({"#orderparameter: Unkown order parameter specified."});
}
return op;
}
} | {'content_hash': '6575757b83e5f3c4cda804430a9f409b', 'timestamp': '', 'source': 'github', 'line_count': 167, 'max_line_length': 98, 'avg_line_length': 28.179640718562876, 'alnum_prop': 0.652571185720357, 'repo_name': 'hsidky/SAPHRON', 'id': 'abb05dcee409ebfed14a5be15e1cb7e8f2d68577', 'size': '5073', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/DensityOfStates/DOSOrderParameter.cpp', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'C++', 'bytes': '846456'}, {'name': 'CMake', 'bytes': '35020'}, {'name': 'Matlab', 'bytes': '11208'}, {'name': 'Python', 'bytes': '2984'}]} |
**Copyright (c) 2015 Alloy developers**
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
| {'content_hash': 'f842458e5c72328831703e935b09f7e3', 'timestamp': '', 'source': 'github', 'line_count': 19, 'max_line_length': 78, 'avg_line_length': 56.0, 'alnum_prop': 0.8035714285714286, 'repo_name': '8l/ark-c', 'id': '2f7879be00e2836537686d23ddbac711947e8b9b', 'size': '1089', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'LICENSE.md', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'C', 'bytes': '248602'}, {'name': 'Makefile', 'bytes': '905'}, {'name': 'Python', 'bytes': '3223'}, {'name': 'Rust', 'bytes': '11113'}]} |
local to_scalar = require 'Q/UTILS/lua/to_scalar'
local qconsts = require 'Q/UTILS/lua/q_consts'
local Scalar = require 'libsclr'
return function (
idx_qtype,
val_qtype, --- assumption source qtype == destination qtype
optargs
)
assert(
( idx_qtype == "I1" ) or ( idx_qtype == "I2" ) or
( idx_qtype == "I4" ) or ( idx_qtype == "I8" ) )
local subs = {}
local tmpl
tmpl = qconsts.Q_SRC_ROOT .. "/OPERATORS/GET/lua/add_vec_val_by_idx.tmpl"
subs.fn = "add_val_" .. val_qtype .. "_by_idx_" .. idx_qtype
subs.idx_ctype = qconsts.qtypes[idx_qtype].ctype
subs.val_ctype = qconsts.qtypes[val_qtype].ctype
return subs, tmpl
end
| {'content_hash': '18d8adb6389ed3cd97ae5e1710ce5fbb', 'timestamp': '', 'source': 'github', 'line_count': 23, 'max_line_length': 75, 'avg_line_length': 28.652173913043477, 'alnum_prop': 0.6358118361153262, 'repo_name': 'NerdWalletOSS/Q', 'id': '05a873ecdc92a6769b77d9e0e776e478dc6de723', 'size': '659', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'OPERATORS/GET/lua/add_vec_val_by_idx_specialize.lua', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'C', 'bytes': '1528854'}, {'name': 'C++', 'bytes': '11900'}, {'name': 'CMake', 'bytes': '414'}, {'name': 'CSS', 'bytes': '651'}, {'name': 'Cuda', 'bytes': '4192'}, {'name': 'HTML', 'bytes': '184009'}, {'name': 'JavaScript', 'bytes': '12282'}, {'name': 'Jupyter Notebook', 'bytes': '60539'}, {'name': 'Lex', 'bytes': '5777'}, {'name': 'Logos', 'bytes': '18046'}, {'name': 'Lua', 'bytes': '2273456'}, {'name': 'Makefile', 'bytes': '72536'}, {'name': 'Perl', 'bytes': '3421'}, {'name': 'Python', 'bytes': '121910'}, {'name': 'R', 'bytes': '1071'}, {'name': 'RPC', 'bytes': '5973'}, {'name': 'Shell', 'bytes': '128156'}, {'name': 'TeX', 'bytes': '819194'}, {'name': 'Terra', 'bytes': '3360'}, {'name': 'Vim script', 'bytes': '5911'}, {'name': 'Yacc', 'bytes': '52645'}]} |
package org.activiti.engine.impl.pvm.runtime;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.activiti.engine.impl.pvm.PvmActivity;
import org.activiti.engine.impl.pvm.PvmException;
import org.activiti.engine.impl.pvm.PvmExecution;
import org.activiti.engine.impl.pvm.PvmProcessDefinition;
import org.activiti.engine.impl.pvm.PvmProcessElement;
import org.activiti.engine.impl.pvm.PvmProcessInstance;
import org.activiti.engine.impl.pvm.PvmTransition;
import org.activiti.engine.impl.pvm.delegate.ActivityExecution;
import org.activiti.engine.impl.pvm.delegate.ExecutionListenerExecution;
import org.activiti.engine.impl.pvm.delegate.SignallableActivityBehavior;
import org.activiti.engine.impl.pvm.process.ActivityImpl;
import org.activiti.engine.impl.pvm.process.ProcessDefinitionImpl;
import org.activiti.engine.impl.pvm.process.TransitionImpl;
/**
* @author Tom Baeyens
* @author Joram Barrez
*/
public class ExecutionImpl implements Serializable, ActivityExecution,
ExecutionListenerExecution, PvmExecution, InterpretableExecution {
private static final long serialVersionUID = 1L;
private static Logger log = Logger.getLogger(ExecutionImpl.class.getName());
// current position
// /////////////////////////////////////////////////////////
protected ProcessDefinitionImpl processDefinition;
/** current activity */
protected ActivityImpl activity;
/** current transition. is null when there is no transition being taken. */
protected TransitionImpl transition = null;
/**
* the process instance. this is the root of the execution tree. the
* processInstance of a process instance is a self reference.
*/
protected ExecutionImpl processInstance;
/** the parent execution */
protected ExecutionImpl parent;
/** nested executions representing scopes or concurrent paths */
protected List<ExecutionImpl> executions;
/** super execution, not-null if this execution is part of a subprocess */
protected ExecutionImpl superExecution;
/**
* reference to a subprocessinstance, not-null if currently subprocess is
* started from this execution
*/
protected ExecutionImpl subProcessInstance;
/** only available until the process instance is started */
protected StartingExecution startingExecution;
// state/type of execution
// //////////////////////////////////////////////////
/**
* indicates if this execution represents an active path of execution.
* Executions are made inactive in the following situations:
* <ul>
* <li>an execution enters a nested scope</li>
* <li>an execution is split up into multiple concurrent executions, then
* the parent is made inactive.</li>
* <li>an execution has arrived in a parallel gateway or join and that join
* has not yet activated/fired.</li>
* <li>an execution is ended.</li>
* </ul>
*/
protected boolean isActive = true;
protected boolean isScope = true;
protected boolean isConcurrent = false;
protected boolean isEnded = false;
protected boolean isEventScope = false;
protected Map<String, Object> variables = null;
// events
// ///////////////////////////////////////////////////////////////////
protected String eventName;
protected PvmProcessElement eventSource;
protected int executionListenerIndex = 0;
// cascade deletion ////////////////////////////////////////////////////////
protected boolean deleteRoot;
protected String deleteReason;
// replaced by
// //////////////////////////////////////////////////////////////
/**
* when execution structure is pruned during a takeAll, then the original
* execution has to be resolved to the replaced execution.
*
* @see {@link #takeAll(List, List)} {@link OutgoingExecution}
*/
protected ExecutionImpl replacedBy;
// atomic operations
// ////////////////////////////////////////////////////////
/**
* next operation. process execution is in fact runtime interpretation of
* the process model. each operation is a logical unit of interpretation of
* the process. so sequentially processing the operations drives the
* interpretation or execution of a process.
*
* @see AtomicOperation
* @see #performOperation(AtomicOperation)
*/
protected AtomicOperation nextOperation;
protected boolean isOperating = false;
/* Default constructor for ibatis/jpa/etc. */
public ExecutionImpl() {
}
public ExecutionImpl(ActivityImpl initial) {
startingExecution = new StartingExecution(initial);
}
// lifecycle methods
// ////////////////////////////////////////////////////////
/**
* creates a new execution. properties processDefinition, processInstance
* and activity will be initialized.
*/
public ExecutionImpl createExecution() {
// create the new child execution
ExecutionImpl createdExecution = newExecution();
// manage the bidirectional parent-child relation
ensureExecutionsInitialized();
executions.add(createdExecution);
createdExecution.setParent(this);
// initialize the new execution
createdExecution.setProcessDefinition(getProcessDefinition());
createdExecution.setProcessInstance(getProcessInstance());
createdExecution.setActivity(getActivity());
return createdExecution;
}
/** instantiates a new execution. can be overridden by subclasses */
protected ExecutionImpl newExecution() {
return new ExecutionImpl();
}
public PvmProcessInstance createSubProcessInstance(
PvmProcessDefinition processDefinition) {
ExecutionImpl subProcessInstance = newExecution();
// manage bidirectional super-subprocess relation
subProcessInstance.setSuperExecution(this);
this.setSubProcessInstance(subProcessInstance);
// Initialize the new execution
subProcessInstance
.setProcessDefinition((ProcessDefinitionImpl) processDefinition);
subProcessInstance.setProcessInstance(subProcessInstance);
return subProcessInstance;
}
public void initialize() {
}
public void destroy() {
setScope(false);
}
public void remove() {
ensureParentInitialized();
if (parent != null) {
parent.ensureExecutionsInitialized();
parent.executions.remove(this);
}
// remove event scopes:
List<InterpretableExecution> childExecutions = new ArrayList<InterpretableExecution>(
getExecutions());
for (InterpretableExecution childExecution : childExecutions) {
if (childExecution.isEventScope()) {
log.fine("removing eventScope " + childExecution);
childExecution.destroy();
childExecution.remove();
}
}
}
// parent
// ///////////////////////////////////////////////////////////////////
/** ensures initialization and returns the parent */
public ExecutionImpl getParent() {
ensureParentInitialized();
return parent;
}
/**
* all updates need to go through this setter as subclasses can override
* this method
*/
public void setParent(InterpretableExecution parent) {
this.parent = (ExecutionImpl) parent;
}
/**
* must be called before memberfield parent is used. can be used by
* subclasses to provide parent member field initialization.
*/
protected void ensureParentInitialized() {
}
// executions
// ///////////////////////////////////////////////////////////////
/** ensures initialization and returns the non-null executions list */
public List<ExecutionImpl> getExecutions() {
ensureExecutionsInitialized();
return executions;
}
public ExecutionImpl getSuperExecution() {
ensureSuperExecutionInitialized();
return superExecution;
}
public void setSuperExecution(ExecutionImpl superExecution) {
this.superExecution = superExecution;
if (superExecution != null) {
superExecution.setSubProcessInstance(null);
}
}
// Meant to be overridden by persistent subclasseses
protected void ensureSuperExecutionInitialized() {
}
public ExecutionImpl getSubProcessInstance() {
ensureSubProcessInstanceInitialized();
return subProcessInstance;
}
public void setSubProcessInstance(InterpretableExecution subProcessInstance) {
this.subProcessInstance = (ExecutionImpl) subProcessInstance;
}
// Meant to be overridden by persistent subclasses
protected void ensureSubProcessInstanceInitialized() {
}
public void deleteCascade(String deleteReason) {
this.deleteReason = deleteReason;
this.deleteRoot = true;
performOperation(AtomicOperation.DELETE_CASCADE);
}
/**
* removes an execution. if there are nested executions, those will be ended
* recursively. if there is a parent, this method removes the bidirectional
* relation between parent and this execution.
*/
public void end() {
isActive = false;
isEnded = true;
performOperation(AtomicOperation.ACTIVITY_END);
}
/** searches for an execution positioned in the given activity */
public ExecutionImpl findExecution(String activityId) {
if ((getActivity() != null)
&& (getActivity().getId().equals(activityId))) {
return this;
}
for (ExecutionImpl nestedExecution : getExecutions()) {
ExecutionImpl result = nestedExecution.findExecution(activityId);
if (result != null) {
return result;
}
}
return null;
}
public List<String> findActiveActivityIds() {
List<String> activeActivityIds = new ArrayList<String>();
collectActiveActivityIds(activeActivityIds);
return activeActivityIds;
}
protected void collectActiveActivityIds(List<String> activeActivityIds) {
ensureActivityInitialized();
if (isActive && activity != null) {
activeActivityIds.add(activity.getId());
}
ensureExecutionsInitialized();
for (ExecutionImpl execution : executions) {
execution.collectActiveActivityIds(activeActivityIds);
}
}
/**
* must be called before memberfield executions is used. can be used by
* subclasses to provide executions member field initialization.
*/
protected void ensureExecutionsInitialized() {
if (executions == null) {
executions = new ArrayList<ExecutionImpl>();
}
}
// process definition
// ///////////////////////////////////////////////////////
/** ensures initialization and returns the process definition. */
public ProcessDefinitionImpl getProcessDefinition() {
ensureProcessDefinitionInitialized();
return processDefinition;
}
public String getProcessDefinitionId() {
return getProcessDefinition().getId();
}
/**
* for setting the process definition, this setter must be used as
* subclasses can override
*/
/**
* must be called before memberfield processDefinition is used. can be used
* by subclasses to provide processDefinition member field initialization.
*/
protected void ensureProcessDefinitionInitialized() {
}
// process instance
// /////////////////////////////////////////////////////////
/** ensures initialization and returns the process instance. */
public ExecutionImpl getProcessInstance() {
ensureProcessInstanceInitialized();
return processInstance;
}
public String getProcessInstanceId() {
return getProcessInstance().getId();
}
public String getBusinessKey() {
return getProcessInstance().getBusinessKey();
}
public String getProcessBusinessKey() {
return getProcessInstance().getBusinessKey();
}
/**
* for setting the process instance, this setter must be used as subclasses
* can override
*/
public void setProcessInstance(InterpretableExecution processInstance) {
this.processInstance = (ExecutionImpl) processInstance;
}
/**
* must be called before memberfield processInstance is used. can be used by
* subclasses to provide processInstance member field initialization.
*/
protected void ensureProcessInstanceInitialized() {
}
// activity
// /////////////////////////////////////////////////////////////////
/** ensures initialization and returns the activity */
public ActivityImpl getActivity() {
ensureActivityInitialized();
return activity;
}
/**
* sets the current activity. can be overridden by subclasses. doesn't
* require initialization.
*/
public void setActivity(ActivityImpl activity) {
this.activity = activity;
}
/**
* must be called before the activity member field or getActivity() is
* called
*/
protected void ensureActivityInitialized() {
}
// scopes
// ///////////////////////////////////////////////////////////////////
protected void ensureScopeInitialized() {
}
public boolean isScope() {
return isScope;
}
public void setScope(boolean isScope) {
this.isScope = isScope;
}
// process instance start implementation
// ////////////////////////////////////
public void start() {
if (startingExecution == null && isProcessInstance()) {
startingExecution = new StartingExecution(
processDefinition.getInitial());
}
performOperation(AtomicOperation.PROCESS_START);
}
// methods that translate to operations
// /////////////////////////////////////
public void signal(String signalName, Object signalData) {
ensureActivityInitialized();
SignallableActivityBehavior activityBehavior = (SignallableActivityBehavior) activity
.getActivityBehavior();
try {
activityBehavior.signal(this, signalName, signalData);
} catch (RuntimeException e) {
throw e;
} catch (Exception e) {
throw new PvmException("couldn't process signal '" + signalName
+ "' on activity '" + activity.getId() + "': "
+ e.getMessage(), e);
}
}
public void take(PvmTransition transition) {
if (this.transition != null) {
throw new PvmException("already taking a transition");
}
if (transition == null) {
throw new PvmException("transition is null");
}
setTransition((TransitionImpl) transition);
performOperation(AtomicOperation.TRANSITION_NOTIFY_LISTENER_END);
}
public void executeActivity(PvmActivity activity) {
setActivity((ActivityImpl) activity);
performOperation(AtomicOperation.ACTIVITY_START);
}
public List<ActivityExecution> findInactiveConcurrentExecutions(
PvmActivity activity) {
List<ActivityExecution> inactiveConcurrentExecutionsInActivity = new ArrayList<ActivityExecution>();
List<ActivityExecution> otherConcurrentExecutions = new ArrayList<ActivityExecution>();
if (isConcurrent()) {
List<? extends ActivityExecution> concurrentExecutions = getParent()
.getExecutions();
for (ActivityExecution concurrentExecution : concurrentExecutions) {
if (concurrentExecution.getActivity() == activity) {
if (concurrentExecution.isActive()) {
throw new PvmException(
"didn't expect active execution in " + activity
+ ". bug?");
}
inactiveConcurrentExecutionsInActivity
.add(concurrentExecution);
} else {
otherConcurrentExecutions.add(concurrentExecution);
}
}
} else {
if (!isActive()) {
inactiveConcurrentExecutionsInActivity.add(this);
} else {
otherConcurrentExecutions.add(this);
}
}
if (log.isLoggable(Level.FINE)) {
log.fine("inactive concurrent executions in '" + activity + "': "
+ inactiveConcurrentExecutionsInActivity);
log.fine("other concurrent executions: "
+ otherConcurrentExecutions);
}
return inactiveConcurrentExecutionsInActivity;
}
@SuppressWarnings("unchecked")
public void takeAll(List<PvmTransition> transitions,
List<ActivityExecution> recyclableExecutions) {
transitions = new ArrayList<PvmTransition>(transitions);
recyclableExecutions = (recyclableExecutions != null ? new ArrayList<ActivityExecution>(
recyclableExecutions) : new ArrayList<ActivityExecution>());
if (recyclableExecutions.size() > 1) {
for (ActivityExecution recyclableExecution : recyclableExecutions) {
if (((ExecutionImpl) recyclableExecution).isScope()) {
throw new PvmException(
"joining scope executions is not allowed");
}
}
}
ExecutionImpl concurrentRoot = ((isConcurrent && !isScope) ? getParent()
: this);
List<ExecutionImpl> concurrentActiveExecutions = new ArrayList<ExecutionImpl>();
for (ExecutionImpl execution : concurrentRoot.getExecutions()) {
if (execution.isActive()) {
concurrentActiveExecutions.add(execution);
}
}
if (log.isLoggable(Level.FINE)) {
log.fine("transitions to take concurrent: " + transitions);
log.fine("active concurrent executions: "
+ concurrentActiveExecutions);
}
if ((transitions.size() == 1) && (concurrentActiveExecutions.isEmpty())) {
List<ExecutionImpl> recyclableExecutionImpls = (List) recyclableExecutions;
for (ExecutionImpl prunedExecution : recyclableExecutionImpls) {
// End the pruned executions if necessary.
// Some recyclable executions are inactivated (joined
// executions)
// Others are already ended (end activities)
if (!prunedExecution.isEnded()) {
log.fine("pruning execution " + prunedExecution);
prunedExecution.remove();
}
}
log.fine("activating the concurrent root " + concurrentRoot
+ " as the single path of execution going forward");
concurrentRoot.setActive(true);
concurrentRoot.setActivity(activity);
concurrentRoot.setConcurrent(false);
concurrentRoot.take(transitions.get(0));
} else {
List<OutgoingExecution> outgoingExecutions = new ArrayList<OutgoingExecution>();
recyclableExecutions.remove(concurrentRoot);
log.fine("recyclable executions for reused: "
+ recyclableExecutions);
// first create the concurrent executions
while (!transitions.isEmpty()) {
PvmTransition outgoingTransition = transitions.remove(0);
ExecutionImpl outgoingExecution = null;
if (recyclableExecutions.isEmpty()) {
outgoingExecution = concurrentRoot.createExecution();
log.fine("new " + outgoingExecution
+ " created to take transition "
+ outgoingTransition);
} else {
outgoingExecution = (ExecutionImpl) recyclableExecutions
.remove(0);
log.fine("recycled " + outgoingExecution
+ " to take transition " + outgoingTransition);
}
outgoingExecution.setActive(true);
outgoingExecution.setScope(false);
outgoingExecution.setConcurrent(true);
outgoingExecutions.add(new OutgoingExecution(outgoingExecution,
outgoingTransition, true));
}
// prune the executions that are not recycled
for (ActivityExecution prunedExecution : recyclableExecutions) {
log.fine("pruning execution " + prunedExecution);
prunedExecution.end();
}
// then launch all the concurrent executions
for (OutgoingExecution outgoingExecution : outgoingExecutions) {
outgoingExecution.take();
}
}
}
public void performOperation(AtomicOperation executionOperation) {
this.nextOperation = executionOperation;
if (!isOperating) {
isOperating = true;
while (nextOperation != null) {
AtomicOperation currentOperation = this.nextOperation;
this.nextOperation = null;
if (log.isLoggable(Level.FINEST)) {
log.finest("AtomicOperation: " + currentOperation + " on "
+ this);
}
currentOperation.execute(this);
}
isOperating = false;
}
}
public boolean isActive(String activityId) {
return findExecution(activityId) != null;
}
// variables
// ////////////////////////////////////////////////////////////////
public Object getVariable(String variableName) {
ensureVariablesInitialized();
// If value is found in this scope, return it
if (variables.containsKey(variableName)) {
return variables.get(variableName);
}
// If value not found in this scope, check the parent scope
ensureParentInitialized();
if (parent != null) {
return parent.getVariable(variableName);
}
// Variable is nowhere to be found
return null;
}
public Map<String, Object> getVariables() {
Map<String, Object> collectedVariables = new HashMap<String, Object>();
collectVariables(collectedVariables);
return collectedVariables;
}
protected void collectVariables(Map<String, Object> collectedVariables) {
ensureParentInitialized();
if (parent != null) {
parent.collectVariables(collectedVariables);
}
ensureVariablesInitialized();
for (String variableName : variables.keySet()) {
collectedVariables.put(variableName, variables.get(variableName));
}
}
public void setVariables(Map<String, ? extends Object> variables) {
ensureVariablesInitialized();
if (variables != null) {
for (String variableName : variables.keySet()) {
setVariable(variableName, variables.get(variableName));
}
}
}
public void setVariable(String variableName, Object value) {
ensureVariablesInitialized();
if (variables.containsKey(variableName)) {
setVariableLocally(variableName, value);
} else {
ensureParentInitialized();
if (parent != null) {
parent.setVariable(variableName, value);
} else {
setVariableLocally(variableName, value);
}
}
}
public void setVariableLocally(String variableName, Object value) {
log.fine("setting variable '" + variableName + "' to value '" + value
+ "' on " + this);
variables.put(variableName, value);
}
public boolean hasVariable(String variableName) {
ensureVariablesInitialized();
if (variables.containsKey(variableName)) {
return true;
}
ensureParentInitialized();
if (parent != null) {
return parent.hasVariable(variableName);
}
return false;
}
protected void ensureVariablesInitialized() {
if (variables == null) {
variables = new HashMap<String, Object>();
}
}
// toString
// /////////////////////////////////////////////////////////////////
public String toString() {
if (isProcessInstance()) {
return "ProcessInstance[" + getToStringIdentity() + "]";
} else {
return (isEventScope ? "EventScope" : "")
+ (isConcurrent ? "Concurrent" : "")
+ (isScope() ? "Scope" : "") + "Execution["
+ getToStringIdentity() + "]";
}
}
protected String getToStringIdentity() {
return Integer.toString(System.identityHashCode(this));
}
// customized getters and setters
// ///////////////////////////////////////////
public boolean isProcessInstance() {
ensureParentInitialized();
return parent == null;
}
public void inactivate() {
this.isActive = false;
}
// allow for subclasses to expose a real id
// /////////////////////////////////
public String getId() {
return null;
}
// getters and setters
// //////////////////////////////////////////////////////
public TransitionImpl getTransition() {
return transition;
}
public void setTransition(TransitionImpl transition) {
this.transition = transition;
}
public Integer getExecutionListenerIndex() {
return executionListenerIndex;
}
public void setExecutionListenerIndex(Integer executionListenerIndex) {
this.executionListenerIndex = executionListenerIndex;
}
public boolean isConcurrent() {
return isConcurrent;
}
public void setConcurrent(boolean isConcurrent) {
this.isConcurrent = isConcurrent;
}
public boolean isActive() {
return isActive;
}
public void setActive(boolean isActive) {
this.isActive = isActive;
}
public boolean isEnded() {
return isEnded;
}
public void setProcessDefinition(ProcessDefinitionImpl processDefinition) {
this.processDefinition = processDefinition;
}
public String getEventName() {
return eventName;
}
public void setEventName(String eventName) {
this.eventName = eventName;
}
public PvmProcessElement getEventSource() {
return eventSource;
}
public void setEventSource(PvmProcessElement eventSource) {
this.eventSource = eventSource;
}
public String getDeleteReason() {
return deleteReason;
}
public void setDeleteReason(String deleteReason) {
this.deleteReason = deleteReason;
}
public ExecutionImpl getReplacedBy() {
return replacedBy;
}
public void setReplacedBy(InterpretableExecution replacedBy) {
this.replacedBy = (ExecutionImpl) replacedBy;
}
public void setExecutions(List<ExecutionImpl> executions) {
this.executions = executions;
}
public boolean isDeleteRoot() {
return deleteRoot;
}
public void createVariableLocal(String variableName, Object value) {
}
public void createVariablesLocal(Map<String, ? extends Object> variables) {
}
public Object getVariableLocal(Object variableName) {
return null;
}
public Set<String> getVariableNames() {
return null;
}
public Set<String> getVariableNamesLocal() {
return null;
}
public Map<String, Object> getVariablesLocal() {
return null;
}
public boolean hasVariableLocal(String variableName) {
return false;
}
public boolean hasVariables() {
return false;
}
public boolean hasVariablesLocal() {
return false;
}
public void removeVariable(String variableName) {
}
public void removeVariableLocal(String variableName) {
}
public void removeVariables() {
}
public void removeVariablesLocal() {
}
public Object setVariableLocal(String variableName, Object value) {
return null;
}
public void setVariablesLocal(Map<String, ? extends Object> variables) {
}
public boolean isEventScope() {
return isEventScope;
}
public void setEventScope(boolean isEventScope) {
this.isEventScope = isEventScope;
}
public StartingExecution getStartingExecution() {
return startingExecution;
}
public void disposeStartingExecution() {
startingExecution = null;
}
}
| {'content_hash': '9dc70339e810b3a18d549a60933206ad', 'timestamp': '', 'source': 'github', 'line_count': 906, 'max_line_length': 102, 'avg_line_length': 27.8476821192053, 'alnum_prop': 0.7045977011494253, 'repo_name': 'ThorbenLindhauer/activiti-engine-ppi', 'id': 'c4412753180e1e45ad2c754a858966019fbde54b', 'size': '25877', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'modules/activiti-engine/src/main/java/org/activiti/engine/impl/pvm/runtime/ExecutionImpl.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Java', 'bytes': '3858655'}]} |
import express from 'express';
import mongoose from 'mongoose';
import {Game} from '../model/Game';
var router = express.Router();
router.route('/Console');
router.param('name', function(req, res, next, name) {
// do validation on name here
// blah blah validation
// log something so we know its working
console.log('doing name validations on ' + name);
// once validation is done save the new item in the req
req.name = name;
// go to the next thing
next();
});
router.get('/:name', function(req, res) {
Game.find({ platform: req.name }).limit(12).exec(function (err, games) {
if (err) return console.error(err);
res.render('../dist/views/console-gallery.ejs', {games: games, console: req.name});
});
});
/*
router.get('/PS3', function(req, res, next) {
Game.find({ platform: 'PS3' }).limit(12).exec(function (err, games) {
if (err) return console.error(err);
res.render('../dist/views/console-gallery.ejs', {games: games, console: 'PS3'});
});
});
router.get('/PS4', function(req, res, next) {
Game.find({ platform: 'PS4' }).limit(12).exec(function (err, games) {
if (err) return console.error(err);
res.render('../dist/views/console-gallery.ejs', {games: games, console: 'PS4'});
});
});
router.get('/XBOX-ONE', function(req, res, next) {
Game.find({ platform: 'XBOX-ONE' }).limit(12).exec(function (err, games) {
if (err) return console.error(err);
res.render('../dist/views/console-gallery.ejs', {games: games, console: 'XBOX-ONE'});
});
});
router.get('/XBOX-360', function(req, res, next) {
Game.find({ platform: 'XBOX-360' }).limit(12).exec(function (err, games) {
if (err) return console.error(err);
res.render('../dist/views/console-gallery.ejs', {games: games, console: 'XBOX-360'});
});
});
router.get('/3DS', function(req, res, next) {
Game.find({ platform: '3DS' }).limit(12).exec(function (err, games) {
if (err) return console.error(err);
res.render('../dist/views/console-gallery.ejs', {games: games, console: '3DS'});
});
});
router.get('/WIIU', function(req, res, next) {
Game.find({ platform: 'WIIU' }).limit(12).exec(function (err, games) {
if (err) return console.error(err);
res.render('../dist/views/console-gallery.ejs', {games: games, console: 'WIIU'});
});
});
router.get('/SWITCH', function(req, res, next) {
Game.find({ platform: 'SWITCH' }).limit(12).exec(function (err, games) {
if (err) return console.error(err);
res.render('../dist/views/console-gallery.ejs', {games: games, console: 'SWITCH'});
});
});
*/
export default {};
module.exports = router;
| {'content_hash': '9e6cc6a0916698fd6d6a3966ffc5f371', 'timestamp': '', 'source': 'github', 'line_count': 82, 'max_line_length': 95, 'avg_line_length': 33.86585365853659, 'alnum_prop': 0.5970471732084984, 'repo_name': 'delzar10/delzargames', 'id': 'a2f859213ba4255f2ca92d4f73199de97391b381', 'size': '2777', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'routes/consoleRoutes.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '17303'}, {'name': 'HTML', 'bytes': '75148'}, {'name': 'JavaScript', 'bytes': '59966'}, {'name': 'Shell', 'bytes': '51'}]} |
package fail2ban
import (
"errors"
"fmt"
"os/exec"
"strings"
"github.com/influxdata/telegraf"
"github.com/influxdata/telegraf/plugins/inputs"
"strconv"
)
var (
execCommand = exec.Command // execCommand is used to mock commands in tests.
)
type Fail2ban struct {
path string
UseSudo bool
}
var sampleConfig = `
## fail2ban-client require root access.
## Setting 'use_sudo' to true will make use of sudo to run fail2ban-client.
## Users must configure sudo to allow telegraf user to run fail2ban-client with no password.
## This plugin run only "fail2ban-client status".
use_sudo = false
`
var metricsTargets = []struct {
target string
field string
}{
{
target: "Currently failed:",
field: "failed",
},
{
target: "Currently banned:",
field: "banned",
},
}
func (f *Fail2ban) Description() string {
return "Read metrics from fail2ban."
}
func (f *Fail2ban) SampleConfig() string {
return sampleConfig
}
func (f *Fail2ban) Gather(acc telegraf.Accumulator) error {
if len(f.path) == 0 {
return errors.New("fail2ban-client not found: verify that fail2ban is installed and that fail2ban-client is in your PATH")
}
name := f.path
var arg []string
if f.UseSudo {
name = "sudo"
arg = append(arg, f.path)
}
args := append(arg, "status")
cmd := execCommand(name, args...)
out, err := cmd.Output()
if err != nil {
return fmt.Errorf("failed to run command %s: %s - %s", strings.Join(cmd.Args, " "), err, string(out))
}
lines := strings.Split(string(out), "\n")
const targetString = "Jail list:"
var jails []string
for _, line := range lines {
idx := strings.LastIndex(line, targetString)
if idx < 0 {
// not target line, skip.
continue
}
jails = strings.Split(strings.TrimSpace(line[idx+len(targetString):]), ", ")
break
}
for _, jail := range jails {
fields := make(map[string]interface{})
args := append(arg, "status", jail)
cmd := execCommand(name, args...)
out, err := cmd.Output()
if err != nil {
return fmt.Errorf("failed to run command %s: %s - %s", strings.Join(cmd.Args, " "), err, string(out))
}
lines := strings.Split(string(out), "\n")
for _, line := range lines {
key, value := extractCount(line)
if key != "" {
fields[key] = value
}
}
acc.AddFields("fail2ban", fields, map[string]string{"jail": jail})
}
return nil
}
func extractCount(line string) (string, int) {
for _, metricsTarget := range metricsTargets {
idx := strings.LastIndex(line, metricsTarget.target)
if idx < 0 {
continue
}
ban := strings.TrimSpace(line[idx+len(metricsTarget.target):])
banCount, err := strconv.Atoi(ban)
if err != nil {
return "", -1
}
return metricsTarget.field, banCount
}
return "", -1
}
func init() {
f := Fail2ban{}
path, _ := exec.LookPath("fail2ban-client")
if len(path) > 0 {
f.path = path
}
inputs.Add("fail2ban", func() telegraf.Input {
f := f
return &f
})
}
| {'content_hash': '9c45bb36acb04c4f7ff087deefe6714c', 'timestamp': '', 'source': 'github', 'line_count': 133, 'max_line_length': 124, 'avg_line_length': 22.0, 'alnum_prop': 0.6490088858509911, 'repo_name': 'nevins-b/telegraf', 'id': '54655357fac3481b9b1c55d125c628e647353c2c', 'size': '2926', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'plugins/inputs/fail2ban/fail2ban.go', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Go', 'bytes': '2866898'}, {'name': 'Makefile', 'bytes': '3932'}, {'name': 'Python', 'bytes': '37361'}, {'name': 'Ruby', 'bytes': '1437'}, {'name': 'Shell', 'bytes': '14117'}]} |
package filters
import (
"errors"
"net/http"
"net/http/httptest"
"reflect"
"testing"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/apis/batch"
"k8s.io/kubernetes/pkg/auth/authorizer"
)
func TestGetAuthorizerAttributes(t *testing.T) {
mapper := api.NewRequestContextMapper()
testcases := map[string]struct {
Verb string
Path string
ExpectedAttributes *authorizer.AttributesRecord
}{
"non-resource root": {
Verb: "POST",
Path: "/",
ExpectedAttributes: &authorizer.AttributesRecord{
Verb: "post",
Path: "/",
},
},
"non-resource api prefix": {
Verb: "GET",
Path: "/api/",
ExpectedAttributes: &authorizer.AttributesRecord{
Verb: "get",
Path: "/api/",
},
},
"non-resource group api prefix": {
Verb: "GET",
Path: "/apis/extensions/",
ExpectedAttributes: &authorizer.AttributesRecord{
Verb: "get",
Path: "/apis/extensions/",
},
},
"resource": {
Verb: "POST",
Path: "/api/v1/nodes/mynode",
ExpectedAttributes: &authorizer.AttributesRecord{
Verb: "create",
Path: "/api/v1/nodes/mynode",
ResourceRequest: true,
Resource: "nodes",
APIVersion: "v1",
Name: "mynode",
},
},
"namespaced resource": {
Verb: "PUT",
Path: "/api/v1/namespaces/myns/pods/mypod",
ExpectedAttributes: &authorizer.AttributesRecord{
Verb: "update",
Path: "/api/v1/namespaces/myns/pods/mypod",
ResourceRequest: true,
Namespace: "myns",
Resource: "pods",
APIVersion: "v1",
Name: "mypod",
},
},
"API group resource": {
Verb: "GET",
Path: "/apis/batch/v1/namespaces/myns/jobs",
ExpectedAttributes: &authorizer.AttributesRecord{
Verb: "list",
Path: "/apis/batch/v1/namespaces/myns/jobs",
ResourceRequest: true,
APIGroup: batch.GroupName,
APIVersion: "v1",
Namespace: "myns",
Resource: "jobs",
},
},
}
for k, tc := range testcases {
req, _ := http.NewRequest(tc.Verb, tc.Path, nil)
req.RemoteAddr = "127.0.0.1"
var attribs authorizer.Attributes
var err error
var handler http.Handler = http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
ctx, ok := mapper.Get(req)
if !ok {
internalError(w, req, errors.New("no context found for request"))
return
}
attribs, err = GetAuthorizerAttributes(ctx)
})
handler = WithRequestInfo(handler, newTestRequestInfoResolver(), mapper)
handler = api.WithRequestContext(handler, mapper)
handler.ServeHTTP(httptest.NewRecorder(), req)
if err != nil {
t.Errorf("%s: unexpected error: %v", k, err)
} else if !reflect.DeepEqual(attribs, tc.ExpectedAttributes) {
t.Errorf("%s: expected\n\t%#v\ngot\n\t%#v", k, tc.ExpectedAttributes, attribs)
}
}
}
| {'content_hash': 'a90ebdbc67805448474015657bf6cb48', 'timestamp': '', 'source': 'github', 'line_count': 114, 'max_line_length': 94, 'avg_line_length': 25.412280701754387, 'alnum_prop': 0.6089057645840524, 'repo_name': 'mhzed/kubernetes', 'id': '488b199aa8c3539afc83263e1b0992a0439097ea', 'size': '3466', 'binary': False, 'copies': '8', 'ref': 'refs/heads/master', 'path': 'pkg/apiserver/filters/authorization_test.go', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'C', 'bytes': '978'}, {'name': 'Go', 'bytes': '45816206'}, {'name': 'HTML', 'bytes': '2530951'}, {'name': 'Makefile', 'bytes': '74586'}, {'name': 'Nginx', 'bytes': '1013'}, {'name': 'Protocol Buffer', 'bytes': '589692'}, {'name': 'Python', 'bytes': '955726'}, {'name': 'SaltStack', 'bytes': '54505'}, {'name': 'Shell', 'bytes': '1576715'}]} |
<!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_17) on Sun Nov 03 15:35:43 CET 2013 -->
<title>ArrayMap (libgdx API)</title>
<meta name="date" content="2013-11-03">
<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="ArrayMap (libgdx API)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/ArrayMap.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><em>
libgdx API
<style>
body, td, th { font-family:Helvetica, Tahoma, Arial, sans-serif; font-size:10pt }
pre, code, tt { font-size:9pt; font-family:Lucida Console, Courier New, sans-serif }
h1, h2, h3, .FrameTitleFont, .FrameHeadingFont, .TableHeadingColor font { font-size:105%; font-weight:bold }
.TableHeadingColor { background:#EEEEFF; }
a { text-decoration:none }
a:hover { text-decoration:underline }
a:link, a:visited { color:blue }
table { border:0px }
.TableRowColor td:first-child { border-left:1px solid black }
.TableRowColor td { border:0px; border-bottom:1px solid black; border-right:1px solid black }
hr { border:0px; border-bottom:1px solid #333366; }
</style>
</em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../com/badlogic/gdx/utils/Array.ArrayIterator.html" title="class in com.badlogic.gdx.utils"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../com/badlogic/gdx/utils/ArrayMap.Entries.html" title="class in com.badlogic.gdx.utils"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?com/badlogic/gdx/utils/ArrayMap.html" target="_top">Frames</a></li>
<li><a href="ArrayMap.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li><a href="#nested_class_summary">Nested</a> | </li>
<li><a href="#field_summary">Field</a> | </li>
<li><a href="#constructor_summary">Constr</a> | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li><a href="#field_detail">Field</a> | </li>
<li><a href="#constructor_detail">Constr</a> | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">com.badlogic.gdx.utils</div>
<h2 title="Class ArrayMap" class="title">Class ArrayMap<K,V></h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>com.badlogic.gdx.utils.ArrayMap<K,V></li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="strong">ArrayMap<K,V></span>
extends java.lang.Object</pre>
<div class="block">An ordered or unordered map of objects. This implementation uses arrays to store the keys and values, which means
<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#getKey(V, boolean)"><code>gets</code></a> do a comparison for each key in the map. This is slower than a typical hash map
implementation, but may be acceptable for small maps and has the benefits that keys and values can be accessed by index, which
makes iteration fast. Like <a href="../../../../com/badlogic/gdx/utils/Array.html" title="class in com.badlogic.gdx.utils"><code>Array</code></a>, if ordered is false, * this class avoids a memory copy when removing elements (the
last element is moved to the removed element's position).</div>
<dl><dt><span class="strong">Author:</span></dt>
<dd>Nathan Sweet</dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested_class_summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class </code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.Entries.html" title="class in com.badlogic.gdx.utils">ArrayMap.Entries</a><<a href="../../../../com/badlogic/gdx/utils/ArrayMap.Entries.html" title="type parameter in ArrayMap.Entries">K</a>,<a href="../../../../com/badlogic/gdx/utils/ArrayMap.Entries.html" title="type parameter in ArrayMap.Entries">V</a>></strong></code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static class </code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.Keys.html" title="class in com.badlogic.gdx.utils">ArrayMap.Keys</a><<a href="../../../../com/badlogic/gdx/utils/ArrayMap.Keys.html" title="type parameter in ArrayMap.Keys">K</a>></strong></code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class </code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.Values.html" title="class in com.badlogic.gdx.utils">ArrayMap.Values</a><<a href="../../../../com/badlogic/gdx/utils/ArrayMap.Values.html" title="type parameter in ArrayMap.Values">V</a>></strong></code> </td>
</tr>
</table>
</li>
</ul>
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">K</a>[]</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#keys">keys</a></strong></code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#ordered">ordered</a></strong></code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#size">size</a></strong></code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">V</a>[]</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#values">values</a></strong></code> </td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#ArrayMap()">ArrayMap</a></strong>()</code>
<div class="block">Creates an ordered map with a capacity of 16.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#ArrayMap(com.badlogic.gdx.utils.ArrayMap)">ArrayMap</a></strong>(<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="class in com.badlogic.gdx.utils">ArrayMap</a> array)</code>
<div class="block">Creates a new map containing the elements in the specified map.</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#ArrayMap(boolean, int)">ArrayMap</a></strong>(boolean ordered,
int capacity)</code> </td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#ArrayMap(boolean, int, java.lang.Class, java.lang.Class)">ArrayMap</a></strong>(boolean ordered,
int capacity,
java.lang.Class keyArrayType,
java.lang.Class valueArrayType)</code>
<div class="block">Creates a new map with <a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#keys"><code>keys</code></a> and <a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#values"><code>values</code></a> of the specified type.</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#ArrayMap(java.lang.Class, java.lang.Class)">ArrayMap</a></strong>(java.lang.Class keyArrayType,
java.lang.Class valueArrayType)</code>
<div class="block">Creates an ordered map with <a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#keys"><code>keys</code></a> and <a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#values"><code>values</code></a> of the specified type and a capacity of 16.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#ArrayMap(int)">ArrayMap</a></strong>(int capacity)</code>
<div class="block">Creates an ordered map with the specified capacity.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#clear()">clear</a></strong>()</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#clear(int)">clear</a></strong>(int maximumCapacity)</code>
<div class="block">Clears the map and reduces the size of the backing arrays to be the specified capacity if they are larger.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#containsKey(K)">containsKey</a></strong>(<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">K</a> key)</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#containsValue(V, boolean)">containsValue</a></strong>(<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">V</a> value,
boolean identity)</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#ensureCapacity(int)">ensureCapacity</a></strong>(int additionalCapacity)</code>
<div class="block">Increases the size of the backing arrays to acommodate the specified number of additional entries.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/utils/ArrayMap.Entries.html" title="class in com.badlogic.gdx.utils">ArrayMap.Entries</a><<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">K</a>,<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">V</a>></code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#entries()">entries</a></strong>()</code>
<div class="block">Returns an iterator for the entries in the map.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">K</a></code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#firstKey()">firstKey</a></strong>()</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">V</a></code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#firstValue()">firstValue</a></strong>()</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">V</a></code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#get(K)">get</a></strong>(<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">K</a> key)</code>
<div class="block">Returns the value for the specified key.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">K</a></code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#getKey(V, boolean)">getKey</a></strong>(<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">V</a> value,
boolean identity)</code>
<div class="block">Returns the key for the specified value.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">K</a></code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#getKeyAt(int)">getKeyAt</a></strong>(int index)</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">V</a></code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#getValueAt(int)">getValueAt</a></strong>(int index)</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#indexOfKey(K)">indexOfKey</a></strong>(<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">K</a> key)</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#indexOfValue(V, boolean)">indexOfValue</a></strong>(<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">V</a> value,
boolean identity)</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#insert(int, K, V)">insert</a></strong>(int index,
<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">K</a> key,
<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">V</a> value)</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/utils/ArrayMap.Keys.html" title="class in com.badlogic.gdx.utils">ArrayMap.Keys</a><<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">K</a>></code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#keys()">keys</a></strong>()</code>
<div class="block">Returns an iterator for the keys in the map.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">K</a></code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#peekKey()">peekKey</a></strong>()</code>
<div class="block">Returns the last key.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">V</a></code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#peekValue()">peekValue</a></strong>()</code>
<div class="block">Returns the last value.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#put(K, V)">put</a></strong>(<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">K</a> key,
<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">V</a> value)</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#put(K, V, int)">put</a></strong>(<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">K</a> key,
<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">V</a> value,
int index)</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#putAll(com.badlogic.gdx.utils.ArrayMap)">putAll</a></strong>(<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="class in com.badlogic.gdx.utils">ArrayMap</a> map)</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#putAll(com.badlogic.gdx.utils.ArrayMap, int, int)">putAll</a></strong>(<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="class in com.badlogic.gdx.utils">ArrayMap</a> map,
int offset,
int length)</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#removeIndex(int)">removeIndex</a></strong>(int index)</code>
<div class="block">Removes and returns the key/values pair at the specified index.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">V</a></code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#removeKey(K)">removeKey</a></strong>(<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">K</a> key)</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#removeValue(V, boolean)">removeValue</a></strong>(<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">V</a> value,
boolean identity)</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#resize(int)">resize</a></strong>(int newSize)</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#reverse()">reverse</a></strong>()</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#setKey(int, K)">setKey</a></strong>(int index,
<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">K</a> key)</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#setValue(int, V)">setValue</a></strong>(int index,
<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">V</a> value)</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#shrink()">shrink</a></strong>()</code>
<div class="block">Reduces the size of the backing arrays to the size of the actual number of entries.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#shuffle()">shuffle</a></strong>()</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#toString()">toString</a></strong>()</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#truncate(int)">truncate</a></strong>(int newSize)</code>
<div class="block">Reduces the size of the arrays to the specified size.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/utils/ArrayMap.Values.html" title="class in com.badlogic.gdx.utils">ArrayMap.Values</a><<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">V</a>></code></td>
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#values()">values</a></strong>()</code>
<div class="block">Returns an iterator for the values in the map.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="keys">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>keys</h4>
<pre>public <a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">K</a>[] keys</pre>
</li>
</ul>
<a name="values">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>values</h4>
<pre>public <a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">V</a>[] values</pre>
</li>
</ul>
<a name="size">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>size</h4>
<pre>public int size</pre>
</li>
</ul>
<a name="ordered">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>ordered</h4>
<pre>public boolean ordered</pre>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="ArrayMap()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ArrayMap</h4>
<pre>public ArrayMap()</pre>
<div class="block">Creates an ordered map with a capacity of 16.</div>
</li>
</ul>
<a name="ArrayMap(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ArrayMap</h4>
<pre>public ArrayMap(int capacity)</pre>
<div class="block">Creates an ordered map with the specified capacity.</div>
</li>
</ul>
<a name="ArrayMap(boolean, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ArrayMap</h4>
<pre>public ArrayMap(boolean ordered,
int capacity)</pre>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>ordered</code> - If false, methods that remove elements may change the order of other elements in the arrays, which avoids a
memory copy.</dd><dd><code>capacity</code> - Any elements added beyond this will cause the backing arrays to be grown.</dd></dl>
</li>
</ul>
<a name="ArrayMap(boolean, int, java.lang.Class, java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ArrayMap</h4>
<pre>public ArrayMap(boolean ordered,
int capacity,
java.lang.Class keyArrayType,
java.lang.Class valueArrayType)</pre>
<div class="block">Creates a new map with <a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#keys"><code>keys</code></a> and <a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#values"><code>values</code></a> of the specified type.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>ordered</code> - If false, methods that remove elements may change the order of other elements in the arrays, which avoids a
memory copy.</dd><dd><code>capacity</code> - Any elements added beyond this will cause the backing arrays to be grown.</dd></dl>
</li>
</ul>
<a name="ArrayMap(java.lang.Class, java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ArrayMap</h4>
<pre>public ArrayMap(java.lang.Class keyArrayType,
java.lang.Class valueArrayType)</pre>
<div class="block">Creates an ordered map with <a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#keys"><code>keys</code></a> and <a href="../../../../com/badlogic/gdx/utils/ArrayMap.html#values"><code>values</code></a> of the specified type and a capacity of 16.</div>
</li>
</ul>
<a name="ArrayMap(com.badlogic.gdx.utils.ArrayMap)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>ArrayMap</h4>
<pre>public ArrayMap(<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="class in com.badlogic.gdx.utils">ArrayMap</a> array)</pre>
<div class="block">Creates a new map containing the elements in the specified map. The new map will have the same type of backing arrays and
will be ordered if the specified map is ordered. The capacity is set to the number of elements, so any subsequent elements
added will cause the backing arrays to be grown.</div>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="put(java.lang.Object,java.lang.Object)">
<!-- -->
</a><a name="put(K, V)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>put</h4>
<pre>public void put(<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">K</a> key,
<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">V</a> value)</pre>
</li>
</ul>
<a name="put(java.lang.Object,java.lang.Object,int)">
<!-- -->
</a><a name="put(K, V, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>put</h4>
<pre>public void put(<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">K</a> key,
<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">V</a> value,
int index)</pre>
</li>
</ul>
<a name="putAll(com.badlogic.gdx.utils.ArrayMap)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putAll</h4>
<pre>public void putAll(<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="class in com.badlogic.gdx.utils">ArrayMap</a> map)</pre>
</li>
</ul>
<a name="putAll(com.badlogic.gdx.utils.ArrayMap, int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putAll</h4>
<pre>public void putAll(<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="class in com.badlogic.gdx.utils">ArrayMap</a> map,
int offset,
int length)</pre>
</li>
</ul>
<a name="get(java.lang.Object)">
<!-- -->
</a><a name="get(K)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>get</h4>
<pre>public <a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">V</a> get(<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">K</a> key)</pre>
<div class="block">Returns the value for the specified key. Note this does a .equals() comparison of each key in reverse order until the
specified key is found.</div>
</li>
</ul>
<a name="getKey(java.lang.Object,boolean)">
<!-- -->
</a><a name="getKey(V, boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getKey</h4>
<pre>public <a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">K</a> getKey(<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">V</a> value,
boolean identity)</pre>
<div class="block">Returns the key for the specified value. Note this does a comparison of each value in reverse order until the specified
value is found.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>identity</code> - If true, == comparison will be used. If false, .equals() comaparison will be used.</dd></dl>
</li>
</ul>
<a name="getKeyAt(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getKeyAt</h4>
<pre>public <a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">K</a> getKeyAt(int index)</pre>
</li>
</ul>
<a name="getValueAt(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getValueAt</h4>
<pre>public <a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">V</a> getValueAt(int index)</pre>
</li>
</ul>
<a name="firstKey()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>firstKey</h4>
<pre>public <a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">K</a> firstKey()</pre>
</li>
</ul>
<a name="firstValue()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>firstValue</h4>
<pre>public <a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">V</a> firstValue()</pre>
</li>
</ul>
<a name="setKey(int,java.lang.Object)">
<!-- -->
</a><a name="setKey(int, K)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setKey</h4>
<pre>public void setKey(int index,
<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">K</a> key)</pre>
</li>
</ul>
<a name="setValue(int,java.lang.Object)">
<!-- -->
</a><a name="setValue(int, V)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setValue</h4>
<pre>public void setValue(int index,
<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">V</a> value)</pre>
</li>
</ul>
<a name="insert(int,java.lang.Object,java.lang.Object)">
<!-- -->
</a><a name="insert(int, K, V)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>insert</h4>
<pre>public void insert(int index,
<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">K</a> key,
<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">V</a> value)</pre>
</li>
</ul>
<a name="containsKey(java.lang.Object)">
<!-- -->
</a><a name="containsKey(K)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>containsKey</h4>
<pre>public boolean containsKey(<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">K</a> key)</pre>
</li>
</ul>
<a name="containsValue(java.lang.Object,boolean)">
<!-- -->
</a><a name="containsValue(V, boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>containsValue</h4>
<pre>public boolean containsValue(<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">V</a> value,
boolean identity)</pre>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>identity</code> - If true, == comparison will be used. If false, .equals() comaparison will be used.</dd></dl>
</li>
</ul>
<a name="indexOfKey(java.lang.Object)">
<!-- -->
</a><a name="indexOfKey(K)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>indexOfKey</h4>
<pre>public int indexOfKey(<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">K</a> key)</pre>
</li>
</ul>
<a name="indexOfValue(java.lang.Object,boolean)">
<!-- -->
</a><a name="indexOfValue(V, boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>indexOfValue</h4>
<pre>public int indexOfValue(<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">V</a> value,
boolean identity)</pre>
</li>
</ul>
<a name="removeKey(java.lang.Object)">
<!-- -->
</a><a name="removeKey(K)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeKey</h4>
<pre>public <a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">V</a> removeKey(<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">K</a> key)</pre>
</li>
</ul>
<a name="removeValue(java.lang.Object,boolean)">
<!-- -->
</a><a name="removeValue(V, boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeValue</h4>
<pre>public boolean removeValue(<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">V</a> value,
boolean identity)</pre>
</li>
</ul>
<a name="removeIndex(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeIndex</h4>
<pre>public void removeIndex(int index)</pre>
<div class="block">Removes and returns the key/values pair at the specified index.</div>
</li>
</ul>
<a name="peekKey()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>peekKey</h4>
<pre>public <a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">K</a> peekKey()</pre>
<div class="block">Returns the last key.</div>
</li>
</ul>
<a name="peekValue()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>peekValue</h4>
<pre>public <a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">V</a> peekValue()</pre>
<div class="block">Returns the last value.</div>
</li>
</ul>
<a name="clear(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>clear</h4>
<pre>public void clear(int maximumCapacity)</pre>
<div class="block">Clears the map and reduces the size of the backing arrays to be the specified capacity if they are larger.</div>
</li>
</ul>
<a name="clear()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>clear</h4>
<pre>public void clear()</pre>
</li>
</ul>
<a name="shrink()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>shrink</h4>
<pre>public void shrink()</pre>
<div class="block">Reduces the size of the backing arrays to the size of the actual number of entries. This is useful to release memory when
many items have been removed, or if it is known that more entries will not be added.</div>
</li>
</ul>
<a name="ensureCapacity(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ensureCapacity</h4>
<pre>public void ensureCapacity(int additionalCapacity)</pre>
<div class="block">Increases the size of the backing arrays to acommodate the specified number of additional entries. Useful before adding many
entries to avoid multiple backing array resizes.</div>
</li>
</ul>
<a name="resize(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>resize</h4>
<pre>protected void resize(int newSize)</pre>
</li>
</ul>
<a name="reverse()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>reverse</h4>
<pre>public void reverse()</pre>
</li>
</ul>
<a name="shuffle()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>shuffle</h4>
<pre>public void shuffle()</pre>
</li>
</ul>
<a name="truncate(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>truncate</h4>
<pre>public void truncate(int newSize)</pre>
<div class="block">Reduces the size of the arrays to the specified size. If the arrays are already smaller than the specified size, no action
is taken.</div>
</li>
</ul>
<a name="toString()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre>public java.lang.String toString()</pre>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code>toString</code> in class <code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
<a name="entries()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>entries</h4>
<pre>public <a href="../../../../com/badlogic/gdx/utils/ArrayMap.Entries.html" title="class in com.badlogic.gdx.utils">ArrayMap.Entries</a><<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">K</a>,<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">V</a>> entries()</pre>
<div class="block">Returns an iterator for the entries in the map. Remove is supported. Note that the same iterator instance is returned each
time this method is called. Use the <a href="../../../../com/badlogic/gdx/utils/ArrayMap.Entries.html" title="class in com.badlogic.gdx.utils"><code>ArrayMap.Entries</code></a> constructor for nested or multithreaded iteration.</div>
</li>
</ul>
<a name="values()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>values</h4>
<pre>public <a href="../../../../com/badlogic/gdx/utils/ArrayMap.Values.html" title="class in com.badlogic.gdx.utils">ArrayMap.Values</a><<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">V</a>> values()</pre>
<div class="block">Returns an iterator for the values in the map. Remove is supported. Note that the same iterator instance is returned each
time this method is called. Use the <a href="../../../../com/badlogic/gdx/utils/ArrayMap.Entries.html" title="class in com.badlogic.gdx.utils"><code>ArrayMap.Entries</code></a> constructor for nested or multithreaded iteration.</div>
</li>
</ul>
<a name="keys()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>keys</h4>
<pre>public <a href="../../../../com/badlogic/gdx/utils/ArrayMap.Keys.html" title="class in com.badlogic.gdx.utils">ArrayMap.Keys</a><<a href="../../../../com/badlogic/gdx/utils/ArrayMap.html" title="type parameter in ArrayMap">K</a>> keys()</pre>
<div class="block">Returns an iterator for the keys in the map. Remove is supported. Note that the same iterator instance is returned each time
this method is called. Use the <a href="../../../../com/badlogic/gdx/utils/ArrayMap.Entries.html" title="class in com.badlogic.gdx.utils"><code>ArrayMap.Entries</code></a> constructor for nested or multithreaded iteration.</div>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/ArrayMap.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><em>libgdx API</em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../com/badlogic/gdx/utils/Array.ArrayIterator.html" title="class in com.badlogic.gdx.utils"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../com/badlogic/gdx/utils/ArrayMap.Entries.html" title="class in com.badlogic.gdx.utils"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?com/badlogic/gdx/utils/ArrayMap.html" target="_top">Frames</a></li>
<li><a href="ArrayMap.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li><a href="#nested_class_summary">Nested</a> | </li>
<li><a href="#field_summary">Field</a> | </li>
<li><a href="#constructor_summary">Constr</a> | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li><a href="#field_detail">Field</a> | </li>
<li><a href="#constructor_detail">Constr</a> | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>
<div style="font-size:9pt"><i>
Copyright © 2010-2013 Mario Zechner ([email protected]), Nathan Sweet ([email protected])
</i></div>
</small></p>
</body>
</html>
| {'content_hash': 'feb340adc1a4874f4a61fc2cdcc28621', 'timestamp': '', 'source': 'github', 'line_count': 1009, 'max_line_length': 427, 'avg_line_length': 44.569871159563924, 'alnum_prop': 0.6514642769784973, 'repo_name': 'petree28/Flappy-Dragon', 'id': 'ec15e0a5796466d76e1616021d4aba1f66a772af', 'size': '44971', 'binary': False, 'copies': '4', 'ref': 'refs/heads/master', 'path': 'docs/api/com/badlogic/gdx/utils/ArrayMap.html', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '11139'}, {'name': 'Java', 'bytes': '120460'}]} |
<?php
require_once(__CA_LIB_DIR__."/core/Parsers/htmlpurifier/HTMLPurifier.standalone.php");
require_once(__CA_LIB_DIR__."/core/Error.php");
class ErrorController extends ActionController {
# -------------------------------------------------------
# -------------------------------------------------------
function Show() {
$o_purify = new HTMLPurifier();
$va_nums = explode(';', $this->request->getParameter('n', pString));
$va_error_messages = array();
if (is_array($va_nums)) {
$o_err = new Error(0, '', '', '', false, false);
foreach($va_nums as $vn_error_number) {
$o_err->setError($vn_error_number, '', '', false, false);
$va_error_messages[] = $o_err->getErrorMessage();
}
}
$this->view->setVar('error_messages', $va_error_messages);
$this->view->setVar('referrer', $o_purify->purify($this->request->getParameter('r', pString)));
$this->render('error_html.php');
}
# -------------------------------------------------------
}
?> | {'content_hash': '42a334287604b1055417d49fc86bc540', 'timestamp': '', 'source': 'github', 'line_count': 30, 'max_line_length': 99, 'avg_line_length': 34.43333333333333, 'alnum_prop': 0.49080348499515974, 'repo_name': 'PreserveLafayette/PreserveLafayette', 'id': '28d6e364b0dab26b3381f89543a42fd8490307fa', 'size': '2233', 'binary': False, 'copies': '10', 'ref': 'refs/heads/master', 'path': 'app/controllers/system/ErrorController.php', 'mode': '33261', 'license': 'mit', 'language': [{'name': 'PHP', 'bytes': '28850'}]} |
'use strict';
goog.provide('Blockly.Msg.tlh');
goog.require('Blockly.Msg');
Blockly.Msg.ADD_COMMENT = "QInHom chel";
Blockly.Msg.CHANGE_VALUE_TITLE = "choH:";
Blockly.Msg.CLEAN_UP = "ngoghmeyvaD tlhegh rurmoH";
Blockly.Msg.COLLAPSE_ALL = "ngoghmey DejmoH";
Blockly.Msg.COLLAPSE_BLOCK = "ngogh DejmoH";
Blockly.Msg.COLOUR_BLEND_COLOUR1 = "rItlh wa'";
Blockly.Msg.COLOUR_BLEND_COLOUR2 = "rItlh cha'";
Blockly.Msg.COLOUR_BLEND_HELPURL = "http://meyerweb.com/eric/tools/color-blend/"; // untranslated
Blockly.Msg.COLOUR_BLEND_RATIO = "'ar";
Blockly.Msg.COLOUR_BLEND_TITLE = "DuD";
Blockly.Msg.COLOUR_BLEND_TOOLTIP = "Blends two colours together with a given ratio (0.0 - 1.0)."; // untranslated
Blockly.Msg.COLOUR_PICKER_HELPURL = "https://en.wikipedia.org/wiki/Color"; // untranslated
Blockly.Msg.COLOUR_PICKER_TOOLTIP = "Choose a colour from the palette."; // untranslated
Blockly.Msg.COLOUR_RANDOM_HELPURL = "http://randomcolour.com"; // untranslated
Blockly.Msg.COLOUR_RANDOM_TITLE = "rItlh vISaHbe'";
Blockly.Msg.COLOUR_RANDOM_TOOLTIP = "Choose a colour at random."; // untranslated
Blockly.Msg.COLOUR_RGB_BLUE = "chal rItlh";
Blockly.Msg.COLOUR_RGB_GREEN = "tI rItlh";
Blockly.Msg.COLOUR_RGB_HELPURL = "http://www.december.com/html/spec/colorper.html"; // untranslated
Blockly.Msg.COLOUR_RGB_RED = "'Iw rItlh";
Blockly.Msg.COLOUR_RGB_TITLE = "rItlh wIv";
Blockly.Msg.COLOUR_RGB_TOOLTIP = "Create a colour with the specified amount of red, green, and blue. All values must be between 0 and 100."; // untranslated
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "gho Haw'";
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "gho taHqa'";
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Break out of the containing loop."; // untranslated
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Skip the rest of this loop, and continue with the next iteration."; // untranslated
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "yIqIm! ghoDaq neH ngoghvam lo'laH vay'.";
Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated
Blockly.Msg.CONTROLS_FOREACH_TITLE = "ngIq Doch %1 ngaSbogh tetlh %2 nuDDI'";
Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "For each item in a list, set the variable '%1' to the item, and then do some statements."; // untranslated
Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated
Blockly.Msg.CONTROLS_FOR_TITLE = "togh %1 mung %2 ghoch %3 Do %4";
Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Have the variable '%1' take on the values from the start number to the end number, counting by the specified interval, and do the specified blocks."; // untranslated
Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Add a condition to the if block."; // untranslated
Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Add a final, catch-all condition to the if block."; // untranslated
Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated
Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Add, remove, or reorder sections to reconfigure this if block."; // untranslated
Blockly.Msg.CONTROLS_IF_MSG_ELSE = "pagh";
Blockly.Msg.CONTROLS_IF_MSG_ELSEIF = "pagh teHchugh";
Blockly.Msg.CONTROLS_IF_MSG_IF = "teHchugh";
Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "If a value is true, then do some statements."; // untranslated
Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "If a value is true, then do the first block of statements. Otherwise, do the second block of statements."; // untranslated
Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "If the first value is true, then do the first block of statements. Otherwise, if the second value is true, do the second block of statements."; // untranslated
Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "If the first value is true, then do the first block of statements. Otherwise, if the second value is true, do the second block of statements. If none of the values are true, do the last block of statements."; // untranslated
Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://en.wikipedia.org/wiki/For_loop"; // untranslated
Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "ruch";
Blockly.Msg.CONTROLS_REPEAT_TITLE = "%1-logh qaSmoH";
Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Do some statements several times."; // untranslated
Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated
Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "teHpa' qaSmoH";
Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "teHtaHvIS qaSmoH";
Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "While a value is false, then do some statements."; // untranslated
Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "While a value is true, then do some statements."; // untranslated
Blockly.Msg.DELETE_ALL_BLOCKS = "Hoch %1 ngoghmey Qaw'?";
Blockly.Msg.DELETE_BLOCK = "ngogh Qaw'";
Blockly.Msg.DELETE_VARIABLE = "Delete the '%1' variable"; // untranslated
Blockly.Msg.DELETE_VARIABLE_CONFIRMATION = "Delete %1 uses of the '%2' variable?"; // untranslated
Blockly.Msg.DELETE_X_BLOCKS = "%1 ngoghmey Qaw'";
Blockly.Msg.DISABLE_BLOCK = "ngogh Qotlh";
Blockly.Msg.DUPLICATE_BLOCK = "velqa' chenmoH";
Blockly.Msg.ENABLE_BLOCK = "ngogh QotlhHa'";
Blockly.Msg.EXPAND_ALL = "ngoghmey DejHa'moH";
Blockly.Msg.EXPAND_BLOCK = "ngogh DejHa'moH";
Blockly.Msg.EXTERNAL_INPUTS = "Hur rar";
Blockly.Msg.HELP = "QaH";
Blockly.Msg.INLINE_INPUTS = "qoD rar";
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "tetlh chIm";
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Returns a list, of length 0, containing no data records"; // untranslated
Blockly.Msg.LISTS_CREATE_WITH_CONTAINER_TITLE_ADD = "tetlh";
Blockly.Msg.LISTS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this list block."; // untranslated
Blockly.Msg.LISTS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-list-with"; // untranslated
Blockly.Msg.LISTS_CREATE_WITH_INPUT_WITH = "tetlh ghom";
Blockly.Msg.LISTS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the list."; // untranslated
Blockly.Msg.LISTS_CREATE_WITH_TOOLTIP = "Create a list with any number of items."; // untranslated
Blockly.Msg.LISTS_GET_INDEX_FIRST = "wa'DIch";
Blockly.Msg.LISTS_GET_INDEX_FROM_END = "# Qav";
Blockly.Msg.LISTS_GET_INDEX_FROM_START = "#";
Blockly.Msg.LISTS_GET_INDEX_GET = "Suq";
Blockly.Msg.LISTS_GET_INDEX_GET_REMOVE = "Suq vaj pej";
Blockly.Msg.LISTS_GET_INDEX_LAST = "Qav";
Blockly.Msg.LISTS_GET_INDEX_RANDOM = "Sahbe'";
Blockly.Msg.LISTS_GET_INDEX_REMOVE = "pej";
Blockly.Msg.LISTS_GET_INDEX_TAIL = "";
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FIRST = "Returns the first item in a list."; // untranslated
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM = "Returns the item at the specified position in a list."; // untranslated
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_LAST = "Returns the last item in a list."; // untranslated
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM = "Returns a random item in a list."; // untranslated
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FIRST = "Removes and returns the first item in a list."; // untranslated
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM = "Removes and returns the item at the specified position in a list."; // untranslated
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_LAST = "Removes and returns the last item in a list."; // untranslated
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM = "Removes and returns a random item in a list."; // untranslated
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FIRST = "Removes the first item in a list."; // untranslated
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM = "Removes the item at the specified position in a list."; // untranslated
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_LAST = "Removes the last item in a list."; // untranslated
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_RANDOM = "Removes a random item in a list."; // untranslated
Blockly.Msg.LISTS_GET_SUBLIST_END_FROM_END = "mojaQ # Qav";
Blockly.Msg.LISTS_GET_SUBLIST_END_FROM_START = "mojaQ #";
Blockly.Msg.LISTS_GET_SUBLIST_END_LAST = "mojaQ Qav";
Blockly.Msg.LISTS_GET_SUBLIST_HELPURL = "https://github.com/google/blockly/wiki/Lists#getting-a-sublist"; // untranslated
Blockly.Msg.LISTS_GET_SUBLIST_START_FIRST = "tetlhHom moHaq wa'DIch";
Blockly.Msg.LISTS_GET_SUBLIST_START_FROM_END = "tetlhHom moHaq # Qav";
Blockly.Msg.LISTS_GET_SUBLIST_START_FROM_START = "tetlhHom moHaq #";
Blockly.Msg.LISTS_GET_SUBLIST_TAIL = "Suq";
Blockly.Msg.LISTS_GET_SUBLIST_TOOLTIP = "Creates a copy of the specified portion of a list."; // untranslated
Blockly.Msg.LISTS_INDEX_FROM_END_TOOLTIP = "%1 is the last item."; // untranslated
Blockly.Msg.LISTS_INDEX_FROM_START_TOOLTIP = "%1 is the first item."; // untranslated
Blockly.Msg.LISTS_INDEX_OF_FIRST = "Doch sam wa'DIch";
Blockly.Msg.LISTS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Lists#getting-items-from-a-list"; // untranslated
Blockly.Msg.LISTS_INDEX_OF_LAST = "Doch sam Qav";
Blockly.Msg.LISTS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the list. Returns %1 if item is not found."; // untranslated
Blockly.Msg.LISTS_INLIST = "tetlhDaq";
Blockly.Msg.LISTS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#is-empty"; // untranslated
Blockly.Msg.LISTS_ISEMPTY_TITLE = "%1 chIm'a'";
Blockly.Msg.LISTS_ISEMPTY_TOOLTIP = "Returns true if the list is empty."; // untranslated
Blockly.Msg.LISTS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Lists#length-of"; // untranslated
Blockly.Msg.LISTS_LENGTH_TITLE = "chuq %1";
Blockly.Msg.LISTS_LENGTH_TOOLTIP = "Returns the length of a list."; // untranslated
Blockly.Msg.LISTS_REPEAT_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-list-with"; // untranslated
Blockly.Msg.LISTS_REPEAT_TITLE = "tetlh ghom %2 Dochmey %1 pus";
Blockly.Msg.LISTS_REPEAT_TOOLTIP = "Creates a list consisting of the given value repeated the specified number of times."; // untranslated
Blockly.Msg.LISTS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Lists#in-list--set"; // untranslated
Blockly.Msg.LISTS_SET_INDEX_INPUT_TO = "Dos";
Blockly.Msg.LISTS_SET_INDEX_INSERT = "lIH";
Blockly.Msg.LISTS_SET_INDEX_SET = "choH";
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FIRST = "Inserts the item at the start of a list."; // untranslated
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FROM = "Inserts the item at the specified position in a list."; // untranslated
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_LAST = "Append the item to the end of a list."; // untranslated
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_RANDOM = "Inserts the item randomly in a list."; // untranslated
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FIRST = "Sets the first item in a list."; // untranslated
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM = "Sets the item at the specified position in a list."; // untranslated
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Sets the last item in a list."; // untranslated
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Sets a random item in a list."; // untranslated
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "tetlh ghermeH ghItlh wav";
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "ghItlh chenmoHmeH tetlh gherHa'";
Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Join a list of texts into one text, separated by a delimiter."; // untranslated
Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Split text into a list of texts, breaking at each delimiter."; // untranslated
Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "rarwI'Hom lo'";
Blockly.Msg.LOGIC_BOOLEAN_FALSE = "teHbe'";
Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated
Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Returns either true or false."; // untranslated
Blockly.Msg.LOGIC_BOOLEAN_TRUE = "teH";
Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://en.wikipedia.org/wiki/Inequality_(mathematics)"; // untranslated
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Return true if both inputs equal each other."; // untranslated
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Return true if the first input is greater than the second input."; // untranslated
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Return true if the first input is greater than or equal to the second input."; // untranslated
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Return true if the first input is smaller than the second input."; // untranslated
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Return true if the first input is smaller than or equal to the second input."; // untranslated
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Return true if both inputs are not equal to each other."; // untranslated
Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated
Blockly.Msg.LOGIC_NEGATE_TITLE = "yoymoH %1";
Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Returns true if the input is false. Returns false if the input is true."; // untranslated
Blockly.Msg.LOGIC_NULL = "paghna'";
Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated
Blockly.Msg.LOGIC_NULL_TOOLTIP = "Returns null."; // untranslated
Blockly.Msg.LOGIC_OPERATION_AND = "'ej";
Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated
Blockly.Msg.LOGIC_OPERATION_OR = "qoj";
Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Return true if both inputs are true."; // untranslated
Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Return true if at least one of the inputs is true."; // untranslated
Blockly.Msg.LOGIC_TERNARY_CONDITION = "chov";
Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; // untranslated
Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "teHbe'chugh";
Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "teHchugh";
Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Check the condition in 'test'. If the condition is true, returns the 'if true' value; otherwise returns the 'if false' value."; // untranslated
Blockly.Msg.MATH_ADDITION_SYMBOL = "+";
Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://en.wikipedia.org/wiki/Arithmetic"; // untranslated
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Return the sum of the two numbers."; // untranslated
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Return the quotient of the two numbers."; // untranslated
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Return the difference of the two numbers."; // untranslated
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY = "Return the product of the two numbers."; // untranslated
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Return the first number raised to the power of the second number."; // untranslated
Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter"; // untranslated
Blockly.Msg.MATH_CHANGE_TITLE = "choH %1 chel %2";
Blockly.Msg.MATH_CHANGE_TOOLTIP = "Add a number to variable '%1'."; // untranslated
Blockly.Msg.MATH_CONSTANT_HELPURL = "https://en.wikipedia.org/wiki/Mathematical_constant"; // untranslated
Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Return one of the common constants: π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), or ∞ (infinity)."; // untranslated
Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated
Blockly.Msg.MATH_CONSTRAIN_TITLE = "jon %1 bIng %2 Dung %3";
Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Constrain a number to be between the specified limits (inclusive)."; // untranslated
Blockly.Msg.MATH_DIVISION_SYMBOL = "÷";
Blockly.Msg.MATH_IS_DIVISIBLE_BY = "wav'a'";
Blockly.Msg.MATH_IS_EVEN = "lang'a' mI'";
Blockly.Msg.MATH_IS_NEGATIVE = "bIng pagh";
Blockly.Msg.MATH_IS_ODD = "ror'a' mI'";
Blockly.Msg.MATH_IS_POSITIVE = "Dung pagh";
Blockly.Msg.MATH_IS_PRIME = "potlh'a' mI'";
Blockly.Msg.MATH_IS_TOOLTIP = "Check if a number is an even, odd, prime, whole, positive, negative, or if it is divisible by certain number. Returns true or false."; // untranslated
Blockly.Msg.MATH_IS_WHOLE = "ngoHlaHbe''a'";
Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation"; // untranslated
Blockly.Msg.MATH_MODULO_TITLE = "ratlwI' SIm %1 ÷ %2";
Blockly.Msg.MATH_MODULO_TOOLTIP = "Return the remainder from dividing the two numbers."; // untranslated
Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×";
Blockly.Msg.MATH_NUMBER_HELPURL = "https://en.wikipedia.org/wiki/Number"; // untranslated
Blockly.Msg.MATH_NUMBER_TOOLTIP = "A number."; // untranslated
Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated
Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "beQwI' SIm tetlh";
Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "tInwI''a' SIm tetlh";
Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "beQwI'botlh SIm tetlh";
Blockly.Msg.MATH_ONLIST_OPERATOR_MIN = "machwI''a' SIm tetlh";
Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "beQwI' motlh SIm tetlh";
Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "SaHbe' SIm tetlh";
Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "motlhbe'wI' SIm tetlh";
Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "chelwI' SIm tetlh";
Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Return the average (arithmetic mean) of the numeric values in the list."; // untranslated
Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Return the largest number in the list."; // untranslated
Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Return the median number in the list."; // untranslated
Blockly.Msg.MATH_ONLIST_TOOLTIP_MIN = "Return the smallest number in the list."; // untranslated
Blockly.Msg.MATH_ONLIST_TOOLTIP_MODE = "Return a list of the most common item(s) in the list."; // untranslated
Blockly.Msg.MATH_ONLIST_TOOLTIP_RANDOM = "Return a random element from the list."; // untranslated
Blockly.Msg.MATH_ONLIST_TOOLTIP_STD_DEV = "Return the standard deviation of the list."; // untranslated
Blockly.Msg.MATH_ONLIST_TOOLTIP_SUM = "Return the sum of all the numbers in the list."; // untranslated
Blockly.Msg.MATH_POWER_SYMBOL = "^";
Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; // untranslated
Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "mI'HomSaHbe'";
Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Return a random fraction between 0.0 (inclusive) and 1.0 (exclusive)."; // untranslated
Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; // untranslated
Blockly.Msg.MATH_RANDOM_INT_TITLE = "ngoH mI'SaHbe' bIng %1 Dung %2";
Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Return a random integer between the two specified limits, inclusive."; // untranslated
Blockly.Msg.MATH_ROUND_HELPURL = "https://en.wikipedia.org/wiki/Rounding"; // untranslated
Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "ngoH";
Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "bIng ngoH";
Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "Dung ngoH";
Blockly.Msg.MATH_ROUND_TOOLTIP = "Round a number up or down."; // untranslated
Blockly.Msg.MATH_SINGLE_HELPURL = "https://en.wikipedia.org/wiki/Square_root"; // untranslated
Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "Dung pagh choH";
Blockly.Msg.MATH_SINGLE_OP_ROOT = "cha'DIch wav";
Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Return the absolute value of a number."; // untranslated
Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Return e to the power of a number."; // untranslated
Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Return the natural logarithm of a number."; // untranslated
Blockly.Msg.MATH_SINGLE_TOOLTIP_LOG10 = "Return the base 10 logarithm of a number."; // untranslated
Blockly.Msg.MATH_SINGLE_TOOLTIP_NEG = "Return the negation of a number."; // untranslated
Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Return 10 to the power of a number."; // untranslated
Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Return the square root of a number."; // untranslated
Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-";
Blockly.Msg.MATH_TRIG_ACOS = "acos";
Blockly.Msg.MATH_TRIG_ASIN = "asin";
Blockly.Msg.MATH_TRIG_ATAN = "atan";
Blockly.Msg.MATH_TRIG_COS = "cos";
Blockly.Msg.MATH_TRIG_HELPURL = "https://en.wikipedia.org/wiki/Trigonometric_functions"; // untranslated
Blockly.Msg.MATH_TRIG_SIN = "sin";
Blockly.Msg.MATH_TRIG_TAN = "tan";
Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Return the arccosine of a number."; // untranslated
Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Return the arcsine of a number."; // untranslated
Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Return the arctangent of a number."; // untranslated
Blockly.Msg.MATH_TRIG_TOOLTIP_COS = "Return the cosine of a degree (not radian)."; // untranslated
Blockly.Msg.MATH_TRIG_TOOLTIP_SIN = "Return the sine of a degree (not radian)."; // untranslated
Blockly.Msg.MATH_TRIG_TOOLTIP_TAN = "Return the tangent of a degree (not radian)."; // untranslated
Blockly.Msg.NEW_VARIABLE = "lIw chu'...";
Blockly.Msg.NEW_VARIABLE_TITLE = "lIw chu' pong:";
Blockly.Msg.ORDINAL_NUMBER_SUFFIX = "";
Blockly.Msg.PROCEDURES_ALLOW_STATEMENTS = "mu'tlhegh chaw'";
Blockly.Msg.PROCEDURES_BEFORE_PARAMS = "qel:";
Blockly.Msg.PROCEDURES_CALLNORETURN_HELPURL = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29"; // untranslated
Blockly.Msg.PROCEDURES_CALLNORETURN_TOOLTIP = "Run the user-defined function '%1'."; // untranslated
Blockly.Msg.PROCEDURES_CALLRETURN_HELPURL = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29"; // untranslated
Blockly.Msg.PROCEDURES_CALLRETURN_TOOLTIP = "Run the user-defined function '%1' and use its output."; // untranslated
Blockly.Msg.PROCEDURES_CALL_BEFORE_PARAMS = "qel:";
Blockly.Msg.PROCEDURES_CREATE_DO = "chel '%1'";
Blockly.Msg.PROCEDURES_DEFNORETURN_COMMENT = "mIw yIDel...";
Blockly.Msg.PROCEDURES_DEFNORETURN_DO = "";
Blockly.Msg.PROCEDURES_DEFNORETURN_HELPURL = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29"; // untranslated
Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE = "mIw";
Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE = "ruch";
Blockly.Msg.PROCEDURES_DEFNORETURN_TOOLTIP = "Creates a function with no output."; // untranslated
Blockly.Msg.PROCEDURES_DEFRETURN_HELPURL = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29"; // untranslated
Blockly.Msg.PROCEDURES_DEFRETURN_RETURN = "chegh";
Blockly.Msg.PROCEDURES_DEFRETURN_TOOLTIP = "Creates a function with an output."; // untranslated
Blockly.Msg.PROCEDURES_DEF_DUPLICATE_WARNING = "ghuHmoHna': qelwI' cha'logh chen.";
Blockly.Msg.PROCEDURES_HIGHLIGHT_DEF = "mIwna' wew";
Blockly.Msg.PROCEDURES_IFRETURN_HELPURL = "http://c2.com/cgi/wiki?GuardClause"; // untranslated
Blockly.Msg.PROCEDURES_IFRETURN_TOOLTIP = "If a value is true, then return a second value."; // untranslated
Blockly.Msg.PROCEDURES_IFRETURN_WARNING = "ghoHmoHna': ngoghvam ngaSbe' mIwDaq.";
Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "pong:";
Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Add an input to the function."; // untranslated
Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "qelwI'mey";
Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Add, remove, or reorder inputs to this function."; // untranslated
Blockly.Msg.REDO = "vangqa'";
Blockly.Msg.REMOVE_COMMENT = "QInHom chelHa'";
Blockly.Msg.RENAME_VARIABLE = "lIw pong choH...";
Blockly.Msg.RENAME_VARIABLE_TITLE = "Hoch \"%1\" lIwmey pongmey choH:";
Blockly.Msg.TEXT_APPEND_APPENDTEXT = "ghItlh";
Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated
Blockly.Msg.TEXT_APPEND_TO = "chel";
Blockly.Msg.TEXT_APPEND_TOOLTIP = "Append some text to variable '%1'."; // untranslated
Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated
Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "machchoH";
Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "DojchoH";
Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "tInchoH";
Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Return a copy of the text in a different case."; // untranslated
Blockly.Msg.TEXT_CHARAT_FIRST = "mu'Hom wa'DIch";
Blockly.Msg.TEXT_CHARAT_FROM_END = "mu'Hom # Qav";
Blockly.Msg.TEXT_CHARAT_FROM_START = "mu'Hom #";
Blockly.Msg.TEXT_CHARAT_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-text"; // untranslated
Blockly.Msg.TEXT_CHARAT_INPUT_INTEXT = "ghItlhDaq";
Blockly.Msg.TEXT_CHARAT_LAST = "mu'Hom Qav";
Blockly.Msg.TEXT_CHARAT_RANDOM = "mu'Hom SaHbe'";
Blockly.Msg.TEXT_CHARAT_TAIL = "Suq";
Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Returns the letter at the specified position."; // untranslated
Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Add an item to the text."; // untranslated
Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "ghom";
Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Add, remove, or reorder sections to reconfigure this text block."; // untranslated
Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "mojaq mu'Hom # Qav";
Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "mojaq mu'Hom #";
Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "mojaq mu'Hom Qav";
Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated
Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "ghItlhDaq";
Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "ghItlhHom moHaq mu'Hom wa'DIch";
Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "ghItlhHom moHaq mu'Hom # Qav";
Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "ghItlhHom moHaq mu'Hom #";
Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = "Suq";
Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Returns a specified portion of the text."; // untranslated
Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated
Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "ghItlhDaq";
Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "ghItlh wa'DIch Sam";
Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "ghItlh Qav Sam";
Blockly.Msg.TEXT_INDEXOF_TAIL = "";
Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Returns the index of the first/last occurrence of the first text in the second text. Returns %1 if text is not found."; // untranslated
Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated
Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 chIm'a'";
Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Returns true if the provided text is empty."; // untranslated
Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated
Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "ghItlh ghom";
Blockly.Msg.TEXT_JOIN_TOOLTIP = "Create a piece of text by joining together any number of items."; // untranslated
Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated
Blockly.Msg.TEXT_LENGTH_TITLE = "chuq %1";
Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Returns the number of letters (including spaces) in the provided text."; // untranslated
Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated
Blockly.Msg.TEXT_PRINT_TITLE = "maq %1";
Blockly.Msg.TEXT_PRINT_TOOLTIP = "Print the specified text, number or other value."; // untranslated
Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated
Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Prompt for user for a number."; // untranslated
Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Prompt for user for some text."; // untranslated
Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "mI' tlhob 'ej maq";
Blockly.Msg.TEXT_PROMPT_TYPE_TEXT = "ghItln tlhob 'ej maq";
Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_science)"; // untranslated
Blockly.Msg.TEXT_TEXT_TOOLTIP = "A letter, word, or line of text."; // untranslated
Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated
Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "poSnIHlogh pei";
Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "poSlogh pei";
Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "nIHlogh pei";
Blockly.Msg.TEXT_TRIM_TOOLTIP = "Return a copy of the text with spaces removed from one or both ends."; // untranslated
Blockly.Msg.TODAY = "DaHjaj";
Blockly.Msg.UNDO = "vangHa'";
Blockly.Msg.VARIABLES_DEFAULT_NAME = "Doch";
Blockly.Msg.VARIABLES_GET_CREATE_SET = "chel 'choH %1'";
Blockly.Msg.VARIABLES_GET_HELPURL = "https://github.com/google/blockly/wiki/Variables#get"; // untranslated
Blockly.Msg.VARIABLES_GET_TOOLTIP = "Returns the value of this variable."; // untranslated
Blockly.Msg.VARIABLES_SET = "choH %1 %2";
Blockly.Msg.VARIABLES_SET_CREATE_GET = "chel 'Suq %1'";
Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated
Blockly.Msg.VARIABLES_SET_TOOLTIP = "Sets this variable to be equal to the input."; // untranslated
Blockly.Msg.VARIABLE_ALREADY_EXISTS = "A variable named '%1' already exists."; // untranslated
Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE;
Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF;
Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO;
Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO;
Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE;
Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE;
Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST;
Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST;
Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME;
Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO;
Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF;
Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL;
Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO;
Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST;
Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO;
Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME;
Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME;
Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME;
Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST;
Blockly.Msg.PROCEDURES_DEFRETURN_COMMENT = Blockly.Msg.PROCEDURES_DEFNORETURN_COMMENT; | {'content_hash': 'e3d9dbd1a2148e592180fe7d90e3ab32', 'timestamp': '', 'source': 'github', 'line_count': 389, 'max_line_length': 262, 'avg_line_length': 80.81491002570694, 'alnum_prop': 0.7528072017049973, 'repo_name': 'maxosprojects/cozmo-blockly', 'id': 'fee40f3e1ad8086e41c06f922768d07f1ece17ed', 'size': '31514', 'binary': False, 'copies': '24', 'ref': 'refs/heads/master', 'path': 'blockly/msg/js/tlh.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Batchfile', 'bytes': '2275'}, {'name': 'CSS', 'bytes': '142502'}, {'name': 'Emacs Lisp', 'bytes': '2410'}, {'name': 'HTML', 'bytes': '1620261'}, {'name': 'JavaScript', 'bytes': '22693691'}, {'name': 'Python', 'bytes': '166287'}, {'name': 'Shell', 'bytes': '9592'}]} |
fuckcoin-Qt: Qt4 GUI for fuckcoin
===============================
Build instructions
===================
Debian
-------
First, make sure that the required packages for Qt4 development of your
distribution are installed, these are
::
for Debian and Ubuntu <= 11.10 :
::
apt-get install qt4-qmake libqt4-dev build-essential libboost-dev libboost-system-dev \
libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev \
libssl-dev libdb4.8++-dev libminiupnpc-dev
for Ubuntu >= 12.04 (please read the 'Berkely DB version warning' below):
::
apt-get install qt4-qmake libqt4-dev build-essential libboost-dev libboost-system-dev \
libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev \
libssl-dev libdb++-dev libminiupnpc-dev
For Qt 5 you need the following, otherwise you get an error with lrelease when running qmake:
::
apt-get install qt5-qmake libqt5gui5 libqt5core5 libqt5dbus5 qttools5-dev-tools
then execute the following:
::
qmake
make
Alternatively, install `Qt Creator`_ and open the `fuckcoin-qt.pro` file.
An executable named `fuckcoin-qt` will be built.
.. _`Qt Creator`: http://qt-project.org/downloads/
Mac OS X
--------
- Download and install the `Qt Mac OS X SDK`_. It is recommended to also install Apple's Xcode with UNIX tools.
- Download and install either `MacPorts`_ or `HomeBrew`_.
- Execute the following commands in a terminal to get the dependencies using MacPorts:
::
sudo port selfupdate
sudo port install boost db48 miniupnpc
- Execute the following commands in a terminal to get the dependencies using HomeBrew:
::
brew update
brew install boost miniupnpc openssl berkeley-db4
- If using HomeBrew, edit `fuckcoin-qt.pro` to account for library location differences. There's a diff in `contrib/homebrew/bitcoin-qt-pro.patch` that shows what you need to change, or you can just patch by doing
patch -p1 < contrib/homebrew/bitcoin.qt.pro.patch
- Open the fuckcoin-qt.pro file in Qt Creator and build as normal (cmd-B)
.. _`Qt Mac OS X SDK`: http://qt-project.org/downloads/
.. _`MacPorts`: http://www.macports.org/install.php
.. _`HomeBrew`: http://mxcl.github.io/homebrew/
Build configuration options
============================
UPnP port forwarding
---------------------
To use UPnP for port forwarding behind a NAT router (recommended, as more connections overall allow for a faster and more stable fuckcoin experience), pass the following argument to qmake:
::
qmake "USE_UPNP=1"
(in **Qt Creator**, you can find the setting for additional qmake arguments under "Projects" -> "Build Settings" -> "Build Steps", then click "Details" next to **qmake**)
This requires miniupnpc for UPnP port mapping. It can be downloaded from
http://miniupnp.tuxfamily.org/files/. UPnP support is not compiled in by default.
Set USE_UPNP to a different value to control this:
+------------+--------------------------------------------------------------------------+
| USE_UPNP=- | no UPnP support, miniupnpc not required; |
+------------+--------------------------------------------------------------------------+
| USE_UPNP=0 | (the default) built with UPnP, support turned off by default at runtime; |
+------------+--------------------------------------------------------------------------+
| USE_UPNP=1 | build with UPnP support turned on by default at runtime. |
+------------+--------------------------------------------------------------------------+
Notification support for recent (k)ubuntu versions
---------------------------------------------------
To see desktop notifications on (k)ubuntu versions starting from 10.04, enable usage of the
FreeDesktop notification interface through DBUS using the following qmake option:
::
qmake "USE_DBUS=1"
Generation of QR codes
-----------------------
libqrencode may be used to generate QRCode images for payment requests.
It can be downloaded from http://fukuchi.org/works/qrencode/index.html.en, or installed via your package manager. Pass the USE_QRCODE
flag to qmake to control this:
+--------------+--------------------------------------------------------------------------+
| USE_QRCODE=0 | (the default) No QRCode support - libarcode not required |
+--------------+--------------------------------------------------------------------------+
| USE_QRCODE=1 | QRCode support enabled |
+--------------+--------------------------------------------------------------------------+
Berkely DB version warning
==========================
A warning for people using the *static binary* version of fuckcoin on a Linux/UNIX-ish system (tl;dr: **Berkely DB databases are not forward compatible**).
The static binary version of fuckcoin is linked against libdb4.8 (see also `this Debian issue`_).
Now the nasty thing is that databases from 5.X are not compatible with 4.X.
If the globally installed development package of Berkely DB installed on your system is 5.X, any source you
build yourself will be linked against that. The first time you run with a 5.X version the database will be upgraded,
and 4.X cannot open the new format. This means that you cannot go back to the old statically linked version without
significant hassle!
.. _`this Debian issue`: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=621425
Ubuntu 11.10 warning
====================
Ubuntu 11.10 has a package called 'qt-at-spi' installed by default. At the time of writing, having that package
installed causes fuckcoin-qt to crash intermittently. The issue has been reported as `launchpad bug 857790`_, but
isn't yet fixed.
Until the bug is fixed, you can remove the qt-at-spi package to work around the problem, though this will presumably
disable screen reader functionality for Qt apps:
::
sudo apt-get remove qt-at-spi
.. _`launchpad bug 857790`: https://bugs.launchpad.net/ubuntu/+source/qt-at-spi/+bug/857790
| {'content_hash': 'd219d83305e59a0c22203b8582794c61', 'timestamp': '', 'source': 'github', 'line_count': 163, 'max_line_length': 214, 'avg_line_length': 37.04907975460123, 'alnum_prop': 0.6308991554893194, 'repo_name': 'fuckcoin/fuckcoin', 'id': '0c2a8b5334c540c0053f2fb5f083383d56a40781', 'size': '6039', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'doc/readme-qt.rst', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'C', 'bytes': '103297'}, {'name': 'C++', 'bytes': '2522013'}, {'name': 'CSS', 'bytes': '1127'}, {'name': 'IDL', 'bytes': '14696'}, {'name': 'Objective-C', 'bytes': '5864'}, {'name': 'Python', 'bytes': '3776'}, {'name': 'Shell', 'bytes': '8321'}, {'name': 'TypeScript', 'bytes': '5236454'}]} |
<?php
/**
* Created by PhpStorm.
* User: Jean-Luc DJEKE
* Date: 11/11/2015
* Time: 20:22
*/
use Entity\Service;
$app->get('/services', function() use ($entityManager){
$services = $entityManager->getRepository("Entity\\Service")->findAll();
echo json_encode(array("ReturnCode" => 1,"Data" => $services));
});
$app->get('/services/:id', function($id) use ($entityManager){
$services = $entityManager->find("Entity\\Service", $id);
echo json_encode(array("ReturnCode" => 1,"Data" => $services));
});
$app->get('/services/entreprise/:id', function($id) use ($entityManager){
$services = $entityManager->getRepository("Entity\\Service")->findBy(array('entreprise' => $id));
echo json_encode(array("ReturnCode" => 1,"Data" => $services));
});
$app->get('/services/note/:id', function($id) use ($entityManager){
$compteAvis = 1;
$avgRanking = 0;
$avis = $entityManager->getRepository("Entity\\Avis")->findBy(array('service'=> $id));
if(null !== $avis and count($avis)){
$compteAvis = count($avis);
foreach($avis as $unAvis){
$avgRanking += $unAvis->getRanking();
}
}
echo json_encode(array("ReturnCode" => 1,"Data" => round(($avgRanking/$compteAvis),2)));
});
/*************POST*************/
$app->post('/service', function() use ($app,$entityManager){
$service = new Service();
hydrate($service,$app);
$entityManager->persist($service);
$entityManager->flush();
echo json_encode(array("ReturnCode" => 1,"Data" => "Service ajouté !"));//compter les résultats
});
| {'content_hash': 'db9d282b535e90b2ae8054c7a508e303', 'timestamp': '', 'source': 'github', 'line_count': 43, 'max_line_length': 101, 'avg_line_length': 36.53488372093023, 'alnum_prop': 0.6098026734563972, 'repo_name': 'InnovLabs/MonAvisApi', 'id': '714c64e3a820a359f77d91a96b7f594436e6ea6f', 'size': '1573', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/Modules/Services.php', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'PHP', 'bytes': '38406'}]} |
package api
import (
"k8s.io/kubernetes/pkg/api/resource"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
"k8s.io/kubernetes/pkg/runtime"
"k8s.io/kubernetes/pkg/types"
"k8s.io/kubernetes/pkg/util/intstr"
)
// Common string formats
// ---------------------
// Many fields in this API have formatting requirements. The commonly used
// formats are defined here.
//
// C_IDENTIFIER: This is a string that conforms to the definition of an "identifier"
// in the C language. This is captured by the following regex:
// [A-Za-z_][A-Za-z0-9_]*
// This defines the format, but not the length restriction, which should be
// specified at the definition of any field of this type.
//
// DNS_LABEL: This is a string, no more than 63 characters long, that conforms
// to the definition of a "label" in RFCs 1035 and 1123. This is captured
// by the following regex:
// [a-z0-9]([-a-z0-9]*[a-z0-9])?
//
// DNS_SUBDOMAIN: This is a string, no more than 253 characters long, that conforms
// to the definition of a "subdomain" in RFCs 1035 and 1123. This is captured
// by the following regex:
// [a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*
// or more simply:
// DNS_LABEL(\.DNS_LABEL)*
//
// IANA_SVC_NAME: This is a string, no more than 15 characters long, that
// conforms to the definition of IANA service name in RFC 6335.
// It must contains at least one letter [a-z] and it must contains only [a-z0-9-].
// Hypens ('-') cannot be leading or trailing character of the string
// and cannot be adjacent to other hyphens.
// ObjectMeta is metadata that all persisted resources must have, which includes all objects
// users must create.
type ObjectMeta struct {
// Name is unique within a namespace. Name is required when creating resources, although
// some resources may allow a client to request the generation of an appropriate name
// automatically. Name is primarily intended for creation idempotence and configuration
// definition.
Name string `json:"name,omitempty"`
// GenerateName indicates that the name should be made unique by the server prior to persisting
// it. A non-empty value for the field indicates the name will be made unique (and the name
// returned to the client will be different than the name passed). The value of this field will
// be combined with a unique suffix on the server if the Name field has not been provided.
// The provided value must be valid within the rules for Name, and may be truncated by the length
// of the suffix required to make the value unique on the server.
//
// If this field is specified, and Name is not present, the server will NOT return a 409 if the
// generated name exists - instead, it will either return 201 Created or 500 with Reason
// ServerTimeout indicating a unique name could not be found in the time allotted, and the client
// should retry (optionally after the time indicated in the Retry-After header).
GenerateName string `json:"generateName,omitempty"`
// Namespace defines the space within which name must be unique. An empty namespace is
// equivalent to the "default" namespace, but "default" is the canonical representation.
// Not all objects are required to be scoped to a namespace - the value of this field for
// those objects will be empty.
Namespace string `json:"namespace,omitempty"`
// SelfLink is a URL representing this object.
SelfLink string `json:"selfLink,omitempty"`
// UID is the unique in time and space value for this object. It is typically generated by
// the server on successful creation of a resource and is not allowed to change on PUT
// operations.
UID types.UID `json:"uid,omitempty"`
// An opaque value that represents the version of this resource. May be used for optimistic
// concurrency, change detection, and the watch operation on a resource or set of resources.
// Clients must treat these values as opaque and values may only be valid for a particular
// resource or set of resources. Only servers will generate resource versions.
ResourceVersion string `json:"resourceVersion,omitempty"`
// A sequence number representing a specific generation of the desired state.
// Populated by the system. Read-only.
Generation int64 `json:"generation,omitempty"`
// CreationTimestamp is a timestamp representing the server time when this object was
// created. It is not guaranteed to be set in happens-before order across separate operations.
// Clients may not set this value. It is represented in RFC3339 form and is in UTC.
CreationTimestamp unversioned.Time `json:"creationTimestamp,omitempty"`
// DeletionTimestamp is the time after which this resource will be deleted. This
// field is set by the server when a graceful deletion is requested by the user, and is not
// directly settable by a client. The resource will be deleted (no longer visible from
// resource lists, and not reachable by name) after the time in this field. Once set, this
// value may not be unset or be set further into the future, although it may be shortened
// or the resource may be deleted prior to this time. For example, a user may request that
// a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination
// signal to the containers in the pod. Once the resource is deleted in the API, the Kubelet
// will send a hard termination signal to the container.
DeletionTimestamp *unversioned.Time `json:"deletionTimestamp,omitempty"`
// DeletionGracePeriodSeconds records the graceful deletion value set when graceful deletion
// was requested. Represents the most recent grace period, and may only be shortened once set.
DeletionGracePeriodSeconds *int64 `json:"deletionGracePeriodSeconds,omitempty"`
// Labels are key value pairs that may be used to scope and select individual resources.
// Label keys are of the form:
// label-key ::= prefixed-name | name
// prefixed-name ::= prefix '/' name
// prefix ::= DNS_SUBDOMAIN
// name ::= DNS_LABEL
// The prefix is optional. If the prefix is not specified, the key is assumed to be private
// to the user. Other system components that wish to use labels must specify a prefix. The
// "kubernetes.io/" prefix is reserved for use by kubernetes components.
// TODO: replace map[string]string with labels.LabelSet type
Labels map[string]string `json:"labels,omitempty"`
// Annotations are unstructured key value data stored with a resource that may be set by
// external tooling. They are not queryable and should be preserved when modifying
// objects. Annotation keys have the same formatting restrictions as Label keys. See the
// comments on Labels for details.
Annotations map[string]string `json:"annotations,omitempty"`
// List of objects depended by this object. If ALL objects in the list have
// been deleted, this object will be garbage collected.
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty"`
// Must be empty before the object is deleted from the registry. Each entry
// is an identifier for the responsible component that will remove the entry
// from the list. If the deletionTimestamp of the object is non-nil, entries
// in this list can only be removed.
Finalizers []string `json:"finalizers,omitempty"`
}
const (
// NamespaceDefault means the object is in the default namespace which is applied when not specified by clients
NamespaceDefault string = "default"
// NamespaceAll is the default argument to specify on a context when you want to list or filter resources across all namespaces
NamespaceAll string = ""
// NamespaceNone is the argument for a context when there is no namespace.
NamespaceNone string = ""
// NamespaceSystem is the system namespace where we place system components.
NamespaceSystem string = "kube-system"
// TerminationMessagePathDefault means the default path to capture the application termination message running in a container
TerminationMessagePathDefault string = "/dev/termination-log"
)
// Volume represents a named volume in a pod that may be accessed by any containers in the pod.
type Volume struct {
// Required: This must be a DNS_LABEL. Each volume in a pod must have
// a unique name.
Name string `json:"name"`
// The VolumeSource represents the location and type of a volume to mount.
// This is optional for now. If not specified, the Volume is implied to be an EmptyDir.
// This implied behavior is deprecated and will be removed in a future version.
VolumeSource `json:",inline,omitempty"`
}
// VolumeSource represents the source location of a volume to mount.
// Only one of its members may be specified.
type VolumeSource struct {
// HostPath represents file or directory on the host machine that is
// directly exposed to the container. This is generally used for system
// agents or other privileged things that are allowed to see the host
// machine. Most containers will NOT need this.
// ---
// TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not
// mount host directories as read/write.
HostPath *HostPathVolumeSource `json:"hostPath,omitempty"`
// EmptyDir represents a temporary directory that shares a pod's lifetime.
EmptyDir *EmptyDirVolumeSource `json:"emptyDir,omitempty"`
// GCEPersistentDisk represents a GCE Disk resource that is attached to a
// kubelet's host machine and then exposed to the pod.
GCEPersistentDisk *GCEPersistentDiskVolumeSource `json:"gcePersistentDisk,omitempty"`
// AWSElasticBlockStore represents an AWS EBS disk that is attached to a
// kubelet's host machine and then exposed to the pod.
AWSElasticBlockStore *AWSElasticBlockStoreVolumeSource `json:"awsElasticBlockStore,omitempty"`
// GitRepo represents a git repository at a particular revision.
GitRepo *GitRepoVolumeSource `json:"gitRepo,omitempty"`
// Secret represents a secret that should populate this volume.
Secret *SecretVolumeSource `json:"secret,omitempty"`
// NFS represents an NFS mount on the host that shares a pod's lifetime
NFS *NFSVolumeSource `json:"nfs,omitempty"`
// ISCSIVolumeSource represents an ISCSI Disk resource that is attached to a
// kubelet's host machine and then exposed to the pod.
ISCSI *ISCSIVolumeSource `json:"iscsi,omitempty"`
// Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime
Glusterfs *GlusterfsVolumeSource `json:"glusterfs,omitempty"`
// PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace
PersistentVolumeClaim *PersistentVolumeClaimVolumeSource `json:"persistentVolumeClaim,omitempty"`
// RBD represents a Rados Block Device mount on the host that shares a pod's lifetime
RBD *RBDVolumeSource `json:"rbd,omitempty"`
// FlexVolume represents a generic volume resource that is
// provisioned/attached using a exec based plugin. This is an alpha feature and may change in future.
FlexVolume *FlexVolumeSource `json:"flexVolume,omitempty"`
// Cinder represents a cinder volume attached and mounted on kubelets host machine
Cinder *CinderVolumeSource `json:"cinder,omitempty"`
// CephFS represents a Cephfs mount on the host that shares a pod's lifetime
CephFS *CephFSVolumeSource `json:"cephfs,omitempty"`
// Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running
Flocker *FlockerVolumeSource `json:"flocker,omitempty"`
// DownwardAPI represents metadata about the pod that should populate this volume
DownwardAPI *DownwardAPIVolumeSource `json:"downwardAPI,omitempty"`
// FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.
FC *FCVolumeSource `json:"fc,omitempty"`
// AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
AzureFile *AzureFileVolumeSource `json:"azureFile,omitempty"`
// ConfigMap represents a configMap that should populate this volume
ConfigMap *ConfigMapVolumeSource `json:"configMap,omitempty"`
}
// Similar to VolumeSource but meant for the administrator who creates PVs.
// Exactly one of its members must be set.
type PersistentVolumeSource struct {
// GCEPersistentDisk represents a GCE Disk resource that is attached to a
// kubelet's host machine and then exposed to the pod.
GCEPersistentDisk *GCEPersistentDiskVolumeSource `json:"gcePersistentDisk,omitempty"`
// AWSElasticBlockStore represents an AWS EBS disk that is attached to a
// kubelet's host machine and then exposed to the pod.
AWSElasticBlockStore *AWSElasticBlockStoreVolumeSource `json:"awsElasticBlockStore,omitempty"`
// HostPath represents a directory on the host.
// Provisioned by a developer or tester.
// This is useful for single-node development and testing only!
// On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster.
HostPath *HostPathVolumeSource `json:"hostPath,omitempty"`
// Glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod
Glusterfs *GlusterfsVolumeSource `json:"glusterfs,omitempty"`
// NFS represents an NFS mount on the host that shares a pod's lifetime
NFS *NFSVolumeSource `json:"nfs,omitempty"`
// RBD represents a Rados Block Device mount on the host that shares a pod's lifetime
RBD *RBDVolumeSource `json:"rbd,omitempty"`
// ISCSIVolumeSource represents an ISCSI resource that is attached to a
// kubelet's host machine and then exposed to the pod.
ISCSI *ISCSIVolumeSource `json:"iscsi,omitempty"`
// FlexVolume represents a generic volume resource that is
// provisioned/attached using a exec based plugin. This is an alpha feature and may change in future.
FlexVolume *FlexVolumeSource `json:"flexVolume,omitempty"`
// Cinder represents a cinder volume attached and mounted on kubelets host machine
Cinder *CinderVolumeSource `json:"cinder,omitempty"`
// CephFS represents a Ceph FS mount on the host that shares a pod's lifetime
CephFS *CephFSVolumeSource `json:"cephfs,omitempty"`
// FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.
FC *FCVolumeSource `json:"fc,omitempty"`
// Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running
Flocker *FlockerVolumeSource `json:"flocker,omitempty"`
// AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
AzureFile *AzureFileVolumeSource `json:"azureFile,omitempty"`
}
type PersistentVolumeClaimVolumeSource struct {
// ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume
ClaimName string `json:"claimName"`
// Optional: Defaults to false (read/write). ReadOnly here
// will force the ReadOnly setting in VolumeMounts
ReadOnly bool `json:"readOnly,omitempty"`
}
// +genclient=true,nonNamespaced=true
type PersistentVolume struct {
unversioned.TypeMeta `json:",inline"`
ObjectMeta `json:"metadata,omitempty"`
//Spec defines a persistent volume owned by the cluster
Spec PersistentVolumeSpec `json:"spec,omitempty"`
// Status represents the current information about persistent volume.
Status PersistentVolumeStatus `json:"status,omitempty"`
}
type PersistentVolumeSpec struct {
// Resources represents the actual resources of the volume
Capacity ResourceList `json:"capacity"`
// Source represents the location and type of a volume to mount.
PersistentVolumeSource `json:",inline"`
// AccessModes contains all ways the volume can be mounted
AccessModes []PersistentVolumeAccessMode `json:"accessModes,omitempty"`
// ClaimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim.
// ClaimRef is expected to be non-nil when bound.
// claim.VolumeName is the authoritative bind between PV and PVC.
ClaimRef *ObjectReference `json:"claimRef,omitempty"`
// Optional: what happens to a persistent volume when released from its claim.
PersistentVolumeReclaimPolicy PersistentVolumeReclaimPolicy `json:"persistentVolumeReclaimPolicy,omitempty"`
}
// PersistentVolumeReclaimPolicy describes a policy for end-of-life maintenance of persistent volumes
type PersistentVolumeReclaimPolicy string
const (
// PersistentVolumeReclaimRecycle means the volume will be recycled back into the pool of unbound persistent volumes on release from its claim.
// The volume plugin must support Recycling.
PersistentVolumeReclaimRecycle PersistentVolumeReclaimPolicy = "Recycle"
// PersistentVolumeReclaimDelete means the volume will be deleted from Kubernetes on release from its claim.
// The volume plugin must support Deletion.
PersistentVolumeReclaimDelete PersistentVolumeReclaimPolicy = "Delete"
// PersistentVolumeReclaimRetain means the volume will be left in its current phase (Released) for manual reclamation by the administrator.
// The default policy is Retain.
PersistentVolumeReclaimRetain PersistentVolumeReclaimPolicy = "Retain"
)
type PersistentVolumeStatus struct {
// Phase indicates if a volume is available, bound to a claim, or released by a claim
Phase PersistentVolumePhase `json:"phase,omitempty"`
// A human-readable message indicating details about why the volume is in this state.
Message string `json:"message,omitempty"`
// Reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI
Reason string `json:"reason,omitempty"`
}
type PersistentVolumeList struct {
unversioned.TypeMeta `json:",inline"`
unversioned.ListMeta `json:"metadata,omitempty"`
Items []PersistentVolume `json:"items"`
}
// +genclient=true
// PersistentVolumeClaim is a user's request for and claim to a persistent volume
type PersistentVolumeClaim struct {
unversioned.TypeMeta `json:",inline"`
ObjectMeta `json:"metadata,omitempty"`
// Spec defines the volume requested by a pod author
Spec PersistentVolumeClaimSpec `json:"spec,omitempty"`
// Status represents the current information about a claim
Status PersistentVolumeClaimStatus `json:"status,omitempty"`
}
type PersistentVolumeClaimList struct {
unversioned.TypeMeta `json:",inline"`
unversioned.ListMeta `json:"metadata,omitempty"`
Items []PersistentVolumeClaim `json:"items"`
}
// PersistentVolumeClaimSpec describes the common attributes of storage devices
// and allows a Source for provider-specific attributes
type PersistentVolumeClaimSpec struct {
// Contains the types of access modes required
AccessModes []PersistentVolumeAccessMode `json:"accessModes,omitempty"`
// Resources represents the minimum resources required
Resources ResourceRequirements `json:"resources,omitempty"`
// VolumeName is the binding reference to the PersistentVolume backing this claim
VolumeName string `json:"volumeName,omitempty"`
}
type PersistentVolumeClaimStatus struct {
// Phase represents the current phase of PersistentVolumeClaim
Phase PersistentVolumeClaimPhase `json:"phase,omitempty"`
// AccessModes contains all ways the volume backing the PVC can be mounted
AccessModes []PersistentVolumeAccessMode `json:"accessModes,omitempty"`
// Represents the actual resources of the underlying volume
Capacity ResourceList `json:"capacity,omitempty"`
}
type PersistentVolumeAccessMode string
const (
// can be mounted read/write mode to exactly 1 host
ReadWriteOnce PersistentVolumeAccessMode = "ReadWriteOnce"
// can be mounted in read-only mode to many hosts
ReadOnlyMany PersistentVolumeAccessMode = "ReadOnlyMany"
// can be mounted in read/write mode to many hosts
ReadWriteMany PersistentVolumeAccessMode = "ReadWriteMany"
)
type PersistentVolumePhase string
const (
// used for PersistentVolumes that are not available
VolumePending PersistentVolumePhase = "Pending"
// used for PersistentVolumes that are not yet bound
// Available volumes are held by the binder and matched to PersistentVolumeClaims
VolumeAvailable PersistentVolumePhase = "Available"
// used for PersistentVolumes that are bound
VolumeBound PersistentVolumePhase = "Bound"
// used for PersistentVolumes where the bound PersistentVolumeClaim was deleted
// released volumes must be recycled before becoming available again
// this phase is used by the persistent volume claim binder to signal to another process to reclaim the resource
VolumeReleased PersistentVolumePhase = "Released"
// used for PersistentVolumes that failed to be correctly recycled or deleted after being released from a claim
VolumeFailed PersistentVolumePhase = "Failed"
)
type PersistentVolumeClaimPhase string
const (
// used for PersistentVolumeClaims that are not yet bound
ClaimPending PersistentVolumeClaimPhase = "Pending"
// used for PersistentVolumeClaims that are bound
ClaimBound PersistentVolumeClaimPhase = "Bound"
)
// Represents a host path mapped into a pod.
// Host path volumes do not support ownership management or SELinux relabeling.
type HostPathVolumeSource struct {
Path string `json:"path"`
}
// Represents an empty directory for a pod.
// Empty directory volumes support ownership management and SELinux relabeling.
type EmptyDirVolumeSource struct {
// TODO: Longer term we want to represent the selection of underlying
// media more like a scheduling problem - user says what traits they
// need, we give them a backing store that satisifies that. For now
// this will cover the most common needs.
// Optional: what type of storage medium should back this directory.
// The default is "" which means to use the node's default medium.
Medium StorageMedium `json:"medium,omitempty"`
}
// StorageMedium defines ways that storage can be allocated to a volume.
type StorageMedium string
const (
StorageMediumDefault StorageMedium = "" // use whatever the default is for the node
StorageMediumMemory StorageMedium = "Memory" // use memory (tmpfs)
)
// Protocol defines network protocols supported for things like container ports.
type Protocol string
const (
// ProtocolTCP is the TCP protocol.
ProtocolTCP Protocol = "TCP"
// ProtocolUDP is the UDP protocol.
ProtocolUDP Protocol = "UDP"
)
// Represents a Persistent Disk resource in Google Compute Engine.
//
// A GCE PD must exist before mounting to a container. The disk must
// also be in the same GCE project and zone as the kubelet. A GCE PD
// can only be mounted as read/write once or read-only many times. GCE
// PDs support ownership management and SELinux relabeling.
type GCEPersistentDiskVolumeSource struct {
// Unique name of the PD resource. Used to identify the disk in GCE
PDName string `json:"pdName"`
// Filesystem type to mount.
// Must be a filesystem type supported by the host operating system.
// Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
// TODO: how do we prevent errors in the filesystem from compromising the machine
FSType string `json:"fsType,omitempty"`
// Optional: Partition on the disk to mount.
// If omitted, kubelet will attempt to mount the device name.
// Ex. For /dev/sda1, this field is "1", for /dev/sda, this field is 0 or empty.
Partition int32 `json:"partition,omitempty"`
// Optional: Defaults to false (read/write). ReadOnly here will force
// the ReadOnly setting in VolumeMounts.
ReadOnly bool `json:"readOnly,omitempty"`
}
// Represents an ISCSI disk.
// ISCSI volumes can only be mounted as read/write once.
// ISCSI volumes support ownership management and SELinux relabeling.
type ISCSIVolumeSource struct {
// Required: iSCSI target portal
// the portal is either an IP or ip_addr:port if port is other than default (typically TCP ports 860 and 3260)
TargetPortal string `json:"targetPortal,omitempty"`
// Required: target iSCSI Qualified Name
IQN string `json:"iqn,omitempty"`
// Required: iSCSI target lun number
Lun int32 `json:"lun,omitempty"`
// Optional: Defaults to 'default' (tcp). iSCSI interface name that uses an iSCSI transport.
ISCSIInterface string `json:"iscsiInterface,omitempty"`
// Filesystem type to mount.
// Must be a filesystem type supported by the host operating system.
// Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
// TODO: how do we prevent errors in the filesystem from compromising the machine
FSType string `json:"fsType,omitempty"`
// Optional: Defaults to false (read/write). ReadOnly here will force
// the ReadOnly setting in VolumeMounts.
ReadOnly bool `json:"readOnly,omitempty"`
}
// Represents a Fibre Channel volume.
// Fibre Channel volumes can only be mounted as read/write once.
// Fibre Channel volumes support ownership management and SELinux relabeling.
type FCVolumeSource struct {
// Required: FC target world wide names (WWNs)
TargetWWNs []string `json:"targetWWNs"`
// Required: FC target lun number
Lun *int32 `json:"lun"`
// Filesystem type to mount.
// Must be a filesystem type supported by the host operating system.
// Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
// TODO: how do we prevent errors in the filesystem from compromising the machine
FSType string `json:"fsType,omitempty"`
// Optional: Defaults to false (read/write). ReadOnly here will force
// the ReadOnly setting in VolumeMounts.
ReadOnly bool `json:"readOnly,omitempty"`
}
// FlexVolume represents a generic volume resource that is
// provisioned/attached using a exec based plugin. This is an alpha feature and may change in future.
type FlexVolumeSource struct {
// Driver is the name of the driver to use for this volume.
Driver string `json:"driver"`
// Filesystem type to mount.
// Must be a filesystem type supported by the host operating system.
// Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script.
FSType string `json:"fsType,omitempty"`
// Optional: SecretRef is reference to the secret object containing
// sensitive information to pass to the plugin scripts. This may be
// empty if no secret object is specified. If the secret object
// contains more than one secret, all secrets are passed to the plugin
// scripts.
SecretRef *LocalObjectReference `json:"secretRef,omitempty"`
// Optional: Defaults to false (read/write). ReadOnly here will force
// the ReadOnly setting in VolumeMounts.
ReadOnly bool `json:"readOnly,omitempty"`
// Optional: Extra driver options if any.
Options map[string]string `json:"options,omitempty"`
}
// Represents a Persistent Disk resource in AWS.
//
// An AWS EBS disk must exist before mounting to a container. The disk
// must also be in the same AWS zone as the kubelet. A AWS EBS disk
// can only be mounted as read/write once. AWS EBS volumes support
// ownership management and SELinux relabeling.
type AWSElasticBlockStoreVolumeSource struct {
// Unique id of the persistent disk resource. Used to identify the disk in AWS
VolumeID string `json:"volumeID"`
// Filesystem type to mount.
// Must be a filesystem type supported by the host operating system.
// Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
// TODO: how do we prevent errors in the filesystem from compromising the machine
FSType string `json:"fsType,omitempty"`
// Optional: Partition on the disk to mount.
// If omitted, kubelet will attempt to mount the device name.
// Ex. For /dev/sda1, this field is "1", for /dev/sda, this field is 0 or empty.
Partition int32 `json:"partition,omitempty"`
// Optional: Defaults to false (read/write). ReadOnly here will force
// the ReadOnly setting in VolumeMounts.
ReadOnly bool `json:"readOnly,omitempty"`
}
// Represents a volume that is populated with the contents of a git repository.
// Git repo volumes do not support ownership management.
// Git repo volumes support SELinux relabeling.
type GitRepoVolumeSource struct {
// Repository URL
Repository string `json:"repository"`
// Commit hash, this is optional
Revision string `json:"revision,omitempty"`
// Clone target, this is optional
// Must not contain or start with '..'. If '.' is supplied, the volume directory will be the
// git repository. Otherwise, if specified, the volume will contain the git repository in
// the subdirectory with the given name.
Directory string `json:"directory,omitempty"`
// TODO: Consider credentials here.
}
// Adapts a Secret into a volume.
//
// The contents of the target Secret's Data field will be presented in a volume
// as files using the keys in the Data field as the file names.
// Secret volumes support ownership management and SELinux relabeling.
type SecretVolumeSource struct {
// Name of the secret in the pod's namespace to use.
SecretName string `json:"secretName,omitempty"`
}
// Represents an NFS mount that lasts the lifetime of a pod.
// NFS volumes do not support ownership management or SELinux relabeling.
type NFSVolumeSource struct {
// Server is the hostname or IP address of the NFS server
Server string `json:"server"`
// Path is the exported NFS share
Path string `json:"path"`
// Optional: Defaults to false (read/write). ReadOnly here will force
// the NFS export to be mounted with read-only permissions
ReadOnly bool `json:"readOnly,omitempty"`
}
// Represents a Glusterfs mount that lasts the lifetime of a pod.
// Glusterfs volumes do not support ownership management or SELinux relabeling.
type GlusterfsVolumeSource struct {
// Required: EndpointsName is the endpoint name that details Glusterfs topology
EndpointsName string `json:"endpoints"`
// Required: Path is the Glusterfs volume path
Path string `json:"path"`
// Optional: Defaults to false (read/write). ReadOnly here will force
// the Glusterfs to be mounted with read-only permissions
ReadOnly bool `json:"readOnly,omitempty"`
}
// Represents a Rados Block Device mount that lasts the lifetime of a pod.
// RBD volumes support ownership management and SELinux relabeling.
type RBDVolumeSource struct {
// Required: CephMonitors is a collection of Ceph monitors
CephMonitors []string `json:"monitors"`
// Required: RBDImage is the rados image name
RBDImage string `json:"image"`
// Filesystem type to mount.
// Must be a filesystem type supported by the host operating system.
// Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
// TODO: how do we prevent errors in the filesystem from compromising the machine
FSType string `json:"fsType,omitempty"`
// Optional: RadosPool is the rados pool name,default is rbd
RBDPool string `json:"pool"`
// Optional: RBDUser is the rados user name, default is admin
RadosUser string `json:"user"`
// Optional: Keyring is the path to key ring for RBDUser, default is /etc/ceph/keyring
Keyring string `json:"keyring"`
// Optional: SecretRef is name of the authentication secret for RBDUser, default is empty.
SecretRef *LocalObjectReference `json:"secretRef"`
// Optional: Defaults to false (read/write). ReadOnly here will force
// the ReadOnly setting in VolumeMounts.
ReadOnly bool `json:"readOnly,omitempty"`
}
// Represents a cinder volume resource in Openstack. A Cinder volume
// must exist before mounting to a container. The volume must also be
// in the same region as the kubelet. Cinder volumes support ownership
// management and SELinux relabeling.
type CinderVolumeSource struct {
// Unique id of the volume used to identify the cinder volume
VolumeID string `json:"volumeID"`
// Filesystem type to mount.
// Must be a filesystem type supported by the host operating system.
// Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
FSType string `json:"fsType,omitempty"`
// Optional: Defaults to false (read/write). ReadOnly here will force
// the ReadOnly setting in VolumeMounts.
ReadOnly bool `json:"readOnly,omitempty"`
}
// Represents a Ceph Filesystem mount that lasts the lifetime of a pod
// Cephfs volumes do not support ownership management or SELinux relabeling.
type CephFSVolumeSource struct {
// Required: Monitors is a collection of Ceph monitors
Monitors []string `json:"monitors"`
// Optional: Used as the mounted root, rather than the full Ceph tree, default is /
Path string `json:"path,omitempty"`
// Optional: User is the rados user name, default is admin
User string `json:"user,omitempty"`
// Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret
SecretFile string `json:"secretFile,omitempty"`
// Optional: SecretRef is reference to the authentication secret for User, default is empty.
SecretRef *LocalObjectReference `json:"secretRef,omitempty"`
// Optional: Defaults to false (read/write). ReadOnly here will force
// the ReadOnly setting in VolumeMounts.
ReadOnly bool `json:"readOnly,omitempty"`
}
// Represents a Flocker volume mounted by the Flocker agent.
// Flocker volumes do not support ownership management or SELinux relabeling.
type FlockerVolumeSource struct {
// Required: the volume name. This is going to be store on metadata -> name on the payload for Flocker
DatasetName string `json:"datasetName"`
}
// Represents a volume containing downward API info.
// Downward API volumes support ownership management and SELinux relabeling.
type DownwardAPIVolumeSource struct {
// Items is a list of DownwardAPIVolume file
Items []DownwardAPIVolumeFile `json:"items,omitempty"`
}
// Represents a single file containing information from the downward API
type DownwardAPIVolumeFile struct {
// Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'
Path string `json:"path"`
// Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.
FieldRef ObjectFieldSelector `json:"fieldRef"`
}
// AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
type AzureFileVolumeSource struct {
// the name of secret that contains Azure Storage Account Name and Key
SecretName string `json:"secretName"`
// Share Name
ShareName string `json:"shareName"`
// Defaults to false (read/write). ReadOnly here will force
// the ReadOnly setting in VolumeMounts.
ReadOnly bool `json:"readOnly,omitempty"`
}
// Adapts a ConfigMap into a volume.
//
// The contents of the target ConfigMap's Data field will be presented in a
// volume as files using the keys in the Data field as the file names, unless
// the items element is populated with specific mappings of keys to paths.
// ConfigMap volumes support ownership management and SELinux relabeling.
type ConfigMapVolumeSource struct {
LocalObjectReference `json:",inline"`
// If unspecified, each key-value pair in the Data field of the referenced
// ConfigMap will be projected into the volume as a file whose name is the
// key and content is the value. If specified, the listed keys will be
// projected into the specified paths, and unlisted keys will not be
// present. If a key is specified which is not present in the ConfigMap,
// the volume setup will error. Paths must be relative and may not contain
// the '..' path or start with '..'.
Items []KeyToPath `json:"items,omitempty"`
}
// Maps a string key to a path within a volume.
type KeyToPath struct {
// The key to project.
Key string `json:"key"`
// The relative path of the file to map the key to.
// May not be an absolute path.
// May not contain the path element '..'.
// May not start with the string '..'.
Path string `json:"path"`
}
// ContainerPort represents a network port in a single container
type ContainerPort struct {
// Optional: If specified, this must be an IANA_SVC_NAME Each named port
// in a pod must have a unique name.
Name string `json:"name,omitempty"`
// Optional: If specified, this must be a valid port number, 0 < x < 65536.
// If HostNetwork is specified, this must match ContainerPort.
HostPort int32 `json:"hostPort,omitempty"`
// Required: This must be a valid port number, 0 < x < 65536.
ContainerPort int32 `json:"containerPort"`
// Required: Supports "TCP" and "UDP".
Protocol Protocol `json:"protocol,omitempty"`
// Optional: What host IP to bind the external port to.
HostIP string `json:"hostIP,omitempty"`
}
// VolumeMount describes a mounting of a Volume within a container.
type VolumeMount struct {
// Required: This must match the Name of a Volume [above].
Name string `json:"name"`
// Optional: Defaults to false (read-write).
ReadOnly bool `json:"readOnly,omitempty"`
// Required. Must not contain ':'.
MountPath string `json:"mountPath"`
// Path within the volume from which the container's volume should be mounted.
// Defaults to "" (volume's root).
SubPath string `json:"subPath,omitempty"`
}
// EnvVar represents an environment variable present in a Container.
type EnvVar struct {
// Required: This must be a C_IDENTIFIER.
Name string `json:"name"`
// Optional: no more than one of the following may be specified.
// Optional: Defaults to ""; variable references $(VAR_NAME) are expanded
// using the previous defined environment variables in the container and
// any service environment variables. If a variable cannot be resolved,
// the reference in the input string will be unchanged. The $(VAR_NAME)
// syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped
// references will never be expanded, regardless of whether the variable
// exists or not.
Value string `json:"value,omitempty"`
// Optional: Specifies a source the value of this var should come from.
ValueFrom *EnvVarSource `json:"valueFrom,omitempty"`
}
// EnvVarSource represents a source for the value of an EnvVar.
// Only one of its fields may be set.
type EnvVarSource struct {
// Selects a field of the pod; only name and namespace are supported.
FieldRef *ObjectFieldSelector `json:"fieldRef,omitempty"`
// Selects a key of a ConfigMap.
ConfigMapKeyRef *ConfigMapKeySelector `json:"configMapKeyRef,omitempty"`
// Selects a key of a secret in the pod's namespace.
SecretKeyRef *SecretKeySelector `json:"secretKeyRef,omitempty"`
}
// ObjectFieldSelector selects an APIVersioned field of an object.
type ObjectFieldSelector struct {
// Required: Version of the schema the FieldPath is written in terms of.
// If no value is specified, it will be defaulted to the APIVersion of the
// enclosing object.
APIVersion string `json:"apiVersion"`
// Required: Path of the field to select in the specified API version
FieldPath string `json:"fieldPath"`
}
// Selects a key from a ConfigMap.
type ConfigMapKeySelector struct {
// The ConfigMap to select from.
LocalObjectReference `json:",inline"`
// The key to select.
Key string `json:"key"`
}
// SecretKeySelector selects a key of a Secret.
type SecretKeySelector struct {
// The name of the secret in the pod's namespace to select from.
LocalObjectReference `json:",inline"`
// The key of the secret to select from. Must be a valid secret key.
Key string `json:"key"`
}
// HTTPHeader describes a custom header to be used in HTTP probes
type HTTPHeader struct {
// The header field name
Name string `json:"name"`
// The header field value
Value string `json:"value"`
}
// HTTPGetAction describes an action based on HTTP Get requests.
type HTTPGetAction struct {
// Optional: Path to access on the HTTP server.
Path string `json:"path,omitempty"`
// Required: Name or number of the port to access on the container.
Port intstr.IntOrString `json:"port,omitempty"`
// Optional: Host name to connect to, defaults to the pod IP. You
// probably want to set "Host" in httpHeaders instead.
Host string `json:"host,omitempty"`
// Optional: Scheme to use for connecting to the host, defaults to HTTP.
Scheme URIScheme `json:"scheme,omitempty"`
// Optional: Custom headers to set in the request. HTTP allows repeated headers.
HTTPHeaders []HTTPHeader `json:"httpHeaders,omitempty"`
}
// URIScheme identifies the scheme used for connection to a host for Get actions
type URIScheme string
const (
// URISchemeHTTP means that the scheme used will be http://
URISchemeHTTP URIScheme = "HTTP"
// URISchemeHTTPS means that the scheme used will be https://
URISchemeHTTPS URIScheme = "HTTPS"
)
// TCPSocketAction describes an action based on opening a socket
type TCPSocketAction struct {
// Required: Port to connect to.
Port intstr.IntOrString `json:"port,omitempty"`
}
// ExecAction describes a "run in container" action.
type ExecAction struct {
// Command is the command line to execute inside the container, the working directory for the
// command is root ('/') in the container's filesystem. The command is simply exec'd, it is
// not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use
// a shell, you need to explicitly call out to that shell.
Command []string `json:"command,omitempty"`
}
// Probe describes a health check to be performed against a container to determine whether it is
// alive or ready to receive traffic.
type Probe struct {
// The action taken to determine the health of a container
Handler `json:",inline"`
// Length of time before health checking is activated. In seconds.
InitialDelaySeconds int32 `json:"initialDelaySeconds,omitempty"`
// Length of time before health checking times out. In seconds.
TimeoutSeconds int32 `json:"timeoutSeconds,omitempty"`
// How often (in seconds) to perform the probe.
PeriodSeconds int32 `json:"periodSeconds,omitempty"`
// Minimum consecutive successes for the probe to be considered successful after having failed.
// Must be 1 for liveness.
SuccessThreshold int32 `json:"successThreshold,omitempty"`
// Minimum consecutive failures for the probe to be considered failed after having succeeded.
FailureThreshold int32 `json:"failureThreshold,omitempty"`
}
// PullPolicy describes a policy for if/when to pull a container image
type PullPolicy string
const (
// PullAlways means that kubelet always attempts to pull the latest image. Container will fail If the pull fails.
PullAlways PullPolicy = "Always"
// PullNever means that kubelet never pulls an image, but only uses a local image. Container will fail if the image isn't present
PullNever PullPolicy = "Never"
// PullIfNotPresent means that kubelet pulls if the image isn't present on disk. Container will fail if the image isn't present and the pull fails.
PullIfNotPresent PullPolicy = "IfNotPresent"
)
// Capability represent POSIX capabilities type
type Capability string
// Capabilities represent POSIX capabilities that can be added or removed to a running container.
type Capabilities struct {
// Added capabilities
Add []Capability `json:"add,omitempty"`
// Removed capabilities
Drop []Capability `json:"drop,omitempty"`
}
// ResourceRequirements describes the compute resource requirements.
type ResourceRequirements struct {
// Limits describes the maximum amount of compute resources allowed.
Limits ResourceList `json:"limits,omitempty"`
// Requests describes the minimum amount of compute resources required.
// If Request is omitted for a container, it defaults to Limits if that is explicitly specified,
// otherwise to an implementation-defined value
Requests ResourceList `json:"requests,omitempty"`
}
// Container represents a single container that is expected to be run on the host.
type Container struct {
// Required: This must be a DNS_LABEL. Each container in a pod must
// have a unique name.
Name string `json:"name"`
// Required.
Image string `json:"image"`
// Optional: The docker image's entrypoint is used if this is not provided; cannot be updated.
// Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
// cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax
// can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
// regardless of whether the variable exists or not.
Command []string `json:"command,omitempty"`
// Optional: The docker image's cmd is used if this is not provided; cannot be updated.
// Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
// cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax
// can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
// regardless of whether the variable exists or not.
Args []string `json:"args,omitempty"`
// Optional: Defaults to Docker's default.
WorkingDir string `json:"workingDir,omitempty"`
Ports []ContainerPort `json:"ports,omitempty"`
Env []EnvVar `json:"env,omitempty"`
// Compute resource requirements.
Resources ResourceRequirements `json:"resources,omitempty"`
VolumeMounts []VolumeMount `json:"volumeMounts,omitempty"`
LivenessProbe *Probe `json:"livenessProbe,omitempty"`
ReadinessProbe *Probe `json:"readinessProbe,omitempty"`
Lifecycle *Lifecycle `json:"lifecycle,omitempty"`
// Required.
TerminationMessagePath string `json:"terminationMessagePath,omitempty"`
// Required: Policy for pulling images for this container
ImagePullPolicy PullPolicy `json:"imagePullPolicy"`
// Optional: SecurityContext defines the security options the container should be run with.
// If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext.
SecurityContext *SecurityContext `json:"securityContext,omitempty"`
// Variables for interactive containers, these have very specialized use-cases (e.g. debugging)
// and shouldn't be used for general purpose containers.
Stdin bool `json:"stdin,omitempty"`
StdinOnce bool `json:"stdinOnce,omitempty"`
TTY bool `json:"tty,omitempty"`
}
// Handler defines a specific action that should be taken
// TODO: pass structured data to these actions, and document that data here.
type Handler struct {
// One and only one of the following should be specified.
// Exec specifies the action to take.
Exec *ExecAction `json:"exec,omitempty"`
// HTTPGet specifies the http request to perform.
HTTPGet *HTTPGetAction `json:"httpGet,omitempty"`
// TCPSocket specifies an action involving a TCP port.
// TODO: implement a realistic TCP lifecycle hook
TCPSocket *TCPSocketAction `json:"tcpSocket,omitempty"`
}
// Lifecycle describes actions that the management system should take in response to container lifecycle
// events. For the PostStart and PreStop lifecycle handlers, management of the container blocks
// until the action is complete, unless the container process fails, in which case the handler is aborted.
type Lifecycle struct {
// PostStart is called immediately after a container is created. If the handler fails, the container
// is terminated and restarted.
PostStart *Handler `json:"postStart,omitempty"`
// PreStop is called immediately before a container is terminated. The reason for termination is
// passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated.
PreStop *Handler `json:"preStop,omitempty"`
}
// The below types are used by kube_client and api_server.
type ConditionStatus string
// These are valid condition statuses. "ConditionTrue" means a resource is in the condition;
// "ConditionFalse" means a resource is not in the condition; "ConditionUnknown" means kubernetes
// can't decide if a resource is in the condition or not. In the future, we could add other
// intermediate conditions, e.g. ConditionDegraded.
const (
ConditionTrue ConditionStatus = "True"
ConditionFalse ConditionStatus = "False"
ConditionUnknown ConditionStatus = "Unknown"
)
type ContainerStateWaiting struct {
// A brief CamelCase string indicating details about why the container is in waiting state.
Reason string `json:"reason,omitempty"`
// A human-readable message indicating details about why the container is in waiting state.
Message string `json:"message,omitempty"`
}
type ContainerStateRunning struct {
StartedAt unversioned.Time `json:"startedAt,omitempty"`
}
type ContainerStateTerminated struct {
ExitCode int32 `json:"exitCode"`
Signal int32 `json:"signal,omitempty"`
Reason string `json:"reason,omitempty"`
Message string `json:"message,omitempty"`
StartedAt unversioned.Time `json:"startedAt,omitempty"`
FinishedAt unversioned.Time `json:"finishedAt,omitempty"`
ContainerID string `json:"containerID,omitempty"`
}
// ContainerState holds a possible state of container.
// Only one of its members may be specified.
// If none of them is specified, the default one is ContainerStateWaiting.
type ContainerState struct {
Waiting *ContainerStateWaiting `json:"waiting,omitempty"`
Running *ContainerStateRunning `json:"running,omitempty"`
Terminated *ContainerStateTerminated `json:"terminated,omitempty"`
}
type ContainerStatus struct {
// Each container in a pod must have a unique name.
Name string `json:"name"`
State ContainerState `json:"state,omitempty"`
LastTerminationState ContainerState `json:"lastState,omitempty"`
// Ready specifies whether the container has passed its readiness check.
Ready bool `json:"ready"`
// Note that this is calculated from dead containers. But those containers are subject to
// garbage collection. This value will get capped at 5 by GC.
RestartCount int32 `json:"restartCount"`
Image string `json:"image"`
ImageID string `json:"imageID"`
ContainerID string `json:"containerID,omitempty"`
}
// PodPhase is a label for the condition of a pod at the current time.
type PodPhase string
// These are the valid statuses of pods.
const (
// PodPending means the pod has been accepted by the system, but one or more of the containers
// has not been started. This includes time before being bound to a node, as well as time spent
// pulling images onto the host.
PodPending PodPhase = "Pending"
// PodRunning means the pod has been bound to a node and all of the containers have been started.
// At least one container is still running or is in the process of being restarted.
PodRunning PodPhase = "Running"
// PodSucceeded means that all containers in the pod have voluntarily terminated
// with a container exit code of 0, and the system is not going to restart any of these containers.
PodSucceeded PodPhase = "Succeeded"
// PodFailed means that all containers in the pod have terminated, and at least one container has
// terminated in a failure (exited with a non-zero exit code or was stopped by the system).
PodFailed PodPhase = "Failed"
// PodUnknown means that for some reason the state of the pod could not be obtained, typically due
// to an error in communicating with the host of the pod.
PodUnknown PodPhase = "Unknown"
)
type PodConditionType string
// These are valid conditions of pod.
const (
// PodReady means the pod is able to service requests and should be added to the
// load balancing pools of all matching services.
PodReady PodConditionType = "Ready"
)
type PodCondition struct {
Type PodConditionType `json:"type"`
Status ConditionStatus `json:"status"`
LastProbeTime unversioned.Time `json:"lastProbeTime,omitempty"`
LastTransitionTime unversioned.Time `json:"lastTransitionTime,omitempty"`
Reason string `json:"reason,omitempty"`
Message string `json:"message,omitempty"`
}
// RestartPolicy describes how the container should be restarted.
// Only one of the following restart policies may be specified.
// If none of the following policies is specified, the default one
// is RestartPolicyAlways.
type RestartPolicy string
const (
RestartPolicyAlways RestartPolicy = "Always"
RestartPolicyOnFailure RestartPolicy = "OnFailure"
RestartPolicyNever RestartPolicy = "Never"
)
// PodList is a list of Pods.
type PodList struct {
unversioned.TypeMeta `json:",inline"`
unversioned.ListMeta `json:"metadata,omitempty"`
Items []Pod `json:"items"`
}
// DNSPolicy defines how a pod's DNS will be configured.
type DNSPolicy string
const (
// DNSClusterFirst indicates that the pod should use cluster DNS
// first, if it is available, then fall back on the default (as
// determined by kubelet) DNS settings.
DNSClusterFirst DNSPolicy = "ClusterFirst"
// DNSDefault indicates that the pod should use the default (as
// determined by kubelet) DNS settings.
DNSDefault DNSPolicy = "Default"
)
// A node selector represents the union of the results of one or more label queries
// over a set of nodes; that is, it represents the OR of the selectors represented
// by the node selector terms.
type NodeSelector struct {
//Required. A list of node selector terms. The terms are ORed.
NodeSelectorTerms []NodeSelectorTerm `json:"nodeSelectorTerms"`
}
// A null or empty node selector term matches no objects.
type NodeSelectorTerm struct {
//Required. A list of node selector requirements. The requirements are ANDed.
MatchExpressions []NodeSelectorRequirement `json:"matchExpressions"`
}
// A node selector requirement is a selector that contains values, a key, and an operator
// that relates the key and values.
type NodeSelectorRequirement struct {
// The label key that the selector applies to.
Key string `json:"key" patchStrategy:"merge" patchMergeKey:"key"`
// Represents a key's relationship to a set of values.
// Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
Operator NodeSelectorOperator `json:"operator"`
// An array of string values. If the operator is In or NotIn,
// the values array must be non-empty. If the operator is Exists or DoesNotExist,
// the values array must be empty. If the operator is Gt or Lt, the values
// array must have a single element, which will be interpreted as an integer.
// This array is replaced during a strategic merge patch.
Values []string `json:"values,omitempty"`
}
// A node selector operator is the set of operators that can be used in
// a node selector requirement.
type NodeSelectorOperator string
const (
NodeSelectorOpIn NodeSelectorOperator = "In"
NodeSelectorOpNotIn NodeSelectorOperator = "NotIn"
NodeSelectorOpExists NodeSelectorOperator = "Exists"
NodeSelectorOpDoesNotExist NodeSelectorOperator = "DoesNotExist"
NodeSelectorOpGt NodeSelectorOperator = "Gt"
NodeSelectorOpLt NodeSelectorOperator = "Lt"
)
// Affinity is a group of affinity scheduling rules.
type Affinity struct {
// Describes node affinity scheduling rules for the pod.
NodeAffinity *NodeAffinity `json:"nodeAffinity,omitempty"`
// Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).
PodAffinity *PodAffinity `json:"podAffinity,omitempty"`
// Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).
PodAntiAffinity *PodAntiAffinity `json:"podAntiAffinity,omitempty"`
}
// Pod affinity is a group of inter pod affinity scheduling rules.
type PodAffinity struct {
// NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented.
// If the affinity requirements specified by this field are not met at
// scheduling time, the pod will not be scheduled onto the node.
// If the affinity requirements specified by this field cease to be met
// at some point during pod execution (e.g. due to a pod label update), the
// system will try to eventually evict the pod from its node.
// When there are multiple elements, the lists of nodes corresponding to each
// podAffinityTerm are intersected, i.e. all terms must be satisfied.
// RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"`
// If the affinity requirements specified by this field are not met at
// scheduling time, the pod will not be scheduled onto the node.
// If the affinity requirements specified by this field cease to be met
// at some point during pod execution (e.g. due to a pod label update), the
// system may or may not try to eventually evict the pod from its node.
// When there are multiple elements, the lists of nodes corresponding to each
// podAffinityTerm are intersected, i.e. all terms must be satisfied.
RequiredDuringSchedulingIgnoredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingIgnoredDuringExecution,omitempty"`
// The scheduler will prefer to schedule pods to nodes that satisfy
// the affinity expressions specified by this field, but it may choose
// a node that violates one or more of the expressions. The node that is
// most preferred is the one with the greatest sum of weights, i.e.
// for each node that meets all of the scheduling requirements (resource
// request, requiredDuringScheduling affinity expressions, etc.),
// compute a sum by iterating through the elements of this field and adding
// "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the
// node(s) with the highest sum are the most preferred.
PreferredDuringSchedulingIgnoredDuringExecution []WeightedPodAffinityTerm `json:"preferredDuringSchedulingIgnoredDuringExecution,omitempty"`
}
// Pod anti affinity is a group of inter pod anti affinity scheduling rules.
type PodAntiAffinity struct {
// NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented.
// If the anti-affinity requirements specified by this field are not met at
// scheduling time, the pod will not be scheduled onto the node.
// If the anti-affinity requirements specified by this field cease to be met
// at some point during pod execution (e.g. due to a pod label update), the
// system will try to eventually evict the pod from its node.
// When there are multiple elements, the lists of nodes corresponding to each
// podAffinityTerm are intersected, i.e. all terms must be satisfied.
// RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"`
// If the anti-affinity requirements specified by this field are not met at
// scheduling time, the pod will not be scheduled onto the node.
// If the anti-affinity requirements specified by this field cease to be met
// at some point during pod execution (e.g. due to a pod label update), the
// system may or may not try to eventually evict the pod from its node.
// When there are multiple elements, the lists of nodes corresponding to each
// podAffinityTerm are intersected, i.e. all terms must be satisfied.
RequiredDuringSchedulingIgnoredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingIgnoredDuringExecution,omitempty"`
// The scheduler will prefer to schedule pods to nodes that satisfy
// the anti-affinity expressions specified by this field, but it may choose
// a node that violates one or more of the expressions. The node that is
// most preferred is the one with the greatest sum of weights, i.e.
// for each node that meets all of the scheduling requirements (resource
// request, requiredDuringScheduling anti-affinity expressions, etc.),
// compute a sum by iterating through the elements of this field and adding
// "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the
// node(s) with the highest sum are the most preferred.
PreferredDuringSchedulingIgnoredDuringExecution []WeightedPodAffinityTerm `json:"preferredDuringSchedulingIgnoredDuringExecution,omitempty"`
}
// The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)
type WeightedPodAffinityTerm struct {
// weight associated with matching the corresponding podAffinityTerm,
// in the range 1-100.
Weight int `json:"weight"`
// Required. A pod affinity term, associated with the corresponding weight.
PodAffinityTerm PodAffinityTerm `json:"podAffinityTerm"`
}
// Defines a set of pods (namely those matching the labelSelector
// relative to the given namespace(s)) that this pod should be
// co-located (affinity) or not co-located (anti-affinity) with,
// where co-located is defined as running on a node whose value of
// the label with key <topologyKey> matches that of any node on which
// a pod of the set of pods is running.
type PodAffinityTerm struct {
// A label query over a set of resources, in this case pods.
LabelSelector *unversioned.LabelSelector `json:"labelSelector,omitempty"`
// namespaces specifies which namespaces the labelSelector applies to (matches against);
// nil list means "this pod's namespace," empty list means "all namespaces"
// The json tag here is not "omitempty" since we need to distinguish nil and empty.
// See https://golang.org/pkg/encoding/json/#Marshal for more details.
Namespaces []string `json:"namespaces"`
// This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
// the labelSelector in the specified namespaces, where co-located is defined as running on a node
// whose value of the label with key topologyKey matches that of any node on which any of the
// selected pods is running.
// For PreferredDuringScheduling pod anti-affinity, empty topologyKey is interpreted as "all topologies"
// ("all topologies" here means all the topologyKeys indicated by scheduler command-line argument --failure-domains);
// for affinity and for RequiredDuringScheduling pod anti-affinity, empty topologyKey is not allowed.
TopologyKey string `json:"topologyKey,omitempty"`
}
// Node affinity is a group of node affinity scheduling rules.
type NodeAffinity struct {
// NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented.
// If the affinity requirements specified by this field are not met at
// scheduling time, the pod will not be scheduled onto the node.
// If the affinity requirements specified by this field cease to be met
// at some point during pod execution (e.g. due to an update), the system
// will try to eventually evict the pod from its node.
// RequiredDuringSchedulingRequiredDuringExecution *NodeSelector `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"`
// If the affinity requirements specified by this field are not met at
// scheduling time, the pod will not be scheduled onto the node.
// If the affinity requirements specified by this field cease to be met
// at some point during pod execution (e.g. due to an update), the system
// may or may not try to eventually evict the pod from its node.
RequiredDuringSchedulingIgnoredDuringExecution *NodeSelector `json:"requiredDuringSchedulingIgnoredDuringExecution,omitempty"`
// The scheduler will prefer to schedule pods to nodes that satisfy
// the affinity expressions specified by this field, but it may choose
// a node that violates one or more of the expressions. The node that is
// most preferred is the one with the greatest sum of weights, i.e.
// for each node that meets all of the scheduling requirements (resource
// request, requiredDuringScheduling affinity expressions, etc.),
// compute a sum by iterating through the elements of this field and adding
// "weight" to the sum if the node matches the corresponding matchExpressions; the
// node(s) with the highest sum are the most preferred.
PreferredDuringSchedulingIgnoredDuringExecution []PreferredSchedulingTerm `json:"preferredDuringSchedulingIgnoredDuringExecution,omitempty"`
}
// An empty preferred scheduling term matches all objects with implicit weight 0
// (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).
type PreferredSchedulingTerm struct {
// Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.
Weight int32 `json:"weight"`
// A node selector term, associated with the corresponding weight.
Preference NodeSelectorTerm `json:"preference"`
}
// PodSpec is a description of a pod
type PodSpec struct {
Volumes []Volume `json:"volumes"`
// Required: there must be at least one container in a pod.
Containers []Container `json:"containers"`
RestartPolicy RestartPolicy `json:"restartPolicy,omitempty"`
// Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request.
// Value must be non-negative integer. The value zero indicates delete immediately.
// If this value is nil, the default grace period will be used instead.
// The grace period is the duration in seconds after the processes running in the pod are sent
// a termination signal and the time when the processes are forcibly halted with a kill signal.
// Set this value longer than the expected cleanup time for your process.
TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"`
// Optional duration in seconds relative to the StartTime that the pod may be active on a node
// before the system actively tries to terminate the pod; value must be positive integer
ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty"`
// Required: Set DNS policy.
DNSPolicy DNSPolicy `json:"dnsPolicy,omitempty"`
// NodeSelector is a selector which must be true for the pod to fit on a node
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
// ServiceAccountName is the name of the ServiceAccount to use to run this pod
// The pod will be allowed to use secrets referenced by the ServiceAccount
ServiceAccountName string `json:"serviceAccountName"`
// NodeName is a request to schedule this pod onto a specific node. If it is non-empty,
// the scheduler simply schedules this pod onto that node, assuming that it fits resource
// requirements.
NodeName string `json:"nodeName,omitempty"`
// SecurityContext holds pod-level security attributes and common container settings.
// Optional: Defaults to empty. See type description for default values of each field.
SecurityContext *PodSecurityContext `json:"securityContext,omitempty"`
// ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec.
// If specified, these secrets will be passed to individual puller implementations for them to use. For example,
// in the case of docker, only DockerConfig type secrets are honored.
ImagePullSecrets []LocalObjectReference `json:"imagePullSecrets,omitempty"`
// Specifies the hostname of the Pod.
// If not specified, the pod's hostname will be set to a system-defined value.
Hostname string `json:"hostname,omitempty"`
// If specified, the fully qualified Pod hostname will be "<hostname>.<subdomain>.<pod namespace>.svc.<cluster domain>".
// If not specified, the pod will not have a domainname at all.
Subdomain string `json:"subdomain,omitempty"`
}
// PodSecurityContext holds pod-level security attributes and common container settings.
// Some fields are also present in container.securityContext. Field values of
// container.securityContext take precedence over field values of PodSecurityContext.
type PodSecurityContext struct {
// Use the host's network namespace. If this option is set, the ports that will be
// used must be specified.
// Optional: Default to false
HostNetwork bool `json:"hostNetwork,omitempty"`
// Use the host's pid namespace.
// Optional: Default to false.
HostPID bool `json:"hostPID,omitempty"`
// Use the host's ipc namespace.
// Optional: Default to false.
HostIPC bool `json:"hostIPC,omitempty"`
// The SELinux context to be applied to all containers.
// If unspecified, the container runtime will allocate a random SELinux context for each
// container. May also be set in SecurityContext. If set in
// both SecurityContext and PodSecurityContext, the value specified in SecurityContext
// takes precedence for that container.
SELinuxOptions *SELinuxOptions `json:"seLinuxOptions,omitempty"`
// The UID to run the entrypoint of the container process.
// Defaults to user specified in image metadata if unspecified.
// May also be set in SecurityContext. If set in both SecurityContext and
// PodSecurityContext, the value specified in SecurityContext takes precedence
// for that container.
RunAsUser *int64 `json:"runAsUser,omitempty"`
// Indicates that the container must run as a non-root user.
// If true, the Kubelet will validate the image at runtime to ensure that it
// does not run as UID 0 (root) and fail to start the container if it does.
// If unset or false, no such validation will be performed.
// May also be set in SecurityContext. If set in both SecurityContext and
// PodSecurityContext, the value specified in SecurityContext takes precedence.
RunAsNonRoot *bool `json:"runAsNonRoot,omitempty"`
// A list of groups applied to the first process run in each container, in addition
// to the container's primary GID. If unspecified, no groups will be added to
// any container.
SupplementalGroups []int64 `json:"supplementalGroups,omitempty"`
// A special supplemental group that applies to all containers in a pod.
// Some volume types allow the Kubelet to change the ownership of that volume
// to be owned by the pod:
//
// 1. The owning GID will be the FSGroup
// 2. The setgid bit is set (new files created in the volume will be owned by FSGroup)
// 3. The permission bits are OR'd with rw-rw----
//
// If unset, the Kubelet will not modify the ownership and permissions of any volume.
FSGroup *int64 `json:"fsGroup,omitempty"`
}
// PodStatus represents information about the status of a pod. Status may trail the actual
// state of a system.
type PodStatus struct {
Phase PodPhase `json:"phase,omitempty"`
Conditions []PodCondition `json:"conditions,omitempty"`
// A human readable message indicating details about why the pod is in this state.
Message string `json:"message,omitempty"`
// A brief CamelCase message indicating details about why the pod is in this state. e.g. 'OutOfDisk'
Reason string `json:"reason,omitempty"`
HostIP string `json:"hostIP,omitempty"`
PodIP string `json:"podIP,omitempty"`
// Date and time at which the object was acknowledged by the Kubelet.
// This is before the Kubelet pulled the container image(s) for the pod.
StartTime *unversioned.Time `json:"startTime,omitempty"`
// The list has one entry per container in the manifest. Each entry is
// currently the output of `docker inspect`. This output format is *not*
// final and should not be relied upon.
// TODO: Make real decisions about what our info should look like. Re-enable fuzz test
// when we have done this.
ContainerStatuses []ContainerStatus `json:"containerStatuses,omitempty"`
}
// PodStatusResult is a wrapper for PodStatus returned by kubelet that can be encode/decoded
type PodStatusResult struct {
unversioned.TypeMeta `json:",inline"`
ObjectMeta `json:"metadata,omitempty"`
// Status represents the current information about a pod. This data may not be up
// to date.
Status PodStatus `json:"status,omitempty"`
}
// +genclient=true
// Pod is a collection of containers, used as either input (create, update) or as output (list, get).
type Pod struct {
unversioned.TypeMeta `json:",inline"`
ObjectMeta `json:"metadata,omitempty"`
// Spec defines the behavior of a pod.
Spec PodSpec `json:"spec,omitempty"`
// Status represents the current information about a pod. This data may not be up
// to date.
Status PodStatus `json:"status,omitempty"`
}
// PodTemplateSpec describes the data a pod should have when created from a template
type PodTemplateSpec struct {
// Metadata of the pods created from this template.
ObjectMeta `json:"metadata,omitempty"`
// Spec defines the behavior of a pod.
Spec PodSpec `json:"spec,omitempty"`
}
// +genclient=true
// PodTemplate describes a template for creating copies of a predefined pod.
type PodTemplate struct {
unversioned.TypeMeta `json:",inline"`
ObjectMeta `json:"metadata,omitempty"`
// Template defines the pods that will be created from this pod template
Template PodTemplateSpec `json:"template,omitempty"`
}
// PodTemplateList is a list of PodTemplates.
type PodTemplateList struct {
unversioned.TypeMeta `json:",inline"`
unversioned.ListMeta `json:"metadata,omitempty"`
Items []PodTemplate `json:"items"`
}
// ReplicationControllerSpec is the specification of a replication controller.
// As the internal representation of a replication controller, it may have either
// a TemplateRef or a Template set.
type ReplicationControllerSpec struct {
// Replicas is the number of desired replicas.
Replicas int32 `json:"replicas"`
// Selector is a label query over pods that should match the Replicas count.
Selector map[string]string `json:"selector"`
// TemplateRef is a reference to an object that describes the pod that will be created if
// insufficient replicas are detected. This reference is ignored if a Template is set.
// Must be set before converting to a versioned API object
//TemplateRef *ObjectReference `json:"templateRef,omitempty"`
// Template is the object that describes the pod that will be created if
// insufficient replicas are detected. Internally, this takes precedence over a
// TemplateRef.
Template *PodTemplateSpec `json:"template,omitempty"`
}
// ReplicationControllerStatus represents the current status of a replication
// controller.
type ReplicationControllerStatus struct {
// Replicas is the number of actual replicas.
Replicas int32 `json:"replicas"`
// The number of pods that have labels matching the labels of the pod template of the replication controller.
FullyLabeledReplicas int32 `json:"fullyLabeledReplicas,omitempty"`
// ObservedGeneration is the most recent generation observed by the controller.
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}
// +genclient=true
// ReplicationController represents the configuration of a replication controller.
type ReplicationController struct {
unversioned.TypeMeta `json:",inline"`
ObjectMeta `json:"metadata,omitempty"`
// Spec defines the desired behavior of this replication controller.
Spec ReplicationControllerSpec `json:"spec,omitempty"`
// Status is the current status of this replication controller. This data may be
// out of date by some window of time.
Status ReplicationControllerStatus `json:"status,omitempty"`
}
// ReplicationControllerList is a collection of replication controllers.
type ReplicationControllerList struct {
unversioned.TypeMeta `json:",inline"`
unversioned.ListMeta `json:"metadata,omitempty"`
Items []ReplicationController `json:"items"`
}
const (
// ClusterIPNone - do not assign a cluster IP
// no proxying required and no environment variables should be created for pods
ClusterIPNone = "None"
)
// ServiceList holds a list of services.
type ServiceList struct {
unversioned.TypeMeta `json:",inline"`
unversioned.ListMeta `json:"metadata,omitempty"`
Items []Service `json:"items"`
}
// Session Affinity Type string
type ServiceAffinity string
const (
// ServiceAffinityClientIP is the Client IP based.
ServiceAffinityClientIP ServiceAffinity = "ClientIP"
// ServiceAffinityNone - no session affinity.
ServiceAffinityNone ServiceAffinity = "None"
)
// Service Type string describes ingress methods for a service
type ServiceType string
const (
// ServiceTypeClusterIP means a service will only be accessible inside the
// cluster, via the ClusterIP.
ServiceTypeClusterIP ServiceType = "ClusterIP"
// ServiceTypeNodePort means a service will be exposed on one port of
// every node, in addition to 'ClusterIP' type.
ServiceTypeNodePort ServiceType = "NodePort"
// ServiceTypeLoadBalancer means a service will be exposed via an
// external load balancer (if the cloud provider supports it), in addition
// to 'NodePort' type.
ServiceTypeLoadBalancer ServiceType = "LoadBalancer"
)
// ServiceStatus represents the current status of a service
type ServiceStatus struct {
// LoadBalancer contains the current status of the load-balancer,
// if one is present.
LoadBalancer LoadBalancerStatus `json:"loadBalancer,omitempty"`
}
// LoadBalancerStatus represents the status of a load-balancer
type LoadBalancerStatus struct {
// Ingress is a list containing ingress points for the load-balancer;
// traffic intended for the service should be sent to these ingress points.
Ingress []LoadBalancerIngress `json:"ingress,omitempty"`
}
// LoadBalancerIngress represents the status of a load-balancer ingress point:
// traffic intended for the service should be sent to an ingress point.
type LoadBalancerIngress struct {
// IP is set for load-balancer ingress points that are IP based
// (typically GCE or OpenStack load-balancers)
IP string `json:"ip,omitempty"`
// Hostname is set for load-balancer ingress points that are DNS based
// (typically AWS load-balancers)
Hostname string `json:"hostname,omitempty"`
}
// ServiceSpec describes the attributes that a user creates on a service
type ServiceSpec struct {
// Type determines how the service will be exposed. Valid options: ClusterIP, NodePort, LoadBalancer
Type ServiceType `json:"type,omitempty"`
// Required: The list of ports that are exposed by this service.
Ports []ServicePort `json:"ports"`
// This service will route traffic to pods having labels matching this selector. If empty or not present,
// the service is assumed to have endpoints set by an external process and Kubernetes will not modify
// those endpoints.
Selector map[string]string `json:"selector"`
// ClusterIP is usually assigned by the master. If specified by the user
// we will try to respect it or else fail the request. This field can
// not be changed by updates.
// Valid values are None, empty string (""), or a valid IP address
// None can be specified for headless services when proxying is not required
ClusterIP string `json:"clusterIP,omitempty"`
// ExternalIPs are used by external load balancers, or can be set by
// users to handle external traffic that arrives at a node.
ExternalIPs []string `json:"externalIPs,omitempty"`
// Only applies to Service Type: LoadBalancer
// LoadBalancer will get created with the IP specified in this field.
// This feature depends on whether the underlying cloud-provider supports specifying
// the loadBalancerIP when a load balancer is created.
// This field will be ignored if the cloud-provider does not support the feature.
LoadBalancerIP string `json:"loadBalancerIP,omitempty"`
// Required: Supports "ClientIP" and "None". Used to maintain session affinity.
SessionAffinity ServiceAffinity `json:"sessionAffinity,omitempty"`
}
type ServicePort struct {
// Optional if only one ServicePort is defined on this service: The
// name of this port within the service. This must be a DNS_LABEL.
// All ports within a ServiceSpec must have unique names. This maps to
// the 'Name' field in EndpointPort objects.
Name string `json:"name"`
// The IP protocol for this port. Supports "TCP" and "UDP".
Protocol Protocol `json:"protocol"`
// The port that will be exposed on the service.
Port int32 `json:"port"`
// Optional: The target port on pods selected by this service. If this
// is a string, it will be looked up as a named port in the target
// Pod's container ports. If this is not specified, the value
// of the 'port' field is used (an identity map).
// This field is ignored for services with clusterIP=None, and should be
// omitted or set equal to the 'port' field.
TargetPort intstr.IntOrString `json:"targetPort"`
// The port on each node on which this service is exposed.
// Default is to auto-allocate a port if the ServiceType of this Service requires one.
NodePort int32 `json:"nodePort"`
}
// +genclient=true
// Service is a named abstraction of software service (for example, mysql) consisting of local port
// (for example 3306) that the proxy listens on, and the selector that determines which pods
// will answer requests sent through the proxy.
type Service struct {
unversioned.TypeMeta `json:",inline"`
ObjectMeta `json:"metadata,omitempty"`
// Spec defines the behavior of a service.
Spec ServiceSpec `json:"spec,omitempty"`
// Status represents the current status of a service.
Status ServiceStatus `json:"status,omitempty"`
}
// +genclient=true
// ServiceAccount binds together:
// * a name, understood by users, and perhaps by peripheral systems, for an identity
// * a principal that can be authenticated and authorized
// * a set of secrets
type ServiceAccount struct {
unversioned.TypeMeta `json:",inline"`
ObjectMeta `json:"metadata,omitempty"`
// Secrets is the list of secrets allowed to be used by pods running using this ServiceAccount
Secrets []ObjectReference `json:"secrets"`
// ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images
// in pods that reference this ServiceAccount. ImagePullSecrets are distinct from Secrets because Secrets
// can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet.
ImagePullSecrets []LocalObjectReference `json:"imagePullSecrets,omitempty"`
}
// ServiceAccountList is a list of ServiceAccount objects
type ServiceAccountList struct {
unversioned.TypeMeta `json:",inline"`
unversioned.ListMeta `json:"metadata,omitempty"`
Items []ServiceAccount `json:"items"`
}
// +genclient=true
// Endpoints is a collection of endpoints that implement the actual service. Example:
// Name: "mysvc",
// Subsets: [
// {
// Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}],
// Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}]
// },
// {
// Addresses: [{"ip": "10.10.3.3"}],
// Ports: [{"name": "a", "port": 93}, {"name": "b", "port": 76}]
// },
// ]
type Endpoints struct {
unversioned.TypeMeta `json:",inline"`
ObjectMeta `json:"metadata,omitempty"`
// The set of all endpoints is the union of all subsets.
Subsets []EndpointSubset
}
// EndpointSubset is a group of addresses with a common set of ports. The
// expanded set of endpoints is the Cartesian product of Addresses x Ports.
// For example, given:
// {
// Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}],
// Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}]
// }
// The resulting set of endpoints can be viewed as:
// a: [ 10.10.1.1:8675, 10.10.2.2:8675 ],
// b: [ 10.10.1.1:309, 10.10.2.2:309 ]
type EndpointSubset struct {
Addresses []EndpointAddress
NotReadyAddresses []EndpointAddress
Ports []EndpointPort
}
// EndpointAddress is a tuple that describes single IP address.
type EndpointAddress struct {
// The IP of this endpoint.
// IPv6 is also accepted but not fully supported on all platforms. Also, certain
// kubernetes components, like kube-proxy, are not IPv6 ready.
// TODO: This should allow hostname or IP, see #4447.
IP string
// Optional: Hostname of this endpoint
// Meant to be used by DNS servers etc.
Hostname string `json:"hostname,omitempty"`
// Optional: The kubernetes object related to the entry point.
TargetRef *ObjectReference
}
// EndpointPort is a tuple that describes a single port.
type EndpointPort struct {
// The name of this port (corresponds to ServicePort.Name). Optional
// if only one port is defined. Must be a DNS_LABEL.
Name string
// The port number.
Port int32
// The IP protocol for this port.
Protocol Protocol
}
// EndpointsList is a list of endpoints.
type EndpointsList struct {
unversioned.TypeMeta `json:",inline"`
unversioned.ListMeta `json:"metadata,omitempty"`
Items []Endpoints `json:"items"`
}
// NodeSpec describes the attributes that a node is created with.
type NodeSpec struct {
// PodCIDR represents the pod IP range assigned to the node
// Note: assigning IP ranges to nodes might need to be revisited when we support migratable IPs.
PodCIDR string `json:"podCIDR,omitempty"`
// External ID of the node assigned by some machine database (e.g. a cloud provider)
ExternalID string `json:"externalID,omitempty"`
// ID of the node assigned by the cloud provider
// Note: format is "<ProviderName>://<ProviderSpecificNodeID>"
ProviderID string `json:"providerID,omitempty"`
// Unschedulable controls node schedulability of new pods. By default node is schedulable.
Unschedulable bool `json:"unschedulable,omitempty"`
}
// DaemonEndpoint contains information about a single Daemon endpoint.
type DaemonEndpoint struct {
/*
The port tag was not properly in quotes in earlier releases, so it must be
uppercased for backwards compat (since it was falling back to var name of
'Port').
*/
// Port number of the given endpoint.
Port int32 `json:"Port"`
}
// NodeDaemonEndpoints lists ports opened by daemons running on the Node.
type NodeDaemonEndpoints struct {
// Endpoint on which Kubelet is listening.
KubeletEndpoint DaemonEndpoint `json:"kubeletEndpoint,omitempty"`
}
// NodeSystemInfo is a set of ids/uuids to uniquely identify the node.
type NodeSystemInfo struct {
// Machine ID reported by the node.
MachineID string `json:"machineID"`
// System UUID reported by the node.
SystemUUID string `json:"systemUUID"`
// Boot ID reported by the node.
BootID string `json:"bootID"`
// Kernel Version reported by the node.
KernelVersion string `json:"kernelVersion"`
// OS Image reported by the node.
OSImage string `json:"osImage"`
// ContainerRuntime Version reported by the node.
ContainerRuntimeVersion string `json:"containerRuntimeVersion"`
// Kubelet Version reported by the node.
KubeletVersion string `json:"kubeletVersion"`
// KubeProxy Version reported by the node.
KubeProxyVersion string `json:"kubeProxyVersion"`
}
// NodeStatus is information about the current status of a node.
type NodeStatus struct {
// Capacity represents the total resources of a node.
Capacity ResourceList `json:"capacity,omitempty"`
// Allocatable represents the resources of a node that are available for scheduling.
Allocatable ResourceList `json:"allocatable,omitempty"`
// NodePhase is the current lifecycle phase of the node.
Phase NodePhase `json:"phase,omitempty"`
// Conditions is an array of current node conditions.
Conditions []NodeCondition `json:"conditions,omitempty"`
// Queried from cloud provider, if available.
Addresses []NodeAddress `json:"addresses,omitempty"`
// Endpoints of daemons running on the Node.
DaemonEndpoints NodeDaemonEndpoints `json:"daemonEndpoints,omitempty"`
// Set of ids/uuids to uniquely identify the node.
NodeInfo NodeSystemInfo `json:"nodeInfo,omitempty"`
// List of container images on this node
Images []ContainerImage `json:"images,omitempty"`
}
// Describe a container image
type ContainerImage struct {
// Names by which this image is known.
Names []string `json:"names"`
// The size of the image in bytes.
SizeBytes int64 `json:"sizeBytes,omitempty"`
}
type NodePhase string
// These are the valid phases of node.
const (
// NodePending means the node has been created/added by the system, but not configured.
NodePending NodePhase = "Pending"
// NodeRunning means the node has been configured and has Kubernetes components running.
NodeRunning NodePhase = "Running"
// NodeTerminated means the node has been removed from the cluster.
NodeTerminated NodePhase = "Terminated"
)
type NodeConditionType string
// These are valid conditions of node. Currently, we don't have enough information to decide
// node condition. In the future, we will add more. The proposed set of conditions are:
// NodeReady, NodeReachable
const (
// NodeReady means kubelet is healthy and ready to accept pods.
NodeReady NodeConditionType = "Ready"
// NodeOutOfDisk means the kubelet will not accept new pods due to insufficient free disk
// space on the node.
NodeOutOfDisk NodeConditionType = "OutOfDisk"
)
type NodeCondition struct {
Type NodeConditionType `json:"type"`
Status ConditionStatus `json:"status"`
LastHeartbeatTime unversioned.Time `json:"lastHeartbeatTime,omitempty"`
LastTransitionTime unversioned.Time `json:"lastTransitionTime,omitempty"`
Reason string `json:"reason,omitempty"`
Message string `json:"message,omitempty"`
}
type NodeAddressType string
// These are valid address types of node. NodeLegacyHostIP is used to transit
// from out-dated HostIP field to NodeAddress.
const (
NodeLegacyHostIP NodeAddressType = "LegacyHostIP"
NodeHostName NodeAddressType = "Hostname"
NodeExternalIP NodeAddressType = "ExternalIP"
NodeInternalIP NodeAddressType = "InternalIP"
)
type NodeAddress struct {
Type NodeAddressType `json:"type"`
Address string `json:"address"`
}
// NodeResources is an object for conveying resource information about a node.
// see http://releases.k8s.io/HEAD/docs/design/resources.md for more details.
type NodeResources struct {
// Capacity represents the available resources of a node
Capacity ResourceList `json:"capacity,omitempty"`
}
// ResourceName is the name identifying various resources in a ResourceList.
type ResourceName string
const (
// CPU, in cores. (500m = .5 cores)
ResourceCPU ResourceName = "cpu"
// Memory, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024)
ResourceMemory ResourceName = "memory"
// Volume size, in bytes (e,g. 5Gi = 5GiB = 5 * 1024 * 1024 * 1024)
ResourceStorage ResourceName = "storage"
// Number of Pods that may be running on this Node: see ResourcePods
)
// ResourceList is a set of (resource name, quantity) pairs.
type ResourceList map[ResourceName]resource.Quantity
// +genclient=true,nonNamespaced=true
// Node is a worker node in Kubernetes
// The name of the node according to etcd is in ObjectMeta.Name.
type Node struct {
unversioned.TypeMeta `json:",inline"`
ObjectMeta `json:"metadata,omitempty"`
// Spec defines the behavior of a node.
Spec NodeSpec `json:"spec,omitempty"`
// Status describes the current status of a Node
Status NodeStatus `json:"status,omitempty"`
}
// NodeList is a list of nodes.
type NodeList struct {
unversioned.TypeMeta `json:",inline"`
unversioned.ListMeta `json:"metadata,omitempty"`
Items []Node `json:"items"`
}
// NamespaceSpec describes the attributes on a Namespace
type NamespaceSpec struct {
// Finalizers is an opaque list of values that must be empty to permanently remove object from storage
Finalizers []FinalizerName
}
type FinalizerName string
// These are internal finalizer values to Kubernetes, must be qualified name unless defined here
const (
FinalizerKubernetes FinalizerName = "kubernetes"
)
// NamespaceStatus is information about the current status of a Namespace.
type NamespaceStatus struct {
// Phase is the current lifecycle phase of the namespace.
Phase NamespacePhase `json:"phase,omitempty"`
}
type NamespacePhase string
// These are the valid phases of a namespace.
const (
// NamespaceActive means the namespace is available for use in the system
NamespaceActive NamespacePhase = "Active"
// NamespaceTerminating means the namespace is undergoing graceful termination
NamespaceTerminating NamespacePhase = "Terminating"
)
// +genclient=true,nonNamespaced=true
// A namespace provides a scope for Names.
// Use of multiple namespaces is optional
type Namespace struct {
unversioned.TypeMeta `json:",inline"`
ObjectMeta `json:"metadata,omitempty"`
// Spec defines the behavior of the Namespace.
Spec NamespaceSpec `json:"spec,omitempty"`
// Status describes the current status of a Namespace
Status NamespaceStatus `json:"status,omitempty"`
}
// NamespaceList is a list of Namespaces.
type NamespaceList struct {
unversioned.TypeMeta `json:",inline"`
unversioned.ListMeta `json:"metadata,omitempty"`
Items []Namespace `json:"items"`
}
// Binding ties one object to another - for example, a pod is bound to a node by a scheduler.
type Binding struct {
unversioned.TypeMeta `json:",inline"`
// ObjectMeta describes the object that is being bound.
ObjectMeta `json:"metadata,omitempty"`
// Target is the object to bind to.
Target ObjectReference `json:"target"`
}
// Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.
type Preconditions struct {
// Specifies the target UID.
UID *types.UID `json:"uid,omitempty"`
}
// DeleteOptions may be provided when deleting an API object
type DeleteOptions struct {
unversioned.TypeMeta `json:",inline"`
// Optional duration in seconds before the object should be deleted. Value must be non-negative integer.
// The value zero indicates delete immediately. If this value is nil, the default grace period for the
// specified type will be used.
GracePeriodSeconds *int64 `json:"gracePeriodSeconds,omitempty"`
// Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be
// returned.
Preconditions *Preconditions `json:"preconditions,omitempty"`
// Should the dependent objects be orphaned. If true/false, the "orphan"
// finalizer will be added to/removed from the object's finalizers list.
OrphanDependents *bool `json:"orphanDependents,omitempty"`
}
// ExportOptions is the query options to the standard REST get call.
type ExportOptions struct {
unversioned.TypeMeta `json:",inline"`
// Should this value be exported. Export strips fields that a user can not specify.
Export bool `json:"export"`
// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'
Exact bool `json:"exact"`
}
// ListOptions is the query options to a standard REST list call, and has future support for
// watch calls.
type ListOptions struct {
unversioned.TypeMeta `json:",inline"`
// A selector based on labels
LabelSelector labels.Selector
// A selector based on fields
FieldSelector fields.Selector
// If true, watch for changes to this list
Watch bool
// The resource version to watch (no effect on list yet)
ResourceVersion string
// Timeout for the list/watch call.
TimeoutSeconds *int64
}
// PodLogOptions is the query options for a Pod's logs REST call
type PodLogOptions struct {
unversioned.TypeMeta
// Container for which to return logs
Container string
// If true, follow the logs for the pod
Follow bool
// If true, return previous terminated container logs
Previous bool
// A relative time in seconds before the current time from which to show logs. If this value
// precedes the time a pod was started, only logs since the pod start will be returned.
// If this value is in the future, no logs will be returned.
// Only one of sinceSeconds or sinceTime may be specified.
SinceSeconds *int64
// An RFC3339 timestamp from which to show logs. If this value
// precedes the time a pod was started, only logs since the pod start will be returned.
// If this value is in the future, no logs will be returned.
// Only one of sinceSeconds or sinceTime may be specified.
SinceTime *unversioned.Time
// If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line
// of log output.
Timestamps bool
// If set, the number of lines from the end of the logs to show. If not specified,
// logs are shown from the creation of the container or sinceSeconds or sinceTime
TailLines *int64
// If set, the number of bytes to read from the server before terminating the
// log output. This may not display a complete final line of logging, and may return
// slightly more or slightly less than the specified limit.
LimitBytes *int64
}
// PodAttachOptions is the query options to a Pod's remote attach call
// TODO: merge w/ PodExecOptions below for stdin, stdout, etc
type PodAttachOptions struct {
unversioned.TypeMeta `json:",inline"`
// Stdin if true indicates that stdin is to be redirected for the attach call
Stdin bool `json:"stdin,omitempty"`
// Stdout if true indicates that stdout is to be redirected for the attach call
Stdout bool `json:"stdout,omitempty"`
// Stderr if true indicates that stderr is to be redirected for the attach call
Stderr bool `json:"stderr,omitempty"`
// TTY if true indicates that a tty will be allocated for the attach call
TTY bool `json:"tty,omitempty"`
// Container to attach to.
Container string `json:"container,omitempty"`
}
// PodExecOptions is the query options to a Pod's remote exec call
type PodExecOptions struct {
unversioned.TypeMeta
// Stdin if true indicates that stdin is to be redirected for the exec call
Stdin bool
// Stdout if true indicates that stdout is to be redirected for the exec call
Stdout bool
// Stderr if true indicates that stderr is to be redirected for the exec call
Stderr bool
// TTY if true indicates that a tty will be allocated for the exec call
TTY bool
// Container in which to execute the command.
Container string
// Command is the remote command to execute; argv array; not executed within a shell.
Command []string
}
// PodProxyOptions is the query options to a Pod's proxy call
type PodProxyOptions struct {
unversioned.TypeMeta
// Path is the URL path to use for the current proxy request
Path string
}
// NodeProxyOptions is the query options to a Node's proxy call
type NodeProxyOptions struct {
unversioned.TypeMeta
// Path is the URL path to use for the current proxy request
Path string
}
// ServiceProxyOptions is the query options to a Service's proxy call.
type ServiceProxyOptions struct {
unversioned.TypeMeta
// Path is the part of URLs that include service endpoints, suffixes,
// and parameters to use for the current proxy request to service.
// For example, the whole request URL is
// http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy.
// Path is _search?q=user:kimchy.
Path string
}
// OwnerReference contains enough information to let you identify an owning
// object. Currently, an owning object must be in the same namespace, so there
// is no namespace field.
type OwnerReference struct {
// API version of the referent.
APIVersion string `json:"apiVersion"`
// Kind of the referent.
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
Kind string `json:"kind"`
// Name of the referent.
// More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names
Name string `json:"name"`
// UID of the referent.
// More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#uids
UID types.UID `json:"uid"`
}
// ObjectReference contains enough information to let you inspect or modify the referred object.
type ObjectReference struct {
Kind string `json:"kind,omitempty"`
Namespace string `json:"namespace,omitempty"`
Name string `json:"name,omitempty"`
UID types.UID `json:"uid,omitempty"`
APIVersion string `json:"apiVersion,omitempty"`
ResourceVersion string `json:"resourceVersion,omitempty"`
// Optional. If referring to a piece of an object instead of an entire object, this string
// should contain information to identify the sub-object. For example, if the object
// reference is to a container within a pod, this would take on a value like:
// "spec.containers{name}" (where "name" refers to the name of the container that triggered
// the event) or if no container name is specified "spec.containers[2]" (container with
// index 2 in this pod). This syntax is chosen only to have some well-defined way of
// referencing a part of an object.
// TODO: this design is not final and this field is subject to change in the future.
FieldPath string `json:"fieldPath,omitempty"`
}
// LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.
type LocalObjectReference struct {
//TODO: Add other useful fields. apiVersion, kind, uid?
Name string
}
type SerializedReference struct {
unversioned.TypeMeta `json:",inline"`
Reference ObjectReference `json:"reference,omitempty"`
}
type EventSource struct {
// Component from which the event is generated.
Component string `json:"component,omitempty"`
// Host name on which the event is generated.
Host string `json:"host,omitempty"`
}
// Valid values for event types (new types could be added in future)
const (
// Information only and will not cause any problems
EventTypeNormal string = "Normal"
// These events are to warn that something might go wrong
EventTypeWarning string = "Warning"
)
// +genclient=true
// Event is a report of an event somewhere in the cluster.
// TODO: Decide whether to store these separately or with the object they apply to.
type Event struct {
unversioned.TypeMeta `json:",inline"`
ObjectMeta `json:"metadata,omitempty"`
// Required. The object that this event is about.
InvolvedObject ObjectReference `json:"involvedObject,omitempty"`
// Optional; this should be a short, machine understandable string that gives the reason
// for this event being generated. For example, if the event is reporting that a container
// can't start, the Reason might be "ImageNotFound".
// TODO: provide exact specification for format.
Reason string `json:"reason,omitempty"`
// Optional. A human-readable description of the status of this operation.
// TODO: decide on maximum length.
Message string `json:"message,omitempty"`
// Optional. The component reporting this event. Should be a short machine understandable string.
Source EventSource `json:"source,omitempty"`
// The time at which the event was first recorded. (Time of server receipt is in TypeMeta.)
FirstTimestamp unversioned.Time `json:"firstTimestamp,omitempty"`
// The time at which the most recent occurrence of this event was recorded.
LastTimestamp unversioned.Time `json:"lastTimestamp,omitempty"`
// The number of times this event has occurred.
Count int32 `json:"count,omitempty"`
// Type of this event (Normal, Warning), new types could be added in the future.
Type string `json:"type,omitempty"`
}
// EventList is a list of events.
type EventList struct {
unversioned.TypeMeta `json:",inline"`
unversioned.ListMeta `json:"metadata,omitempty"`
Items []Event `json:"items"`
}
// List holds a list of objects, which may not be known by the server.
type List struct {
unversioned.TypeMeta `json:",inline"`
unversioned.ListMeta `json:"metadata,omitempty"`
Items []runtime.Object `json:"items"`
}
// A type of object that is limited
type LimitType string
const (
// Limit that applies to all pods in a namespace
LimitTypePod LimitType = "Pod"
// Limit that applies to all containers in a namespace
LimitTypeContainer LimitType = "Container"
)
// LimitRangeItem defines a min/max usage limit for any resource that matches on kind
type LimitRangeItem struct {
// Type of resource that this limit applies to
Type LimitType `json:"type,omitempty"`
// Max usage constraints on this kind by resource name
Max ResourceList `json:"max,omitempty"`
// Min usage constraints on this kind by resource name
Min ResourceList `json:"min,omitempty"`
// Default resource requirement limit value by resource name.
Default ResourceList `json:"default,omitempty"`
// DefaultRequest resource requirement request value by resource name.
DefaultRequest ResourceList `json:"defaultRequest,omitempty"`
// MaxLimitRequestRatio represents the max burst value for the named resource
MaxLimitRequestRatio ResourceList `json:"maxLimitRequestRatio,omitempty"`
}
// LimitRangeSpec defines a min/max usage limit for resources that match on kind
type LimitRangeSpec struct {
// Limits is the list of LimitRangeItem objects that are enforced
Limits []LimitRangeItem `json:"limits"`
}
// +genclient=true
// LimitRange sets resource usage limits for each kind of resource in a Namespace
type LimitRange struct {
unversioned.TypeMeta `json:",inline"`
ObjectMeta `json:"metadata,omitempty"`
// Spec defines the limits enforced
Spec LimitRangeSpec `json:"spec,omitempty"`
}
// LimitRangeList is a list of LimitRange items.
type LimitRangeList struct {
unversioned.TypeMeta `json:",inline"`
unversioned.ListMeta `json:"metadata,omitempty"`
// Items is a list of LimitRange objects
Items []LimitRange `json:"items"`
}
// The following identify resource constants for Kubernetes object types
const (
// Pods, number
ResourcePods ResourceName = "pods"
// Services, number
ResourceServices ResourceName = "services"
// ReplicationControllers, number
ResourceReplicationControllers ResourceName = "replicationcontrollers"
// ResourceQuotas, number
ResourceQuotas ResourceName = "resourcequotas"
// ResourceSecrets, number
ResourceSecrets ResourceName = "secrets"
// ResourceConfigMaps, number
ResourceConfigMaps ResourceName = "configmaps"
// ResourcePersistentVolumeClaims, number
ResourcePersistentVolumeClaims ResourceName = "persistentvolumeclaims"
// ResourceServicesNodePorts, number
ResourceServicesNodePorts ResourceName = "services.nodeports"
// ResourceServicesLoadBalancers, number
ResourceServicesLoadBalancers ResourceName = "services.loadbalancers"
// CPU request, in cores. (500m = .5 cores)
ResourceRequestsCPU ResourceName = "requests.cpu"
// Memory request, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024)
ResourceRequestsMemory ResourceName = "requests.memory"
// CPU limit, in cores. (500m = .5 cores)
ResourceLimitsCPU ResourceName = "limits.cpu"
// Memory limit, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024)
ResourceLimitsMemory ResourceName = "limits.memory"
)
// A ResourceQuotaScope defines a filter that must match each object tracked by a quota
type ResourceQuotaScope string
const (
// Match all pod objects where spec.activeDeadlineSeconds
ResourceQuotaScopeTerminating ResourceQuotaScope = "Terminating"
// Match all pod objects where !spec.activeDeadlineSeconds
ResourceQuotaScopeNotTerminating ResourceQuotaScope = "NotTerminating"
// Match all pod objects that have best effort quality of service
ResourceQuotaScopeBestEffort ResourceQuotaScope = "BestEffort"
// Match all pod objects that do not have best effort quality of service
ResourceQuotaScopeNotBestEffort ResourceQuotaScope = "NotBestEffort"
)
// ResourceQuotaSpec defines the desired hard limits to enforce for Quota
type ResourceQuotaSpec struct {
// Hard is the set of desired hard limits for each named resource
Hard ResourceList `json:"hard,omitempty"`
// A collection of filters that must match each object tracked by a quota.
// If not specified, the quota matches all objects.
Scopes []ResourceQuotaScope `json:"scopes,omitempty"`
}
// ResourceQuotaStatus defines the enforced hard limits and observed use
type ResourceQuotaStatus struct {
// Hard is the set of enforced hard limits for each named resource
Hard ResourceList `json:"hard,omitempty"`
// Used is the current observed total usage of the resource in the namespace
Used ResourceList `json:"used,omitempty"`
}
// +genclient=true
// ResourceQuota sets aggregate quota restrictions enforced per namespace
type ResourceQuota struct {
unversioned.TypeMeta `json:",inline"`
ObjectMeta `json:"metadata,omitempty"`
// Spec defines the desired quota
Spec ResourceQuotaSpec `json:"spec,omitempty"`
// Status defines the actual enforced quota and its current usage
Status ResourceQuotaStatus `json:"status,omitempty"`
}
// ResourceQuotaList is a list of ResourceQuota items
type ResourceQuotaList struct {
unversioned.TypeMeta `json:",inline"`
unversioned.ListMeta `json:"metadata,omitempty"`
// Items is a list of ResourceQuota objects
Items []ResourceQuota `json:"items"`
}
// +genclient=true
// Secret holds secret data of a certain type. The total bytes of the values in
// the Data field must be less than MaxSecretSize bytes.
type Secret struct {
unversioned.TypeMeta `json:",inline"`
ObjectMeta `json:"metadata,omitempty"`
// Data contains the secret data. Each key must be a valid DNS_SUBDOMAIN
// or leading dot followed by valid DNS_SUBDOMAIN.
// The serialized form of the secret data is a base64 encoded string,
// representing the arbitrary (possibly non-string) data value here.
Data map[string][]byte `json:"data,omitempty"`
// Used to facilitate programmatic handling of secret data.
Type SecretType `json:"type,omitempty"`
}
const MaxSecretSize = 1 * 1024 * 1024
type SecretType string
const (
// SecretTypeOpaque is the default; arbitrary user-defined data
SecretTypeOpaque SecretType = "Opaque"
// SecretTypeServiceAccountToken contains a token that identifies a service account to the API
//
// Required fields:
// - Secret.Annotations["kubernetes.io/service-account.name"] - the name of the ServiceAccount the token identifies
// - Secret.Annotations["kubernetes.io/service-account.uid"] - the UID of the ServiceAccount the token identifies
// - Secret.Data["token"] - a token that identifies the service account to the API
SecretTypeServiceAccountToken SecretType = "kubernetes.io/service-account-token"
// ServiceAccountNameKey is the key of the required annotation for SecretTypeServiceAccountToken secrets
ServiceAccountNameKey = "kubernetes.io/service-account.name"
// ServiceAccountUIDKey is the key of the required annotation for SecretTypeServiceAccountToken secrets
ServiceAccountUIDKey = "kubernetes.io/service-account.uid"
// ServiceAccountTokenKey is the key of the required data for SecretTypeServiceAccountToken secrets
ServiceAccountTokenKey = "token"
// ServiceAccountKubeconfigKey is the key of the optional kubeconfig data for SecretTypeServiceAccountToken secrets
ServiceAccountKubeconfigKey = "kubernetes.kubeconfig"
// ServiceAccountRootCAKey is the key of the optional root certificate authority for SecretTypeServiceAccountToken secrets
ServiceAccountRootCAKey = "ca.crt"
// ServiceAccountNamespaceKey is the key of the optional namespace to use as the default for namespaced API calls
ServiceAccountNamespaceKey = "namespace"
// SecretTypeDockercfg contains a dockercfg file that follows the same format rules as ~/.dockercfg
//
// Required fields:
// - Secret.Data[".dockercfg"] - a serialized ~/.dockercfg file
SecretTypeDockercfg SecretType = "kubernetes.io/dockercfg"
// DockerConfigKey is the key of the required data for SecretTypeDockercfg secrets
DockerConfigKey = ".dockercfg"
// SecretTypeDockerConfigJson contains a dockercfg file that follows the same format rules as ~/.docker/config.json
//
// Required fields:
// - Secret.Data[".dockerconfigjson"] - a serialized ~/.docker/config.json file
SecretTypeDockerConfigJson SecretType = "kubernetes.io/dockerconfigjson"
// DockerConfigJsonKey is the key of the required data for SecretTypeDockerConfigJson secrets
DockerConfigJsonKey = ".dockerconfigjson"
// SecretTypeBasicAuth contains data needed for basic authentication.
//
// Required at least one of fields:
// - Secret.Data["username"] - username used for authentication
// - Secret.Data["password"] - password or token needed for authentication
SecretTypeBasicAuth SecretType = "kubernetes.io/basic-auth"
// BasicAuthUsernameKey is the key of the username for SecretTypeBasicAuth secrets
BasicAuthUsernameKey = "username"
// BasicAuthPasswordKey is the key of the password or token for SecretTypeBasicAuth secrets
BasicAuthPasswordKey = "password"
// SecretTypeSSHAuth contains data needed for SSH authetication.
//
// Required field:
// - Secret.Data["ssh-privatekey"] - private SSH key needed for authentication
SecretTypeSSHAuth SecretType = "kubernetes.io/ssh-auth"
// SSHAuthPrivateKey is the key of the required SSH private key for SecretTypeSSHAuth secrets
SSHAuthPrivateKey = "ssh-privatekey"
// SecretTypeTLS contains information about a TLS client or server secret. It
// is primarily used with TLS termination of the Ingress resource, but may be
// used in other types.
//
// Required fields:
// - Secret.Data["tls.key"] - TLS private key.
// Secret.Data["tls.crt"] - TLS certificate.
// TODO: Consider supporting different formats, specifying CA/destinationCA.
SecretTypeTLS SecretType = "kubernetes.io/tls"
// TLSCertKey is the key for tls certificates in a TLS secert.
TLSCertKey = "tls.crt"
// TLSPrivateKeyKey is the key for the private key field in a TLS secret.
TLSPrivateKeyKey = "tls.key"
)
type SecretList struct {
unversioned.TypeMeta `json:",inline"`
unversioned.ListMeta `json:"metadata,omitempty"`
Items []Secret `json:"items"`
}
// +genclient=true
// ConfigMap holds configuration data for components or applications to consume.
type ConfigMap struct {
unversioned.TypeMeta `json:",inline"`
ObjectMeta `json:"metadata,omitempty"`
// Data contains the configuration data.
// Each key must be a valid DNS_SUBDOMAIN with an optional leading dot.
Data map[string]string `json:"data,omitempty"`
}
// ConfigMapList is a resource containing a list of ConfigMap objects.
type ConfigMapList struct {
unversioned.TypeMeta `json:",inline"`
unversioned.ListMeta `json:"metadata,omitempty"`
// Items is the list of ConfigMaps.
Items []ConfigMap `json:"items"`
}
// These constants are for remote command execution and port forwarding and are
// used by both the client side and server side components.
//
// This is probably not the ideal place for them, but it didn't seem worth it
// to create pkg/exec and pkg/portforward just to contain a single file with
// constants in it. Suggestions for more appropriate alternatives are
// definitely welcome!
const (
// Enable stdin for remote command execution
ExecStdinParam = "input"
// Enable stdout for remote command execution
ExecStdoutParam = "output"
// Enable stderr for remote command execution
ExecStderrParam = "error"
// Enable TTY for remote command execution
ExecTTYParam = "tty"
// Command to run for remote command execution
ExecCommandParamm = "command"
// Name of header that specifies stream type
StreamType = "streamType"
// Value for streamType header for stdin stream
StreamTypeStdin = "stdin"
// Value for streamType header for stdout stream
StreamTypeStdout = "stdout"
// Value for streamType header for stderr stream
StreamTypeStderr = "stderr"
// Value for streamType header for data stream
StreamTypeData = "data"
// Value for streamType header for error stream
StreamTypeError = "error"
// Name of header that specifies the port being forwarded
PortHeader = "port"
// Name of header that specifies a request ID used to associate the error
// and data streams for a single forwarded connection
PortForwardRequestIDHeader = "requestID"
)
// Similarly to above, these are constants to support HTTP PATCH utilized by
// both the client and server that didn't make sense for a whole package to be
// dedicated to.
type PatchType string
const (
JSONPatchType PatchType = "application/json-patch+json"
MergePatchType PatchType = "application/merge-patch+json"
StrategicMergePatchType PatchType = "application/strategic-merge-patch+json"
)
// Type and constants for component health validation.
type ComponentConditionType string
// These are the valid conditions for the component.
const (
ComponentHealthy ComponentConditionType = "Healthy"
)
type ComponentCondition struct {
Type ComponentConditionType `json:"type"`
Status ConditionStatus `json:"status"`
Message string `json:"message,omitempty"`
Error string `json:"error,omitempty"`
}
// +genclient=true,nonNamespaced=true
// ComponentStatus (and ComponentStatusList) holds the cluster validation info.
type ComponentStatus struct {
unversioned.TypeMeta `json:",inline"`
ObjectMeta `json:"metadata,omitempty"`
Conditions []ComponentCondition `json:"conditions,omitempty"`
}
type ComponentStatusList struct {
unversioned.TypeMeta `json:",inline"`
unversioned.ListMeta `json:"metadata,omitempty"`
Items []ComponentStatus `json:"items"`
}
// SecurityContext holds security configuration that will be applied to a container.
// Some fields are present in both SecurityContext and PodSecurityContext. When both
// are set, the values in SecurityContext take precedence.
type SecurityContext struct {
// The capabilities to add/drop when running containers.
// Defaults to the default set of capabilities granted by the container runtime.
Capabilities *Capabilities `json:"capabilities,omitempty"`
// Run container in privileged mode.
// Processes in privileged containers are essentially equivalent to root on the host.
// Defaults to false.
Privileged *bool `json:"privileged,omitempty"`
// The SELinux context to be applied to the container.
// If unspecified, the container runtime will allocate a random SELinux context for each
// container. May also be set in PodSecurityContext. If set in both SecurityContext and
// PodSecurityContext, the value specified in SecurityContext takes precedence.
SELinuxOptions *SELinuxOptions `json:"seLinuxOptions,omitempty"`
// The UID to run the entrypoint of the container process.
// Defaults to user specified in image metadata if unspecified.
// May also be set in PodSecurityContext. If set in both SecurityContext and
// PodSecurityContext, the value specified in SecurityContext takes precedence.
RunAsUser *int64 `json:"runAsUser,omitempty"`
// Indicates that the container must run as a non-root user.
// If true, the Kubelet will validate the image at runtime to ensure that it
// does not run as UID 0 (root) and fail to start the container if it does.
// If unset or false, no such validation will be performed.
// May also be set in PodSecurityContext. If set in both SecurityContext and
// PodSecurityContext, the value specified in SecurityContext takes precedence.
RunAsNonRoot *bool `json:"runAsNonRoot,omitempty"`
// The read-only root filesystem allows you to restrict the locations that an application can write
// files to, ensuring the persistent data can only be written to mounts.
ReadOnlyRootFilesystem *bool `json:"readOnlyRootFilesystem,omitempty"`
}
// SELinuxOptions are the labels to be applied to the container.
type SELinuxOptions struct {
// SELinux user label
User string `json:"user,omitempty"`
// SELinux role label
Role string `json:"role,omitempty"`
// SELinux type label
Type string `json:"type,omitempty"`
// SELinux level label.
Level string `json:"level,omitempty"`
}
// RangeAllocation is an opaque API object (not exposed to end users) that can be persisted to record
// the global allocation state of the cluster. The schema of Range and Data generic, in that Range
// should be a string representation of the inputs to a range (for instance, for IP allocation it
// might be a CIDR) and Data is an opaque blob understood by an allocator which is typically a
// binary range. Consumers should use annotations to record additional information (schema version,
// data encoding hints). A range allocation should *ALWAYS* be recreatable at any time by observation
// of the cluster, thus the object is less strongly typed than most.
type RangeAllocation struct {
unversioned.TypeMeta `json:",inline"`
ObjectMeta `json:"metadata,omitempty"`
// A string representing a unique label for a range of resources, such as a CIDR "10.0.0.0/8" or
// port range "10000-30000". Range is not strongly schema'd here. The Range is expected to define
// a start and end unless there is an implicit end.
Range string `json:"range"`
// A byte array representing the serialized state of a range allocation. Additional clarifiers on
// the type or format of data should be represented with annotations. For IP allocations, this is
// represented as a bit array starting at the base IP of the CIDR in Range, with each bit representing
// a single allocated address (the fifth bit on CIDR 10.0.0.0/8 is 10.0.0.4).
Data []byte `json:"data"`
}
const (
// "default-scheduler" is the name of default scheduler.
DefaultSchedulerName = "default-scheduler"
// RequiredDuringScheduling affinity is not symmetric, but there is an implicit PreferredDuringScheduling affinity rule
// corresponding to every RequiredDuringScheduling affinity rule.
// When the --hard-pod-affinity-weight scheduler flag is not specified,
// DefaultHardPodAffinityWeight defines the weight of the implicit PreferredDuringScheduling affinity rule.
DefaultHardPodAffinitySymmetricWeight int = 1
// When the --failure-domains scheduler flag is not specified,
// DefaultFailureDomains defines the set of label keys used when TopologyKey is empty in PreferredDuringScheduling anti-affinity.
DefaultFailureDomains string = unversioned.LabelHostname + "," + unversioned.LabelZoneFailureDomain + "," + unversioned.LabelZoneRegion
)
| {'content_hash': '2e26a50d33206880f2d1c7fd7181529a', 'timestamp': '', 'source': 'github', 'line_count': 2704, 'max_line_length': 203, 'avg_line_length': 44.81508875739645, 'alnum_prop': 0.7615778181218023, 'repo_name': 'freehan/contrib', 'id': '4b6ec153b89660c8dc178bedc88ca8f0f8d3405a', 'size': '121769', 'binary': False, 'copies': '11', 'ref': 'refs/heads/master', 'path': 'ingress/vendor/k8s.io/kubernetes/pkg/api/types.go', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '2918'}, {'name': 'Go', 'bytes': '1262593'}, {'name': 'HTML', 'bytes': '33503'}, {'name': 'JavaScript', 'bytes': '29762'}, {'name': 'Lua', 'bytes': '3089'}, {'name': 'Makefile', 'bytes': '24720'}, {'name': 'Nginx', 'bytes': '2890'}, {'name': 'Python', 'bytes': '14328'}, {'name': 'Ruby', 'bytes': '8201'}, {'name': 'Shell', 'bytes': '139720'}]} |
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'steps-implementation',
templateUrl: './steps-implementation.component.html',
styleUrls: ['./steps-implementation.component.scss']
})
export class StepsImplementationComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}
| {'content_hash': 'af9d4e55bc2fc7a06734e9ccc6aa64be', 'timestamp': '', 'source': 'github', 'line_count': 15, 'max_line_length': 61, 'avg_line_length': 21.4, 'alnum_prop': 0.7165109034267912, 'repo_name': 'Bigsby/HelloLanguages', 'id': '3dc2bcdc5d112ff2dfbdb1af1888003bb97a692b', 'size': '321', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'site/src/app/common/steps-implementation.component.ts', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Assembly', 'bytes': '220'}, {'name': 'C#', 'bytes': '9372'}, {'name': 'C++', 'bytes': '10264'}, {'name': 'Erlang', 'bytes': '7698'}, {'name': 'F#', 'bytes': '4513'}, {'name': 'Forth', 'bytes': '162'}, {'name': 'Go', 'bytes': '5672'}, {'name': 'Haskell', 'bytes': '1802'}, {'name': 'Java', 'bytes': '9194'}, {'name': 'JavaScript', 'bytes': '8099'}, {'name': 'Kotlin', 'bytes': '3315'}, {'name': 'PHP', 'bytes': '5136'}, {'name': 'Perl', 'bytes': '3877'}, {'name': 'Perl6', 'bytes': '910'}, {'name': 'PowerShell', 'bytes': '4518'}, {'name': 'Python', 'bytes': '4329'}, {'name': 'Ruby', 'bytes': '3932'}, {'name': 'TypeScript', 'bytes': '6223'}, {'name': 'Visual Basic', 'bytes': '8173'}]} |
<?php
/**
* Encode PHP constructs to JSON
*
* @category Zend
* @package Zend_Json
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Json_Encoder
{
/**
* Whether or not to check for possible cycling
*
* @var boolean
*/
protected $_cycleCheck;
/**
* Additional options used during encoding
*
* @var array
*/
protected $_options = array();
/**
* Array of visited objects; used to prevent cycling.
*
* @var array
*/
protected $_visited = array();
/**
* Constructor
*
* @param boolean $cycleCheck Whether or not to check for recursion when encoding
* @param array $options Additional options used during encoding
* @return void
*/
protected function __construct($cycleCheck = false, $options = array())
{
$this->_cycleCheck = $cycleCheck;
$this->_options = $options;
}
/**
* Use the JSON encoding scheme for the value specified
*
* @param mixed $value The value to be encoded
* @param boolean $cycleCheck Whether or not to check for possible object recursion when encoding
* @param array $options Additional options used during encoding
* @return string The encoded value
*/
public static function encode($value, $cycleCheck = false, $options = array())
{
$encoder = new self(($cycleCheck) ? true : false, $options);
return $encoder->_encodeValue($value);
}
/**
* Recursive driver which determines the type of value to be encoded
* and then dispatches to the appropriate method. $values are either
* - objects (returns from {@link _encodeObject()})
* - arrays (returns from {@link _encodeArray()})
* - basic datums (e.g. numbers or strings) (returns from {@link _encodeDatum()})
*
* @param mixed $value The value to be encoded
* @return string Encoded value
*/
protected function _encodeValue(&$value)
{
if (is_object($value)) {
return $this->_encodeObject($value);
} else if (is_array($value)) {
return $this->_encodeArray($value);
}
return $this->_encodeDatum($value);
}
/**
* Encode an object to JSON by encoding each of the public properties
*
* A special property is added to the JSON object called '__className'
* that contains the name of the class of $value. This is used to decode
* the object on the client into a specific class.
*
* @param object $value
* @return string
* @throws Zend_Json_Exception If recursive checks are enabled and the object has been serialized previously
*/
protected function _encodeObject(&$value)
{
if ($this->_cycleCheck) {
if ($this->_wasVisited($value)) {
if (isset($this->_options['silenceCyclicalExceptions'])
&& $this->_options['silenceCyclicalExceptions']===true) {
return '"* RECURSION (' . get_class($value) . ') *"';
} else {
require_once 'Zend/Json/Exception.php';
throw new Zend_Json_Exception(
'Cycles not supported in JSON encoding, cycle introduced by '
. 'class "' . get_class($value) . '"'
);
}
}
$this->_visited[] = $value;
}
$props = '';
if ($value instanceof Iterator) {
$propCollection = $value;
} else {
$propCollection = get_object_vars($value);
}
foreach ($propCollection as $name => $propValue) {
if (isset($propValue)) {
$props .= ','
. $this->_encodeString($name)
. ':'
. $this->_encodeValue($propValue);
}
}
return '{"__className":"' . get_class($value) . '"'
. $props . '}';
}
/**
* Determine if an object has been serialized already
*
* @param mixed $value
* @return boolean
*/
protected function _wasVisited(&$value)
{
if (in_array($value, $this->_visited, true)) {
return true;
}
return false;
}
/**
* JSON encode an array value
*
* Recursively encodes each value of an array and returns a JSON encoded
* array string.
*
* Arrays are defined as integer-indexed arrays starting at index 0, where
* the last index is (count($array) -1); any deviation from that is
* considered an associative array, and will be encoded as such.
*
* @param array& $array
* @return string
*/
protected function _encodeArray(&$array)
{
$tmpArray = array();
// Check for associative array
if (!empty($array) && (array_keys($array) !== range(0, count($array) - 1))) {
// Associative array
$result = '{';
foreach ($array as $key => $value) {
$key = (string) $key;
$tmpArray[] = $this->_encodeString($key)
. ':'
. $this->_encodeValue($value);
}
$result .= implode(',', $tmpArray);
$result .= '}';
} else {
// Indexed array
$result = '[';
$length = count($array);
for ($i = 0; $i < $length; $i++) {
$tmpArray[] = $this->_encodeValue($array[$i]);
}
$result .= implode(',', $tmpArray);
$result .= ']';
}
return $result;
}
/**
* JSON encode a basic data type (string, number, boolean, null)
*
* If value type is not a string, number, boolean, or null, the string
* 'null' is returned.
*
* @param mixed& $value
* @return string
*/
protected function _encodeDatum(&$value)
{
$result = 'null';
if (is_int($value) || is_float($value)) {
$result = (string) $value;
$result = str_replace(",", ".", $result);
} elseif (is_string($value)) {
$result = $this->_encodeString($value);
} elseif (is_bool($value)) {
$result = $value ? 'true' : 'false';
}
return $result;
}
/**
* JSON encode a string value by escaping characters as necessary
*
* @param string& $value
* @return string
*/
protected function _encodeString(&$string)
{
// Escape these characters with a backslash:
// " \ / \n \r \t \b \f
$search = array('\\', "\n", "\t", "\r", "\b", "\f", '"', '/');
$replace = array('\\\\', '\\n', '\\t', '\\r', '\\b', '\\f', '\"', '\\/');
$string = str_replace($search, $replace, $string);
// Escape certain ASCII characters:
// 0x08 => \b
// 0x0c => \f
$string = str_replace(array(chr(0x08), chr(0x0C)), array('\b', '\f'), $string);
$string = self::encodeUnicodeString($string);
return '"' . $string . '"';
}
/**
* Encode the constants associated with the ReflectionClass
* parameter. The encoding format is based on the class2 format
*
* @param ReflectionClass $cls
* @return string Encoded constant block in class2 format
*/
private static function _encodeConstants(ReflectionClass $cls)
{
$result = "constants : {";
$constants = $cls->getConstants();
$tmpArray = array();
if (!empty($constants)) {
foreach ($constants as $key => $value) {
$tmpArray[] = "$key: " . self::encode($value);
}
$result .= implode(', ', $tmpArray);
}
return $result . "}";
}
/**
* Encode the public methods of the ReflectionClass in the
* class2 format
*
* @param ReflectionClass $cls
* @return string Encoded method fragment
*
*/
private static function _encodeMethods(ReflectionClass $cls)
{
$methods = $cls->getMethods();
$result = 'methods:{';
$started = false;
foreach ($methods as $method) {
if (! $method->isPublic() || !$method->isUserDefined()) {
continue;
}
if ($started) {
$result .= ',';
}
$started = true;
$result .= '' . $method->getName(). ':function(';
if ('__construct' != $method->getName()) {
$parameters = $method->getParameters();
$paramCount = count($parameters);
$argsStarted = false;
$argNames = "var argNames=[";
foreach ($parameters as $param) {
if ($argsStarted) {
$result .= ',';
}
$result .= $param->getName();
if ($argsStarted) {
$argNames .= ',';
}
$argNames .= '"' . $param->getName() . '"';
$argsStarted = true;
}
$argNames .= "];";
$result .= "){"
. $argNames
. 'var result = ZAjaxEngine.invokeRemoteMethod('
. "this, '" . $method->getName()
. "',argNames,arguments);"
. 'return(result);}';
} else {
$result .= "){}";
}
}
return $result . "}";
}
/**
* Encode the public properties of the ReflectionClass in the class2
* format.
*
* @param ReflectionClass $cls
* @return string Encode properties list
*
*/
private static function _encodeVariables(ReflectionClass $cls)
{
$properties = $cls->getProperties();
$propValues = get_class_vars($cls->getName());
$result = "variables:{";
$cnt = 0;
$tmpArray = array();
foreach ($properties as $prop) {
if (! $prop->isPublic()) {
continue;
}
$tmpArray[] = $prop->getName()
. ':'
. self::encode($propValues[$prop->getName()]);
}
$result .= implode(',', $tmpArray);
return $result . "}";
}
/**
* Encodes the given $className into the class2 model of encoding PHP
* classes into JavaScript class2 classes.
* NOTE: Currently only public methods and variables are proxied onto
* the client machine
*
* @param string $className The name of the class, the class must be
* instantiable using a null constructor
* @param string $package Optional package name appended to JavaScript
* proxy class name
* @return string The class2 (JavaScript) encoding of the class
* @throws Zend_Json_Exception
*/
public static function encodeClass($className, $package = '')
{
$cls = new ReflectionClass($className);
if (! $cls->isInstantiable()) {
require_once 'Zend/Json/Exception.php';
throw new Zend_Json_Exception("$className must be instantiable");
}
return "Class.create('$package$className',{"
. self::_encodeConstants($cls) .","
. self::_encodeMethods($cls) .","
. self::_encodeVariables($cls) .'});';
}
/**
* Encode several classes at once
*
* Returns JSON encoded classes, using {@link encodeClass()}.
*
* @param array $classNames
* @param string $package
* @return string
*/
public static function encodeClasses(array $classNames, $package = '')
{
$result = '';
foreach ($classNames as $className) {
$result .= self::encodeClass($className, $package);
}
return $result;
}
/**
* Encode Unicode Characters to \u0000 ASCII syntax.
*
* This algorithm was originally developed for the
* Solar Framework by Paul M. Jones
*
* @link http://solarphp.com/
* @link http://svn.solarphp.com/core/trunk/Solar/Json.php
* @param string $value
* @return string
*/
public static function encodeUnicodeString($value)
{
$strlen_var = strlen($value);
$ascii = "";
/**
* Iterate over every character in the string,
* escaping with a slash or encoding to UTF-8 where necessary
*/
for($i = 0; $i < $strlen_var; $i++) {
$ord_var_c = ord($value[$i]);
switch (true) {
case (($ord_var_c >= 0x20) && ($ord_var_c <= 0x7F)):
// characters U-00000000 - U-0000007F (same as ASCII)
$ascii .= $value[$i];
break;
case (($ord_var_c & 0xE0) == 0xC0):
// characters U-00000080 - U-000007FF, mask 110XXXXX
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
$char = pack('C*', $ord_var_c, ord($value[$i + 1]));
$i += 1;
$utf16 = self::_utf82utf16($char);
$ascii .= sprintf('\u%04s', bin2hex($utf16));
break;
case (($ord_var_c & 0xF0) == 0xE0):
// characters U-00000800 - U-0000FFFF, mask 1110XXXX
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
$char = pack('C*', $ord_var_c,
ord($value[$i + 1]),
ord($value[$i + 2]));
$i += 2;
$utf16 = self::_utf82utf16($char);
$ascii .= sprintf('\u%04s', bin2hex($utf16));
break;
case (($ord_var_c & 0xF8) == 0xF0):
// characters U-00010000 - U-001FFFFF, mask 11110XXX
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
$char = pack('C*', $ord_var_c,
ord($value[$i + 1]),
ord($value[$i + 2]),
ord($value[$i + 3]));
$i += 3;
$utf16 = self::_utf82utf16($char);
$ascii .= sprintf('\u%04s', bin2hex($utf16));
break;
case (($ord_var_c & 0xFC) == 0xF8):
// characters U-00200000 - U-03FFFFFF, mask 111110XX
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
$char = pack('C*', $ord_var_c,
ord($value[$i + 1]),
ord($value[$i + 2]),
ord($value[$i + 3]),
ord($value[$i + 4]));
$i += 4;
$utf16 = self::_utf82utf16($char);
$ascii .= sprintf('\u%04s', bin2hex($utf16));
break;
case (($ord_var_c & 0xFE) == 0xFC):
// characters U-04000000 - U-7FFFFFFF, mask 1111110X
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
$char = pack('C*', $ord_var_c,
ord($value[$i + 1]),
ord($value[$i + 2]),
ord($value[$i + 3]),
ord($value[$i + 4]),
ord($value[$i + 5]));
$i += 5;
$utf16 = self::_utf82utf16($char);
$ascii .= sprintf('\u%04s', bin2hex($utf16));
break;
}
}
return $ascii;
}
/**
* Convert a string from one UTF-8 char to one UTF-16 char.
*
* Normally should be handled by mb_convert_encoding, but
* provides a slower PHP-only method for installations
* that lack the multibye string extension.
*
* This method is from the Solar Framework by Paul M. Jones
*
* @link http://solarphp.com
* @param string $utf8 UTF-8 character
* @return string UTF-16 character
*/
protected static function _utf82utf16($utf8)
{
// Check for mb extension otherwise do by hand.
if( function_exists('mb_convert_encoding') ) {
return mb_convert_encoding($utf8, 'UTF-16', 'UTF-8');
}
switch (strlen($utf8)) {
case 1:
// this case should never be reached, because we are in ASCII range
// see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
return $utf8;
case 2:
// return a UTF-16 character from a 2-byte UTF-8 char
// see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
return chr(0x07 & (ord($utf8{0}) >> 2))
. chr((0xC0 & (ord($utf8{0}) << 6))
| (0x3F & ord($utf8{1})));
case 3:
// return a UTF-16 character from a 3-byte UTF-8 char
// see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
return chr((0xF0 & (ord($utf8{0}) << 4))
| (0x0F & (ord($utf8{1}) >> 2)))
. chr((0xC0 & (ord($utf8{1}) << 6))
| (0x7F & ord($utf8{2})));
}
// ignoring UTF-32 for now, sorry
return '';
}
}
| {'content_hash': '092b7289c07c6d9eccb562cbfd0e94b3', 'timestamp': '', 'source': 'github', 'line_count': 556, 'max_line_length': 112, 'avg_line_length': 32.134892086330936, 'alnum_prop': 0.4754575474338165, 'repo_name': 'rwebler/Basic-Kohana', 'id': 'f665acda76298bc18017d12f9fb833fe7893d9f7', 'size': '18609', 'binary': False, 'copies': '8', 'ref': 'refs/heads/master', 'path': 'application/vendors/Zend/Json/Encoder.php', 'mode': '33188', 'license': 'bsd-3-clause', 'language': []} |
package org.batfish.question.statement;
import java.util.List;
import java.util.Set;
import org.batfish.common.BatfishLogger;
import org.batfish.main.Settings;
import org.batfish.question.Environment;
import org.batfish.representation.RouteFilterList;
public class ForEachRouteFilterInSetStatement implements Statement {
private final String _set;
private final List<Statement> _statements;
public ForEachRouteFilterInSetStatement(List<Statement> statements,
String set) {
_statements = statements;
_set = set;
}
@Override
public void execute(Environment environment, BatfishLogger logger,
Settings settings) {
Set<RouteFilterList> routeFilters = environment.getRouteFilterSets().get(
_set);
for (RouteFilterList routeFilter : routeFilters) {
Environment statementEnv = environment.copy();
statementEnv.setRouteFilter(routeFilter);
for (Statement statement : _statements) {
statement.execute(statementEnv, logger, settings);
}
}
}
}
| {'content_hash': '46545a2c528cc4aebf56f1eb18813dd8', 'timestamp': '', 'source': 'github', 'line_count': 37, 'max_line_length': 79, 'avg_line_length': 28.91891891891892, 'alnum_prop': 0.7121495327102804, 'repo_name': 'Alexia23/batfish', 'id': '58d1c4493d7fc7d8f350bcb32baa778a61faf004', 'size': '1070', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'projects/batfish/src/org/batfish/question/statement/ForEachRouteFilterInSetStatement.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'ANTLR', 'bytes': '235942'}, {'name': 'CSS', 'bytes': '3221'}, {'name': 'HTML', 'bytes': '28079'}, {'name': 'Java', 'bytes': '1739351'}, {'name': 'JavaScript', 'bytes': '23680'}, {'name': 'Shell', 'bytes': '2403'}]} |
cask "font-noto-sans-thaana" do
version :latest
sha256 :no_check
url "https://noto-website-2.storage.googleapis.com/pkgs/NotoSansThaana-unhinted.zip",
verified: "noto-website-2.storage.googleapis.com/"
name "Noto Sans Thaana"
homepage "https://www.google.com/get/noto/#sans-thaa"
font "NotoSansThaana-Bold.ttf"
font "NotoSansThaana-Regular.ttf"
end
| {'content_hash': '46d8a2ec9c3c8410f5d728452019297d', 'timestamp': '', 'source': 'github', 'line_count': 12, 'max_line_length': 87, 'avg_line_length': 30.916666666666668, 'alnum_prop': 0.7358490566037735, 'repo_name': 'alerque/homebrew-fonts', 'id': '9db838c5ca4f05dbc7ad9f7760c91480513a0e94', 'size': '371', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'Casks/font-noto-sans-thaana.rb', 'mode': '33188', 'license': 'bsd-2-clause', 'language': [{'name': 'Python', 'bytes': '8143'}, {'name': 'Ruby', 'bytes': '1069262'}]} |
<html><!-- Created using the cpp_pretty_printer from the dlib C++ library. See http://dlib.net for updates. --><head><title>dlib C++ Library - rsignaler_extension_abstract.h</title></head><body bgcolor='white'><pre>
<font color='#009900'>// Copyright (C) 2006 Davis E. King ([email protected])
</font><font color='#009900'>// License: Boost Software License See LICENSE.txt for the full license.
</font><font color='#0000FF'>#undef</font> DLIB_RSIGNALER_EXTENSIOn_ABSTRACT_
<font color='#0000FF'>#ifdef</font> DLIB_RSIGNALER_EXTENSIOn_ABSTRACT_
<font color='#0000FF'>#include</font> "<a style='text-decoration:none' href='threads_kernel_abstract.h.html'>threads_kernel_abstract.h</a>"
<font color='#0000FF'>#include</font> "<a style='text-decoration:none' href='rmutex_extension_abstract.h.html'>rmutex_extension_abstract.h</a>"
<font color='#0000FF'>namespace</font> dlib
<b>{</b>
<font color='#009900'>// ----------------------------------------------------------------------------------------
</font>
<font color='#0000FF'>class</font> <b><a name='rsignaler'></a>rsignaler</b>
<b>{</b>
<font color='#009900'>/*!
WHAT THIS OBJECT REPRESENTS
This object represents an event signaling system for threads. It gives
a thread the ability to wake up other threads that are waiting for a
particular signal.
Each rsignaler object is associated with one and only one rmutex object.
More than one rsignaler object may be associated with a single rmutex
but a signaler object may only be associated with a single rmutex.
NOTE:
You must guard against spurious wakeups. This means that a thread
might return from a call to wait even if no other thread called
signal. This is rare but must be guarded against.
Also note that this object is identical to the signaler object
except that it works with rmutex objects rather than mutex objects.
!*/</font>
<font color='#0000FF'>public</font>:
<b><a name='rsignaler'></a>rsignaler</b> <font face='Lucida Console'>(</font>
<font color='#0000FF'>const</font> rmutex<font color='#5555FF'>&</font> associated_mutex
<font face='Lucida Console'>)</font>;
<font color='#009900'>/*!
ensures
- #*this is properly initialized
- #get_mutex() == associated_mutex
throws
- dlib::thread_error
the constructor may throw this exception if there is a problem
gathering resources to create the signaler.
!*/</font>
~<b><a name='rsignaler'></a>rsignaler</b> <font face='Lucida Console'>(</font>
<font face='Lucida Console'>)</font>;
<font color='#009900'>/*!
ensures
- all resources allocated by *this have been freed
!*/</font>
<font color='#0000FF'><u>void</u></font> <b><a name='wait'></a>wait</b> <font face='Lucida Console'>(</font>
<font face='Lucida Console'>)</font> <font color='#0000FF'>const</font>;
<font color='#009900'>/*!
requires
- get_mutex() is locked and owned by the calling thread
ensures
- atomically unlocks get_mutex() and blocks the calling thread
- calling thread may wake if another thread calls signal() or broadcast()
on *this
- when wait() returns the calling thread again has a lock on get_mutex()
!*/</font>
<font color='#0000FF'><u>bool</u></font> <b><a name='wait_or_timeout'></a>wait_or_timeout</b> <font face='Lucida Console'>(</font>
<font color='#0000FF'><u>unsigned</u></font> <font color='#0000FF'><u>long</u></font> milliseconds
<font face='Lucida Console'>)</font> <font color='#0000FF'>const</font>;
<font color='#009900'>/*!
requires
- get_mutex() is locked and owned by the calling thread
ensures
- atomically unlocks get_mutex() and blocks the calling thread
- calling thread may wake if another thread calls signal() or broadcast()
on *this
- after the specified number of milliseconds has elapsed the calling thread
will wake once get_mutex() is free
- when wait returns the calling thread again has a lock on get_mutex()
- returns false if the call to wait_or_timeout timed out
- returns true if the call did not time out
!*/</font>
<font color='#0000FF'><u>void</u></font> <b><a name='signal'></a>signal</b> <font face='Lucida Console'>(</font>
<font face='Lucida Console'>)</font> <font color='#0000FF'>const</font>;
<font color='#009900'>/*!
ensures
- if (at least one thread is waiting on *this) then
- at least one of the waiting threads will wake
!*/</font>
<font color='#0000FF'><u>void</u></font> <b><a name='broadcast'></a>broadcast</b> <font face='Lucida Console'>(</font>
<font face='Lucida Console'>)</font> <font color='#0000FF'>const</font>;
<font color='#009900'>/*!
ensures
- any and all threads waiting on *this will wake
!*/</font>
<font color='#0000FF'>const</font> rmutex<font color='#5555FF'>&</font> <b><a name='get_mutex'></a>get_mutex</b> <font face='Lucida Console'>(</font>
<font face='Lucida Console'>)</font> <font color='#0000FF'>const</font>;
<font color='#009900'>/*!
ensures
- returns a const reference to the rmutex associated with *this
!*/</font>
<font color='#0000FF'>private</font>:
<font color='#009900'>// restricted functions
</font> <b><a name='rsignaler'></a>rsignaler</b><font face='Lucida Console'>(</font>rsignaler<font color='#5555FF'>&</font><font face='Lucida Console'>)</font>; <font color='#009900'>// copy constructor
</font> rsignaler<font color='#5555FF'>&</font> <b><a name='operator'></a>operator</b><font color='#5555FF'>=</font><font face='Lucida Console'>(</font>rsignaler<font color='#5555FF'>&</font><font face='Lucida Console'>)</font>; <font color='#009900'>// assignment operator
</font> <b>}</b>;
<font color='#009900'>// ----------------------------------------------------------------------------------------
</font>
<b>}</b>
<font color='#0000FF'>#endif</font> <font color='#009900'>// DLIB_RSIGNALER_EXTENSIOn_ABSTRACT_
</font>
</pre></body></html> | {'content_hash': '18e23f1abdb350270a030fe9a2b33cf2', 'timestamp': '', 'source': 'github', 'line_count': 126, 'max_line_length': 291, 'avg_line_length': 54.01587301587302, 'alnum_prop': 0.5740523067881281, 'repo_name': 'weinitom/robot', 'id': '2f170a4b32746c5f0c8c932bb05dc1e02fff7b1c', 'size': '6806', 'binary': False, 'copies': '12', 'ref': 'refs/heads/master', 'path': 'attention_tracker/dlib-18.18/docs/dlib/threads/rsignaler_extension_abstract.h.html', 'mode': '33261', 'license': 'bsd-3-clause', 'language': [{'name': 'Batchfile', 'bytes': '102'}, {'name': 'C', 'bytes': '65630'}, {'name': 'C++', 'bytes': '26679542'}, {'name': 'CMake', 'bytes': '74823'}, {'name': 'CSS', 'bytes': '39095'}, {'name': 'HTML', 'bytes': '86448401'}, {'name': 'JavaScript', 'bytes': '164134'}, {'name': 'Makefile', 'bytes': '45669'}, {'name': 'Matlab', 'bytes': '524'}, {'name': 'Python', 'bytes': '141320'}, {'name': 'Shell', 'bytes': '222'}, {'name': 'XSLT', 'bytes': '36884'}]} |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>User agent detail - Mozilla/5.0 (Linux; Android 4.1.2; SGH-T859 Build/JZO54K) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Safari/535.19</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/css/materialize.min.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="../circle.css" rel="stylesheet">
</head>
<body>
<div class="container">
<div class="section">
<h1 class="header center orange-text">User agent detail</h1>
<div class="row center">
<h5 class="header light">
Mozilla/5.0 (Linux; Android 4.1.2; SGH-T859 Build/JZO54K) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Safari/535.19
</h5>
</div>
</div>
<div class="section">
<table class="striped"><tr><th></th><th colspan="3">General</th><th colspan="5">Device</th><th colspan="3">Bot</th><th colspan="2"></th></tr><tr><th>Provider</th><th>Browser</th><th>Engine</th><th>OS</th><th>Brand</th><th>Model</th><th>Type</th><th>Is mobile</th><th>Is touch</th><th>Is bot</th><th>Name</th><th>Type</th><th>Parse time</th><th>Actions</th></tr><tr><th colspan="14" class="green lighten-3">Test suite</th></tr><tr><td>Browscap<br /><small>6014</small><br /><small>vendor/browscap/browscap/tests/fixtures/issues/issue-635.php</small></td><td>Chrome 18.0</td><td>WebKit unknown</td><td>Android 4.1</td><td style="border-left: 1px solid #555">Samsung</td><td>Galaxy Tab 10.1 (T-Mobile)</td><td>Tablet</td><td>yes</td><td>yes</td><td style="border-left: 1px solid #555"></td><td></td><td></td><td>0</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-b3ace57b-0c56-4fa0-aa1d-8ee4ba0e42c7">Detail</a>
<!-- Modal Structure -->
<div id="modal-b3ace57b-0c56-4fa0-aa1d-8ee4ba0e42c7" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>Browscap result detail</h4>
<p><pre><code class="php">Array
(
[Comment] => Chrome 18.0
[Browser] => Chrome
[Browser_Type] => Browser
[Browser_Bits] => 32
[Browser_Maker] => Google Inc
[Browser_Modus] => unknown
[Version] => 18.0
[MajorVer] => 18
[MinorVer] => 0
[Platform] => Android
[Platform_Version] => 4.1
[Platform_Description] => Android OS
[Platform_Bits] => 32
[Platform_Maker] => Google Inc
[Alpha] =>
[Beta] =>
[Win16] =>
[Win32] =>
[Win64] =>
[Frames] => 1
[IFrames] => 1
[Tables] => 1
[Cookies] => 1
[BackgroundSounds] =>
[JavaScript] => 1
[VBScript] =>
[JavaApplets] =>
[ActiveXControls] =>
[isMobileDevice] => 1
[isTablet] => 1
[isSyndicationReader] =>
[Crawler] =>
[isFake] =>
[isAnonymized] =>
[isModified] =>
[CssVersion] => 3
[AolVersion] => 0
[Device_Name] => Galaxy Tab 10.1 (T-Mobile)
[Device_Maker] => Samsung
[Device_Type] => Tablet
[Device_Pointing_Method] => touchscreen
[Device_Code_Name] => SGH-T859
[Device_Brand_Name] => Samsung
[RenderingEngine_Name] => WebKit
[RenderingEngine_Version] => unknown
[RenderingEngine_Maker] => Apple Inc
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><th colspan="14" class="green lighten-3">Providers</th></tr><tr><td>BrowscapFull<br /><small>6014</small><br /></td><td>Chrome 18.0</td><td>WebKit </td><td>Android 4.1</td><td style="border-left: 1px solid #555">Samsung</td><td>Galaxy Tab 10.1 (T-Mobile)</td><td>Tablet</td><td>yes</td><td>yes</td><td style="border-left: 1px solid #555"></td><td></td><td></td><td>0.021</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-47a9cd06-e213-4882-bc34-db6aed664223">Detail</a>
<!-- Modal Structure -->
<div id="modal-47a9cd06-e213-4882-bc34-db6aed664223" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>BrowscapFull result detail</h4>
<p><pre><code class="php">stdClass Object
(
[browser_name_regex] => /^mozilla\/5\.0 \(.*linux.*android.4\.1.*sgh\-t859 build\/.*\) applewebkit\/.* \(khtml.* like gecko\) chrome\/18\..*safari\/.*$/
[browser_name_pattern] => mozilla/5.0 (*linux*android?4.1*sgh-t859 build/*) applewebkit/* (khtml* like gecko) chrome/18.*safari/*
[parent] => Chrome 18.0 for Android
[comment] => Chrome 18.0
[browser] => Chrome
[browser_type] => Browser
[browser_bits] => 32
[browser_maker] => Google Inc
[browser_modus] => unknown
[version] => 18.0
[majorver] => 18
[minorver] => 0
[platform] => Android
[platform_version] => 4.1
[platform_description] => Android OS
[platform_bits] => 32
[platform_maker] => Google Inc
[alpha] =>
[beta] =>
[win16] =>
[win32] =>
[win64] =>
[frames] => 1
[iframes] => 1
[tables] => 1
[cookies] => 1
[backgroundsounds] =>
[javascript] => 1
[vbscript] =>
[javaapplets] =>
[activexcontrols] =>
[ismobiledevice] => 1
[istablet] => 1
[issyndicationreader] =>
[crawler] =>
[isfake] =>
[isanonymized] =>
[ismodified] =>
[cssversion] => 3
[aolversion] => 0
[device_name] => Galaxy Tab 10.1 (T-Mobile)
[device_maker] => Samsung
[device_type] => Tablet
[device_pointing_method] => touchscreen
[device_code_name] => SGH-T859
[device_brand_name] => Samsung
[renderingengine_name] => WebKit
[renderingengine_version] => unknown
[renderingengine_description] => For Google Chrome, iOS (including both mobile Safari, WebViews within third-party apps, and web clips), Safari, Arora, Midori, OmniWeb, Shiira, iCab since version 4, Web, SRWare Iron, Rekonq, and in Maxthon 3.
[renderingengine_maker] => Apple Inc
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>BrowscapLite<br /><small>6014</small><br /></td><td>Chrome </td><td><i class="material-icons">close</i></td><td>Android </td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>Mobile Phone</td><td>yes</td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0.007</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-42bb56ba-b834-47c5-bea0-c0270e9ab371">Detail</a>
<!-- Modal Structure -->
<div id="modal-42bb56ba-b834-47c5-bea0-c0270e9ab371" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>BrowscapLite result detail</h4>
<p><pre><code class="php">stdClass Object
(
[browser_name_regex] => /^mozilla\/5\.0 \(.*linux.*android.*\) applewebkit\/.* \(khtml.* like gecko\) chrome\/.*safari\/.*$/
[browser_name_pattern] => mozilla/5.0 (*linux*android*) applewebkit/* (khtml* like gecko) chrome/*safari/*
[parent] => Chrome Generic for Android
[comment] => Chrome Generic
[browser] => Chrome
[browser_type] => unknown
[browser_bits] => 0
[browser_maker] => unknown
[browser_modus] => unknown
[version] => 0.0
[majorver] => 0
[minorver] => 0
[platform] => Android
[platform_version] => unknown
[platform_description] => unknown
[platform_bits] => 0
[platform_maker] => unknown
[alpha] => false
[beta] => false
[win16] => false
[win32] => false
[win64] => false
[frames] => false
[iframes] => false
[tables] => false
[cookies] => false
[backgroundsounds] => false
[javascript] => false
[vbscript] => false
[javaapplets] => false
[activexcontrols] => false
[ismobiledevice] => 1
[istablet] =>
[issyndicationreader] => false
[crawler] => false
[isfake] => false
[isanonymized] => false
[ismodified] => false
[cssversion] => 0
[aolversion] => 0
[device_name] => unknown
[device_maker] => unknown
[device_type] => Mobile Phone
[device_pointing_method] => unknown
[device_code_name] => unknown
[device_brand_name] => unknown
[renderingengine_name] => unknown
[renderingengine_version] => unknown
[renderingengine_description] => unknown
[renderingengine_maker] => unknown
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>BrowscapPhp<br /><small>6014</small><br /></td><td>Chrome 18.0</td><td><i class="material-icons">close</i></td><td>Android </td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>Mobile Phone</td><td>yes</td><td>yes</td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.066</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-ad0041a2-b0f4-43f6-a70d-cad1443caa68">Detail</a>
<!-- Modal Structure -->
<div id="modal-ad0041a2-b0f4-43f6-a70d-cad1443caa68" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>BrowscapPhp result detail</h4>
<p><pre><code class="php">stdClass Object
(
[browser_name_regex] => /^mozilla\/5\.0 \(.*linux.*android.*\) applewebkit\/.* \(khtml.* like gecko\) chrome\/18\..*safari\/.*$/
[browser_name_pattern] => mozilla/5.0 (*linux*android*) applewebkit/* (khtml* like gecko) chrome/18.*safari/*
[parent] => Chrome 18.0 for Android
[comment] => Chrome 18.0
[browser] => Chrome
[browser_type] => unknown
[browser_bits] => 0
[browser_maker] => Google Inc
[browser_modus] => unknown
[version] => 18.0
[majorver] => 18
[minorver] => 0
[platform] => Android
[platform_version] => unknown
[platform_description] => unknown
[platform_bits] => 0
[platform_maker] => unknown
[alpha] => false
[beta] => false
[win16] => false
[win32] => false
[win64] => false
[frames] => false
[iframes] => false
[tables] => false
[cookies] => false
[backgroundsounds] => false
[javascript] => false
[vbscript] => false
[javaapplets] => false
[activexcontrols] => false
[ismobiledevice] => 1
[istablet] =>
[issyndicationreader] => false
[crawler] =>
[isfake] => false
[isanonymized] => false
[ismodified] => false
[cssversion] => 0
[aolversion] => 0
[device_name] => unknown
[device_maker] => unknown
[device_type] => Mobile Phone
[device_pointing_method] => touchscreen
[device_code_name] => unknown
[device_brand_name] => unknown
[renderingengine_name] => unknown
[renderingengine_version] => unknown
[renderingengine_description] => unknown
[renderingengine_maker] => unknown
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>DonatjUAParser<br /><small>v0.5.1</small><br /></td><td>Chrome 18.0.1025.166</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-15fbc1f0-2615-4d42-b5d9-a30dd647b050">Detail</a>
<!-- Modal Structure -->
<div id="modal-15fbc1f0-2615-4d42-b5d9-a30dd647b050" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>DonatjUAParser result detail</h4>
<p><pre><code class="php">Array
(
[platform] => Android
[browser] => Chrome
[version] => 18.0.1025.166
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>JenssegersAgent<br /><small>v2.3.3</small><br /></td><td>Chrome 18.0.1025.166</td><td><i class="material-icons">close</i></td><td>AndroidOS 4.1.2</td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>yes</td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.001</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-b85a2b91-6a55-4436-a82c-1ea0d46e2e51">Detail</a>
<!-- Modal Structure -->
<div id="modal-b85a2b91-6a55-4436-a82c-1ea0d46e2e51" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>JenssegersAgent result detail</h4>
<p><pre><code class="php">Array
(
[browserName] => Chrome
[browserVersion] => 18.0.1025.166
[osName] => AndroidOS
[osVersion] => 4.1.2
[deviceModel] => SamsungTablet
[isMobile] => 1
[isRobot] =>
[botName] =>
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>NeutrinoApiCom<br /><small></small><br /></td><td>Chrome 18.0.1025.166</td><td><i class="material-icons">close</i></td><td>Android 4.1.2</td><td style="border-left: 1px solid #555">Samsung</td><td>Galaxy Tab 10.1</td><td>desktop-browser</td><td></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.27602</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-8c2a7a4e-3fbf-4df2-8d61-5e730422f67b">Detail</a>
<!-- Modal Structure -->
<div id="modal-8c2a7a4e-3fbf-4df2-8d61-5e730422f67b" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>NeutrinoApiCom result detail</h4>
<p><pre><code class="php">stdClass Object
(
[mobile_screen_height] => 0
[is_mobile] =>
[type] => desktop-browser
[mobile_brand] => Samsung
[mobile_model] => Galaxy Tab 10.1
[version] => 18.0.1025.166
[is_android] =>
[browser_name] => Chrome
[operating_system_family] => Android
[operating_system_version] => 4.1.2
[is_ios] =>
[producer] => Google Inc.
[operating_system] => Android 4.1.x Jelly Bean
[mobile_screen_width] => 0
[mobile_browser] =>
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>PiwikDeviceDetector<br /><small>3.6.1</small><br /></td><td>Chrome 18.0</td><td>WebKit </td><td>Android 4.1</td><td style="border-left: 1px solid #555">Samsung</td><td>SGH-T859</td><td>smartphone</td><td>yes</td><td></td><td style="border-left: 1px solid #555"></td><td></td><td></td><td>0.006</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-4a941d34-a8d3-4914-9724-346f60ad7046">Detail</a>
<!-- Modal Structure -->
<div id="modal-4a941d34-a8d3-4914-9724-346f60ad7046" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>PiwikDeviceDetector result detail</h4>
<p><pre><code class="php">Array
(
[client] => Array
(
[type] => browser
[name] => Chrome
[short_name] => CH
[version] => 18.0
[engine] => WebKit
)
[operatingSystem] => Array
(
[name] => Android
[short_name] => AND
[version] => 4.1
[platform] =>
)
[device] => Array
(
[brand] => SA
[brandName] => Samsung
[model] => SGH-T859
[device] => 1
[deviceName] => smartphone
)
[bot] =>
[extra] => Array
(
[isBot] =>
[isBrowser] => 1
[isFeedReader] =>
[isMobileApp] =>
[isPIM] =>
[isLibrary] =>
[isMediaPlayer] =>
[isCamera] =>
[isCarBrowser] =>
[isConsole] =>
[isFeaturePhone] =>
[isPhablet] =>
[isPortableMediaPlayer] =>
[isSmartDisplay] =>
[isSmartphone] => 1
[isTablet] =>
[isTV] =>
[isDesktop] =>
[isMobile] => 1
[isTouchEnabled] =>
)
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>SinergiBrowserDetector<br /><small>6.0.1</small><br /></td><td>Chrome 18.0.1025.166</td><td><i class="material-icons">close</i></td><td>Android 4.1.2</td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td></td><td><i class="material-icons">close</i></td><td>yes</td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-ec1cd248-02b0-457e-8a9d-35bb99af008c">Detail</a>
<!-- Modal Structure -->
<div id="modal-ec1cd248-02b0-457e-8a9d-35bb99af008c" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>SinergiBrowserDetector result detail</h4>
<p><pre><code class="php">Array
(
[browser] => Sinergi\BrowserDetector\Browser Object
(
[userAgent:Sinergi\BrowserDetector\Browser:private] => Sinergi\BrowserDetector\UserAgent Object
(
[userAgentString:Sinergi\BrowserDetector\UserAgent:private] => Mozilla/5.0 (Linux; Android 4.1.2; SGH-T859 Build/JZO54K) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Safari/535.19
)
[name:Sinergi\BrowserDetector\Browser:private] => Chrome
[version:Sinergi\BrowserDetector\Browser:private] => 18.0.1025.166
[isRobot:Sinergi\BrowserDetector\Browser:private] =>
[isChromeFrame:Sinergi\BrowserDetector\Browser:private] =>
[isFacebookWebView:Sinergi\BrowserDetector\Browser:private] =>
[isCompatibilityMode:Sinergi\BrowserDetector\Browser:private] =>
)
[operatingSystem] => Sinergi\BrowserDetector\Os Object
(
[name:Sinergi\BrowserDetector\Os:private] => Android
[version:Sinergi\BrowserDetector\Os:private] => 4.1.2
[isMobile:Sinergi\BrowserDetector\Os:private] => 1
[userAgent:Sinergi\BrowserDetector\Os:private] => Sinergi\BrowserDetector\UserAgent Object
(
[userAgentString:Sinergi\BrowserDetector\UserAgent:private] => Mozilla/5.0 (Linux; Android 4.1.2; SGH-T859 Build/JZO54K) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Safari/535.19
)
)
[device] => Sinergi\BrowserDetector\Device Object
(
[name:Sinergi\BrowserDetector\Device:private] => unknown
[userAgent:Sinergi\BrowserDetector\Device:private] => Sinergi\BrowserDetector\UserAgent Object
(
[userAgentString:Sinergi\BrowserDetector\UserAgent:private] => Mozilla/5.0 (Linux; Android 4.1.2; SGH-T859 Build/JZO54K) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Safari/535.19
)
)
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>UAParser<br /><small>v3.4.5</small><br /></td><td>Chrome 18.0.1025</td><td><i class="material-icons">close</i></td><td>Android 4.1.2</td><td style="border-left: 1px solid #555">Samsung</td><td>SGH-T859</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.001</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-3160e405-8a8f-46dd-8f47-5115f06462d2">Detail</a>
<!-- Modal Structure -->
<div id="modal-3160e405-8a8f-46dd-8f47-5115f06462d2" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>UAParser result detail</h4>
<p><pre><code class="php">UAParser\Result\Client Object
(
[ua] => UAParser\Result\UserAgent Object
(
[major] => 18
[minor] => 0
[patch] => 1025
[family] => Chrome
)
[os] => UAParser\Result\OperatingSystem Object
(
[major] => 4
[minor] => 1
[patch] => 2
[patchMinor] =>
[family] => Android
)
[device] => UAParser\Result\Device Object
(
[brand] => Samsung
[model] => SGH-T859
[family] => Samsung SGH-T859
)
[originalUserAgent] => Mozilla/5.0 (Linux; Android 4.1.2; SGH-T859 Build/JZO54K) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Safari/535.19
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>UserAgentApiCom<br /><small></small><br /></td><td>Chrome 18.0.1025.166</td><td>WebKit 535.19</td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>Mobile</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.15301</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-afeb05fb-26b9-4509-b8ac-0c604a9e97d6">Detail</a>
<!-- Modal Structure -->
<div id="modal-afeb05fb-26b9-4509-b8ac-0c604a9e97d6" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>UserAgentApiCom result detail</h4>
<p><pre><code class="php">stdClass Object
(
[platform_name] => Android
[platform_version] => 4.1.2
[platform_type] => Mobile
[browser_name] => Chrome
[browser_version] => 18.0.1025.166
[engine_name] => WebKit
[engine_version] => 535.19
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>UserAgentStringCom<br /><small></small><br /></td><td>Android Webkit Browser </td><td><i class="material-icons">close</i></td><td>Android 4.1.2</td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td></td><td>0.08</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-08a9ddfb-838f-48d7-9ede-1d132306b2ee">Detail</a>
<!-- Modal Structure -->
<div id="modal-08a9ddfb-838f-48d7-9ede-1d132306b2ee" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>UserAgentStringCom result detail</h4>
<p><pre><code class="php">stdClass Object
(
[agent_type] => Browser
[agent_name] => Android Webkit Browser
[agent_version] => --
[os_type] => Android
[os_name] => Android
[os_versionName] =>
[os_versionNumber] => 4.1.2
[os_producer] =>
[os_producerURL] =>
[linux_distibution] => Null
[agent_language] =>
[agent_languageTag] =>
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>WhatIsMyBrowserCom<br /><small></small><br /></td><td>Chrome 18.0.1025.166</td><td>WebKit 535.19</td><td>Android 4.1.2</td><td style="border-left: 1px solid #555">Samsung</td><td></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0.23801</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-5fc1ff22-a74d-481b-9ad1-fcfde73ded9c">Detail</a>
<!-- Modal Structure -->
<div id="modal-5fc1ff22-a74d-481b-9ad1-fcfde73ded9c" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>WhatIsMyBrowserCom result detail</h4>
<p><pre><code class="php">stdClass Object
(
[operating_system_name] => Android
[simple_sub_description_string] =>
[simple_browser_string] => Chrome 18 on Android (Jelly Bean)
[browser_version] => 18
[extra_info] => Array
(
)
[operating_platform] =>
[extra_info_table] => stdClass Object
(
[System Build] => JZO54K
)
[layout_engine_name] => WebKit
[detected_addons] => Array
(
)
[operating_system_flavour_code] =>
[hardware_architecture] =>
[operating_system_flavour] =>
[operating_system_frameworks] => Array
(
)
[browser_name_code] => chrome
[operating_system_version] => Jelly Bean
[simple_operating_platform_string] => Samsung SGH-T859
[is_abusive] =>
[layout_engine_version] => 535.19
[browser_capabilities] => Array
(
)
[operating_platform_vendor_name] => Samsung
[operating_system] => Android (Jelly Bean)
[operating_system_version_full] => 4.1.2
[operating_platform_code] => SGH-T859
[browser_name] => Chrome
[operating_system_name_code] => android
[user_agent] => Mozilla/5.0 (Linux; Android 4.1.2; SGH-T859 Build/JZO54K) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Safari/535.19
[browser_version_full] => 18.0.1025.166
[browser] => Chrome 18
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>WhichBrowser<br /><small>v2.0.18</small><br /></td><td>Chrome 18</td><td>Webkit 535.19</td><td>Android 4.1.2</td><td style="border-left: 1px solid #555">Samsung</td><td>Galaxy Tab 10.1</td><td>tablet</td><td>yes</td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.001</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-083a336f-5d73-4505-84f3-c5fc9bb78652">Detail</a>
<!-- Modal Structure -->
<div id="modal-083a336f-5d73-4505-84f3-c5fc9bb78652" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>WhichBrowser result detail</h4>
<p><pre><code class="php">Array
(
[browser] => Array
(
[name] => Chrome
[version] => 18
[type] => browser
)
[engine] => Array
(
[name] => Webkit
[version] => 535.19
)
[os] => Array
(
[name] => Android
[version] => 4.1.2
)
[device] => Array
(
[type] => tablet
[manufacturer] => Samsung
[model] => Galaxy Tab 10.1
)
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>Woothee<br /><small>v1.2.0</small><br /></td><td>Chrome 18.0.1025.166</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>smartphone</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-f00e7198-0e22-49fe-bad0-dbb3a9cde9b9">Detail</a>
<!-- Modal Structure -->
<div id="modal-f00e7198-0e22-49fe-bad0-dbb3a9cde9b9" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>Woothee result detail</h4>
<p><pre><code class="php">Array
(
[name] => Chrome
[vendor] => Google
[version] => 18.0.1025.166
[category] => smartphone
[os] => Android
[os_version] => 4.1.2
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>Wurfl<br /><small>1.7.1.0</small><br /></td><td>Chrome 18.0.1025.166</td><td><i class="material-icons">close</i></td><td>Android 4.1.2</td><td style="border-left: 1px solid #555"></td><td></td><td>Tablet</td><td>yes</td><td>yes</td><td style="border-left: 1px solid #555"></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0.018</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-a2bedf8c-4a95-42a7-96c5-aaf233b2ac50">Detail</a>
<!-- Modal Structure -->
<div id="modal-a2bedf8c-4a95-42a7-96c5-aaf233b2ac50" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>Wurfl result detail</h4>
<p><pre><code class="php">Array
(
[virtual] => Array
(
[is_android] => true
[is_ios] => false
[is_windows_phone] => false
[is_app] => false
[is_full_desktop] => false
[is_largescreen] => true
[is_mobile] => true
[is_robot] => false
[is_smartphone] => false
[is_touchscreen] => true
[is_wml_preferred] => false
[is_xhtmlmp_preferred] => false
[is_html_preferred] => true
[advertised_device_os] => Android
[advertised_device_os_version] => 4.1.2
[advertised_browser] => Chrome
[advertised_browser_version] => 18.0.1025.166
[complete_device_name] => Generic Android 4.1 Tablet
[device_name] => Generic Android 4.1 Tablet
[form_factor] => Tablet
[is_phone] => false
[is_app_webview] => false
)
[all] => Array
(
[brand_name] => Generic
[model_name] => Android 4.1 Tablet
[unique] => true
[ununiqueness_handler] =>
[is_wireless_device] => true
[device_claims_web_support] => true
[has_qwerty_keyboard] => true
[can_skip_aligned_link_row] => true
[uaprof] =>
[uaprof2] =>
[uaprof3] =>
[nokia_series] => 0
[nokia_edition] => 0
[device_os] => Android
[mobile_browser] => Android Webkit
[mobile_browser_version] =>
[device_os_version] => 4.1
[pointing_method] => touchscreen
[release_date] => 2012_july
[marketing_name] =>
[model_extra_info] =>
[nokia_feature_pack] => 0
[can_assign_phone_number] => false
[is_tablet] => true
[manufacturer_name] =>
[is_bot] => false
[is_google_glass] => false
[proportional_font] => false
[built_in_back_button_support] => false
[card_title_support] => true
[softkey_support] => false
[table_support] => true
[numbered_menus] => false
[menu_with_select_element_recommended] => false
[menu_with_list_of_links_recommended] => true
[icons_on_menu_items_support] => false
[break_list_of_links_with_br_element_recommended] => true
[access_key_support] => false
[wrap_mode_support] => false
[times_square_mode_support] => false
[deck_prefetch_support] => false
[elective_forms_recommended] => true
[wizards_recommended] => false
[image_as_link_support] => false
[insert_br_element_after_widget_recommended] => false
[wml_can_display_images_and_text_on_same_line] => false
[wml_displays_image_in_center] => false
[opwv_wml_extensions_support] => false
[wml_make_phone_call_string] => wtai://wp/mc;
[chtml_display_accesskey] => false
[emoji] => false
[chtml_can_display_images_and_text_on_same_line] => false
[chtml_displays_image_in_center] => false
[imode_region] => none
[chtml_make_phone_call_string] => tel:
[chtml_table_support] => false
[xhtml_honors_bgcolor] => true
[xhtml_supports_forms_in_table] => true
[xhtml_support_wml2_namespace] => false
[xhtml_autoexpand_select] => false
[xhtml_select_as_dropdown] => false
[xhtml_select_as_radiobutton] => false
[xhtml_select_as_popup] => false
[xhtml_display_accesskey] => false
[xhtml_supports_invisible_text] => false
[xhtml_supports_inline_input] => false
[xhtml_supports_monospace_font] => false
[xhtml_supports_table_for_layout] => true
[xhtml_supports_css_cell_table_coloring] => true
[xhtml_format_as_css_property] => false
[xhtml_format_as_attribute] => false
[xhtml_nowrap_mode] => false
[xhtml_marquee_as_css_property] => false
[xhtml_readable_background_color1] => #FFFFFF
[xhtml_readable_background_color2] => #FFFFFF
[xhtml_allows_disabled_form_elements] => true
[xhtml_document_title_support] => true
[xhtml_preferred_charset] => iso-8859-1
[opwv_xhtml_extensions_support] => false
[xhtml_make_phone_call_string] => tel:
[xhtmlmp_preferred_mime_type] => text/html
[xhtml_table_support] => true
[xhtml_send_sms_string] => sms:
[xhtml_send_mms_string] => mms:
[xhtml_file_upload] => supported
[cookie_support] => true
[accept_third_party_cookie] => true
[xhtml_supports_iframe] => full
[xhtml_avoid_accesskeys] => true
[xhtml_can_embed_video] => none
[ajax_support_javascript] => true
[ajax_manipulate_css] => true
[ajax_support_getelementbyid] => true
[ajax_support_inner_html] => true
[ajax_xhr_type] => standard
[ajax_manipulate_dom] => true
[ajax_support_events] => true
[ajax_support_event_listener] => true
[ajax_preferred_geoloc_api] => w3c_api
[xhtml_support_level] => 4
[preferred_markup] => html_web_4_0
[wml_1_1] => false
[wml_1_2] => false
[wml_1_3] => false
[html_wi_w3_xhtmlbasic] => true
[html_wi_oma_xhtmlmp_1_0] => true
[html_wi_imode_html_1] => false
[html_wi_imode_html_2] => false
[html_wi_imode_html_3] => false
[html_wi_imode_html_4] => false
[html_wi_imode_html_5] => false
[html_wi_imode_htmlx_1] => false
[html_wi_imode_htmlx_1_1] => false
[html_wi_imode_compact_generic] => false
[html_web_3_2] => true
[html_web_4_0] => true
[voicexml] => false
[multipart_support] => false
[total_cache_disable_support] => false
[time_to_live_support] => false
[resolution_width] => 480
[resolution_height] => 800
[columns] => 60
[max_image_width] => 600
[max_image_height] => 1024
[rows] => 40
[physical_screen_width] => 92
[physical_screen_height] => 153
[dual_orientation] => true
[density_class] => 1.0
[wbmp] => true
[bmp] => false
[epoc_bmp] => false
[gif_animated] => false
[jpg] => true
[png] => true
[tiff] => false
[transparent_png_alpha] => true
[transparent_png_index] => true
[svgt_1_1] => true
[svgt_1_1_plus] => false
[greyscale] => false
[gif] => true
[colors] => 65536
[webp_lossy_support] => true
[webp_lossless_support] => true
[post_method_support] => true
[basic_authentication_support] => true
[empty_option_value_support] => true
[emptyok] => false
[nokia_voice_call] => false
[wta_voice_call] => false
[wta_phonebook] => false
[wta_misc] => false
[wta_pdc] => false
[https_support] => true
[phone_id_provided] => false
[max_data_rate] => 3600
[wifi] => true
[sdio] => false
[vpn] => false
[has_cellular_radio] => true
[max_deck_size] => 2000000
[max_url_length_in_requests] => 256
[max_url_length_homepage] => 0
[max_url_length_bookmark] => 0
[max_url_length_cached_page] => 0
[max_no_of_connection_settings] => 0
[max_no_of_bookmarks] => 0
[max_length_of_username] => 0
[max_length_of_password] => 0
[max_object_size] => 0
[downloadfun_support] => false
[directdownload_support] => true
[inline_support] => false
[oma_support] => true
[ringtone] => false
[ringtone_3gpp] => false
[ringtone_midi_monophonic] => false
[ringtone_midi_polyphonic] => false
[ringtone_imelody] => false
[ringtone_digiplug] => false
[ringtone_compactmidi] => false
[ringtone_mmf] => false
[ringtone_rmf] => false
[ringtone_xmf] => false
[ringtone_amr] => false
[ringtone_awb] => false
[ringtone_aac] => false
[ringtone_wav] => false
[ringtone_mp3] => false
[ringtone_spmidi] => false
[ringtone_qcelp] => false
[ringtone_voices] => 1
[ringtone_df_size_limit] => 0
[ringtone_directdownload_size_limit] => 0
[ringtone_inline_size_limit] => 0
[ringtone_oma_size_limit] => 0
[wallpaper] => false
[wallpaper_max_width] => 0
[wallpaper_max_height] => 0
[wallpaper_preferred_width] => 0
[wallpaper_preferred_height] => 0
[wallpaper_resize] => none
[wallpaper_wbmp] => false
[wallpaper_bmp] => false
[wallpaper_gif] => false
[wallpaper_jpg] => false
[wallpaper_png] => false
[wallpaper_tiff] => false
[wallpaper_greyscale] => false
[wallpaper_colors] => 2
[wallpaper_df_size_limit] => 0
[wallpaper_directdownload_size_limit] => 0
[wallpaper_inline_size_limit] => 0
[wallpaper_oma_size_limit] => 0
[screensaver] => false
[screensaver_max_width] => 0
[screensaver_max_height] => 0
[screensaver_preferred_width] => 0
[screensaver_preferred_height] => 0
[screensaver_resize] => none
[screensaver_wbmp] => false
[screensaver_bmp] => false
[screensaver_gif] => false
[screensaver_jpg] => false
[screensaver_png] => false
[screensaver_greyscale] => false
[screensaver_colors] => 2
[screensaver_df_size_limit] => 0
[screensaver_directdownload_size_limit] => 0
[screensaver_inline_size_limit] => 0
[screensaver_oma_size_limit] => 0
[picture] => false
[picture_max_width] => 0
[picture_max_height] => 0
[picture_preferred_width] => 0
[picture_preferred_height] => 0
[picture_resize] => none
[picture_wbmp] => false
[picture_bmp] => false
[picture_gif] => false
[picture_jpg] => false
[picture_png] => false
[picture_greyscale] => false
[picture_colors] => 2
[picture_df_size_limit] => 0
[picture_directdownload_size_limit] => 0
[picture_inline_size_limit] => 0
[picture_oma_size_limit] => 0
[video] => false
[oma_v_1_0_forwardlock] => false
[oma_v_1_0_combined_delivery] => false
[oma_v_1_0_separate_delivery] => false
[streaming_video] => true
[streaming_3gpp] => true
[streaming_mp4] => true
[streaming_mov] => false
[streaming_video_size_limit] => 0
[streaming_real_media] => none
[streaming_flv] => false
[streaming_3g2] => false
[streaming_vcodec_h263_0] => 10
[streaming_vcodec_h263_3] => -1
[streaming_vcodec_mpeg4_sp] => 2
[streaming_vcodec_mpeg4_asp] => -1
[streaming_vcodec_h264_bp] => 3.0
[streaming_acodec_amr] => nb
[streaming_acodec_aac] => lc
[streaming_wmv] => none
[streaming_preferred_protocol] => rtsp
[streaming_preferred_http_protocol] => apple_live_streaming
[wap_push_support] => false
[connectionless_service_indication] => false
[connectionless_service_load] => false
[connectionless_cache_operation] => false
[connectionoriented_unconfirmed_service_indication] => false
[connectionoriented_unconfirmed_service_load] => false
[connectionoriented_unconfirmed_cache_operation] => false
[connectionoriented_confirmed_service_indication] => false
[connectionoriented_confirmed_service_load] => false
[connectionoriented_confirmed_cache_operation] => false
[utf8_support] => true
[ascii_support] => false
[iso8859_support] => false
[expiration_date] => false
[j2me_cldc_1_0] => false
[j2me_cldc_1_1] => false
[j2me_midp_1_0] => false
[j2me_midp_2_0] => false
[doja_1_0] => false
[doja_1_5] => false
[doja_2_0] => false
[doja_2_1] => false
[doja_2_2] => false
[doja_3_0] => false
[doja_3_5] => false
[doja_4_0] => false
[j2me_jtwi] => false
[j2me_mmapi_1_0] => false
[j2me_mmapi_1_1] => false
[j2me_wmapi_1_0] => false
[j2me_wmapi_1_1] => false
[j2me_wmapi_2_0] => false
[j2me_btapi] => false
[j2me_3dapi] => false
[j2me_locapi] => false
[j2me_nokia_ui] => false
[j2me_motorola_lwt] => false
[j2me_siemens_color_game] => false
[j2me_siemens_extension] => false
[j2me_heap_size] => 0
[j2me_max_jar_size] => 0
[j2me_storage_size] => 0
[j2me_max_record_store_size] => 0
[j2me_screen_width] => 0
[j2me_screen_height] => 0
[j2me_canvas_width] => 0
[j2me_canvas_height] => 0
[j2me_bits_per_pixel] => 0
[j2me_audio_capture_enabled] => false
[j2me_video_capture_enabled] => false
[j2me_photo_capture_enabled] => false
[j2me_capture_image_formats] => none
[j2me_http] => false
[j2me_https] => false
[j2me_socket] => false
[j2me_udp] => false
[j2me_serial] => false
[j2me_gif] => false
[j2me_gif89a] => false
[j2me_jpg] => false
[j2me_png] => false
[j2me_bmp] => false
[j2me_bmp3] => false
[j2me_wbmp] => false
[j2me_midi] => false
[j2me_wav] => false
[j2me_amr] => false
[j2me_mp3] => false
[j2me_mp4] => false
[j2me_imelody] => false
[j2me_rmf] => false
[j2me_au] => false
[j2me_aac] => false
[j2me_realaudio] => false
[j2me_xmf] => false
[j2me_wma] => false
[j2me_3gpp] => false
[j2me_h263] => false
[j2me_svgt] => false
[j2me_mpeg4] => false
[j2me_realvideo] => false
[j2me_real8] => false
[j2me_realmedia] => false
[j2me_left_softkey_code] => 0
[j2me_right_softkey_code] => 0
[j2me_middle_softkey_code] => 0
[j2me_select_key_code] => 0
[j2me_return_key_code] => 0
[j2me_clear_key_code] => 0
[j2me_datefield_no_accepts_null_date] => false
[j2me_datefield_broken] => false
[receiver] => false
[sender] => false
[mms_max_size] => 0
[mms_max_height] => 0
[mms_max_width] => 0
[built_in_recorder] => false
[built_in_camera] => true
[mms_jpeg_baseline] => false
[mms_jpeg_progressive] => false
[mms_gif_static] => false
[mms_gif_animated] => false
[mms_png] => false
[mms_bmp] => false
[mms_wbmp] => false
[mms_amr] => false
[mms_wav] => false
[mms_midi_monophonic] => false
[mms_midi_polyphonic] => false
[mms_midi_polyphonic_voices] => 0
[mms_spmidi] => false
[mms_mmf] => false
[mms_mp3] => false
[mms_evrc] => false
[mms_qcelp] => false
[mms_ota_bitmap] => false
[mms_nokia_wallpaper] => false
[mms_nokia_operatorlogo] => false
[mms_nokia_3dscreensaver] => false
[mms_nokia_ringingtone] => false
[mms_rmf] => false
[mms_xmf] => false
[mms_symbian_install] => false
[mms_jar] => false
[mms_jad] => false
[mms_vcard] => false
[mms_vcalendar] => false
[mms_wml] => false
[mms_wbxml] => false
[mms_wmlc] => false
[mms_video] => false
[mms_mp4] => false
[mms_3gpp] => false
[mms_3gpp2] => false
[mms_max_frame_rate] => 0
[nokiaring] => false
[picturemessage] => false
[operatorlogo] => false
[largeoperatorlogo] => false
[callericon] => false
[nokiavcard] => false
[nokiavcal] => false
[sckl_ringtone] => false
[sckl_operatorlogo] => false
[sckl_groupgraphic] => false
[sckl_vcard] => false
[sckl_vcalendar] => false
[text_imelody] => false
[ems] => false
[ems_variablesizedpictures] => false
[ems_imelody] => false
[ems_odi] => false
[ems_upi] => false
[ems_version] => 0
[siemens_ota] => false
[siemens_logo_width] => 101
[siemens_logo_height] => 29
[siemens_screensaver_width] => 101
[siemens_screensaver_height] => 50
[gprtf] => false
[sagem_v1] => false
[sagem_v2] => false
[panasonic] => false
[sms_enabled] => true
[wav] => false
[mmf] => false
[smf] => false
[mld] => false
[midi_monophonic] => false
[midi_polyphonic] => false
[sp_midi] => false
[rmf] => false
[xmf] => false
[compactmidi] => false
[digiplug] => false
[nokia_ringtone] => false
[imelody] => false
[au] => false
[amr] => false
[awb] => false
[aac] => true
[mp3] => true
[voices] => 1
[qcelp] => false
[evrc] => false
[flash_lite_version] =>
[fl_wallpaper] => false
[fl_screensaver] => false
[fl_standalone] => false
[fl_browser] => false
[fl_sub_lcd] => false
[full_flash_support] => false
[css_supports_width_as_percentage] => true
[css_border_image] => webkit
[css_rounded_corners] => webkit
[css_gradient] => none
[css_spriting] => true
[css_gradient_linear] => none
[is_transcoder] => false
[transcoder_ua_header] => user-agent
[rss_support] => false
[pdf_support] => true
[progressive_download] => true
[playback_vcodec_h263_0] => 10
[playback_vcodec_h263_3] => -1
[playback_vcodec_mpeg4_sp] => 0
[playback_vcodec_mpeg4_asp] => -1
[playback_vcodec_h264_bp] => 3.0
[playback_real_media] => none
[playback_3gpp] => true
[playback_3g2] => false
[playback_mp4] => true
[playback_mov] => false
[playback_acodec_amr] => nb
[playback_acodec_aac] => none
[playback_df_size_limit] => 0
[playback_directdownload_size_limit] => 0
[playback_inline_size_limit] => 0
[playback_oma_size_limit] => 0
[playback_acodec_qcelp] => false
[playback_wmv] => none
[hinted_progressive_download] => true
[html_preferred_dtd] => html4
[viewport_supported] => true
[viewport_width] => device_width_token
[viewport_userscalable] => no
[viewport_initial_scale] =>
[viewport_maximum_scale] =>
[viewport_minimum_scale] =>
[mobileoptimized] => false
[handheldfriendly] => false
[canvas_support] => full
[image_inlining] => true
[is_smarttv] => false
[is_console] => false
[nfc_support] => false
[ux_full_desktop] => false
[jqm_grade] => A
[is_sencha_touch_ok] => false
)
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>Zsxsoft<br /><small>1.3</small><br /></td><td>Google Chrome 18.0.1025.166</td><td><i class="material-icons">close</i></td><td>Android 4.1.2</td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0</td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-5d43e024-b46c-44f6-8914-529b05569bc2">Detail</a>
<!-- Modal Structure -->
<div id="modal-5d43e024-b46c-44f6-8914-529b05569bc2" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>Zsxsoft result detail</h4>
<p><pre><code class="php">Array
(
[browser] => Array
(
[link] => http://google.com/chrome/
[title] => Google Chrome 18.0.1025.166
[name] => Google Chrome
[version] => 18.0.1025.166
[code] => chrome
[image] => img/16/browser/chrome.png
)
[os] => Array
(
[link] => http://www.android.com/
[name] => Android
[version] => 4.1.2
[code] => android
[x64] =>
[title] => Android 4.1.2
[type] => os
[dir] => os
[image] => img/16/os/android.png
)
[device] => Array
(
[link] =>
[title] =>
[model] =>
[brand] =>
[code] => null
[dir] => device
[type] => device
[image] => img/16/device/null.png
)
[platform] => Array
(
[link] => http://www.android.com/
[name] => Android
[version] => 4.1.2
[code] => android
[x64] =>
[title] => Android 4.1.2
[type] => os
[dir] => os
[image] => img/16/os/android.png
)
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr></table>
</div>
<div class="section">
<h1 class="header center orange-text">About this comparison</h1>
<div class="row center">
<h5 class="header light">
The primary goal of this project is simple<br />
I wanted to know which user agent parser is the most accurate in each part - device detection, bot detection and so on...<br />
<br />
The secondary goal is to provide a source for all user agent parsers to improve their detection based on this results.<br />
<br />
You can also improve this further, by suggesting ideas at <a href="https://github.com/ThaDafinser/UserAgentParserComparison">ThaDafinser/UserAgentParserComparison</a><br />
<br />
The comparison is based on the abstraction by <a href="https://github.com/ThaDafinser/UserAgentParser">ThaDafinser/UserAgentParser</a>
</h5>
</div>
</div>
<div class="card">
<div class="card-content">
Comparison created <i>2016-05-10 08:05:30</i> | by
<a href="https://github.com/ThaDafinser">ThaDafinser</a>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/js/materialize.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/list.js/1.2.0/list.min.js"></script>
<script>
$(document).ready(function(){
// the "href" attribute of .modal-trigger must specify the modal ID that wants to be triggered
$('.modal-trigger').leanModal();
});
</script>
</body>
</html> | {'content_hash': '3250f0adc1d5b1545a3b3adf26d62c25', 'timestamp': '', 'source': 'github', 'line_count': 1414, 'max_line_length': 823, 'avg_line_length': 40.54243281471004, 'alnum_prop': 0.5463917525773195, 'repo_name': 'ThaDafinser/UserAgentParserComparison', 'id': 'a272d95dc7714de436b7ad47e2f8c9adc81f2c55', 'size': '57328', 'binary': False, 'copies': '1', 'ref': 'refs/heads/gh-pages', 'path': 'v5/user-agent-detail/b1/e8/b1e8e744-62d1-4607-8861-ec95f7ddef94.html', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'HTML', 'bytes': '2060859160'}]} |
package org.apache.activemq.artemis.tests.integration.ssl;
import javax.net.ssl.SSLPeerUnverifiedException;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import io.netty.handler.ssl.SslHandler;
import org.apache.activemq.artemis.api.core.ActiveMQException;
import org.apache.activemq.artemis.api.core.ActiveMQNotConnectedException;
import org.apache.activemq.artemis.api.core.Interceptor;
import org.apache.activemq.artemis.api.core.Message;
import org.apache.activemq.artemis.api.core.SimpleString;
import org.apache.activemq.artemis.api.core.TransportConfiguration;
import org.apache.activemq.artemis.api.core.client.ClientConsumer;
import org.apache.activemq.artemis.api.core.client.ClientMessage;
import org.apache.activemq.artemis.api.core.client.ClientProducer;
import org.apache.activemq.artemis.api.core.client.ClientSession;
import org.apache.activemq.artemis.api.core.client.ClientSessionFactory;
import org.apache.activemq.artemis.api.core.client.ActiveMQClient;
import org.apache.activemq.artemis.api.core.client.ServerLocator;
import org.apache.activemq.artemis.core.remoting.impl.netty.NettyAcceptor;
import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
import org.apache.activemq.artemis.utils.RandomUtil;
import org.apache.activemq.artemis.core.config.impl.ConfigurationImpl;
import org.apache.activemq.artemis.core.protocol.core.Packet;
import org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl;
import org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnection;
import org.apache.activemq.artemis.core.remoting.impl.netty.TransportConstants;
import org.apache.activemq.artemis.core.server.ActiveMQServer;
import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@RunWith(value = Parameterized.class)
public class CoreClientOverTwoWaySSLTest extends ActiveMQTestBase {
@Parameterized.Parameters(name = "storeType={0}")
public static Collection getParameters() {
return Arrays.asList(new Object[][]{
{"JCEKS"},
{"JKS"}});
}
public CoreClientOverTwoWaySSLTest(String storeType) {
this.storeType = storeType;
SERVER_SIDE_KEYSTORE = "server-side-keystore." + storeType.toLowerCase();
SERVER_SIDE_TRUSTSTORE = "server-side-truststore." + storeType.toLowerCase();
CLIENT_SIDE_TRUSTSTORE = "client-side-truststore." + storeType.toLowerCase();
CLIENT_SIDE_KEYSTORE = "client-side-keystore." + storeType.toLowerCase();
}
public static final SimpleString QUEUE = new SimpleString("QueueOverSSL");
/**
* These artifacts are required for testing 2-way SSL in addition to the artifacts for 1-way SSL from {@link CoreClientOverOneWaySSLTest}
*
* Commands to create the JKS artifacts:
* keytool -genkey -keystore client-side-keystore.jks -storepass secureexample -keypass secureexample -dname "CN=ActiveMQ Artemis Client, OU=Artemis, O=ActiveMQ, L=AMQ, S=AMQ, C=AMQ" -keyalg RSA
* keytool -export -keystore client-side-keystore.jks -file activemq-jks.cer -storepass secureexample
* keytool -import -keystore server-side-truststore.jks -file activemq-jks.cer -storepass secureexample -keypass secureexample -noprompt
*
* keytool -genkey -keystore verified-client-side-keystore.jks -storepass secureexample -keypass secureexample -dname "CN=localhost, OU=Artemis, O=ActiveMQ, L=AMQ, S=AMQ, C=AMQ" -keyalg RSA
* keytool -export -keystore verified-client-side-keystore.jks -file activemq-jks.cer -storepass secureexample
* keytool -import -keystore verified-server-side-truststore.jks -file activemq-jks.cer -storepass secureexample -keypass secureexample -noprompt
*
* Commands to create the JCEKS artifacts:
* keytool -genkey -keystore client-side-keystore.jceks -storetype JCEKS -storepass secureexample -keypass secureexample -dname "CN=ActiveMQ Artemis Client, OU=Artemis, O=ActiveMQ, L=AMQ, S=AMQ, C=AMQ" -keyalg RSA
* keytool -export -keystore client-side-keystore.jceks -file activemq-jceks.cer -storetype jceks -storepass secureexample
* keytool -import -keystore server-side-truststore.jceks -storetype JCEKS -file activemq-jceks.cer -storepass secureexample -keypass secureexample -noprompt
*
* keytool -genkey -keystore verified-client-side-keystore.jceks -storetype JCEKS -storepass secureexample -keypass secureexample -dname "CN=localhost, OU=Artemis, O=ActiveMQ, L=AMQ, S=AMQ, C=AMQ" -keyalg RSA
* keytool -export -keystore verified-client-side-keystore.jceks -file activemq-jceks.cer -storetype jceks -storepass secureexample
* keytool -import -keystore verified-server-side-truststore.jceks -storetype JCEKS -file activemq-jceks.cer -storepass secureexample -keypass secureexample -noprompt
*/
private String storeType;
private String SERVER_SIDE_KEYSTORE;
private String SERVER_SIDE_TRUSTSTORE;
private String CLIENT_SIDE_TRUSTSTORE;
private String CLIENT_SIDE_KEYSTORE;
private final String PASSWORD = "secureexample";
private ActiveMQServer server;
private TransportConfiguration tc;
private class MyInterceptor implements Interceptor {
@Override
public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException {
if (packet.getType() == PacketImpl.SESS_SEND) {
try {
if (connection.getTransportConnection() instanceof NettyConnection) {
System.out.println("Passed through....");
NettyConnection nettyConnection = (NettyConnection) connection.getTransportConnection();
SslHandler sslHandler = (SslHandler) nettyConnection.getChannel().pipeline().get("ssl");
Assert.assertNotNull(sslHandler);
Assert.assertNotNull(sslHandler.engine().getSession());
Assert.assertNotNull(sslHandler.engine().getSession().getPeerCertificateChain());
}
}
catch (SSLPeerUnverifiedException e) {
Assert.fail(e.getMessage());
}
}
return true;
}
}
@Test
public void testTwoWaySSL() throws Exception {
String text = RandomUtil.randomString();
tc.getParams().put(TransportConstants.SSL_ENABLED_PROP_NAME, true);
tc.getParams().put(TransportConstants.TRUSTSTORE_PROVIDER_PROP_NAME, storeType);
tc.getParams().put(TransportConstants.KEYSTORE_PROVIDER_PROP_NAME, storeType);
tc.getParams().put(TransportConstants.TRUSTSTORE_PATH_PROP_NAME, CLIENT_SIDE_TRUSTSTORE);
tc.getParams().put(TransportConstants.TRUSTSTORE_PASSWORD_PROP_NAME, PASSWORD);
tc.getParams().put(TransportConstants.KEYSTORE_PATH_PROP_NAME, CLIENT_SIDE_KEYSTORE);
tc.getParams().put(TransportConstants.KEYSTORE_PASSWORD_PROP_NAME, PASSWORD);
server.getRemotingService().addIncomingInterceptor(new MyInterceptor());
ServerLocator locator = addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(tc));
ClientSessionFactory sf = createSessionFactory(locator);
ClientSession session = sf.createSession(false, true, true);
session.createQueue(CoreClientOverTwoWaySSLTest.QUEUE, CoreClientOverTwoWaySSLTest.QUEUE, false);
ClientProducer producer = session.createProducer(CoreClientOverTwoWaySSLTest.QUEUE);
ClientMessage message = createTextMessage(session, text);
producer.send(message);
ClientConsumer consumer = session.createConsumer(CoreClientOverTwoWaySSLTest.QUEUE);
session.start();
Message m = consumer.receive(1000);
Assert.assertNotNull(m);
Assert.assertEquals(text, m.getBodyBuffer().readString());
}
@Test
public void testTwoWaySSLVerifyClientHost() throws Exception {
NettyAcceptor acceptor = (NettyAcceptor) server.getRemotingService().getAcceptor("nettySSL");
acceptor.getConfiguration().put(TransportConstants.VERIFY_HOST_PROP_NAME, true);
acceptor.getConfiguration().put(TransportConstants.TRUSTSTORE_PATH_PROP_NAME, "verified-" + SERVER_SIDE_TRUSTSTORE);
server.getRemotingService().stop(false);
server.getRemotingService().start();
server.getRemotingService().startAcceptors();
String text = RandomUtil.randomString();
tc.getParams().put(TransportConstants.SSL_ENABLED_PROP_NAME, true);
tc.getParams().put(TransportConstants.TRUSTSTORE_PROVIDER_PROP_NAME, storeType);
tc.getParams().put(TransportConstants.KEYSTORE_PROVIDER_PROP_NAME, storeType);
tc.getParams().put(TransportConstants.TRUSTSTORE_PATH_PROP_NAME, CLIENT_SIDE_TRUSTSTORE);
tc.getParams().put(TransportConstants.TRUSTSTORE_PASSWORD_PROP_NAME, PASSWORD);
tc.getParams().put(TransportConstants.KEYSTORE_PATH_PROP_NAME, "verified-" + CLIENT_SIDE_KEYSTORE);
tc.getParams().put(TransportConstants.KEYSTORE_PASSWORD_PROP_NAME, PASSWORD);
server.getRemotingService().addIncomingInterceptor(new MyInterceptor());
ServerLocator locator = addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(tc));
ClientSessionFactory sf = createSessionFactory(locator);
ClientSession session = sf.createSession(false, true, true);
session.createQueue(CoreClientOverTwoWaySSLTest.QUEUE, CoreClientOverTwoWaySSLTest.QUEUE, false);
ClientProducer producer = session.createProducer(CoreClientOverTwoWaySSLTest.QUEUE);
ClientMessage message = createTextMessage(session, text);
producer.send(message);
ClientConsumer consumer = session.createConsumer(CoreClientOverTwoWaySSLTest.QUEUE);
session.start();
Message m = consumer.receive(1000);
Assert.assertNotNull(m);
Assert.assertEquals(text, m.getBodyBuffer().readString());
}
@Test
public void testTwoWaySSLVerifyClientHostNegative() throws Exception {
NettyAcceptor acceptor = (NettyAcceptor) server.getRemotingService().getAcceptor("nettySSL");
acceptor.getConfiguration().put(TransportConstants.VERIFY_HOST_PROP_NAME, true);
server.getRemotingService().stop(false);
server.getRemotingService().start();
server.getRemotingService().startAcceptors();
tc.getParams().put(TransportConstants.SSL_ENABLED_PROP_NAME, true);
tc.getParams().put(TransportConstants.TRUSTSTORE_PROVIDER_PROP_NAME, storeType);
tc.getParams().put(TransportConstants.KEYSTORE_PROVIDER_PROP_NAME, storeType);
tc.getParams().put(TransportConstants.TRUSTSTORE_PATH_PROP_NAME, CLIENT_SIDE_TRUSTSTORE);
tc.getParams().put(TransportConstants.TRUSTSTORE_PASSWORD_PROP_NAME, PASSWORD);
tc.getParams().put(TransportConstants.KEYSTORE_PATH_PROP_NAME, CLIENT_SIDE_KEYSTORE);
tc.getParams().put(TransportConstants.KEYSTORE_PASSWORD_PROP_NAME, PASSWORD);
server.getRemotingService().addIncomingInterceptor(new MyInterceptor());
ServerLocator locator = addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(tc));
try {
ClientSessionFactory sf = createSessionFactory(locator);
fail("Creating a session here should fail due to a certificate with a CN that doesn't match the host name.");
}
catch (Exception e) {
// ignore
}
}
@Test
public void testTwoWaySSLWithoutClientKeyStore() throws Exception {
tc.getParams().put(TransportConstants.SSL_ENABLED_PROP_NAME, true);
tc.getParams().put(TransportConstants.TRUSTSTORE_PROVIDER_PROP_NAME, storeType);
tc.getParams().put(TransportConstants.TRUSTSTORE_PATH_PROP_NAME, CLIENT_SIDE_TRUSTSTORE);
tc.getParams().put(TransportConstants.TRUSTSTORE_PASSWORD_PROP_NAME, PASSWORD);
ServerLocator locator = addServerLocator(ActiveMQClient.createServerLocatorWithoutHA(tc));
try {
createSessionFactory(locator);
Assert.fail();
}
catch (ActiveMQNotConnectedException se) {
//ok
}
catch (ActiveMQException e) {
Assert.fail("Invalid Exception type:" + e.getType());
}
}
// Package protected ---------------------------------------------
@Override
@Before
public void setUp() throws Exception {
super.setUp();
Map<String, Object> params = new HashMap<>();
params.put(TransportConstants.SSL_ENABLED_PROP_NAME, true);
params.put(TransportConstants.KEYSTORE_PATH_PROP_NAME, SERVER_SIDE_KEYSTORE);
params.put(TransportConstants.KEYSTORE_PASSWORD_PROP_NAME, PASSWORD);
params.put(TransportConstants.TRUSTSTORE_PATH_PROP_NAME, SERVER_SIDE_TRUSTSTORE);
params.put(TransportConstants.TRUSTSTORE_PASSWORD_PROP_NAME, PASSWORD);
params.put(TransportConstants.TRUSTSTORE_PROVIDER_PROP_NAME, storeType);
params.put(TransportConstants.KEYSTORE_PROVIDER_PROP_NAME, storeType);
params.put(TransportConstants.NEED_CLIENT_AUTH_PROP_NAME, true);
ConfigurationImpl config = createBasicConfig().addAcceptorConfiguration(new TransportConfiguration(NETTY_ACCEPTOR_FACTORY, params, "nettySSL"));
server = createServer(false, config);
server.start();
waitForServerToStart(server);
tc = new TransportConfiguration(NETTY_CONNECTOR_FACTORY);
}
}
| {'content_hash': '14cfc30e850118b521b14383e3153298', 'timestamp': '', 'source': 'github', 'line_count': 254, 'max_line_length': 216, 'avg_line_length': 52.381889763779526, 'alnum_prop': 0.7446824502066892, 'repo_name': 'lburgazzoli/apache-activemq-artemis', 'id': '403ebc33fa8914c634b497ff1062f74314cf84f1', 'size': '14104', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ssl/CoreClientOverTwoWaySSLTest.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Batchfile', 'bytes': '6452'}, {'name': 'C', 'bytes': '26250'}, {'name': 'C++', 'bytes': '1197'}, {'name': 'CMake', 'bytes': '4260'}, {'name': 'CSS', 'bytes': '11732'}, {'name': 'HTML', 'bytes': '19117'}, {'name': 'Java', 'bytes': '22193755'}, {'name': 'Shell', 'bytes': '13568'}]} |
//
// XMNAudioPlayer.m
// XMNAudioRecorderExample
//
// Created by XMFraker on 16/6/29.
// Copyright © 2016年 XMFraker. All rights reserved.
//
#import "XMNAudioPlayer.h"
#import "XMNAudioDecoder.h"
#import "XMNAudioFileProvider.h"
#import "XMNAudioPlaybackItem.h"
#import "XMNAudioRunLoop.h"
#import "XMNAudioPlayer_XMNPrivate.h"
NSString *const kXMNAudioPlayerErrorDomain = @"com.XMFraker.XMNAudio.XMNAudioPlayer.kXMNAudioPlayerErrorDomain";
@interface XMNAudioPlayer ()
{
@private
id <XMNAudioFile> _audioFile;
XMNAudioPlayerStatus _status;
NSError *_error;
NSTimeInterval _duration;
NSInteger _timingOffset;
XMNAudioFileProvider *_fileProvider;
XMNAudioPlaybackItem *_playbackItem;
XMNAudioDecoder *_decoder;
double _bufferingRatio;
#if TARGET_OS_IPHONE
BOOL _pausedByInterruption;
#endif /* TARGET_OS_IPHONE */
}
@end
@implementation XMNAudioPlayer
@synthesize status = _status;
@synthesize error = _error;
@synthesize duration = _duration;
@synthesize timingOffset = _timingOffset;
@synthesize decoder = _decoder;
@synthesize fileProvider = _fileProvider;
@synthesize playbackItem = _playbackItem;
@synthesize bufferingRatio = _bufferingRatio;
#if TARGET_OS_IPHONE
@synthesize pausedByInterruption = _pausedByInterruption;
#endif /* TARGET_OS_IPHONE */
#pragma mark - Life Cycle
+ (instancetype)playerWithAudioFile:(id<XMNAudioFile>)audioFile {
return [[[self class] alloc] initWithAudioFile:audioFile];
}
- (instancetype)initWithAudioFile:(id<XMNAudioFile>)audioFile {
if (self = [super init]) {
_audioFile = audioFile;
_status = XMNAudioPlayerStatusIdle;
_fileProvider = [XMNAudioFileProvider fileProviderWithAudioFile:_audioFile];
if (_fileProvider == nil) {
return nil;
}
_bufferingRatio = (double)[_fileProvider receivedLength] / [_fileProvider expectedLength];
}
return self;
}
- (void)dealloc {
NSLog(@"%@ dealloc",NSStringFromClass([self class]));
}
#pragma mark - Methods
- (void)play {
@synchronized(self) {
if (_status != XMNAudioPlayerStatusPaused &&
_status != XMNAudioPlayerStatusIdle &&
_status != XMNAudioPlayerStatusFinished) {
return;
}
if ([[XMNAudioRunLoop sharedLoop] currentPlayer] != self) {
[[XMNAudioRunLoop sharedLoop] pause];
[[XMNAudioRunLoop sharedLoop] setCurrentPlayer:self];
}
[[XMNAudioRunLoop sharedLoop] play];
}
}
- (void)pause {
@synchronized(self) {
if (_status == XMNAudioPlayerStatusPaused ||
_status == XMNAudioPlayerStatusIdle ||
_status == XMNAudioPlayerStatusFinished) {
return;
}
if ([[XMNAudioRunLoop sharedLoop] currentPlayer] != self) {
return;
}
[[XMNAudioRunLoop sharedLoop] pause];
}
}
- (void)stop {
@synchronized(self) {
if (_status == XMNAudioPlayerStatusIdle) {
return;
}
if ([[XMNAudioRunLoop sharedLoop] currentPlayer] != self) {
return;
}
[[XMNAudioRunLoop sharedLoop] stop];
[[XMNAudioRunLoop sharedLoop] setCurrentPlayer:nil];
}
}
#pragma mark - Setters
- (void)setCurrentTime:(NSTimeInterval)currentTime {
if ([[XMNAudioRunLoop sharedLoop] currentPlayer] != self) {
return;
}
[[XMNAudioRunLoop sharedLoop] setCurrentTime:currentTime];
}
- (void)setVolume:(double)volume {
[[self class] setVolume:volume];
}
- (void)setAnalyzers:(NSArray *)analyzers {
[[self class] setAnalyzers:analyzers];
}
#pragma mark - Getters
- (NSURL *)url {
return [_audioFile audioFileURL];
}
- (id <XMNAudioFile>)audioFile {
return _audioFile;
}
- (NSTimeInterval)currentTime {
if ([[XMNAudioRunLoop sharedLoop] currentPlayer] != self) {
return 0.0;
}
return [[XMNAudioRunLoop sharedLoop] currentTime];
}
- (double)volume {
return [[self class] volume];
}
- (NSArray *)analyzers {
return [[self class] analyzers];
}
- (NSString *)cachedPath {
return [_fileProvider cachedPath];
}
- (NSURL *)cachedURL {
return [_fileProvider cachedURL];
}
- (NSString *)sha256 {
return [_fileProvider sha256];
}
- (NSUInteger)expectedLength {
return [_fileProvider expectedLength];
}
- (NSUInteger)receivedLength {
return [_fileProvider receivedLength];
}
- (NSUInteger)downloadSpeed {
return [_fileProvider downloadSpeed];
}
#pragma mark - Class Methods
+ (double)volume {
return [[XMNAudioRunLoop sharedLoop] volume];
}
+ (void)setVolume:(double)volume {
[[XMNAudioRunLoop sharedLoop] setVolume:volume];
}
+ (NSArray *)analyzers {
return [[XMNAudioRunLoop sharedLoop] analyzers];
}
+ (void)setAnalyzers:(NSArray *)analyzers {
[[XMNAudioRunLoop sharedLoop] setAnalyzers:analyzers];
}
+ (void)setHintWithAudioFile:(id <XMNAudioFile>)audioFile {
[XMNAudioFileProvider setHintWithAudioFile:audioFile];
}
@end
| {'content_hash': '8ce0ad1f5f336b2bce3d449b3ac73467', 'timestamp': '', 'source': 'github', 'line_count': 253, 'max_line_length': 112, 'avg_line_length': 20.57312252964427, 'alnum_prop': 0.6441882804995197, 'repo_name': 'ws00801526/XMNAudio', 'id': 'dde85dfcac07ff48ae9aa2436e06a0682575cac8', 'size': '5208', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'XMNAudio/XMNAudio/XMNAudioPlayer/XMNAudioPlayer.m', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'C', 'bytes': '53274'}, {'name': 'Objective-C', 'bytes': '173227'}]} |
/* GLOBAL STYLES
-------------------------------------------------- */
/* Padding below the footer and lighter body text */
body {
padding-bottom: 40px;
color: #5a5a5a;
}
/* CUSTOMIZE THE NAVBAR
-------------------------------------------------- */
/* Special class on .container surrounding .navbar, used for positioning it into place. */
/* CUSTOMIZE THE CAROUSEL
-------------------------------------------------- */
/* Carousel base class */
.carousel {
height: 500px;
margin-bottom: 60px;
}
/* Since positioning the image, we need to help out the caption */
.carousel-caption {
z-index: 10;
}
/* Declare heights because of positioning of img element */
.carousel .item {
height: 500px;
background-color: #777;
}
.carousel-inner > .item > img {
position: absolute;
top: 0;
left: 0;
min-width: 100%;
height: 500px;
}
/* MARKETING CONTENT
-------------------------------------------------- */
/* Center align the text within the three columns below the carousel */
.marketing .col-lg-4 {
margin-bottom: 20px;
text-align: center;
}
.marketing h2 {
font-weight: normal;
}
.marketing .col-lg-4 p {
margin-right: 10px;
margin-left: 10px;
}
/* Featurettes
------------------------- */
.featurette-divider {
margin: 80px 0; /* Space out the Bootstrap <hr> more */
}
/* Thin out the marketing headings */
.featurette-heading {
font-weight: 300;
line-height: 1;
letter-spacing: -1px;
}
/* RESPONSIVE CSS
-------------------------------------------------- */
@media (min-width: 768px) {
/* Navbar positioning foo */
.navbar-wrapper {
margin-top: 20px;
}
.navbar-wrapper .container {
padding-right: 15px;
padding-left: 15px;
}
.navbar-wrapper .navbar {
padding-right: 0;
padding-left: 0;
}
/* The navbar becomes detached from the top, so we round the corners */
.navbar-wrapper .navbar {
border-radius: 4px;
}
/* Bump up size of carousel content */
.carousel-caption p {
margin-bottom: 20px;
font-size: 21px;
line-height: 1.4;
}
.featurette-heading {
font-size: 50px;
}
}
@media (min-width: 992px) {
.featurette-heading {
margin-top: 120px;
}
}
.navbar-wrapper {
top: 0;
right: 0;
left: 0;
z-index: 20;
}
.navbar-wrapper-home {
position: absolute;
top: 0;
right: 0;
left: 0;
z-index: 20;
}
/* Flip around the padding for proper display in narrow viewports */
.navbar-wrapper-home > .container {
padding-right: 0;
padding-left: 0;
}
.navbar-wrapper-home .navbar {
padding-right: 15px;
padding-left: 15px;
}
.navbar-wrapper-home .navbar .container {
width: auto;
}
@media (min-width: 768px) {
/* Navbar positioning foo */
.navbar-wrapper-home {
margin-top: 20px;
}
.navbar-wrapper-home .container {
padding-right: 15px;
padding-left: 15px;
}
.navbar-wrapper-home .navbar {
padding-right: 0;
padding-left: 0;
}
/* The navbar becomes detached from the top, so we round the corners */
.navbar-wrapper-home .navbar {
border-radius: 4px;
}
}
| {'content_hash': 'f26036324cd3effdd64d514184c492b0', 'timestamp': '', 'source': 'github', 'line_count': 162, 'max_line_length': 90, 'avg_line_length': 18.938271604938272, 'alnum_prop': 0.5811603650586702, 'repo_name': 'zhangzhe/ama-china', 'id': '00f8d4c28f89b000dea9e565e8d391a0df0e2029', 'size': '3068', 'binary': False, 'copies': '1', 'ref': 'refs/heads/develop', 'path': 'app/assets/stylesheets/carousel.css', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '686'}, {'name': 'CoffeeScript', 'bytes': '104'}, {'name': 'HTML', 'bytes': '4886'}, {'name': 'JavaScript', 'bytes': '691'}, {'name': 'Nginx', 'bytes': '622'}, {'name': 'Ruby', 'bytes': '29830'}]} |
class MessageBroadcasterJob < ApplicationJob
queue_as :default
def perform(message)
ActionCable.server.broadcast "messages", { message: render_message(message) }
end
private
def render_message(message)
MessagesController.render(partial: 'message', locals: {message: message}).squish
end
end
| {'content_hash': '57b9c57ea58ec9f37a4db4f601d7f364', 'timestamp': '', 'source': 'github', 'line_count': 13, 'max_line_length': 84, 'avg_line_length': 24.153846153846153, 'alnum_prop': 0.7484076433121019, 'repo_name': 'Hareramrai/instant_messenger', 'id': 'ef51a684faa3524f0aa2573f64ffbad0ae3384d6', 'size': '314', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'app/jobs/message_broadcaster_job.rb', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '2032'}, {'name': 'CoffeeScript', 'bytes': '605'}, {'name': 'HTML', 'bytes': '10023'}, {'name': 'JavaScript', 'bytes': '1790'}, {'name': 'Ruby', 'bytes': '64467'}]} |
// This file is automatically generated.
package adila.db;
/*
* LG P690
*
* DEVICE: gelato_are-xx
* MODEL: LG-P690
*/
final class gelato5fare2dxx {
public static final String DATA = "LG|P690|";
}
| {'content_hash': '0848c3f3a75afcb79076b3e7ce3a7a72', 'timestamp': '', 'source': 'github', 'line_count': 13, 'max_line_length': 49, 'avg_line_length': 15.923076923076923, 'alnum_prop': 0.6666666666666666, 'repo_name': 'karim/adila', 'id': 'b5e6bc4d9f6206c83563421f0cae4caaf5eea8a1', 'size': '207', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'database/src/main/java/adila/db/gelato5fare2dxx.java', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Java', 'bytes': '2903103'}, {'name': 'Prolog', 'bytes': '489'}, {'name': 'Python', 'bytes': '3280'}]} |
using ::testing::ElementsAre;
namespace base {
namespace {
// Object used to test complex object with absl::optional<T> in addition of the
// move semantics.
class TestObject {
public:
enum class State {
DEFAULT_CONSTRUCTED,
VALUE_CONSTRUCTED,
COPY_CONSTRUCTED,
MOVE_CONSTRUCTED,
MOVED_FROM,
COPY_ASSIGNED,
MOVE_ASSIGNED,
SWAPPED,
};
TestObject() : foo_(0), bar_(0.0), state_(State::DEFAULT_CONSTRUCTED) {}
TestObject(int foo, double bar)
: foo_(foo), bar_(bar), state_(State::VALUE_CONSTRUCTED) {}
TestObject(const TestObject& other)
: foo_(other.foo_),
bar_(other.bar_),
state_(State::COPY_CONSTRUCTED),
move_ctors_count_(other.move_ctors_count_) {}
TestObject(TestObject&& other)
: foo_(std::move(other.foo_)),
bar_(std::move(other.bar_)),
state_(State::MOVE_CONSTRUCTED),
move_ctors_count_(other.move_ctors_count_ + 1) {
other.state_ = State::MOVED_FROM;
}
TestObject& operator=(const TestObject& other) {
foo_ = other.foo_;
bar_ = other.bar_;
state_ = State::COPY_ASSIGNED;
move_ctors_count_ = other.move_ctors_count_;
return *this;
}
TestObject& operator=(TestObject&& other) {
foo_ = other.foo_;
bar_ = other.bar_;
state_ = State::MOVE_ASSIGNED;
move_ctors_count_ = other.move_ctors_count_;
other.state_ = State::MOVED_FROM;
return *this;
}
void Swap(TestObject* other) {
using std::swap;
swap(foo_, other->foo_);
swap(bar_, other->bar_);
swap(move_ctors_count_, other->move_ctors_count_);
state_ = State::SWAPPED;
other->state_ = State::SWAPPED;
}
bool operator==(const TestObject& other) const {
return std::tie(foo_, bar_) == std::tie(other.foo_, other.bar_);
}
bool operator!=(const TestObject& other) const { return !(*this == other); }
int foo() const { return foo_; }
State state() const { return state_; }
int move_ctors_count() const { return move_ctors_count_; }
private:
int foo_;
double bar_;
State state_;
int move_ctors_count_ = 0;
};
// Implementing Swappable concept.
void swap(TestObject& lhs, TestObject& rhs) {
lhs.Swap(&rhs);
}
class NonTriviallyDestructible {
public:
~NonTriviallyDestructible() {}
};
class DeletedDefaultConstructor {
public:
DeletedDefaultConstructor() = delete;
DeletedDefaultConstructor(int foo) : foo_(foo) {}
int foo() const { return foo_; }
private:
int foo_;
};
class DeletedCopy {
public:
explicit DeletedCopy(int foo) : foo_(foo) {}
DeletedCopy(const DeletedCopy&) = delete;
DeletedCopy(DeletedCopy&&) = default;
DeletedCopy& operator=(const DeletedCopy&) = delete;
DeletedCopy& operator=(DeletedCopy&&) = default;
int foo() const { return foo_; }
private:
int foo_;
};
class DeletedMove {
public:
explicit DeletedMove(int foo) : foo_(foo) {}
DeletedMove(const DeletedMove&) = default;
DeletedMove(DeletedMove&&) = delete;
DeletedMove& operator=(const DeletedMove&) = default;
DeletedMove& operator=(DeletedMove&&) = delete;
int foo() const { return foo_; }
private:
int foo_;
};
class NonTriviallyDestructibleDeletedCopyConstructor {
public:
explicit NonTriviallyDestructibleDeletedCopyConstructor(int foo)
: foo_(foo) {}
NonTriviallyDestructibleDeletedCopyConstructor(
const NonTriviallyDestructibleDeletedCopyConstructor&) = delete;
NonTriviallyDestructibleDeletedCopyConstructor(
NonTriviallyDestructibleDeletedCopyConstructor&&) = default;
~NonTriviallyDestructibleDeletedCopyConstructor() {}
int foo() const { return foo_; }
private:
int foo_;
};
class DeleteNewOperators {
public:
void* operator new(size_t) = delete;
void* operator new(size_t, void*) = delete;
void* operator new[](size_t) = delete;
void* operator new[](size_t, void*) = delete;
};
class TriviallyDestructibleOverloadAddressOf {
public:
// Unfortunately, since this can be called as part of placement-new (if it
// forgets to call std::addressof), we're uninitialized. So, about the best
// we can do is signal a test failure here if either operator& is called.
TriviallyDestructibleOverloadAddressOf* operator&() {
EXPECT_TRUE(false);
return this;
}
// So we can test the const version of operator->.
const TriviallyDestructibleOverloadAddressOf* operator&() const {
EXPECT_TRUE(false);
return this;
}
void const_method() const {}
void nonconst_method() {}
};
class NonTriviallyDestructibleOverloadAddressOf {
public:
~NonTriviallyDestructibleOverloadAddressOf() {}
NonTriviallyDestructibleOverloadAddressOf* operator&() {
EXPECT_TRUE(false);
return this;
}
};
} // anonymous namespace
static_assert(std::is_trivially_destructible<absl::optional<int>>::value,
"OptionalIsTriviallyDestructible");
static_assert(!std::is_trivially_destructible<
absl::optional<NonTriviallyDestructible>>::value,
"OptionalIsTriviallyDestructible");
TEST(OptionalTest, DefaultConstructor) {
{
constexpr absl::optional<float> o;
EXPECT_FALSE(o);
}
{
absl::optional<std::string> o;
EXPECT_FALSE(o);
}
{
absl::optional<TestObject> o;
EXPECT_FALSE(o);
}
}
TEST(OptionalTest, CopyConstructor) {
{
constexpr absl::optional<float> first(0.1f);
constexpr absl::optional<float> other(first);
EXPECT_TRUE(other);
EXPECT_EQ(other.value(), 0.1f);
EXPECT_EQ(first, other);
}
{
absl::optional<std::string> first("foo");
absl::optional<std::string> other(first);
EXPECT_TRUE(other);
EXPECT_EQ(other.value(), "foo");
EXPECT_EQ(first, other);
}
{
const absl::optional<std::string> first("foo");
absl::optional<std::string> other(first);
EXPECT_TRUE(other);
EXPECT_EQ(other.value(), "foo");
EXPECT_EQ(first, other);
}
{
absl::optional<TestObject> first(TestObject(3, 0.1));
absl::optional<TestObject> other(first);
EXPECT_TRUE(!!other);
EXPECT_TRUE(other.value() == TestObject(3, 0.1));
EXPECT_TRUE(first == other);
}
}
TEST(OptionalTest, ValueConstructor) {
{
constexpr float value = 0.1f;
constexpr absl::optional<float> o(value);
EXPECT_TRUE(o);
EXPECT_EQ(value, o.value());
}
{
std::string value("foo");
absl::optional<std::string> o(value);
EXPECT_TRUE(o);
EXPECT_EQ(value, o.value());
}
{
TestObject value(3, 0.1);
absl::optional<TestObject> o(value);
EXPECT_TRUE(o);
EXPECT_EQ(TestObject::State::COPY_CONSTRUCTED, o->state());
EXPECT_EQ(value, o.value());
}
}
TEST(OptionalTest, MoveConstructor) {
{
constexpr absl::optional<float> first(0.1f);
constexpr absl::optional<float> second(std::move(first));
EXPECT_TRUE(second.has_value());
EXPECT_EQ(second.value(), 0.1f);
EXPECT_TRUE(first.has_value());
}
{
absl::optional<std::string> first("foo");
absl::optional<std::string> second(std::move(first));
EXPECT_TRUE(second.has_value());
EXPECT_EQ("foo", second.value());
EXPECT_TRUE(first.has_value());
}
{
absl::optional<TestObject> first(TestObject(3, 0.1));
absl::optional<TestObject> second(std::move(first));
EXPECT_TRUE(second.has_value());
EXPECT_EQ(TestObject::State::MOVE_CONSTRUCTED, second->state());
EXPECT_TRUE(TestObject(3, 0.1) == second.value());
EXPECT_TRUE(first.has_value());
EXPECT_EQ(TestObject::State::MOVED_FROM, first->state());
}
// Even if copy constructor is deleted, move constructor needs to work.
// Note that it couldn't be constexpr.
{
absl::optional<DeletedCopy> first(absl::in_place, 42);
absl::optional<DeletedCopy> second(std::move(first));
EXPECT_TRUE(second.has_value());
EXPECT_EQ(42, second->foo());
EXPECT_TRUE(first.has_value());
}
{
absl::optional<DeletedMove> first(absl::in_place, 42);
absl::optional<DeletedMove> second(std::move(first));
EXPECT_TRUE(second.has_value());
EXPECT_EQ(42, second->foo());
EXPECT_TRUE(first.has_value());
}
{
absl::optional<NonTriviallyDestructibleDeletedCopyConstructor> first(
absl::in_place, 42);
absl::optional<NonTriviallyDestructibleDeletedCopyConstructor> second(
std::move(first));
EXPECT_TRUE(second.has_value());
EXPECT_EQ(42, second->foo());
EXPECT_TRUE(first.has_value());
}
}
TEST(OptionalTest, MoveValueConstructor) {
{
constexpr float value = 0.1f;
constexpr absl::optional<float> o(std::move(value));
EXPECT_TRUE(o);
EXPECT_EQ(0.1f, o.value());
}
{
float value = 0.1f;
absl::optional<float> o(std::move(value));
EXPECT_TRUE(o);
EXPECT_EQ(0.1f, o.value());
}
{
std::string value("foo");
absl::optional<std::string> o(std::move(value));
EXPECT_TRUE(o);
EXPECT_EQ("foo", o.value());
}
{
TestObject value(3, 0.1);
absl::optional<TestObject> o(std::move(value));
EXPECT_TRUE(o);
EXPECT_EQ(TestObject::State::MOVE_CONSTRUCTED, o->state());
EXPECT_EQ(TestObject(3, 0.1), o.value());
}
}
TEST(OptionalTest, ConvertingCopyConstructor) {
{
absl::optional<int> first(1);
absl::optional<double> second(first);
EXPECT_TRUE(second.has_value());
EXPECT_EQ(1.0, second.value());
}
// Make sure explicit is not marked for convertible case.
{
[[maybe_unused]] absl::optional<int> o(1);
}
}
TEST(OptionalTest, ConvertingMoveConstructor) {
{
absl::optional<int> first(1);
absl::optional<double> second(std::move(first));
EXPECT_TRUE(second.has_value());
EXPECT_EQ(1.0, second.value());
}
// Make sure explicit is not marked for convertible case.
{
[[maybe_unused]] absl::optional<int> o(1);
}
{
class Test1 {
public:
explicit Test1(int foo) : foo_(foo) {}
int foo() const { return foo_; }
private:
int foo_;
};
// Not copyable but convertible from Test1.
class Test2 {
public:
Test2(const Test2&) = delete;
explicit Test2(Test1&& other) : bar_(other.foo()) {}
double bar() const { return bar_; }
private:
double bar_;
};
absl::optional<Test1> first(absl::in_place, 42);
absl::optional<Test2> second(std::move(first));
EXPECT_TRUE(second.has_value());
EXPECT_EQ(42.0, second->bar());
}
}
TEST(OptionalTest, ConstructorForwardArguments) {
{
constexpr absl::optional<float> a(absl::in_place, 0.1f);
EXPECT_TRUE(a);
EXPECT_EQ(0.1f, a.value());
}
{
absl::optional<float> a(absl::in_place, 0.1f);
EXPECT_TRUE(a);
EXPECT_EQ(0.1f, a.value());
}
{
absl::optional<std::string> a(absl::in_place, "foo");
EXPECT_TRUE(a);
EXPECT_EQ("foo", a.value());
}
{
absl::optional<TestObject> a(absl::in_place, 0, 0.1);
EXPECT_TRUE(!!a);
EXPECT_TRUE(TestObject(0, 0.1) == a.value());
}
}
TEST(OptionalTest, ConstructorForwardInitListAndArguments) {
{
absl::optional<std::vector<int>> opt(absl::in_place, {3, 1});
EXPECT_TRUE(opt);
EXPECT_THAT(*opt, ElementsAre(3, 1));
EXPECT_EQ(2u, opt->size());
}
{
absl::optional<std::vector<int>> opt(absl::in_place, {3, 1},
std::allocator<int>());
EXPECT_TRUE(opt);
EXPECT_THAT(*opt, ElementsAre(3, 1));
EXPECT_EQ(2u, opt->size());
}
}
TEST(OptionalTest, ForwardConstructor) {
{
absl::optional<double> a(1);
EXPECT_TRUE(a.has_value());
EXPECT_EQ(1.0, a.value());
}
// Test that default type of 'U' is value_type.
{
struct TestData {
int a;
double b;
bool c;
};
absl::optional<TestData> a({1, 2.0, true});
EXPECT_TRUE(a.has_value());
EXPECT_EQ(1, a->a);
EXPECT_EQ(2.0, a->b);
EXPECT_TRUE(a->c);
}
// If T has a constructor with a param absl::optional<U>, and another ctor
// with a param U, then T(absl::optional<U>) should be used for
// absl::optional<T>(absl::optional<U>) constructor.
{
enum class ParamType {
DEFAULT_CONSTRUCTED,
COPY_CONSTRUCTED,
MOVE_CONSTRUCTED,
INT,
IN_PLACE,
OPTIONAL_INT,
};
struct Test {
Test() : param_type(ParamType::DEFAULT_CONSTRUCTED) {}
Test(const Test& param) : param_type(ParamType::COPY_CONSTRUCTED) {}
Test(Test&& param) : param_type(ParamType::MOVE_CONSTRUCTED) {}
explicit Test(int param) : param_type(ParamType::INT) {}
explicit Test(in_place_t param) : param_type(ParamType::IN_PLACE) {}
explicit Test(absl::optional<int> param)
: param_type(ParamType::OPTIONAL_INT) {}
ParamType param_type;
};
// Overload resolution with copy-conversion constructor.
{
const absl::optional<int> arg(absl::in_place, 1);
absl::optional<Test> testee(arg);
EXPECT_EQ(ParamType::OPTIONAL_INT, testee->param_type);
}
// Overload resolution with move conversion constructor.
{
absl::optional<Test> testee(absl::optional<int>(absl::in_place, 1));
EXPECT_EQ(ParamType::OPTIONAL_INT, testee->param_type);
}
// Default constructor should be used.
{
absl::optional<Test> testee(absl::in_place);
EXPECT_EQ(ParamType::DEFAULT_CONSTRUCTED, testee->param_type);
}
}
{
struct Test {
Test(int a) {} // NOLINT(runtime/explicit)
};
// If T is convertible from U, it is not marked as explicit.
static_assert(std::is_convertible<int, Test>::value,
"Int should be convertible to Test.");
([](absl::optional<Test> param) {})(1);
}
}
TEST(OptionalTest, NulloptConstructor) {
constexpr absl::optional<int> a(absl::nullopt);
EXPECT_FALSE(a);
}
TEST(OptionalTest, AssignValue) {
{
absl::optional<float> a;
EXPECT_FALSE(a);
a = 0.1f;
EXPECT_TRUE(a);
absl::optional<float> b(0.1f);
EXPECT_TRUE(a == b);
}
{
absl::optional<std::string> a;
EXPECT_FALSE(a);
a = std::string("foo");
EXPECT_TRUE(a);
absl::optional<std::string> b(std::string("foo"));
EXPECT_EQ(a, b);
}
{
absl::optional<TestObject> a;
EXPECT_FALSE(!!a);
a = TestObject(3, 0.1);
EXPECT_TRUE(!!a);
absl::optional<TestObject> b(TestObject(3, 0.1));
EXPECT_TRUE(a == b);
}
{
absl::optional<TestObject> a = TestObject(4, 1.0);
EXPECT_TRUE(!!a);
a = TestObject(3, 0.1);
EXPECT_TRUE(!!a);
absl::optional<TestObject> b(TestObject(3, 0.1));
EXPECT_TRUE(a == b);
}
}
TEST(OptionalTest, AssignObject) {
{
absl::optional<float> a;
absl::optional<float> b(0.1f);
a = b;
EXPECT_TRUE(a);
EXPECT_EQ(a.value(), 0.1f);
EXPECT_EQ(a, b);
}
{
absl::optional<std::string> a;
absl::optional<std::string> b("foo");
a = b;
EXPECT_TRUE(a);
EXPECT_EQ(a.value(), "foo");
EXPECT_EQ(a, b);
}
{
absl::optional<TestObject> a;
absl::optional<TestObject> b(TestObject(3, 0.1));
a = b;
EXPECT_TRUE(!!a);
EXPECT_TRUE(a.value() == TestObject(3, 0.1));
EXPECT_TRUE(a == b);
}
{
absl::optional<TestObject> a(TestObject(4, 1.0));
absl::optional<TestObject> b(TestObject(3, 0.1));
a = b;
EXPECT_TRUE(!!a);
EXPECT_TRUE(a.value() == TestObject(3, 0.1));
EXPECT_TRUE(a == b);
}
{
absl::optional<DeletedMove> a(absl::in_place, 42);
absl::optional<DeletedMove> b;
b = a;
EXPECT_TRUE(!!a);
EXPECT_TRUE(!!b);
EXPECT_EQ(a->foo(), b->foo());
}
{
absl::optional<DeletedMove> a(absl::in_place, 42);
absl::optional<DeletedMove> b(absl::in_place, 1);
b = a;
EXPECT_TRUE(!!a);
EXPECT_TRUE(!!b);
EXPECT_EQ(a->foo(), b->foo());
}
// Converting assignment.
{
absl::optional<int> a(absl::in_place, 1);
absl::optional<double> b;
b = a;
EXPECT_TRUE(!!a);
EXPECT_TRUE(!!b);
EXPECT_EQ(1, a.value());
EXPECT_EQ(1.0, b.value());
}
{
absl::optional<int> a(absl::in_place, 42);
absl::optional<double> b(absl::in_place, 1);
b = a;
EXPECT_TRUE(!!a);
EXPECT_TRUE(!!b);
EXPECT_EQ(42, a.value());
EXPECT_EQ(42.0, b.value());
}
{
absl::optional<int> a;
absl::optional<double> b(absl::in_place, 1);
b = a;
EXPECT_FALSE(!!a);
EXPECT_FALSE(!!b);
}
}
TEST(OptionalTest, AssignObject_rvalue) {
{
absl::optional<float> a;
absl::optional<float> b(0.1f);
a = std::move(b);
EXPECT_TRUE(a);
EXPECT_TRUE(b);
EXPECT_EQ(0.1f, a.value());
}
{
absl::optional<std::string> a;
absl::optional<std::string> b("foo");
a = std::move(b);
EXPECT_TRUE(a);
EXPECT_TRUE(b);
EXPECT_EQ("foo", a.value());
}
{
absl::optional<TestObject> a;
absl::optional<TestObject> b(TestObject(3, 0.1));
a = std::move(b);
EXPECT_TRUE(!!a);
EXPECT_TRUE(!!b);
EXPECT_TRUE(TestObject(3, 0.1) == a.value());
EXPECT_EQ(TestObject::State::MOVE_CONSTRUCTED, a->state());
EXPECT_EQ(TestObject::State::MOVED_FROM, b->state());
}
{
absl::optional<TestObject> a(TestObject(4, 1.0));
absl::optional<TestObject> b(TestObject(3, 0.1));
a = std::move(b);
EXPECT_TRUE(!!a);
EXPECT_TRUE(!!b);
EXPECT_TRUE(TestObject(3, 0.1) == a.value());
EXPECT_EQ(TestObject::State::MOVE_ASSIGNED, a->state());
EXPECT_EQ(TestObject::State::MOVED_FROM, b->state());
}
{
absl::optional<DeletedMove> a(absl::in_place, 42);
absl::optional<DeletedMove> b;
b = std::move(a);
EXPECT_TRUE(!!a);
EXPECT_TRUE(!!b);
EXPECT_EQ(42, b->foo());
}
{
absl::optional<DeletedMove> a(absl::in_place, 42);
absl::optional<DeletedMove> b(absl::in_place, 1);
b = std::move(a);
EXPECT_TRUE(!!a);
EXPECT_TRUE(!!b);
EXPECT_EQ(42, b->foo());
}
// Converting assignment.
{
absl::optional<int> a(absl::in_place, 1);
absl::optional<double> b;
b = std::move(a);
EXPECT_TRUE(!!a);
EXPECT_TRUE(!!b);
EXPECT_EQ(1.0, b.value());
}
{
absl::optional<int> a(absl::in_place, 42);
absl::optional<double> b(absl::in_place, 1);
b = std::move(a);
EXPECT_TRUE(!!a);
EXPECT_TRUE(!!b);
EXPECT_EQ(42.0, b.value());
}
{
absl::optional<int> a;
absl::optional<double> b(absl::in_place, 1);
b = std::move(a);
EXPECT_FALSE(!!a);
EXPECT_FALSE(!!b);
}
}
TEST(OptionalTest, AssignNull) {
{
absl::optional<float> a(0.1f);
absl::optional<float> b(0.2f);
a = absl::nullopt;
b = absl::nullopt;
EXPECT_EQ(a, b);
}
{
absl::optional<std::string> a("foo");
absl::optional<std::string> b("bar");
a = absl::nullopt;
b = absl::nullopt;
EXPECT_EQ(a, b);
}
{
absl::optional<TestObject> a(TestObject(3, 0.1));
absl::optional<TestObject> b(TestObject(4, 1.0));
a = absl::nullopt;
b = absl::nullopt;
EXPECT_TRUE(a == b);
}
}
TEST(OptionalTest, AssignOverload) {
struct Test1 {
enum class State {
CONSTRUCTED,
MOVED,
};
State state = State::CONSTRUCTED;
};
// Here, absl::optional<Test2> can be assigned from absl::optional<Test1>. In
// case of move, marks MOVED to Test1 instance.
struct Test2 {
enum class State {
DEFAULT_CONSTRUCTED,
COPY_CONSTRUCTED_FROM_TEST1,
MOVE_CONSTRUCTED_FROM_TEST1,
COPY_ASSIGNED_FROM_TEST1,
MOVE_ASSIGNED_FROM_TEST1,
};
Test2() = default;
explicit Test2(const Test1& test1)
: state(State::COPY_CONSTRUCTED_FROM_TEST1) {}
explicit Test2(Test1&& test1) : state(State::MOVE_CONSTRUCTED_FROM_TEST1) {
test1.state = Test1::State::MOVED;
}
Test2& operator=(const Test1& test1) {
state = State::COPY_ASSIGNED_FROM_TEST1;
return *this;
}
Test2& operator=(Test1&& test1) {
state = State::MOVE_ASSIGNED_FROM_TEST1;
test1.state = Test1::State::MOVED;
return *this;
}
State state = State::DEFAULT_CONSTRUCTED;
};
{
absl::optional<Test1> a(absl::in_place);
absl::optional<Test2> b;
b = a;
EXPECT_TRUE(!!a);
EXPECT_TRUE(!!b);
EXPECT_EQ(Test1::State::CONSTRUCTED, a->state);
EXPECT_EQ(Test2::State::COPY_CONSTRUCTED_FROM_TEST1, b->state);
}
{
absl::optional<Test1> a(absl::in_place);
absl::optional<Test2> b(absl::in_place);
b = a;
EXPECT_TRUE(!!a);
EXPECT_TRUE(!!b);
EXPECT_EQ(Test1::State::CONSTRUCTED, a->state);
EXPECT_EQ(Test2::State::COPY_ASSIGNED_FROM_TEST1, b->state);
}
{
absl::optional<Test1> a(absl::in_place);
absl::optional<Test2> b;
b = std::move(a);
EXPECT_TRUE(!!a);
EXPECT_TRUE(!!b);
EXPECT_EQ(Test1::State::MOVED, a->state);
EXPECT_EQ(Test2::State::MOVE_CONSTRUCTED_FROM_TEST1, b->state);
}
{
absl::optional<Test1> a(absl::in_place);
absl::optional<Test2> b(absl::in_place);
b = std::move(a);
EXPECT_TRUE(!!a);
EXPECT_TRUE(!!b);
EXPECT_EQ(Test1::State::MOVED, a->state);
EXPECT_EQ(Test2::State::MOVE_ASSIGNED_FROM_TEST1, b->state);
}
// Similar to Test2, but Test3 also has copy/move ctor and assign operators
// from absl::optional<Test1>, too. In this case, for a = b where a is
// absl::optional<Test3> and b is absl::optional<Test1>,
// absl::optional<T>::operator=(U&&) where U is absl::optional<Test1> should
// be used rather than absl::optional<T>::operator=(absl::optional<U>&&) where
// U is Test1.
struct Test3 {
enum class State {
DEFAULT_CONSTRUCTED,
COPY_CONSTRUCTED_FROM_TEST1,
MOVE_CONSTRUCTED_FROM_TEST1,
COPY_CONSTRUCTED_FROM_OPTIONAL_TEST1,
MOVE_CONSTRUCTED_FROM_OPTIONAL_TEST1,
COPY_ASSIGNED_FROM_TEST1,
MOVE_ASSIGNED_FROM_TEST1,
COPY_ASSIGNED_FROM_OPTIONAL_TEST1,
MOVE_ASSIGNED_FROM_OPTIONAL_TEST1,
};
Test3() = default;
explicit Test3(const Test1& test1)
: state(State::COPY_CONSTRUCTED_FROM_TEST1) {}
explicit Test3(Test1&& test1) : state(State::MOVE_CONSTRUCTED_FROM_TEST1) {
test1.state = Test1::State::MOVED;
}
explicit Test3(const absl::optional<Test1>& test1)
: state(State::COPY_CONSTRUCTED_FROM_OPTIONAL_TEST1) {}
explicit Test3(absl::optional<Test1>&& test1)
: state(State::MOVE_CONSTRUCTED_FROM_OPTIONAL_TEST1) {
// In the following senarios, given |test1| should always have value.
DCHECK(test1.has_value());
test1->state = Test1::State::MOVED;
}
Test3& operator=(const Test1& test1) {
state = State::COPY_ASSIGNED_FROM_TEST1;
return *this;
}
Test3& operator=(Test1&& test1) {
state = State::MOVE_ASSIGNED_FROM_TEST1;
test1.state = Test1::State::MOVED;
return *this;
}
Test3& operator=(const absl::optional<Test1>& test1) {
state = State::COPY_ASSIGNED_FROM_OPTIONAL_TEST1;
return *this;
}
Test3& operator=(absl::optional<Test1>&& test1) {
state = State::MOVE_ASSIGNED_FROM_OPTIONAL_TEST1;
// In the following senarios, given |test1| should always have value.
DCHECK(test1.has_value());
test1->state = Test1::State::MOVED;
return *this;
}
State state = State::DEFAULT_CONSTRUCTED;
};
{
absl::optional<Test1> a(absl::in_place);
absl::optional<Test3> b;
b = a;
EXPECT_TRUE(!!a);
EXPECT_TRUE(!!b);
EXPECT_EQ(Test1::State::CONSTRUCTED, a->state);
EXPECT_EQ(Test3::State::COPY_CONSTRUCTED_FROM_OPTIONAL_TEST1, b->state);
}
{
absl::optional<Test1> a(absl::in_place);
absl::optional<Test3> b(absl::in_place);
b = a;
EXPECT_TRUE(!!a);
EXPECT_TRUE(!!b);
EXPECT_EQ(Test1::State::CONSTRUCTED, a->state);
EXPECT_EQ(Test3::State::COPY_ASSIGNED_FROM_OPTIONAL_TEST1, b->state);
}
{
absl::optional<Test1> a(absl::in_place);
absl::optional<Test3> b;
b = std::move(a);
EXPECT_TRUE(!!a);
EXPECT_TRUE(!!b);
EXPECT_EQ(Test1::State::MOVED, a->state);
EXPECT_EQ(Test3::State::MOVE_CONSTRUCTED_FROM_OPTIONAL_TEST1, b->state);
}
{
absl::optional<Test1> a(absl::in_place);
absl::optional<Test3> b(absl::in_place);
b = std::move(a);
EXPECT_TRUE(!!a);
EXPECT_TRUE(!!b);
EXPECT_EQ(Test1::State::MOVED, a->state);
EXPECT_EQ(Test3::State::MOVE_ASSIGNED_FROM_OPTIONAL_TEST1, b->state);
}
}
TEST(OptionalTest, OperatorStar) {
{
absl::optional<float> a(0.1f);
EXPECT_EQ(a.value(), *a);
}
{
absl::optional<std::string> a("foo");
EXPECT_EQ(a.value(), *a);
}
{
absl::optional<TestObject> a(TestObject(3, 0.1));
EXPECT_EQ(a.value(), *a);
}
}
TEST(OptionalTest, OperatorStar_rvalue) {
EXPECT_EQ(0.1f, *absl::optional<float>(0.1f));
EXPECT_EQ(std::string("foo"), *absl::optional<std::string>("foo"));
EXPECT_TRUE(TestObject(3, 0.1) ==
*absl::optional<TestObject>(TestObject(3, 0.1)));
}
TEST(OptionalTest, OperatorArrow) {
absl::optional<TestObject> a(TestObject(3, 0.1));
EXPECT_EQ(a->foo(), 3);
}
TEST(OptionalTest, Value_rvalue) {
EXPECT_EQ(0.1f, absl::optional<float>(0.1f).value());
EXPECT_EQ(std::string("foo"), absl::optional<std::string>("foo").value());
EXPECT_TRUE(TestObject(3, 0.1) ==
absl::optional<TestObject>(TestObject(3, 0.1)).value());
}
TEST(OptionalTest, ValueOr) {
{
absl::optional<float> a;
EXPECT_EQ(0.0f, a.value_or(0.0f));
a = 0.1f;
EXPECT_EQ(0.1f, a.value_or(0.0f));
a = absl::nullopt;
EXPECT_EQ(0.0f, a.value_or(0.0f));
}
// value_or() can be constexpr.
{
constexpr absl::optional<int> a(absl::in_place, 1);
constexpr int value = a.value_or(10);
EXPECT_EQ(1, value);
}
{
constexpr absl::optional<int> a;
constexpr int value = a.value_or(10);
EXPECT_EQ(10, value);
}
{
absl::optional<std::string> a;
EXPECT_EQ("bar", a.value_or("bar"));
a = std::string("foo");
EXPECT_EQ(std::string("foo"), a.value_or("bar"));
a = absl::nullopt;
EXPECT_EQ(std::string("bar"), a.value_or("bar"));
}
{
absl::optional<TestObject> a;
EXPECT_TRUE(a.value_or(TestObject(1, 0.3)) == TestObject(1, 0.3));
a = TestObject(3, 0.1);
EXPECT_TRUE(a.value_or(TestObject(1, 0.3)) == TestObject(3, 0.1));
a = absl::nullopt;
EXPECT_TRUE(a.value_or(TestObject(1, 0.3)) == TestObject(1, 0.3));
}
}
TEST(OptionalTest, Swap_bothNoValue) {
absl::optional<TestObject> a, b;
a.swap(b);
EXPECT_FALSE(a);
EXPECT_FALSE(b);
EXPECT_TRUE(TestObject(42, 0.42) == a.value_or(TestObject(42, 0.42)));
EXPECT_TRUE(TestObject(42, 0.42) == b.value_or(TestObject(42, 0.42)));
}
TEST(OptionalTest, Swap_inHasValue) {
absl::optional<TestObject> a(TestObject(1, 0.3));
absl::optional<TestObject> b;
a.swap(b);
EXPECT_FALSE(a);
EXPECT_TRUE(!!b);
EXPECT_TRUE(TestObject(42, 0.42) == a.value_or(TestObject(42, 0.42)));
EXPECT_TRUE(TestObject(1, 0.3) == b.value_or(TestObject(42, 0.42)));
}
TEST(OptionalTest, Swap_outHasValue) {
absl::optional<TestObject> a;
absl::optional<TestObject> b(TestObject(1, 0.3));
a.swap(b);
EXPECT_TRUE(!!a);
EXPECT_FALSE(!!b);
EXPECT_TRUE(TestObject(1, 0.3) == a.value_or(TestObject(42, 0.42)));
EXPECT_TRUE(TestObject(42, 0.42) == b.value_or(TestObject(42, 0.42)));
}
TEST(OptionalTest, Swap_bothValue) {
absl::optional<TestObject> a(TestObject(0, 0.1));
absl::optional<TestObject> b(TestObject(1, 0.3));
a.swap(b);
EXPECT_TRUE(!!a);
EXPECT_TRUE(!!b);
EXPECT_TRUE(TestObject(1, 0.3) == a.value_or(TestObject(42, 0.42)));
EXPECT_TRUE(TestObject(0, 0.1) == b.value_or(TestObject(42, 0.42)));
EXPECT_EQ(TestObject::State::SWAPPED, a->state());
EXPECT_EQ(TestObject::State::SWAPPED, b->state());
}
TEST(OptionalTest, Emplace) {
{
absl::optional<float> a(0.1f);
EXPECT_EQ(0.3f, a.emplace(0.3f));
EXPECT_TRUE(a);
EXPECT_EQ(0.3f, a.value());
}
{
absl::optional<std::string> a("foo");
EXPECT_EQ("bar", a.emplace("bar"));
EXPECT_TRUE(a);
EXPECT_EQ("bar", a.value());
}
{
absl::optional<TestObject> a(TestObject(0, 0.1));
EXPECT_EQ(TestObject(1, 0.2), a.emplace(TestObject(1, 0.2)));
EXPECT_TRUE(!!a);
EXPECT_TRUE(TestObject(1, 0.2) == a.value());
}
{
absl::optional<std::vector<int>> a;
auto& ref = a.emplace({2, 3});
static_assert(std::is_same<std::vector<int>&, decltype(ref)>::value, "");
EXPECT_TRUE(a);
EXPECT_THAT(*a, ElementsAre(2, 3));
EXPECT_EQ(&ref, &*a);
}
{
absl::optional<std::vector<int>> a;
auto& ref = a.emplace({4, 5}, std::allocator<int>());
static_assert(std::is_same<std::vector<int>&, decltype(ref)>::value, "");
EXPECT_TRUE(a);
EXPECT_THAT(*a, ElementsAre(4, 5));
EXPECT_EQ(&ref, &*a);
}
}
TEST(OptionalTest, Equals_TwoEmpty) {
absl::optional<int> a;
absl::optional<int> b;
EXPECT_TRUE(a == b);
}
TEST(OptionalTest, Equals_TwoEquals) {
absl::optional<int> a(1);
absl::optional<int> b(1);
EXPECT_TRUE(a == b);
}
TEST(OptionalTest, Equals_OneEmpty) {
absl::optional<int> a;
absl::optional<int> b(1);
EXPECT_FALSE(a == b);
}
TEST(OptionalTest, Equals_TwoDifferent) {
absl::optional<int> a(0);
absl::optional<int> b(1);
EXPECT_FALSE(a == b);
}
TEST(OptionalTest, Equals_DifferentType) {
absl::optional<int> a(0);
absl::optional<double> b(0);
EXPECT_TRUE(a == b);
}
TEST(OptionalTest, NotEquals_TwoEmpty) {
absl::optional<int> a;
absl::optional<int> b;
EXPECT_FALSE(a != b);
}
TEST(OptionalTest, NotEquals_TwoEquals) {
absl::optional<int> a(1);
absl::optional<int> b(1);
EXPECT_FALSE(a != b);
}
TEST(OptionalTest, NotEquals_OneEmpty) {
absl::optional<int> a;
absl::optional<int> b(1);
EXPECT_TRUE(a != b);
}
TEST(OptionalTest, NotEquals_TwoDifferent) {
absl::optional<int> a(0);
absl::optional<int> b(1);
EXPECT_TRUE(a != b);
}
TEST(OptionalTest, NotEquals_DifferentType) {
absl::optional<int> a(0);
absl::optional<double> b(0.0);
EXPECT_FALSE(a != b);
}
TEST(OptionalTest, Less_LeftEmpty) {
absl::optional<int> l;
absl::optional<int> r(1);
EXPECT_TRUE(l < r);
}
TEST(OptionalTest, Less_RightEmpty) {
absl::optional<int> l(1);
absl::optional<int> r;
EXPECT_FALSE(l < r);
}
TEST(OptionalTest, Less_BothEmpty) {
absl::optional<int> l;
absl::optional<int> r;
EXPECT_FALSE(l < r);
}
TEST(OptionalTest, Less_BothValues) {
{
absl::optional<int> l(1);
absl::optional<int> r(2);
EXPECT_TRUE(l < r);
}
{
absl::optional<int> l(2);
absl::optional<int> r(1);
EXPECT_FALSE(l < r);
}
{
absl::optional<int> l(1);
absl::optional<int> r(1);
EXPECT_FALSE(l < r);
}
}
TEST(OptionalTest, Less_DifferentType) {
absl::optional<int> l(1);
absl::optional<double> r(2.0);
EXPECT_TRUE(l < r);
}
TEST(OptionalTest, LessEq_LeftEmpty) {
absl::optional<int> l;
absl::optional<int> r(1);
EXPECT_TRUE(l <= r);
}
TEST(OptionalTest, LessEq_RightEmpty) {
absl::optional<int> l(1);
absl::optional<int> r;
EXPECT_FALSE(l <= r);
}
TEST(OptionalTest, LessEq_BothEmpty) {
absl::optional<int> l;
absl::optional<int> r;
EXPECT_TRUE(l <= r);
}
TEST(OptionalTest, LessEq_BothValues) {
{
absl::optional<int> l(1);
absl::optional<int> r(2);
EXPECT_TRUE(l <= r);
}
{
absl::optional<int> l(2);
absl::optional<int> r(1);
EXPECT_FALSE(l <= r);
}
{
absl::optional<int> l(1);
absl::optional<int> r(1);
EXPECT_TRUE(l <= r);
}
}
TEST(OptionalTest, LessEq_DifferentType) {
absl::optional<int> l(1);
absl::optional<double> r(2.0);
EXPECT_TRUE(l <= r);
}
TEST(OptionalTest, Greater_BothEmpty) {
absl::optional<int> l;
absl::optional<int> r;
EXPECT_FALSE(l > r);
}
TEST(OptionalTest, Greater_LeftEmpty) {
absl::optional<int> l;
absl::optional<int> r(1);
EXPECT_FALSE(l > r);
}
TEST(OptionalTest, Greater_RightEmpty) {
absl::optional<int> l(1);
absl::optional<int> r;
EXPECT_TRUE(l > r);
}
TEST(OptionalTest, Greater_BothValue) {
{
absl::optional<int> l(1);
absl::optional<int> r(2);
EXPECT_FALSE(l > r);
}
{
absl::optional<int> l(2);
absl::optional<int> r(1);
EXPECT_TRUE(l > r);
}
{
absl::optional<int> l(1);
absl::optional<int> r(1);
EXPECT_FALSE(l > r);
}
}
TEST(OptionalTest, Greater_DifferentType) {
absl::optional<int> l(1);
absl::optional<double> r(2.0);
EXPECT_FALSE(l > r);
}
TEST(OptionalTest, GreaterEq_BothEmpty) {
absl::optional<int> l;
absl::optional<int> r;
EXPECT_TRUE(l >= r);
}
TEST(OptionalTest, GreaterEq_LeftEmpty) {
absl::optional<int> l;
absl::optional<int> r(1);
EXPECT_FALSE(l >= r);
}
TEST(OptionalTest, GreaterEq_RightEmpty) {
absl::optional<int> l(1);
absl::optional<int> r;
EXPECT_TRUE(l >= r);
}
TEST(OptionalTest, GreaterEq_BothValue) {
{
absl::optional<int> l(1);
absl::optional<int> r(2);
EXPECT_FALSE(l >= r);
}
{
absl::optional<int> l(2);
absl::optional<int> r(1);
EXPECT_TRUE(l >= r);
}
{
absl::optional<int> l(1);
absl::optional<int> r(1);
EXPECT_TRUE(l >= r);
}
}
TEST(OptionalTest, GreaterEq_DifferentType) {
absl::optional<int> l(1);
absl::optional<double> r(2.0);
EXPECT_FALSE(l >= r);
}
TEST(OptionalTest, OptNullEq) {
{
absl::optional<int> opt;
EXPECT_TRUE(opt == absl::nullopt);
}
{
absl::optional<int> opt(1);
EXPECT_FALSE(opt == absl::nullopt);
}
}
TEST(OptionalTest, NullOptEq) {
{
absl::optional<int> opt;
EXPECT_TRUE(absl::nullopt == opt);
}
{
absl::optional<int> opt(1);
EXPECT_FALSE(absl::nullopt == opt);
}
}
TEST(OptionalTest, OptNullNotEq) {
{
absl::optional<int> opt;
EXPECT_FALSE(opt != absl::nullopt);
}
{
absl::optional<int> opt(1);
EXPECT_TRUE(opt != absl::nullopt);
}
}
TEST(OptionalTest, NullOptNotEq) {
{
absl::optional<int> opt;
EXPECT_FALSE(absl::nullopt != opt);
}
{
absl::optional<int> opt(1);
EXPECT_TRUE(absl::nullopt != opt);
}
}
TEST(OptionalTest, OptNullLower) {
{
absl::optional<int> opt;
EXPECT_FALSE(opt < absl::nullopt);
}
{
absl::optional<int> opt(1);
EXPECT_FALSE(opt < absl::nullopt);
}
}
TEST(OptionalTest, NullOptLower) {
{
absl::optional<int> opt;
EXPECT_FALSE(absl::nullopt < opt);
}
{
absl::optional<int> opt(1);
EXPECT_TRUE(absl::nullopt < opt);
}
}
TEST(OptionalTest, OptNullLowerEq) {
{
absl::optional<int> opt;
EXPECT_TRUE(opt <= absl::nullopt);
}
{
absl::optional<int> opt(1);
EXPECT_FALSE(opt <= absl::nullopt);
}
}
TEST(OptionalTest, NullOptLowerEq) {
{
absl::optional<int> opt;
EXPECT_TRUE(absl::nullopt <= opt);
}
{
absl::optional<int> opt(1);
EXPECT_TRUE(absl::nullopt <= opt);
}
}
TEST(OptionalTest, OptNullGreater) {
{
absl::optional<int> opt;
EXPECT_FALSE(opt > absl::nullopt);
}
{
absl::optional<int> opt(1);
EXPECT_TRUE(opt > absl::nullopt);
}
}
TEST(OptionalTest, NullOptGreater) {
{
absl::optional<int> opt;
EXPECT_FALSE(absl::nullopt > opt);
}
{
absl::optional<int> opt(1);
EXPECT_FALSE(absl::nullopt > opt);
}
}
TEST(OptionalTest, OptNullGreaterEq) {
{
absl::optional<int> opt;
EXPECT_TRUE(opt >= absl::nullopt);
}
{
absl::optional<int> opt(1);
EXPECT_TRUE(opt >= absl::nullopt);
}
}
TEST(OptionalTest, NullOptGreaterEq) {
{
absl::optional<int> opt;
EXPECT_TRUE(absl::nullopt >= opt);
}
{
absl::optional<int> opt(1);
EXPECT_FALSE(absl::nullopt >= opt);
}
}
TEST(OptionalTest, ValueEq_Empty) {
absl::optional<int> opt;
EXPECT_FALSE(opt == 1);
}
TEST(OptionalTest, ValueEq_NotEmpty) {
{
absl::optional<int> opt(0);
EXPECT_FALSE(opt == 1);
}
{
absl::optional<int> opt(1);
EXPECT_TRUE(opt == 1);
}
}
TEST(OptionalTest, ValueEq_DifferentType) {
absl::optional<int> opt(0);
EXPECT_TRUE(opt == 0.0);
}
TEST(OptionalTest, EqValue_Empty) {
absl::optional<int> opt;
EXPECT_FALSE(1 == opt);
}
TEST(OptionalTest, EqValue_NotEmpty) {
{
absl::optional<int> opt(0);
EXPECT_FALSE(1 == opt);
}
{
absl::optional<int> opt(1);
EXPECT_TRUE(1 == opt);
}
}
TEST(OptionalTest, EqValue_DifferentType) {
absl::optional<int> opt(0);
EXPECT_TRUE(0.0 == opt);
}
TEST(OptionalTest, ValueNotEq_Empty) {
absl::optional<int> opt;
EXPECT_TRUE(opt != 1);
}
TEST(OptionalTest, ValueNotEq_NotEmpty) {
{
absl::optional<int> opt(0);
EXPECT_TRUE(opt != 1);
}
{
absl::optional<int> opt(1);
EXPECT_FALSE(opt != 1);
}
}
TEST(OptionalTest, ValueNotEq_DifferentType) {
absl::optional<int> opt(0);
EXPECT_FALSE(opt != 0.0);
}
TEST(OptionalTest, NotEqValue_Empty) {
absl::optional<int> opt;
EXPECT_TRUE(1 != opt);
}
TEST(OptionalTest, NotEqValue_NotEmpty) {
{
absl::optional<int> opt(0);
EXPECT_TRUE(1 != opt);
}
{
absl::optional<int> opt(1);
EXPECT_FALSE(1 != opt);
}
}
TEST(OptionalTest, NotEqValue_DifferentType) {
absl::optional<int> opt(0);
EXPECT_FALSE(0.0 != opt);
}
TEST(OptionalTest, ValueLess_Empty) {
absl::optional<int> opt;
EXPECT_TRUE(opt < 1);
}
TEST(OptionalTest, ValueLess_NotEmpty) {
{
absl::optional<int> opt(0);
EXPECT_TRUE(opt < 1);
}
{
absl::optional<int> opt(1);
EXPECT_FALSE(opt < 1);
}
{
absl::optional<int> opt(2);
EXPECT_FALSE(opt < 1);
}
}
TEST(OptionalTest, ValueLess_DifferentType) {
absl::optional<int> opt(0);
EXPECT_TRUE(opt < 1.0);
}
TEST(OptionalTest, LessValue_Empty) {
absl::optional<int> opt;
EXPECT_FALSE(1 < opt);
}
TEST(OptionalTest, LessValue_NotEmpty) {
{
absl::optional<int> opt(0);
EXPECT_FALSE(1 < opt);
}
{
absl::optional<int> opt(1);
EXPECT_FALSE(1 < opt);
}
{
absl::optional<int> opt(2);
EXPECT_TRUE(1 < opt);
}
}
TEST(OptionalTest, LessValue_DifferentType) {
absl::optional<int> opt(0);
EXPECT_FALSE(0.0 < opt);
}
TEST(OptionalTest, ValueLessEq_Empty) {
absl::optional<int> opt;
EXPECT_TRUE(opt <= 1);
}
TEST(OptionalTest, ValueLessEq_NotEmpty) {
{
absl::optional<int> opt(0);
EXPECT_TRUE(opt <= 1);
}
{
absl::optional<int> opt(1);
EXPECT_TRUE(opt <= 1);
}
{
absl::optional<int> opt(2);
EXPECT_FALSE(opt <= 1);
}
}
TEST(OptionalTest, ValueLessEq_DifferentType) {
absl::optional<int> opt(0);
EXPECT_TRUE(opt <= 0.0);
}
TEST(OptionalTest, LessEqValue_Empty) {
absl::optional<int> opt;
EXPECT_FALSE(1 <= opt);
}
TEST(OptionalTest, LessEqValue_NotEmpty) {
{
absl::optional<int> opt(0);
EXPECT_FALSE(1 <= opt);
}
{
absl::optional<int> opt(1);
EXPECT_TRUE(1 <= opt);
}
{
absl::optional<int> opt(2);
EXPECT_TRUE(1 <= opt);
}
}
TEST(OptionalTest, LessEqValue_DifferentType) {
absl::optional<int> opt(0);
EXPECT_TRUE(0.0 <= opt);
}
TEST(OptionalTest, ValueGreater_Empty) {
absl::optional<int> opt;
EXPECT_FALSE(opt > 1);
}
TEST(OptionalTest, ValueGreater_NotEmpty) {
{
absl::optional<int> opt(0);
EXPECT_FALSE(opt > 1);
}
{
absl::optional<int> opt(1);
EXPECT_FALSE(opt > 1);
}
{
absl::optional<int> opt(2);
EXPECT_TRUE(opt > 1);
}
}
TEST(OptionalTest, ValueGreater_DifferentType) {
absl::optional<int> opt(0);
EXPECT_FALSE(opt > 0.0);
}
TEST(OptionalTest, GreaterValue_Empty) {
absl::optional<int> opt;
EXPECT_TRUE(1 > opt);
}
TEST(OptionalTest, GreaterValue_NotEmpty) {
{
absl::optional<int> opt(0);
EXPECT_TRUE(1 > opt);
}
{
absl::optional<int> opt(1);
EXPECT_FALSE(1 > opt);
}
{
absl::optional<int> opt(2);
EXPECT_FALSE(1 > opt);
}
}
TEST(OptionalTest, GreaterValue_DifferentType) {
absl::optional<int> opt(0);
EXPECT_FALSE(0.0 > opt);
}
TEST(OptionalTest, ValueGreaterEq_Empty) {
absl::optional<int> opt;
EXPECT_FALSE(opt >= 1);
}
TEST(OptionalTest, ValueGreaterEq_NotEmpty) {
{
absl::optional<int> opt(0);
EXPECT_FALSE(opt >= 1);
}
{
absl::optional<int> opt(1);
EXPECT_TRUE(opt >= 1);
}
{
absl::optional<int> opt(2);
EXPECT_TRUE(opt >= 1);
}
}
TEST(OptionalTest, ValueGreaterEq_DifferentType) {
absl::optional<int> opt(0);
EXPECT_TRUE(opt <= 0.0);
}
TEST(OptionalTest, GreaterEqValue_Empty) {
absl::optional<int> opt;
EXPECT_TRUE(1 >= opt);
}
TEST(OptionalTest, GreaterEqValue_NotEmpty) {
{
absl::optional<int> opt(0);
EXPECT_TRUE(1 >= opt);
}
{
absl::optional<int> opt(1);
EXPECT_TRUE(1 >= opt);
}
{
absl::optional<int> opt(2);
EXPECT_FALSE(1 >= opt);
}
}
TEST(OptionalTest, GreaterEqValue_DifferentType) {
absl::optional<int> opt(0);
EXPECT_TRUE(0.0 >= opt);
}
TEST(OptionalTest, NotEquals) {
{
absl::optional<float> a(0.1f);
absl::optional<float> b(0.2f);
EXPECT_NE(a, b);
}
{
absl::optional<std::string> a("foo");
absl::optional<std::string> b("bar");
EXPECT_NE(a, b);
}
{
absl::optional<int> a(1);
absl::optional<double> b(2);
EXPECT_NE(a, b);
}
{
absl::optional<TestObject> a(TestObject(3, 0.1));
absl::optional<TestObject> b(TestObject(4, 1.0));
EXPECT_TRUE(a != b);
}
}
TEST(OptionalTest, NotEqualsNull) {
{
absl::optional<float> a(0.1f);
absl::optional<float> b(0.1f);
b = absl::nullopt;
EXPECT_NE(a, b);
}
{
absl::optional<std::string> a("foo");
absl::optional<std::string> b("foo");
b = absl::nullopt;
EXPECT_NE(a, b);
}
{
absl::optional<TestObject> a(TestObject(3, 0.1));
absl::optional<TestObject> b(TestObject(3, 0.1));
b = absl::nullopt;
EXPECT_TRUE(a != b);
}
}
TEST(OptionalTest, MakeOptional) {
{
absl::optional<float> o = absl::make_optional(32.f);
EXPECT_TRUE(o);
EXPECT_EQ(32.f, *o);
float value = 3.f;
o = absl::make_optional(std::move(value));
EXPECT_TRUE(o);
EXPECT_EQ(3.f, *o);
}
{
absl::optional<std::string> o = absl::make_optional(std::string("foo"));
EXPECT_TRUE(o);
EXPECT_EQ("foo", *o);
std::string value = "bar";
o = absl::make_optional(std::move(value));
EXPECT_TRUE(o);
EXPECT_EQ(std::string("bar"), *o);
}
{
absl::optional<TestObject> o = absl::make_optional(TestObject(3, 0.1));
EXPECT_TRUE(!!o);
EXPECT_TRUE(TestObject(3, 0.1) == *o);
TestObject value = TestObject(0, 0.42);
o = absl::make_optional(std::move(value));
EXPECT_TRUE(!!o);
EXPECT_TRUE(TestObject(0, 0.42) == *o);
EXPECT_EQ(TestObject::State::MOVED_FROM, value.state());
EXPECT_EQ(TestObject::State::MOVE_ASSIGNED, o->state());
EXPECT_EQ(TestObject::State::MOVE_CONSTRUCTED,
absl::make_optional(std::move(value))->state());
}
{
struct Test {
Test(int a, double b, bool c) : a(a), b(b), c(c) {}
int a;
double b;
bool c;
};
absl::optional<Test> o = absl::make_optional<Test>(1, 2.0, true);
EXPECT_TRUE(!!o);
EXPECT_EQ(1, o->a);
EXPECT_EQ(2.0, o->b);
EXPECT_TRUE(o->c);
}
{
auto str1 = absl::make_optional<std::string>({'1', '2', '3'});
EXPECT_EQ("123", *str1);
auto str2 = absl::make_optional<std::string>({'a', 'b', 'c'},
std::allocator<char>());
EXPECT_EQ("abc", *str2);
}
}
TEST(OptionalTest, NonMemberSwap_bothNoValue) {
absl::optional<TestObject> a, b;
absl::swap(a, b);
EXPECT_FALSE(!!a);
EXPECT_FALSE(!!b);
EXPECT_TRUE(TestObject(42, 0.42) == a.value_or(TestObject(42, 0.42)));
EXPECT_TRUE(TestObject(42, 0.42) == b.value_or(TestObject(42, 0.42)));
}
TEST(OptionalTest, NonMemberSwap_inHasValue) {
absl::optional<TestObject> a(TestObject(1, 0.3));
absl::optional<TestObject> b;
absl::swap(a, b);
EXPECT_FALSE(!!a);
EXPECT_TRUE(!!b);
EXPECT_TRUE(TestObject(42, 0.42) == a.value_or(TestObject(42, 0.42)));
EXPECT_TRUE(TestObject(1, 0.3) == b.value_or(TestObject(42, 0.42)));
}
TEST(OptionalTest, NonMemberSwap_outHasValue) {
absl::optional<TestObject> a;
absl::optional<TestObject> b(TestObject(1, 0.3));
absl::swap(a, b);
EXPECT_TRUE(!!a);
EXPECT_FALSE(!!b);
EXPECT_TRUE(TestObject(1, 0.3) == a.value_or(TestObject(42, 0.42)));
EXPECT_TRUE(TestObject(42, 0.42) == b.value_or(TestObject(42, 0.42)));
}
TEST(OptionalTest, NonMemberSwap_bothValue) {
absl::optional<TestObject> a(TestObject(0, 0.1));
absl::optional<TestObject> b(TestObject(1, 0.3));
absl::swap(a, b);
EXPECT_TRUE(!!a);
EXPECT_TRUE(!!b);
EXPECT_TRUE(TestObject(1, 0.3) == a.value_or(TestObject(42, 0.42)));
EXPECT_TRUE(TestObject(0, 0.1) == b.value_or(TestObject(42, 0.42)));
EXPECT_EQ(TestObject::State::SWAPPED, a->state());
EXPECT_EQ(TestObject::State::SWAPPED, b->state());
}
TEST(OptionalTest, Hash_OptionalReflectsInternal) {
{
std::hash<int> int_hash;
std::hash<absl::optional<int>> opt_int_hash;
EXPECT_EQ(int_hash(1), opt_int_hash(absl::optional<int>(1)));
}
{
std::hash<std::string> str_hash;
std::hash<absl::optional<std::string>> opt_str_hash;
EXPECT_EQ(str_hash(std::string("foobar")),
opt_str_hash(absl::optional<std::string>(std::string("foobar"))));
}
}
TEST(OptionalTest, Hash_NullOptEqualsNullOpt) {
std::hash<absl::optional<int>> opt_int_hash;
std::hash<absl::optional<std::string>> opt_str_hash;
EXPECT_EQ(opt_str_hash(absl::optional<std::string>()),
opt_int_hash(absl::optional<int>()));
}
TEST(OptionalTest, Hash_UseInSet) {
std::set<absl::optional<int>> setOptInt;
EXPECT_EQ(setOptInt.end(), setOptInt.find(42));
setOptInt.insert(absl::optional<int>(3));
EXPECT_EQ(setOptInt.end(), setOptInt.find(42));
EXPECT_NE(setOptInt.end(), setOptInt.find(3));
}
TEST(OptionalTest, HasValue) {
absl::optional<int> a;
EXPECT_FALSE(a.has_value());
a = 42;
EXPECT_TRUE(a.has_value());
a = absl::nullopt;
EXPECT_FALSE(a.has_value());
a = 0;
EXPECT_TRUE(a.has_value());
a = absl::optional<int>();
EXPECT_FALSE(a.has_value());
}
TEST(OptionalTest, Reset_int) {
absl::optional<int> a(0);
EXPECT_TRUE(a.has_value());
EXPECT_EQ(0, a.value());
a.reset();
EXPECT_FALSE(a.has_value());
EXPECT_EQ(-1, a.value_or(-1));
}
TEST(OptionalTest, Reset_Object) {
absl::optional<TestObject> a(TestObject(0, 0.1));
EXPECT_TRUE(a.has_value());
EXPECT_EQ(TestObject(0, 0.1), a.value());
a.reset();
EXPECT_FALSE(a.has_value());
EXPECT_EQ(TestObject(42, 0.0), a.value_or(TestObject(42, 0.0)));
}
TEST(OptionalTest, Reset_NoOp) {
absl::optional<int> a;
EXPECT_FALSE(a.has_value());
a.reset();
EXPECT_FALSE(a.has_value());
}
TEST(OptionalTest, AssignFromRValue) {
absl::optional<TestObject> a;
EXPECT_FALSE(a.has_value());
TestObject obj;
a = std::move(obj);
EXPECT_TRUE(a.has_value());
EXPECT_EQ(1, a->move_ctors_count());
}
TEST(OptionalTest, DontCallDefaultCtor) {
absl::optional<DeletedDefaultConstructor> a;
EXPECT_FALSE(a.has_value());
a = absl::make_optional<DeletedDefaultConstructor>(42);
EXPECT_TRUE(a.has_value());
EXPECT_EQ(42, a->foo());
}
TEST(OptionalTest, DontCallNewMemberFunction) {
absl::optional<DeleteNewOperators> a;
EXPECT_FALSE(a.has_value());
a = DeleteNewOperators();
EXPECT_TRUE(a.has_value());
}
TEST(OptionalTest, DereferencingNoValueCrashes) {
class C {
public:
void Method() const {}
};
{
const absl::optional<C> const_optional;
EXPECT_DEATH_IF_SUPPORTED(const_optional.value(), "");
EXPECT_DEATH_IF_SUPPORTED(const_optional->Method(), "");
EXPECT_DEATH_IF_SUPPORTED(*const_optional, "");
EXPECT_DEATH_IF_SUPPORTED(*std::move(const_optional), "");
}
{
absl::optional<C> non_const_optional;
EXPECT_DEATH_IF_SUPPORTED(non_const_optional.value(), "");
EXPECT_DEATH_IF_SUPPORTED(non_const_optional->Method(), "");
EXPECT_DEATH_IF_SUPPORTED(*non_const_optional, "");
EXPECT_DEATH_IF_SUPPORTED(*std::move(non_const_optional), "");
}
}
TEST(OptionalTest, Noexcept) {
// Trivial copy ctor, non-trivial move ctor, nothrow move assign.
struct Test1 {
Test1(const Test1&) = default;
Test1(Test1&&) {}
Test1& operator=(Test1&&) = default;
};
// Non-trivial copy ctor, trivial move ctor, throw move assign.
struct Test2 {
Test2(const Test2&) {}
Test2(Test2&&) = default;
Test2& operator=(Test2&&) { return *this; }
};
// Trivial copy ctor, non-trivial nothrow move ctor.
struct Test3 {
Test3(const Test3&) = default;
Test3(Test3&&) noexcept {}
};
// Non-trivial copy ctor, non-trivial nothrow move ctor.
struct Test4 {
Test4(const Test4&) {}
Test4(Test4&&) noexcept {}
};
// Non-trivial copy ctor, non-trivial move ctor.
struct Test5 {
Test5(const Test5&) {}
Test5(Test5&&) {}
};
static_assert(
noexcept(absl::optional<int>(std::declval<absl::optional<int>>())),
"move constructor for noexcept move-constructible T must be noexcept "
"(trivial copy, trivial move)");
static_assert(
!noexcept(absl::optional<Test1>(std::declval<absl::optional<Test1>>())),
"move constructor for non-noexcept move-constructible T must not be "
"noexcept (trivial copy)");
static_assert(
noexcept(absl::optional<Test2>(std::declval<absl::optional<Test2>>())),
"move constructor for noexcept move-constructible T must be noexcept "
"(non-trivial copy, trivial move)");
static_assert(
noexcept(absl::optional<Test3>(std::declval<absl::optional<Test3>>())),
"move constructor for noexcept move-constructible T must be noexcept "
"(trivial copy, non-trivial move)");
static_assert(
noexcept(absl::optional<Test4>(std::declval<absl::optional<Test4>>())),
"move constructor for noexcept move-constructible T must be noexcept "
"(non-trivial copy, non-trivial move)");
static_assert(
!noexcept(absl::optional<Test5>(std::declval<absl::optional<Test5>>())),
"move constructor for non-noexcept move-constructible T must not be "
"noexcept (non-trivial copy)");
static_assert(noexcept(std::declval<absl::optional<int>>() =
std::declval<absl::optional<int>>()),
"move assign for noexcept move-constructible/move-assignable T "
"must be noexcept");
static_assert(
!noexcept(std::declval<absl::optional<Test1>>() =
std::declval<absl::optional<Test1>>()),
"move assign for non-noexcept move-constructible T must not be noexcept");
static_assert(
!noexcept(std::declval<absl::optional<Test2>>() =
std::declval<absl::optional<Test2>>()),
"move assign for non-noexcept move-assignable T must not be noexcept");
}
TEST(OptionalTest, OverrideAddressOf) {
// Objects with an overloaded address-of should not trigger the overload for
// arrow or copy assignment.
static_assert(std::is_trivially_destructible<
TriviallyDestructibleOverloadAddressOf>::value,
"Trivially...AddressOf must be trivially destructible.");
absl::optional<TriviallyDestructibleOverloadAddressOf> optional;
TriviallyDestructibleOverloadAddressOf n;
optional = n;
// operator->() should not call address-of either, for either const or non-
// const calls. It's not strictly necessary that we call a nonconst method
// to test the non-const operator->(), but it makes it very clear that the
// compiler can't chose the const operator->().
optional->nonconst_method();
const auto& const_optional = optional;
const_optional->const_method();
static_assert(!std::is_trivially_destructible<
NonTriviallyDestructibleOverloadAddressOf>::value,
"NotTrivially...AddressOf must not be trivially destructible.");
absl::optional<NonTriviallyDestructibleOverloadAddressOf> nontrivial_optional;
NonTriviallyDestructibleOverloadAddressOf n1;
nontrivial_optional = n1;
}
} // namespace base
| {'content_hash': '2e837b2de30c08f52fe0a1e9f6881c07', 'timestamp': '', 'source': 'github', 'line_count': 2247, 'max_line_length': 80, 'avg_line_length': 23.0925678682688, 'alnum_prop': 0.6164890439206768, 'repo_name': 'scheib/chromium', 'id': '1511465fc332f758e5072ab861cd037d34ed4abe', 'size': '52365', 'binary': False, 'copies': '1', 'ref': 'refs/heads/main', 'path': 'base/optional_unittest.cc', 'mode': '33188', 'license': 'bsd-3-clause', 'language': []} |
<?php
namespace App\Bots\Commands\RsvpBot;
use Telegram\Bot\Actions;
use Telegram\Bot\Commands\Command;
use Telegram\Bot\Objects\Update;
use App\Bots\UtilityClasses\RsvpBotUtility;
use Illuminate\Support\Facades\Redis;
class CancelCommand extends Command
{
/**
* @var string Command Name
*/
protected $name = "cancel";
/**
* @var string Command Description
*/
protected $description = "Cancel the current action process";
/**
* @inheritdoc
*/
public function handle($arguments)
{
// This will send a message using `sendMessage` method behind the scenes to
// the user/chat id who triggered this command.
// `replyWith<Message|Photo|Audio|Video|Voice|Document|Sticker|Location|ChatAction>()` all the available methods are dynamically
// handled when you replace `send<Method>` with `replyWith` and use the same parameters - except chat_id does NOT need to be included in the array.
// This will update the chat status to typing...
$this->replyWithChatAction(['action' => Actions::TYPING]);
$update = $this->getUpdate();
$text = $this->replyToUser($update);
$fromUser = RsvpBotUtility::retrieveFromUser($update);
if (Redis::exists($fromUser->getId())) {
Redis::del($fromUser->getId());
}
// This will prepare a list of available commands and send the user.
// First, Get an array of all registered commands
// They'll be in 'command-name' => 'Command Handler Class' format.
// Reply with the commands list
$forceReply = $this->getTelegram()->forceReply(['force_reply' => false, 'selective' => true]);
$this->replyWithMessage(['text' => $text, 'reply_to_message_id' => $this->getUpdate()->getMessage()->getMessageId(), 'reply_markup' => $forceReply]);
}
public function replyToUser(Update $update)
{
return 'Action cancelled. Thank you for using AttendAnEvent. Use /start to see what commands you can do.';
}
}
| {'content_hash': '8ead52a35e84a8815a38ef9176a7af19', 'timestamp': '', 'source': 'github', 'line_count': 59, 'max_line_length': 157, 'avg_line_length': 34.76271186440678, 'alnum_prop': 0.6509019990248659, 'repo_name': 'AikChun/sg-haze-check-and-rsvp-bot', 'id': 'bb9fb17a118b180b025360a2a48ea602c8457f34', 'size': '2051', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'app/Bots/Commands/RsvpBot/CancelCommand.php', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'ApacheConf', 'bytes': '553'}, {'name': 'HTML', 'bytes': '2151'}, {'name': 'JavaScript', 'bytes': '503'}, {'name': 'PHP', 'bytes': '163433'}]} |
/**
* Oplets that control the flow of tuples.
*/
package org.apache.edgent.oplet.plumbing; | {'content_hash': '6a11612a13084e55f36fb713b67d73ea', 'timestamp': '', 'source': 'github', 'line_count': 5, 'max_line_length': 42, 'avg_line_length': 18.6, 'alnum_prop': 0.7204301075268817, 'repo_name': 'dlaboss/incubator-quarks', 'id': 'ee11cbd1a3e341d5c9ee36c147d77110c906b77f', 'size': '853', 'binary': False, 'copies': '7', 'ref': 'refs/heads/master', 'path': 'api/oplet/src/main/java/org/apache/edgent/oplet/plumbing/package-info.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Batchfile', 'bytes': '3843'}, {'name': 'CSS', 'bytes': '3530'}, {'name': 'HTML', 'bytes': '165520'}, {'name': 'Java', 'bytes': '1732611'}, {'name': 'JavaScript', 'bytes': '93305'}, {'name': 'Shell', 'bytes': '24467'}]} |
//=============================================================================
// Includes
//=============================================================================
#include "CAAudioBufferList.h"
#include "CADebugMacros.h"
#include "CALogMacros.h"
#include <stdlib.h>
#include <string.h>
//=============================================================================
// CAAudioBufferList
//=============================================================================
AudioBufferList* CAAudioBufferList::Create(UInt32 inNumberBuffers)
{
UInt32 theSize = CalculateByteSize(inNumberBuffers);
AudioBufferList* theAnswer = static_cast<AudioBufferList*>(calloc(1, theSize));
if(theAnswer != NULL)
{
theAnswer->mNumberBuffers = inNumberBuffers;
}
return theAnswer;
}
void CAAudioBufferList::Destroy(AudioBufferList* inBufferList)
{
free(inBufferList);
}
UInt32 CAAudioBufferList::CalculateByteSize(UInt32 inNumberBuffers)
{
UInt32 theSize = SizeOf32(AudioBufferList) - SizeOf32(AudioBuffer);
theSize += inNumberBuffers * SizeOf32(AudioBuffer);
return theSize;
}
UInt32 CAAudioBufferList::GetTotalNumberChannels(const AudioBufferList& inBufferList)
{
UInt32 theAnswer = 0;
for(UInt32 theIndex = 0; theIndex < inBufferList.mNumberBuffers; ++theIndex)
{
theAnswer += inBufferList.mBuffers[theIndex].mNumberChannels;
}
return theAnswer;
}
bool CAAudioBufferList::GetBufferForChannel(const AudioBufferList& inBufferList, UInt32 inChannel, UInt32& outBufferNumber, UInt32& outBufferChannel)
{
bool theAnswer = false;
UInt32 theIndex = 0;
while((theIndex < inBufferList.mNumberBuffers) && (inChannel >= inBufferList.mBuffers[theIndex].mNumberChannels))
{
inChannel -= inBufferList.mBuffers[theIndex].mNumberChannels;
++theIndex;
}
if(theIndex < inBufferList.mNumberBuffers)
{
outBufferNumber = theIndex;
outBufferChannel = inChannel;
theAnswer = true;
}
return theAnswer;
}
void CAAudioBufferList::Clear(AudioBufferList& outBufferList)
{
// assumes that "0" is actually the 0 value for this stream format
for(UInt32 theBufferIndex = 0; theBufferIndex < outBufferList.mNumberBuffers; ++theBufferIndex)
{
if(outBufferList.mBuffers[theBufferIndex].mData != NULL)
{
memset(outBufferList.mBuffers[theBufferIndex].mData, 0, outBufferList.mBuffers[theBufferIndex].mDataByteSize);
}
}
}
void CAAudioBufferList::Copy(const AudioBufferList& inSource, UInt32 inStartingSourceChannel, AudioBufferList& outDestination, UInt32 inStartingDestinationChannel)
{
// This is a brute force copy method that can handle ABL's that have different buffer layouts
// This means that this method is probably not the fastest way to do this for all cases.
// This method also assumes that both the source and destination sample formats are Float32
UInt32 theInputChannel = inStartingSourceChannel;
UInt32 theNumberInputChannels = GetTotalNumberChannels(inSource);
UInt32 theOutputChannel = inStartingDestinationChannel;
UInt32 theNumberOutputChannels = GetTotalNumberChannels(outDestination);
UInt32 theInputBufferIndex = 0;
UInt32 theInputBufferChannel = 0;
UInt32 theOutputBufferIndex = 0;
UInt32 theOutputBufferChannel = 0;
while((theInputChannel < theNumberInputChannels) && (theOutputChannel < theNumberOutputChannels))
{
GetBufferForChannel(inSource, theInputChannel, theInputBufferIndex, theInputBufferChannel);
GetBufferForChannel(inSource, theOutputChannel, theOutputBufferIndex, theOutputBufferChannel);
CopyChannel(inSource.mBuffers[theInputBufferIndex], theInputBufferChannel, outDestination.mBuffers[theOutputBufferIndex], theOutputBufferChannel);
++theInputChannel;
++theOutputChannel;
}
}
void CAAudioBufferList::CopyChannel(const AudioBuffer& inSource, UInt32 inSourceChannel, AudioBuffer& outDestination, UInt32 inDestinationChannel)
{
// set up the stuff for the loop
UInt32 theNumberFramesToCopy = outDestination.mDataByteSize / (outDestination.mNumberChannels * SizeOf32(Float32));
const Float32* theSource = static_cast<const Float32*>(inSource.mData);
Float32* theDestination = static_cast<Float32*>(outDestination.mData);
// loop through the data and copy the samples
while(theNumberFramesToCopy > 0)
{
// copy the data
theDestination[inDestinationChannel] = theSource[inSourceChannel];
// adjust the pointers
--theNumberFramesToCopy;
theSource += inSource.mNumberChannels;
theDestination += outDestination.mNumberChannels;
}
}
void CAAudioBufferList::Sum(const AudioBufferList& inSourceBufferList, AudioBufferList& ioSummedBufferList)
{
// assumes that the buffers are Float32 samples and the listst have the same layout
// this is a lame algorithm, by the way. it could at least be unrolled a couple of times
for(UInt32 theBufferIndex = 0; theBufferIndex < ioSummedBufferList.mNumberBuffers; ++theBufferIndex)
{
Float32* theSourceBuffer = static_cast<Float32*>(inSourceBufferList.mBuffers[theBufferIndex].mData);
Float32* theSummedBuffer = static_cast<Float32*>(ioSummedBufferList.mBuffers[theBufferIndex].mData);
UInt32 theNumberSamplesToMix = ioSummedBufferList.mBuffers[theBufferIndex].mDataByteSize / SizeOf32(Float32);
if((theSourceBuffer != NULL) && (theSummedBuffer != NULL) && (theNumberSamplesToMix > 0))
{
while(theNumberSamplesToMix > 0)
{
*theSummedBuffer += *theSourceBuffer;
++theSummedBuffer;
++theSourceBuffer;
--theNumberSamplesToMix;
}
}
}
}
bool CAAudioBufferList::HasData(AudioBufferList& inBufferList)
{
bool hasData = false;
for(UInt32 theBufferIndex = 0; !hasData && (theBufferIndex < inBufferList.mNumberBuffers); ++theBufferIndex)
{
if(inBufferList.mBuffers[theBufferIndex].mData != NULL)
{
UInt32* theBuffer = (UInt32*)inBufferList.mBuffers[theBufferIndex].mData;
UInt32 theNumberSamples = inBufferList.mBuffers[theBufferIndex].mDataByteSize / SizeOf32(UInt32);
for(UInt32 theSampleIndex = 0; !hasData && (theSampleIndex < theNumberSamples); ++theSampleIndex)
{
hasData = theBuffer[theSampleIndex] != 0;
}
}
}
return hasData;
}
#if CoreAudio_Debug
void CAAudioBufferList::PrintToLog(const AudioBufferList& inBufferList)
{
PrintInt(" Number streams: ", inBufferList.mNumberBuffers);
for(UInt32 theIndex = 0; theIndex < inBufferList.mNumberBuffers; ++theIndex)
{
PrintIndexedInt(" Channels in stream", theIndex + 1, inBufferList.mBuffers[theIndex].mNumberChannels);
PrintIndexedInt(" Buffer size of stream", theIndex + 1, inBufferList.mBuffers[theIndex].mDataByteSize);
}
}
#endif
AudioBufferList CAAudioBufferList::sEmptyBufferList = { 0, { { 0, 0, NULL } } };
| {'content_hash': '098e32b98c7a648bf23d62952e4aae59', 'timestamp': '', 'source': 'github', 'line_count': 186, 'max_line_length': 163, 'avg_line_length': 35.53763440860215, 'alnum_prop': 0.7396369137670197, 'repo_name': 'eriser/audiounitjs', 'id': '08e3e37a06956fd1c1de7e405ed18ce91446d218', 'size': '9055', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'Template/AUJS Source/CoreAudio/PublicUtility/CAAudioBufferList.cpp', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'C', 'bytes': '66648'}, {'name': 'C++', 'bytes': '2493092'}, {'name': 'CSS', 'bytes': '763'}, {'name': 'CoffeeScript', 'bytes': '7251'}, {'name': 'HTML', 'bytes': '3332'}, {'name': 'JavaScript', 'bytes': '97698'}, {'name': 'Objective-C', 'bytes': '13546'}, {'name': 'Objective-C++', 'bytes': '29132'}, {'name': 'R', 'bytes': '313'}, {'name': 'Rebol', 'bytes': '12178'}]} |
from __future__ import unicode_literals
import requests
from django.conf import settings
from social.p3 import urlencode
from social.utils import handle_http_errors
from social.backends.oauth import BaseOAuth1
class PinterestOauth(BaseOAuth1):
name = 'pinterest'
RESPONSE_TYPE = 'token'
AUTHORIZE_URL = AUTHORIZATION_URL = 'https://www.pinterest.com/oauth/'
ACCESS_TOKEN_URL = 'https://api.pinterest.com/oauth/access_token'
REQUEST_TOKEN_URL = AUTHORIZE_URL
def oauth_authorization_request(self, token):
params = self.setting('AUTH_EXTRA_ARGUMENTS', {}).copy()
params.update({
'consumer_id': settings.SOCIAL_AUTH_PINTEREST_KEY,
'response_type': self.RESPONSE_TYPE,
})
return '{0}?{1}'.format(self.authorization_url(), urlencode(params))
@handle_http_errors
def auth_complete(self, *args, **kwargs):
self.process_error(self.data)
self.validate_state()
access_token = self.data.get('access_token')
return self.do_auth(access_token, *args, **kwargs)
@handle_http_errors
def do_auth(self, access_token, *args, **kwargs):
data = self.user_data(access_token)
if data is not None and 'access_token' not in data:
data['access_token'] = access_token
kwargs.update({'response': data, 'backend': self})
return self.strategy.authenticate(*args, **kwargs)
def user_data(self, access_token, *args, **kwargs):
for x in range(5):
response = requests.put(
'https://api.pinterest.com/v3/boards/?join=owner',
{'access_token': access_token, 'name': 'comixon'})
if response.status_code == 200:
return response.json().get('data', {})
return {}
def get_user_id(self, details, response):
return response.get('owner', {}).get('id')
def get_user_details(self, response):
# TODO: get data normaly, not from board
user_data = response.get('owner', {})
return {
'username': user_data.get('username'),
'email': None,
'fullname': user_data.get('full_name'),
'first_name': user_data.get('first_name'),
'last_name': user_data.get('last_name'),
'userpic': user_data.get('image_large_url'),
}
def extra_data(self, user, uid, response, details=None, *args, **kwargs):
data = super(PinterestOauth, self).extra_data(
user, uid, response, details, *args, **kwargs)
data['board_id'] = response['id']
return data
| {'content_hash': '81bb7eac77e0b9d97c36fab98bdd9187', 'timestamp': '', 'source': 'github', 'line_count': 71, 'max_line_length': 77, 'avg_line_length': 36.74647887323944, 'alnum_prop': 0.6059793024147183, 'repo_name': 'scailer/django-social-publisher', 'id': '111b28bcc1280b6dce104bb6717974ca3b66e592', 'size': '2634', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'social_publisher/auth/pinterest.py', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'HTML', 'bytes': '825'}, {'name': 'Python', 'bytes': '37773'}]} |
__author__ = 'Deathnerd'
import os
class Base():
"""Base Config"""
# General App
ENV = os.environ['CODENINJA_SERVER_ENV']
SECRET_KEY = os.environ['CODENINJA_SECRET_KEY']
APP_DIR = os.path.abspath(os.path.dirname(__file__))
PROJECT_ROOT = os.path.abspath(os.path.join(APP_DIR, os.pardir))
# SQLAlchemy
SQLALCHEMY_DATABASE_URI = "mysql://{}:{}@{}/{}?charset=utf8".format(os.environ['CODENINJA_DATABASE_USER'],
os.environ['CODENINJA_DATABASE_PASS'],
os.environ['CODENINJA_DATABASE_HOST'],
os.environ['CODENINJA_DATABASE_NAME'])
# Bcrypt
BCRYPT_LOG_ROUNDS = 13
# Debug Toolbar
DEBUG_TB_ENABLED = False
DEBUG_TB_INTERCEPT_REDIRECTS = False
# Flask-Assets
ASSETS_DEBUG = False
# WTForms
WTF_CSRF_ENABLED = True
WTF_CSRF_SECRET_KEY = os.environ['CODENINJA_WTF_CSRF_SECRET_KEY']
RECAPTCHA_PUBLIC_KEY = os.environ['CODENINJA_RECAPTCHA_PUBLIC_KEY']
RECAPTCHA_PRIVATE_KEY = os.environ['CODENINJA_RECAPTCHA_PRIVATE_KEY']
class Production(Base):
"""Production Config"""
DEBUG = False
DEBUG_TB_ENABLED = False
class Development(Base):
"""Development Config"""
# General App
DEBUG = True
# SQLAlchemy
# Debug Toolbar
DEBUG_TB_ENABLED = True
DEBUG_TB_PROFILER_ENABLED = True
DEBUG_TB_INTERCEPT_REDIRECTS = True
DEBUG_TB_TEMPLATE_EDITOR_ENABLED = True
# Flask-Assets
ASSETS_DEBUG = True
# WTF-Forms
class Staging(Base):
"""Staging Config"""
# General App
TESTING = True
DEBUG = True
# Bcrypt
BCRYPT_LOG_ROUNDS = 1
# WTForms | {'content_hash': '125a369ad9373a7f03e79325e79d00ac', 'timestamp': '', 'source': 'github', 'line_count': 70, 'max_line_length': 107, 'avg_line_length': 21.814285714285713, 'alnum_prop': 0.6810740013097577, 'repo_name': 'Deathnerd/iamacodeninja', 'id': 'a21fada49260b06928f530918207a080efd264fa', 'size': '1527', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'codeninja/settings.py', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'HTML', 'bytes': '1536'}, {'name': 'Python', 'bytes': '9606'}]} |
<?php
namespace PHPPromTests\Storage;
use PHPProm\Storage\MongoDB;
class MongoDBTest extends AbstractStorageTest {
protected $mongoDBManager;
protected function setUp() {
$this->storage = new MongoDB('mongodb://localhost:27017');
$this->mongoDBManager = new \MongoDB\Driver\Manager('mongodb://localhost:27017');
$bulkDelete = new \MongoDB\Driver\BulkWrite;
$bulkDelete->delete(['key' => 'metric:key']);
$bulkDelete->delete(['key' => 'metric:incrementKey']);
$this->mongoDBManager->executeBulkWrite('phppromdb.measurements', $bulkDelete);
}
protected function getRawKey($key) {
$filter = ['key' => $key];
$options = ['limit' => 1];
$query = new \MongoDB\Driver\Query($filter, $options);
$results = $this->mongoDBManager->executeQuery('phppromdb.measurements', $query);
foreach ($results as $result) {
return $result->value;
}
return null;
}
} | {'content_hash': 'e5d7c0ff5ca5896a1e98f4e4bdc8db36', 'timestamp': '', 'source': 'github', 'line_count': 34, 'max_line_length': 89, 'avg_line_length': 29.029411764705884, 'alnum_prop': 0.624113475177305, 'repo_name': 'philiplb/PHPProm', 'id': 'c00cddc366aee0790ec723dcd375b0de6dc86f73', 'size': '1220', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'tests/PHPPromTests/Storage/MongoDBTest.php', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'PHP', 'bytes': '45527'}]} |
#ifndef _SYS_RESOURCE_H_
#define _SYS_RESOURCE_H_
#include <sys/cdefs.h>
#include <sys/types.h>
#include <linux/resource.h>
__BEGIN_DECLS
typedef unsigned long rlim_t;
extern int getrlimit(int, struct rlimit*);
extern int setrlimit(int, const struct rlimit*);
extern int getrlimit64(int, struct rlimit64*);
extern int setrlimit64(int, const struct rlimit64*);
extern int getpriority(int, int);
extern int setpriority(int, int, int);
extern int getrusage(int, struct rusage*);
#if __LP64__
/* Implementing prlimit for 32-bit isn't worth the effort. */
extern int prlimit(pid_t, int, const struct rlimit*, struct rlimit*);
#endif
extern int prlimit64(pid_t, int, const struct rlimit64*, struct rlimit64*);
__END_DECLS
#endif /* _SYS_RESOURCE_H_ */
| {'content_hash': '4b7a6da082a38051a8334e6690aa1f2c', 'timestamp': '', 'source': 'github', 'line_count': 34, 'max_line_length': 75, 'avg_line_length': 22.323529411764707, 'alnum_prop': 0.7272727272727273, 'repo_name': 'efortuna/AndroidSDKClone', 'id': 'a91fa5394eb9b47da1d35320f768f9484f668665', 'size': '2156', 'binary': False, 'copies': '95', 'ref': 'refs/heads/master', 'path': 'ndk_experimental/platforms/android-20/arch-mips/usr/include/sys/resource.h', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'AppleScript', 'bytes': '0'}, {'name': 'Assembly', 'bytes': '79928'}, {'name': 'Awk', 'bytes': '101642'}, {'name': 'C', 'bytes': '110780727'}, {'name': 'C++', 'bytes': '62609188'}, {'name': 'CSS', 'bytes': '318944'}, {'name': 'Component Pascal', 'bytes': '220'}, {'name': 'Emacs Lisp', 'bytes': '4737'}, {'name': 'Groovy', 'bytes': '82931'}, {'name': 'IDL', 'bytes': '31867'}, {'name': 'Java', 'bytes': '102919416'}, {'name': 'JavaScript', 'bytes': '44616'}, {'name': 'Objective-C', 'bytes': '196166'}, {'name': 'Perl', 'bytes': '45617403'}, {'name': 'Prolog', 'bytes': '1828886'}, {'name': 'Python', 'bytes': '34997242'}, {'name': 'Rust', 'bytes': '17781'}, {'name': 'Shell', 'bytes': '1585527'}, {'name': 'Visual Basic', 'bytes': '962'}, {'name': 'XC', 'bytes': '802542'}]} |
package org.apache.synapse.config.xml.endpoints.utils;
import java.net.URI;
/**
* Currently this class is not used as Woden is dependent on Xerces, which is not included in the
* current release.
*
* Builder for WSDL 2.0 endpoints. This class extracts endpoint information from the given WSDL 2.0
* documents.
*/
public class WSDL20EndpointBuilder {
/* COMMENT DUE TO BUILD FAILURE - TO BE FIXED LATER WHEN WSDL 2.0 SUPPORT IS OFFICIALLY IN
private static Log log = LogFactory.getLog(WSDL20EndpointBuilder.class);
public EndpointDefinition createEndpointDefinitionFromWSDL(String wsdlURI, String serviceName,
String portName) {
try {
WSDLFactory fac = WSDLFactory.newInstance();
WSDLReader reader = fac.newWSDLReader();
reader.setFeature(WSDLReader.FEATURE_VALIDATION, false);
Description description = reader.readWSDL(wsdlURI);
return createEndpointDefinitionFromWSDL(description, serviceName, portName);
} catch (WSDLException e) {
handleException("Couldn't process the given WSDL document.");
}
return null;
}
private EndpointDefinition createEndpointDefinitionFromWSDL(Description description,
String serviceName, String portName) {
if (description == null) {
throw new SynapseException("WSDL document is not specified.");
}
if (serviceName == null) {
throw new SynapseException("Service name of the WSDL document is not specified.");
}
if (portName == null) {
throw new SynapseException("Port name of the WSDL document is not specified.");
}
URI tns = description.toElement().getTargetNamespace();
Service service = description.getService(new QName(tns.toString(), serviceName));
if (service != null) {
Endpoint wsdlEndpoint = service.getEndpoint(new NCName(portName));
if (wsdlEndpoint != null) {
String serviceURL = wsdlEndpoint.getAddress().toString();
EndpointDefinition endpointDefinition = new EndpointDefinition();
endpointDefinition.setAddress(serviceURL);
return endpointDefinition;
} else {
handleException("Specified port is not defined in the given WSDL.");
}
} else {
handleException("Specified service is not defined in the given WSDL.");
}
return null;
}
private static void handleException(String msg) {
log.error(msg);
throw new SynapseException(msg);
}
*/
}
| {'content_hash': '7470710f7aa937d9caf3d9fd8b9de39c', 'timestamp': '', 'source': 'github', 'line_count': 77, 'max_line_length': 99, 'avg_line_length': 34.42857142857143, 'alnum_prop': 0.6469256884194644, 'repo_name': 'laki88/carbon-apimgt', 'id': '720bd2bde01f86b82054bd33e1456f0263acdb1e', 'size': '3474', 'binary': False, 'copies': '8', 'ref': 'refs/heads/master', 'path': 'dependencies/synapse/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/utils/WSDL20EndpointBuilder.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'ApacheConf', 'bytes': '72417'}, {'name': 'Batchfile', 'bytes': '7251'}, {'name': 'CSS', 'bytes': '1696265'}, {'name': 'HTML', 'bytes': '343902'}, {'name': 'Java', 'bytes': '3655355'}, {'name': 'JavaScript', 'bytes': '14540961'}, {'name': 'PLSQL', 'bytes': '88321'}, {'name': 'PLpgSQL', 'bytes': '29272'}, {'name': 'Shell', 'bytes': '19726'}, {'name': 'Thrift', 'bytes': '1730'}, {'name': 'XSLT', 'bytes': '94760'}]} |
<?php
$loader = require dirname(__DIR__).'/vendor/autoload.php';
$loader->add('SimpleHttpClient\Tests', __DIR__);
| {'content_hash': 'e0eed8c791a5bc3758f4e22c502a5f8a', 'timestamp': '', 'source': 'github', 'line_count': 4, 'max_line_length': 58, 'avg_line_length': 28.75, 'alnum_prop': 0.6608695652173913, 'repo_name': 'cameronjacobson/SimpleHttpClient', 'id': 'c34338a2271ae4c5cd1bc50531ab137b35d280ed', 'size': '115', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'tests/bootstrap.php', 'mode': '33188', 'license': 'bsd-2-clause', 'language': [{'name': 'PHP', 'bytes': '14199'}]} |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.