text stringlengths 2 1.04M | meta dict |
|---|---|
// @Generated by gentest/gentest.rb from gentest/fixtures/YGRoundingTest.html
var Yoga = Yoga || require("../../sources/entry-" + process.env.TEST_ENTRY);
it("rounding_flex_basis_flex_grow_row_width_of_100", function () {
var config = Yoga.Config.create();
try {
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(1);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create(config);
root_child2.setFlexGrow(1);
root.insertChild(root_child2, 2);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
console.assert(0 === root.getComputedLeft(), "0 === root.getComputedLeft() (" + root.getComputedLeft() + ")");
console.assert(0 === root.getComputedTop(), "0 === root.getComputedTop() (" + root.getComputedTop() + ")");
console.assert(100 === root.getComputedWidth(), "100 === root.getComputedWidth() (" + root.getComputedWidth() + ")");
console.assert(100 === root.getComputedHeight(), "100 === root.getComputedHeight() (" + root.getComputedHeight() + ")");
console.assert(0 === root_child0.getComputedLeft(), "0 === root_child0.getComputedLeft() (" + root_child0.getComputedLeft() + ")");
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
console.assert(33 === root_child0.getComputedWidth(), "33 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
console.assert(100 === root_child0.getComputedHeight(), "100 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
console.assert(33 === root_child1.getComputedLeft(), "33 === root_child1.getComputedLeft() (" + root_child1.getComputedLeft() + ")");
console.assert(0 === root_child1.getComputedTop(), "0 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
console.assert(34 === root_child1.getComputedWidth(), "34 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
console.assert(100 === root_child1.getComputedHeight(), "100 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
console.assert(67 === root_child2.getComputedLeft(), "67 === root_child2.getComputedLeft() (" + root_child2.getComputedLeft() + ")");
console.assert(0 === root_child2.getComputedTop(), "0 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
console.assert(33 === root_child2.getComputedWidth(), "33 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
console.assert(100 === root_child2.getComputedHeight(), "100 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL);
console.assert(0 === root.getComputedLeft(), "0 === root.getComputedLeft() (" + root.getComputedLeft() + ")");
console.assert(0 === root.getComputedTop(), "0 === root.getComputedTop() (" + root.getComputedTop() + ")");
console.assert(100 === root.getComputedWidth(), "100 === root.getComputedWidth() (" + root.getComputedWidth() + ")");
console.assert(100 === root.getComputedHeight(), "100 === root.getComputedHeight() (" + root.getComputedHeight() + ")");
console.assert(67 === root_child0.getComputedLeft(), "67 === root_child0.getComputedLeft() (" + root_child0.getComputedLeft() + ")");
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
console.assert(33 === root_child0.getComputedWidth(), "33 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
console.assert(100 === root_child0.getComputedHeight(), "100 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
console.assert(33 === root_child1.getComputedLeft(), "33 === root_child1.getComputedLeft() (" + root_child1.getComputedLeft() + ")");
console.assert(0 === root_child1.getComputedTop(), "0 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
console.assert(34 === root_child1.getComputedWidth(), "34 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
console.assert(100 === root_child1.getComputedHeight(), "100 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
console.assert(0 === root_child2.getComputedLeft(), "0 === root_child2.getComputedLeft() (" + root_child2.getComputedLeft() + ")");
console.assert(0 === root_child2.getComputedTop(), "0 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
console.assert(33 === root_child2.getComputedWidth(), "33 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
console.assert(100 === root_child2.getComputedHeight(), "100 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
} finally {
if (typeof root !== "undefined") {
root.freeRecursive();
}
config.free();
}
});
it("rounding_flex_basis_flex_grow_row_prime_number_width", function () {
var config = Yoga.Config.create();
try {
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setWidth(113);
root.setHeight(100);
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(1);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create(config);
root_child2.setFlexGrow(1);
root.insertChild(root_child2, 2);
var root_child3 = Yoga.Node.create(config);
root_child3.setFlexGrow(1);
root.insertChild(root_child3, 3);
var root_child4 = Yoga.Node.create(config);
root_child4.setFlexGrow(1);
root.insertChild(root_child4, 4);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
console.assert(0 === root.getComputedLeft(), "0 === root.getComputedLeft() (" + root.getComputedLeft() + ")");
console.assert(0 === root.getComputedTop(), "0 === root.getComputedTop() (" + root.getComputedTop() + ")");
console.assert(113 === root.getComputedWidth(), "113 === root.getComputedWidth() (" + root.getComputedWidth() + ")");
console.assert(100 === root.getComputedHeight(), "100 === root.getComputedHeight() (" + root.getComputedHeight() + ")");
console.assert(0 === root_child0.getComputedLeft(), "0 === root_child0.getComputedLeft() (" + root_child0.getComputedLeft() + ")");
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
console.assert(23 === root_child0.getComputedWidth(), "23 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
console.assert(100 === root_child0.getComputedHeight(), "100 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
console.assert(23 === root_child1.getComputedLeft(), "23 === root_child1.getComputedLeft() (" + root_child1.getComputedLeft() + ")");
console.assert(0 === root_child1.getComputedTop(), "0 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
console.assert(22 === root_child1.getComputedWidth(), "22 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
console.assert(100 === root_child1.getComputedHeight(), "100 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
console.assert(45 === root_child2.getComputedLeft(), "45 === root_child2.getComputedLeft() (" + root_child2.getComputedLeft() + ")");
console.assert(0 === root_child2.getComputedTop(), "0 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
console.assert(23 === root_child2.getComputedWidth(), "23 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
console.assert(100 === root_child2.getComputedHeight(), "100 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
console.assert(68 === root_child3.getComputedLeft(), "68 === root_child3.getComputedLeft() (" + root_child3.getComputedLeft() + ")");
console.assert(0 === root_child3.getComputedTop(), "0 === root_child3.getComputedTop() (" + root_child3.getComputedTop() + ")");
console.assert(22 === root_child3.getComputedWidth(), "22 === root_child3.getComputedWidth() (" + root_child3.getComputedWidth() + ")");
console.assert(100 === root_child3.getComputedHeight(), "100 === root_child3.getComputedHeight() (" + root_child3.getComputedHeight() + ")");
console.assert(90 === root_child4.getComputedLeft(), "90 === root_child4.getComputedLeft() (" + root_child4.getComputedLeft() + ")");
console.assert(0 === root_child4.getComputedTop(), "0 === root_child4.getComputedTop() (" + root_child4.getComputedTop() + ")");
console.assert(23 === root_child4.getComputedWidth(), "23 === root_child4.getComputedWidth() (" + root_child4.getComputedWidth() + ")");
console.assert(100 === root_child4.getComputedHeight(), "100 === root_child4.getComputedHeight() (" + root_child4.getComputedHeight() + ")");
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL);
console.assert(0 === root.getComputedLeft(), "0 === root.getComputedLeft() (" + root.getComputedLeft() + ")");
console.assert(0 === root.getComputedTop(), "0 === root.getComputedTop() (" + root.getComputedTop() + ")");
console.assert(113 === root.getComputedWidth(), "113 === root.getComputedWidth() (" + root.getComputedWidth() + ")");
console.assert(100 === root.getComputedHeight(), "100 === root.getComputedHeight() (" + root.getComputedHeight() + ")");
console.assert(90 === root_child0.getComputedLeft(), "90 === root_child0.getComputedLeft() (" + root_child0.getComputedLeft() + ")");
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
console.assert(23 === root_child0.getComputedWidth(), "23 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
console.assert(100 === root_child0.getComputedHeight(), "100 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
console.assert(68 === root_child1.getComputedLeft(), "68 === root_child1.getComputedLeft() (" + root_child1.getComputedLeft() + ")");
console.assert(0 === root_child1.getComputedTop(), "0 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
console.assert(22 === root_child1.getComputedWidth(), "22 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
console.assert(100 === root_child1.getComputedHeight(), "100 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
console.assert(45 === root_child2.getComputedLeft(), "45 === root_child2.getComputedLeft() (" + root_child2.getComputedLeft() + ")");
console.assert(0 === root_child2.getComputedTop(), "0 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
console.assert(23 === root_child2.getComputedWidth(), "23 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
console.assert(100 === root_child2.getComputedHeight(), "100 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
console.assert(23 === root_child3.getComputedLeft(), "23 === root_child3.getComputedLeft() (" + root_child3.getComputedLeft() + ")");
console.assert(0 === root_child3.getComputedTop(), "0 === root_child3.getComputedTop() (" + root_child3.getComputedTop() + ")");
console.assert(22 === root_child3.getComputedWidth(), "22 === root_child3.getComputedWidth() (" + root_child3.getComputedWidth() + ")");
console.assert(100 === root_child3.getComputedHeight(), "100 === root_child3.getComputedHeight() (" + root_child3.getComputedHeight() + ")");
console.assert(0 === root_child4.getComputedLeft(), "0 === root_child4.getComputedLeft() (" + root_child4.getComputedLeft() + ")");
console.assert(0 === root_child4.getComputedTop(), "0 === root_child4.getComputedTop() (" + root_child4.getComputedTop() + ")");
console.assert(23 === root_child4.getComputedWidth(), "23 === root_child4.getComputedWidth() (" + root_child4.getComputedWidth() + ")");
console.assert(100 === root_child4.getComputedHeight(), "100 === root_child4.getComputedHeight() (" + root_child4.getComputedHeight() + ")");
} finally {
if (typeof root !== "undefined") {
root.freeRecursive();
}
config.free();
}
});
it("rounding_flex_basis_flex_shrink_row", function () {
var config = Yoga.Config.create();
try {
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setWidth(101);
root.setHeight(100);
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexShrink(1);
root_child0.setFlexBasis(100);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexBasis(25);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create(config);
root_child2.setFlexBasis(25);
root.insertChild(root_child2, 2);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
console.assert(0 === root.getComputedLeft(), "0 === root.getComputedLeft() (" + root.getComputedLeft() + ")");
console.assert(0 === root.getComputedTop(), "0 === root.getComputedTop() (" + root.getComputedTop() + ")");
console.assert(101 === root.getComputedWidth(), "101 === root.getComputedWidth() (" + root.getComputedWidth() + ")");
console.assert(100 === root.getComputedHeight(), "100 === root.getComputedHeight() (" + root.getComputedHeight() + ")");
console.assert(0 === root_child0.getComputedLeft(), "0 === root_child0.getComputedLeft() (" + root_child0.getComputedLeft() + ")");
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
console.assert(51 === root_child0.getComputedWidth(), "51 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
console.assert(100 === root_child0.getComputedHeight(), "100 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
console.assert(51 === root_child1.getComputedLeft(), "51 === root_child1.getComputedLeft() (" + root_child1.getComputedLeft() + ")");
console.assert(0 === root_child1.getComputedTop(), "0 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
console.assert(25 === root_child1.getComputedWidth(), "25 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
console.assert(100 === root_child1.getComputedHeight(), "100 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
console.assert(76 === root_child2.getComputedLeft(), "76 === root_child2.getComputedLeft() (" + root_child2.getComputedLeft() + ")");
console.assert(0 === root_child2.getComputedTop(), "0 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
console.assert(25 === root_child2.getComputedWidth(), "25 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
console.assert(100 === root_child2.getComputedHeight(), "100 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL);
console.assert(0 === root.getComputedLeft(), "0 === root.getComputedLeft() (" + root.getComputedLeft() + ")");
console.assert(0 === root.getComputedTop(), "0 === root.getComputedTop() (" + root.getComputedTop() + ")");
console.assert(101 === root.getComputedWidth(), "101 === root.getComputedWidth() (" + root.getComputedWidth() + ")");
console.assert(100 === root.getComputedHeight(), "100 === root.getComputedHeight() (" + root.getComputedHeight() + ")");
console.assert(50 === root_child0.getComputedLeft(), "50 === root_child0.getComputedLeft() (" + root_child0.getComputedLeft() + ")");
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
console.assert(51 === root_child0.getComputedWidth(), "51 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
console.assert(100 === root_child0.getComputedHeight(), "100 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
console.assert(25 === root_child1.getComputedLeft(), "25 === root_child1.getComputedLeft() (" + root_child1.getComputedLeft() + ")");
console.assert(0 === root_child1.getComputedTop(), "0 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
console.assert(25 === root_child1.getComputedWidth(), "25 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
console.assert(100 === root_child1.getComputedHeight(), "100 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
console.assert(0 === root_child2.getComputedLeft(), "0 === root_child2.getComputedLeft() (" + root_child2.getComputedLeft() + ")");
console.assert(0 === root_child2.getComputedTop(), "0 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
console.assert(25 === root_child2.getComputedWidth(), "25 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
console.assert(100 === root_child2.getComputedHeight(), "100 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
} finally {
if (typeof root !== "undefined") {
root.freeRecursive();
}
config.free();
}
});
it("rounding_flex_basis_overrides_main_size", function () {
var config = Yoga.Config.create();
try {
var root = Yoga.Node.create(config);
root.setWidth(100);
root.setHeight(113);
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root_child0.setFlexBasis(50);
root_child0.setHeight(20);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(1);
root_child1.setHeight(10);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create(config);
root_child2.setFlexGrow(1);
root_child2.setHeight(10);
root.insertChild(root_child2, 2);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
console.assert(0 === root.getComputedLeft(), "0 === root.getComputedLeft() (" + root.getComputedLeft() + ")");
console.assert(0 === root.getComputedTop(), "0 === root.getComputedTop() (" + root.getComputedTop() + ")");
console.assert(100 === root.getComputedWidth(), "100 === root.getComputedWidth() (" + root.getComputedWidth() + ")");
console.assert(113 === root.getComputedHeight(), "113 === root.getComputedHeight() (" + root.getComputedHeight() + ")");
console.assert(0 === root_child0.getComputedLeft(), "0 === root_child0.getComputedLeft() (" + root_child0.getComputedLeft() + ")");
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
console.assert(100 === root_child0.getComputedWidth(), "100 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
console.assert(64 === root_child0.getComputedHeight(), "64 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
console.assert(0 === root_child1.getComputedLeft(), "0 === root_child1.getComputedLeft() (" + root_child1.getComputedLeft() + ")");
console.assert(64 === root_child1.getComputedTop(), "64 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
console.assert(100 === root_child1.getComputedWidth(), "100 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
console.assert(25 === root_child1.getComputedHeight(), "25 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
console.assert(0 === root_child2.getComputedLeft(), "0 === root_child2.getComputedLeft() (" + root_child2.getComputedLeft() + ")");
console.assert(89 === root_child2.getComputedTop(), "89 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
console.assert(100 === root_child2.getComputedWidth(), "100 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
console.assert(24 === root_child2.getComputedHeight(), "24 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL);
console.assert(0 === root.getComputedLeft(), "0 === root.getComputedLeft() (" + root.getComputedLeft() + ")");
console.assert(0 === root.getComputedTop(), "0 === root.getComputedTop() (" + root.getComputedTop() + ")");
console.assert(100 === root.getComputedWidth(), "100 === root.getComputedWidth() (" + root.getComputedWidth() + ")");
console.assert(113 === root.getComputedHeight(), "113 === root.getComputedHeight() (" + root.getComputedHeight() + ")");
console.assert(0 === root_child0.getComputedLeft(), "0 === root_child0.getComputedLeft() (" + root_child0.getComputedLeft() + ")");
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
console.assert(100 === root_child0.getComputedWidth(), "100 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
console.assert(64 === root_child0.getComputedHeight(), "64 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
console.assert(0 === root_child1.getComputedLeft(), "0 === root_child1.getComputedLeft() (" + root_child1.getComputedLeft() + ")");
console.assert(64 === root_child1.getComputedTop(), "64 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
console.assert(100 === root_child1.getComputedWidth(), "100 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
console.assert(25 === root_child1.getComputedHeight(), "25 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
console.assert(0 === root_child2.getComputedLeft(), "0 === root_child2.getComputedLeft() (" + root_child2.getComputedLeft() + ")");
console.assert(89 === root_child2.getComputedTop(), "89 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
console.assert(100 === root_child2.getComputedWidth(), "100 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
console.assert(24 === root_child2.getComputedHeight(), "24 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
} finally {
if (typeof root !== "undefined") {
root.freeRecursive();
}
config.free();
}
});
it("rounding_total_fractial", function () {
var config = Yoga.Config.create();
try {
var root = Yoga.Node.create(config);
root.setWidth(87.4);
root.setHeight(113.4);
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(0.7);
root_child0.setFlexBasis(50.3);
root_child0.setHeight(20.3);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(1.6);
root_child1.setHeight(10);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create(config);
root_child2.setFlexGrow(1.1);
root_child2.setHeight(10.7);
root.insertChild(root_child2, 2);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
console.assert(0 === root.getComputedLeft(), "0 === root.getComputedLeft() (" + root.getComputedLeft() + ")");
console.assert(0 === root.getComputedTop(), "0 === root.getComputedTop() (" + root.getComputedTop() + ")");
console.assert(87 === root.getComputedWidth(), "87 === root.getComputedWidth() (" + root.getComputedWidth() + ")");
console.assert(113 === root.getComputedHeight(), "113 === root.getComputedHeight() (" + root.getComputedHeight() + ")");
console.assert(0 === root_child0.getComputedLeft(), "0 === root_child0.getComputedLeft() (" + root_child0.getComputedLeft() + ")");
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
console.assert(87 === root_child0.getComputedWidth(), "87 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
console.assert(59 === root_child0.getComputedHeight(), "59 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
console.assert(0 === root_child1.getComputedLeft(), "0 === root_child1.getComputedLeft() (" + root_child1.getComputedLeft() + ")");
console.assert(59 === root_child1.getComputedTop(), "59 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
console.assert(87 === root_child1.getComputedWidth(), "87 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
console.assert(30 === root_child1.getComputedHeight(), "30 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
console.assert(0 === root_child2.getComputedLeft(), "0 === root_child2.getComputedLeft() (" + root_child2.getComputedLeft() + ")");
console.assert(89 === root_child2.getComputedTop(), "89 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
console.assert(87 === root_child2.getComputedWidth(), "87 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
console.assert(24 === root_child2.getComputedHeight(), "24 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL);
console.assert(0 === root.getComputedLeft(), "0 === root.getComputedLeft() (" + root.getComputedLeft() + ")");
console.assert(0 === root.getComputedTop(), "0 === root.getComputedTop() (" + root.getComputedTop() + ")");
console.assert(87 === root.getComputedWidth(), "87 === root.getComputedWidth() (" + root.getComputedWidth() + ")");
console.assert(113 === root.getComputedHeight(), "113 === root.getComputedHeight() (" + root.getComputedHeight() + ")");
console.assert(0 === root_child0.getComputedLeft(), "0 === root_child0.getComputedLeft() (" + root_child0.getComputedLeft() + ")");
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
console.assert(87 === root_child0.getComputedWidth(), "87 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
console.assert(59 === root_child0.getComputedHeight(), "59 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
console.assert(0 === root_child1.getComputedLeft(), "0 === root_child1.getComputedLeft() (" + root_child1.getComputedLeft() + ")");
console.assert(59 === root_child1.getComputedTop(), "59 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
console.assert(87 === root_child1.getComputedWidth(), "87 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
console.assert(30 === root_child1.getComputedHeight(), "30 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
console.assert(0 === root_child2.getComputedLeft(), "0 === root_child2.getComputedLeft() (" + root_child2.getComputedLeft() + ")");
console.assert(89 === root_child2.getComputedTop(), "89 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
console.assert(87 === root_child2.getComputedWidth(), "87 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
console.assert(24 === root_child2.getComputedHeight(), "24 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
} finally {
if (typeof root !== "undefined") {
root.freeRecursive();
}
config.free();
}
});
it("rounding_total_fractial_nested", function () {
var config = Yoga.Config.create();
try {
var root = Yoga.Node.create(config);
root.setWidth(87.4);
root.setHeight(113.4);
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(0.7);
root_child0.setFlexBasis(50.3);
root_child0.setHeight(20.3);
root.insertChild(root_child0, 0);
var root_child0_child0 = Yoga.Node.create(config);
root_child0_child0.setFlexGrow(1);
root_child0_child0.setFlexBasis(0.3);
root_child0_child0.setPosition(Yoga.EDGE_BOTTOM, 13.3);
root_child0_child0.setHeight(9.9);
root_child0.insertChild(root_child0_child0, 0);
var root_child0_child1 = Yoga.Node.create(config);
root_child0_child1.setFlexGrow(4);
root_child0_child1.setFlexBasis(0.3);
root_child0_child1.setPosition(Yoga.EDGE_TOP, 13.3);
root_child0_child1.setHeight(1.1);
root_child0.insertChild(root_child0_child1, 1);
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(1.6);
root_child1.setHeight(10);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create(config);
root_child2.setFlexGrow(1.1);
root_child2.setHeight(10.7);
root.insertChild(root_child2, 2);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
console.assert(0 === root.getComputedLeft(), "0 === root.getComputedLeft() (" + root.getComputedLeft() + ")");
console.assert(0 === root.getComputedTop(), "0 === root.getComputedTop() (" + root.getComputedTop() + ")");
console.assert(87 === root.getComputedWidth(), "87 === root.getComputedWidth() (" + root.getComputedWidth() + ")");
console.assert(113 === root.getComputedHeight(), "113 === root.getComputedHeight() (" + root.getComputedHeight() + ")");
console.assert(0 === root_child0.getComputedLeft(), "0 === root_child0.getComputedLeft() (" + root_child0.getComputedLeft() + ")");
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
console.assert(87 === root_child0.getComputedWidth(), "87 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
console.assert(59 === root_child0.getComputedHeight(), "59 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
console.assert(0 === root_child0_child0.getComputedLeft(), "0 === root_child0_child0.getComputedLeft() (" + root_child0_child0.getComputedLeft() + ")");
console.assert(-13 === root_child0_child0.getComputedTop(), "-13 === root_child0_child0.getComputedTop() (" + root_child0_child0.getComputedTop() + ")");
console.assert(87 === root_child0_child0.getComputedWidth(), "87 === root_child0_child0.getComputedWidth() (" + root_child0_child0.getComputedWidth() + ")");
console.assert(12 === root_child0_child0.getComputedHeight(), "12 === root_child0_child0.getComputedHeight() (" + root_child0_child0.getComputedHeight() + ")");
console.assert(0 === root_child0_child1.getComputedLeft(), "0 === root_child0_child1.getComputedLeft() (" + root_child0_child1.getComputedLeft() + ")");
console.assert(25 === root_child0_child1.getComputedTop(), "25 === root_child0_child1.getComputedTop() (" + root_child0_child1.getComputedTop() + ")");
console.assert(87 === root_child0_child1.getComputedWidth(), "87 === root_child0_child1.getComputedWidth() (" + root_child0_child1.getComputedWidth() + ")");
console.assert(47 === root_child0_child1.getComputedHeight(), "47 === root_child0_child1.getComputedHeight() (" + root_child0_child1.getComputedHeight() + ")");
console.assert(0 === root_child1.getComputedLeft(), "0 === root_child1.getComputedLeft() (" + root_child1.getComputedLeft() + ")");
console.assert(59 === root_child1.getComputedTop(), "59 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
console.assert(87 === root_child1.getComputedWidth(), "87 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
console.assert(30 === root_child1.getComputedHeight(), "30 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
console.assert(0 === root_child2.getComputedLeft(), "0 === root_child2.getComputedLeft() (" + root_child2.getComputedLeft() + ")");
console.assert(89 === root_child2.getComputedTop(), "89 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
console.assert(87 === root_child2.getComputedWidth(), "87 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
console.assert(24 === root_child2.getComputedHeight(), "24 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL);
console.assert(0 === root.getComputedLeft(), "0 === root.getComputedLeft() (" + root.getComputedLeft() + ")");
console.assert(0 === root.getComputedTop(), "0 === root.getComputedTop() (" + root.getComputedTop() + ")");
console.assert(87 === root.getComputedWidth(), "87 === root.getComputedWidth() (" + root.getComputedWidth() + ")");
console.assert(113 === root.getComputedHeight(), "113 === root.getComputedHeight() (" + root.getComputedHeight() + ")");
console.assert(0 === root_child0.getComputedLeft(), "0 === root_child0.getComputedLeft() (" + root_child0.getComputedLeft() + ")");
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
console.assert(87 === root_child0.getComputedWidth(), "87 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
console.assert(59 === root_child0.getComputedHeight(), "59 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
console.assert(0 === root_child0_child0.getComputedLeft(), "0 === root_child0_child0.getComputedLeft() (" + root_child0_child0.getComputedLeft() + ")");
console.assert(-13 === root_child0_child0.getComputedTop(), "-13 === root_child0_child0.getComputedTop() (" + root_child0_child0.getComputedTop() + ")");
console.assert(87 === root_child0_child0.getComputedWidth(), "87 === root_child0_child0.getComputedWidth() (" + root_child0_child0.getComputedWidth() + ")");
console.assert(12 === root_child0_child0.getComputedHeight(), "12 === root_child0_child0.getComputedHeight() (" + root_child0_child0.getComputedHeight() + ")");
console.assert(0 === root_child0_child1.getComputedLeft(), "0 === root_child0_child1.getComputedLeft() (" + root_child0_child1.getComputedLeft() + ")");
console.assert(25 === root_child0_child1.getComputedTop(), "25 === root_child0_child1.getComputedTop() (" + root_child0_child1.getComputedTop() + ")");
console.assert(87 === root_child0_child1.getComputedWidth(), "87 === root_child0_child1.getComputedWidth() (" + root_child0_child1.getComputedWidth() + ")");
console.assert(47 === root_child0_child1.getComputedHeight(), "47 === root_child0_child1.getComputedHeight() (" + root_child0_child1.getComputedHeight() + ")");
console.assert(0 === root_child1.getComputedLeft(), "0 === root_child1.getComputedLeft() (" + root_child1.getComputedLeft() + ")");
console.assert(59 === root_child1.getComputedTop(), "59 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
console.assert(87 === root_child1.getComputedWidth(), "87 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
console.assert(30 === root_child1.getComputedHeight(), "30 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
console.assert(0 === root_child2.getComputedLeft(), "0 === root_child2.getComputedLeft() (" + root_child2.getComputedLeft() + ")");
console.assert(89 === root_child2.getComputedTop(), "89 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
console.assert(87 === root_child2.getComputedWidth(), "87 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
console.assert(24 === root_child2.getComputedHeight(), "24 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
} finally {
if (typeof root !== "undefined") {
root.freeRecursive();
}
config.free();
}
});
it("rounding_fractial_input_1", function () {
var config = Yoga.Config.create();
try {
var root = Yoga.Node.create(config);
root.setWidth(100);
root.setHeight(113.4);
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root_child0.setFlexBasis(50);
root_child0.setHeight(20);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(1);
root_child1.setHeight(10);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create(config);
root_child2.setFlexGrow(1);
root_child2.setHeight(10);
root.insertChild(root_child2, 2);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
console.assert(0 === root.getComputedLeft(), "0 === root.getComputedLeft() (" + root.getComputedLeft() + ")");
console.assert(0 === root.getComputedTop(), "0 === root.getComputedTop() (" + root.getComputedTop() + ")");
console.assert(100 === root.getComputedWidth(), "100 === root.getComputedWidth() (" + root.getComputedWidth() + ")");
console.assert(113 === root.getComputedHeight(), "113 === root.getComputedHeight() (" + root.getComputedHeight() + ")");
console.assert(0 === root_child0.getComputedLeft(), "0 === root_child0.getComputedLeft() (" + root_child0.getComputedLeft() + ")");
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
console.assert(100 === root_child0.getComputedWidth(), "100 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
console.assert(64 === root_child0.getComputedHeight(), "64 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
console.assert(0 === root_child1.getComputedLeft(), "0 === root_child1.getComputedLeft() (" + root_child1.getComputedLeft() + ")");
console.assert(64 === root_child1.getComputedTop(), "64 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
console.assert(100 === root_child1.getComputedWidth(), "100 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
console.assert(25 === root_child1.getComputedHeight(), "25 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
console.assert(0 === root_child2.getComputedLeft(), "0 === root_child2.getComputedLeft() (" + root_child2.getComputedLeft() + ")");
console.assert(89 === root_child2.getComputedTop(), "89 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
console.assert(100 === root_child2.getComputedWidth(), "100 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
console.assert(24 === root_child2.getComputedHeight(), "24 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL);
console.assert(0 === root.getComputedLeft(), "0 === root.getComputedLeft() (" + root.getComputedLeft() + ")");
console.assert(0 === root.getComputedTop(), "0 === root.getComputedTop() (" + root.getComputedTop() + ")");
console.assert(100 === root.getComputedWidth(), "100 === root.getComputedWidth() (" + root.getComputedWidth() + ")");
console.assert(113 === root.getComputedHeight(), "113 === root.getComputedHeight() (" + root.getComputedHeight() + ")");
console.assert(0 === root_child0.getComputedLeft(), "0 === root_child0.getComputedLeft() (" + root_child0.getComputedLeft() + ")");
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
console.assert(100 === root_child0.getComputedWidth(), "100 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
console.assert(64 === root_child0.getComputedHeight(), "64 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
console.assert(0 === root_child1.getComputedLeft(), "0 === root_child1.getComputedLeft() (" + root_child1.getComputedLeft() + ")");
console.assert(64 === root_child1.getComputedTop(), "64 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
console.assert(100 === root_child1.getComputedWidth(), "100 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
console.assert(25 === root_child1.getComputedHeight(), "25 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
console.assert(0 === root_child2.getComputedLeft(), "0 === root_child2.getComputedLeft() (" + root_child2.getComputedLeft() + ")");
console.assert(89 === root_child2.getComputedTop(), "89 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
console.assert(100 === root_child2.getComputedWidth(), "100 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
console.assert(24 === root_child2.getComputedHeight(), "24 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
} finally {
if (typeof root !== "undefined") {
root.freeRecursive();
}
config.free();
}
});
it("rounding_fractial_input_2", function () {
var config = Yoga.Config.create();
try {
var root = Yoga.Node.create(config);
root.setWidth(100);
root.setHeight(113.6);
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root_child0.setFlexBasis(50);
root_child0.setHeight(20);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(1);
root_child1.setHeight(10);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create(config);
root_child2.setFlexGrow(1);
root_child2.setHeight(10);
root.insertChild(root_child2, 2);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
console.assert(0 === root.getComputedLeft(), "0 === root.getComputedLeft() (" + root.getComputedLeft() + ")");
console.assert(0 === root.getComputedTop(), "0 === root.getComputedTop() (" + root.getComputedTop() + ")");
console.assert(100 === root.getComputedWidth(), "100 === root.getComputedWidth() (" + root.getComputedWidth() + ")");
console.assert(114 === root.getComputedHeight(), "114 === root.getComputedHeight() (" + root.getComputedHeight() + ")");
console.assert(0 === root_child0.getComputedLeft(), "0 === root_child0.getComputedLeft() (" + root_child0.getComputedLeft() + ")");
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
console.assert(100 === root_child0.getComputedWidth(), "100 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
console.assert(65 === root_child0.getComputedHeight(), "65 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
console.assert(0 === root_child1.getComputedLeft(), "0 === root_child1.getComputedLeft() (" + root_child1.getComputedLeft() + ")");
console.assert(65 === root_child1.getComputedTop(), "65 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
console.assert(100 === root_child1.getComputedWidth(), "100 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
console.assert(24 === root_child1.getComputedHeight(), "24 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
console.assert(0 === root_child2.getComputedLeft(), "0 === root_child2.getComputedLeft() (" + root_child2.getComputedLeft() + ")");
console.assert(89 === root_child2.getComputedTop(), "89 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
console.assert(100 === root_child2.getComputedWidth(), "100 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
console.assert(25 === root_child2.getComputedHeight(), "25 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL);
console.assert(0 === root.getComputedLeft(), "0 === root.getComputedLeft() (" + root.getComputedLeft() + ")");
console.assert(0 === root.getComputedTop(), "0 === root.getComputedTop() (" + root.getComputedTop() + ")");
console.assert(100 === root.getComputedWidth(), "100 === root.getComputedWidth() (" + root.getComputedWidth() + ")");
console.assert(114 === root.getComputedHeight(), "114 === root.getComputedHeight() (" + root.getComputedHeight() + ")");
console.assert(0 === root_child0.getComputedLeft(), "0 === root_child0.getComputedLeft() (" + root_child0.getComputedLeft() + ")");
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
console.assert(100 === root_child0.getComputedWidth(), "100 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
console.assert(65 === root_child0.getComputedHeight(), "65 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
console.assert(0 === root_child1.getComputedLeft(), "0 === root_child1.getComputedLeft() (" + root_child1.getComputedLeft() + ")");
console.assert(65 === root_child1.getComputedTop(), "65 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
console.assert(100 === root_child1.getComputedWidth(), "100 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
console.assert(24 === root_child1.getComputedHeight(), "24 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
console.assert(0 === root_child2.getComputedLeft(), "0 === root_child2.getComputedLeft() (" + root_child2.getComputedLeft() + ")");
console.assert(89 === root_child2.getComputedTop(), "89 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
console.assert(100 === root_child2.getComputedWidth(), "100 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
console.assert(25 === root_child2.getComputedHeight(), "25 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
} finally {
if (typeof root !== "undefined") {
root.freeRecursive();
}
config.free();
}
});
it("rounding_fractial_input_3", function () {
var config = Yoga.Config.create();
try {
var root = Yoga.Node.create(config);
root.setPosition(Yoga.EDGE_TOP, 0.3);
root.setWidth(100);
root.setHeight(113.4);
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root_child0.setFlexBasis(50);
root_child0.setHeight(20);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(1);
root_child1.setHeight(10);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create(config);
root_child2.setFlexGrow(1);
root_child2.setHeight(10);
root.insertChild(root_child2, 2);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
console.assert(0 === root.getComputedLeft(), "0 === root.getComputedLeft() (" + root.getComputedLeft() + ")");
console.assert(0 === root.getComputedTop(), "0 === root.getComputedTop() (" + root.getComputedTop() + ")");
console.assert(100 === root.getComputedWidth(), "100 === root.getComputedWidth() (" + root.getComputedWidth() + ")");
console.assert(114 === root.getComputedHeight(), "114 === root.getComputedHeight() (" + root.getComputedHeight() + ")");
console.assert(0 === root_child0.getComputedLeft(), "0 === root_child0.getComputedLeft() (" + root_child0.getComputedLeft() + ")");
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
console.assert(100 === root_child0.getComputedWidth(), "100 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
console.assert(65 === root_child0.getComputedHeight(), "65 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
console.assert(0 === root_child1.getComputedLeft(), "0 === root_child1.getComputedLeft() (" + root_child1.getComputedLeft() + ")");
console.assert(64 === root_child1.getComputedTop(), "64 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
console.assert(100 === root_child1.getComputedWidth(), "100 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
console.assert(24 === root_child1.getComputedHeight(), "24 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
console.assert(0 === root_child2.getComputedLeft(), "0 === root_child2.getComputedLeft() (" + root_child2.getComputedLeft() + ")");
console.assert(89 === root_child2.getComputedTop(), "89 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
console.assert(100 === root_child2.getComputedWidth(), "100 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
console.assert(25 === root_child2.getComputedHeight(), "25 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL);
console.assert(0 === root.getComputedLeft(), "0 === root.getComputedLeft() (" + root.getComputedLeft() + ")");
console.assert(0 === root.getComputedTop(), "0 === root.getComputedTop() (" + root.getComputedTop() + ")");
console.assert(100 === root.getComputedWidth(), "100 === root.getComputedWidth() (" + root.getComputedWidth() + ")");
console.assert(114 === root.getComputedHeight(), "114 === root.getComputedHeight() (" + root.getComputedHeight() + ")");
console.assert(0 === root_child0.getComputedLeft(), "0 === root_child0.getComputedLeft() (" + root_child0.getComputedLeft() + ")");
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
console.assert(100 === root_child0.getComputedWidth(), "100 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
console.assert(65 === root_child0.getComputedHeight(), "65 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
console.assert(0 === root_child1.getComputedLeft(), "0 === root_child1.getComputedLeft() (" + root_child1.getComputedLeft() + ")");
console.assert(64 === root_child1.getComputedTop(), "64 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
console.assert(100 === root_child1.getComputedWidth(), "100 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
console.assert(24 === root_child1.getComputedHeight(), "24 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
console.assert(0 === root_child2.getComputedLeft(), "0 === root_child2.getComputedLeft() (" + root_child2.getComputedLeft() + ")");
console.assert(89 === root_child2.getComputedTop(), "89 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
console.assert(100 === root_child2.getComputedWidth(), "100 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
console.assert(25 === root_child2.getComputedHeight(), "25 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
} finally {
if (typeof root !== "undefined") {
root.freeRecursive();
}
config.free();
}
});
it("rounding_fractial_input_4", function () {
var config = Yoga.Config.create();
try {
var root = Yoga.Node.create(config);
root.setPosition(Yoga.EDGE_TOP, 0.7);
root.setWidth(100);
root.setHeight(113.4);
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root_child0.setFlexBasis(50);
root_child0.setHeight(20);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(1);
root_child1.setHeight(10);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create(config);
root_child2.setFlexGrow(1);
root_child2.setHeight(10);
root.insertChild(root_child2, 2);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
console.assert(0 === root.getComputedLeft(), "0 === root.getComputedLeft() (" + root.getComputedLeft() + ")");
console.assert(1 === root.getComputedTop(), "1 === root.getComputedTop() (" + root.getComputedTop() + ")");
console.assert(100 === root.getComputedWidth(), "100 === root.getComputedWidth() (" + root.getComputedWidth() + ")");
console.assert(113 === root.getComputedHeight(), "113 === root.getComputedHeight() (" + root.getComputedHeight() + ")");
console.assert(0 === root_child0.getComputedLeft(), "0 === root_child0.getComputedLeft() (" + root_child0.getComputedLeft() + ")");
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
console.assert(100 === root_child0.getComputedWidth(), "100 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
console.assert(64 === root_child0.getComputedHeight(), "64 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
console.assert(0 === root_child1.getComputedLeft(), "0 === root_child1.getComputedLeft() (" + root_child1.getComputedLeft() + ")");
console.assert(64 === root_child1.getComputedTop(), "64 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
console.assert(100 === root_child1.getComputedWidth(), "100 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
console.assert(25 === root_child1.getComputedHeight(), "25 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
console.assert(0 === root_child2.getComputedLeft(), "0 === root_child2.getComputedLeft() (" + root_child2.getComputedLeft() + ")");
console.assert(89 === root_child2.getComputedTop(), "89 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
console.assert(100 === root_child2.getComputedWidth(), "100 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
console.assert(24 === root_child2.getComputedHeight(), "24 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL);
console.assert(0 === root.getComputedLeft(), "0 === root.getComputedLeft() (" + root.getComputedLeft() + ")");
console.assert(1 === root.getComputedTop(), "1 === root.getComputedTop() (" + root.getComputedTop() + ")");
console.assert(100 === root.getComputedWidth(), "100 === root.getComputedWidth() (" + root.getComputedWidth() + ")");
console.assert(113 === root.getComputedHeight(), "113 === root.getComputedHeight() (" + root.getComputedHeight() + ")");
console.assert(0 === root_child0.getComputedLeft(), "0 === root_child0.getComputedLeft() (" + root_child0.getComputedLeft() + ")");
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
console.assert(100 === root_child0.getComputedWidth(), "100 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
console.assert(64 === root_child0.getComputedHeight(), "64 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
console.assert(0 === root_child1.getComputedLeft(), "0 === root_child1.getComputedLeft() (" + root_child1.getComputedLeft() + ")");
console.assert(64 === root_child1.getComputedTop(), "64 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
console.assert(100 === root_child1.getComputedWidth(), "100 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
console.assert(25 === root_child1.getComputedHeight(), "25 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
console.assert(0 === root_child2.getComputedLeft(), "0 === root_child2.getComputedLeft() (" + root_child2.getComputedLeft() + ")");
console.assert(89 === root_child2.getComputedTop(), "89 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
console.assert(100 === root_child2.getComputedWidth(), "100 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
console.assert(24 === root_child2.getComputedHeight(), "24 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
} finally {
if (typeof root !== "undefined") {
root.freeRecursive();
}
config.free();
}
});
it("rounding_inner_node_controversy_horizontal", function () {
var config = Yoga.Config.create();
try {
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setWidth(320);
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root_child0.setHeight(10);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(1);
root_child1.setHeight(10);
root.insertChild(root_child1, 1);
var root_child1_child0 = Yoga.Node.create(config);
root_child1_child0.setFlexGrow(1);
root_child1_child0.setHeight(10);
root_child1.insertChild(root_child1_child0, 0);
var root_child2 = Yoga.Node.create(config);
root_child2.setFlexGrow(1);
root_child2.setHeight(10);
root.insertChild(root_child2, 2);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
console.assert(0 === root.getComputedLeft(), "0 === root.getComputedLeft() (" + root.getComputedLeft() + ")");
console.assert(0 === root.getComputedTop(), "0 === root.getComputedTop() (" + root.getComputedTop() + ")");
console.assert(320 === root.getComputedWidth(), "320 === root.getComputedWidth() (" + root.getComputedWidth() + ")");
console.assert(10 === root.getComputedHeight(), "10 === root.getComputedHeight() (" + root.getComputedHeight() + ")");
console.assert(0 === root_child0.getComputedLeft(), "0 === root_child0.getComputedLeft() (" + root_child0.getComputedLeft() + ")");
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
console.assert(107 === root_child0.getComputedWidth(), "107 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
console.assert(10 === root_child0.getComputedHeight(), "10 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
console.assert(107 === root_child1.getComputedLeft(), "107 === root_child1.getComputedLeft() (" + root_child1.getComputedLeft() + ")");
console.assert(0 === root_child1.getComputedTop(), "0 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
console.assert(106 === root_child1.getComputedWidth(), "106 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
console.assert(10 === root_child1.getComputedHeight(), "10 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
console.assert(0 === root_child1_child0.getComputedLeft(), "0 === root_child1_child0.getComputedLeft() (" + root_child1_child0.getComputedLeft() + ")");
console.assert(0 === root_child1_child0.getComputedTop(), "0 === root_child1_child0.getComputedTop() (" + root_child1_child0.getComputedTop() + ")");
console.assert(106 === root_child1_child0.getComputedWidth(), "106 === root_child1_child0.getComputedWidth() (" + root_child1_child0.getComputedWidth() + ")");
console.assert(10 === root_child1_child0.getComputedHeight(), "10 === root_child1_child0.getComputedHeight() (" + root_child1_child0.getComputedHeight() + ")");
console.assert(213 === root_child2.getComputedLeft(), "213 === root_child2.getComputedLeft() (" + root_child2.getComputedLeft() + ")");
console.assert(0 === root_child2.getComputedTop(), "0 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
console.assert(107 === root_child2.getComputedWidth(), "107 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
console.assert(10 === root_child2.getComputedHeight(), "10 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL);
console.assert(0 === root.getComputedLeft(), "0 === root.getComputedLeft() (" + root.getComputedLeft() + ")");
console.assert(0 === root.getComputedTop(), "0 === root.getComputedTop() (" + root.getComputedTop() + ")");
console.assert(320 === root.getComputedWidth(), "320 === root.getComputedWidth() (" + root.getComputedWidth() + ")");
console.assert(10 === root.getComputedHeight(), "10 === root.getComputedHeight() (" + root.getComputedHeight() + ")");
console.assert(213 === root_child0.getComputedLeft(), "213 === root_child0.getComputedLeft() (" + root_child0.getComputedLeft() + ")");
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
console.assert(107 === root_child0.getComputedWidth(), "107 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
console.assert(10 === root_child0.getComputedHeight(), "10 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
console.assert(107 === root_child1.getComputedLeft(), "107 === root_child1.getComputedLeft() (" + root_child1.getComputedLeft() + ")");
console.assert(0 === root_child1.getComputedTop(), "0 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
console.assert(106 === root_child1.getComputedWidth(), "106 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
console.assert(10 === root_child1.getComputedHeight(), "10 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
console.assert(0 === root_child1_child0.getComputedLeft(), "0 === root_child1_child0.getComputedLeft() (" + root_child1_child0.getComputedLeft() + ")");
console.assert(0 === root_child1_child0.getComputedTop(), "0 === root_child1_child0.getComputedTop() (" + root_child1_child0.getComputedTop() + ")");
console.assert(106 === root_child1_child0.getComputedWidth(), "106 === root_child1_child0.getComputedWidth() (" + root_child1_child0.getComputedWidth() + ")");
console.assert(10 === root_child1_child0.getComputedHeight(), "10 === root_child1_child0.getComputedHeight() (" + root_child1_child0.getComputedHeight() + ")");
console.assert(0 === root_child2.getComputedLeft(), "0 === root_child2.getComputedLeft() (" + root_child2.getComputedLeft() + ")");
console.assert(0 === root_child2.getComputedTop(), "0 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
console.assert(107 === root_child2.getComputedWidth(), "107 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
console.assert(10 === root_child2.getComputedHeight(), "10 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
} finally {
if (typeof root !== "undefined") {
root.freeRecursive();
}
config.free();
}
});
it("rounding_inner_node_controversy_vertical", function () {
var config = Yoga.Config.create();
try {
var root = Yoga.Node.create(config);
root.setHeight(320);
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root_child0.setWidth(10);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(1);
root_child1.setWidth(10);
root.insertChild(root_child1, 1);
var root_child1_child0 = Yoga.Node.create(config);
root_child1_child0.setFlexGrow(1);
root_child1_child0.setWidth(10);
root_child1.insertChild(root_child1_child0, 0);
var root_child2 = Yoga.Node.create(config);
root_child2.setFlexGrow(1);
root_child2.setWidth(10);
root.insertChild(root_child2, 2);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
console.assert(0 === root.getComputedLeft(), "0 === root.getComputedLeft() (" + root.getComputedLeft() + ")");
console.assert(0 === root.getComputedTop(), "0 === root.getComputedTop() (" + root.getComputedTop() + ")");
console.assert(10 === root.getComputedWidth(), "10 === root.getComputedWidth() (" + root.getComputedWidth() + ")");
console.assert(320 === root.getComputedHeight(), "320 === root.getComputedHeight() (" + root.getComputedHeight() + ")");
console.assert(0 === root_child0.getComputedLeft(), "0 === root_child0.getComputedLeft() (" + root_child0.getComputedLeft() + ")");
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
console.assert(10 === root_child0.getComputedWidth(), "10 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
console.assert(107 === root_child0.getComputedHeight(), "107 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
console.assert(0 === root_child1.getComputedLeft(), "0 === root_child1.getComputedLeft() (" + root_child1.getComputedLeft() + ")");
console.assert(107 === root_child1.getComputedTop(), "107 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
console.assert(10 === root_child1.getComputedWidth(), "10 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
console.assert(106 === root_child1.getComputedHeight(), "106 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
console.assert(0 === root_child1_child0.getComputedLeft(), "0 === root_child1_child0.getComputedLeft() (" + root_child1_child0.getComputedLeft() + ")");
console.assert(0 === root_child1_child0.getComputedTop(), "0 === root_child1_child0.getComputedTop() (" + root_child1_child0.getComputedTop() + ")");
console.assert(10 === root_child1_child0.getComputedWidth(), "10 === root_child1_child0.getComputedWidth() (" + root_child1_child0.getComputedWidth() + ")");
console.assert(106 === root_child1_child0.getComputedHeight(), "106 === root_child1_child0.getComputedHeight() (" + root_child1_child0.getComputedHeight() + ")");
console.assert(0 === root_child2.getComputedLeft(), "0 === root_child2.getComputedLeft() (" + root_child2.getComputedLeft() + ")");
console.assert(213 === root_child2.getComputedTop(), "213 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
console.assert(10 === root_child2.getComputedWidth(), "10 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
console.assert(107 === root_child2.getComputedHeight(), "107 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL);
console.assert(0 === root.getComputedLeft(), "0 === root.getComputedLeft() (" + root.getComputedLeft() + ")");
console.assert(0 === root.getComputedTop(), "0 === root.getComputedTop() (" + root.getComputedTop() + ")");
console.assert(10 === root.getComputedWidth(), "10 === root.getComputedWidth() (" + root.getComputedWidth() + ")");
console.assert(320 === root.getComputedHeight(), "320 === root.getComputedHeight() (" + root.getComputedHeight() + ")");
console.assert(0 === root_child0.getComputedLeft(), "0 === root_child0.getComputedLeft() (" + root_child0.getComputedLeft() + ")");
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
console.assert(10 === root_child0.getComputedWidth(), "10 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
console.assert(107 === root_child0.getComputedHeight(), "107 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
console.assert(0 === root_child1.getComputedLeft(), "0 === root_child1.getComputedLeft() (" + root_child1.getComputedLeft() + ")");
console.assert(107 === root_child1.getComputedTop(), "107 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
console.assert(10 === root_child1.getComputedWidth(), "10 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
console.assert(106 === root_child1.getComputedHeight(), "106 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
console.assert(0 === root_child1_child0.getComputedLeft(), "0 === root_child1_child0.getComputedLeft() (" + root_child1_child0.getComputedLeft() + ")");
console.assert(0 === root_child1_child0.getComputedTop(), "0 === root_child1_child0.getComputedTop() (" + root_child1_child0.getComputedTop() + ")");
console.assert(10 === root_child1_child0.getComputedWidth(), "10 === root_child1_child0.getComputedWidth() (" + root_child1_child0.getComputedWidth() + ")");
console.assert(106 === root_child1_child0.getComputedHeight(), "106 === root_child1_child0.getComputedHeight() (" + root_child1_child0.getComputedHeight() + ")");
console.assert(0 === root_child2.getComputedLeft(), "0 === root_child2.getComputedLeft() (" + root_child2.getComputedLeft() + ")");
console.assert(213 === root_child2.getComputedTop(), "213 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
console.assert(10 === root_child2.getComputedWidth(), "10 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
console.assert(107 === root_child2.getComputedHeight(), "107 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
} finally {
if (typeof root !== "undefined") {
root.freeRecursive();
}
config.free();
}
});
it("rounding_inner_node_controversy_combined", function () {
var config = Yoga.Config.create();
try {
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setWidth(640);
root.setHeight(320);
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root_child0.setHeight("100%");
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(1);
root_child1.setHeight("100%");
root.insertChild(root_child1, 1);
var root_child1_child0 = Yoga.Node.create(config);
root_child1_child0.setFlexGrow(1);
root_child1_child0.setWidth("100%");
root_child1.insertChild(root_child1_child0, 0);
var root_child1_child1 = Yoga.Node.create(config);
root_child1_child1.setFlexGrow(1);
root_child1_child1.setWidth("100%");
root_child1.insertChild(root_child1_child1, 1);
var root_child1_child1_child0 = Yoga.Node.create(config);
root_child1_child1_child0.setFlexGrow(1);
root_child1_child1_child0.setWidth("100%");
root_child1_child1.insertChild(root_child1_child1_child0, 0);
var root_child1_child2 = Yoga.Node.create(config);
root_child1_child2.setFlexGrow(1);
root_child1_child2.setWidth("100%");
root_child1.insertChild(root_child1_child2, 2);
var root_child2 = Yoga.Node.create(config);
root_child2.setFlexGrow(1);
root_child2.setHeight("100%");
root.insertChild(root_child2, 2);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
console.assert(0 === root.getComputedLeft(), "0 === root.getComputedLeft() (" + root.getComputedLeft() + ")");
console.assert(0 === root.getComputedTop(), "0 === root.getComputedTop() (" + root.getComputedTop() + ")");
console.assert(640 === root.getComputedWidth(), "640 === root.getComputedWidth() (" + root.getComputedWidth() + ")");
console.assert(320 === root.getComputedHeight(), "320 === root.getComputedHeight() (" + root.getComputedHeight() + ")");
console.assert(0 === root_child0.getComputedLeft(), "0 === root_child0.getComputedLeft() (" + root_child0.getComputedLeft() + ")");
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
console.assert(213 === root_child0.getComputedWidth(), "213 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
console.assert(320 === root_child0.getComputedHeight(), "320 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
console.assert(213 === root_child1.getComputedLeft(), "213 === root_child1.getComputedLeft() (" + root_child1.getComputedLeft() + ")");
console.assert(0 === root_child1.getComputedTop(), "0 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
console.assert(214 === root_child1.getComputedWidth(), "214 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
console.assert(320 === root_child1.getComputedHeight(), "320 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
console.assert(0 === root_child1_child0.getComputedLeft(), "0 === root_child1_child0.getComputedLeft() (" + root_child1_child0.getComputedLeft() + ")");
console.assert(0 === root_child1_child0.getComputedTop(), "0 === root_child1_child0.getComputedTop() (" + root_child1_child0.getComputedTop() + ")");
console.assert(214 === root_child1_child0.getComputedWidth(), "214 === root_child1_child0.getComputedWidth() (" + root_child1_child0.getComputedWidth() + ")");
console.assert(107 === root_child1_child0.getComputedHeight(), "107 === root_child1_child0.getComputedHeight() (" + root_child1_child0.getComputedHeight() + ")");
console.assert(0 === root_child1_child1.getComputedLeft(), "0 === root_child1_child1.getComputedLeft() (" + root_child1_child1.getComputedLeft() + ")");
console.assert(107 === root_child1_child1.getComputedTop(), "107 === root_child1_child1.getComputedTop() (" + root_child1_child1.getComputedTop() + ")");
console.assert(214 === root_child1_child1.getComputedWidth(), "214 === root_child1_child1.getComputedWidth() (" + root_child1_child1.getComputedWidth() + ")");
console.assert(106 === root_child1_child1.getComputedHeight(), "106 === root_child1_child1.getComputedHeight() (" + root_child1_child1.getComputedHeight() + ")");
console.assert(0 === root_child1_child1_child0.getComputedLeft(), "0 === root_child1_child1_child0.getComputedLeft() (" + root_child1_child1_child0.getComputedLeft() + ")");
console.assert(0 === root_child1_child1_child0.getComputedTop(), "0 === root_child1_child1_child0.getComputedTop() (" + root_child1_child1_child0.getComputedTop() + ")");
console.assert(214 === root_child1_child1_child0.getComputedWidth(), "214 === root_child1_child1_child0.getComputedWidth() (" + root_child1_child1_child0.getComputedWidth() + ")");
console.assert(106 === root_child1_child1_child0.getComputedHeight(), "106 === root_child1_child1_child0.getComputedHeight() (" + root_child1_child1_child0.getComputedHeight() + ")");
console.assert(0 === root_child1_child2.getComputedLeft(), "0 === root_child1_child2.getComputedLeft() (" + root_child1_child2.getComputedLeft() + ")");
console.assert(213 === root_child1_child2.getComputedTop(), "213 === root_child1_child2.getComputedTop() (" + root_child1_child2.getComputedTop() + ")");
console.assert(214 === root_child1_child2.getComputedWidth(), "214 === root_child1_child2.getComputedWidth() (" + root_child1_child2.getComputedWidth() + ")");
console.assert(107 === root_child1_child2.getComputedHeight(), "107 === root_child1_child2.getComputedHeight() (" + root_child1_child2.getComputedHeight() + ")");
console.assert(427 === root_child2.getComputedLeft(), "427 === root_child2.getComputedLeft() (" + root_child2.getComputedLeft() + ")");
console.assert(0 === root_child2.getComputedTop(), "0 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
console.assert(213 === root_child2.getComputedWidth(), "213 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
console.assert(320 === root_child2.getComputedHeight(), "320 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL);
console.assert(0 === root.getComputedLeft(), "0 === root.getComputedLeft() (" + root.getComputedLeft() + ")");
console.assert(0 === root.getComputedTop(), "0 === root.getComputedTop() (" + root.getComputedTop() + ")");
console.assert(640 === root.getComputedWidth(), "640 === root.getComputedWidth() (" + root.getComputedWidth() + ")");
console.assert(320 === root.getComputedHeight(), "320 === root.getComputedHeight() (" + root.getComputedHeight() + ")");
console.assert(427 === root_child0.getComputedLeft(), "427 === root_child0.getComputedLeft() (" + root_child0.getComputedLeft() + ")");
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
console.assert(213 === root_child0.getComputedWidth(), "213 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
console.assert(320 === root_child0.getComputedHeight(), "320 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
console.assert(213 === root_child1.getComputedLeft(), "213 === root_child1.getComputedLeft() (" + root_child1.getComputedLeft() + ")");
console.assert(0 === root_child1.getComputedTop(), "0 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
console.assert(214 === root_child1.getComputedWidth(), "214 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
console.assert(320 === root_child1.getComputedHeight(), "320 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
console.assert(0 === root_child1_child0.getComputedLeft(), "0 === root_child1_child0.getComputedLeft() (" + root_child1_child0.getComputedLeft() + ")");
console.assert(0 === root_child1_child0.getComputedTop(), "0 === root_child1_child0.getComputedTop() (" + root_child1_child0.getComputedTop() + ")");
console.assert(214 === root_child1_child0.getComputedWidth(), "214 === root_child1_child0.getComputedWidth() (" + root_child1_child0.getComputedWidth() + ")");
console.assert(107 === root_child1_child0.getComputedHeight(), "107 === root_child1_child0.getComputedHeight() (" + root_child1_child0.getComputedHeight() + ")");
console.assert(0 === root_child1_child1.getComputedLeft(), "0 === root_child1_child1.getComputedLeft() (" + root_child1_child1.getComputedLeft() + ")");
console.assert(107 === root_child1_child1.getComputedTop(), "107 === root_child1_child1.getComputedTop() (" + root_child1_child1.getComputedTop() + ")");
console.assert(214 === root_child1_child1.getComputedWidth(), "214 === root_child1_child1.getComputedWidth() (" + root_child1_child1.getComputedWidth() + ")");
console.assert(106 === root_child1_child1.getComputedHeight(), "106 === root_child1_child1.getComputedHeight() (" + root_child1_child1.getComputedHeight() + ")");
console.assert(0 === root_child1_child1_child0.getComputedLeft(), "0 === root_child1_child1_child0.getComputedLeft() (" + root_child1_child1_child0.getComputedLeft() + ")");
console.assert(0 === root_child1_child1_child0.getComputedTop(), "0 === root_child1_child1_child0.getComputedTop() (" + root_child1_child1_child0.getComputedTop() + ")");
console.assert(214 === root_child1_child1_child0.getComputedWidth(), "214 === root_child1_child1_child0.getComputedWidth() (" + root_child1_child1_child0.getComputedWidth() + ")");
console.assert(106 === root_child1_child1_child0.getComputedHeight(), "106 === root_child1_child1_child0.getComputedHeight() (" + root_child1_child1_child0.getComputedHeight() + ")");
console.assert(0 === root_child1_child2.getComputedLeft(), "0 === root_child1_child2.getComputedLeft() (" + root_child1_child2.getComputedLeft() + ")");
console.assert(213 === root_child1_child2.getComputedTop(), "213 === root_child1_child2.getComputedTop() (" + root_child1_child2.getComputedTop() + ")");
console.assert(214 === root_child1_child2.getComputedWidth(), "214 === root_child1_child2.getComputedWidth() (" + root_child1_child2.getComputedWidth() + ")");
console.assert(107 === root_child1_child2.getComputedHeight(), "107 === root_child1_child2.getComputedHeight() (" + root_child1_child2.getComputedHeight() + ")");
console.assert(0 === root_child2.getComputedLeft(), "0 === root_child2.getComputedLeft() (" + root_child2.getComputedLeft() + ")");
console.assert(0 === root_child2.getComputedTop(), "0 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
console.assert(213 === root_child2.getComputedWidth(), "213 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
console.assert(320 === root_child2.getComputedHeight(), "320 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
} finally {
if (typeof root !== "undefined") {
root.freeRecursive();
}
config.free();
}
});
| {
"content_hash": "bffa6a6143208a734844a585ba7ca362",
"timestamp": "",
"source": "github",
"line_count": 1110,
"max_line_length": 187,
"avg_line_length": 74.71441441441442,
"alnum_prop": 0.6682623322441007,
"repo_name": "facebook/css-layout",
"id": "69caba7dee974603bead7a7121e797e4811f79d1",
"size": "83121",
"binary": false,
"copies": "2",
"ref": "refs/heads/main",
"path": "javascript/tests/Facebook.Yoga/YGRoundingTest.js",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "C",
"bytes": "145693"
},
{
"name": "C#",
"bytes": "257813"
},
{
"name": "C++",
"bytes": "570222"
},
{
"name": "HTML",
"bytes": "19254"
},
{
"name": "Java",
"bytes": "225700"
},
{
"name": "JavaScript",
"bytes": "37516"
},
{
"name": "Objective-C",
"bytes": "21708"
},
{
"name": "Python",
"bytes": "15315"
},
{
"name": "Ruby",
"bytes": "1605"
},
{
"name": "Shell",
"bytes": "2485"
}
],
"symlink_target": ""
} |
//
// HierarchicalReportVisitor.cs
//
// Author:
// Craig Fowler <craig@csf-dev.com>
//
// Copyright (c) 2018 Craig Fowler
//
// 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.
using System;
using System.Collections.Generic;
using System.Linq;
namespace CSF.Screenplay.ReportModel.Adapters
{
/// <summary>
/// A wrapper around an <see cref="IReport"/> instance which provides a hierarchy of features, which in turn provide
/// access to their scenarios.
/// </summary>
public class HierarchicalReportAdapter : IProvidesHierarchicalFeatures
{
readonly object syncRoot = new object();
readonly IReport report;
IReadOnlyCollection<IHierarchicalFeature> cachedFeatures;
/// <summary>
/// Gets the scenarios.
/// </summary>
/// <value>The scenarios.</value>
public IEnumerable<IScenario> Scenarios => report.Scenarios;
/// <summary>
/// Gets the metadata.
/// </summary>
/// <value>The metadata.</value>
public ReportMetadata Metadata => report.Metadata;
/// <summary>
/// Gets the features.
/// </summary>
/// <returns>The features.</returns>
public IReadOnlyCollection<IHierarchicalFeature> GetFeatures()
{
lock(syncRoot)
{
if(cachedFeatures == null)
cachedFeatures = GenerateFeatures();
}
return cachedFeatures;
}
IReadOnlyCollection<IHierarchicalFeature> GenerateFeatures()
{
var allFeatureIds = report.Scenarios
.Select(x => x?.Feature?.Name?.Id)
.Where(x => !String.IsNullOrEmpty(x))
.Distinct();
return (from id in allFeatureIds
let feature = report.Scenarios.First(x => x?.Feature?.Name?.Id == id).Feature
select new HierarchicalFeature(feature, report))
.ToArray();
}
/// <summary>
/// Initializes a new instance of the <see cref="T:CSF.Screenplay.Reporting.Adapters.HierarchicalReportAdapter"/> class.
/// </summary>
/// <param name="report">Report.</param>
public HierarchicalReportAdapter(IReport report)
{
if(report == null)
throw new ArgumentNullException(nameof(report));
this.report = report;
}
}
}
| {
"content_hash": "002133db98b0c5bbda07c33962ad8842",
"timestamp": "",
"source": "github",
"line_count": 93,
"max_line_length": 124,
"avg_line_length": 34.634408602150536,
"alnum_prop": 0.6845700093138777,
"repo_name": "csf-dev/CSF.Screenplay",
"id": "ff969ba7dce407ef031df0bce4cbaa1aaeb918c3",
"size": "3223",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "CSF.Screenplay.Reporting/ReportModel/Adapters/HierarchicalReportAdapter.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ASP",
"bytes": "70"
},
{
"name": "Batchfile",
"bytes": "612"
},
{
"name": "C#",
"bytes": "600322"
},
{
"name": "CSS",
"bytes": "10065"
},
{
"name": "Gherkin",
"bytes": "2671"
},
{
"name": "JavaScript",
"bytes": "5129"
},
{
"name": "Shell",
"bytes": "6814"
}
],
"symlink_target": ""
} |
add_import_path "bower_components/foundation/scss"
# Set paths
http_path = "/"
css_dir = "assets/css"
sass_dir = "scss"
images_dir = "assets/img"
javascripts_dir = "assets/js"
| {
"content_hash": "3a03117ecac4accd01b5143d1f1552d8",
"timestamp": "",
"source": "github",
"line_count": 8,
"max_line_length": 50,
"avg_line_length": 22.125,
"alnum_prop": 0.7005649717514124,
"repo_name": "UNStats/old-theme",
"id": "a34ffce33fc309b0b4c9bfb606da5b8fbe783725",
"size": "198",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "config.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "389796"
},
{
"name": "HTML",
"bytes": "217"
},
{
"name": "JavaScript",
"bytes": "398832"
},
{
"name": "Liquid",
"bytes": "11919"
},
{
"name": "Ruby",
"bytes": "332"
}
],
"symlink_target": ""
} |
function triangle() {
// create the Altai Gfx object which initializes
// a WebGL context and the default render state
let gfx = new altai.Gfx({ UseWebGL2: true, Width: 400, Height: 300, Canvas: "triangle-canvas" });
// create a render-pass
let pass = gfx.makePass({
ColorAttachments: [ { ClearColor: [0.5, 0.5, 0.5, 1.0] } ]
});
// a vertex buffer with positions and colors for a triangle
let vertexBuffer = gfx.makeBuffer({
Type: altai.BufferType.VertexBuffer,
Data: new Float32Array([
// positions colors
0.0, 0.5, 0.5, 1.0, 0.0, 0.0, 1.0,
0.5, -0.5, 0.5, 0.0, 1.0, 0.0, 1.0,
-0.5, -0.5, 0.5, 0.0, 0.0, 1.0, 1.0,
]),
});
// create a vertex/fragment shader pair
let shader = gfx.makeShader({
VertexShader: `
attribute vec4 position;
attribute vec4 color;
varying lowp vec4 vColor;
void main(void) {
gl_Position = position;
vColor = color;
}`,
FragmentShader: `
varying lowp vec4 vColor;
void main(void) {
gl_FragColor = vColor;
}`
});
// the pipeline-state object
let pipeline = gfx.makePipeline({
VertexLayouts: [{
Components: [
[ "position", altai.VertexFormat.Float3 ],
[ "color", altai.VertexFormat.Float4 ],
]
}],
Shader: shader,
DepthCmpFunc: altai.CompareFunc.Always,
DepthWriteEnabled: false,
CullFaceEnabled: false,
});
// putting it all together in a draw-state object
let drawState = gfx.makeDrawState({
Pipeline: pipeline,
VertexBuffers: [ vertexBuffer ],
});
function draw() {
gfx.beginPass(pass);
gfx.applyDrawState(drawState);
gfx.draw(0, 3);
gfx.endPass();
gfx.commitFrame(draw);
}
draw();
}
| {
"content_hash": "921d62411b5c703ea2d2e13587933b10",
"timestamp": "",
"source": "github",
"line_count": 68,
"max_line_length": 101,
"avg_line_length": 29.735294117647058,
"alnum_prop": 0.5242334322453017,
"repo_name": "floooh/altai",
"id": "5df03e0e45fe841439ef098728f887f562e8964f",
"size": "2064",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "examples/triangle.ts",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "TypeScript",
"bytes": "62213"
}
],
"symlink_target": ""
} |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>ccs: 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.15.0 / ccs - 8.10.0</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
ccs
<small>
8.10.0
<span class="label label-info">Not compatible 👼</span>
</small>
</h1>
<p>📅 <em><script>document.write(moment("2022-10-01 08:46:06 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-10-01 08:46:06 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.15.0 Formal proof management system
dune 3.4.1 Fast, portable, and opinionated build system
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
ocaml-secondary-compiler 4.08.1-1 OCaml 4.08.1 Secondary Switch Compiler
ocamlfind 1.9.1 A library manager for OCaml
ocamlfind-secondary 1.9.1 Adds support for ocaml-secondary-compiler to ocamlfind
zarith 1.12 Implements arithmetic and logical operations over arbitrary-precision integers
# opam file:
opam-version: "2.0"
maintainer: "Hugo.Herbelin@inria.fr"
homepage: "https://github.com/coq-contribs/ccs"
license: "Unknown"
build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/CCS"]
depends: [
"ocaml"
"coq" {>= "8.10" & < "8.11~"}
]
tags: [
"keyword: Labelled Transitions Systems"
"keyword: process algebras"
"keyword: Calculus of Concurrent Process (CCS)"
"category: Computer Science/Concurrent Systems and Protocols/Theory of concurrent systems"
]
authors: [
"Solange Coupet-Grimal"
]
bug-reports: "https://github.com/coq-contribs/ccs/issues"
dev-repo: "git+https://github.com/coq-contribs/ccs.git"
synopsis: "Equivalence notions on labelled transitions systems"
description: """
We give the specification of three different notions of equivalence
classically defined on labelled transitions systems underlying the
theories of process algebra (and particularly CCS). The fundamentals
properties of these equivalence notions are proven."""
flags: light-uninstall
url {
src: "https://github.com/coq-contribs/ccs/archive/v8.10.0.tar.gz"
checksum: "md5=ca4da241b945c5825abbfddff139939f"
}
</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-ccs.8.10.0 coq.8.15.0</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.15.0).
The following dependencies couldn't be met:
- coq-ccs -> coq < 8.11~ -> 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-ccs.8.10.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": "aa7086ee58a6aaee7ee9053c0fb81962",
"timestamp": "",
"source": "github",
"line_count": 177,
"max_line_length": 159,
"avg_line_length": 41.92090395480226,
"alnum_prop": 0.5520215633423181,
"repo_name": "coq-bench/coq-bench.github.io",
"id": "4d5b3ff01f177fd09d1f1e0d79de248dd522feb4",
"size": "7445",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "clean/Linux-x86_64-4.06.1-2.0.5/released/8.15.0/ccs/8.10.0.html",
"mode": "33188",
"license": "mit",
"language": [],
"symlink_target": ""
} |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_212) on Thu Nov 07 15:58:19 CET 2019 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Uses of Class com.contactlab.api.ws.FindSubscribersByResponse (ContactLab SOAP API Java Client - NEXT 2.23.0 API)</title>
<meta name="date" content="2019-11-07">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Class com.contactlab.api.ws.FindSubscribersByResponse (ContactLab SOAP API Java Client - NEXT 2.23.0 API)";
}
}
catch(err) {
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../com/contactlab/api/ws/FindSubscribersByResponse.html" title="class in com.contactlab.api.ws">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?com/contactlab/api/ws/class-use/FindSubscribersByResponse.html" target="_top">Frames</a></li>
<li><a href="FindSubscribersByResponse.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h2 title="Uses of Class com.contactlab.api.ws.FindSubscribersByResponse" class="title">Uses of Class<br>com.contactlab.api.ws.FindSubscribersByResponse</h2>
</div>
<div class="classUseContainer">
<ul class="blockList">
<li class="blockList">
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation">
<caption><span>Packages that use <a href="../../../../../com/contactlab/api/ws/FindSubscribersByResponse.html" title="class in com.contactlab.api.ws">FindSubscribersByResponse</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Package</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="#com.contactlab.api.ws">com.contactlab.api.ws</a></td>
<td class="colLast">
<div class="block">Copyright 2012-2015 ContactLab, Italy
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.</div>
</td>
</tr>
</tbody>
</table>
</li>
<li class="blockList">
<ul class="blockList">
<li class="blockList"><a name="com.contactlab.api.ws">
<!-- -->
</a>
<h3>Uses of <a href="../../../../../com/contactlab/api/ws/FindSubscribersByResponse.html" title="class in com.contactlab.api.ws">FindSubscribersByResponse</a> in <a href="../../../../../com/contactlab/api/ws/package-summary.html">com.contactlab.api.ws</a></h3>
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation">
<caption><span>Methods in <a href="../../../../../com/contactlab/api/ws/package-summary.html">com.contactlab.api.ws</a> that return <a href="../../../../../com/contactlab/api/ws/FindSubscribersByResponse.html" title="class in com.contactlab.api.ws">FindSubscribersByResponse</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../com/contactlab/api/ws/FindSubscribersByResponse.html" title="class in com.contactlab.api.ws">FindSubscribersByResponse</a></code></td>
<td class="colLast"><span class="typeNameLabel">ObjectFactory.</span><code><span class="memberNameLink"><a href="../../../../../com/contactlab/api/ws/ObjectFactory.html#createFindSubscribersByResponse--">createFindSubscribersByResponse</a></span>()</code>
<div class="block">Create an instance of <a href="../../../../../com/contactlab/api/ws/FindSubscribersByResponse.html" title="class in com.contactlab.api.ws"><code>FindSubscribersByResponse</code></a></div>
</td>
</tr>
</tbody>
</table>
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation">
<caption><span>Methods in <a href="../../../../../com/contactlab/api/ws/package-summary.html">com.contactlab.api.ws</a> that return types with arguments of type <a href="../../../../../com/contactlab/api/ws/FindSubscribersByResponse.html" title="class in com.contactlab.api.ws">FindSubscribersByResponse</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code>javax.xml.bind.JAXBElement<<a href="../../../../../com/contactlab/api/ws/FindSubscribersByResponse.html" title="class in com.contactlab.api.ws">FindSubscribersByResponse</a>></code></td>
<td class="colLast"><span class="typeNameLabel">ObjectFactory.</span><code><span class="memberNameLink"><a href="../../../../../com/contactlab/api/ws/ObjectFactory.html#createFindSubscribersByResponse-com.contactlab.api.ws.FindSubscribersByResponse-">createFindSubscribersByResponse</a></span>(<a href="../../../../../com/contactlab/api/ws/FindSubscribersByResponse.html" title="class in com.contactlab.api.ws">FindSubscribersByResponse</a> value)</code>
<div class="block">Create an instance of <code>JAXBElement</code><code><</code><a href="../../../../../com/contactlab/api/ws/FindSubscribersByResponse.html" title="class in com.contactlab.api.ws"><code>FindSubscribersByResponse</code></a><code>></code>}</div>
</td>
</tr>
</tbody>
</table>
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation">
<caption><span>Methods in <a href="../../../../../com/contactlab/api/ws/package-summary.html">com.contactlab.api.ws</a> with parameters of type <a href="../../../../../com/contactlab/api/ws/FindSubscribersByResponse.html" title="class in com.contactlab.api.ws">FindSubscribersByResponse</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code>javax.xml.bind.JAXBElement<<a href="../../../../../com/contactlab/api/ws/FindSubscribersByResponse.html" title="class in com.contactlab.api.ws">FindSubscribersByResponse</a>></code></td>
<td class="colLast"><span class="typeNameLabel">ObjectFactory.</span><code><span class="memberNameLink"><a href="../../../../../com/contactlab/api/ws/ObjectFactory.html#createFindSubscribersByResponse-com.contactlab.api.ws.FindSubscribersByResponse-">createFindSubscribersByResponse</a></span>(<a href="../../../../../com/contactlab/api/ws/FindSubscribersByResponse.html" title="class in com.contactlab.api.ws">FindSubscribersByResponse</a> value)</code>
<div class="block">Create an instance of <code>JAXBElement</code><code><</code><a href="../../../../../com/contactlab/api/ws/FindSubscribersByResponse.html" title="class in com.contactlab.api.ws"><code>FindSubscribersByResponse</code></a><code>></code>}</div>
</td>
</tr>
</tbody>
</table>
</li>
</ul>
</li>
</ul>
</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../com/contactlab/api/ws/FindSubscribersByResponse.html" title="class in com.contactlab.api.ws">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?com/contactlab/api/ws/class-use/FindSubscribersByResponse.html" target="_top">Frames</a></li>
<li><a href="FindSubscribersByResponse.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright © 2019 <a href="http://www.contactlab.com">ContactLab</a>. All Rights Reserved.</small></p>
</body>
</html>
| {
"content_hash": "ab69c7d887b259904c4aaffd5575af67",
"timestamp": "",
"source": "github",
"line_count": 203,
"max_line_length": 459,
"avg_line_length": 51.827586206896555,
"alnum_prop": 0.673510122611919,
"repo_name": "contactlab/soap-api-java-client-next",
"id": "a600c61d30ae1d7316b90dc1f04aa4ebd5f1f5fa",
"size": "10521",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "target/apidocs/com/contactlab/api/ws/class-use/FindSubscribersByResponse.html",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "12842"
},
{
"name": "HTML",
"bytes": "13839967"
},
{
"name": "Java",
"bytes": "1417219"
},
{
"name": "JavaScript",
"bytes": "827"
}
],
"symlink_target": ""
} |
<template name="caseModal" id="caseModalTemplate">
<div class="modal" id="caseModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header" id="modalHead"><h3>{{caseNum}}</h3></div>
<div class="modal-body" id="modalBody">
<table class="table table-striped" id="modalTable">
<tbody id="modalTableData">
{{#each arrayify featureProperties}}
<tr>
<td class='case-property'>{{humanReadableName name}}:</td><td>{{value}}</td>
</tr>
{{/each}}
</tbody>
</table>
<button type='button'
class='btn btn-primary modal-btn btn-show-docs'
data-casenumber={{caseNum}}
>Docs</button>
<button type='button' class='btn btn-primary modal-btn btn-fb-discussion'>Discuss</button>
<!--
<button
id='btn-subscribe-project'
type='button'
data-casenumber='{{caseNum}}'
class='btn btn-primary modal-btn btn-subscribe-project {{#if cannotSubscribeToProject}}disabled{{/if}}'
>Subscribe</button>
-->
<!-- <button id="clicker2" class="btn btn-primary" onclick="repeater()">Introduce yourself on facebook:</button>-->
<!--
<script type="text/javascript">
function repeater(){
FB.getLoginStatus(function(response) {
if (response.status === 'connected') {
// the user is logged in and has authenticated your
// app, and response.authResponse supplies
// the user's ID, a valid access token, a signed
// request, and the time the access token
// and signed request each expire
// var uid = response.authResponse.userID;
// var accessToken = response.authResponse.accessToken;
// console.log('uid= ', uid);
// console.log('accessToken= ', accessToken);
// localhost 109055546115993 c3poDev page id = 914491901967402
// , {scope: 'publish_actions'}
// function fbResult (response) {
// if (!response || response.error) {
// console.log('error on FB post ' + (JSON.stringify(response.error) || null) + "*****\n")
// } else {
// console.log('post id = ' + JSON.stringify(response));
// }
// }
//
//// FB.api('/914491901967402/feed', 'get', {scope: 'publish_actions'},fbResult(response));
// FB.api('/914491901967402/feed', 'post', {message: 'We have a new person joining the chat! Introducing: '+FB.getUserID()},
// // meteor.com
//// FB.api('/e: 'publish_actions'}
//// FB.api('/914491901967402/feed', 'post', {message: 'We have a new person joining the chat! Introducing: '+FB.getUserID(), scope: 'publish_actions'},
// function(response){
// if (!response || response.error) {
// console.log('error on FB post ' + (JSON.stringify(response.error) || null) + "*****\n")
// } else {
// console.log('post id = ' + JSON.stringify(response));
// }
// });
//
// console.log('done' + FB.getUserID());
} else if (response.status === 'not_authorized') {
console.log('not connected');
// the user is logged in to Facebook,
// but has not authenticated your app
} else {
alert("You must login with Facebook to make this post");
// todo: offer an anonymous post capability
console.log('problem');
// the user isn't logged in to Facebook.
}
});
// ALTERNATELY THE FOLLOWING CODE INCLUDES LOG-IN OPTIONS
// FB.login(function(test){
// // Note: The call will only work if you accept the permission request
// FB.api('/boulderc3po/feed', 'post', {message: 'We have a new person joining the chat! Introducing: '+FB.getUserID()});
// }, {scope: 'publish_actions'});
};
</script>
-->
</div>
<div class="modal-footer">
<button type="button" id="btn-prev" class="btn {{#if noPrev}}disabled{{/if}}"
data-casenumber='{{caseNum}}'
data-properties='{{featureProperties}}'
data-cansubscribe='{{canSubscribeToProject}}'>Prev</button>
<button type="button" id="btn-next" class="btn {{#if noNext}}disabled{{/if}}"
data-casenumber='{{caseNum}}'
data-properties='{{featureProperties}}'
data-cansubscribe='{{canSubscribeToProject}}'>Next</button>
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<div id="disqus_thread" hidden="true"></div>
<script>
/**
* RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
* LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables
*/
var caseNumb = '{{caseNum}}';
var caseTrim = caseNumb.trim();
var disqus_config = function () {
this.page.url = "https://disqus.com/api/3.0" + caseTrim;
this.page.identifier = caseTrim;
this.page.title = caseTrim;
};
// second instatiation
{{> disqus title="my page title"}}
(function() { // REQUIRED CONFIGURATION VARIABLE: EDIT THE SHORTNAME BELOW
var d = document, s = d.createElement('script');
s.src = '//greatwhiterabbit.disqus.com/embed.js'; // IMPORTANT: Replace EXAMPLE with your forum shortname!
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
</div>
</div>
</div>
</div>
</template>
| {
"content_hash": "775d846a6e8bb8fb361355cae55b459c",
"timestamp": "",
"source": "github",
"line_count": 151,
"max_line_length": 163,
"avg_line_length": 43.25165562913907,
"alnum_prop": 0.5215127851783801,
"repo_name": "CodeForBoulder/c3po",
"id": "2fa7af1a71f8378ecf79a9b0bc05ca9ed0f7d60a",
"size": "6531",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "imports/ui/caseModal.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "1813"
},
{
"name": "HTML",
"bytes": "8013"
},
{
"name": "JavaScript",
"bytes": "30358"
},
{
"name": "Shell",
"bytes": "2568"
}
],
"symlink_target": ""
} |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="ca" version="2.0">
<defaucmcodec>UTF-8</defaucmcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Communistcoin</source>
<translation>A prop de Communistcoin</translation>
</message>
<message>
<location line="+39"/>
<source><b>Communistcoin</b> version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+57"/>
<source>
This is experimental software.
Distributed under the MIT/X11 software license, see the accompanying file COPYING 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 (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../aboutdialog.cpp" line="+14"/>
<source>Copyright</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>The Communistcoin developers</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>AddressBookPage</name>
<message>
<location filename="../forms/addressbookpage.ui" line="+14"/>
<source>Address Book</source>
<translation>Llibreta d'adreçes</translation>
</message>
<message>
<location line="+19"/>
<source>Double-click to edit address or label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+27"/>
<source>Create a new address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>Copy the currently selected address to the system clipboard</source>
<translation>Copia la selecció actual al porta-retalls del sistema</translation>
</message>
<message>
<location line="-11"/>
<source>&New Address</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../addressbookpage.cpp" line="+63"/>
<source>These are your Communistcoin 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"/>
</message>
<message>
<location filename="../forms/addressbookpage.ui" line="+14"/>
<source>&Copy Address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Show &QR Code</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Sign a message to prove you own a Communistcoin address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Sign &Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>Delete the currently selected address from the list</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+27"/>
<source>Export the data in the current tab to a file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Export</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-44"/>
<source>Verify a message to ensure it was signed with a specified Communistcoin address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Verify Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>&Delete</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../addressbookpage.cpp" line="-5"/>
<source>These are your Communistcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Copy &Label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>&Edit</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Send &Coins</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+260"/>
<source>Export Address Book Data</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Error exporting</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>AddressTableModel</name>
<message>
<location filename="../addresstablemodel.cpp" line="+144"/>
<source>Label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+36"/>
<source>(no label)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>AskPassphraseDialog</name>
<message>
<location filename="../forms/askpassphrasedialog.ui" line="+26"/>
<source>Passphrase Dialog</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>Enter passphrase</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>New passphrase</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>Repeat new passphrase</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../askpassphrasedialog.cpp" line="+33"/>
<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 type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Encrypt wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>This operation needs your wallet passphrase to unlock the wallet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Unlock wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>This operation needs your wallet passphrase to decrypt the wallet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Decrypt wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Change passphrase</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Enter the old and new passphrase to the wallet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+46"/>
<source>Confirm wallet encryption</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR LITECOINS</b>!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Are you sure you wish to encrypt your wallet?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+100"/>
<location line="+24"/>
<source>Warning: The Caps Lock key is on!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-130"/>
<location line="+58"/>
<source>Wallet encrypted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-56"/>
<source>Communistcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your communistcoins from being stolen by malware infecting your computer.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<location line="+7"/>
<location line="+42"/>
<location line="+6"/>
<source>Wallet encryption failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-54"/>
<source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<location line="+48"/>
<source>The supplied passphrases do not match.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-37"/>
<source>Wallet unlock failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<location line="+11"/>
<location line="+19"/>
<source>The passphrase entered for the wallet decryption was incorrect.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-20"/>
<source>Wallet decryption failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>Wallet passphrase was successfully changed.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>BitcoinGUI</name>
<message>
<location filename="../bitcoingui.cpp" line="+233"/>
<source>Sign &message...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+280"/>
<source>Synchronizing with network...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-349"/>
<source>&Overview</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show general overview of wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+20"/>
<source>&Transactions</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Browse transaction history</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Edit the list of stored addresses and labels</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-14"/>
<source>Show the list of addresses for receiving payments</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+31"/>
<source>E&xit</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Quit application</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Show information about Communistcoin</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>About &Qt</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show information about Qt</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>&Options...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>&Encrypt Wallet...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Backup Wallet...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>&Change Passphrase...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+285"/>
<source>Importing blocks from disk...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Reindexing blocks on disk...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-347"/>
<source>Send coins to a Communistcoin address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+49"/>
<source>Modify configuration options for Communistcoin</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>Backup wallet to another location</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Change the passphrase used for wallet encryption</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>&Debug window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Open debugging and diagnostic console</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-4"/>
<source>&Verify message...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-165"/>
<location line="+530"/>
<source>Communistcoin</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-530"/>
<source>Wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+101"/>
<source>&Send</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>&Receive</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>&Addresses</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+22"/>
<source>&About Communistcoin</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>&Show / Hide</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show or hide the main Window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Encrypt the private keys that belong to your wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Sign messages with your Communistcoin addresses to prove you own them</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Verify messages to ensure they were signed with specified Communistcoin addresses</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+28"/>
<source>&File</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>&Settings</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>&Help</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>Tabs toolbar</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<location line="+10"/>
<source>[testnet]</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+47"/>
<source>Communistcoin client</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+141"/>
<source>%n active connection(s) to Communistcoin network</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+22"/>
<source>No block source available...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+12"/>
<source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Processed %1 blocks of transaction history.</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+20"/>
<source>%n hour(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n day(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n week(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+4"/>
<source>%1 behind</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>Last received block was generated %1 ago.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Transactions after this will not yet be visible.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+22"/>
<source>Error</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Warning</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+70"/>
<source>This transaction is over the size limit. You can still send it for a fee of %1, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-140"/>
<source>Up to date</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+31"/>
<source>Catching up...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+113"/>
<source>Confirm transaction fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Sent transaction</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Incoming transaction</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Date: %1
Amount: %2
Type: %3
Address: %4
</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+33"/>
<location line="+23"/>
<source>URI handling</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-23"/>
<location line="+23"/>
<source>URI can not be parsed! This can be caused by an invalid Communistcoin address or malformed URI parameters.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<source>Wallet is <b>encrypted</b> and currently <b>unlocked</b></source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Wallet is <b>encrypted</b> and currently <b>locked</b></source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../bitcoin.cpp" line="+111"/>
<source>A fatal error occurred. Communistcoin can no longer continue safely and will quit.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>ClientModel</name>
<message>
<location filename="../clientmodel.cpp" line="+104"/>
<source>Network Alert</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>EditAddressDialog</name>
<message>
<location filename="../forms/editaddressdialog.ui" line="+14"/>
<source>Edit Address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>&Label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>The label associated with this address book entry</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>&Address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>The address associated with this address book entry. This can only be modified for sending addresses.</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../editaddressdialog.cpp" line="+21"/>
<source>New receiving address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>New sending address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Edit receiving address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Edit sending address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+76"/>
<source>The entered address "%1" is already in the address book.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-5"/>
<source>The entered address "%1" is not a valid Communistcoin address.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Could not unlock wallet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>New key generation failed.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>GUIUtil::HelpMessageBox</name>
<message>
<location filename="../guiutil.cpp" line="+424"/>
<location line="+12"/>
<source>Communistcoin-Qt</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-12"/>
<source>version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Usage:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>command-line options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>UI options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Set language, for example "de_DE" (default: system locale)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Start minimized</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show splash screen on startup (default: 1)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>OptionsDialog</name>
<message>
<location filename="../forms/optionsdialog.ui" line="+14"/>
<source>Options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>&Main</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>Pay transaction &fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+31"/>
<source>Automatically start Communistcoin after logging in to the system.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Start Communistcoin on system login</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>Reset all client options to default.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Reset Options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>&Network</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Automatically open the Communistcoin client port on the router. This only works when your router supports UPnP and it is enabled.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Map port using &UPnP</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Connect to the Communistcoin network through a SOCKS proxy (e.g. when connecting through Tor).</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Connect through SOCKS proxy:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>Proxy &IP:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>IP address of the proxy (e.g. 127.0.0.1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>&Port:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>Port of the proxy (e.g. 9050)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>SOCKS &Version:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>SOCKS version of the proxy (e.g. 5)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+36"/>
<source>&Window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Show only a tray icon after minimizing the window.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Minimize to the tray instead of the taskbar</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<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 type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>M&inimize on close</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>&Display</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>User Interface &language:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>The user interface language can be set here. This setting will take effect after restarting Communistcoin.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>&Unit to show amounts in:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>Whether to show Communistcoin addresses in the transaction list or not.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Display addresses in transaction list</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+71"/>
<source>&OK</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>&Cancel</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>&Apply</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../optionsdialog.cpp" line="+53"/>
<source>default</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+130"/>
<source>Confirm options reset</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Some settings may require a client restart to take effect.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Do you want to proceed?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+42"/>
<location line="+9"/>
<source>Warning</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-9"/>
<location line="+9"/>
<source>This setting will take effect after restarting Communistcoin.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+29"/>
<source>The supplied proxy address is invalid.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>OverviewPage</name>
<message>
<location filename="../forms/overviewpage.ui" line="+14"/>
<source>Form</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+50"/>
<location line="+166"/>
<source>The displayed information may be out of date. Your wallet automatically synchronizes with the Communistcoin network after a connection is established, but this process has not completed yet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-124"/>
<source>Balance:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+29"/>
<source>Unconfirmed:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-78"/>
<source>Wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+107"/>
<source>Immature:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Mined balance that has not yet matured</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+46"/>
<source><b>Recent transactions</b></source>
<translation type="unfinished"/>
</message>
<message>
<location line="-101"/>
<source>Your current balance</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+29"/>
<source>Total of transactions that have yet to be confirmed, and do not yet count toward the current balance</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../overviewpage.cpp" line="+116"/>
<location line="+1"/>
<source>out of sync</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>PaymentServer</name>
<message>
<location filename="../paymentserver.cpp" line="+107"/>
<source>Cannot start communistcoin: click-to-pay handler</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>QRCodeDialog</name>
<message>
<location filename="../forms/qrcodedialog.ui" line="+14"/>
<source>QR Code Dialog</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+59"/>
<source>Request Payment</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+56"/>
<source>Amount:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-44"/>
<source>Label:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>Message:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+71"/>
<source>&Save As...</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../qrcodedialog.cpp" line="+62"/>
<source>Error encoding URI into QR Code.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+40"/>
<source>The entered amount is invalid, please check.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Resulting URI too long, try to reduce the text for label / message.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>Save QR Code</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>PNG Images (*.png)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>RPCConsole</name>
<message>
<location filename="../forms/rpcconsole.ui" line="+46"/>
<source>Client name</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<location line="+23"/>
<location line="+26"/>
<location line="+23"/>
<location line="+23"/>
<location line="+36"/>
<location line="+53"/>
<location line="+23"/>
<location line="+23"/>
<location filename="../rpcconsole.cpp" line="+339"/>
<source>N/A</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-217"/>
<source>Client version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-45"/>
<source>&Information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+68"/>
<source>Using OpenSSL version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+49"/>
<source>Startup time</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+29"/>
<source>Network</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Number of connections</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>On testnet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Block chain</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Current number of blocks</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Estimated total blocks</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Last block time</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+52"/>
<source>&Open</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Command-line options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Show the Communistcoin-Qt help message to get a list with possible Communistcoin command-line options.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Show</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+24"/>
<source>&Console</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-260"/>
<source>Build date</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-104"/>
<source>Communistcoin - Debug window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>Communistcoin Core</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+279"/>
<source>Debug log file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Open the Communistcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+102"/>
<source>Clear console</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../rpcconsole.cpp" line="-30"/>
<source>Welcome to the Communistcoin RPC console.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Type <b>help</b> for an overview of available commands.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SendCoinsDialog</name>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="+14"/>
<location filename="../sendcoinsdialog.cpp" line="+124"/>
<location line="+5"/>
<location line="+5"/>
<location line="+5"/>
<location line="+6"/>
<location line="+5"/>
<location line="+5"/>
<source>Send Coins</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+50"/>
<source>Send to multiple recipients at once</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Add &Recipient</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+20"/>
<source>Remove all transaction fields</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Clear &All</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+22"/>
<source>Balance:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>123.456 BTC</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+31"/>
<source>Confirm the send action</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>S&end</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="-59"/>
<source><b>%1</b> to %2 (%3)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Confirm send coins</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Are you sure you want to send %1?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source> and </source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>The recipient address is not valid, please recheck.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>The amount to pay must be larger than 0.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>The amount exceeds your balance.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>The total exceeds your balance when the %1 transaction fee is included.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Duplicate address found, can only send to each address once per send operation.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Error: Transaction creation failed!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<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"/>
</message>
</context>
<context>
<name>SendCoinsEntry</name>
<message>
<location filename="../forms/sendcoinsentry.ui" line="+14"/>
<source>Form</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>A&mount:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Pay &To:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+34"/>
<source>The address to send the payment to (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+60"/>
<location filename="../sendcoinsentry.cpp" line="+26"/>
<source>Enter a label for this address to add it to your address book</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-78"/>
<source>&Label:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+28"/>
<source>Choose address from address book</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Alt+A</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Paste address from clipboard</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Alt+P</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Remove this recipient</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../sendcoinsentry.cpp" line="+1"/>
<source>Enter a Communistcoin address (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SignVerifyMessageDialog</name>
<message>
<location filename="../forms/signverifymessagedialog.ui" line="+14"/>
<source>Signatures - Sign / Verify a Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>&Sign Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<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"/>
</message>
<message>
<location line="+18"/>
<source>The address to sign the message with (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<location line="+213"/>
<source>Choose an address from the address book</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-203"/>
<location line="+213"/>
<source>Alt+A</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-203"/>
<source>Paste address from clipboard</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Alt+P</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+12"/>
<source>Enter the message you want to sign here</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Signature</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+27"/>
<source>Copy the current signature to the system clipboard</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>Sign the message to prove you own this Communistcoin address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Sign &Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>Reset all sign message fields</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<location line="+146"/>
<source>Clear &All</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-87"/>
<source>&Verify Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<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"/>
</message>
<message>
<location line="+21"/>
<source>The address the message was signed with (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+40"/>
<source>Verify the message to ensure it was signed with the specified Communistcoin address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Verify &Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>Reset all verify message fields</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../signverifymessagedialog.cpp" line="+27"/>
<location line="+3"/>
<source>Enter a Communistcoin address (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-2"/>
<source>Click "Sign Message" to generate signature</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Enter Communistcoin signature</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+82"/>
<location line="+81"/>
<source>The entered address is invalid.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-81"/>
<location line="+8"/>
<location line="+73"/>
<location line="+8"/>
<source>Please check the address and try again.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-81"/>
<location line="+81"/>
<source>The entered address does not refer to a key.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-73"/>
<source>Wallet unlock was cancelled.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Private key for the entered address is not available.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+12"/>
<source>Message signing failed.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Message signed.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+59"/>
<source>The signature could not be decoded.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<location line="+13"/>
<source>Please check the signature and try again.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>The signature did not match the message digest.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Message verification failed.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Message verified.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SplashScreen</name>
<message>
<location filename="../splashscreen.cpp" line="+22"/>
<source>The Communistcoin developers</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>[testnet]</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>TransactionDesc</name>
<message>
<location filename="../transactiondesc.cpp" line="+20"/>
<source>Open until %1</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>%1/offline</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>%1/unconfirmed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>%1 confirmations</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+18"/>
<source>Status</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+7"/>
<source>, broadcast through %n node(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+4"/>
<source>Date</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Source</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Generated</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<location line="+17"/>
<source>From</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<location line="+22"/>
<location line="+58"/>
<source>To</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-77"/>
<location line="+2"/>
<source>own address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-2"/>
<source>label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+37"/>
<location line="+12"/>
<location line="+45"/>
<location line="+17"/>
<location line="+30"/>
<source>Credit</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="-102"/>
<source>matures in %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+2"/>
<source>not accepted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+44"/>
<location line="+8"/>
<location line="+15"/>
<location line="+30"/>
<source>Debit</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-39"/>
<source>Transaction fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Net amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Comment</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Transaction ID</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Generated coins must mature 120 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, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Debug information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Transaction</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Inputs</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>true</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>false</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-209"/>
<source>, has not been successfully broadcast yet</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="-35"/>
<source>Open for %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+70"/>
<source>unknown</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>TransactionDescDialog</name>
<message>
<location filename="../forms/transactiondescdialog.ui" line="+14"/>
<source>Transaction details</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>This pane shows a detailed description of the transaction</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>TransactionTableModel</name>
<message>
<location filename="../transactiontablemodel.cpp" line="+225"/>
<source>Date</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Type</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Amount</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+57"/>
<source>Open for %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+3"/>
<source>Open until %1</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Offline (%1 confirmations)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Unconfirmed (%1 of %2 confirmations)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Confirmed (%1 confirmations)</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+8"/>
<source>Mined balance will be available when it matures in %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+5"/>
<source>This block was not received by any other nodes and will probably not be accepted!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Generated but not accepted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+43"/>
<source>Received with</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Received from</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Sent to</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Payment to yourself</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Mined</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+38"/>
<source>(n/a)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+199"/>
<source>Transaction status. Hover over this field to show number of confirmations.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Date and time that the transaction was received.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Type of transaction.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Destination address of transaction.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Amount removed from or added to balance.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>TransactionView</name>
<message>
<location filename="../transactionview.cpp" line="+52"/>
<location line="+16"/>
<source>All</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-15"/>
<source>Today</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>This week</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>This month</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Last month</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>This year</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Range...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Received with</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Sent to</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>To yourself</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Mined</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Other</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Enter address or label to search</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Min amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+34"/>
<source>Copy address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy transaction ID</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Edit label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show transaction details</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+139"/>
<source>Export Transaction Data</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Confirmed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Date</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Type</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>ID</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Error exporting</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+100"/>
<source>Range:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>to</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>WalletModel</name>
<message>
<location filename="../walletmodel.cpp" line="+193"/>
<source>Send Coins</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>WalletView</name>
<message>
<location filename="../walletview.cpp" line="+42"/>
<source>&Export</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Export the data in the current tab to a file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+193"/>
<source>Backup Wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Wallet Data (*.dat)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Backup Failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>There was an error trying to save the wallet data to the new location.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Backup Successful</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>The wallet data was successfully saved to the new location.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>bitcoin-core</name>
<message>
<location filename="../bitcoinstrings.cpp" line="+94"/>
<source>Communistcoin version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+102"/>
<source>Usage:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-29"/>
<source>Send command to -server or communistcoind</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-23"/>
<source>List commands</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-12"/>
<source>Get help for a command</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+24"/>
<source>Options:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+24"/>
<source>Specify configuration file (default: communistcoin.conf)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Specify pid file (default: communistcoind.pid)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Specify data directory</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-9"/>
<source>Set database cache size in megabytes (default: 25)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-28"/>
<source>Listen for connections on <port> (default: 9333 or testnet: 19333)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Maintain at most <n> connections to peers (default: 125)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-48"/>
<source>Connect to a node to retrieve peer addresses, and disconnect</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+82"/>
<source>Specify your own public address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Threshold for disconnecting misbehaving peers (default: 100)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-134"/>
<source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-29"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+27"/>
<source>Listen for JSON-RPC connections on <port> (default: 9332 or testnet: 19332)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+37"/>
<source>Accept command line and JSON-RPC commands</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+76"/>
<source>Run in the background as a daemon and accept commands</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+37"/>
<source>Use the test network</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-112"/>
<source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-80"/>
<source>%s, you must set a rpcpassword in the configuration file:
%s
It is recommended you use the following random password:
rpcuser=communistcoinrpc
rpcpassword=%s
(you do not need to remember this password)
The username and password MUST NOT be the same.
If the file does not exist, create it with owner-readable-only file permissions.
It is also recommended to set alertnotify so you are notified of problems;
for example: alertnotify=echo %%s | mail -s "Communistcoin Alert" admin@foo.com
</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Cannot obtain a lock on data directory %s. Communistcoin is probably already running.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<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"/>
</message>
<message>
<location line="+4"/>
<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"/>
</message>
<message>
<location line="+3"/>
<source>Execute command when a relevant alert is received (%s in cmd is replaced by message)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Warning: Please check that your computer's date and time are correct! If your clock is wrong Communistcoin will not work properly.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>Attempt to recover private keys from a corrupt wallet.dat</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Block creation options:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Connect only to the specified node(s)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Corrupted block database detected</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Discover own IP address (default: 1 when listening and no -externalip)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Do you want to rebuild the block database now?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Error initializing block database</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Error initializing wallet database environment %s!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Error loading block database</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Error opening block database</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Error: Disk space is low!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Error: Wallet locked, unable to create transaction!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Error: system error: </source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to listen on any port. Use -listen=0 if you want this.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to read block info</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to read block</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to sync block index</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write block index</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write block info</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write block</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write file info</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write to coin database</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write transaction index</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write undo data</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Find peers using DNS lookup (default: 1 unless -connect)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Generate coins (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>How many blocks to check at startup (default: 288, 0 = all)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>How thorough the block verification is (0-4, default: 3)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>Not enough file descriptors available.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Rebuild block chain index from current blk000??.dat files</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Set the number of threads to service RPC calls (default: 4)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+26"/>
<source>Verifying blocks...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Verifying wallet...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-69"/>
<source>Imports blocks from external blk000??.dat file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-76"/>
<source>Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+77"/>
<source>Information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Invalid -tor address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Invalid amount for -minrelaytxfee=<amount>: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Invalid amount for -mintxfee=<amount>: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Maintain a full transaction index (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Maximum per-connection send buffer, <n>*1000 bytes (default: 1000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Only accept block chain matching built-in checkpoints (default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Only connect to nodes in network <net> (IPv4, IPv6 or Tor)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Output extra debugging information. Implies all other -debug* options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Output extra network debugging information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Prepend debug output with timestamp</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>SSL options: (see the Communistcoin Wiki for SSL setup instructions)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Select the version of socks proxy to use (4-5, default: 5)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Send trace/debug info to console instead of debug.log file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Send trace/debug info to debugger</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Set maximum block size in bytes (default: 250000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Set minimum block size in bytes (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Signing transaction failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Specify connection timeout in milliseconds (default: 5000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>System error: </source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Transaction amount too small</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Transaction amounts must be positive</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Transaction too large</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Use UPnP to map the listening port (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Use UPnP to map the listening port (default: 1 when listening)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Use proxy to reach tor hidden services (default: same as -proxy)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Username for JSON-RPC connections</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Warning</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Warning: This version is obsolete, upgrade required!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>You need to rebuild the databases using -reindex to change -txindex</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>wallet.dat corrupt, salvage failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-50"/>
<source>Password for JSON-RPC connections</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-67"/>
<source>Allow JSON-RPC connections from specified IP address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+76"/>
<source>Send commands to node running on <ip> (default: 127.0.0.1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-120"/>
<source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+147"/>
<source>Upgrade wallet to latest format</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-21"/>
<source>Set key pool size to <n> (default: 100)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-12"/>
<source>Rescan the block chain for missing wallet transactions</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>Use OpenSSL (https) for JSON-RPC connections</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-26"/>
<source>Server certificate file (default: server.cert)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Server private key (default: server.pem)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-151"/>
<source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+165"/>
<source>This help message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-91"/>
<source>Connect through socks proxy</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-10"/>
<source>Allow DNS lookups for -addnode, -seednode and -connect</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+55"/>
<source>Loading addresses...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-35"/>
<source>Error loading wallet.dat: Wallet corrupted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Error loading wallet.dat: Wallet requires newer version of Communistcoin</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+93"/>
<source>Wallet needed to be rewritten: restart Communistcoin to complete</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-95"/>
<source>Error loading wallet.dat</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+28"/>
<source>Invalid -proxy address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+56"/>
<source>Unknown network specified in -onlynet: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Unknown -socks proxy version requested: %i</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-96"/>
<source>Cannot resolve -bind address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Cannot resolve -externalip address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+44"/>
<source>Invalid amount for -paytxfee=<amount>: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Invalid amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-6"/>
<source>Insufficient funds</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Loading block index...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-57"/>
<source>Add a node to connect to and attempt to keep the connection open</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-25"/>
<source>Unable to bind to %s on this computer. Communistcoin is probably already running.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+64"/>
<source>Fee per KB to add to transactions you send</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>Loading wallet...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-52"/>
<source>Cannot downgrade wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Cannot write default address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+64"/>
<source>Rescanning...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-57"/>
<source>Done loading</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+82"/>
<source>To use the %s option</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-74"/>
<source>Error</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-31"/>
<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"/>
</message>
</context>
</TS> | {
"content_hash": "3ee0514347372cb68be666cd11c19d2c",
"timestamp": "",
"source": "github",
"line_count": 2917,
"max_line_length": 395,
"avg_line_length": 33.18992115186836,
"alnum_prop": 0.5865413417342354,
"repo_name": "stalingrad1/communist",
"id": "d011c4cebf2e0c92acd14de7e8d4208b18fd2d8e",
"size": "96817",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/qt/locale/bitcoin_ca.ts",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "32394"
},
{
"name": "C++",
"bytes": "2614405"
},
{
"name": "CSS",
"bytes": "1127"
},
{
"name": "HTML",
"bytes": "50615"
},
{
"name": "Makefile",
"bytes": "13419"
},
{
"name": "NSIS",
"bytes": "6236"
},
{
"name": "Objective-C",
"bytes": "1052"
},
{
"name": "Objective-C++",
"bytes": "5864"
},
{
"name": "Python",
"bytes": "69739"
},
{
"name": "QMake",
"bytes": "14734"
},
{
"name": "Roff",
"bytes": "18284"
},
{
"name": "Shell",
"bytes": "16339"
}
],
"symlink_target": ""
} |
namespace content {
namespace protocol {
OverlayHandler::OverlayHandler()
: DevToolsDomainHandler(Overlay::Metainfo::domainName) {}
OverlayHandler::~OverlayHandler() = default;
void OverlayHandler::Wire(UberDispatcher* dispatcher) {
Overlay::Dispatcher::wire(dispatcher, this);
}
void OverlayHandler::SetRenderer(int process_host_id,
RenderFrameHostImpl* frame_host) {
if (host_ == frame_host)
return;
host_ = frame_host;
UpdateCaptureInputEvents();
}
Response OverlayHandler::SetInspectMode(
const String& in_mode,
Maybe<protocol::Overlay::HighlightConfig> in_highlightConfig) {
inspect_mode_ = in_mode;
UpdateCaptureInputEvents();
return Response::FallThrough();
}
Response OverlayHandler::SetPausedInDebuggerMessage(Maybe<String> message) {
paused_message_ = message.fromMaybe(std::string());
UpdateCaptureInputEvents();
return Response::FallThrough();
}
Response OverlayHandler::Disable() {
inspect_mode_ = std::string();
paused_message_ = std::string();
UpdateCaptureInputEvents();
return Response::FallThrough();
}
void OverlayHandler::UpdateCaptureInputEvents() {
// NOTE(igor@vivaldi.com): In Chromium the method makes sure that subframes
// cannot capture the mouse events when the page in the top window shows a
// debug overlay. In Vivaldi we should ideally route events from subframes to
// WebContents corresponding to <webview> with the page. But this is not
// implemented. For now we just ignore the routing to make sure that the
// debug overlay works at least for pages without iframes.
if (vivaldi::IsVivaldiRunning())
return;
if (!host_)
return;
auto* web_contents = WebContentsImpl::FromRenderFrameHostImpl(host_);
if (!web_contents)
return;
bool capture_input =
inspect_mode_ == Overlay::InspectModeEnum::CaptureAreaScreenshot ||
!paused_message_.empty();
if (!web_contents->GetInputEventRouter())
return;
web_contents->GetInputEventRouter()->set_route_to_root_for_devtools(
capture_input);
}
} // namespace protocol
} // namespace content
| {
"content_hash": "4e004a5f7c18b2af925596eb2ba4f161",
"timestamp": "",
"source": "github",
"line_count": 66,
"max_line_length": 79,
"avg_line_length": 31.984848484848484,
"alnum_prop": 0.7209853150165798,
"repo_name": "ric2b/Vivaldi-browser",
"id": "008357c82a0f5b3d55641d73afda7121effba9c0",
"size": "2558",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "chromium/content/browser/devtools/protocol/overlay_handler.cc",
"mode": "33188",
"license": "bsd-3-clause",
"language": [],
"symlink_target": ""
} |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_75) on Sat May 16 22:22:29 CEST 2015 -->
<title>StatsMetadata.StatsMetadataSerializer</title>
<meta name="date" content="2015-05-16">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="StatsMetadata.StatsMetadataSerializer";
}
//-->
</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="package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../org/apache/cassandra/io/sstable/metadata/StatsMetadata.html" title="class in org.apache.cassandra.io.sstable.metadata"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../../org/apache/cassandra/io/sstable/metadata/ValidationMetadata.html" title="class in org.apache.cassandra.io.sstable.metadata"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/apache/cassandra/io/sstable/metadata/StatsMetadata.StatsMetadataSerializer.html" target="_top">Frames</a></li>
<li><a href="StatsMetadata.StatsMetadataSerializer.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li><a href="#constructor_summary">Constr</a> | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li><a href="#constructor_detail">Constr</a> | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.cassandra.io.sstable.metadata</div>
<h2 title="Class StatsMetadata.StatsMetadataSerializer" class="title">Class StatsMetadata.StatsMetadataSerializer</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.apache.cassandra.io.sstable.metadata.StatsMetadata.StatsMetadataSerializer</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="../../../../../../org/apache/cassandra/io/sstable/metadata/IMetadataComponentSerializer.html" title="interface in org.apache.cassandra.io.sstable.metadata">IMetadataComponentSerializer</a><<a href="../../../../../../org/apache/cassandra/io/sstable/metadata/StatsMetadata.html" title="class in org.apache.cassandra.io.sstable.metadata">StatsMetadata</a>></dd>
</dl>
<dl>
<dt>Enclosing class:</dt>
<dd><a href="../../../../../../org/apache/cassandra/io/sstable/metadata/StatsMetadata.html" title="class in org.apache.cassandra.io.sstable.metadata">StatsMetadata</a></dd>
</dl>
<hr>
<br>
<pre>public static class <span class="strong">StatsMetadata.StatsMetadataSerializer</span>
extends java.lang.Object
implements <a href="../../../../../../org/apache/cassandra/io/sstable/metadata/IMetadataComponentSerializer.html" title="interface in org.apache.cassandra.io.sstable.metadata">IMetadataComponentSerializer</a><<a href="../../../../../../org/apache/cassandra/io/sstable/metadata/StatsMetadata.html" title="class in org.apache.cassandra.io.sstable.metadata">StatsMetadata</a>></pre>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../../org/apache/cassandra/io/sstable/metadata/StatsMetadata.StatsMetadataSerializer.html#StatsMetadata.StatsMetadataSerializer()">StatsMetadata.StatsMetadataSerializer</a></strong>()</code> </td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../org/apache/cassandra/io/sstable/metadata/StatsMetadata.html" title="class in org.apache.cassandra.io.sstable.metadata">StatsMetadata</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/cassandra/io/sstable/metadata/StatsMetadata.StatsMetadataSerializer.html#deserialize(org.apache.cassandra.io.sstable.format.Version,%20java.io.DataInput)">deserialize</a></strong>(<a href="../../../../../../org/apache/cassandra/io/sstable/format/Version.html" title="class in org.apache.cassandra.io.sstable.format">Version</a> version,
java.io.DataInput in)</code>
<div class="block">Deserialize metadata component from given input.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/cassandra/io/sstable/metadata/StatsMetadata.StatsMetadataSerializer.html#serialize(org.apache.cassandra.io.sstable.metadata.StatsMetadata,%20org.apache.cassandra.io.util.DataOutputPlus)">serialize</a></strong>(<a href="../../../../../../org/apache/cassandra/io/sstable/metadata/StatsMetadata.html" title="class in org.apache.cassandra.io.sstable.metadata">StatsMetadata</a> component,
<a href="../../../../../../org/apache/cassandra/io/util/DataOutputPlus.html" title="interface in org.apache.cassandra.io.util">DataOutputPlus</a> out)</code>
<div class="block">Serialize metadata component to given output.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/cassandra/io/sstable/metadata/StatsMetadata.StatsMetadataSerializer.html#serializedSize(org.apache.cassandra.io.sstable.metadata.StatsMetadata)">serializedSize</a></strong>(<a href="../../../../../../org/apache/cassandra/io/sstable/metadata/StatsMetadata.html" title="class in org.apache.cassandra.io.sstable.metadata">StatsMetadata</a> component)</code>
<div class="block">Calculate and return serialized size.</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, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="StatsMetadata.StatsMetadataSerializer()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>StatsMetadata.StatsMetadataSerializer</h4>
<pre>public StatsMetadata.StatsMetadataSerializer()</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="serializedSize(org.apache.cassandra.io.sstable.metadata.StatsMetadata)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>serializedSize</h4>
<pre>public int serializedSize(<a href="../../../../../../org/apache/cassandra/io/sstable/metadata/StatsMetadata.html" title="class in org.apache.cassandra.io.sstable.metadata">StatsMetadata</a> component)
throws java.io.IOException</pre>
<div class="block"><strong>Description copied from interface: <code><a href="../../../../../../org/apache/cassandra/io/sstable/metadata/IMetadataComponentSerializer.html#serializedSize(T)">IMetadataComponentSerializer</a></code></strong></div>
<div class="block">Calculate and return serialized size.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../../org/apache/cassandra/io/sstable/metadata/IMetadataComponentSerializer.html#serializedSize(T)">serializedSize</a></code> in interface <code><a href="../../../../../../org/apache/cassandra/io/sstable/metadata/IMetadataComponentSerializer.html" title="interface in org.apache.cassandra.io.sstable.metadata">IMetadataComponentSerializer</a><<a href="../../../../../../org/apache/cassandra/io/sstable/metadata/StatsMetadata.html" title="class in org.apache.cassandra.io.sstable.metadata">StatsMetadata</a>></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>component</code> - MetadataComponent to calculate serialized size</dd>
<dt><span class="strong">Returns:</span></dt><dd>serialized size of this component</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd></dl>
</li>
</ul>
<a name="serialize(org.apache.cassandra.io.sstable.metadata.StatsMetadata, org.apache.cassandra.io.util.DataOutputPlus)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>serialize</h4>
<pre>public void serialize(<a href="../../../../../../org/apache/cassandra/io/sstable/metadata/StatsMetadata.html" title="class in org.apache.cassandra.io.sstable.metadata">StatsMetadata</a> component,
<a href="../../../../../../org/apache/cassandra/io/util/DataOutputPlus.html" title="interface in org.apache.cassandra.io.util">DataOutputPlus</a> out)
throws java.io.IOException</pre>
<div class="block"><strong>Description copied from interface: <code><a href="../../../../../../org/apache/cassandra/io/sstable/metadata/IMetadataComponentSerializer.html#serialize(T,%20org.apache.cassandra.io.util.DataOutputPlus)">IMetadataComponentSerializer</a></code></strong></div>
<div class="block">Serialize metadata component to given output.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../../org/apache/cassandra/io/sstable/metadata/IMetadataComponentSerializer.html#serialize(T,%20org.apache.cassandra.io.util.DataOutputPlus)">serialize</a></code> in interface <code><a href="../../../../../../org/apache/cassandra/io/sstable/metadata/IMetadataComponentSerializer.html" title="interface in org.apache.cassandra.io.sstable.metadata">IMetadataComponentSerializer</a><<a href="../../../../../../org/apache/cassandra/io/sstable/metadata/StatsMetadata.html" title="class in org.apache.cassandra.io.sstable.metadata">StatsMetadata</a>></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>component</code> - MetadataComponent to serialize</dd><dd><code>out</code> - serialize destination</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd></dl>
</li>
</ul>
<a name="deserialize(org.apache.cassandra.io.sstable.format.Version, java.io.DataInput)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>deserialize</h4>
<pre>public <a href="../../../../../../org/apache/cassandra/io/sstable/metadata/StatsMetadata.html" title="class in org.apache.cassandra.io.sstable.metadata">StatsMetadata</a> deserialize(<a href="../../../../../../org/apache/cassandra/io/sstable/format/Version.html" title="class in org.apache.cassandra.io.sstable.format">Version</a> version,
java.io.DataInput in)
throws java.io.IOException</pre>
<div class="block"><strong>Description copied from interface: <code><a href="../../../../../../org/apache/cassandra/io/sstable/metadata/IMetadataComponentSerializer.html#deserialize(org.apache.cassandra.io.sstable.format.Version,%20java.io.DataInput)">IMetadataComponentSerializer</a></code></strong></div>
<div class="block">Deserialize metadata component from given input.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../../org/apache/cassandra/io/sstable/metadata/IMetadataComponentSerializer.html#deserialize(org.apache.cassandra.io.sstable.format.Version,%20java.io.DataInput)">deserialize</a></code> in interface <code><a href="../../../../../../org/apache/cassandra/io/sstable/metadata/IMetadataComponentSerializer.html" title="interface in org.apache.cassandra.io.sstable.metadata">IMetadataComponentSerializer</a><<a href="../../../../../../org/apache/cassandra/io/sstable/metadata/StatsMetadata.html" title="class in org.apache.cassandra.io.sstable.metadata">StatsMetadata</a>></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>version</code> - serialize version</dd><dd><code>in</code> - deserialize source</dd>
<dt><span class="strong">Returns:</span></dt><dd>Deserialized component</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../org/apache/cassandra/io/sstable/metadata/StatsMetadata.html" title="class in org.apache.cassandra.io.sstable.metadata"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../../org/apache/cassandra/io/sstable/metadata/ValidationMetadata.html" title="class in org.apache.cassandra.io.sstable.metadata"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/apache/cassandra/io/sstable/metadata/StatsMetadata.StatsMetadataSerializer.html" target="_top">Frames</a></li>
<li><a href="StatsMetadata.StatsMetadataSerializer.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li><a href="#constructor_summary">Constr</a> | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li><a href="#constructor_detail">Constr</a> | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
| {
"content_hash": "a1954d3eeb6dbbceab9f2fc7f2d9da20",
"timestamp": "",
"source": "github",
"line_count": 328,
"max_line_length": 626,
"avg_line_length": 52.53658536585366,
"alnum_prop": 0.6788532961931291,
"repo_name": "sayanh/ViewMaintenanceCassandra",
"id": "a57f82994375d556f0c049c4fa26bfa0f2f0f53f",
"size": "17232",
"binary": false,
"copies": "1",
"ref": "refs/heads/trunk",
"path": "doc/org/apache/cassandra/io/sstable/metadata/StatsMetadata.StatsMetadataSerializer.html",
"mode": "33261",
"license": "apache-2.0",
"language": [
{
"name": "AMPL",
"bytes": "801"
},
{
"name": "Batchfile",
"bytes": "21834"
},
{
"name": "GAP",
"bytes": "62279"
},
{
"name": "Java",
"bytes": "10347352"
},
{
"name": "PowerShell",
"bytes": "39438"
},
{
"name": "Python",
"bytes": "314996"
},
{
"name": "Shell",
"bytes": "50026"
},
{
"name": "Thrift",
"bytes": "40282"
}
],
"symlink_target": ""
} |
<?php
namespace Scool\Curriculum\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
/**
* Class StudyUpdateRequest.
*
* @package Scool\Curriculum\Http\Requests
*/
class StudyUpdateRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return Auth::user()->can('edit studies');
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
//
];
}
}
| {
"content_hash": "57a2c6e246001167d3cc4dedcb9cec5b",
"timestamp": "",
"source": "github",
"line_count": 35,
"max_line_length": 64,
"avg_line_length": 17.6,
"alnum_prop": 0.586038961038961,
"repo_name": "acacha-scool/curriculum",
"id": "edd9898610a62bfcc23a36e5c722e8208f38e3cc",
"size": "616",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/Http/Requests/StudyUpdateRequest.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "PHP",
"bytes": "361532"
},
{
"name": "Shell",
"bytes": "79"
}
],
"symlink_target": ""
} |
if which npm &> /dev/null
then
echo "NPM is installed. You should probably install cocos2d-javascript as an npm package using this command instead:\n npm install .\n"
read -p "Continue anyway? (y/n) : " yn
case $yn in
[Nn]* ) exit;;
[Yy]* ) break;;
* ) echo "Enter 'y' or 'n'"
esac
fi
DIR=`dirname $0`
read -p "Where should I install to? (/usr/local/cocos2d-javascript/) : " install_to
if [ -z "$install_to" ]
then
install_to='/usr/local/cocos2d-javascript/'
fi
echo "Installing to: $install_to"
mkdir -p "$install_to"
cd $DIR
IFS=$'\n'
for file in `find * \( ! -regex '.*/\..*' \) -type f`
do
dst="$install_to/$file"
dst_dir=`dirname "$dst"`
if [ ! -d "$dst_dir" ]
then
mkdir -p "$dst_dir"
fi
cp "$file" "$dst"
done
cd -
echo "All files copied."
ln -s "$install_to/bin/cocos.sh" "/usr/local/bin/cocos"
echo "Symlinked 'cocos' executable to /usr/local/bin/cocos\n"
echo "Installation complete\n\n"
echo "You should now be able to type 'cocos' and get a list of available commands."
| {
"content_hash": "fcd95befde0c11316593bcb3637f991a",
"timestamp": "",
"source": "github",
"line_count": 53,
"max_line_length": 142,
"avg_line_length": 20.339622641509433,
"alnum_prop": 0.6076066790352505,
"repo_name": "deminew/cocos2d-javascript",
"id": "37f017dfd6be6697374ee5237a661ea52de0eb42",
"size": "1089",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "install.sh",
"mode": "33261",
"license": "mit",
"language": [],
"symlink_target": ""
} |
'use strict';
angular.module('smartHome')
.factory('trelloService', function($q, $http, smartHomeConfig) {
let self = this;
self.lists = [];
return {
getLists: function() {
var deferred = $q.defer();
console.log('Loading check lists');
$http.get('http://' + smartHomeConfig.endpoint + ':' + smartHomeConfig.port + '/api/trello/bh02mtqQ').success(function(lists) {
self.lists = lists.reduce((arr,list)=>{
list.checkItems.forEach(function(element) {
arr.push(element);
}, this);
return arr;
},[]);
deferred.resolve(lists);
});
return deferred.promise;
},
getIncompleteTasks: function(){
let tmp = 0;
console.log(self.lists);
for (var key in self.lists) {
if(self.lists[key].state !== 'complete'){
tmp += 1;
}
}
return tmp;
}
};
}); | {
"content_hash": "42b8231e6731177f65a645ca44428540",
"timestamp": "",
"source": "github",
"line_count": 36,
"max_line_length": 135,
"avg_line_length": 27.25,
"alnum_prop": 0.5076452599388379,
"repo_name": "mateutek/smarthome",
"id": "3213fb6c0cb82dc83a11f43786c874d3de3d20cf",
"size": "981",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "app/scripts/ngapp/trello/trello.service.js",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "97645"
},
{
"name": "HTML",
"bytes": "21268"
},
{
"name": "JavaScript",
"bytes": "43503"
}
],
"symlink_target": ""
} |
/**
* Autogenerated by Thrift Compiler (0.16.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hive.metastore.api;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.16.0)")
@org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public class GetOpenTxnsRequest implements org.apache.thrift.TBase<GetOpenTxnsRequest, GetOpenTxnsRequest._Fields>, java.io.Serializable, Cloneable, Comparable<GetOpenTxnsRequest> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetOpenTxnsRequest");
private static final org.apache.thrift.protocol.TField EXCLUDE_TXN_TYPES_FIELD_DESC = new org.apache.thrift.protocol.TField("excludeTxnTypes", org.apache.thrift.protocol.TType.LIST, (short)1);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new GetOpenTxnsRequestStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new GetOpenTxnsRequestTupleSchemeFactory();
private @org.apache.thrift.annotation.Nullable java.util.List<TxnType> excludeTxnTypes; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
EXCLUDE_TXN_TYPES((short)1, "excludeTxnTypes");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // EXCLUDE_TXN_TYPES
return EXCLUDE_TXN_TYPES;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final _Fields optionals[] = {_Fields.EXCLUDE_TXN_TYPES};
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.EXCLUDE_TXN_TYPES, new org.apache.thrift.meta_data.FieldMetaData("excludeTxnTypes", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TxnType.class))));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetOpenTxnsRequest.class, metaDataMap);
}
public GetOpenTxnsRequest() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public GetOpenTxnsRequest(GetOpenTxnsRequest other) {
if (other.isSetExcludeTxnTypes()) {
java.util.List<TxnType> __this__excludeTxnTypes = new java.util.ArrayList<TxnType>(other.excludeTxnTypes.size());
for (TxnType other_element : other.excludeTxnTypes) {
__this__excludeTxnTypes.add(other_element);
}
this.excludeTxnTypes = __this__excludeTxnTypes;
}
}
public GetOpenTxnsRequest deepCopy() {
return new GetOpenTxnsRequest(this);
}
@Override
public void clear() {
this.excludeTxnTypes = null;
}
public int getExcludeTxnTypesSize() {
return (this.excludeTxnTypes == null) ? 0 : this.excludeTxnTypes.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<TxnType> getExcludeTxnTypesIterator() {
return (this.excludeTxnTypes == null) ? null : this.excludeTxnTypes.iterator();
}
public void addToExcludeTxnTypes(TxnType elem) {
if (this.excludeTxnTypes == null) {
this.excludeTxnTypes = new java.util.ArrayList<TxnType>();
}
this.excludeTxnTypes.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<TxnType> getExcludeTxnTypes() {
return this.excludeTxnTypes;
}
public void setExcludeTxnTypes(@org.apache.thrift.annotation.Nullable java.util.List<TxnType> excludeTxnTypes) {
this.excludeTxnTypes = excludeTxnTypes;
}
public void unsetExcludeTxnTypes() {
this.excludeTxnTypes = null;
}
/** Returns true if field excludeTxnTypes is set (has been assigned a value) and false otherwise */
public boolean isSetExcludeTxnTypes() {
return this.excludeTxnTypes != null;
}
public void setExcludeTxnTypesIsSet(boolean value) {
if (!value) {
this.excludeTxnTypes = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case EXCLUDE_TXN_TYPES:
if (value == null) {
unsetExcludeTxnTypes();
} else {
setExcludeTxnTypes((java.util.List<TxnType>)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case EXCLUDE_TXN_TYPES:
return getExcludeTxnTypes();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case EXCLUDE_TXN_TYPES:
return isSetExcludeTxnTypes();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof GetOpenTxnsRequest)
return this.equals((GetOpenTxnsRequest)that);
return false;
}
public boolean equals(GetOpenTxnsRequest that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_excludeTxnTypes = true && this.isSetExcludeTxnTypes();
boolean that_present_excludeTxnTypes = true && that.isSetExcludeTxnTypes();
if (this_present_excludeTxnTypes || that_present_excludeTxnTypes) {
if (!(this_present_excludeTxnTypes && that_present_excludeTxnTypes))
return false;
if (!this.excludeTxnTypes.equals(that.excludeTxnTypes))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetExcludeTxnTypes()) ? 131071 : 524287);
if (isSetExcludeTxnTypes())
hashCode = hashCode * 8191 + excludeTxnTypes.hashCode();
return hashCode;
}
@Override
public int compareTo(GetOpenTxnsRequest other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetExcludeTxnTypes(), other.isSetExcludeTxnTypes());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetExcludeTxnTypes()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.excludeTxnTypes, other.excludeTxnTypes);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("GetOpenTxnsRequest(");
boolean first = true;
if (isSetExcludeTxnTypes()) {
sb.append("excludeTxnTypes:");
if (this.excludeTxnTypes == null) {
sb.append("null");
} else {
sb.append(this.excludeTxnTypes);
}
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class GetOpenTxnsRequestStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public GetOpenTxnsRequestStandardScheme getScheme() {
return new GetOpenTxnsRequestStandardScheme();
}
}
private static class GetOpenTxnsRequestStandardScheme extends org.apache.thrift.scheme.StandardScheme<GetOpenTxnsRequest> {
public void read(org.apache.thrift.protocol.TProtocol iprot, GetOpenTxnsRequest struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // EXCLUDE_TXN_TYPES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list1414 = iprot.readListBegin();
struct.excludeTxnTypes = new java.util.ArrayList<TxnType>(_list1414.size);
@org.apache.thrift.annotation.Nullable TxnType _elem1415;
for (int _i1416 = 0; _i1416 < _list1414.size; ++_i1416)
{
_elem1415 = org.apache.hadoop.hive.metastore.api.TxnType.findByValue(iprot.readI32());
if (_elem1415 != null)
{
struct.excludeTxnTypes.add(_elem1415);
}
}
iprot.readListEnd();
}
struct.setExcludeTxnTypesIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, GetOpenTxnsRequest struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.excludeTxnTypes != null) {
if (struct.isSetExcludeTxnTypes()) {
oprot.writeFieldBegin(EXCLUDE_TXN_TYPES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.excludeTxnTypes.size()));
for (TxnType _iter1417 : struct.excludeTxnTypes)
{
oprot.writeI32(_iter1417.getValue());
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class GetOpenTxnsRequestTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public GetOpenTxnsRequestTupleScheme getScheme() {
return new GetOpenTxnsRequestTupleScheme();
}
}
private static class GetOpenTxnsRequestTupleScheme extends org.apache.thrift.scheme.TupleScheme<GetOpenTxnsRequest> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, GetOpenTxnsRequest struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetExcludeTxnTypes()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetExcludeTxnTypes()) {
{
oprot.writeI32(struct.excludeTxnTypes.size());
for (TxnType _iter1418 : struct.excludeTxnTypes)
{
oprot.writeI32(_iter1418.getValue());
}
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, GetOpenTxnsRequest struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list1419 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32);
struct.excludeTxnTypes = new java.util.ArrayList<TxnType>(_list1419.size);
@org.apache.thrift.annotation.Nullable TxnType _elem1420;
for (int _i1421 = 0; _i1421 < _list1419.size; ++_i1421)
{
_elem1420 = org.apache.hadoop.hive.metastore.api.TxnType.findByValue(iprot.readI32());
if (_elem1420 != null)
{
struct.excludeTxnTypes.add(_elem1420);
}
}
}
struct.setExcludeTxnTypesIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
| {
"content_hash": "1e7752da7f4912a6a5a64830c856f574",
"timestamp": "",
"source": "github",
"line_count": 429,
"max_line_length": 300,
"avg_line_length": 35.67832167832168,
"alnum_prop": 0.6782960930354109,
"repo_name": "sankarh/hive",
"id": "b16258b3aed19d82899289fcb542515231be4640",
"size": "15306",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsRequest.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ANTLR",
"bytes": "55440"
},
{
"name": "Batchfile",
"bytes": "845"
},
{
"name": "C",
"bytes": "28218"
},
{
"name": "C++",
"bytes": "96657"
},
{
"name": "CSS",
"bytes": "4742"
},
{
"name": "GAP",
"bytes": "204254"
},
{
"name": "HTML",
"bytes": "24102"
},
{
"name": "HiveQL",
"bytes": "8290287"
},
{
"name": "Java",
"bytes": "59285075"
},
{
"name": "JavaScript",
"bytes": "44139"
},
{
"name": "M4",
"bytes": "2276"
},
{
"name": "PHP",
"bytes": "148097"
},
{
"name": "PLSQL",
"bytes": "9105"
},
{
"name": "PLpgSQL",
"bytes": "294996"
},
{
"name": "Perl",
"bytes": "319742"
},
{
"name": "PigLatin",
"bytes": "12333"
},
{
"name": "Python",
"bytes": "383647"
},
{
"name": "ReScript",
"bytes": "3460"
},
{
"name": "Roff",
"bytes": "5379"
},
{
"name": "SQLPL",
"bytes": "1190"
},
{
"name": "Shell",
"bytes": "271549"
},
{
"name": "TSQL",
"bytes": "14126"
},
{
"name": "Thrift",
"bytes": "164235"
},
{
"name": "XSLT",
"bytes": "1329"
},
{
"name": "q",
"bytes": "289182"
}
],
"symlink_target": ""
} |
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Ovitur.Products.Hotel")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Ovicus")]
[assembly: AssemblyProduct("Ovitur.Products.Hotel")]
[assembly: AssemblyCopyright("Copyright © Ovicus 2010")]
[assembly: AssemblyTrademark("Ovitur")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("a12688b5-f220-4c15-82c1-aae116d42a66")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
| {
"content_hash": "1d3cafbe2631e6567c2eeb12125e6218",
"timestamp": "",
"source": "github",
"line_count": 36,
"max_line_length": 84,
"avg_line_length": 39.80555555555556,
"alnum_prop": 0.7487787857641311,
"repo_name": "ovicus/ovitur",
"id": "c49b3c45185e6ad487df22fdf240d6058babca0e",
"size": "1436",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Ovitur.Products.Accommodation/Properties/AssemblyInfo.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ASP",
"bytes": "644255"
},
{
"name": "C#",
"bytes": "1375291"
},
{
"name": "CSS",
"bytes": "208599"
},
{
"name": "HTML",
"bytes": "10605"
},
{
"name": "JavaScript",
"bytes": "367129"
},
{
"name": "TSQL",
"bytes": "48134"
}
],
"symlink_target": ""
} |
@class CPTLayer;
@interface CPTLayerTests : CPTTestCase
@property (readwrite, strong) CPTLayer *layer;
@property (readwrite, strong) NSArray *positions;
@end
| {
"content_hash": "a9534e4dfe70d63e16315115aeef592a",
"timestamp": "",
"source": "github",
"line_count": 8,
"max_line_length": 49,
"avg_line_length": 20.125,
"alnum_prop": 0.7701863354037267,
"repo_name": "boztalay/LappyLogger",
"id": "68f2f08e2dbb6a8c0b27044a6869ae70ca78421f",
"size": "186",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "LappyLogger/Frameworks/core-plot-master/framework/Source/CPTLayerTests.h",
"mode": "33261",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "7479"
},
{
"name": "DTrace",
"bytes": "346"
},
{
"name": "Objective-C",
"bytes": "2047159"
},
{
"name": "Python",
"bytes": "14195"
},
{
"name": "Shell",
"bytes": "977"
}
],
"symlink_target": ""
} |
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Module: Api::V1
— Documentation by YARD 0.9.5
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
<script type="text/javascript" charset="utf-8">
pathId = "Api::V1";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../class_list.html"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (V)</a> »
<span class='title'><span class='object_link'><a href="../Api.html" title="Api (module)">Api</a></span></span>
»
<span class="title">V1</span>
</div>
<div id="search">
<a class="full_list_link" id="class_list_link"
href="../class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<iframe id="search_frame" src="../class_list.html"></iframe>
<div id="content"><h1>Module: Api::V1
</h1>
<div class="box_info">
<dl>
<dt>Defined in:</dt>
<dd>app/controllers/api/v1/keys_controller.rb<span class="defines">,<br />
app/controllers/api/v1/users_controller.rb,<br /> app/controllers/api/v1/videos_controller.rb,<br /> app/controllers/api/v1/tweets_controller.rb,<br /> app/controllers/api/v1/hdstat_controller.rb,<br /> app/controllers/api/v1/streams_controller.rb,<br /> app/controllers/api/v1/channels_controller.rb</span>
</dd>
</dl>
</div>
<h2>Defined Under Namespace</h2>
<p class="children">
<strong class="classes">Classes:</strong> <span class='object_link'><a href="V1/ChannelsController.html" title="Api::V1::ChannelsController (class)">ChannelsController</a></span>, <span class='object_link'><a href="V1/HdstatController.html" title="Api::V1::HdstatController (class)">HdstatController</a></span>, <span class='object_link'><a href="V1/KeysController.html" title="Api::V1::KeysController (class)">KeysController</a></span>, <span class='object_link'><a href="V1/StreamsController.html" title="Api::V1::StreamsController (class)">StreamsController</a></span>, <span class='object_link'><a href="V1/TweetsController.html" title="Api::V1::TweetsController (class)">TweetsController</a></span>, <span class='object_link'><a href="V1/UsersController.html" title="Api::V1::UsersController (class)">UsersController</a></span>, <span class='object_link'><a href="V1/VideosController.html" title="Api::V1::VideosController (class)">VideosController</a></span>
</p>
</div>
<div id="footer">
Generated on Sat Oct 22 02:15:17 2016 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.5 (ruby-2.3.1).
</div>
</div>
</body>
</html> | {
"content_hash": "61f2d155eff14dcccd8f235589a89141",
"timestamp": "",
"source": "github",
"line_count": 119,
"max_line_length": 970,
"avg_line_length": 29.159663865546218,
"alnum_prop": 0.615850144092219,
"repo_name": "PeerRails/omck-on-rails",
"id": "acb8f94c01d4e7cfd60976cef4b787b7dfb5a699",
"size": "3470",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "docs/Api/V1.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "35951"
},
{
"name": "CoffeeScript",
"bytes": "21528"
},
{
"name": "HTML",
"bytes": "22460"
},
{
"name": "JavaScript",
"bytes": "52805"
},
{
"name": "Ruby",
"bytes": "223331"
}
],
"symlink_target": ""
} |
JS=main.js
all: myocamlbuild.ml
ocamlbuild $(JS); ln -s _build/$(JS) .
clean:
ocamlbuild -clean
rm -f myocamlbuild.ml
myocamlbuild.ml:
ln -s ../../../ocamljs/tools/myocamlbuild.ml
| {
"content_hash": "433bd1c3373fd5756f94b5b09ad1d650",
"timestamp": "",
"source": "github",
"line_count": 11,
"max_line_length": 45,
"avg_line_length": 17,
"alnum_prop": 0.679144385026738,
"repo_name": "hhughes/ocaml-frui",
"id": "0ca6993363a37a91682fb8efec042639cad42934",
"size": "187",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "src/heatmap/Makefile",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "JavaScript",
"bytes": "12343"
},
{
"name": "OCaml",
"bytes": "44568"
},
{
"name": "Shell",
"bytes": "630"
}
],
"symlink_target": ""
} |
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<conversionRule conversionWord="clr"
converterClass="org.springframework.boot.logging.logback.ColorConverter"/>
<conversionRule conversionWord="wex"
converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter"/>
<!-- Various configuration properties -->
<property name="CONSOLE_LOG_PATTERN"
value="%clr(%d{yyyy-MM-dd'T'HH:mm:ss.SSSZZ}){faint} %clr(%5p){red} %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %X{SYSTEM:-${SYSTEM}} %X{SUBSYSTEM:-${SUBSYSTEM}} %clr(%-60.60logger{59}){blue} %clr(:){faint} %m%n%wex"/>
<property name="FILE_LOG_PATTERN"
value="%d{yyyy-MM-dd'T'HH:mm:ss.SSSZZ} %5level ${PID:- } --- [%thread] %X{SYSTEM:-${SYSTEM}} %X{SUBSYSTEM:-${SUBSYSTEM}} %-60.60logger{59} : %m%n%wex"/>
<property name="LOGGER_FILE" value="${LOG_PATH}/${LOG_FILE}.log"/>
<property name="JSON_FILE" value="${LOG_PATH}/${LOG_FILE}.json"/>
<!-- appenders -->
<appender name="DEBUG_LEVEL_REMAPPER"
class="org.springframework.boot.logging.logback.LevelRemappingAppender">
<destinationLogger>org.springframework.boot</destinationLogger>
</appender>
<!-- Colour coded console appender -->
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>${CONSOLE_LOG_PATTERN}</pattern>
<charset>utf8</charset>
</encoder>
</appender>
<!-- File line format appender -->
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<encoder>
<pattern>${FILE_LOG_PATTERN}</pattern>
<charset>utf8</charset>
</encoder>
<file>${LOGGER_FILE}</file>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<fileNamePattern>${LOGGER_FILE}.%i</fileNamePattern>
<minIndex>1</minIndex>
<maxIndex>10</maxIndex>
</rollingPolicy>
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<MaxFileSize>10MB</MaxFileSize>
</triggeringPolicy>
</appender>
<!-- File JSON format appender -->
<appender name="JSON" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>${JSON_FILE}</File>
<encoder class="net.logstash.logback.encoder.LoggingEventCompositeJsonEncoder">
<providers>
<logLevel/>
<threadName/>
<pattern>
<pattern>
{
"timestamp": "%date{yyyy-MM-dd'T'HH:mm:ss.SSSZZ}",
"PID": "${PID}",
"system": "${SYSTEM}",
"subsystem": "${SUBSYSTEM}",
"class": "%class{60}"
}
</pattern>
</pattern>
<message fieldname="msg"/>
</providers>
</encoder>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<fileNamePattern>${JSON_FILE}.%i</fileNamePattern>
<minIndex>1</minIndex>
<maxIndex>10</maxIndex>
</rollingPolicy>
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<MaxFileSize>10MB</MaxFileSize>
</triggeringPolicy>
</appender>
<!-- TCP line format appender -->
<appender name="STASH" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
<destination>localhost:9500</destination>
<encoder>
<pattern>${FILE_LOG_PATTERN}</pattern>
<charset>utf8</charset>
</encoder>
</appender>
<!-- Loggers -->
<logger name="org.hibernate.validator.internal.util.Version" level="WARN"/>
<logger name="org.springframework.boot.actuate.endpoint.jmx" additivity="false">
<appender-ref ref="DEBUG_LEVEL_REMAPPER"/>
</logger>
<logger name="org.thymeleaf" additivity="false">
<appender-ref ref="DEBUG_LEVEL_REMAPPER"/>
</logger>
<logger name="org.springframework.security"
level="INFO"/> <!-- to debug security related issues (DEBUG) -->
<logger name="org.springframework.web.servlet.mvc"
level="INFO"/> <!-- some serialization issues are at trace level here: org.springframework.web.servlet.mvc.method.annotation
.ServletInvocableHandlerMethod -->
<logger name="org.springframework.web" level="INFO"/>
<logger name="com.codingrodent.microservice.template" level="INFO"/>
<!-- default logging levels for all appenders -->
<root level="INFO">
<appender-ref ref="CONSOLE"/>
<appender-ref ref="FILE"/>
<appender-ref ref="JSON"/>
<appender-ref ref="STASH"/>
</root>
</configuration> | {
"content_hash": "3ba8a1ba08e9104fca1b0a727f95934e",
"timestamp": "",
"source": "github",
"line_count": 130,
"max_line_length": 252,
"avg_line_length": 38.16153846153846,
"alnum_prop": 0.5918161660955452,
"repo_name": "codesqueak/SYWTWAM",
"id": "1151775863b0f0a2d511a330d0593b7eb00d85ee",
"size": "4961",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "app/src/main/resources/logback-spring.xml",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Java",
"bytes": "265808"
}
],
"symlink_target": ""
} |
try:
import neutron_lib.exceptions as lib_exceptions
except ImportError:
lib_exceptions = None
try:
import neutron.common.exceptions as old_exceptions
except ImportError:
old_exceptions = None
def _find(*args):
for f in args:
try:
return f()
except AttributeError:
pass
NotFound = _find(lambda: old_exceptions.NotFound,
lambda: lib_exceptions.NotFound)
InUse = _find(lambda: old_exceptions.InUse,
lambda: lib_exceptions.InUse)
Conflict = _find(lambda: old_exceptions.Conflict,
lambda: lib_exceptions.Conflict)
| {
"content_hash": "263a71620d0a5e4f5a57a0fbf2d8a6d9",
"timestamp": "",
"source": "github",
"line_count": 25,
"max_line_length": 54,
"avg_line_length": 24.92,
"alnum_prop": 0.6468699839486356,
"repo_name": "a10networks/a10-neutron-lbaas",
"id": "76e8c97f899f16406d28ef8e1762ce7cb2c99399",
"size": "1230",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "a10_neutron_lbaas/neutron_ext/common/exceptions.py",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Mako",
"bytes": "1083"
},
{
"name": "Python",
"bytes": "543754"
},
{
"name": "Shell",
"bytes": "6672"
}
],
"symlink_target": ""
} |
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
copy, modify, and distribute this software in source code or binary form for use
in connection with the web services and APIs provided by Facebook.
As with any software that integrates with the Facebook platform, your use of
this software is subject to the Facebook Developer Principles and Policies
[http://developers.facebook.com/policy/]. This copyright 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.
-->
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/messenger_send_button"
style="@style/MessengerButton.White.Small"
>
<TextView
android:text="@string/messenger_send_button_text"
style="@style/MessengerButtonText.White.Small"
/>
</FrameLayout>
<!-- From: file:/home/changye/GitHub/ToGoDutch/ToGoDutch_Android/facebook/res/layout/messenger_button_send_white_small.xml --> | {
"content_hash": "b2bd8836b8ae38f8bbcc307862e4027e",
"timestamp": "",
"source": "github",
"line_count": 32,
"max_line_length": 126,
"avg_line_length": 49.375,
"alnum_prop": 0.75,
"repo_name": "cwang77/ToGoDutch",
"id": "3014e86e850492ddd3763048a8b6ff344755ed5d",
"size": "1580",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "ToGoDutch_Android/facebook/build/intermediates/res/debug/layout/messenger_button_send_white_small.xml",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "1672700"
}
],
"symlink_target": ""
} |
package hudson.model.labels;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.junit.Assume.assumeFalse;
import antlr.ANTLRException;
import hudson.Functions;
import hudson.Launcher;
import hudson.model.AbstractBuild;
import hudson.model.AbstractProject;
import hudson.model.BuildListener;
import hudson.model.FreeStyleBuild;
import hudson.model.FreeStyleProject;
import hudson.model.Label;
import hudson.model.Node.Mode;
import hudson.slaves.DumbSlave;
import hudson.slaves.RetentionStrategy;
import org.junit.Rule;
import org.junit.Test;
import org.jvnet.hudson.test.Issue;
import org.jvnet.hudson.test.JenkinsRule;
import org.jvnet.hudson.test.SequenceLock;
import org.jvnet.hudson.test.TestBuilder;
import java.io.IOException;
import java.lang.reflect.Field;
import java.util.Collections;
import java.util.Set;
import java.util.concurrent.Callable;
import java.util.concurrent.Future;
/**
* @author Kohsuke Kawaguchi
*/
public class LabelExpressionTest {
@Rule
public JenkinsRule j = new JenkinsRule();
/**
* Verifies the queueing behavior in the presence of the expression.
*/
@Test
public void queueBehavior1() throws Exception {
DumbSlave w32 = j.createSlave("win 32bit", null);
DumbSlave w64 = j.createSlave("win 64bit", null);
j.createSlave("linux 32bit", null);
final SequenceLock seq = new SequenceLock();
FreeStyleProject p1 = j.createFreeStyleProject();
p1.getBuildersList().add(new TestBuilder() {
public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException {
seq.phase(0); // first, make sure the w32 agent is occupied
seq.phase(2);
seq.done();
return true;
}
});
p1.setAssignedLabel(j.jenkins.getLabel("win && 32bit"));
FreeStyleProject p2 = j.createFreeStyleProject();
p2.setAssignedLabel(j.jenkins.getLabel("win && 32bit"));
FreeStyleProject p3 = j.createFreeStyleProject();
p3.setAssignedLabel(j.jenkins.getLabel("win"));
Future<FreeStyleBuild> f1 = p1.scheduleBuild2(0);
seq.phase(1); // we schedule p2 build after w32 agent is occupied
Future<FreeStyleBuild> f2 = p2.scheduleBuild2(0);
Thread.sleep(1000); // time window to ensure queue has tried to assign f2 build
// p3 is tied to 'win', so even though p1 is busy, this should still go ahead and complete
FreeStyleBuild b3 = j.assertBuildStatusSuccess(p3.scheduleBuild2(0));
assertSame(w64,b3.getBuiltOn());
seq.phase(3); // once we confirm that p3 build is over, we let p1 proceed
// p1 should have been built on w32
FreeStyleBuild b1 = j.assertBuildStatusSuccess(f1);
assertSame(w32,b1.getBuiltOn());
// and so is p2
FreeStyleBuild b2 = j.assertBuildStatusSuccess(f2);
assertSame(w32,b2.getBuiltOn());
}
/**
* Push the build around to different nodes via the assignment
* to make sure it gets where we need it to.
*/
@Test
public void queueBehavior2() throws Exception {
DumbSlave s = j.createSlave("win", null);
FreeStyleProject p = j.createFreeStyleProject();
p.setAssignedLabel(j.jenkins.getLabel("!win"));
FreeStyleBuild b = j.assertBuildStatusSuccess(p.scheduleBuild2(0));
assertSame(j.jenkins,b.getBuiltOn());
p.setAssignedLabel(j.jenkins.getLabel("win"));
b = j.assertBuildStatusSuccess(p.scheduleBuild2(0));
assertSame(s,b.getBuiltOn());
p.setAssignedLabel(j.jenkins.getLabel("!win"));
b = j.assertBuildStatusSuccess(p.scheduleBuild2(0));
assertSame(j.jenkins,b.getBuiltOn());
}
/**
* Make sure we can reset the label of an existing slave.
*/
@Test
public void setLabelString() throws Exception {
DumbSlave s = j.createSlave("foo", "", null);
assertSame(s.getLabelString(), "");
s.setLabelString("bar");
assertSame(s.getLabelString(), "bar");
}
/**
* Tests the expression parser.
*/
@Test
public void parser1() throws Exception {
parseAndVerify("foo", "foo");
parseAndVerify("32bit.dot", "32bit.dot");
parseAndVerify("foo||bar", "foo || bar");
// user-given parenthesis is preserved
parseAndVerify("foo||bar&&zot", "foo||bar&&zot");
parseAndVerify("foo||(bar&&zot)", "foo||(bar&&zot)");
parseAndVerify("(foo||bar)&&zot", "(foo||bar)&&zot");
parseAndVerify("foo->bar", "foo ->\tbar");
parseAndVerify("!foo<->bar", "!foo <-> bar");
}
@Issue("JENKINS-8537")
@Test
public void parser2() throws Exception {
parseAndVerify("aaa&&bbb&&ccc","aaa&&bbb&&ccc");
}
private void parseAndVerify(String expected, String expr) throws ANTLRException {
assertEquals(expected, LabelExpression.parseExpression(expr).getName());
}
@Test
public void parserError() throws Exception {
parseShouldFail("foo bar");
parseShouldFail("foo (bar)");
}
@Test
public void laxParsing() {
// this should parse as an atom
LabelAtom l = (LabelAtom) j.jenkins.getLabel("lucene.zones.apache.org (Solaris 10)");
assertEquals(l.getName(),"lucene.zones.apache.org (Solaris 10)");
assertEquals(l.getExpression(),"\"lucene.zones.apache.org (Solaris 10)\"");
}
@Test
public void dataCompatibilityWithHostNameWithWhitespace() throws Exception {
assumeFalse("Windows can't have paths with colons, skipping", Functions.isWindows());
DumbSlave slave = new DumbSlave("abc def (xyz) test", "dummy",
j.createTmpDir().getPath(), "1", Mode.NORMAL, "", j.createComputerLauncher(null), RetentionStrategy.NOOP, Collections.EMPTY_LIST);
j.jenkins.addNode(slave);
FreeStyleProject p = j.createFreeStyleProject();
p.setAssignedLabel(j.jenkins.getLabel("abc def"));
assertEquals("abc def",p.getAssignedLabel().getName());
assertEquals("\"abc def\"",p.getAssignedLabel().getExpression());
// expression should be persisted, not the name
Field f = AbstractProject.class.getDeclaredField("assignedNode");
f.setAccessible(true);
assertEquals("\"abc def\"",f.get(p));
// but if the name is set, we'd still like to parse it
f.set(p,"a:b c");
assertEquals("a:b c",p.getAssignedLabel().getName());
}
@Test
public void quote() {
Label l = j.jenkins.getLabel("\"abc\\\\\\\"def\"");
assertEquals("abc\\\"def",l.getName());
l = j.jenkins.getLabel("label1||label2"); // create label expression
l = j.jenkins.getLabel("\"label1||label2\"");
assertEquals("label1||label2",l.getName());
}
/**
* The name should have parenthesis at the right place to preserve the tree structure.
*/
@Test
public void composite() {
LabelAtom x = j.jenkins.getLabelAtom("x");
assertEquals("!!x",x.not().not().getName());
assertEquals("(x||x)&&x",x.or(x).and(x).getName());
assertEquals("x&&x||x",x.and(x).or(x).getName());
}
@Test
public void dash() {
j.jenkins.getLabelAtom("solaris-x86");
}
private void parseShouldFail(String expr) {
try {
LabelExpression.parseExpression(expr);
fail(expr + " should fail to parse");
} catch (ANTLRException e) {
// expected
}
}
@Test
public void formValidation() throws Exception {
j.executeOnServer(new Callable<Object>() {
public Object call() throws Exception {
Label l = j.jenkins.getLabel("foo");
DumbSlave s = j.createSlave(l);
String msg = LabelExpression.validate("goo").renderHtml();
assertTrue(msg.contains("foo"));
assertTrue(msg.contains("goo"));
msg = LabelExpression.validate("master && goo").renderHtml();
assertTrue(msg.contains("foo"));
assertTrue(msg.contains("goo"));
return null;
}
});
}
@Test
public void parseLabel() throws Exception {
Set<LabelAtom> result = Label.parse("one two three");
String[] expected = {"one", "two", "three"};
for(String e : expected) {
assertTrue(result.contains(new LabelAtom(e)));
}
assertEquals(result.size(), expected.length);
}
}
| {
"content_hash": "2bdc49274557b636cd3cd9d620cb9917",
"timestamp": "",
"source": "github",
"line_count": 260,
"max_line_length": 147,
"avg_line_length": 33.78846153846154,
"alnum_prop": 0.6294820717131474,
"repo_name": "DanielWeber/jenkins",
"id": "ce7739a77971c8a51cd750ff633422eac5d50042",
"size": "9926",
"binary": false,
"copies": "1",
"ref": "refs/heads/continental",
"path": "test/src/test/java/hudson/model/labels/LabelExpressionTest.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "1023"
},
{
"name": "C",
"bytes": "2091"
},
{
"name": "CSS",
"bytes": "234004"
},
{
"name": "Dockerfile",
"bytes": "1147"
},
{
"name": "GAP",
"bytes": "6289"
},
{
"name": "Groovy",
"bytes": "78436"
},
{
"name": "HTML",
"bytes": "972141"
},
{
"name": "Handlebars",
"bytes": "14878"
},
{
"name": "Java",
"bytes": "11242657"
},
{
"name": "JavaScript",
"bytes": "393769"
},
{
"name": "Less",
"bytes": "128453"
},
{
"name": "Perl",
"bytes": "14718"
},
{
"name": "Ruby",
"bytes": "19375"
},
{
"name": "Shell",
"bytes": "10643"
}
],
"symlink_target": ""
} |
package io.qameta.htmlelements.example;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import java.util.Arrays;
import java.util.List;
import java.util.NoSuchElementException;
import static io.qameta.htmlelements.example.TestData.WebElementBuilder.mockWebElement;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
/**
* @author Artem Eroshenko <erosenkoam@me.com>
*/
public class TestData {
public static final String SEARCH_ARROW_XPATH = "//form[contains(@class, 'search2 suggest2-form')]";
public static final String SUGGEST_XPATH = "//div[@class='suggest']";
public static final String SUGGEST_ITEM_XPATH = "//a";
public static final String SEARCH_FORM_XPATH = "//div[@class='form']";
public static final String SEARCH_FORM_TEMPLATE = "//div[@class='{{ className }}']";
public static final String REQUEST_INPUT_XPATH = "//div[@class='input']";
public static WebDriver mockDriver() {
WebElement textInput = mockWebElement()
.withText("text input")
.withDisplayed(true)
.build();
List<WebElement> suggest = Arrays.asList(
mockWebElement()
.withChildElement(SUGGEST_ITEM_XPATH, mockWebElement().withText("first suggest item").build())
.withText("first suggest")
.withDisplayed(false, true)
.build(),
mockWebElement()
.withChildElement(SUGGEST_ITEM_XPATH, mockWebElement().withText("second suggest item").build())
.withText("second suggest")
.withDisplayed(false, false, false, true)
.build()
);
WebElement searchForm = mockWebElement()
.withChildElement(REQUEST_INPUT_XPATH, textInput)
.withText("searchForm")
.build();
WebElement searchArrow = mockWebElement()
.withChildElements(SUGGEST_XPATH, suggest)
.withChildElement(SEARCH_FORM_XPATH, searchForm)
.withText("search-arro", "search", "search-arrow")
.withDisplayed(true)
.build();
WebDriver driver = mock(WebDriver.class);
when(driver.findElement(By.xpath(SEARCH_ARROW_XPATH))).thenReturn(searchArrow);
return driver;
}
private static WebElement createWebElement(String text, Boolean displayed, Boolean... displayedNext) {
WebElement webElement = mock(WebElement.class);
when(webElement.getText()).thenReturn(text);
when(webElement.toString()).thenReturn(text);
when(webElement.isDisplayed()).thenReturn(displayed, displayedNext);
return webElement;
}
public static class WebElementBuilder {
public static WebElementBuilder mockWebElement() {
return new WebElementBuilder();
}
private final WebElement element;
public WebElementBuilder() {
this.element = mock(WebElement.class);
}
public WebElementBuilder withText(String text, String... other) {
when(getElement().getText()).thenReturn(text, other);
return this;
}
public WebElementBuilder withDisplayed(boolean displayed, Boolean... other) {
when(getElement().isDisplayed()).thenReturn(displayed, other);
return this;
}
public WebElementBuilder withChildElement(String xpath, WebElement element) {
when(getElement().findElement(By.xpath(xpath))).thenReturn(element);
return this;
}
public WebElementBuilder withChildElements(String xpath, List<WebElement> elements) {
when(getElement().findElements(By.xpath(xpath))).thenReturn(elements);
return this;
}
private WebElement getElement() {
return element;
}
public WebElement build() {
return getElement();
}
}
}
| {
"content_hash": "6ab213fb7441753d30220d535d4f6168",
"timestamp": "",
"source": "github",
"line_count": 124,
"max_line_length": 119,
"avg_line_length": 34.25806451612903,
"alnum_prop": 0.6238229755178908,
"repo_name": "eroshenkoam/htmlelements",
"id": "b8f9e4acaf4d78b0f58ae2ea3986068a3211149a",
"size": "4248",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/test/java/io/qameta/htmlelements/example/TestData.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "5137"
},
{
"name": "Java",
"bytes": "78186"
},
{
"name": "Shell",
"bytes": "6468"
}
],
"symlink_target": ""
} |
max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count }
threads min_threads_count, max_threads_count
# Specifies the `worker_timeout` threshold that Puma will use to wait before
# terminating a worker in development environments.
#
worker_timeout 3600 if ENV.fetch("RAILS_ENV", "development") == "development"
# Specifies the `port` that Puma will listen on to receive requests; default is 3000.
#
port ENV.fetch("PORT") { 3000 }
# Specifies the `environment` that Puma will run in.
#
environment ENV.fetch("RAILS_ENV") { "development" }
# Specifies the `pidfile` that Puma will use.
pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" }
# Specifies the number of `workers` to boot in clustered mode.
# Workers are forked web server processes. If using threads and workers together
# the concurrency of the application would be max `threads` * `workers`.
# Workers do not work on JRuby or Windows (both of which do not support
# processes).
#
workers ENV.fetch("WEB_CONCURRENCY") { 2 }
# Use the `preload_app!` method when specifying a `workers` number.
# This directive tells Puma to first boot the application and load code
# before forking the application. This takes advantage of Copy On Write
# process behavior so workers use less memory.
#
preload_app!
# Allow puma to be restarted by `rails restart` command.
plugin :tmp_restart
| {
"content_hash": "e0259328069947ca45ed02e72058c902",
"timestamp": "",
"source": "github",
"line_count": 37,
"max_line_length": 85,
"avg_line_length": 38.351351351351354,
"alnum_prop": 0.7470049330514447,
"repo_name": "hennevogel/osem",
"id": "c867218c296f2c4d299f9d65614ec9f604a213c7",
"size": "1784",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "config/puma.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "2056"
},
{
"name": "Dockerfile",
"bytes": "764"
},
{
"name": "HTML",
"bytes": "6780"
},
{
"name": "Haml",
"bytes": "343274"
},
{
"name": "JavaScript",
"bytes": "22655"
},
{
"name": "Ruby",
"bytes": "1184821"
},
{
"name": "SCSS",
"bytes": "17443"
},
{
"name": "Shell",
"bytes": "122"
}
],
"symlink_target": ""
} |
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/ll__place_schedule"
style="@style/PlacePageItemFrame"
android:tag="schedule"
tools:visibility="visible">
<ImageView
android:id="@+id/iv__place_schedule"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/margin_base"
android:src="@drawable/ic_operating_hours"
android:tint="?iconTint"/>
<TextView
android:id="@+id/tv__place_schedule"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/MwmTextAppearance.PlacePage"
tools:text="Today 16:00-18.00"/>
</LinearLayout> | {
"content_hash": "de86ce41ff882e9949c617d32aa30c11",
"timestamp": "",
"source": "github",
"line_count": 23,
"max_line_length": 63,
"avg_line_length": 35.17391304347826,
"alnum_prop": 0.7132262051915945,
"repo_name": "Endika/omim",
"id": "fd7317f637608ff53c4840e6f4a528f452e43d33",
"size": "809",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "android/res/layout/place_page_schedule.xml",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Awk",
"bytes": "3962"
},
{
"name": "Batchfile",
"bytes": "9423"
},
{
"name": "C",
"bytes": "11720886"
},
{
"name": "C++",
"bytes": "127109625"
},
{
"name": "CMake",
"bytes": "120618"
},
{
"name": "CSS",
"bytes": "19655"
},
{
"name": "Cucumber",
"bytes": "305230"
},
{
"name": "DIGITAL Command Language",
"bytes": "36710"
},
{
"name": "Emacs Lisp",
"bytes": "7798"
},
{
"name": "Groff",
"bytes": "78550"
},
{
"name": "HTML",
"bytes": "9393667"
},
{
"name": "IDL",
"bytes": "5307"
},
{
"name": "Inno Setup",
"bytes": "4337"
},
{
"name": "Java",
"bytes": "2382897"
},
{
"name": "JavaScript",
"bytes": "3265"
},
{
"name": "Lua",
"bytes": "57500"
},
{
"name": "Makefile",
"bytes": "233367"
},
{
"name": "Module Management System",
"bytes": "2080"
},
{
"name": "Objective-C",
"bytes": "680706"
},
{
"name": "Objective-C++",
"bytes": "778774"
},
{
"name": "PHP",
"bytes": "2841"
},
{
"name": "Perl",
"bytes": "25886"
},
{
"name": "PowerShell",
"bytes": "1885"
},
{
"name": "Protocol Buffer",
"bytes": "439756"
},
{
"name": "Python",
"bytes": "1109044"
},
{
"name": "QMake",
"bytes": "76906"
},
{
"name": "Ruby",
"bytes": "59753"
},
{
"name": "Shell",
"bytes": "2282296"
},
{
"name": "TeX",
"bytes": "311877"
},
{
"name": "VimL",
"bytes": "3744"
}
],
"symlink_target": ""
} |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>Boost.Geometry.Index: /home/ubuntu/boost/boost/geometry/index Directory Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">Boost.Geometry.Index
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Groups</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_70241e0cb632ef83c95057df97d23a47.html">boost</a></li><li class="navelem"><a class="el" href="dir_6f25c90e381132fd960cd64986a2bf26.html">geometry</a></li><li class="navelem"><a class="el" href="dir_ef67fc9629a2ce2087f73d1d24f131e1.html">index</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">index Directory Reference</div> </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="subdirs"></a>
Directories</h2></td></tr>
<tr class="memitem:dir_a9e91759b06c3469534fe3a2d2635516"><td class="memItemLeft" align="right" valign="top">directory  </td><td class="memItemRight" valign="bottom"><a class="el" href="dir_a9e91759b06c3469534fe3a2d2635516.html">adaptors</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
Files</h2></td></tr>
<tr class="memitem:distance__predicates_8hpp"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><b>distance_predicates.hpp</b> <a href="distance__predicates_8hpp_source.html">[code]</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:equal__to_8hpp"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><b>equal_to.hpp</b> <a href="equal__to_8hpp_source.html">[code]</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:indexable_8hpp"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><b>indexable.hpp</b> <a href="indexable_8hpp_source.html">[code]</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:inserter_8hpp"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><b>inserter.hpp</b> <a href="inserter_8hpp_source.html">[code]</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:parameters_8hpp"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><b>parameters.hpp</b> <a href="parameters_8hpp_source.html">[code]</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:predicates_8hpp"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><b>predicates.hpp</b> <a href="predicates_8hpp_source.html">[code]</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:rtree_8hpp"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><b>rtree.hpp</b> <a href="rtree_8hpp_source.html">[code]</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
</table>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Dec 22 2016 12:40:17 for Boost.Geometry.Index by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.6
</small></address>
</body>
</html>
| {
"content_hash": "0608e1e33522338dba76aab8c5cfe8ce",
"timestamp": "",
"source": "github",
"line_count": 116,
"max_line_length": 684,
"avg_line_length": 62.66379310344828,
"alnum_prop": 0.6756087494841106,
"repo_name": "keichan100yen/ode-ext",
"id": "1617667c47c9c09255b6c3a10199359b616ebb04",
"size": "7269",
"binary": false,
"copies": "4",
"ref": "refs/heads/master",
"path": "boost/libs/geometry/doc/index/html_by_doxygen/dir_ef67fc9629a2ce2087f73d1d24f131e1.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Assembly",
"bytes": "309067"
},
{
"name": "Batchfile",
"bytes": "37875"
},
{
"name": "C",
"bytes": "2967570"
},
{
"name": "C#",
"bytes": "40804"
},
{
"name": "C++",
"bytes": "189322982"
},
{
"name": "CMake",
"bytes": "119251"
},
{
"name": "CSS",
"bytes": "456744"
},
{
"name": "Cuda",
"bytes": "52444"
},
{
"name": "DIGITAL Command Language",
"bytes": "6246"
},
{
"name": "Fortran",
"bytes": "1856"
},
{
"name": "Groff",
"bytes": "5189"
},
{
"name": "HTML",
"bytes": "181460055"
},
{
"name": "IDL",
"bytes": "28"
},
{
"name": "JavaScript",
"bytes": "419776"
},
{
"name": "Lex",
"bytes": "1231"
},
{
"name": "M4",
"bytes": "29689"
},
{
"name": "Makefile",
"bytes": "1088024"
},
{
"name": "Max",
"bytes": "36857"
},
{
"name": "Objective-C",
"bytes": "11406"
},
{
"name": "Objective-C++",
"bytes": "630"
},
{
"name": "PHP",
"bytes": "68641"
},
{
"name": "Perl",
"bytes": "36491"
},
{
"name": "Perl6",
"bytes": "2053"
},
{
"name": "Python",
"bytes": "1612978"
},
{
"name": "QML",
"bytes": "593"
},
{
"name": "QMake",
"bytes": "16692"
},
{
"name": "Rebol",
"bytes": "354"
},
{
"name": "Ruby",
"bytes": "5532"
},
{
"name": "Shell",
"bytes": "354720"
},
{
"name": "Tcl",
"bytes": "1172"
},
{
"name": "TeX",
"bytes": "32117"
},
{
"name": "XSLT",
"bytes": "553585"
},
{
"name": "Yacc",
"bytes": "19623"
}
],
"symlink_target": ""
} |
from __future__ import absolute_import
import sys
from google.api_core.protobuf_helpers import get_messages
from google.cloud.asset_v1.proto import asset_service_pb2
from google.cloud.asset_v1.proto import assets_pb2
from google.iam.v1 import policy_pb2
from google.longrunning import operations_pb2
from google.protobuf import any_pb2
from google.protobuf import struct_pb2
from google.protobuf import timestamp_pb2
from google.rpc import status_pb2
from google.type import expr_pb2
_shared_modules = [
policy_pb2,
operations_pb2,
any_pb2,
struct_pb2,
timestamp_pb2,
status_pb2,
expr_pb2,
]
_local_modules = [asset_service_pb2, assets_pb2]
names = []
for module in _shared_modules: # pragma: NO COVER
for name, message in get_messages(module).items():
setattr(sys.modules[__name__], name, message)
names.append(name)
for module in _local_modules:
for name, message in get_messages(module).items():
message.__module__ = "google.cloud.asset_v1.types"
setattr(sys.modules[__name__], name, message)
names.append(name)
__all__ = tuple(sorted(names))
| {
"content_hash": "0dba5dc34f683a1b489dbbf727a5f394",
"timestamp": "",
"source": "github",
"line_count": 42,
"max_line_length": 58,
"avg_line_length": 26.952380952380953,
"alnum_prop": 0.7120141342756183,
"repo_name": "tseaver/google-cloud-python",
"id": "6dc0ded7c41318e108790d8cbbfabceaf3d4a311",
"size": "1735",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "asset/google/cloud/asset_v1/types.py",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "HTML",
"bytes": "1094"
},
{
"name": "Python",
"bytes": "30519057"
},
{
"name": "Shell",
"bytes": "9148"
}
],
"symlink_target": ""
} |
<?php
namespace AppDemo\AppBundle\Controller;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\HttpFoundation\Request;
use AppDemo\Common\BaseController;
class HelloController extends BaseController
{
/**
* @return Response
* @Route("/")
*/
public function indexAction(Request $request)
{
$uid = $request->get('uid') ? : 4;
$user = $this->getUserService()->getUser($uid);
return $this->render(
'AppBundle:hello:index.html.twig',
['user' => $user]
);
}
private function getUserService()
{
return $this->registerService('User.UserService');
}
} | {
"content_hash": "a0cae484f6bd80b4ff47e74e31e7bd8f",
"timestamp": "",
"source": "github",
"line_count": 30,
"max_line_length": 58,
"avg_line_length": 24.033333333333335,
"alnum_prop": 0.6352288488210819,
"repo_name": "tastphp/tast-symfony",
"id": "26be7737888f31237ff73974624d4d1c20c69e99",
"size": "721",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/AppDemo/AppBundle/Controller/HelloController.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "HTML",
"bytes": "486"
},
{
"name": "PHP",
"bytes": "8002"
}
],
"symlink_target": ""
} |
package ecologylab.bigsemantics.generated.library;
import ecologylab.bigsemantics.metadata.builtins.MetadataBuiltinsTypesScope;
import ecologylab.bigsemantics.metadata.builtins.RichDocument;
import ecologylab.bigsemantics.metadata.scalar.MetadataString;
import ecologylab.bigsemantics.metametadata.MetaMetadataCompositeField;
import ecologylab.bigsemantics.namesandnums.SemanticsNames;
import ecologylab.serialization.annotations.simpl_inherit;
import ecologylab.serialization.annotations.simpl_scalar;
import ecologylab.serialization.annotations.simpl_tag;
import java.lang.String;
import java.util.List;
import java.util.Map;
/**
*openDNS tags for a domain
*/
@simpl_inherit
@simpl_tag("openDNSDomain")
public class OpenDNSDomain extends RichDocument
{
@simpl_scalar
private MetadataString domain;
public OpenDNSDomain()
{ super(); }
public OpenDNSDomain(MetaMetadataCompositeField mmd) {
super(mmd);
}
public MetadataString domain()
{
MetadataString result = this.domain;
if (result == null)
{
result = new MetadataString();
this.domain = result;
}
return result;
}
public String getDomain()
{
return this.domain == null ? null : domain().getValue();
}
public MetadataString getDomainMetadata()
{
return domain;
}
public void setDomain(String domain)
{
if (domain != null)
this.domain().setValue(domain);
}
public void setDomainMetadata(MetadataString domain)
{
this.domain = domain;
}
}
| {
"content_hash": "f0ccf51abe684530b3b6d4b775179eff",
"timestamp": "",
"source": "github",
"line_count": 66,
"max_line_length": 76,
"avg_line_length": 22.075757575757574,
"alnum_prop": 0.7721345229924502,
"repo_name": "ecologylab/BigSemanticsWrapperRepository",
"id": "74123609c4612c30dca5e73016d399814643d5e8",
"size": "1638",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "BigSemanticsGeneratedClassesJava/src/ecologylab/bigsemantics/generated/library/OpenDNSDomain.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "C#",
"bytes": "620753"
},
{
"name": "Java",
"bytes": "978893"
},
{
"name": "Makefile",
"bytes": "367"
},
{
"name": "Python",
"bytes": "1919"
},
{
"name": "XSLT",
"bytes": "404"
}
],
"symlink_target": ""
} |
var config = require('./config');
require('cnpmjs.org').startSync(config);
console.log('sync worker start!');
| {
"content_hash": "613325a3931816231b40f66d0c9bc968",
"timestamp": "",
"source": "github",
"line_count": 4,
"max_line_length": 40,
"avg_line_length": 27.75,
"alnum_prop": 0.7027027027027027,
"repo_name": "cnpm/custom-cnpm-example",
"id": "7009f002f9c0637a547dbcf2e208bdd65ad6f3b6",
"size": "111",
"binary": false,
"copies": "4",
"ref": "refs/heads/master",
"path": "sfs/sync.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "JavaScript",
"bytes": "5903"
}
],
"symlink_target": ""
} |
'use strict';
const models = require('../lib/model/db');
module.exports = {
up: (queryInterface, Sequelize) => {
queryInterface.describeTable('Companies').then((attributes) => {
if (attributes.hasOwnProperty('carry_over')) {
return 1;
}
return queryInterface.addColumn(
'Companies',
'carry_over',
models.Company.attributes.carry_over
);
});
},
down: function (queryInterface, Sequelize) {
return queryInterface.removeColumn('Companies', 'carry_over');
}
};
| {
"content_hash": "3d8acf3ca0aa6ffc01bdef4919558f46",
"timestamp": "",
"source": "github",
"line_count": 25,
"max_line_length": 68,
"avg_line_length": 21.56,
"alnum_prop": 0.614100185528757,
"repo_name": "timeoff-management/application",
"id": "18b1a42810de8e86502fc9eef5dc3e9a0a6b98fd",
"size": "540",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "migrations/20181213-carry-over-conf.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "39296"
},
{
"name": "Dockerfile",
"bytes": "1001"
},
{
"name": "HTML",
"bytes": "137483"
},
{
"name": "JavaScript",
"bytes": "766627"
}
],
"symlink_target": ""
} |
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/parent"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:gravity="center"
android:orientation="vertical" >
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="top" />
<ListView
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:divider="@null" >
</ListView>
</LinearLayout> | {
"content_hash": "6713c8cfd4dc4ae9708684fc58c4ad99",
"timestamp": "",
"source": "github",
"line_count": 23,
"max_line_length": 72,
"avg_line_length": 31.695652173913043,
"alnum_prop": 0.6611796982167353,
"repo_name": "Mahfa/AndroidColorPop",
"id": "fe539e746d9ff13495af27aa22e7eaa8dde6c5bd",
"size": "729",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "demo/src/main/res/layout/fragment_second_list.xml",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "38262"
}
],
"symlink_target": ""
} |
@implementation DetailTableViewController
@synthesize emailButton;
@synthesize printButton;
@synthesize pdfButton;
@synthesize spacerButton;
@synthesize pdfViewController;
@synthesize mailComposeViewController;
@synthesize editableSectionHeaderView;
- (void)viewDidLoad
{
[super viewDidLoad];
NSMutableArray *items = [NSMutableArray arrayWithObjects: spacerButton, pdfButton, nil];
if ([EmailManager isMailAvailable]) {
// add Email button only if mail is available on iPhone
[items addObject:emailButton];
}
if ([PrintManager isPrintingAvailable]) {
// add Print button only if printing is available on iPhone
[items addObject:printButton];
}
[items addObject:spacerButton];
self.toolbarItems = items;
}
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
// show toolbar with animation
[self.navigationController setToolbarHidden:NO animated:YES];
}
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
// hide toolbar with animation
[self.navigationController setToolbarHidden:YES animated:YES];
}
- (void)viewDidUnload
{
[super viewDidUnload];
// Release any retained subviews of the main view.
self.emailButton = nil;
self.printButton = nil;
self.pdfButton = nil;
self.spacerButton = nil;
self.toolbarItems = nil;
self.pdfViewController = nil;
self.mailComposeViewController = nil;
self.editableSectionHeaderView = nil;
}
- (UIView *)configureViewForHeaderInSection:(NSInteger)section withTitle:(NSString *)title
{
EditableSectionHeaderView *view = nil;
if (view == nil) {
[[NSBundle mainBundle] loadNibNamed:@"EditableSectionHeaderView" owner:self options:nil];
view = editableSectionHeaderView;
self.editableSectionHeaderView = nil;
}
view.header.text = NSLocalizedString(title, "");
[view.edit setTitle:NSLocalizedString(@"Edit", "") forState:UIControlStateNormal];
view.edit.tag = section;
// round up the Edit button's corners
CALayer *layer = view.edit.layer;
layer.cornerRadius = 6.0f;
layer.masksToBounds = YES;
layer.borderWidth = 1.0f;
layer.borderColor = [UIColor colorWithWhite:0.5f alpha:0.2f].CGColor;
return view;
}
@end | {
"content_hash": "80fad64b86b20f14707bab3411fbb73c",
"timestamp": "",
"source": "github",
"line_count": 80,
"max_line_length": 97,
"avg_line_length": 28.05,
"alnum_prop": 0.7352941176470589,
"repo_name": "davidjpeacock/Drimjas",
"id": "3358d2a8ea8c0899998459353602cde0d38d8417",
"size": "2608",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "iPhone/Drimjas/Classes/Cells/DetailTableViewController.m",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "C",
"bytes": "444"
},
{
"name": "Objective-C",
"bytes": "359446"
},
{
"name": "Shell",
"bytes": "68"
}
],
"symlink_target": ""
} |
package com.github.bijoysingh.uibasics.setters;
import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import androidx.annotation.DrawableRes;
/**
* ImageSetter
* Created by bijoy on 10/28/16.
*/
public interface ImageSetter {
void setImageResource(@DrawableRes Integer imageResource);
void setImageDrawable(Drawable imageDrawable);
void setImageBitmap(Bitmap bitmap);
void setImagePadding(int padding);
void setImageTint(int color);
void setImageSize(int size);
}
| {
"content_hash": "a78ce8fd60c6a46914a63fbf0e391278",
"timestamp": "",
"source": "github",
"line_count": 25,
"max_line_length": 60,
"avg_line_length": 20.36,
"alnum_prop": 0.7799607072691552,
"repo_name": "BijoySingh/Android-UI-Basics",
"id": "93cafeda38432a87710bfbfc6a17f38cdda01315",
"size": "509",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "ui-basics/src/main/java/com/github/bijoysingh/uibasics/setters/ImageSetter.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "39034"
}
],
"symlink_target": ""
} |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
class EncodingDecoding
{
static void Main()
{
Console.Write("Enter text: ");
string input = Console.ReadLine();
Console.Write("Enter key(cipher): ");
string cipher = Console.ReadLine();
List<string> result = new List<string>();
for (int i = 0, j = 0; i < input.Length; i++, j++) // This must be in method
{
if (j >= cipher.Length)
{
j = 0;
}
result.Add((input[i] ^ cipher[j]).ToString("X"));//.ToString()); // "X"
}
Console.WriteLine(string.Join("", result));
Console.Write("To decode enter the same key: ");
cipher = Console.ReadLine();
StringBuilder final = new StringBuilder();
for (int i = 0, k = 0; i < result.Count; i++, k++)
{
int a = Converting(result[i]);
if (k >= cipher.Length)
{
k = 0;
}
int temp = a ^ cipher[k];
final.Append(Convert.ToChar(temp));
}
Console.WriteLine(string.Join("", final)); // Yeah
}
static int Converting(string str)
{
string[] hex = new string[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F" }; //if you notice - index of array represents number in decimal.
//Console.Write("Enter Hex number: ");
string input = str.ToUpper(); // if enter lowercase of letter - will not be a problem
int finale = 0;
string temp = "";
for (int i = 0; i <= input.Length - 1; i++)
{
temp = input[i].ToString();
for (int z = 0; z <= hex.Length - 1; z++)
{
if (temp == hex[z])
{
finale += (int)((Math.Pow(16, input.Length - 1 - i)) * z);
break;
}
}
}
return finale;
}
} | {
"content_hash": "a78e41f9693bb6f774b6bb854ad7aa7a",
"timestamp": "",
"source": "github",
"line_count": 64,
"max_line_length": 182,
"avg_line_length": 32.03125,
"alnum_prop": 0.46682926829268295,
"repo_name": "snukal/All-Telerik-Homeworks",
"id": "1609e9f83419a0db31285f39d6160d6504dfa92a",
"size": "2052",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "C#2/Strings-and-Text-Processing/7. Encode decode/Program.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "437238"
},
{
"name": "CSS",
"bytes": "88337"
},
{
"name": "HTML",
"bytes": "154704"
},
{
"name": "JavaScript",
"bytes": "74722"
},
{
"name": "Smalltalk",
"bytes": "3530"
},
{
"name": "Visual Basic",
"bytes": "63383"
}
],
"symlink_target": ""
} |
local utils = require 'pl.utils'
local ok, moonscript, line_tables, util = pcall(function()
return require 'moonscript', require 'moonscript.line_tables', require 'moonscript.util'
end)
local _cache = {}
-- find the line number of `pos` chars into fname
local lookup_line = function(fname, pos)
if not _cache[fname] then
local f = io.open(fname)
_cache[fname] = f:read('*a')
f:close()
end
return util.pos_to_line(_cache[fname], pos)
end
local rewrite_linenumber = function(fname, lineno)
local tbl = line_tables[fname]
if fname and tbl then
for i = lineno, 0 ,-1 do
if tbl[i] then
return lookup_line(fname, tbl[i])
end
end
end
return lineno
end
local rewrite_traceback = function(fname, trace)
local lines = {}
local j = 0
local rewrite_one = function(line)
if line == nil then
return ''
end
local fname, lineno = line:match('[^"]+"([^:]+)".:(%d+):')
if fname and lineno then
local new_lineno = rewrite_linenumber(fname, tonumber(lineno))
if new_lineno then
line = line:gsub(':' .. lineno .. ':', ':' .. new_lineno .. ':')
end
end
return line
end
for line in trace:gmatch('[^\r\n]+') do
j = j + 1
lines[j] = rewrite_one(line)
end
return table.concat(lines, trace:match('[\r\n]+'))
end
local ret = {}
local getTrace = function(filename, info)
local p = require 'pl.pretty'
local index = info.traceback:find('\n%s*%[C]')
info.traceback = info.traceback:sub(1, index)
-- sometimes moonscript gives files like [string "./filename.moon"], so
-- we'll chop it up to only get the filename.
info.short_src = info.short_src:match('string "(.+)"') or info.short_src
info.traceback = rewrite_traceback(filename, info.traceback)
info.linedefined = rewrite_linenumber(filename, info.linedefined)
info.currentline = rewrite_linenumber(filename, info.currentline)
return info
end
local rewriteMessage = function(filename, message)
local split = utils.split(message, ':', true, 3)
if #split < 3 then
return message
end
local filename = split[1]
local line = split[2]
filename = filename:match('string "(.+)"')
line = rewrite_linenumber(filename, line)
return filename .. ':' .. tostring(line)
end
ret.match = function(busted, filename)
local path, name, ext = filename:match('(.-)([^\\/\\\\]-%.?([^%.\\/]*))$')
if ok and ext == 'moon' then
return true
end
return false
end
ret.load = function(busted, filename)
local file
local success, err = pcall(function()
file, err = moonscript.loadfile(filename)
if not file then
busted.publish({ 'error', 'file' }, filename, nil, nil, err)
end
end)
if not success then
busted.publish({ 'error', 'file' }, filename, nil, nil, err)
end
return file, getTrace, rewriteMessage
end
return ret
| {
"content_hash": "ecccbd4158dc0f32ed365beed925056f",
"timestamp": "",
"source": "github",
"line_count": 121,
"max_line_length": 90,
"avg_line_length": 23.644628099173552,
"alnum_prop": 0.6431317721076547,
"repo_name": "ld-test/busted.ryanplusplus",
"id": "497a5fbb7b77bee0c3ccc6bcdcad5be5fe045840",
"size": "2861",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "busted/modules/files/moonscript.lua",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "71"
},
{
"name": "Lua",
"bytes": "77805"
},
{
"name": "MoonScript",
"bytes": "82"
},
{
"name": "Shell",
"bytes": "1017"
}
],
"symlink_target": ""
} |
<?php
namespace Purekid\Mongodm\Test\Model;
class Student extends User
{
protected static $attrs = array(
'grade' => array('type'=>'string'),
);
}
| {
"content_hash": "e72493447a4088f3827881ff475fd162",
"timestamp": "",
"source": "github",
"line_count": 14,
"max_line_length": 44,
"avg_line_length": 12.214285714285714,
"alnum_prop": 0.6023391812865497,
"repo_name": "jrschumacher/mongodm",
"id": "07b8db4effce5deff2645d04b3ffaf2d992fe0ae",
"size": "171",
"binary": false,
"copies": "4",
"ref": "refs/heads/master",
"path": "tests/Model/Student.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "PHP",
"bytes": "131958"
}
],
"symlink_target": ""
} |
{% extends "symposion/proposals/base.html" %}
{% load bootstrap %}
{% load pinax_boxes_tags %}
{% load i18n %}
{% block page_title %}Enviar una propuesta para {{ kind.name }}{% endblock %}
{% block body %}
<form method="POST" action="" enctype="multipart/form-data" class="form-horizontal">
{% csrf_token %}
<fieldset>
{{ proposal_form|bootstrap_horizontal }}
</fieldset>
<div class="form-actions">
<p> Serás capaz de editar tu propuesta luego de que haya sido enviada. El comite de revsión, podrá hacer preguntas, proveer feedback y también sugerir cambios a tu propuesta como parte del proceso de revisión
</p>
<input class="btn btn-primary" type="submit" name="finish" value="Guardar" />
<!-- <span style="float: right; padding: 4px 6px">or</span> -->
<input class="btn btn-default" type="submit" name="add-speakers" value="Guardar y agregar oradores adicionales." />
</div>
</form>
{% endblock %}
| {
"content_hash": "01bad1e1c25821f73fdd9d015aee138f",
"timestamp": "",
"source": "github",
"line_count": 24,
"max_line_length": 220,
"avg_line_length": 42.708333333333336,
"alnum_prop": 0.6204878048780488,
"repo_name": "facttic/PinaxCon",
"id": "c6de506858d77839d5231e461522d29d8a057e62",
"size": "1030",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "pinaxcon/templates/symposion/proposals/proposal_submit_kind.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "13764"
},
{
"name": "HTML",
"bytes": "162203"
},
{
"name": "JavaScript",
"bytes": "10601"
},
{
"name": "Python",
"bytes": "53353"
}
],
"symlink_target": ""
} |
// Copyright 2007-2017 Chris Patterson, Dru Sellers, Travis Smith, et. al.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use
// this file except in compliance with the License. You may obtain a copy of the
// License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed
// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
// CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License.
namespace Automatonymous.CorrelationConfigurators
{
using System;
using System.Linq.Expressions;
using GreenPipes;
using MassTransit;
using MassTransit.Saga;
using MassTransit.Saga.Factories;
using MassTransit.Saga.Pipeline.Filters;
using Saga.QueryFactories;
public class MassTransitEventCorrelationConfigurator<TInstance, TData> :
IEventCorrelationConfigurator<TInstance, TData>,
IEventCorrelationBuilder
where TInstance : class, SagaStateMachineInstance
where TData : class
{
readonly Event<TData> _event;
readonly SagaStateMachine<TInstance> _machine;
bool _insertOnInitial;
IFilter<ConsumeContext<TData>> _messageFilter;
IPipe<ConsumeContext<TData>> _missingPipe;
ISagaFactory<TInstance, TData> _sagaFactory;
SagaFilterFactory<TInstance, TData> _sagaFilterFactory;
public MassTransitEventCorrelationConfigurator(SagaStateMachine<TInstance> machine, Event<TData> @event, EventCorrelation existingCorrelation)
{
_event = @event;
_machine = machine;
_insertOnInitial = false;
_sagaFactory = new DefaultSagaFactory<TInstance, TData>();
var correlation = existingCorrelation as EventCorrelation<TInstance, TData>;
if (correlation != null)
{
_sagaFilterFactory = correlation.FilterFactory;
_messageFilter = correlation.MessageFilter;
}
}
public EventCorrelation Build()
{
return new MassTransitEventCorrelation<TInstance, TData>(_machine, _event, _sagaFilterFactory, _messageFilter, _missingPipe, _sagaFactory,
_insertOnInitial);
}
public bool InsertOnInitial
{
set { _insertOnInitial = value; }
}
public IEventCorrelationConfigurator<TInstance, TData> CorrelateById(Func<ConsumeContext<TData>, Guid> selector)
{
_messageFilter = new CorrelationIdMessageFilter<TData>(selector);
_sagaFilterFactory = (repository, policy, sagaPipe) => new CorrelatedSagaFilter<TInstance, TData>(repository, policy, sagaPipe);
return this;
}
public IEventCorrelationConfigurator<TInstance, TData> CorrelateById<T>(Expression<Func<TInstance, T>> propertyExpression,
Func<ConsumeContext<TData>, T> selector) where T : struct
{
if (propertyExpression == null)
throw new ArgumentNullException(nameof(propertyExpression));
if (selector == null)
throw new ArgumentNullException(nameof(selector));
_sagaFilterFactory = (repository, policy, sagaPipe) =>
{
var queryFactory = new PropertyExpressionSagaQueryFactory<TInstance, TData, T>(propertyExpression, selector);
return new QuerySagaFilter<TInstance, TData>(repository, policy, queryFactory, sagaPipe);
};
return this;
}
public IEventCorrelationConfigurator<TInstance, TData> CorrelateBy<T>(Expression<Func<TInstance, T?>> propertyExpression,
Func<ConsumeContext<TData>, T?> selector)
where T : struct
{
if (propertyExpression == null)
throw new ArgumentNullException(nameof(propertyExpression));
if (selector == null)
throw new ArgumentNullException(nameof(selector));
_sagaFilterFactory = (repository, policy, sagaPipe) =>
{
var queryFactory = new PropertyExpressionSagaQueryFactory<TInstance, TData, T?>(propertyExpression, selector);
return new QuerySagaFilter<TInstance, TData>(repository, policy, queryFactory, sagaPipe);
};
return this;
}
public IEventCorrelationConfigurator<TInstance, TData> CorrelateBy<T>(Expression<Func<TInstance, T>> propertyExpression,
Func<ConsumeContext<TData>, T> selector)
where T : class
{
if (propertyExpression == null)
throw new ArgumentNullException(nameof(propertyExpression));
if (selector == null)
throw new ArgumentNullException(nameof(selector));
_sagaFilterFactory = (repository, policy, sagaPipe) =>
{
var queryFactory = new PropertyExpressionSagaQueryFactory<TInstance, TData, T>(propertyExpression, selector);
return new QuerySagaFilter<TInstance, TData>(repository, policy, queryFactory, sagaPipe);
};
return this;
}
public IEventCorrelationConfigurator<TInstance, TData> SelectId(Func<ConsumeContext<TData>, Guid> selector)
{
if (selector == null)
throw new ArgumentNullException(nameof(selector));
_messageFilter = new CorrelationIdMessageFilter<TData>(selector);
return this;
}
public IEventCorrelationConfigurator<TInstance, TData> CorrelateBy(Expression<Func<TInstance, ConsumeContext<TData>, bool>> correlationExpression)
{
if (correlationExpression == null)
throw new ArgumentNullException(nameof(correlationExpression));
_sagaFilterFactory = (repository, policy, sagaPipe) =>
{
var queryFactory = new ExpressionCorrelationSagaQueryFactory<TInstance, TData>(correlationExpression);
return new QuerySagaFilter<TInstance, TData>(repository, policy, queryFactory, sagaPipe);
};
return this;
}
public IEventCorrelationConfigurator<TInstance, TData> SetSagaFactory(SagaFactoryMethod<TInstance, TData> factoryMethod)
{
_sagaFactory = new FactoryMethodSagaFactory<TInstance, TData>(factoryMethod);
return this;
}
public IEventCorrelationConfigurator<TInstance, TData> OnMissingInstance(
Func<IMissingInstanceConfigurator<TData>, IPipe<ConsumeContext<TData>>> getMissingPipe)
{
if (getMissingPipe == null)
throw new ArgumentNullException(nameof(getMissingPipe));
var configurator = new EventMissingInstanceConfigurator<TInstance, TData>();
_missingPipe = getMissingPipe(configurator);
return this;
}
}
} | {
"content_hash": "03662596cabd53ff7a8f84c16a56564a",
"timestamp": "",
"source": "github",
"line_count": 176,
"max_line_length": 154,
"avg_line_length": 41.22159090909091,
"alnum_prop": 0.6352860096485182,
"repo_name": "SanSYS/MassTransit",
"id": "dc8f8a7717d5e27f3c27803d56c0b3a13f0a0216",
"size": "7257",
"binary": false,
"copies": "1",
"ref": "refs/heads/develop",
"path": "src/MassTransit.AutomatonymousIntegration/Configuration/CorrelationConfigurators/MassTransitEventCorrelationConfigurator.cs",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "2121"
},
{
"name": "C#",
"bytes": "3494751"
},
{
"name": "PowerShell",
"bytes": "1631"
},
{
"name": "Ruby",
"bytes": "43324"
}
],
"symlink_target": ""
} |
#ifndef VCF2MULTIALIGN_SEQUENCE_GENERATOR_BASE_HH
#define VCF2MULTIALIGN_SEQUENCE_GENERATOR_BASE_HH
#include <list>
#include <vcf2multialign/variant_graph/variant_graph.hh>
#include <vcf2multialign/utility/dispatch_cli_runner.hh>
#include <vcf2multialign/vcf_processor.hh>
#include "sequence_output_handler.hh"
namespace vcf2multialign {
struct stream_position
{
std::size_t node{};
std::size_t stream_number{};
bool operator<(stream_position const &other) const { return node < other.node; }
};
class alt_edge_handler_base;
class sequence_generator_base : public dispatch_cli_runner,
public reference_controller
{
public:
typedef vcf2multialign::output_stream_type output_stream_type;
typedef std::vector <output_stream_type> output_stream_vector;
typedef std::list <stream_position> stream_position_list;
protected:
std::unique_ptr <sequence_output_handler> m_output_handler{};
variant_graphs::variant_graph m_graph;
bool m_output_reference{};
bool m_may_overwrite{};
public:
sequence_generator_base(
char const *subprocess_executable_path,
bool const output_reference,
bool const may_overwrite
):
m_output_handler(
subprocess_executable_path
? static_cast <sequence_output_handler *>(new subprocess_sequence_output_handler(subprocess_executable_path))
: static_cast <sequence_output_handler *>(new file_sequence_output_handler)
),
m_output_reference(output_reference),
m_may_overwrite(may_overwrite)
{
}
virtual ~sequence_generator_base() {}
void read_variant_graph(char const *variant_graph_path);
virtual void prepare_variant_graph() {}
variant_graphs::variant_graph const &variant_graph() const { return m_graph; }
virtual std::string output_path(std::size_t const file_idx) const = 0;
};
class direct_matching_sequence_generator : public sequence_generator_base
{
public:
typedef sequence_generator_base::output_stream_vector output_stream_vector;
typedef sequence_generator_base::stream_position_list stream_position_list;
protected:
std::size_t m_chunk_size{};
public:
direct_matching_sequence_generator(
char const *subprocess_executable_path,
std::size_t const chunk_size,
bool const output_reference,
bool const may_overwrite
):
sequence_generator_base(subprocess_executable_path, output_reference, may_overwrite),
m_chunk_size(chunk_size)
{
}
protected:
void do_work() override;
virtual std::size_t get_stream_count() const = 0;
virtual std::unique_ptr <alt_edge_handler_base> make_alt_edge_handler(
std::string_view const &reference_sv,
variant_graphs::variant_graph const &graph,
output_stream_vector &output_files
) const = 0;
void output_chunk(std::string_view const &reference_sv, output_stream_vector &output_files);
};
// Used a helper class b.c. I did not want to replace O(mn) inlineable matrix accesses with virtual function calls.
// Not sure if it was worth the trouble, though.
class alt_edge_handler_base
{
public:
typedef sequence_generator_base::output_stream_vector output_stream_vector;
typedef sequence_generator_base::stream_position_list stream_position_list;
protected:
std::string_view const *m_reference_sv{};
variant_graphs::variant_graph const *m_graph{};
output_stream_vector *m_output_files{};
variant_graphs::variant_graph::sample_path_vector const *m_sample_paths{};
variant_graphs::variant_graph::path_edge_matrix const *m_edges_by_path_and_variant{};
std::size_t m_lhs{};
std::size_t m_rhs{};
std::size_t m_alt_lhs{};
std::size_t m_ref_lhs{};
std::size_t m_ref_rhs{};
std::size_t m_aln_lhs{};
std::size_t m_aln_rhs{};
public:
alt_edge_handler_base() = default;
alt_edge_handler_base(
std::string_view const &reference_sv,
variant_graphs::variant_graph const &graph,
output_stream_vector &output_files
):
m_reference_sv(&reference_sv),
m_graph(&graph),
m_output_files(&output_files)
{
}
virtual ~alt_edge_handler_base() {}
inline void set_subgraph_samples_and_edges(
variant_graphs::variant_graph::sample_path_vector const &sample_paths,
variant_graphs::variant_graph::path_edge_matrix const &edges_by_path_and_variant
);
inline void set_position(
std::size_t const lhs,
std::size_t const rhs,
std::size_t const alt_lhs,
std::size_t const ref_lhs,
std::size_t const ref_rhs,
std::size_t const aln_lhs,
std::size_t const aln_rhs
);
virtual void handle_node_with_alt_edges(stream_position_list &files_waiting, std::size_t const subgraph_variant_idx) const = 0;
protected:
void handle_edge(stream_position &sp, std::size_t const edge_number) const;
};
void alt_edge_handler_base::set_subgraph_samples_and_edges(
variant_graphs::variant_graph::sample_path_vector const &sample_paths,
variant_graphs::variant_graph::path_edge_matrix const &edges_by_path_and_variant
)
{
m_sample_paths = &sample_paths;
m_edges_by_path_and_variant = &edges_by_path_and_variant;
}
void alt_edge_handler_base::set_position(
std::size_t const lhs,
std::size_t const rhs,
std::size_t const alt_lhs,
std::size_t const ref_lhs,
std::size_t const ref_rhs,
std::size_t const aln_lhs,
std::size_t const aln_rhs
)
{
m_lhs = lhs;
m_rhs = rhs;
m_alt_lhs = alt_lhs;
m_ref_lhs = ref_lhs;
m_ref_rhs = ref_rhs;
m_aln_lhs = aln_lhs;
m_aln_rhs = aln_rhs;
}
}
#endif
| {
"content_hash": "061a0b6c117f363eed9002502b7462da",
"timestamp": "",
"source": "github",
"line_count": 191,
"max_line_length": 129,
"avg_line_length": 29.209424083769633,
"alnum_prop": 0.6909840473203083,
"repo_name": "tsnorri/vcf2multialign",
"id": "389f3a5bf3bbf2e89539efd067d4cead3551d282",
"size": "5697",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "variant-graph-to-sequences/sequence_generator_base.hh",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "375"
},
{
"name": "C++",
"bytes": "402874"
},
{
"name": "CMake",
"bytes": "262"
},
{
"name": "Makefile",
"bytes": "14775"
},
{
"name": "Python",
"bytes": "3316"
},
{
"name": "Ragel",
"bytes": "10698"
},
{
"name": "Shell",
"bytes": "2473"
}
],
"symlink_target": ""
} |
@implementation WGClassifyHotGoodItem
@end
| {
"content_hash": "66b80356866b4fdf03f743dd796299ea",
"timestamp": "",
"source": "github",
"line_count": 3,
"max_line_length": 37,
"avg_line_length": 14.666666666666666,
"alnum_prop": 0.8636363636363636,
"repo_name": "mumabinggan/WeygoIPhone",
"id": "01bfb8f6df77166a2e7c7514c80e8f8c4f50a2b3",
"size": "224",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "WeygoIPhone/Tabs/Classify/Model/WGClassifyHotGoodItem.m",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Objective-C",
"bytes": "1749875"
},
{
"name": "Shell",
"bytes": "2569"
}
],
"symlink_target": ""
} |
ACCEPTED
#### According to
International Plant Names Index
#### Published in
null
#### Original name
null
### Remarks
null | {
"content_hash": "d50c13c1950ba2f7619a05ddd30ea193",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 31,
"avg_line_length": 9.692307692307692,
"alnum_prop": 0.7063492063492064,
"repo_name": "mdoering/backbone",
"id": "6addc07c843aef312e61e5922804c0ecf5556d27",
"size": "189",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "life/Plantae/Magnoliophyta/Magnoliopsida/Myrtales/Vochysiaceae/Vochysia/Vochysia steyermarkiana/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
/*
Function name: commas(num);
Inputs: A number, n.
Returns: A string representing the input, with commas inserted into the
correct position.
Prints: Nothing
For example,
commas(123); == "123"
commas(1234); == "1,234"
commas(12345); == "12,345"
commas(1234567); == "1,234,567"
** Note #1 **
If it's too much, don't worry about handling negative numbers at first.
** Note #2 **
As always, focus first on how you would do this *as a human*. Imagine you
has a piece of paper with a comma-less number on it. How would you decide to
insert the commas? Which comma would you insert first?
*/
function commas(num) {
var numString = '';
numString += num;
return numString;
}
console.log(commas(123) == "123");
console.log(commas(1234) == "1,234");
console.log(commas(12345) == "12,345");
console.log(commas(1234567) == "1,234,567");
/*
I need to bulid a new string, once character at a time. If the index of the
character I'm at is equal to three, I need to add a comma.
Here's one way...
var numString = "";
var newString = "";
var char;
for (var i = 0; i < numString.length; i++) {
char = numString.charAt(i);
newString = newString + char;
if (i % 3 != 0 && (i < numString.length -1)) {
newString = newString + ',';
}
}
return newString;
/*
Write some of your own "sanity checks" here. Each check should look like:
console.log(comma(); == ...expected return value...);
A good sanity check is like a canary in a coal mine: when it fails we know
something is very wrong in our code. This means sanity checks should
reflect;
1. The common cases
2. The edge cases
3. Likely mistakes you'll make in your code (e.g., using <= instead of <)
What these cases mean concretely depends on what your function does.
** Hint #1 **
Use .toString(); to convert a number to a string. That is,
(5).toString();
=> "5"
(100).toString();
=> "100"
Remember: these are rumble strips, not a driving instructor.
If any are "false" then something is broken. But just because they all return
"true" doesn't mean you've nailed it. =]
*/
| {
"content_hash": "3c437244abaa3fe8f32a7026c55608f3",
"timestamp": "",
"source": "github",
"line_count": 87,
"max_line_length": 80,
"avg_line_length": 25.45977011494253,
"alnum_prop": 0.6293453724604966,
"repo_name": "TravisIngram/javascript_code_katas",
"id": "7796f8bd417b73d7e00f7785a79be47e2670df89",
"size": "2215",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "solutions/commas.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "JavaScript",
"bytes": "137587"
},
{
"name": "Ruby",
"bytes": "3009"
}
],
"symlink_target": ""
} |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_13) on Fri Aug 14 15:51:19 CDT 2009 -->
<TITLE>
Uses of Class gnu.trove.Decorators (GNU Trove for Java API v2.1.0)
</TITLE>
<META NAME="date" CONTENT="2009-08-14">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Class gnu.trove.Decorators (GNU Trove for Java API v2.1.0)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../gnu/trove/Decorators.html" title="class in gnu.trove"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<a href="http://trove4j.sourceforge.net/">GNU Trove</a></EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV
NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?gnu/trove//class-useDecorators.html" target="_top"><B>FRAMES</B></A>
<A HREF="Decorators.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<CENTER>
<H2>
<B>Uses of Class<br>gnu.trove.Decorators</B></H2>
</CENTER>
No usage of gnu.trove.Decorators
<P>
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../gnu/trove/Decorators.html" title="class in gnu.trove"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<a href="http://trove4j.sourceforge.net/">GNU Trove</a></EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV
NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?gnu/trove//class-useDecorators.html" target="_top"><B>FRAMES</B></A>
<A HREF="Decorators.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
GNU Trove is copyright © 2001-2009 Eric D. Friedman. All Rights Reserved.
</BODY>
</HTML>
| {
"content_hash": "d9fd48e4f1f2ee1734f3a4aeecadeb74",
"timestamp": "",
"source": "github",
"line_count": 144,
"max_line_length": 180,
"avg_line_length": 40.99305555555556,
"alnum_prop": 0.620701338302558,
"repo_name": "jgaltidor/VarJ",
"id": "9832a1ee70ffcd85faa82574189156dfff08b5c0",
"size": "5903",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "analyzed_libs/trove-2.1.0/javadocs/gnu/trove/class-use/Decorators.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "2125"
},
{
"name": "CSS",
"bytes": "9913"
},
{
"name": "Emacs Lisp",
"bytes": "12570"
},
{
"name": "Java",
"bytes": "31711742"
},
{
"name": "JavaScript",
"bytes": "3251"
},
{
"name": "Makefile",
"bytes": "257"
},
{
"name": "Perl",
"bytes": "5179"
},
{
"name": "Prolog",
"bytes": "292"
},
{
"name": "Python",
"bytes": "1080"
},
{
"name": "Scala",
"bytes": "42424"
},
{
"name": "Shell",
"bytes": "43707"
},
{
"name": "TeX",
"bytes": "372287"
}
],
"symlink_target": ""
} |
Extension blocks as found in ShellBags and other places in the Registry
| {
"content_hash": "67a86cef3e04078b5af2168e29206131",
"timestamp": "",
"source": "github",
"line_count": 2,
"max_line_length": 71,
"avg_line_length": 36.5,
"alnum_prop": 0.821917808219178,
"repo_name": "EricZimmerman/ExtensionBlocks",
"id": "88124cf866c42e8e979708f52490b404bc9b2265",
"size": "91",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "README.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "212915"
}
],
"symlink_target": ""
} |
namespace EncompassRest.Contacts
{
/// <summary>
/// ContactType
/// </summary>
public enum ContactType
{
/// <summary>
/// Borrower
/// </summary>
Borrower = 0,
/// <summary>
/// Business
/// </summary>
Business = 1
}
} | {
"content_hash": "e955cd5e939430a38edb2a3901e60767",
"timestamp": "",
"source": "github",
"line_count": 17,
"max_line_length": 33,
"avg_line_length": 18.176470588235293,
"alnum_prop": 0.44660194174757284,
"repo_name": "hfcjweinstock/EncompassREST",
"id": "ab88ea15e2b6cac8c872ffea2cd829d25cd93e69",
"size": "311",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "src/EncompassRest/Contacts/ContactType.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "704925"
}
],
"symlink_target": ""
} |
{-# LANGUAGE CPP #-}
module GHCJS.DOM.MediaKeyMessageEvent (
#if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT)
module GHCJS.DOM.JSFFI.Generated.MediaKeyMessageEvent
#else
#endif
) where
#if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT)
import GHCJS.DOM.JSFFI.Generated.MediaKeyMessageEvent
#else
#endif
| {
"content_hash": "58a31b4d8a65ecd153b77869979692eb",
"timestamp": "",
"source": "github",
"line_count": 11,
"max_line_length": 82,
"avg_line_length": 33.90909090909091,
"alnum_prop": 0.7560321715817694,
"repo_name": "plow-technologies/ghcjs-dom",
"id": "f7c97339f32d80177d039c7a583a5a6f76f3564d",
"size": "373",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/GHCJS/DOM/MediaKeyMessageEvent.hs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "90"
},
{
"name": "Haskell",
"bytes": "4129439"
},
{
"name": "JavaScript",
"bytes": "603"
}
],
"symlink_target": ""
} |
package org.jetbrains.plugins.scala.editor.typedHandler
import com.intellij.application.options.CodeStyle
import com.intellij.openapi.editor.Editor
import com.intellij.openapi.project.Project
import com.intellij.openapi.util.TextRange
import com.intellij.psi.codeStyle.CodeStyleManager
import com.intellij.psi.util.PsiTreeUtil
import com.intellij.psi.{PsiElement, PsiFile, PsiWhiteSpace}
import org.jetbrains.plugins.scala.ScalaFileType
import org.jetbrains.plugins.scala.editor.AutoBraceUtils.{canBeContinuedWith, continuesConstructAfterIndentationContext, couldBeContinuationAfterIndentationContext, indentationContextContinuation, isBeforeIndentationContext, nextExpressionInIndentationContext, previousExpressionInIndentationContext}
import org.jetbrains.plugins.scala.editor.{AutoBraceAdvertiser, DocumentExt}
import org.jetbrains.plugins.scala.extensions._
import org.jetbrains.plugins.scala.lang.lexer.{ScalaTokenType, ScalaTokenTypes}
import org.jetbrains.plugins.scala.lang.psi.api.expr.{ScBlock, ScPostfixExpr}
import org.jetbrains.plugins.scala.lang.psi.impl.ScalaPsiElementFactory
import org.jetbrains.plugins.scala.settings.ScalaApplicationSettings
import org.jetbrains.plugins.scala.util.IndentUtil.calcIndent
import java.{util => ju}
import scala.annotation.tailrec
object AutoBraceInsertionTools {
def autoBraceInsertionActivated: Boolean =
ScalaApplicationSettings.getInstance.HANDLE_BLOCK_BRACES_INSERTION_AUTOMATICALLY
def shouldHandleAutoBracesBeforeTyped(typedChar: Char): Boolean = {
autoBraceInsertionActivated &&
!typedChar.isWhitespace &&
typedChar != '{' && typedChar != '}'
}
private val continuesPreviousLine = Set('.')
def findAutoBraceInsertionOpportunity(c: Option[Char], caretOffset: Int, element: PsiElement)
(implicit project: Project, file: PsiFile, editor: Editor): Option[AutoBraceInsertionInfo] = {
if (file.useIndentationBasedSyntax)
return None
val (wsBeforeCaret, caretWS, curLineIndent, isAfterPossibleContinuation) = element match {
case caretWS: PsiWhiteSpace =>
if (caretOffset == caretWS.startOffset) {
// There is a possible continuation before the caret (like els(e)/catc(h)/fina(lly)
// We now have to take the whitespace before and after this token into account
// if (cond)
// expr
// els<caret>
// ^ ^caretWS
// ^beforeContWS
def isPossibleContinuationButWillNotBeContinuation(tok: PsiElement, addedChar: Char): Boolean = {
val tokText = tok.getText
couldBeContinuationAfterIndentationContext(tokText) &&
!couldBeContinuationAfterIndentationContext(tokText + addedChar)
}
val tok = (PsiTreeUtil.prevVisibleLeaf(caretWS), c) match {
case (tok: PsiElement, Some(c)) if isPossibleContinuationButWillNotBeContinuation(tok, c) => tok
case (tok: PsiElement, None) if !couldBeContinuationAfterIndentationContext(tok.getText) => tok
case _ => return None
}
val beforeContWS = PsiTreeUtil.prevLeaf(tok) match {
case beforeContWS: PsiWhiteSpace => beforeContWS
case _ => return None
}
val beforeContWSText = beforeContWS.getText
val newlinePosBeforeCaret = beforeContWSText.lastIndexOf('\n')
if (newlinePosBeforeCaret < 0) {
// there is something else before the possible continuation, so do nothing
return None
}
val beforeContIndent = beforeContWSText.substring(newlinePosBeforeCaret)
(beforeContWS, caretWS, beforeContIndent, true)
} else {
if (c.exists(continuesPreviousLine)) {
return None
}
// There is no possible continuation before the caret, so check if it looks like this
// def test =
// expr
// <caret>
val caretWSText = caretWS.getText
val posInWs = caretOffset - element.getTextOffset
val newlinePosBeforeCaret = caretWSText.lastIndexOf('\n', posInWs - 1)
if (newlinePosBeforeCaret < 0) {
// there is something before the caret, so do nothing
return None
}
// check if the new char is behind a postfix expression
// in that case the postfix expr will be continued into an infix expression
// but only check if there is now new line between the operator and the rhs operand
val emptyNewlineBeforeCaret = caretWSText.lastIndexOf('\n', newlinePosBeforeCaret - 1) >= 0
if (!emptyNewlineBeforeCaret && isBehindPostfixExpr(element)) {
return None
}
val caretIndent = caretWSText.substring(newlinePosBeforeCaret, posInWs)
(caretWS, caretWS, caretIndent, false)
}
case _ => return None
}
// ========= Get block that should be wrapped ==========
// caret could be before or after the expression that should be wrapped
val (expr, exprWS, caretIsBeforeExpr) = nextExpressionInIndentationContext(caretWS) match {
case Some(expr) => (expr, caretWS, true)
case None =>
(previousExpressionInIndentationContext(wsBeforeCaret), c) match {
case (Some(_: ScBlock), _) =>
// do not insert braces if there is already a block like in
//
// def test =
// {
// }
// <caret>
return None
case (Some(expr), Some(c)) if canBeContinuedWith(expr, c) =>
// if we start typing something that could be a continuation of the previous construct, do not insert braces
// for example:
//
// def test =
// if (cond) expr
// <caret> <- when you type 'e', it could be the continuation of the previous if
return None
case (Some(expr), Some(c)) if indentationContextContinuation(expr).exists(_.toString.head == c) =>
// if we start typing something that could be a continuation of a parent construct, do not insert braces
// for example:
// if (cond)
// expr
// <caret> <- when you type 'e', it could be start of 'else' which would then be inside the block. so do nothing for now
return None
case (Some(expr), _) =>
val exprWs = expr.prevElement match {
case Some(ws: PsiWhiteSpace) => ws
case _ => return None
}
(expr, exprWs, false)
case _ =>
return None
}
}
val exprWSText = exprWS.getText
// ========= Check correct indentation ==========
val newlinePosBeforeExpr = exprWSText.lastIndexOf('\n')
if (newlinePosBeforeExpr < 0) {
return None
}
val exprIndent = exprWSText.substring(newlinePosBeforeExpr)
if (exprIndent != curLineIndent) {
return None
}
// TODO: temp disabled auto-braces feature for Scala3, cause Scala3 doesn't require braces
// We need to rethink it. Maybe create some settings:
// - minimum lines in indentation block before inserting braces OR end marker
// - mode to use: 1. prefer braces 2. prefer indentation syntax
// (also see org.jetbrains.plugins.scala.editor.typedHandler.AutoBraceInsertionTools.findAutoBraceInsertionOpportunity)
if (file.useIndentationBasedSyntax)
return None
// ========= Calculate brace positions =========
// Start with the opening brace, and then the closing brace.
val document = editor.getDocument
// ========= Opening brace =========
val openingBraceOffset =
exprWS
.prevSiblingNotWhitespaceComment
.fold(exprWS.startOffset)(_.endOffset)
// ========= Closing brace =========
// After the caret there could many whitespaces and then something that
// proceeds to complete the parent of expr for example in
// if (cond)
// expr
// <caret>
//
// else
// elseExpr
//
// In this case the braces should be added before the else and not directly after the caret
val lastElement = if (caretIsBeforeExpr) expr else caretWS
val (closingBraceOffset, isBeforeContinuation) =
findClosingBraceOffsetBeforeContinuation(lastElement).map((_, true))
.getOrElse(
if (caretIsBeforeExpr) expr.endOffset -> false
else caretOffset -> false
)
Some(AutoBraceInsertionInfo(
openBraceOffset = openingBraceOffset,
inputOffset = caretOffset,
closingBraceOffset = closingBraceOffset,
needsFakeInput = !isAfterPossibleContinuation,
isBeforeContinuation = isBeforeContinuation
))
}
def findClosingBraceOffsetBeforeContinuation(lastElementBeforePossibleContinuation: PsiElement): Option[Int] =
lastElementBeforePossibleContinuation.getNextNonWhitespaceAndNonEmptyLeaf match {
case tok: PsiElement if continuesConstructAfterIndentationContext(tok) => Some(tok.startOffset)
case _ => None
}
@tailrec
def isPrecededByLineStart(element: PsiElement): Boolean = PsiTreeUtil.prevLeaf(element) match {
case ws: PsiWhiteSpace => ws.textContains('\n') || isPrecededByLineStart(ws)
case null => true
case prev if prev.getTextLength == 0 => isPrecededByLineStart(prev)
case _ => false
}
private val startsStatement = {
import ScalaTokenType._
import ScalaTokenTypes._
Set(
// modifier
kABSTRACT,
kCASE,
kIMPLICIT,
kFINAL,
kLAZY,
kOVERRIDE,
kSEALED,
// InlineKeyword, // can be used with if and match in scala 3
TransparentKeyword,
OpaqueKeyword,
kVAL,
kVAR,
kDEF,
GivenKeyword,
kTYPE,
ClassKeyword,
TraitKeyword,
ObjectKeyword,
EnumKeyword,
ExtensionKeyword,
)
}
private val startsStatementTexts = startsStatement.map(_.toString)
private def startsStatementBeforeCaret(element: PsiElement, caret: Int): Boolean = {
val caretInElement = caret - element.startOffset
caretInElement > 0 && startsStatementTexts(element.getText.substring(0, caretInElement))
}
/**
* This finds the last token of an expression that was in indentation position,
* when the user already entered a statement start in front of it.
*
* For example:
*
* {{{
* def test =
* val<caret>-lhs operation
* rhs
* }}}
*
* Because this completely destroys the parsing of the code,
* this methods constructs a file without the statement-start part and looks
* for the last token of the remaining token
*/
private def findLastTokenOfExpressionAfterStatementStart(element: PsiElement, file: PsiFile, statementStart: Int, caretOffset: Int): Option[PsiElement] =
for {
// find an element that certainly encloses everything
enclosement <- element.parents.filter(_.startOffset <= statementStart).findByType[PsiFile, ScBlock]
enclosementStart = enclosement.startOffset
statementStartInEnclosement = statementStart - enclosementStart
caretInEnclosement = caretOffset - enclosementStart
// build a file without the statement start part
enclosementText = enclosement.getText
enclosementTextWithoutStatement =
enclosementText.substring(0, statementStartInEnclosement) +
enclosementText.substring(caretInEnclosement)
probeFile =
ScalaPsiElementFactory.createScalaFileFromText(
enclosementTextWithoutStatement, element, shouldTrimText = false
)(element.getProject)
// find the expression that comes after the statement start (which is parsed corretly now in the dummy file)
probeExprBeginOrWs = probeFile.findElementAt(statementStartInEnclosement)
probeExprBegin = if (probeExprBeginOrWs.isWhitespace) probeExprBeginOrWs.nextVisibleLeaf.get else probeExprBeginOrWs
probeExpr <- probeExprBegin.withParents.takeWhile(_.startOffset == statementStartInEnclosement).lastOption
// translate the expression's position back into the real file and get the last token of the expression
lastTokenOfExpr <- file.findElementAt(probeExpr.endOffset + enclosementStart - 1).toOption
} yield lastTokenOfExpr
/**
* Finds autobrace info for when the user types a statement where an expression is expected
* For example
*
* {{{
* def test =
* val<caret> // now pressing space should insert braces, because it cannot be an expression
* }}}
*
* Also works in case there already was an expression
*
* {{{
* def test =
* val<caret> 5 + calc() // now pressing space should insert braces, because it cannot be an expression anymore
* }}}
*/
def findAutoBraceInsertionOpportunityWhenStartingStatement(c: Char, caretOffset: Int, element: PsiElement)
(implicit project: Project, file: PsiFile, editor: Editor): Option[AutoBraceInsertionInfo] = {
assert(c.isWhitespace)
if (!autoBraceInsertionActivated) {
return None
}
// TODO: temporary disabled auto-braces feature for Scala3, cause Scala3 doesn't require braces
// (also see org.jetbrains.plugins.scala.editor.typedHandler.AutoBraceInsertionTools.findAutoBraceInsertionOpportunity)
if (file.useIndentationBasedSyntax)
return None
// check if the element or its prefix before the caret certainly starts a statement
val (tokenBeginningWithStatement, tokenEndingFutureStatementF) = (element, element.prevVisibleLeaf) match {
case (ws: PsiWhiteSpace, Some(kw)) if startsStatement(kw.elementType) =>
// this is for when the statement-start is followed directly by a whitespace
val tokenEndingFutureStatementF =
if (ws.textContains('\n')) () => Some(kw)
else () => findLastTokenOfExpressionAfterStatementStart(element, file, kw.startOffset, caretOffset)
(kw, tokenEndingFutureStatementF)
case (_, Some(kw)) if startsStatement(kw.elementType) =>
// this is for when the statement-start is followed by something that does not continue an identifier, like
// def test =
// val<caret>-5 + 5
(kw, () => findLastTokenOfExpressionAfterStatementStart(element, file, kw.startOffset, caretOffset))
case _ if startsStatementBeforeCaret(element, caretOffset) =>
// this is for when the statement-start is immediately followed by something that continues an identifier, like
// def test =
// val<caret>5 + 5
(element, () => findLastTokenOfExpressionAfterStatementStart(element, file, element.startOffset, caretOffset))
case _ => return None
}
// find out if this new statement is where an expression should be
val elementWhereExprShouldBe = tokenBeginningWithStatement.prevVisibleLeaf(skipComments = true) match {
case Some(last) if isBeforeIndentationContext(last) || nextExpressionInIndentationContext(last).isDefined => last
case _ => return None
}
val elementWithIndentationContext = elementWhereExprShouldBe.getParent
val newlineBeforeKeyword = isPrecededByLineStart(tokenBeginningWithStatement)
val newlineBeforeElementWithIndentationContext = isPrecededByLineStart(elementWithIndentationContext)
val tabSize = CodeStyle.getSettings(project).getTabSize(ScalaFileType.INSTANCE)
//check indentation
if (newlineBeforeKeyword && newlineBeforeElementWithIndentationContext && calcIndent(tokenBeginningWithStatement, tabSize) > calcIndent(elementWithIndentationContext, tabSize)) {
val document = editor.getDocument
for {
// this operation might be quite expensive, so do it as late as possible
lastToken <- tokenEndingFutureStatementF()
// find correct positions for braces when the current construct is
// has a continuation
closingBraceOffsetBeforeContinuation = findClosingBraceOffsetBeforeContinuation(lastToken)
} yield
AutoBraceInsertionInfo(
openBraceOffset = elementWhereExprShouldBe.endOffset,
inputOffset = caretOffset,
closingBraceOffset = closingBraceOffsetBeforeContinuation.getOrElse(document.lineEndOffset(lastToken.endOffset)),
needsFakeInput = false,
isBeforeContinuation = closingBraceOffsetBeforeContinuation.isDefined
)
} else None
}
def insertAutoBraces(info: AutoBraceInsertionInfo)(implicit project: Project, file: PsiFile, editor: Editor): Unit = {
AutoBraceAdvertiser.disableNotification()
// ========= Insert braces =========
// Start with the opening brace, then the fake input, and finally the closing brace.
// Also remember brace ranges for later reformatting
val document = editor.getDocument
// ========= Opening brace =========
val openingBraceOffset = info.openBraceOffset
document.insertString(openingBraceOffset, "{")
val openingBraceRange = TextRange.from(openingBraceOffset, 1)
val displacementAfterOpeningBrace = 1
val caretOffset = info.inputOffset
val displacementAfterFakeInput =
if (info.needsFakeInput) {
// We have to add a char at the position of the caret, otherwise formatting will screw up our indentation.
// Unfortunately we have to delete it after formatting, so IDEA can do the char insertion correctly itself.
// Also note that we cannot use c (parameter of this method) to insert it here, because some characters like '('
// might confuse the formatter.
val fakeInputPosition = caretOffset + displacementAfterOpeningBrace
document.insertString(fakeInputPosition, "x")
displacementAfterOpeningBrace + 1
} else displacementAfterOpeningBrace
val braceInsertPosition = info.closingBraceOffset + displacementAfterFakeInput
val closingBraceRange =
if (info.isBeforeContinuation) {
document.insertString(braceInsertPosition, "} ")
TextRange.from(braceInsertPosition, 3)
} else {
// There is no continuation, so just insert the braces after the caret or the expression
document.insertString(braceInsertPosition, "\n}")
TextRange.from(braceInsertPosition, 3)
}
document.commit(project)
// Set the caret now, so the formatting can adjust it correctly
val caretOffsetBeforeFormatting = caretOffset + displacementAfterOpeningBrace
editor.getCaretModel.moveToOffset(caretOffsetBeforeFormatting)
CodeStyleManager.getInstance(project)
.reformatText(file, ju.Arrays.asList(openingBraceRange, closingBraceRange))
if (info.needsFakeInput) {
// Delete the fake character 'x' we inserted
val newCaretPos = editor.getCaretModel.getOffset
document.deleteString(newCaretPos, newCaretPos + 1)
document.commit(project)
}
}
def isBehindPostfixExpr(element: PsiElement): Boolean = {
val start = element.startOffset
PsiTreeUtil.prevVisibleLeaf(element).nullSafe
.exists(prev =>
prev
.withParentsInFile
.takeWhile(_.endOffset <= start)
.exists(_.is[ScPostfixExpr])
)
}
/*
todo: use for caret being at the end of the file
def isBehindPostfixExpr(element: Option[PsiElement], file: PsiFile): Boolean = {
val prevElement = element.map(PsiTreeUtil.prevVisibleLeaf).orElse(file.lastChild)
prevElement
.exists { prev =>
val start = element.fold(file.endOffset)(_.startOffset)
prev
.withParentsInFile
.takeWhile(_.endOffset <= start)
.exists(_.is[ScPostfixExpr])
}
}
*/
/**
* @param openBraceOffset the position where the opening braces should be put
* @param inputOffset the position where fake input should be put if needsFakeInput is true
* @param closingBraceOffset the position where the closing brace should be put
* @param needsFakeInput if fake input is needed to get indentation correct for empty lines
* @param isBeforeContinuation if the closing will be added before some continuation like else, catch, finally
*/
case class AutoBraceInsertionInfo(openBraceOffset: Int,
inputOffset: Int,
closingBraceOffset: Int,
needsFakeInput: Boolean,
isBeforeContinuation: Boolean)
}
| {
"content_hash": "849deabf9019cff6730c5afbb379c4a7",
"timestamp": "",
"source": "github",
"line_count": 473,
"max_line_length": 300,
"avg_line_length": 43.61945031712474,
"alnum_prop": 0.6801085692128732,
"repo_name": "JetBrains/intellij-scala",
"id": "e57e935c72cf5bb4422fca578e4eddb6375a26bc",
"size": "20632",
"binary": false,
"copies": "1",
"ref": "refs/heads/idea223.x",
"path": "scala/scala-impl/src/org/jetbrains/plugins/scala/editor/typedHandler/AutoBraceInsertionTools.scala",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "HTML",
"bytes": "106688"
},
{
"name": "Java",
"bytes": "1165562"
},
{
"name": "Lex",
"bytes": "45405"
},
{
"name": "Scala",
"bytes": "18656869"
}
],
"symlink_target": ""
} |
<?php
namespace app\lib\commands;
use app\lib\BaseCommand;
use yii\console\Exception;
use yii\helpers\Console;
use Yii;
use yii\helpers\FileHelper;
class CopyDirCommand extends BaseCommand
{
/**
* @inheritdoc
*/
public function run(& $cmdParams, & $params)
{
$res = true;
$taskRunner = $this->taskRunner;
$toBeCopied = [];
$srcDirList = (!empty($cmdParams[0]) ? $cmdParams[0] : []);
$destDir = (!empty($cmdParams[1]) ? $taskRunner->parsePath($cmdParams[1]) : '');
$srcBaseDir = (!empty($cmdParams[2]) ? $taskRunner->parsePath($cmdParams[2]) : '');
$options = (!empty($cmdParams[3]) ? $cmdParams[3] : []);
if (empty($srcDirList) || empty($destDir)) {
throw new Exception('copyDir: Base and destination cannot be empty');
}
if ((!empty($srcBaseDir) && !is_dir($srcBaseDir)) || (file_exists($destDir) && !is_dir($destDir))) {
throw new Exception('copyDir: Base and destination have to be directories');
}
// if srcDirList is specified but it is a string, we convert it to an array
if (!empty($srcDirList) && is_string($srcDirList)) {
$srcDirList = explode(',', $srcDirList);
}
foreach ($srcDirList as $dirPath) {
$parsedPath = $taskRunner->parseStringAliases(trim($dirPath));
if (!empty($srcBaseDir)) {
$toBeCopied[$parsedPath] = $srcBaseDir.DIRECTORY_SEPARATOR.$parsedPath;
} else {
$toBeCopied[] = $parsedPath;
}
}
foreach ($toBeCopied as $srcRelPath => $srcDirPath) {
if (is_dir($srcDirPath)) {
/* *
* if the destination directory already exists or if we are
* copying more than one directory, we copy the source directory inside
* of the destination directory instead of replacing the destination
* directory with it
* */
$destDirPath = $destDir;
if (is_dir($destDirPath) || count($toBeCopied) > 1) {
$srcRelPath = (!empty($srcBaseDir) ? $srcRelPath : basename($srcDirPath));
$destDirPath = $destDir.DIRECTORY_SEPARATOR.$srcRelPath;
}
$this->controller->stdout("Copy directory: \n ".$srcDirPath." to \n ".$destDirPath);
if (!$this->controller->dryRun) {
FileHelper::copyDirectory($srcDirPath, $destDirPath, $options);
} else {
$this->controller->stdout(' [dry run]', Console::FG_YELLOW);
}
$this->controller->stdout("\n");
} else {
$this->controller->stderr("{$srcDirPath} is not a directory!\n", Console::FG_RED);
}
}
return $res;
}
} | {
"content_hash": "72b05bafe2f858f407ae4d147362b4f6",
"timestamp": "",
"source": "github",
"line_count": 88,
"max_line_length": 108,
"avg_line_length": 33.13636363636363,
"alnum_prop": 0.5346364883401921,
"repo_name": "giovdk21/deployii",
"id": "bfb4d7c2c9a785921036ea4ef2f2ba7ec5366f51",
"size": "3125",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "lib/commands/CopyDirCommand.php",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "PHP",
"bytes": "184286"
},
{
"name": "Shell",
"bytes": "2077"
}
],
"symlink_target": ""
} |
module Fog
module Compute
class Vsphere
class Real
def datacenters
@datacenters ||= datacenters_reload
# Hide the values which are the RbVmomi instances
@datacenters.keys
end
private
def datacenters_reload
@rootfolder ||= @connection.rootFolder
inventory = @rootfolder.inventory(:Datacenter => [ 'name' ])[@rootfolder]
# Convert the inventory into a Hash of the form: We remove the
# property selectors. { "<dc_name>" => #<RbVmomi::VIM::Datacenter> }
# The Datacenter instance itself is at index 0 and the properties we
# collected are at index 1.
inventory.inject({}) do |memo, (name,dc_ary)|
memo[name] = dc_ary[0]
memo
end
end
end
class Mock
def datacenters
[ "Solutions", "Solutions2", "Solutions3" ]
end
end
end
end
end
| {
"content_hash": "4c5bfc058393d5a0e3d2f91188858b51",
"timestamp": "",
"source": "github",
"line_count": 34,
"max_line_length": 83,
"avg_line_length": 28.41176470588235,
"alnum_prop": 0.5610766045548654,
"repo_name": "krobertson/knife-xenserver",
"id": "6b76614d5681a8d9e917194722cae89592bc3440",
"size": "966",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "vendor/fog/lib/fog/vsphere/requests/compute/datacenters.rb",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Ruby",
"bytes": "32400"
}
],
"symlink_target": ""
} |
/**
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.cdlflex.ui.resource;
/**
* Resource reference for the main bootstrap theme css.
*/
public class BootstrapThemeResourceReference extends ManagedCssResourceReference {
private static final long serialVersionUID = 1L;
public static final String DEFAULT_VERSION = "3.3.6";
private static final BootstrapThemeResourceReference INSTANCE = new BootstrapThemeResourceReference();
public BootstrapThemeResourceReference() {
this(DEFAULT_VERSION);
}
public BootstrapThemeResourceReference(String version) {
super("bootstrap", "css/bootstrap-theme.min.css", version);
}
public BootstrapThemeResourceReference(Class<?> scope, String name) {
super(scope, name);
}
/**
* Returns a singleton instance of this resource reference using the default version.
*
* @return a resource reference instance
*/
public static BootstrapThemeResourceReference get() {
return INSTANCE;
}
}
| {
"content_hash": "82b956c24427b5cb86053e3250755868",
"timestamp": "",
"source": "github",
"line_count": 47,
"max_line_length": 106,
"avg_line_length": 33.4468085106383,
"alnum_prop": 0.7099236641221374,
"repo_name": "flex-oss/flex-ui",
"id": "4a8d0b6a2f741291dbdc7db1b1f1bfa9fd3d44a5",
"size": "1572",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "flex-ui-core/src/main/java/org/cdlflex/ui/resource/BootstrapThemeResourceReference.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "2252"
},
{
"name": "HTML",
"bytes": "69197"
},
{
"name": "Java",
"bytes": "745147"
},
{
"name": "JavaScript",
"bytes": "3270"
}
],
"symlink_target": ""
} |
a,
.search-cat.navbar-default .navbar-nav li a.dropdown-toggle,
#site-header.v2 #main-menu .menu li.active > a,
#site-header.v2 #main-menu .menu > li > a:hover,
.page-section.v3-seven .title-1,
.woo-cart-empty .cart-empty,
.cart table.shop_table th,
.cart .cart-collaterals .cart_totals h2,
.cart table.wishlist_table th,
.cart .cart_totals_inner .coupon label,
.checkout h3,
.user-login h5,
.icon-box .text h4,
.widget {
color: #4a414a;
}
a:hover,
a:focus,
#site-header .top a:hover,
.shop-cart .total .amount,
#main-menu .sub-menu li a:hover,
#main-menu li.mega-menu .mega-submenu li .mega-title,
#left-menu .menu .mega-menu .sub-menu li .mega-title,
#left-menu button,
#left-menu .menu .sub-menu li a:hover,
#site-header.v2 #main-menu .menu > li > a:hover,
.page-section.v3-five .row .col-md-6:last-child a,
.breadcrumbs li a:hover,
.entry-content .more-link,
.entry-meta .entry-title a:hover,
.post-meta a:hover,
.page-nav a:hover,
.page-nav .current,
.author-info .author-bio h3 span,
#related-posts .c-nav a:hover,
#related-posts figcaption a:hover,
.comment-respond .comment-form .form-submit input[type="submit"]:hover,
.error-404 ul li a,
.page-section.faq-one .icon-box.style-3 .icons,
.cart table.cart .product-name > a:hover,
.cart table.cart .amount,
.cart table.cart .amount,
.cart .cart_totals_inner .wc-proceed-to-checkout input.button:hover,
.shop-details .p-meta a,
#p-thumb .owl-controls .owl-buttons > div:hover,
#site-footer .bot .bot-main a:hover,
#site-footer .widget a:hover,
.shop-cart .shop-item .shop-item-title i:hover,
.shop-cart ul.cart_list li a:hover,
.shop-cart .buttons a.button:hover,
.icon-list li i,
.product .p-badge.sale,
.product .p-info .p-action a:hover i,
.product.style-2 .p-image a:hover i,
.product-tabs .nav-tabs > li.active > a,
.blog-post .entry-meta h4 a:hover,
.blog-post .entry-content .more-link,
.social li a:hover,
.wr_widget_recent_posts .post-item a:hover,
.wr_widget_recent_posts .wrp-meta span.price,
.btn-dashed:hover,
.product .p-info .price .amount {
color: #7c372c;
}
.shop-cart ul.cart_list li .remove:hover {
color: #7c372c !important !important;
}
.cart-control:hover .cart-item span,
.shop-cart .buttons a.button.checkout,
#main-menu .menu li.active > a,
#main-menu .menu > li > a:hover,
#related-posts figure .mask a:hover,
.page-section.contact-two .btn,
.page-section.faq-three,
.newsletter .modal-content .close,
.page-section.about-one,
.woo-cart-empty .return-to-shop .button,
.cart .cart_totals_inner .wc-proceed-to-checkout a.button,
.checkout #payment #place_order,
.radio-styled input:checked ~ .inner:after,
.icon-box.style-3 .icons,
.icon-box.style-4 .icons,
.icon-box.style-5 .icons,
.icon-list li i,
.product .p-badge.sale,
.subscribe.style-2 .btn,
.contact-form.style-1 .btn,
.widget .f-price .ui-slider .ui-slider-range,
.widget .f-price .ui-state-default,
.btn-main {
background: #7c372c;
}
.shop-cart .buttons a.button.checkout,
.menu-box li a:hover,
.comments-area .action-link a:hover,
.comment-respond .comment-form .form-submit input[type="submit"]:hover,
.product .p-info .p-action a:hover,
.product.style-2 .p-image a:hover,
.social li a:hover,
.widget .f-color li:hover,
.btn-dashed:hover {
border-color: #7c372c;
}
.shop-cart .buttons a.button.checkout:hover,
.page-section.contact-two .btn:hover,
.woo-cart-empty .return-to-shop .button:hover,
.cart .cart_totals_inner .wc-proceed-to-checkout a.button:hover,
.cart #payment #place_order:hover,
.cart .woo-cart-empty .return-to-shop .button:hover,
.cart form input[type="submit"]:hover,
.subscribe .btn:hover,
.btn-main:hover {
background: #652015;
}
body,
.shop-cart .shop-item,
.shop-cart .shop-item .shop-item-title,
.shop-cart .buttons a.button,
.blog-main .post .entry-content,
.page-nav a:after,
.page-nav .current:after,
.nav-shop .dropdown-toggle i,
.blog-single .post-meta > span,
.comments-area .comment-body,
.comments-area .comment-body .comment-meta time,
.comment-respond .comment-form .form-submit:before,
.checkout input,
.checkout form .form-row label,
.checkout table.shop_table .shipping td,
.checkout #payment div.payment_box,
.user-login label,
#p-thumb .owl-controls .owl-buttons > div,
.shop-details .nav-tabs > li > a,
.product .p-info .p-action a i,
.product.style-2 .p-image a i,
.wr_widget_recent_posts .wrp-meta span,
.panel-title i:after,
.member,
.social li a {
color: #0d040d;
}
.cart table.cart .product-remove a,
.cart table.wishlist_table .product-remove a {
color: #0d040d !important;
}
.comment-respond .comment-form [class*="comment-form"] input:focus,
.comment-respond .comment-form .comment-form-comment textarea:focus,
.panel-title i:before {
border-color: #0d040d;
}
.page-section.services-three .icon-box .icons,
.cart .cart_totals_inner .coupon .button,
.cart .cart-collaterals .cart_totals table .shipping-calculator-form .button,
.cart form.checkout_coupon input.button,
.cart form.login input.button,
.cart form.lost_reset_password input.button,
.cart table.wishlist_table .button,
.user-login .coupon .button,
#footer-menu .menu > li:after,
.subscribe .btn {
background: #0d040d;
}
h1,
h2,
h3,
h4,
h5,
h6,
#site-header .top,
#site-header .top a,
.cart-control,
.entry-meta .entry-title a,
.blog-single .entry-content,
.single-share,
#related-posts figcaption a,
.comments-area .comment-body .comment-author,
.comments-area .comment-body .comment-author a,
.error-404 ul li a:hover,
.shop-main .products.list .product .p-info h4 a,
.cart .cart-collaterals .cart_totals table th,
.cart table.cart .product-name > a,
.checkout table.shop_table td,
.checkout table.shop_table th,
.checkout #payment ul.payment_methods label,
.shop-details .p-rate .pull-right,
.shop-details .p-meta ul li span,
.shop-details .p-share span,
#p-preview .owl-buttons > div,
#p-preview .item .zoom i,
.shop-details .nav-tabs > li.active a,
.shop-details #reviews #review_form_wrapper .btn-dashed,
.shop-details #reviews #comments ol.commentlist li .comment-text .meta strong,
.icon-box.style-4 .text h4,
.icon-list li,
.blog-post .entry-meta h4 a,
.blog-post .entry-content .more-link:hover,
.subscribe .form-group .form-control,
.widget .widget-title,
.wr_widget_recent_posts .post-item a,
.widget .f-price .btn,
.member .name,
.member .social-member a,
#site-footer .bot .bot-main,
#site-footer .bot .bot-main a,
#site-footer .widget,
#site-footer .widget a {
color: #6b626b;
}
#site-header .top,
#top-menu .menu .sub-menu,
.cart-control .cart-item span,
.topbar,
.page-section.faq-one,
.modal-backdrop,
.offline #site-header,
#site-footer .bot .bot-main,
.member .social-member a:hover {
background: #0d040d;
}
.shop-cart .shop-item .shop-item-title,
.shop-cart ul.cart_list li,
.shop-cart .buttons a.button {
border-color: #6b626b;
}
.topbar .page-title {
background: #191e23;
} | {
"content_hash": "1fd03deefbbadd60fd673df01034627e",
"timestamp": "",
"source": "github",
"line_count": 227,
"max_line_length": 78,
"avg_line_length": 29.784140969162994,
"alnum_prop": 0.724744860227777,
"repo_name": "ManishKrVerma/fejro",
"id": "0f880c00491c8f157c214ea8df3cba6a69961ea5",
"size": "6761",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "assets/css/colors/red.css",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ApacheConf",
"bytes": "459"
},
{
"name": "CSS",
"bytes": "278310"
},
{
"name": "HTML",
"bytes": "31369"
},
{
"name": "JavaScript",
"bytes": "267998"
},
{
"name": "PHP",
"bytes": "2094230"
}
],
"symlink_target": ""
} |
package io.netty.handler.codec.http2;
import io.netty.util.internal.UnstableApi;
import static io.netty.handler.codec.http2.Http2CodecUtil.verifyPadding;
import static io.netty.util.internal.ObjectUtil.checkNotNull;
/**
* The default {@link Http2HeadersFrame} implementation.
*/
@UnstableApi
public final class DefaultHttp2HeadersFrame extends AbstractHttp2StreamFrame implements Http2HeadersFrame {
private final Http2Headers headers;
private final boolean endStream;
private final int padding;
/**
* Equivalent to {@code new DefaultHttp2HeadersFrame(headers, false)}.
*
* @param headers the non-{@code null} headers to send
*/
public DefaultHttp2HeadersFrame(Http2Headers headers) {
this(headers, false);
}
/**
* Equivalent to {@code new DefaultHttp2HeadersFrame(headers, endStream, 0)}.
*
* @param headers the non-{@code null} headers to send
*/
public DefaultHttp2HeadersFrame(Http2Headers headers, boolean endStream) {
this(headers, endStream, 0);
}
/**
* Construct a new headers message.
*
* @param headers the non-{@code null} headers to send
* @param endStream whether these headers should terminate the stream
* @param padding additional bytes that should be added to obscure the true content size. Must be between 0 and
* 256 (inclusive).
*/
public DefaultHttp2HeadersFrame(Http2Headers headers, boolean endStream, int padding) {
this.headers = checkNotNull(headers, "headers");
this.endStream = endStream;
verifyPadding(padding);
this.padding = padding;
}
@Override
public DefaultHttp2HeadersFrame setStreamId(int streamId) {
super.setStreamId(streamId);
return this;
}
@Override
public String name() {
return "HEADERS";
}
@Override
public Http2Headers headers() {
return headers;
}
@Override
public boolean isEndStream() {
return endStream;
}
@Override
public int padding() {
return padding;
}
@Override
public String toString() {
return "DefaultHttp2HeadersFrame(streamId=" + streamId() + ", headers=" + headers
+ ", endStream=" + endStream + ", padding=" + padding + ")";
}
@Override
public boolean equals(Object o) {
if (!(o instanceof DefaultHttp2HeadersFrame)) {
return false;
}
DefaultHttp2HeadersFrame other = (DefaultHttp2HeadersFrame) o;
return super.equals(other) && headers.equals(other.headers)
&& endStream == other.endStream && padding == other.padding;
}
@Override
public int hashCode() {
int hash = super.hashCode();
hash = hash * 31 + headers.hashCode();
hash = hash * 31 + (endStream ? 0 : 1);
hash = hash * 31 + padding;
return hash;
}
}
| {
"content_hash": "d9419f960b3f24007d5a26260fa7f04f",
"timestamp": "",
"source": "github",
"line_count": 101,
"max_line_length": 115,
"avg_line_length": 29.06930693069307,
"alnum_prop": 0.6406675749318801,
"repo_name": "luyiisme/netty",
"id": "76f0e57dd9308e4c20c41f4e4e1cdb2484950cd2",
"size": "3570",
"binary": false,
"copies": "2",
"ref": "refs/heads/4.1",
"path": "codec-http2/src/main/java/io/netty/handler/codec/http2/DefaultHttp2HeadersFrame.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "C",
"bytes": "93219"
},
{
"name": "C++",
"bytes": "1555"
},
{
"name": "CSS",
"bytes": "49"
},
{
"name": "Groovy",
"bytes": "1755"
},
{
"name": "HTML",
"bytes": "1466"
},
{
"name": "Java",
"bytes": "12222604"
},
{
"name": "Protocol Buffer",
"bytes": "1712"
},
{
"name": "Shell",
"bytes": "4114"
}
],
"symlink_target": ""
} |
vodem.simple module
===================
.. automodule:: vodem.simple
:members:
:undoc-members:
:show-inheritance:
| {
"content_hash": "3d1fc6b2f2c8c508e32b277d2f707a1a",
"timestamp": "",
"source": "github",
"line_count": 7,
"max_line_length": 28,
"avg_line_length": 18.142857142857142,
"alnum_prop": 0.5669291338582677,
"repo_name": "alzeih/python-vodem-vodafone-K4607-Z",
"id": "8cc326e6437aa16f7eb42815d9afe43761c8407f",
"size": "127",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "docs/source/vodem.simple.rst",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "HTML",
"bytes": "19346"
},
{
"name": "JavaScript",
"bytes": "444689"
},
{
"name": "Python",
"bytes": "84811"
},
{
"name": "Shell",
"bytes": "46"
}
],
"symlink_target": ""
} |
import unittest
from datetime import date
from dateutil.relativedelta import relativedelta
import holidays
class TestIsrael(unittest.TestCase):
def test_purim_day(self):
il_holidays = holidays.IL(years=[2017], observed=True)
self.assertListEqual(
il_holidays.get_list(date(2017, 3, 11)), ["Purim - Eve"]
)
self.assertListEqual(
il_holidays.get_list(date(2017, 3, 12)), ["Purim"]
)
self.assertListEqual(
il_holidays.get_list(date(2017, 3, 13)), ["Shushan Purim"]
)
def test_memorial_day(self):
self._test_observed_holidays("Memorial Day")
self._test_nonobserved_holidays("Memorial Day")
def test_independence_day(self):
self._test_observed_holidays("Independence Day")
def _test_observed_holidays(self, holiday_name):
days_delta = 0 if holiday_name == "Memorial Day" else 1
# Postponed
il_holidays = holidays.IL(years=[2017], observed=True)
official_memorial_day = date(2017, 4, 30) + relativedelta(
days=days_delta
)
observed_memorial_day = date(2017, 5, 1) + relativedelta(
days=days_delta
)
self.assertIn(official_memorial_day, il_holidays)
self.assertIn(holiday_name, il_holidays[official_memorial_day])
self.assertIn(observed_memorial_day, il_holidays)
self.assertIn(
holiday_name + " (Observed)", il_holidays[observed_memorial_day]
)
# Earlier
il_holidays = holidays.IL(years=[2018], observed=True)
official_memorial_day = date(2018, 4, 19) + relativedelta(
days=days_delta
)
observed_memorial_day = date(2018, 4, 18) + relativedelta(
days=days_delta
)
self.assertIn(official_memorial_day, il_holidays)
self.assertIn(holiday_name, il_holidays[official_memorial_day])
self.assertIn(observed_memorial_day, il_holidays)
self.assertIn(
holiday_name + " (Observed)", il_holidays[observed_memorial_day]
)
# On time
il_holidays = holidays.IL(years=[2020], observed=True)
official_memorial_day = date(2020, 4, 28) + relativedelta(
days=days_delta
)
self.assertIn(official_memorial_day, il_holidays)
self.assertIn(holiday_name, il_holidays[official_memorial_day])
for names in il_holidays.values():
self.assertNotIn(holiday_name + " (Observed)", names)
def _test_nonobserved_holidays(self, holiday_name):
days_delta = 0 if holiday_name == "Memorial Day" else 1
# Postponed
il_holidays = holidays.IL(years=[2017], observed=False)
official_memorial_day = date(2017, 4, 30) + relativedelta(
days=days_delta
)
observed_memorial_day = date(2017, 5, 1) + relativedelta(
days=days_delta
)
self.assertIn(official_memorial_day, il_holidays)
self.assertIn(holiday_name, il_holidays[official_memorial_day])
self.assertNotEqual(il_holidays[observed_memorial_day], "Memorial Day")
# Earlier
il_holidays = holidays.IL(years=[2018], observed=False)
official_memorial_day = date(2018, 4, 19) + relativedelta(
days=days_delta
)
observed_memorial_day = date(2018, 4, 18) + relativedelta(
days=days_delta
)
self.assertIn(official_memorial_day, il_holidays)
self.assertIn(holiday_name, il_holidays[official_memorial_day])
self.assertNotIn(observed_memorial_day, il_holidays)
# On time
il_holidays = holidays.IL(years=[2020], observed=False)
official_memorial_day = date(2020, 4, 28) + relativedelta(
days=days_delta
)
self.assertIn(official_memorial_day, il_holidays)
self.assertIn(holiday_name, il_holidays[official_memorial_day])
for names in il_holidays.values():
self.assertNotIn(holiday_name + " (Observed)", names)
| {
"content_hash": "d3368f42efd82f2a69dd9e05cc80823d",
"timestamp": "",
"source": "github",
"line_count": 109,
"max_line_length": 79,
"avg_line_length": 37.293577981651374,
"alnum_prop": 0.6177121771217712,
"repo_name": "dr-prodigy/python-holidays",
"id": "fa23f12149f08f13e94791a36f5ef392d5387fd1",
"size": "4542",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "test/countries/test_israel.py",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Python",
"bytes": "1134423"
}
],
"symlink_target": ""
} |
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.269
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Johanns.Properties
{
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Test.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}
| {
"content_hash": "91ea2dda6c2f1e092e2c2e8cd79c722f",
"timestamp": "",
"source": "github",
"line_count": 71,
"max_line_length": 170,
"avg_line_length": 38.95774647887324,
"alnum_prop": 0.6012292118582792,
"repo_name": "johanns/MediaChangeWatcher",
"id": "8e80814c4f2441d9b84e719a6a3d165ca711fed4",
"size": "2768",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Test/Properties/Resources.Designer.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "261"
},
{
"name": "C#",
"bytes": "5301"
},
{
"name": "C++",
"bytes": "5284"
}
],
"symlink_target": ""
} |
{#
# Page Body include template
# -----------------------------
#
# This template is used to output HTML for an "Page Body" Matrix field.
#
# An `entry` variable is expected to be defined.
-#}
{% set blocks = entry.pageBody %}
{% for i, block in blocks %}
{% set nextBlock = not loop.last ? blocks[i+1] : false %}
{% set prevBlock = not loop.first ? blocks[i-1] : false %}
{% set colWidth = block.colWidth ? block.colWidth : false %}
{% set prevColWidth = prevBlock ? prevBlock.colWidth : false %}
{% if loop.first and not (colWidth | full_width) %}
<div class="wrap wrap--contained">
<div class="row row--block">
{% elseif loop.first and (colWidth | full_width) %}
<div class="wrap">
<div class="row row--block">
{% elseif not loop.first and (prevColWidth | full_width) and not (colWidth | full_width) %}
</div> <!-- close the row before -->
</div> <!-- close the wrap before -->
<div class="wrap wrap--contained">
<div class="row row--block">
{% elseif not loop.first and (prevColWidth | full_width) and (colWidth | full_width) %}
<!-- nothing -->
{% elseif not loop.first and not (prevColWidth | full_width) and (colWidth | full_width) %}
</div> <!-- close the row before -->
</div> <!-- close the wrap before -->
<div class="wrap wrap">
<div class="row row--block">
{% endif %}
{% if not loop.first and (colWidth | new_row) %}
</div> <!-- close row -->
<div class="row row--block"> <!-- re-open row -->
{% endif %}
<div class="{{colWidth|mobile_class("xs")}} {{colWidth|desktop_class("lg")}} {{colWidth|tablet_class("md")}} {{colWidth|wide_class("xl")}}">
<div class="vertical-align-wrap">
<div class="valign--{{colWidth|v_align}}">
<div class="block--{{block.type}} block--{{i}}">
{% switch block.type %}
{# --------------------------------------------- RICH CONTENT -------- #}
{% case 'richContent' %}
{{ block.richContent }}
{# --------------------------------------------- HERO ---------------- #}
{% case 'hero' %}
{% include "_includes/_matrix_layouts/page_body/hero" %}
{# --------------------------------------------- OTHER --------------- #}
{% case 'image' %}
{% include "_includes/_matrix_layouts/page_body/image" %}
{# --------------------------------------------- FAQ --------------- #}
{% case 'faq' %}
{% include "_includes/_matrix_layouts/page_body/faq" %}
{# --------------------------------------------- Users List --------------- #}
{% case 'usersList' %}
{% include "_includes/_matrix_layouts/page_body/users_list" %}
{# --------------------------------------------- Entries List --------------- #}
{% case 'entriesList' %}
{% include "_includes/_matrix_layouts/page_body/entries_list" %}
{# --------------------------------------------- Media Gallery --------------- #}
{% case 'gallery' %}
{% include "_includes/_matrix_layouts/page_body/gallery" %}
{% endswitch %}
</div> <!-- close block--type -->
</div> <!-- close valign -->
</div> <!-- close vertical-align-wrap -->
</div> <!-- close col block -->
{% if loop.last %}
</div> <!-- close first opened row -->
</div> <!-- close first opened wrap -->
{% endif %}
{% endfor %}
| {
"content_hash": "2ddc054c38f930dbaa52d68acc41c1f4",
"timestamp": "",
"source": "github",
"line_count": 94,
"max_line_length": 142,
"avg_line_length": 36.92553191489362,
"alnum_prop": 0.4710458081244598,
"repo_name": "welance/welance-craft-starter",
"id": "f4eb00f57f54cf7a3299591e256fc2b6d6d16f81",
"size": "3471",
"binary": false,
"copies": "1",
"ref": "refs/heads/develop",
"path": "templates/_includes/_matrix_layouts/page_body.html",
"mode": "33261",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "37451"
},
{
"name": "HTML",
"bytes": "40789"
},
{
"name": "JavaScript",
"bytes": "8886"
},
{
"name": "Makefile",
"bytes": "887"
},
{
"name": "PHP",
"bytes": "323328"
},
{
"name": "Python",
"bytes": "35074"
},
{
"name": "Shell",
"bytes": "2239"
}
],
"symlink_target": ""
} |
define(["app", "backbone", "dashboard/dashboard.view"],
function (app, Backbone, DashboardView) {
app.module("dashboard", function (module) {
var Router = Backbone.Router.extend({
routes: {
"": "dashboard"
},
dashboard: function () {
if (!app.settings.firstRun) {
app.layout.content.show(new DashboardView());
}
}
});
app.dashboard.router = new Router();
});
}); | {
"content_hash": "3cafc5088e8d149b41d6b0375ddb9510",
"timestamp": "",
"source": "github",
"line_count": 20,
"max_line_length": 69,
"avg_line_length": 28.8,
"alnum_prop": 0.4305555555555556,
"repo_name": "uttapong/thalinterpreter",
"id": "f3a7d705cbe3b1ba126a9204ad8d04b6d9d6827f",
"size": "618",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "node_modules/jsreport/extension/express/public/js/dashboard/module.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "103"
},
{
"name": "CSS",
"bytes": "236005"
},
{
"name": "CoffeeScript",
"bytes": "83757"
},
{
"name": "HTML",
"bytes": "3220127"
},
{
"name": "JavaScript",
"bytes": "6094670"
},
{
"name": "Shell",
"bytes": "1674"
}
],
"symlink_target": ""
} |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>lens: 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.15.1 / lens - 1.0.1+8.12</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
lens
<small>
1.0.1+8.12
<span class="label label-info">Not compatible 👼</span>
</small>
</h1>
<p>📅 <em><script>document.write(moment("2022-04-01 06:07:12 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-04-01 06:07:12 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.15.1 Formal proof management system
dune 3.0.3 Fast, portable, and opinionated build system
ocaml 4.07.1 The OCaml compiler (virtual package)
ocaml-base-compiler 4.07.1 Official release 4.07.1
ocaml-config 1 OCaml Switch Configuration
ocaml-secondary-compiler 4.08.1-1 OCaml 4.08.1 Secondary Switch Compiler
ocamlfind 1.9.1 A library manager for OCaml
ocamlfind-secondary 1.9.1 Adds support for ocaml-secondary-compiler to ocamlfind
zarith 1.12 Implements arithmetic and logical operations over arbitrary-precision integers
# opam file:
opam-version: "2.0"
synopsis: "Generation of lenses for record datatypes"
maintainer: "gregory@bedrocksystems.com"
authors: [
"Gregory Malecha <gregory@bedrocksystems.com>"
]
homepage: "https://github.com/bedrocksystems/coq-lens"
dev-repo: "git://github.com/bedrocksystems/coq-lens.git"
bug-reports: "https://github.com/bedrocksystems/coq-lens/issues"
license: "LGPL2.1+BedRock"
build: [
[make "-j%{jobs}%"]
]
install: [
[make "install"]
]
depends: [
"ocaml"
"coq" {>= "8.12" & < "8.13~"}
"coq-metacoq-template" { = "1.0~beta1+8.12" }
]
tags: [
"logpath:Lens"
"date: 2020-11-18"
]
url {
src: "https://github.com/bedrocksystems/coq-lens/archive/v1.0.1.tar.gz"
checksum: "sha256=c1092aa89e885dd4abe1abc0605474440e8a763569be0accbbf6af4b129b3a91"
}
</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-lens.1.0.1+8.12 coq.8.15.1</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.15.1).
The following dependencies couldn't be met:
- coq-lens -> 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-lens.1.0.1+8.12</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": "8a36763c990ecbd622d3bcece494f479",
"timestamp": "",
"source": "github",
"line_count": 173,
"max_line_length": 159,
"avg_line_length": 40.47398843930636,
"alnum_prop": 0.535275635532705,
"repo_name": "coq-bench/coq-bench.github.io",
"id": "c5ce5ed31b751c2ae28585a6c56258e2822399bd",
"size": "7027",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "clean/Linux-x86_64-4.07.1-2.0.6/released/8.15.1/lens/1.0.1+8.12.html",
"mode": "33188",
"license": "mit",
"language": [],
"symlink_target": ""
} |
var CoffeeScript, HTML, URL, raise;
HTML = require("jsdom").dom.level3.html;
URL = require("url");
try {
CoffeeScript = require("coffee-script");
HTML.languageProcessors.coffeescript = function(element, code, filename) {
return this.javascript(element, CoffeeScript.compile(code), filename);
};
} catch (ex) {
}
HTML.languageProcessors.javascript = function(element, code, filename) {
var cast, document, window;
if (code) {
document = element.ownerDocument;
window = document.window;
try {
return window._evaluate(code, filename);
} catch (error) {
if (!(error instanceof Error)) {
cast = new Error(error.message);
cast.stack = error.stack;
error = cast;
}
return raise({
element: element,
location: filename,
from: __filename,
error: error
});
}
}
};
HTML.HTMLScriptElement._init = function() {
this.addEventListener("DOMNodeInsertedIntoDocument", function() {
var executeInOrder, executeInlineScript, filename,
_this = this;
if (this.src) {
return HTML.resourceLoader.load(this, this.src, this._eval);
} else {
if (this.id) {
filename = "" + this.ownerDocument.URL + ":#" + id;
} else {
filename = "" + this.ownerDocument.URL + ":script";
}
executeInlineScript = function() {
return _this._eval(_this.textContent, filename);
};
executeInOrder = HTML.resourceLoader.enqueue(this, executeInlineScript, filename);
if (this.ownerDocument.readyState === "loading") {
return process.nextTick(executeInOrder);
} else {
return executeInOrder();
}
}
});
};
HTML.resourceLoader.load = function(element, href, callback) {
var document, loaded, ownerImplementation, tagName, url, window;
document = element.ownerDocument;
window = document.parentWindow;
ownerImplementation = document.implementation;
tagName = element.tagName.toLowerCase();
if (ownerImplementation.hasFeature("FetchExternalResources", tagName)) {
loaded = function(response) {
return callback.call(element, response.body.toString(), url.pathname);
};
url = HTML.resourceLoader.resolve(document, href);
return window._eventQueue.http("GET", url, {
target: element
}, this.enqueue(element, loaded, url));
}
};
module.exports = raise = function(_arg) {
var document, element, error, line, location, message, partial, scope, window, _i, _len, _ref;
element = _arg.element, location = _arg.location, scope = _arg.scope, error = _arg.error;
document = element.ownerDocument || element;
window = document.parentWindow;
message = scope ? "" + scope + ": " + error.message : error.message;
location || (location = document.location.href);
partial = [];
if (error.stack) {
_ref = error.stack.split("\n");
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
line = _ref[_i];
if (~line.indexOf("contextify/lib/contextify.js")) {
break;
}
partial.push(line);
}
}
partial.push(" in " + location);
error.stack = partial.join("\n");
window._eventQueue.onerror(error);
};
| {
"content_hash": "b42c806a2814b2d03b2615450d9470b3",
"timestamp": "",
"source": "github",
"line_count": 102,
"max_line_length": 96,
"avg_line_length": 31.245098039215687,
"alnum_prop": 0.6341386884217132,
"repo_name": "FriendCode/zombie-build",
"id": "1d2fceb49c4d4bbfe4cfe9d824542cf3d573c85e",
"size": "3222",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "lib/zombie/scripts.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CoffeeScript",
"bytes": "3247"
},
{
"name": "JavaScript",
"bytes": "8052"
},
{
"name": "Perl",
"bytes": "1058"
},
{
"name": "Ruby",
"bytes": "103"
},
{
"name": "Shell",
"bytes": "683"
}
],
"symlink_target": ""
} |
layout: data_model
title: X509V3ExtensionsType
this_version: 4.1
---
<div class="row">
<div class="col-md-10">
<h1>X509V3ExtensionsType<span class="subdued">X509 Certificate Object Schema</span></h1>
</div>
<div id="nav-area" class="col-md-2">
<p>
<form id="nav-version">
<select>
<option value="4.1" selected="selected">MAEC 4.1</option>
</select>
</form>
</p>
</div>
</div>
<p class="data-model-description">The <a href='/data-model/4.1/X509CertificateObj/X509V3ExtensionsType'>X509V3ExtensionsType</a> captures the standard X509 V3 Extensions that may be used in X509 certificates. Based on RFC 3280, "Standard Extensions": http://www.ietf.org/rfc/rfc3280.txt.</p>
<hr />
<table class="table table-striped table-hover">
<thead>
<tr>
<th>Field Name</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Basic_Constraints<span class="occurrence">0..1</span></td>
<td>
<a href="/data-model/4.1/cyboxCommon/StringObjectPropertyType">StringObjectPropertyType</a>
</td>
<td>
<p>The Basic_Constraints field captures a multi-valued extension which indicates whether a certificate is a CA certificate. The first (mandatory) name is CA followed by TRUE or FALSE. If CA is TRUE then an optional pathlen name followed by an non-negative value can be included. Also equivalent to the object ID (OID) value of 2.5.29.19.</p>
</td>
</tr>
<tr>
<td>Name_Constraints<span class="occurrence">0..1</span></td>
<td>
<a href="/data-model/4.1/cyboxCommon/StringObjectPropertyType">StringObjectPropertyType</a>
</td>
<td>
<p>The Name_Constraints field captures a name space within which all subject names in subsequent certificates in a certification path MUST be located. Also equivalent to the object ID (OID) value of 2.5.29.30.</p>
</td>
</tr>
<tr>
<td>Policy_Constraints<span class="occurrence">0..1</span></td>
<td>
<a href="/data-model/4.1/cyboxCommon/StringObjectPropertyType">StringObjectPropertyType</a>
</td>
<td>
<p>The Policy_Constraints field captures any constraints on path validation for certificates issued to CAs. Also equivalent to the object ID (OID) value of 2.5.29.36.</p>
</td>
</tr>
<tr>
<td>Key_Usage<span class="occurrence">0..1</span></td>
<td>
<a href="/data-model/4.1/cyboxCommon/StringObjectPropertyType">StringObjectPropertyType</a>
</td>
<td>
<p>The Key_Usage element field captures a multi-valued extension consisting of a list of names of the permitted key usages. Also equivalent to the object ID (OID) value of 2.5.29.15.</p>
</td>
</tr>
<tr>
<td>Extended_Key_Usage<span class="occurrence">0..1</span></td>
<td>
<a href="/data-model/4.1/cyboxCommon/StringObjectPropertyType">StringObjectPropertyType</a>
</td>
<td>
<p>The Extended_Key_Usage field captures a list of usages indicating purposes for which the certificate public key can be used for. Also equivalent to the object ID (OID) value of 2.5.29.37.</p>
</td>
</tr>
<tr>
<td>Subject_Key_Identifier<span class="occurrence">0..1</span></td>
<td>
<a href="/data-model/4.1/cyboxCommon/StringObjectPropertyType">StringObjectPropertyType</a>
</td>
<td>
<p>The Subject_Key_Identifier field captures the identifier that provides a means of identifying certificates that contain a particular public key. Also equivalent to the object ID (OID) value of 2.5.29.14.</p>
</td>
</tr>
<tr>
<td>Authority_Key_Identifier<span class="occurrence">0..1</span></td>
<td>
<a href="/data-model/4.1/cyboxCommon/StringObjectPropertyType">StringObjectPropertyType</a>
</td>
<td>
<p>The Authority_Key_Identifier field captures the identifier that provides a means of identifying the public key corresponding to the private key used to sign a certificate. Also equivalent to the object ID (OID) value of 2.5.29.35.</p>
</td>
</tr>
<tr>
<td>Subject_Alternative_Name<span class="occurrence">0..1</span></td>
<td>
<a href="/data-model/4.1/cyboxCommon/StringObjectPropertyType">StringObjectPropertyType</a>
</td>
<td>
<p>The Subject_Alternative_Name field captures the additional identities to be bound to the subject of the certificate. Also equivalent to the object ID (OID) value of 2.5.29.17.</p>
</td>
</tr>
<tr>
<td>Issuer_Alternative_Name<span class="occurrence">0..1</span></td>
<td>
<a href="/data-model/4.1/cyboxCommon/StringObjectPropertyType">StringObjectPropertyType</a>
</td>
<td>
<p>The Issuer_Alternative_Name field captures the additional identities to be bound to the issuer of the certificate. Also equivalent to the object ID (OID) value of 2.5.29.18.</p>
</td>
</tr>
<tr>
<td>Subject_Directory_Attributes<span class="occurrence">0..1</span></td>
<td>
<a href="/data-model/4.1/cyboxCommon/StringObjectPropertyType">StringObjectPropertyType</a>
</td>
<td>
<p>The Subject_Directory_Attributes field captures the identification attributes (e.g., nationality) of the subject. Also equivalent to the object ID (OID) value of 2.5.29.9.</p>
</td>
</tr>
<tr>
<td>CRL_Distribution_Points<span class="occurrence">0..1</span></td>
<td>
<a href="/data-model/4.1/cyboxCommon/StringObjectPropertyType">StringObjectPropertyType</a>
</td>
<td>
<p>The CRL_Distribution_Points field captures how CRL information is obtained. Also equivalent to the object ID (OID) value of 2.5.29.31.</p>
</td>
</tr>
<tr>
<td>Inhibit_Any_Policy<span class="occurrence">0..1</span></td>
<td>
<a href="/data-model/4.1/cyboxCommon/NonNegativeIntegerObjectPropertyType">NonNegativeIntegerObjectPropertyType</a>
</td>
<td>
<p>The Inhibit_Any_Policy field the number of additional certificates that may appear in the path before anyPolicy is no longer permitted. Also equivalent to the object ID (OID) value of 2.5.29.54.</p>
</td>
</tr>
<tr>
<td>Private_Key_Usage_Period<span class="occurrence">0..1</span></td>
<td>
<a href="/data-model/4.1/X509CertificateObj/ValidityType">ValidityType</a>
</td>
<td>
<p>The Private_Key_Usage_Period field captures the validity period for the private key, if it is different from the validity period of the certificate. Also equivalent to the object ID (OID) value of 2.5.29.16.</p>
</td>
</tr>
<tr>
<td>Certificate_Policies<span class="occurrence">0..1</span></td>
<td>
<a href="/data-model/4.1/cyboxCommon/StringObjectPropertyType">StringObjectPropertyType</a>
</td>
<td>
<p>The Certificate_Policies field captures a sequence of one or more policy information terms, each of which consists of an object identifier (OID) and optional qualifiers. Also equivalent to the object ID (OID) value of 2.5.29.32.</p>
</td>
</tr>
<tr>
<td>Policy_Mappings<span class="occurrence">0..1</span></td>
<td>
<a href="/data-model/4.1/cyboxCommon/StringObjectPropertyType">StringObjectPropertyType</a>
</td>
<td>
<p>The Policy_Mappings field captures one or more pairs of OIDs; each pair includes an issuerDomainPolicy and a subjectDomainPolicy. The pairing indicates whether the issuing CA considers its issuerDomainPolicy equivalent to the subject CA's subjectDomainPolicy. Also equivalent to the object ID (OID) value of 2.5.29.33.</p>
</td>
</tr>
</tbody>
</table>
| {
"content_hash": "0b57c77b970a9d56f613604640928aa7",
"timestamp": "",
"source": "github",
"line_count": 256,
"max_line_length": 351,
"avg_line_length": 33.26171875,
"alnum_prop": 0.6057545507927188,
"repo_name": "MAECProject/MAECProject.github.io",
"id": "13c785ef69ca581e394a339192e4abc3b4faffa6",
"size": "8519",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "data-model/4.1/X509CertificateObj/X509V3ExtensionsType/index.html",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "CSS",
"bytes": "9666"
},
{
"name": "HTML",
"bytes": "4096353"
},
{
"name": "JavaScript",
"bytes": "1608"
},
{
"name": "Ruby",
"bytes": "21507"
}
],
"symlink_target": ""
} |
/*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
/*
* This code was generated by https://github.com/googleapis/google-api-java-client-services/
* Modify at your own risk.
*/
package com.google.api.services.transcoder.v1beta1.model;
/**
* 2D normalized coordinates. Default: `{0.0, 0.0}`
*
* <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
* transmitted over HTTP when working with the Transcoder API. For a detailed explanation see:
* <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
* </p>
*
* @author Google, Inc.
*/
@SuppressWarnings("javadoc")
public final class NormalizedCoordinate extends com.google.api.client.json.GenericJson {
/**
* Normalized x coordinate.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Double x;
/**
* Normalized y coordinate.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Double y;
/**
* Normalized x coordinate.
* @return value or {@code null} for none
*/
public java.lang.Double getX() {
return x;
}
/**
* Normalized x coordinate.
* @param x x or {@code null} for none
*/
public NormalizedCoordinate setX(java.lang.Double x) {
this.x = x;
return this;
}
/**
* Normalized y coordinate.
* @return value or {@code null} for none
*/
public java.lang.Double getY() {
return y;
}
/**
* Normalized y coordinate.
* @param y y or {@code null} for none
*/
public NormalizedCoordinate setY(java.lang.Double y) {
this.y = y;
return this;
}
@Override
public NormalizedCoordinate set(String fieldName, Object value) {
return (NormalizedCoordinate) super.set(fieldName, value);
}
@Override
public NormalizedCoordinate clone() {
return (NormalizedCoordinate) super.clone();
}
}
| {
"content_hash": "6daef02bd4a72b3de8b5cacc4122cd6b",
"timestamp": "",
"source": "github",
"line_count": 90,
"max_line_length": 182,
"avg_line_length": 27.933333333333334,
"alnum_prop": 0.6909307875894988,
"repo_name": "googleapis/google-api-java-client-services",
"id": "859dd5c8c4bc71659ff27af6194d6f25d6f083f4",
"size": "2514",
"binary": false,
"copies": "2",
"ref": "refs/heads/main",
"path": "clients/google-api-services-transcoder/v1beta1/1.30.1/com/google/api/services/transcoder/v1beta1/model/NormalizedCoordinate.java",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Collections;
using System.Reflection;
using System.IO;
using System.Runtime.InteropServices;
using System.Diagnostics;
namespace Renegade_X_Stat_Tracker
{
class Program
{
[DllImport("user32.dll")]
static extern bool EnableMenuItem(IntPtr hMenu, uint uIDEnableItem, uint uEnable);
[DllImport("user32.dll")]
static extern IntPtr GetSystemMenu(IntPtr hWnd, bool bRevert);
[DllImport("user32.dll")]
static extern IntPtr RemoveMenu(IntPtr hMenu, uint nPosition, uint wFlags);
[DllImport("User32.Dll", EntryPoint = "PostMessageA")]
private static extern bool PostMessage(IntPtr hWnd, uint msg, int wParam, int lParam);
const int VK_RETURN = 0x0D;
const int WM_KEYDOWN = 0x100;
internal const uint SC_CLOSE = 0xF060;
internal const uint MF_GRAYED = 0x00000001;
internal const uint MF_BYCOMMAND = 0x00000000;
internal const uint MF_ENABLED = 0x00000000;
public static List<Player> cachedPlayers = new List<Player>();
public static List<Player> players = new List<Player>();
public const bool debug = true;
public static Database db;
static void Main(string[] args)
{
EnableCloseButton(false);
Util.generatePlayerUpdateQueryString();
LoadSettings();
if (!File.Exists(Util.ini.IniReadValue("LOG", "path")))
{
Console.WriteLine("Couldn't load log file, check settings.ini and start me again!");
Console.WriteLine("Press enter to exit...");
Console.ReadLine();
return;
}
db = new Database(
Util.ini.IniReadValue("DATABASE", "host"),
Util.ini.IniReadValue("DATABASE", "user"),
Util.ini.IniReadValue("DATABASE", "database"),
Util.ini.IniReadValue("DATABASE", "password"),
players
);
if(!db.Connected())
{
Console.WriteLine("Could not connect to database, check settings.ini and start me again!");
Console.WriteLine("Press enter to exit...");
Console.ReadLine();
return;
}
Console.WriteLine("Connected to database successfully!");
LoadCachedPlayers();
Util.ClearCacheStart(10);
if (RCON.Connect(Util.ini.IniReadValue("RCON", "host"), Convert.ToInt16(Util.ini.IniReadValue("RCON", "port")), Util.ini.IniReadValue("RCON", "password")))
{
Util.StartAnnouncements(Convert.ToInt32(Util.ini.IniReadValue("ANNOUNCEMENTS", "delay")));
}
Tail tail = new Tail(Util.ini.IniReadValue("LOG", "path"), 1);
tail.LineFilter = "Rx:";
tail.Changed += new EventHandler<Tail.TailEventArgs>(NewLine);
tail.Run();
Console.CancelKeyPress += (sender, eventArgs) =>
{
var hWnd = System.Diagnostics.Process.GetCurrentProcess().MainWindowHandle;
PostMessage(hWnd, WM_KEYDOWN, VK_RETURN, 0);
};
Console.ReadLine();
ExitProgram(tail);
}
private static void ExitProgram(Tail tail)
{
Console.WriteLine("Exiting program...");
db.Close();
tail.Stop();
RCON.CloseDown();
}
private static void LoadCachedPlayers()
{
db.LoadOnlinePlayers(cachedPlayers);
if(debug)
Console.WriteLine("Loaded " + cachedPlayers.Count + " into cached player list!");
}
private static void EnableCloseButton(bool bEnabled)
{
IntPtr hMenu = Process.GetCurrentProcess().MainWindowHandle;
IntPtr hSystemMenu = GetSystemMenu(hMenu, false);
EnableMenuItem(hSystemMenu, SC_CLOSE, bEnabled ? MF_ENABLED : MF_GRAYED);
RemoveMenu(hSystemMenu, SC_CLOSE, MF_BYCOMMAND);
}
static void LoadSettings()
{
if (!File.Exists("settings.ini"))
{
Util.ini.IniWriteValue("LOG", "path", "log.txt");
Util.ini.IniWriteValue("DATABASE", "host", "127.0.0.1");
Util.ini.IniWriteValue("DATABASE", "database", "renegade");
Util.ini.IniWriteValue("DATABASE", "user", "root");
Util.ini.IniWriteValue("DATABASE", "password", "");
Util.ini.IniWriteValue("RCON", "host", "127.0.0.1");
Util.ini.IniWriteValue("RCON", "port", "7777");
Util.ini.IniWriteValue("RCON", "password", "");
}
}
static void NewLine(object sender, Tail.TailEventArgs e)
{
Match join = Regex.Match(e.Line, "PLAYER:\\s\\\"(.*?)\\\".*?\\sentered\\sfrom\\s(.*?)\\ssteamid\\s(.*?)\\n", RegexOptions.IgnoreCase);
Match chat = Regex.Match(e.Line, "CHAT:\\s\"(.*?)\".*?say\\s\"(.*?)\"", RegexOptions.IgnoreCase);
Match quit = Regex.Match(e.Line, "PLAYER:\\s\"(.*?)\".*?disconnected", RegexOptions.IgnoreCase);
Match kill = Regex.Match(e.Line, "GAME:\\s\"(.*?)\".*?\\skilled\\s\"(.*?)\".*?\\swith\\s\"(.*?)\"", RegexOptions.IgnoreCase);
Match building = Regex.Match(e.Line, "GAME:\\s\"(.*?)\".*?\\sdestroyed_building\\s\"(.*?)\"\\swith\\s\"(.*?)\"", RegexOptions.IgnoreCase);
Match destroyed = Regex.Match(e.Line, "GAME:\\s\"(.*?)\".*?\\sdestroyed\\s\"(.*?)\"\\swith\\s\"(.*?)\"",RegexOptions.IgnoreCase);
if (kill.Success)
OnPlayerKillPlayer(kill);
else if (destroyed.Success)
OnPlayerDestroyVehicle(destroyed);
else if (building.Success)
OnPlayerKillBuilding(building);
else if (chat.Success)
OnPlayerChat(chat);
else if (join.Success)
OnPlayerJoin(join);
else if (quit.Success)
OnPlayerQuit(quit);
}
public static void OnPlayerDestroyVehicle(Match destroyed)
{
Player killer = FindPlayerByName(destroyed.Groups[1].ToString());
if (killer != null)
{
killer.destroyed++;
killer.AddExperience(350);
}
}
public static void OnPlayerKillBuilding(Match building)
{
Player killer = FindPlayerByName(building.Groups[1].ToString());
if (killer != null)
{
killer.buildings++;
killer.AddExperience(1000);
}
int building_id = Util.FindBuildingID(building.Groups[2].ToString());
if (building_id == 0)
Console.WriteLine("Unknown building: " + building.Groups[2].ToString());
else
{
if (killer != null)
db.InsertBuildingKill(killer, building_id);
}
}
public static void OnPlayerKillPlayer(Match kill)
{
Player killer = FindPlayerByName(kill.Groups[1].ToString());
Player victim = FindPlayerByName(kill.Groups[2].ToString());
int damage = Util.FindWeaponID(kill.Groups[3].ToString());
if (killer != null)
killer.HandleKill(damage);
if (victim != null)
victim.HandleDeath(damage);
if (damage == 0)
Console.WriteLine("Unknown weapon: " + kill.Groups[3].ToString());
else
{
if (victim != null || killer != null)
db.InsertKill(killer, victim, damage);
}
}
public static void OnPlayerQuit(Match quit)
{
Player p = FindPlayerByName(quit.Groups[1].ToString());
if (p != null)
{
players.Remove(p);
p.online = 0;
p.Update();
if (debug)
Console.WriteLine("Removed player: " + p.name);
}
}
public static Player FindPlayerByName(string name)
{
Player p = players.Find(r => r.name.Equals(name.ToString()));
if(p == null)
{
p = cachedPlayers.Find(r => r.name.Equals(name.ToString()));
if (p != null)
{
players.Add(p);
cachedPlayers.Remove(p);
Console.WriteLine("Now tracking previously untracked player: " + name);
}
}
return p;
}
public static void OnPlayerChat(Match chat)
{
Player p = FindPlayerByName(chat.Groups[1].ToString());
if (p != null)
{
p.spoken++;
if(RCON.tcp.Connected)
Command.Parse(chat.Groups[2].ToString(), p);
}
if(debug)
Console.WriteLine(chat.Groups[1] + ": " + chat.Groups[2]);
}
public static void OnPlayerJoin(Match join)
{
string id = join.Groups[3].ToString().Substring(2).TrimEnd( '\r', '\n' );
Player p = new Player(
join.Groups[1].ToString(),
join.Groups[2].ToString(),
Int64.Parse(id, System.Globalization.NumberStyles.HexNumber)
);
Player currPlayer = FindPlayerByName(p.name);
if (currPlayer != null)
{
if (debug)
Console.WriteLine("Attempting to remove player " + p.name + " already existed, we're removing his old instance!");
players.Remove(currPlayer);
}
db.RegisterPlayer(p);
if(p.banned == 1)
{
Console.WriteLine("Kicking " + p.name + " because he is banned!");
RCON.Command("AdminKick " + p.name);
return;
}
p.online = 1;
players.Add(p);
if(debug)
Console.WriteLine("Added player: " + p.name + " with ID: " + p.steamid);
}
}
} | {
"content_hash": "85d425769800883b0d531497d46a14c0",
"timestamp": "",
"source": "github",
"line_count": 307,
"max_line_length": 167,
"avg_line_length": 34.045602605863195,
"alnum_prop": 0.5232491389207807,
"repo_name": "JaTochNietDan/Renegade-X-Stats-Tracker",
"id": "feed0be399bc2f881448c11c50cafc1e3ebe0d3d",
"size": "10454",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Renegade X Stat Tracker/Renegade X Stat Tracker/Program.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "51233"
},
{
"name": "CSS",
"bytes": "824"
},
{
"name": "JavaScript",
"bytes": "708"
},
{
"name": "PHP",
"bytes": "118829"
}
],
"symlink_target": ""
} |
import { USER_AUTH, USER_UNAUTH } from '../actions/types';
function authenticate(state) {
return Object.assign({}, state, { authenticated: true });
}
function unAuthenticate(state) {
return Object.assign({}, state, { authenticated: false });
}
export default function(state = {}, action) {
let updatedState;
switch (action.type) {
case USER_AUTH:
//console.log('authReducer_USER_AUTH');
updatedState = authenticate(state);
return updatedState;
case USER_UNAUTH:
//console.log('authReducer_USER_UNAUTH');
updatedState = unAuthenticate(state);
return updatedState;
default:
return state;
}
}
| {
"content_hash": "6f6c9b63d24620fce43c9e3778215081",
"timestamp": "",
"source": "github",
"line_count": 22,
"max_line_length": 59,
"avg_line_length": 28.272727272727273,
"alnum_prop": 0.7009646302250804,
"repo_name": "yassinej/oerk_v4",
"id": "ff0fe91053248e7c220dae2b61c1f9c76d7676aa",
"size": "622",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "client/src/js/reducers/authReducer.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "51"
},
{
"name": "HTML",
"bytes": "1211"
},
{
"name": "JavaScript",
"bytes": "56764"
}
],
"symlink_target": ""
} |
<?php
namespace backend\models;
use Yii;
/**
* This is the model class for table "menu".
*
* @property integer $id
* @property string $name
* @property integer $parent
* @property string $route
* @property integer $order
* @property string $data
*
* @property Menu $parent0
* @property Menu[] $menus
*/
class Menu extends \yii\db\ActiveRecord
{
/**
* @inheritdoc
*/
public static function tableName()
{
return 'admin_menu';
}
/**
* @inheritdoc
*/
public function rules()
{
return [
[['mam_name'], 'required'],
[['mam_parentid', 'mam_order'], 'integer'],
[['mam_data'], 'string'],
[['mam_name'], 'string', 'max' => 128],
[['mam_route'], 'string', 'max' => 256]
];
}
/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
'mam_id' => 'ID',
'mam_name' => 'Name',
'mam_parentid' => 'Parent',
'mam_route' => 'Route',
'mam_order' => 'Order',
'mam_data' => 'Data',
];
}
/**
* @return \yii\db\ActiveQuery
*/
public function getParent0()
{
return $this->hasOne(Menu::className(), ['id' => 'parent']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getMenus()
{
return $this->hasMany(Menu::className(), ['parent' => 'id']);
}
}
| {
"content_hash": "b7ce230104467814ca69dab0571d35ae",
"timestamp": "",
"source": "github",
"line_count": 74,
"max_line_length": 69,
"avg_line_length": 19.91891891891892,
"alnum_prop": 0.48032564450474896,
"repo_name": "mengqiqi884/laria",
"id": "c1483cb3b0261009b539c7322d72c29697511c71",
"size": "1474",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "backend/models/Menu.php",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "Batchfile",
"bytes": "1546"
},
{
"name": "CSS",
"bytes": "287742"
},
{
"name": "JavaScript",
"bytes": "1469141"
},
{
"name": "PHP",
"bytes": "593579"
},
{
"name": "Shell",
"bytes": "17278"
}
],
"symlink_target": ""
} |
require 'evosynth'
# Create a Evaluator subclass to implement the fitness function.
#
# You have to overwrite thhe calculate_fitness method, which will get an individual as parameter.
# This example function is the classic OnesMax function, which just count's the ones in a bitstring.
class MyEvaluator < EvoSynth::Evaluator
def calculate_fitness(individual)
individual.genome.inject(0.0) { |fitness, gene| fitness += gene ? 1 : 0 }
end
end
# Create the hillclimber-evolver, it needs a individual, a evaluator and a mutation
#
# - we use a MaximizingIndividual (fitness will get maximized during the evolution),
# with a ArrayGenome, which contains 64 (random) booleans
# - as evaluator we use the MyEvaluator we've just created
# - lastly, we use the BinaryMutation to flip the boolean values in the genome
evolver = EvoSynth::Evolvers::Hillclimber.new do |hc|
hc.evaluator = MyEvaluator.new
hc.individual = EvoSynth::MaximizingIndividual.new( EvoSynth::ArrayGenome.new(64) { EvoSynth.rand_bool } )
hc.mutation = EvoSynth::Mutations::BinaryMutation.new(EvoSynth::Mutations::Functions::FLIP_BOOLEAN)
end
# Create a logger with console output using a factory method.
#
# This one will log the current generation, the best and the worst fitness every 500 generations
logger = EvoSynth::Logger.create(500, true, :gen, :best_fitness, :worst_fitness)
evolver.add_observer(logger)
# Finally run the hillclimber and print the result after the evolution.
#
# The hillclimber will stop, when the fitness function got called 5000 times.
puts "\nRunning hillclimber...\n"
result = evolver.run_while { |hc| hc.evaluator.called < 5001 }
puts "\nIndividual after evolution: #{result}"
| {
"content_hash": "f397ce520a5434828f4c5a27a414103c",
"timestamp": "",
"source": "github",
"line_count": 40,
"max_line_length": 107,
"avg_line_length": 42.7,
"alnum_prop": 0.7576112412177985,
"repo_name": "yadler/EvoSynth",
"id": "e9c05ed1481ee1b5167695c8e261cbd4264d8dc2",
"size": "2869",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "examples/tutorial/lesson01_first_steps.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Ruby",
"bytes": "550299"
}
],
"symlink_target": ""
} |
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateCoursesTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('courses', function(Blueprint $table)
{
$table->increments('id');
$table->integer('cod_sis')->unique();
$table->string('name');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('courses');
}
}
| {
"content_hash": "44acf2ebfec3db9253c6a393678d0abe",
"timestamp": "",
"source": "github",
"line_count": 34,
"max_line_length": 54,
"avg_line_length": 15.647058823529411,
"alnum_prop": 0.6334586466165414,
"repo_name": "GonzaloFloresA/testMaker",
"id": "f21407ba02df4d6f5110ccec6509346f77de2b2d",
"size": "532",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "database/migrations/2016_06_06_183514_create_courses_table.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ApacheConf",
"bytes": "356"
},
{
"name": "CSS",
"bytes": "247045"
},
{
"name": "HTML",
"bytes": "392305"
},
{
"name": "JavaScript",
"bytes": "209326"
},
{
"name": "PHP",
"bytes": "1915613"
}
],
"symlink_target": ""
} |
package com.mario.playermsg;
import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.util.Arrays;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.view.View;
import com.mario.load.LoadActivity;
import com.mario.load.LoadResource;
import com.mario.load.LoadView;
public class HeightScoreView extends View
{
private Paint paint;
private int textSize = 20;
private String name,score,msg = "HeightScore";
private Player p[] ;
public HeightScoreView(Context context)
{
super(context);
this.setFocusableInTouchMode(true);
this.setKeepScreenOn(true);
this.paint = new Paint();
this.paint.setAntiAlias(true);
this.paint.setColor(Color.MAGENTA);
this.paint.setTypeface(LoadView.mFace);
this.paint.setTextSize(textSize);
byte[] b = new byte[1024];
int length = 0;
try
{
FileInputStream fis = this.getContext().openFileInput("save.txt");
BufferedInputStream bis = new BufferedInputStream(fis);
while((length = bis.read(b)) != -1)
{
name = new String(b, 0, length);
}
bis.close();
} catch (Exception e) {
e.printStackTrace();
}
String newname[] = null;
if(name != null)
{
newname = name.split(":");
}
byte[] b2 = new byte[1024];
int length2 = 0;
try
{
FileInputStream fis = this.getContext().openFileInput("score.txt");
BufferedInputStream bis = new BufferedInputStream(fis);
while((length2 = bis.read(b2)) != -1)
{
score = new String(b2, 0, length2);
}
bis.close();
} catch (Exception e) {
e.printStackTrace();
}
String newscore[] = null;
if(score != null)
{
newscore = score.split(":");
}
if(newname != null && newscore!= null )
{
p = new Player[newname.length];
for(int i=0; i<newname.length; i++)
{
p[i] = new Player(newname[i],Integer.parseInt(newscore[i]));
}
Arrays.sort(p);
}
}
@Override
protected void onDraw(Canvas canvas)
{
canvas.drawBitmap(LoadResource.map.get(0), 0, 0, paint);
canvas.drawText(msg, (LoadActivity.ScreenWidth - msg.length()*textSize/2)/2, textSize, paint);
canvas.drawText("name", LoadActivity.ScreenWidth/8, textSize*3, paint);
canvas.drawText("score", LoadActivity.ScreenWidth/2+LoadActivity.ScreenWidth/8, textSize*3, paint);
if(p != null)
{
for(int i=0; i<p.length; i++)
{
canvas.drawText(p[i].name, LoadActivity.ScreenWidth/8, i*20+textSize*5, paint);
}
for(int i=0; i<p.length; i++)
{
canvas.drawText(""+p[i].score, LoadActivity.ScreenWidth/2+LoadActivity.ScreenWidth/8, i*20+textSize*5, paint);
}
}
super.invalidate();
super.onDraw(canvas);
}
}
| {
"content_hash": "4afd5c8389666feb838d7736161c063d",
"timestamp": "",
"source": "github",
"line_count": 133,
"max_line_length": 114,
"avg_line_length": 21.112781954887218,
"alnum_prop": 0.6485042735042735,
"repo_name": "xuanwo11/YoutieApp",
"id": "0acde315b925c2afec799e606ce3304520c427b3",
"size": "2808",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/com/mario/playermsg/HeightScoreView.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "2623623"
}
],
"symlink_target": ""
} |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StackStream.Builtins
{
public static class Stack
{
[Function("dup")]
public static void Dup(Executor exec)
{
var token = exec.DataStack.Pop<IToken>();
exec.DataStack.Push(token.Duplicate());
exec.DataStack.Push(token);
}
[Function("drop")]
public static void Drop(Executor exec)
{
exec.DataStack.Pop<IToken>();
}
[Function("dive")]
public static void Dive(Executor exec)
{
var count = exec.DataStack.Pop<Tokens.Number>().Value;
var code = exec.DataStack.Pop<Tokens.CodeBlock>().Value;
exec.DataStack.Dive += (int) count;
exec.CodeStack.PushRange(new IToken[] { new Tokens.Number(-count), new Tokens.Method(" dive") });
exec.CodeStack.PushRange(code);
}
[Function(" dive")]
public static void InternalDive(Executor exec)
{
var count = exec.DataStack.Pop<Tokens.Number>().Value;
exec.DataStack.Dive += (int) count;
}
[Function("swap")]
public static void Swap(Executor exec)
{
var a = exec.DataStack.Pop<IToken>();
var b = exec.DataStack.Pop<IToken>();
exec.DataStack.Push(a);
exec.DataStack.Push(b);
}
[Function("dig")]
public static void Dig(Executor exec)
{
var count = exec.DataStack.Pop<Tokens.Number>().Value;
var token = exec.DataStack.Dig<IToken>((int) count);
exec.DataStack.Push(token);
}
[Function("bury")]
public static void Bury(Executor exec)
{
var count = exec.DataStack.Pop<Tokens.Number>().Value;
var token = exec.DataStack.Pop<IToken>();
exec.DataStack.Bury(token, (int) count);
}
[Function("stack-size")]
public static void StackCount(Executor exec)
{
exec.DataStack.Push(new Tokens.Number(exec.DataStack.Count));
}
}
}
| {
"content_hash": "68f7499f289fd2a6344a67db6725ed3e",
"timestamp": "",
"source": "github",
"line_count": 77,
"max_line_length": 109,
"avg_line_length": 28.675324675324674,
"alnum_prop": 0.5561594202898551,
"repo_name": "puckipedia/StackStream",
"id": "346d8fcb81cd88a2387a85ab8642d6d1ae78ea96",
"size": "2210",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "StackStream.Lib/Builtins/Stack.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "44448"
}
],
"symlink_target": ""
} |
package org.apache.geronimo.j2ee.jsr88;
import javax.enterprise.deploy.model.DeployableObject;
import javax.enterprise.deploy.shared.ModuleType;
import javax.enterprise.deploy.spi.DeploymentConfiguration;
import org.apache.geronimo.deployment.spi.ModuleConfigurer;
import org.apache.geronimo.gbean.GBeanInfo;
import org.apache.geronimo.gbean.GBeanInfoBuilder;
import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
/**
*
*
* @version $Rev$ $Date$
*/
public class EARConfigurer implements ModuleConfigurer {
public DeploymentConfiguration createConfiguration(DeployableObject deployable) {
if (ModuleType.EAR.equals(deployable.getType())) {
return new EARConfiguration(deployable);
} else {
return null;
}
}
public ModuleType getModuleType() {
return ModuleType.EAR;
}
public static final GBeanInfo GBEAN_INFO;
static {
GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(EARConfigurer.class, NameFactory.DEPLOYMENT_CONFIGURER);
infoFactory.addInterface(ModuleConfigurer.class);
GBEAN_INFO = infoFactory.getBeanInfo();
}
public static GBeanInfo getGBeanInfo() {
return GBEAN_INFO;
}
}
| {
"content_hash": "c1cb160d0427ec02b9a2f66b4249b780",
"timestamp": "",
"source": "github",
"line_count": 42,
"max_line_length": 125,
"avg_line_length": 29.404761904761905,
"alnum_prop": 0.7319838056680162,
"repo_name": "apache/geronimo",
"id": "b960ca11da4b9c0097d91193e5b4ac6bd11604d4",
"size": "2048",
"binary": false,
"copies": "2",
"ref": "refs/heads/trunk",
"path": "plugins/j2ee/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/jsr88/EARConfigurer.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "29627"
},
{
"name": "CSS",
"bytes": "47972"
},
{
"name": "HTML",
"bytes": "838469"
},
{
"name": "Java",
"bytes": "8975734"
},
{
"name": "JavaScript",
"bytes": "906"
},
{
"name": "Shell",
"bytes": "32814"
},
{
"name": "XSLT",
"bytes": "4468"
}
],
"symlink_target": ""
} |
namespace AdiIRCAPIv2.Arguments.ChannelModes
{
using System;
using System.Collections.Generic;
using Enumerators;
using Interfaces;
/// <summary>
/// Arguments class passed to the ChannelModeListBanExempt event
/// </summary>
public class ChannelModeListBanExemptArgs : EventArgs
{
private readonly IChannel channel;
private readonly IUser byUser;
private readonly string banMask;
private readonly bool modeFirst;
private readonly bool modeLast;
private readonly string rawMessage;
private readonly string rawBytes;
private readonly DateTime serverTime;
private readonly IDictionary<string, string> messageTags;
private EatData eatData;
/// <summary>
/// Constructor for arguments class passed to the ChannelModeListBanExempt event
/// </summary>
/// <param name="channel">IChannel</param>
/// <param name="byUser">IUser</param>
/// <param name="banMask">string</param>
/// <param name="modeFirst">bool</param>
/// <param name="modeLast">bool</param>
/// <param name="rawMessage">string</param>
/// <param name="rawBytes">string</param>
/// <param name="serverTime">DateTime</param>
/// <param name="messageTags">IDictionary></param>
/// <param name="eatData">EatData></param>
public ChannelModeListBanExemptArgs(IChannel channel, IUser byUser, string banMask, bool modeFirst, bool modeLast, string rawMessage, string rawBytes, DateTime serverTime, IDictionary<string, string> messageTags, EatData eatData)
{
this.channel = channel;
this.byUser = byUser;
this.banMask = banMask;
this.modeFirst = modeFirst;
this.modeLast = modeLast;
this.rawMessage = rawMessage;
this.rawBytes = rawBytes;
this.serverTime = serverTime;
this.messageTags = messageTags;
this.eatData = eatData;
}
/// <summary>
/// Returns the IChannel where the ban exempt occured
/// </summary>
public IChannel Channel { get { return this.channel; } }
/// <summary>
/// Returns the IUser who performed the mode change
/// </summary>
public IUser ByUser { get { return this.byUser; } }
/// <summary>
/// Returns the nick!ident@host mask for this ban exempt
/// </summary>
public string BanMask { get { return this.banMask; } }
/// <summary>
/// Returns true if this was the first mode change in the channel mode event
/// </summary>
public bool ModeFirst { get { return this.modeFirst; } }
/// <summary>
/// Returns true if this was the last mode change in the channel mode event
/// </summary>
public bool ModeLast { get { return this.modeLast; } }
/// <summary>
/// Returns the raw event message
/// </summary>
public string RawMessage { get { return this.rawMessage; } }
/// <summary>
/// Returns the raw event message without decoding
/// </summary>
public string RawBytes { get { return this.rawBytes; } }
/// <summary>
/// Returns the time the event was recieved
/// </summary>
/// <remarks>
/// If no IRCv3 @time tag was found in the raw line, returns the current time in UTC format
/// </remarks>
public DateTime ServerTime { get { return this.serverTime; } }
/// <summary>
/// Returns a list of IRCv3 tags found in the raw line
/// </summary>
public IDictionary<string, string> MessageTags { get { return this.messageTags; } }
/// <summary>
/// Gets or sets the current event proccessing state
/// </summary>
public EatData EatData { get { return this.eatData; } set { this.eatData = value; } }
}
} | {
"content_hash": "1603ffebaa7fce1a6b78d3db3cfc3d8d",
"timestamp": "",
"source": "github",
"line_count": 104,
"max_line_length": 237,
"avg_line_length": 38.91346153846154,
"alnum_prop": 0.5917963923894243,
"repo_name": "AdiIRC/apiv2",
"id": "950a8d8aa3198171ce7d048afa86836680d381b5",
"size": "4047",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Api/Arguments/ChannelModes/ChannelModeListBanExemptArgs.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "408183"
}
],
"symlink_target": ""
} |
'use strict';
const express = require('express');
const boom = require('boom');
const bcrypt = require('bcrypt-as-promised');
const jwt = require('jsonwebtoken');
const knex = require('../knex');
const { camelizeKeys } = require('humps');
const ev = require('express-validation');
const validations = require('../validations/token.js');
// eslint-disable-next-line new-cap
const router = express.Router();
const authorize = function(req, res, next) {
jwt.verify(req.cookies.token, process.env.JWT_SECRET, (err) => {
res.verify = err === null;
next();
});
};
router.get('/api/token', authorize, (req, res) => {
res.send(res.verify);
});
router.post('/api/token', ev(validations.post), (req, res, next) => {
const { email, password } = req.body;
let user;
knex('users')
.where('email', email)
.first()
.then((row) => {
if (!row) {
throw boom.create(400, 'Bad email or password');
}
user = camelizeKeys(row);
return bcrypt.compare(password, user.hashedPassword);
})
.then(() => {
delete user.hashedPassword;
const expiry = new Date(Date.now() + 1000 * 60 * 60 * 3); // 3 hours
const token = jwt.sign({ userId: user.id }, process.env.JWT_SECRET, {
expiresIn: '3h'
});
res.cookie('token', token, {
httpOnly: true,
expires: expiry,
secure: router.get('env') === 'production'
});
// had just sent user. if things get messed up, that's why.
res.send({user: user, bool: true});
})
.catch(bcrypt.MISMATCH_ERROR, () => {
throw boom.create(400, 'Bad email or password');
})
.catch((err) => {
next(err);
});
});
router.delete('/token', (_req, res, _next) => {
res.clearCookie('token');
res.send(true);
});
module.exports = router;
| {
"content_hash": "ea275c50c59a30d17a62050f0d0b75bb",
"timestamp": "",
"source": "github",
"line_count": 72,
"max_line_length": 75,
"avg_line_length": 25.26388888888889,
"alnum_prop": 0.5865860362836723,
"repo_name": "Stringer86/dev_connect",
"id": "c2e1a76d32cf862999ae6ba49f34f848776aa389",
"size": "1819",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "routes/token.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "11503"
},
{
"name": "HTML",
"bytes": "920"
},
{
"name": "JavaScript",
"bytes": "107575"
}
],
"symlink_target": ""
} |
package simplejdbc.select;
import java.sql.Connection;
import simplejdbc.DataBaseType;
import simplejdbc.exception.SimpleJdbcRuntimeException;
import simplejdbc.util.DataBaseUtil;
/**
* SELECTサポートクラスファクトリー
* @author yasu
*
*/
public class SelectJdbcFactory {
/**
* SINGLETON
*/
private static final SelectJdbcFactory myObject = new SelectJdbcFactory();
/**
* SELECT用JDBCサポートクラスのインスタンス生成メソッド
* @param <E> エンティティ
* @param dbConnection データベース接続オブジェクト
* @param entityClass エンティティクラス
* @return SELECT用JDBCサポートクラスのインスタンス
*/
public static final <E> SelectJdbc<E> create(Connection dbConnection, Class<E> entityClass) {
return myObject.createJdbcInstance(dbConnection, entityClass);
}
/**
* SELECT用JDBCサポートクラスのインスタンス生成メソッド
* @param <E> エンティティ
* @param dbConnection データベース接続オブジェクト
* @param entityClass エンティティクラス
* @return SELECT用JDBCサポートクラスのインスタンス
*/
private <E> SelectJdbc<E> createJdbcInstance(Connection dbConnection, Class<E> entityClass) {
//インスタンスのキャッシングは行わず、とりあえずは毎回インスタンス化
DataBaseType type = DataBaseUtil.getRunningType();
if(type == DataBaseType.Oracle) {
return new SelectJdbcImplOracle<E>(dbConnection, entityClass);
}
else if(type == DataBaseType.Pgsql) {
return new SelectJdbcImplPgsql<E>(dbConnection, entityClass);
}
else if(type == DataBaseType.Mysql) {
return new SelectJdbcImplMysql<E>(dbConnection, entityClass);
}
else {
throw new SimpleJdbcRuntimeException(entityClass, "実行中のDBが識別できません。");
}
}
}
| {
"content_hash": "68b9d0aba11281451a07f1d544239f90",
"timestamp": "",
"source": "github",
"line_count": 56,
"max_line_length": 94,
"avg_line_length": 27.607142857142858,
"alnum_prop": 0.7263906856403622,
"repo_name": "sameyasu/simplejdbc",
"id": "e8ef68702e47f19d1e31e6e0a37d4b27d83755e4",
"size": "1924",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "java/src/simplejdbc/select/SelectJdbcFactory.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "406"
},
{
"name": "HTML",
"bytes": "1032"
},
{
"name": "Java",
"bytes": "498692"
}
],
"symlink_target": ""
} |
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
/*!
* A classic liveness analysis based on dataflow over the AST. Computes,
* for each local variable in a function, whether that variable is live
* at a given point. Program execution points are identified by their
* id.
*
* # Basic idea
*
* The basic model is that each local variable is assigned an index. We
* represent sets of local variables using a vector indexed by this
* index. The value in the vector is either 0, indicating the variable
* is dead, or the id of an expression that uses the variable.
*
* We conceptually walk over the AST in reverse execution order. If we
* find a use of a variable, we add it to the set of live variables. If
* we find an assignment to a variable, we remove it from the set of live
* variables. When we have to merge two flows, we take the union of
* those two flows---if the variable is live on both paths, we simply
* pick one id. In the event of loops, we continue doing this until a
* fixed point is reached.
*
* ## Checking initialization
*
* At the function entry point, all variables must be dead. If this is
* not the case, we can report an error using the id found in the set of
* live variables, which identifies a use of the variable which is not
* dominated by an assignment.
*
* ## Checking moves
*
* After each explicit move, the variable must be dead.
*
* ## Computing last uses
*
* Any use of the variable where the variable is dead afterwards is a
* last use.
*
* # Implementation details
*
* The actual implementation contains two (nested) walks over the AST.
* The outer walk has the job of building up the ir_maps instance for the
* enclosing function. On the way down the tree, it identifies those AST
* nodes and variable IDs that will be needed for the liveness analysis
* and assigns them contiguous IDs. The liveness id for an AST node is
* called a `live_node` (it's a newtype'd uint) and the id for a variable
* is called a `variable` (another newtype'd uint).
*
* On the way back up the tree, as we are about to exit from a function
* declaration we allocate a `liveness` instance. Now that we know
* precisely how many nodes and variables we need, we can allocate all
* the various arrays that we will need to precisely the right size. We then
* perform the actual propagation on the `liveness` instance.
*
* This propagation is encoded in the various `propagate_through_*()`
* methods. It effectively does a reverse walk of the AST; whenever we
* reach a loop node, we iterate until a fixed point is reached.
*
* ## The `Users` struct
*
* At each live node `N`, we track three pieces of information for each
* variable `V` (these are encapsulated in the `Users` struct):
*
* - `reader`: the `LiveNode` ID of some node which will read the value
* that `V` holds on entry to `N`. Formally: a node `M` such
* that there exists a path `P` from `N` to `M` where `P` does not
* write `V`. If the `reader` is `invalid_node()`, then the current
* value will never be read (the variable is dead, essentially).
*
* - `writer`: the `LiveNode` ID of some node which will write the
* variable `V` and which is reachable from `N`. Formally: a node `M`
* such that there exists a path `P` from `N` to `M` and `M` writes
* `V`. If the `writer` is `invalid_node()`, then there is no writer
* of `V` that follows `N`.
*
* - `used`: a boolean value indicating whether `V` is *used*. We
* distinguish a *read* from a *use* in that a *use* is some read that
* is not just used to generate a new value. For example, `x += 1` is
* a read but not a use. This is used to generate better warnings.
*
* ## Special Variables
*
* We generate various special variables for various, well, special purposes.
* These are described in the `specials` struct:
*
* - `exit_ln`: a live node that is generated to represent every 'exit' from
* the function, whether it be by explicit return, fail, or other means.
*
* - `fallthrough_ln`: a live node that represents a fallthrough
*
* - `no_ret_var`: a synthetic variable that is only 'read' from, the
* fallthrough node. This allows us to detect functions where we fail
* to return explicitly.
*/
use middle::lint::{UnusedVariable, DeadAssignment};
use middle::pat_util;
use middle::ty;
use middle::typeck;
use middle::moves;
use std::cast::transmute;
use std::cell::{Cell, RefCell};
use std::hashmap::HashMap;
use std::io;
use std::str;
use std::to_str;
use std::uint;
use std::vec;
use syntax::ast::*;
use syntax::codemap::Span;
use syntax::parse::token::special_idents;
use syntax::print::pprust::{expr_to_str, block_to_str};
use syntax::{visit, ast_util};
use syntax::visit::{Visitor, FnKind};
#[deriving(Eq)]
struct Variable(uint);
#[deriving(Eq)]
struct LiveNode(uint);
impl Variable {
fn get(&self) -> uint { let Variable(v) = *self; v }
}
impl LiveNode {
fn get(&self) -> uint { let LiveNode(v) = *self; v }
}
impl Clone for LiveNode {
fn clone(&self) -> LiveNode {
LiveNode(self.get())
}
}
#[deriving(Eq)]
enum LiveNodeKind {
FreeVarNode(Span),
ExprNode(Span),
VarDefNode(Span),
ExitNode
}
fn live_node_kind_to_str(lnk: LiveNodeKind, cx: ty::ctxt) -> ~str {
let cm = cx.sess.codemap;
match lnk {
FreeVarNode(s) => format!("Free var node [{}]", cm.span_to_str(s)),
ExprNode(s) => format!("Expr node [{}]", cm.span_to_str(s)),
VarDefNode(s) => format!("Var def node [{}]", cm.span_to_str(s)),
ExitNode => ~"Exit node"
}
}
struct LivenessVisitor;
impl Visitor<@IrMaps> for LivenessVisitor {
fn visit_fn(&mut self, fk: &FnKind, fd: &FnDecl, b: &Block, s: Span, n: NodeId, e: @IrMaps) {
visit_fn(self, fk, fd, b, s, n, e);
}
fn visit_local(&mut self, l: &Local, e: @IrMaps) { visit_local(self, l, e); }
fn visit_expr(&mut self, ex: &Expr, e: @IrMaps) { visit_expr(self, ex, e); }
fn visit_arm(&mut self, a: &Arm, e: @IrMaps) { visit_arm(self, a, e); }
}
pub fn check_crate(tcx: ty::ctxt,
method_map: typeck::method_map,
capture_map: moves::CaptureMap,
crate: &Crate) {
let mut visitor = LivenessVisitor;
let initial_maps = @IrMaps(tcx, method_map, capture_map);
visit::walk_crate(&mut visitor, crate, initial_maps);
tcx.sess.abort_if_errors();
}
impl to_str::ToStr for LiveNode {
fn to_str(&self) -> ~str { format!("ln({})", self.get()) }
}
impl to_str::ToStr for Variable {
fn to_str(&self) -> ~str { format!("v({})", self.get()) }
}
// ______________________________________________________________________
// Creating ir_maps
//
// This is the first pass and the one that drives the main
// computation. It walks up and down the IR once. On the way down,
// we count for each function the number of variables as well as
// liveness nodes. A liveness node is basically an expression or
// capture clause that does something of interest: either it has
// interesting control flow or it uses/defines a local variable.
//
// On the way back up, at each function node we create liveness sets
// (we now know precisely how big to make our various vectors and so
// forth) and then do the data-flow propagation to compute the set
// of live variables at each program point.
//
// Finally, we run back over the IR one last time and, using the
// computed liveness, check various safety conditions. For example,
// there must be no live nodes at the definition site for a variable
// unless it has an initializer. Similarly, each non-mutable local
// variable must not be assigned if there is some successor
// assignment. And so forth.
impl LiveNode {
pub fn is_valid(&self) -> bool {
self.get() != uint::max_value
}
}
fn invalid_node() -> LiveNode { LiveNode(uint::max_value) }
struct CaptureInfo {
ln: LiveNode,
is_move: bool,
var_nid: NodeId
}
enum LocalKind {
FromMatch(BindingMode),
FromLetWithInitializer,
FromLetNoInitializer
}
struct LocalInfo {
id: NodeId,
ident: Ident,
is_mutbl: bool,
kind: LocalKind,
}
enum VarKind {
Arg(NodeId, Ident),
Local(LocalInfo),
ImplicitRet
}
struct IrMaps {
tcx: ty::ctxt,
method_map: typeck::method_map,
capture_map: moves::CaptureMap,
num_live_nodes: Cell<uint>,
num_vars: Cell<uint>,
live_node_map: RefCell<HashMap<NodeId, LiveNode>>,
variable_map: RefCell<HashMap<NodeId, Variable>>,
capture_info_map: RefCell<HashMap<NodeId, @~[CaptureInfo]>>,
var_kinds: RefCell<~[VarKind]>,
lnks: RefCell<~[LiveNodeKind]>,
}
fn IrMaps(tcx: ty::ctxt,
method_map: typeck::method_map,
capture_map: moves::CaptureMap)
-> IrMaps {
IrMaps {
tcx: tcx,
method_map: method_map,
capture_map: capture_map,
num_live_nodes: Cell::new(0),
num_vars: Cell::new(0),
live_node_map: RefCell::new(HashMap::new()),
variable_map: RefCell::new(HashMap::new()),
capture_info_map: RefCell::new(HashMap::new()),
var_kinds: RefCell::new(~[]),
lnks: RefCell::new(~[]),
}
}
impl IrMaps {
pub fn add_live_node(&self, lnk: LiveNodeKind) -> LiveNode {
let num_live_nodes = self.num_live_nodes.get();
let ln = LiveNode(num_live_nodes);
let mut lnks = self.lnks.borrow_mut();
lnks.get().push(lnk);
self.num_live_nodes.set(num_live_nodes + 1);
debug!("{} is of kind {}", ln.to_str(),
live_node_kind_to_str(lnk, self.tcx));
ln
}
pub fn add_live_node_for_node(&self, node_id: NodeId, lnk: LiveNodeKind) {
let ln = self.add_live_node(lnk);
let mut live_node_map = self.live_node_map.borrow_mut();
live_node_map.get().insert(node_id, ln);
debug!("{} is node {}", ln.to_str(), node_id);
}
pub fn add_variable(&self, vk: VarKind) -> Variable {
let v = Variable(self.num_vars.get());
{
let mut var_kinds = self.var_kinds.borrow_mut();
var_kinds.get().push(vk);
}
self.num_vars.set(self.num_vars.get() + 1);
match vk {
Local(LocalInfo { id: node_id, .. }) | Arg(node_id, _) => {
let mut variable_map = self.variable_map.borrow_mut();
variable_map.get().insert(node_id, v);
},
ImplicitRet => {}
}
debug!("{} is {:?}", v.to_str(), vk);
v
}
pub fn variable(&self, node_id: NodeId, span: Span) -> Variable {
let variable_map = self.variable_map.borrow();
match variable_map.get().find(&node_id) {
Some(&var) => var,
None => {
self.tcx.sess.span_bug(
span, format!("No variable registered for id {}", node_id));
}
}
}
pub fn variable_name(&self, var: Variable) -> @str {
let var_kinds = self.var_kinds.borrow();
match var_kinds.get()[var.get()] {
Local(LocalInfo { ident: nm, .. }) | Arg(_, nm) => {
self.tcx.sess.str_of(nm)
},
ImplicitRet => @"<implicit-ret>"
}
}
pub fn set_captures(&self, node_id: NodeId, cs: ~[CaptureInfo]) {
let mut capture_info_map = self.capture_info_map.borrow_mut();
capture_info_map.get().insert(node_id, @cs);
}
pub fn captures(&self, expr: &Expr) -> @~[CaptureInfo] {
let capture_info_map = self.capture_info_map.borrow();
match capture_info_map.get().find(&expr.id) {
Some(&caps) => caps,
None => {
self.tcx.sess.span_bug(expr.span, "no registered caps");
}
}
}
pub fn lnk(&self, ln: LiveNode) -> LiveNodeKind {
let lnks = self.lnks.borrow();
lnks.get()[ln.get()]
}
}
impl Visitor<()> for Liveness {
fn visit_fn(&mut self, fk: &FnKind, fd: &FnDecl, b: &Block, s: Span, n: NodeId, _: ()) {
check_fn(self, fk, fd, b, s, n);
}
fn visit_local(&mut self, l: &Local, _: ()) {
check_local(self, l);
}
fn visit_expr(&mut self, ex: &Expr, _: ()) {
check_expr(self, ex);
}
fn visit_arm(&mut self, a: &Arm, _: ()) {
check_arm(self, a);
}
}
fn visit_fn(v: &mut LivenessVisitor,
fk: &FnKind,
decl: &FnDecl,
body: &Block,
sp: Span,
id: NodeId,
this: @IrMaps) {
debug!("visit_fn: id={}", id);
let _i = ::util::common::indenter();
// swap in a new set of IR maps for this function body:
let fn_maps = @IrMaps(this.tcx, this.method_map, this.capture_map);
unsafe {
debug!("creating fn_maps: {}", transmute::<&IrMaps, *IrMaps>(fn_maps));
}
for arg in decl.inputs.iter() {
pat_util::pat_bindings(this.tcx.def_map,
arg.pat,
|_bm, arg_id, _x, path| {
debug!("adding argument {}", arg_id);
let ident = ast_util::path_to_ident(path);
fn_maps.add_variable(Arg(arg_id, ident));
})
};
// Add `this`, whether explicit or implicit.
match *fk {
visit::FkMethod(_, _, method) => {
match method.explicit_self.node {
SelfValue(_) | SelfRegion(..) | SelfBox | SelfUniq(_) => {
fn_maps.add_variable(Arg(method.self_id,
special_idents::self_));
}
SelfStatic => {}
}
}
visit::FkItemFn(..) | visit::FkFnBlock(..) => {}
}
// gather up the various local variables, significant expressions,
// and so forth:
visit::walk_fn(v, fk, decl, body, sp, id, fn_maps);
// Special nodes and variables:
// - exit_ln represents the end of the fn, either by return or fail
// - implicit_ret_var is a pseudo-variable that represents
// an implicit return
let specials = Specials {
exit_ln: fn_maps.add_live_node(ExitNode),
fallthrough_ln: fn_maps.add_live_node(ExitNode),
no_ret_var: fn_maps.add_variable(ImplicitRet)
};
// compute liveness
let mut lsets = Liveness(fn_maps, specials);
let entry_ln = lsets.compute(decl, body);
// check for various error conditions
lsets.visit_block(body, ());
lsets.check_ret(id, sp, fk, entry_ln, body);
lsets.warn_about_unused_args(decl, entry_ln);
}
fn visit_local(v: &mut LivenessVisitor, local: &Local, this: @IrMaps) {
let def_map = this.tcx.def_map;
pat_util::pat_bindings(def_map, local.pat, |bm, p_id, sp, path| {
debug!("adding local variable {}", p_id);
let name = ast_util::path_to_ident(path);
this.add_live_node_for_node(p_id, VarDefNode(sp));
let kind = match local.init {
Some(_) => FromLetWithInitializer,
None => FromLetNoInitializer
};
let mutbl = match bm {
BindByValue(MutMutable) => true,
_ => false
};
this.add_variable(Local(LocalInfo {
id: p_id,
ident: name,
is_mutbl: mutbl,
kind: kind
}));
});
visit::walk_local(v, local, this);
}
fn visit_arm(v: &mut LivenessVisitor, arm: &Arm, this: @IrMaps) {
let def_map = this.tcx.def_map;
for pat in arm.pats.iter() {
pat_util::pat_bindings(def_map, *pat, |bm, p_id, sp, path| {
debug!("adding local variable {} from match with bm {:?}",
p_id, bm);
let name = ast_util::path_to_ident(path);
let mutbl = match bm {
BindByValue(MutMutable) => true,
_ => false
};
this.add_live_node_for_node(p_id, VarDefNode(sp));
this.add_variable(Local(LocalInfo {
id: p_id,
ident: name,
is_mutbl: mutbl,
kind: FromMatch(bm)
}));
})
}
visit::walk_arm(v, arm, this);
}
fn visit_expr(v: &mut LivenessVisitor, expr: &Expr, this: @IrMaps) {
match expr.node {
// live nodes required for uses or definitions of variables:
ExprPath(_) | ExprSelf => {
let def_map = this.tcx.def_map.borrow();
let def = def_map.get().get_copy(&expr.id);
debug!("expr {}: path that leads to {:?}", expr.id, def);
if moves::moved_variable_node_id_from_def(def).is_some() {
this.add_live_node_for_node(expr.id, ExprNode(expr.span));
}
visit::walk_expr(v, expr, this);
}
ExprFnBlock(..) | ExprProc(..) => {
// Interesting control flow (for loops can contain labeled
// breaks or continues)
this.add_live_node_for_node(expr.id, ExprNode(expr.span));
// Make a live_node for each captured variable, with the span
// being the location that the variable is used. This results
// in better error messages than just pointing at the closure
// construction site.
let capture_map = this.capture_map.borrow();
let cvs = capture_map.get().get(&expr.id);
let mut call_caps = ~[];
for cv in cvs.iter() {
match moves::moved_variable_node_id_from_def(cv.def) {
Some(rv) => {
let cv_ln = this.add_live_node(FreeVarNode(cv.span));
let is_move = match cv.mode {
// var must be dead afterwards
moves::CapMove => true,
// var can stil be used
moves::CapCopy | moves::CapRef => false
};
call_caps.push(CaptureInfo {ln: cv_ln,
is_move: is_move,
var_nid: rv});
}
None => {}
}
}
this.set_captures(expr.id, call_caps);
visit::walk_expr(v, expr, this);
}
// live nodes required for interesting control flow:
ExprIf(..) | ExprMatch(..) | ExprWhile(..) | ExprLoop(..) => {
this.add_live_node_for_node(expr.id, ExprNode(expr.span));
visit::walk_expr(v, expr, this);
}
ExprForLoop(..) => fail!("non-desugared expr_for_loop"),
ExprBinary(_, op, _, _) if ast_util::lazy_binop(op) => {
this.add_live_node_for_node(expr.id, ExprNode(expr.span));
visit::walk_expr(v, expr, this);
}
// otherwise, live nodes are not required:
ExprIndex(..) | ExprField(..) | ExprVstore(..) | ExprVec(..) |
ExprCall(..) | ExprMethodCall(..) | ExprTup(..) | ExprLogLevel |
ExprBinary(..) | ExprAddrOf(..) |
ExprDoBody(..) | ExprCast(..) | ExprUnary(..) | ExprBreak(_) |
ExprAgain(_) | ExprLit(_) | ExprRet(..) | ExprBlock(..) |
ExprAssign(..) | ExprAssignOp(..) | ExprMac(..) |
ExprStruct(..) | ExprRepeat(..) | ExprParen(..) |
ExprInlineAsm(..) | ExprBox(..) => {
visit::walk_expr(v, expr, this);
}
}
}
// ______________________________________________________________________
// Computing liveness sets
//
// Actually we compute just a bit more than just liveness, but we use
// the same basic propagation framework in all cases.
#[deriving(Clone)]
struct Users {
reader: LiveNode,
writer: LiveNode,
used: bool
}
fn invalid_users() -> Users {
Users {
reader: invalid_node(),
writer: invalid_node(),
used: false
}
}
struct Specials {
exit_ln: LiveNode,
fallthrough_ln: LiveNode,
no_ret_var: Variable
}
static ACC_READ: uint = 1u;
static ACC_WRITE: uint = 2u;
static ACC_USE: uint = 4u;
type LiveNodeMap = @RefCell<HashMap<NodeId, LiveNode>>;
pub struct Liveness {
tcx: ty::ctxt,
ir: @IrMaps,
s: Specials,
successors: @RefCell<~[LiveNode]>,
users: @RefCell<~[Users]>,
// The list of node IDs for the nested loop scopes
// we're in.
loop_scope: @RefCell<~[NodeId]>,
// mappings from loop node ID to LiveNode
// ("break" label should map to loop node ID,
// it probably doesn't now)
break_ln: LiveNodeMap,
cont_ln: LiveNodeMap
}
fn Liveness(ir: @IrMaps, specials: Specials) -> Liveness {
Liveness {
ir: ir,
tcx: ir.tcx,
s: specials,
successors: @RefCell::new(vec::from_elem(ir.num_live_nodes.get(),
invalid_node())),
users: @RefCell::new(vec::from_elem(ir.num_live_nodes.get() *
ir.num_vars.get(),
invalid_users())),
loop_scope: @RefCell::new(~[]),
break_ln: @RefCell::new(HashMap::new()),
cont_ln: @RefCell::new(HashMap::new()),
}
}
impl Liveness {
pub fn live_node(&self, node_id: NodeId, span: Span) -> LiveNode {
let ir: &IrMaps = self.ir;
let live_node_map = ir.live_node_map.borrow();
match live_node_map.get().find(&node_id) {
Some(&ln) => ln,
None => {
// This must be a mismatch between the ir_map construction
// above and the propagation code below; the two sets of
// code have to agree about which AST nodes are worth
// creating liveness nodes for.
self.tcx.sess.span_bug(
span, format!("No live node registered for node {}",
node_id));
}
}
}
pub fn variable(&self, node_id: NodeId, span: Span) -> Variable {
self.ir.variable(node_id, span)
}
pub fn pat_bindings(&self,
pat: @Pat,
f: |LiveNode, Variable, Span, NodeId|) {
let def_map = self.tcx.def_map;
pat_util::pat_bindings(def_map, pat, |_bm, p_id, sp, _n| {
let ln = self.live_node(p_id, sp);
let var = self.variable(p_id, sp);
f(ln, var, sp, p_id);
})
}
pub fn arm_pats_bindings(&self,
pats: &[@Pat],
f: |LiveNode, Variable, Span, NodeId|) {
// only consider the first pattern; any later patterns must have
// the same bindings, and we also consider the first pattern to be
// the "authoratative" set of ids
if !pats.is_empty() {
self.pat_bindings(pats[0], f)
}
}
pub fn define_bindings_in_pat(&self, pat: @Pat, succ: LiveNode)
-> LiveNode {
self.define_bindings_in_arm_pats([pat], succ)
}
pub fn define_bindings_in_arm_pats(&self, pats: &[@Pat], succ: LiveNode)
-> LiveNode {
let mut succ = succ;
self.arm_pats_bindings(pats, |ln, var, _sp, _id| {
self.init_from_succ(ln, succ);
self.define(ln, var);
succ = ln;
});
succ
}
pub fn idx(&self, ln: LiveNode, var: Variable) -> uint {
ln.get() * self.ir.num_vars.get() + var.get()
}
pub fn live_on_entry(&self, ln: LiveNode, var: Variable)
-> Option<LiveNodeKind> {
assert!(ln.is_valid());
let users = self.users.borrow();
let reader = users.get()[self.idx(ln, var)].reader;
if reader.is_valid() {Some(self.ir.lnk(reader))} else {None}
}
/*
Is this variable live on entry to any of its successor nodes?
*/
pub fn live_on_exit(&self, ln: LiveNode, var: Variable)
-> Option<LiveNodeKind> {
let successor = {
let successors = self.successors.borrow();
successors.get()[ln.get()]
};
self.live_on_entry(successor, var)
}
pub fn used_on_entry(&self, ln: LiveNode, var: Variable) -> bool {
assert!(ln.is_valid());
let users = self.users.borrow();
users.get()[self.idx(ln, var)].used
}
pub fn assigned_on_entry(&self, ln: LiveNode, var: Variable)
-> Option<LiveNodeKind> {
assert!(ln.is_valid());
let users = self.users.borrow();
let writer = users.get()[self.idx(ln, var)].writer;
if writer.is_valid() {Some(self.ir.lnk(writer))} else {None}
}
pub fn assigned_on_exit(&self, ln: LiveNode, var: Variable)
-> Option<LiveNodeKind> {
let successor = {
let successors = self.successors.borrow();
successors.get()[ln.get()]
};
self.assigned_on_entry(successor, var)
}
pub fn indices2(&self,
ln: LiveNode,
succ_ln: LiveNode,
op: |uint, uint|) {
let node_base_idx = self.idx(ln, Variable(0u));
let succ_base_idx = self.idx(succ_ln, Variable(0u));
for var_idx in range(0u, self.ir.num_vars.get()) {
op(node_base_idx + var_idx, succ_base_idx + var_idx);
}
}
pub fn write_vars(&self,
wr: &mut io::Writer,
ln: LiveNode,
test: |uint| -> LiveNode) {
let node_base_idx = self.idx(ln, Variable(0));
for var_idx in range(0u, self.ir.num_vars.get()) {
let idx = node_base_idx + var_idx;
if test(idx).is_valid() {
write!(wr, " {}", Variable(var_idx).to_str());
}
}
}
pub fn find_loop_scope(&self,
opt_label: Option<Name>,
id: NodeId,
sp: Span)
-> NodeId {
match opt_label {
Some(_) => {
// Refers to a labeled loop. Use the results of resolve
// to find with one
let def_map = self.tcx.def_map.borrow();
match def_map.get().find(&id) {
Some(&DefLabel(loop_id)) => loop_id,
_ => self.tcx.sess.span_bug(sp, "Label on break/loop \
doesn't refer to a loop")
}
}
None => {
// Vanilla 'break' or 'loop', so use the enclosing
// loop scope
let loop_scope = self.loop_scope.borrow();
if loop_scope.get().len() == 0 {
self.tcx.sess.span_bug(sp, "break outside loop");
} else {
// FIXME(#5275): this shouldn't have to be a method...
self.last_loop_scope()
}
}
}
}
pub fn last_loop_scope(&self) -> NodeId {
let loop_scope = self.loop_scope.borrow();
*loop_scope.get().last()
}
pub fn ln_str(&self, ln: LiveNode) -> ~str {
let mut wr = io::MemWriter::new();
{
let wr = &mut wr as &mut io::Writer;
{
let lnks = self.ir.lnks.try_borrow();
write!(wr,
"[ln({}) of kind {:?} reads",
ln.get(),
lnks.and_then(|lnks| Some(lnks.get()[ln.get()])));
}
let users = self.users.try_borrow();
match users {
Some(users) => {
self.write_vars(wr, ln, |idx| users.get()[idx].reader);
write!(wr, " writes");
self.write_vars(wr, ln, |idx| users.get()[idx].writer);
}
None => {
write!(wr, " (users borrowed)");
}
}
let successors = self.successors.try_borrow();
match successors {
Some(successors) => {
write!(wr, " precedes {}]", successors.get()[ln.get()].to_str());
}
None => {
write!(wr, " precedes (successors borrowed)]");
}
}
}
str::from_utf8_owned(wr.unwrap())
}
pub fn init_empty(&self, ln: LiveNode, succ_ln: LiveNode) {
{
let mut successors = self.successors.borrow_mut();
successors.get()[ln.get()] = succ_ln;
}
// It is not necessary to initialize the
// values to empty because this is the value
// they have when they are created, and the sets
// only grow during iterations.
//
// self.indices(ln) { |idx|
// self.users[idx] = invalid_users();
// }
}
pub fn init_from_succ(&self, ln: LiveNode, succ_ln: LiveNode) {
// more efficient version of init_empty() / merge_from_succ()
{
let mut successors = self.successors.borrow_mut();
successors.get()[ln.get()] = succ_ln;
}
self.indices2(ln, succ_ln, |idx, succ_idx| {
let mut users = self.users.borrow_mut();
users.get()[idx] = users.get()[succ_idx]
});
debug!("init_from_succ(ln={}, succ={})",
self.ln_str(ln), self.ln_str(succ_ln));
}
pub fn merge_from_succ(&self,
ln: LiveNode,
succ_ln: LiveNode,
first_merge: bool)
-> bool {
if ln == succ_ln { return false; }
let mut changed = false;
self.indices2(ln, succ_ln, |idx, succ_idx| {
let mut users = self.users.borrow_mut();
changed |= copy_if_invalid(users.get()[succ_idx].reader,
&mut users.get()[idx].reader);
changed |= copy_if_invalid(users.get()[succ_idx].writer,
&mut users.get()[idx].writer);
if users.get()[succ_idx].used && !users.get()[idx].used {
users.get()[idx].used = true;
changed = true;
}
});
debug!("merge_from_succ(ln={}, succ={}, first_merge={}, changed={})",
ln.to_str(), self.ln_str(succ_ln), first_merge, changed);
return changed;
fn copy_if_invalid(src: LiveNode, dst: &mut LiveNode) -> bool {
if src.is_valid() {
if !dst.is_valid() {
*dst = src;
return true;
}
}
return false;
}
}
// Indicates that a local variable was *defined*; we know that no
// uses of the variable can precede the definition (resolve checks
// this) so we just clear out all the data.
pub fn define(&self, writer: LiveNode, var: Variable) {
let idx = self.idx(writer, var);
let mut users = self.users.borrow_mut();
users.get()[idx].reader = invalid_node();
users.get()[idx].writer = invalid_node();
debug!("{} defines {} (idx={}): {}", writer.to_str(), var.to_str(),
idx, self.ln_str(writer));
}
// Either read, write, or both depending on the acc bitset
pub fn acc(&self, ln: LiveNode, var: Variable, acc: uint) {
let idx = self.idx(ln, var);
let mut users = self.users.borrow_mut();
let user = &mut users.get()[idx];
if (acc & ACC_WRITE) != 0 {
user.reader = invalid_node();
user.writer = ln;
}
// Important: if we both read/write, must do read second
// or else the write will override.
if (acc & ACC_READ) != 0 {
user.reader = ln;
}
if (acc & ACC_USE) != 0 {
user.used = true;
}
debug!("{} accesses[{:x}] {}: {}",
ln.to_str(), acc, var.to_str(), self.ln_str(ln));
}
// _______________________________________________________________________
pub fn compute(&self, decl: &FnDecl, body: &Block) -> LiveNode {
// if there is a `break` or `again` at the top level, then it's
// effectively a return---this only occurs in `for` loops,
// where the body is really a closure.
debug!("compute: using id for block, {}", block_to_str(body,
self.tcx.sess.intr()));
let entry_ln: LiveNode =
self.with_loop_nodes(body.id, self.s.exit_ln, self.s.exit_ln,
|| { self.propagate_through_fn_block(decl, body) });
// hack to skip the loop unless debug! is enabled:
debug!("^^ liveness computation results for body {} (entry={})",
{
for ln_idx in range(0u, self.ir.num_live_nodes.get()) {
debug!("{}", self.ln_str(LiveNode(ln_idx)));
}
body.id
},
entry_ln.to_str());
entry_ln
}
pub fn propagate_through_fn_block(&self, _: &FnDecl, blk: &Block)
-> LiveNode {
// the fallthrough exit is only for those cases where we do not
// explicitly return:
self.init_from_succ(self.s.fallthrough_ln, self.s.exit_ln);
if blk.expr.is_none() {
self.acc(self.s.fallthrough_ln, self.s.no_ret_var, ACC_READ)
}
self.propagate_through_block(blk, self.s.fallthrough_ln)
}
pub fn propagate_through_block(&self, blk: &Block, succ: LiveNode)
-> LiveNode {
let succ = self.propagate_through_opt_expr(blk.expr, succ);
blk.stmts.rev_iter().fold(succ, |succ, stmt| {
self.propagate_through_stmt(*stmt, succ)
})
}
pub fn propagate_through_stmt(&self, stmt: &Stmt, succ: LiveNode)
-> LiveNode {
match stmt.node {
StmtDecl(decl, _) => {
return self.propagate_through_decl(decl, succ);
}
StmtExpr(expr, _) | StmtSemi(expr, _) => {
return self.propagate_through_expr(expr, succ);
}
StmtMac(..) => {
self.tcx.sess.span_bug(stmt.span, "unexpanded macro");
}
}
}
pub fn propagate_through_decl(&self, decl: &Decl, succ: LiveNode)
-> LiveNode {
match decl.node {
DeclLocal(ref local) => {
self.propagate_through_local(*local, succ)
}
DeclItem(_) => succ,
}
}
pub fn propagate_through_local(&self, local: &Local, succ: LiveNode)
-> LiveNode {
// Note: we mark the variable as defined regardless of whether
// there is an initializer. Initially I had thought to only mark
// the live variable as defined if it was initialized, and then we
// could check for uninit variables just by scanning what is live
// at the start of the function. But that doesn't work so well for
// immutable variables defined in a loop:
// loop { let x; x = 5; }
// because the "assignment" loops back around and generates an error.
//
// So now we just check that variables defined w/o an
// initializer are not live at the point of their
// initialization, which is mildly more complex than checking
// once at the func header but otherwise equivalent.
let succ = self.propagate_through_opt_expr(local.init, succ);
self.define_bindings_in_pat(local.pat, succ)
}
pub fn propagate_through_exprs(&self, exprs: &[@Expr], succ: LiveNode)
-> LiveNode {
exprs.rev_iter().fold(succ, |succ, expr| {
self.propagate_through_expr(*expr, succ)
})
}
pub fn propagate_through_opt_expr(&self,
opt_expr: Option<@Expr>,
succ: LiveNode)
-> LiveNode {
opt_expr.iter().fold(succ, |succ, expr| {
self.propagate_through_expr(*expr, succ)
})
}
pub fn propagate_through_expr(&self, expr: @Expr, succ: LiveNode)
-> LiveNode {
debug!("propagate_through_expr: {}",
expr_to_str(expr, self.tcx.sess.intr()));
match expr.node {
// Interesting cases with control flow or which gen/kill
ExprPath(_) | ExprSelf => {
self.access_path(expr, succ, ACC_READ | ACC_USE)
}
ExprField(e, _, _) => {
self.propagate_through_expr(e, succ)
}
ExprFnBlock(_, blk) | ExprProc(_, blk) => {
debug!("{} is an ExprFnBlock or ExprProc",
expr_to_str(expr, self.tcx.sess.intr()));
/*
The next-node for a break is the successor of the entire
loop. The next-node for a continue is the top of this loop.
*/
self.with_loop_nodes(blk.id, succ,
self.live_node(expr.id, expr.span), || {
// the construction of a closure itself is not important,
// but we have to consider the closed over variables.
let caps = self.ir.captures(expr);
caps.rev_iter().fold(succ, |succ, cap| {
self.init_from_succ(cap.ln, succ);
let var = self.variable(cap.var_nid, expr.span);
self.acc(cap.ln, var, ACC_READ | ACC_USE);
cap.ln
})
})
}
ExprIf(cond, then, els) => {
//
// (cond)
// |
// v
// (expr)
// / \
// | |
// v v
// (then)(els)
// | |
// v v
// ( succ )
//
let else_ln = self.propagate_through_opt_expr(els, succ);
let then_ln = self.propagate_through_block(then, succ);
let ln = self.live_node(expr.id, expr.span);
self.init_from_succ(ln, else_ln);
self.merge_from_succ(ln, then_ln, false);
self.propagate_through_expr(cond, ln)
}
ExprWhile(cond, blk) => {
self.propagate_through_loop(expr, Some(cond), blk, succ)
}
ExprForLoop(..) => fail!("non-desugared expr_for_loop"),
// Note that labels have been resolved, so we don't need to look
// at the label ident
ExprLoop(blk, _) => {
self.propagate_through_loop(expr, None, blk, succ)
}
ExprMatch(e, ref arms) => {
//
// (e)
// |
// v
// (expr)
// / | \
// | | |
// v v v
// (..arms..)
// | | |
// v v v
// ( succ )
//
//
let ln = self.live_node(expr.id, expr.span);
self.init_empty(ln, succ);
let mut first_merge = true;
for arm in arms.iter() {
let body_succ =
self.propagate_through_block(arm.body, succ);
let guard_succ =
self.propagate_through_opt_expr(arm.guard, body_succ);
let arm_succ =
self.define_bindings_in_arm_pats(arm.pats, guard_succ);
self.merge_from_succ(ln, arm_succ, first_merge);
first_merge = false;
};
self.propagate_through_expr(e, ln)
}
ExprRet(o_e) => {
// ignore succ and subst exit_ln:
self.propagate_through_opt_expr(o_e, self.s.exit_ln)
}
ExprBreak(opt_label) => {
// Find which label this break jumps to
let sc = self.find_loop_scope(opt_label, expr.id, expr.span);
// Now that we know the label we're going to,
// look it up in the break loop nodes table
let break_ln = self.break_ln.borrow();
match break_ln.get().find(&sc) {
Some(&b) => b,
None => self.tcx.sess.span_bug(expr.span,
"Break to unknown label")
}
}
ExprAgain(opt_label) => {
// Find which label this expr continues to
let sc = self.find_loop_scope(opt_label, expr.id, expr.span);
// Now that we know the label we're going to,
// look it up in the continue loop nodes table
let cont_ln = self.cont_ln.borrow();
match cont_ln.get().find(&sc) {
Some(&b) => b,
None => self.tcx.sess.span_bug(expr.span,
"Loop to unknown label")
}
}
ExprAssign(l, r) => {
// see comment on lvalues in
// propagate_through_lvalue_components()
let succ = self.write_lvalue(l, succ, ACC_WRITE);
let succ = self.propagate_through_lvalue_components(l, succ);
self.propagate_through_expr(r, succ)
}
ExprAssignOp(_, _, l, r) => {
// see comment on lvalues in
// propagate_through_lvalue_components()
let succ = self.write_lvalue(l, succ, ACC_WRITE|ACC_READ);
let succ = self.propagate_through_expr(r, succ);
self.propagate_through_lvalue_components(l, succ)
}
// Uninteresting cases: just propagate in rev exec order
ExprVstore(expr, _) => {
self.propagate_through_expr(expr, succ)
}
ExprVec(ref exprs, _) => {
self.propagate_through_exprs(*exprs, succ)
}
ExprRepeat(element, count, _) => {
let succ = self.propagate_through_expr(count, succ);
self.propagate_through_expr(element, succ)
}
ExprStruct(_, ref fields, with_expr) => {
let succ = self.propagate_through_opt_expr(with_expr, succ);
fields.rev_iter().fold(succ, |succ, field| {
self.propagate_through_expr(field.expr, succ)
})
}
ExprCall(f, ref args, _) => {
// calling a fn with bot return type means that the fn
// will fail, and hence the successors can be ignored
let t_ret = ty::ty_fn_ret(ty::expr_ty(self.tcx, f));
let succ = if ty::type_is_bot(t_ret) {self.s.exit_ln}
else {succ};
let succ = self.propagate_through_exprs(*args, succ);
self.propagate_through_expr(f, succ)
}
ExprMethodCall(callee_id, rcvr, _, _, ref args, _) => {
// calling a method with bot return type means that the method
// will fail, and hence the successors can be ignored
let t_ret = ty::ty_fn_ret(ty::node_id_to_type(self.tcx, callee_id));
let succ = if ty::type_is_bot(t_ret) {self.s.exit_ln}
else {succ};
let succ = self.propagate_through_exprs(*args, succ);
self.propagate_through_expr(rcvr, succ)
}
ExprTup(ref exprs) => {
self.propagate_through_exprs(*exprs, succ)
}
ExprBinary(_, op, l, r) if ast_util::lazy_binop(op) => {
let r_succ = self.propagate_through_expr(r, succ);
let ln = self.live_node(expr.id, expr.span);
self.init_from_succ(ln, succ);
self.merge_from_succ(ln, r_succ, false);
self.propagate_through_expr(l, ln)
}
ExprIndex(_, l, r) |
ExprBinary(_, _, l, r) |
ExprBox(l, r) => {
self.propagate_through_exprs([l, r], succ)
}
ExprAddrOf(_, e) |
ExprDoBody(e) |
ExprCast(e, _) |
ExprUnary(_, _, e) |
ExprParen(e) => {
self.propagate_through_expr(e, succ)
}
ExprInlineAsm(ref ia) => {
let succ = ia.inputs.rev_iter().fold(succ, |succ, &(_, expr)| {
self.propagate_through_expr(expr, succ)
});
ia.outputs.rev_iter().fold(succ, |succ, &(_, expr)| {
// see comment on lvalues in
// propagate_through_lvalue_components()
let succ = self.write_lvalue(expr, succ, ACC_WRITE);
self.propagate_through_lvalue_components(expr, succ)
})
}
ExprLogLevel |
ExprLit(..) => {
succ
}
ExprBlock(blk) => {
self.propagate_through_block(blk, succ)
}
ExprMac(..) => {
self.tcx.sess.span_bug(expr.span, "unexpanded macro");
}
}
}
pub fn propagate_through_lvalue_components(&self,
expr: @Expr,
succ: LiveNode)
-> LiveNode {
// # Lvalues
//
// In general, the full flow graph structure for an
// assignment/move/etc can be handled in one of two ways,
// depending on whether what is being assigned is a "tracked
// value" or not. A tracked value is basically a local
// variable or argument.
//
// The two kinds of graphs are:
//
// Tracked lvalue Untracked lvalue
// ----------------------++-----------------------
// ||
// | || |
// v || v
// (rvalue) || (rvalue)
// | || |
// v || v
// (write of lvalue) || (lvalue components)
// | || |
// v || v
// (succ) || (succ)
// ||
// ----------------------++-----------------------
//
// I will cover the two cases in turn:
//
// # Tracked lvalues
//
// A tracked lvalue is a local variable/argument `x`. In
// these cases, the link_node where the write occurs is linked
// to node id of `x`. The `write_lvalue()` routine generates
// the contents of this node. There are no subcomponents to
// consider.
//
// # Non-tracked lvalues
//
// These are lvalues like `x[5]` or `x.f`. In that case, we
// basically ignore the value which is written to but generate
// reads for the components---`x` in these two examples. The
// components reads are generated by
// `propagate_through_lvalue_components()` (this fn).
//
// # Illegal lvalues
//
// It is still possible to observe assignments to non-lvalues;
// these errors are detected in the later pass borrowck. We
// just ignore such cases and treat them as reads.
match expr.node {
ExprPath(_) => succ,
ExprField(e, _, _) => self.propagate_through_expr(e, succ),
_ => self.propagate_through_expr(expr, succ)
}
}
// see comment on propagate_through_lvalue()
pub fn write_lvalue(&self, expr: &Expr, succ: LiveNode, acc: uint)
-> LiveNode {
match expr.node {
ExprPath(_) => self.access_path(expr, succ, acc),
// We do not track other lvalues, so just propagate through
// to their subcomponents. Also, it may happen that
// non-lvalues occur here, because those are detected in the
// later pass borrowck.
_ => succ
}
}
pub fn access_path(&self, expr: &Expr, succ: LiveNode, acc: uint)
-> LiveNode {
let def_map = self.tcx.def_map.borrow();
let def = def_map.get().get_copy(&expr.id);
match moves::moved_variable_node_id_from_def(def) {
Some(nid) => {
let ln = self.live_node(expr.id, expr.span);
if acc != 0u {
self.init_from_succ(ln, succ);
let var = self.variable(nid, expr.span);
self.acc(ln, var, acc);
}
ln
}
None => succ
}
}
pub fn propagate_through_loop(&self,
expr: &Expr,
cond: Option<@Expr>,
body: &Block,
succ: LiveNode)
-> LiveNode {
/*
We model control flow like this:
(cond) <--+
| |
v |
+-- (expr) |
| | |
| v |
| (body) ---+
|
|
v
(succ)
*/
// first iteration:
let mut first_merge = true;
let ln = self.live_node(expr.id, expr.span);
self.init_empty(ln, succ);
if cond.is_some() {
// if there is a condition, then it's possible we bypass
// the body altogether. otherwise, the only way is via a
// break in the loop body.
self.merge_from_succ(ln, succ, first_merge);
first_merge = false;
}
debug!("propagate_through_loop: using id for loop body {} {}",
expr.id, block_to_str(body, self.tcx.sess.intr()));
let cond_ln = self.propagate_through_opt_expr(cond, ln);
let body_ln = self.with_loop_nodes(expr.id, succ, ln, || {
self.propagate_through_block(body, cond_ln)
});
// repeat until fixed point is reached:
while self.merge_from_succ(ln, body_ln, first_merge) {
first_merge = false;
assert!(cond_ln == self.propagate_through_opt_expr(cond,
ln));
assert!(body_ln == self.with_loop_nodes(expr.id, succ, ln,
|| {
self.propagate_through_block(body, cond_ln)
}));
}
cond_ln
}
pub fn with_loop_nodes<R>(
&self,
loop_node_id: NodeId,
break_ln: LiveNode,
cont_ln: LiveNode,
f: || -> R)
-> R {
debug!("with_loop_nodes: {} {}", loop_node_id, break_ln.get());
{
let mut loop_scope = self.loop_scope.borrow_mut();
loop_scope.get().push(loop_node_id);
}
{
let mut this_break_ln = self.break_ln.borrow_mut();
let mut this_cont_ln = self.cont_ln.borrow_mut();
this_break_ln.get().insert(loop_node_id, break_ln);
this_cont_ln.get().insert(loop_node_id, cont_ln);
}
let r = f();
{
let mut loop_scope = self.loop_scope.borrow_mut();
loop_scope.get().pop();
}
r
}
}
// _______________________________________________________________________
// Checking for error conditions
fn check_local(this: &mut Liveness, local: &Local) {
match local.init {
Some(_) => {
this.warn_about_unused_or_dead_vars_in_pat(local.pat);
}
None => {
// No initializer: the variable might be unused; if not, it
// should not be live at this point.
debug!("check_local() with no initializer");
this.pat_bindings(local.pat, |ln, var, sp, id| {
if !this.warn_about_unused(sp, id, ln, var) {
match this.live_on_exit(ln, var) {
None => { /* not live: good */ }
Some(lnk) => {
this.report_illegal_read(
local.span, lnk, var,
PossiblyUninitializedVariable);
}
}
}
})
}
}
visit::walk_local(this, local, ());
}
fn check_arm(this: &mut Liveness, arm: &Arm) {
this.arm_pats_bindings(arm.pats, |ln, var, sp, id| {
this.warn_about_unused(sp, id, ln, var);
});
visit::walk_arm(this, arm, ());
}
fn check_expr(this: &mut Liveness, expr: &Expr) {
match expr.node {
ExprAssign(l, r) => {
this.check_lvalue(l);
this.visit_expr(r, ());
visit::walk_expr(this, expr, ());
}
ExprAssignOp(_, _, l, _) => {
this.check_lvalue(l);
visit::walk_expr(this, expr, ());
}
ExprInlineAsm(ref ia) => {
for &(_, input) in ia.inputs.iter() {
this.visit_expr(input, ());
}
// Output operands must be lvalues
for &(_, out) in ia.outputs.iter() {
this.check_lvalue(out);
this.visit_expr(out, ());
}
visit::walk_expr(this, expr, ());
}
// no correctness conditions related to liveness
ExprCall(..) | ExprMethodCall(..) | ExprIf(..) | ExprMatch(..) |
ExprWhile(..) | ExprLoop(..) | ExprIndex(..) | ExprField(..) |
ExprVstore(..) | ExprVec(..) | ExprTup(..) | ExprLogLevel |
ExprBinary(..) | ExprDoBody(..) |
ExprCast(..) | ExprUnary(..) | ExprRet(..) | ExprBreak(..) |
ExprAgain(..) | ExprLit(_) | ExprBlock(..) |
ExprMac(..) | ExprAddrOf(..) | ExprStruct(..) | ExprRepeat(..) |
ExprParen(..) | ExprFnBlock(..) | ExprProc(..) | ExprPath(..) |
ExprSelf(..) | ExprBox(..) => {
visit::walk_expr(this, expr, ());
}
ExprForLoop(..) => fail!("non-desugared expr_for_loop")
}
}
fn check_fn(_v: &Liveness,
_fk: &FnKind,
_decl: &FnDecl,
_body: &Block,
_sp: Span,
_id: NodeId) {
// do not check contents of nested fns
}
enum ReadKind {
PossiblyUninitializedVariable,
PossiblyUninitializedField,
MovedValue,
PartiallyMovedValue
}
impl Liveness {
pub fn check_ret(&self,
id: NodeId,
sp: Span,
_fk: &FnKind,
entry_ln: LiveNode,
body: &Block) {
if self.live_on_entry(entry_ln, self.s.no_ret_var).is_some() {
// if no_ret_var is live, then we fall off the end of the
// function without any kind of return expression:
let t_ret = ty::ty_fn_ret(ty::node_id_to_type(self.tcx, id));
if ty::type_is_nil(t_ret) {
// for nil return types, it is ok to not return a value expl.
} else if ty::type_is_bot(t_ret) {
// for bot return types, not ok. Function should fail.
self.tcx.sess.span_err(
sp, "some control paths may return");
} else {
let ends_with_stmt = match body.expr {
None if body.stmts.len() > 0 =>
match body.stmts.last().node {
StmtSemi(e, _) => {
let t_stmt = ty::expr_ty(self.tcx, e);
ty::get(t_stmt).sty == ty::get(t_ret).sty
},
_ => false
},
_ => false
};
if ends_with_stmt {
let last_stmt = body.stmts.last();
let span_semicolon = Span {
lo: last_stmt.span.hi,
hi: last_stmt.span.hi,
expn_info: last_stmt.span.expn_info
};
self.tcx.sess.span_note(
span_semicolon, "consider removing this semicolon:");
}
self.tcx.sess.span_err(
sp, "not all control paths return a value");
}
}
}
pub fn check_lvalue(&mut self, expr: @Expr) {
match expr.node {
ExprPath(_) => {
let def_map = self.tcx.def_map.borrow();
match def_map.get().get_copy(&expr.id) {
DefLocal(nid, _) => {
// Assignment to an immutable variable or argument: only legal
// if there is no later assignment. If this local is actually
// mutable, then check for a reassignment to flag the mutability
// as being used.
let ln = self.live_node(expr.id, expr.span);
let var = self.variable(nid, expr.span);
self.warn_about_dead_assign(expr.span, expr.id, ln, var);
}
def => {
match moves::moved_variable_node_id_from_def(def) {
Some(nid) => {
let ln = self.live_node(expr.id, expr.span);
let var = self.variable(nid, expr.span);
self.warn_about_dead_assign(expr.span, expr.id, ln, var);
}
None => {}
}
}
}
}
_ => {
// For other kinds of lvalues, no checks are required,
// and any embedded expressions are actually rvalues
visit::walk_expr(self, expr, ());
}
}
}
pub fn report_illegal_read(&self,
chk_span: Span,
lnk: LiveNodeKind,
var: Variable,
rk: ReadKind) {
let msg = match rk {
PossiblyUninitializedVariable => "possibly uninitialized \
variable",
PossiblyUninitializedField => "possibly uninitialized field",
MovedValue => "moved value",
PartiallyMovedValue => "partially moved value"
};
let name = self.ir.variable_name(var);
match lnk {
FreeVarNode(span) => {
self.tcx.sess.span_err(
span,
format!("capture of {}: `{}`", msg, name));
}
ExprNode(span) => {
self.tcx.sess.span_err(
span,
format!("use of {}: `{}`", msg, name));
}
ExitNode | VarDefNode(_) => {
self.tcx.sess.span_bug(
chk_span,
format!("illegal reader: {:?}", lnk));
}
}
}
pub fn should_warn(&self, var: Variable) -> Option<@str> {
let name = self.ir.variable_name(var);
if name.len() == 0 || name[0] == ('_' as u8) { None } else { Some(name) }
}
pub fn warn_about_unused_args(&self, decl: &FnDecl, entry_ln: LiveNode) {
for arg in decl.inputs.iter() {
pat_util::pat_bindings(self.tcx.def_map,
arg.pat,
|_bm, p_id, sp, _n| {
let var = self.variable(p_id, sp);
self.warn_about_unused(sp, p_id, entry_ln, var);
})
}
}
pub fn warn_about_unused_or_dead_vars_in_pat(&self, pat: @Pat) {
self.pat_bindings(pat, |ln, var, sp, id| {
if !self.warn_about_unused(sp, id, ln, var) {
self.warn_about_dead_assign(sp, id, ln, var);
}
})
}
pub fn warn_about_unused(&self,
sp: Span,
id: NodeId,
ln: LiveNode,
var: Variable)
-> bool {
if !self.used_on_entry(ln, var) {
let r = self.should_warn(var);
for name in r.iter() {
// annoying: for parameters in funcs like `fn(x: int)
// {ret}`, there is only one node, so asking about
// assigned_on_exit() is not meaningful.
let is_assigned = if ln == self.s.exit_ln {
false
} else {
self.assigned_on_exit(ln, var).is_some()
};
if is_assigned {
self.tcx.sess.add_lint(UnusedVariable, id, sp,
format!("variable `{}` is assigned to, \
but never used", *name));
} else {
self.tcx.sess.add_lint(UnusedVariable, id, sp,
format!("unused variable: `{}`", *name));
}
}
true
} else {
false
}
}
pub fn warn_about_dead_assign(&self,
sp: Span,
id: NodeId,
ln: LiveNode,
var: Variable) {
if self.live_on_exit(ln, var).is_none() {
let r = self.should_warn(var);
for name in r.iter() {
self.tcx.sess.add_lint(DeadAssignment, id, sp,
format!("value assigned to `{}` is never read", *name));
}
}
}
}
| {
"content_hash": "0801d09e67e749315d12ba287499d100",
"timestamp": "",
"source": "github",
"line_count": 1759,
"max_line_length": 97,
"avg_line_length": 35.236498010233085,
"alnum_prop": 0.49894322453655154,
"repo_name": "mitsuhiko/rust",
"id": "e55229b37eba81053c3956e17d84aefeb7052828",
"size": "61981",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/librustc/middle/liveness.rs",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Assembly",
"bytes": "20065"
},
{
"name": "C",
"bytes": "519025"
},
{
"name": "C++",
"bytes": "33405"
},
{
"name": "CSS",
"bytes": "13048"
},
{
"name": "Emacs Lisp",
"bytes": "34638"
},
{
"name": "JavaScript",
"bytes": "44994"
},
{
"name": "Perl",
"bytes": "619"
},
{
"name": "Puppet",
"bytes": "5358"
},
{
"name": "Python",
"bytes": "48492"
},
{
"name": "Rust",
"bytes": "11946147"
},
{
"name": "Shell",
"bytes": "2633"
},
{
"name": "VimL",
"bytes": "22083"
}
],
"symlink_target": ""
} |
require 'test_helper'
class AdministratorsControllerTest < ActionController::TestCase
setup do
@administrator = administrators(:one)
end
test "should get index" do
get :index
assert_response :success
assert_not_nil assigns(:administrators)
end
test "should get new" do
get :new
assert_response :success
end
test "should create administrator" do
assert_difference('Administrator.count') do
post :create, administrator: { }
end
assert_redirected_to administrator_path(assigns(:administrator))
end
test "should show administrator" do
get :show, id: @administrator
assert_response :success
end
test "should get edit" do
get :edit, id: @administrator
assert_response :success
end
test "should update administrator" do
patch :update, id: @administrator, administrator: { }
assert_redirected_to administrator_path(assigns(:administrator))
end
test "should destroy administrator" do
assert_difference('Administrator.count', -1) do
delete :destroy, id: @administrator
end
assert_redirected_to administrators_path
end
end
| {
"content_hash": "1cd0609220152580a588cb650a7c7643",
"timestamp": "",
"source": "github",
"line_count": 49,
"max_line_length": 68,
"avg_line_length": 23.26530612244898,
"alnum_prop": 0.7087719298245614,
"repo_name": "trekmedics/Beacon",
"id": "3554016566ec8dd4735cd163c0f0dbce21116dc7",
"size": "1140",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "test/controllers/administrators_controller_test.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "105637"
},
{
"name": "CoffeeScript",
"bytes": "9867"
},
{
"name": "HTML",
"bytes": "1409259"
},
{
"name": "JavaScript",
"bytes": "4123043"
},
{
"name": "Ruby",
"bytes": "487338"
},
{
"name": "Shell",
"bytes": "1490"
}
],
"symlink_target": ""
} |
import { Injectable } from '@angular/core'
import { Action } from '@ngrx/store'
import { Store } from '@ngrx/store'
@Injectable()
export class PizzaActions {
constructor(private store: Store<any>) {}
static CREATE_NEW_PIZZA = 'CREATE_NEW_PIZZA'
createNewPizza() {
this.store.dispatch({ type: PizzaActions.CREATE_NEW_PIZZA })
}
static UPDATE_PIZZA = 'UPDATE_PIZZA'
updatePizza(payload: Object) {
this.store.dispatch({ type: PizzaActions.UPDATE_PIZZA, payload })
}
static NEXT_STEP = 'NEXT_STEP'
nextStep() {
this.store.dispatch({ type: PizzaActions.NEXT_STEP })
}
static PREVIOUS_STEP = 'PREVIOUS_STEP'
previousStep() {
this.store.dispatch({ type: PizzaActions.PREVIOUS_STEP })
}
}
| {
"content_hash": "0b7982b934ea0f0eff801c8c7ae2b599",
"timestamp": "",
"source": "github",
"line_count": 28,
"max_line_length": 69,
"avg_line_length": 26,
"alnum_prop": 0.6868131868131868,
"repo_name": "carlospaelinck/Angular2-Demo",
"id": "186d9e06fdc9e463d23fd544b613d9ed2b6ff361",
"size": "728",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "app/actions/pizza.ts",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "2499"
},
{
"name": "HTML",
"bytes": "478"
},
{
"name": "JavaScript",
"bytes": "2798"
},
{
"name": "TypeScript",
"bytes": "4062"
}
],
"symlink_target": ""
} |
<!--
-->
<!-- ko if: isActive() || hasActiveOptions() -->
<div class="cart-gift-item">
<div class="gift-item-block block"
data-collapsible="true"
data-bind="css: {_active: formBlockVisibility() || resultBlockVisibility()}">
<div class="title" data-role="title" data-bind="click: $data.toggleFormBlockVisibility.bind($data)">
<span data-bind="i18n: 'Gift options'"></span>
</div>
<div class="content" data-role="content" data-bind="visible: formBlockVisibility() || resultBlockVisibility()">
<!-- ko ifnot: resultBlockVisibility() -->
<div class="gift-options">
<!-- ko foreach: getRegion('additionalOptions') -->
<!-- ko template: getTemplate() --><!-- /ko -->
<!-- /ko -->
<!-- ko template: formTemplate --><!--/ko-->
</div>
<!-- /ko -->
<div class="gift-summary">
<!-- ko if: resultBlockVisibility() -->
<!-- ko foreach: getRegion('additionalOptions') -->
<!--ko template: appliedTemplate --><!-- /ko -->
<!-- /ko -->
<!-- ko if: getObservable('message') -->
<div class="gift-message-summary">
<span data-bind="i18n: 'Message:'"></span>
<!-- ko text: getObservable('message') --><!-- /ko -->
</div>
<!-- /ko -->
<div class="actions-toolbar">
<div class="secondary">
<button type="submit"
class="action action-edit"
data-bind="attr: {title: $t('Edit')}, click: $data.editOptions.bind($data)">
<span data-bind="i18n: 'Edit'"></span>
</button>
<button class="action action-delete"
data-bind="attr: {title: $t('Delete')}, click: $data.deleteOptions.bind($data)">
<span data-bind="i18n: 'Delete'"></span>
</button>
</div>
</div>
<!-- /ko -->
</div>
</div>
</div>
</div>
<!-- /ko -->
| {
"content_hash": "cd06599426cdfab7cd7c79a899ee6f4e",
"timestamp": "",
"source": "github",
"line_count": 51,
"max_line_length": 119,
"avg_line_length": 47.15686274509804,
"alnum_prop": 0.4124740124740125,
"repo_name": "tarikgwa/test",
"id": "089e3399be3115e2840ebacd4749085a72a5bb86",
"size": "2503",
"binary": false,
"copies": "4",
"ref": "refs/heads/master",
"path": "html/app/code/Magento/GiftMessage/view/frontend/web/template/gift-message.html",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ApacheConf",
"bytes": "26588"
},
{
"name": "CSS",
"bytes": "4874492"
},
{
"name": "HTML",
"bytes": "8635167"
},
{
"name": "JavaScript",
"bytes": "6810903"
},
{
"name": "PHP",
"bytes": "55645559"
},
{
"name": "Perl",
"bytes": "7938"
},
{
"name": "Shell",
"bytes": "4505"
},
{
"name": "XSLT",
"bytes": "19889"
}
],
"symlink_target": ""
} |
using System;
namespace Zergatul.Network.Vpn.Sstp
{
internal class DataPacket
{
}
} | {
"content_hash": "2241e2ce274e92e8408c45c8c8c46d16",
"timestamp": "",
"source": "github",
"line_count": 8,
"max_line_length": 35,
"avg_line_length": 12.125,
"alnum_prop": 0.6701030927835051,
"repo_name": "Zergatul/ZergatulLib",
"id": "c8f314ef476e1da173c996808ebc4c03bbe33985",
"size": "99",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Zergatul/Network/Vpn/Sstp/DataPacket.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "4715963"
},
{
"name": "PowerShell",
"bytes": "5379"
}
],
"symlink_target": ""
} |
using System;
using Lucene.Net.Index;
using Lucene.Net.Documents;
using Lucene.Net.Analysis.Standard;
using Lucene.Net.Store;
using log4net;
using Cuyahoga.Core.Util;
using Cuyahoga.Core.Domain;
namespace Cuyahoga.Core.Search
{
/// <summary>
/// The IndexBuilder class takes care of maintaining the fulltext index.
/// </summary>
public class IndexBuilder : IDisposable
{
private static readonly ILog log = LogManager.GetLogger(typeof(IndexBuilder));
private Directory _indexDirectory;
private IndexWriter _indexWriter;
private bool _isClosed = false;
private bool _rebuildIndex;
/// <summary>
/// Default constructor.
/// </summary>
/// <param name="physicalIndexDir">Location of the index files.</param>
/// <param name="rebuildIndex">Flag to indicate if the index should be rebuilt.
/// NOTE: you can not update or delete content when rebuilding the index.
/// </param>
public IndexBuilder(string physicalIndexDir, bool rebuildIndex)
{
this._indexDirectory = FSDirectory.GetDirectory(physicalIndexDir, false);
this._rebuildIndex = rebuildIndex;
InitIndexWriter();
log.Info("IndexBuilder created.");
}
/// <summary>
/// Add content to be indexed.
/// </summary>
/// <param name="searchContent"></param>
public void AddContent(SearchContent searchContent)
{
if (this._indexWriter == null)
{
InitIndexWriter();
}
this._indexWriter.AddDocument(BuildDocumentFromSearchContent(searchContent));
}
/// <summary>
/// Update existing content in the search index.
/// </summary>
/// <param name="searchContent"></param>
public void UpdateContent(SearchContent searchContent)
{
if (this._rebuildIndex)
{
throw new InvalidOperationException("Cannot update documents when rebuilding the index.");
}
else
{
// First delete the old content
DeleteContent(searchContent);
// Now add the content again
AddContent(searchContent);
}
}
/// <summary>
/// Delete existing content from the search index.
/// </summary>
/// <param name="searchContent"></param>
public void DeleteContent(SearchContent searchContent)
{
if (this._rebuildIndex)
{
throw new InvalidOperationException("Cannot delete documents when rebuilding the index.");
}
else
{
this._indexWriter.Close();
this._indexWriter = null;
// The path uniquely identifies a document in the index.
Term term = new Term("path", searchContent.Path);
IndexReader rdr = IndexReader.Open(this._indexDirectory);
rdr.Delete(term);
rdr.Close();
}
}
public void UpdateContentFromModule(ModuleBase module)
{
ISearchable searchableModule = module as ISearchable;
if (searchableModule != null)
{
SearchContent[] searchContentList = searchableModule.GetAllSearchableContent();
foreach (SearchContent searchContent in searchContentList)
{
UpdateContent(searchContent);
}
}
}
/// <summary>
/// Close the IndexWriter (saves the index).
/// </summary>
public void Close()
{
if (! this._isClosed && this._indexWriter != null)
{
this._indexWriter.Optimize();
this._indexWriter.Close();
this._isClosed = true;
log.Info("New or updated search index written to disk.");
}
}
private void InitIndexWriter()
{
if (! IndexReader.IndexExists(this._indexDirectory) || this._rebuildIndex)
{
this._indexWriter = new IndexWriter(this._indexDirectory, new StandardAnalyzer(), true);
}
else
{
this._indexWriter = new IndexWriter(this._indexDirectory, new StandardAnalyzer(), false);
}
}
private Document BuildDocumentFromSearchContent(SearchContent searchContent)
{
Document doc = new Document();
doc.Add(Field.Text("title", searchContent.Title));
doc.Add(Field.Text("summary", searchContent.Summary));
doc.Add(Field.UnStored("contents", searchContent.Contents));
doc.Add(Field.Text("author", searchContent.Author));
doc.Add(Field.Keyword("moduletype", searchContent.ModuleType));
doc.Add(Field.Keyword("path", searchContent.Path));
doc.Add(Field.Keyword("category", searchContent.Category));
doc.Add(Field.Keyword("site", searchContent.Site));
doc.Add(Field.Keyword("datecreated", searchContent.DateCreated.ToString("u")));
doc.Add(Field.Keyword("datemodified", searchContent.DateModified.ToString("u")));
doc.Add(Field.UnIndexed("sectionid", searchContent.SectionId.ToString()));
return doc;
}
#region IDisposable Members
public void Dispose()
{
Close();
}
#endregion
}
}
| {
"content_hash": "b586199bb9903d29c996753b23077570",
"timestamp": "",
"source": "github",
"line_count": 164,
"max_line_length": 94,
"avg_line_length": 28.774390243902438,
"alnum_prop": 0.6730239457512185,
"repo_name": "cuyahogaproject/cuyahoga-1",
"id": "07901328540b15dd7bb5520de4fce8ce47d1341e",
"size": "4719",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Core/Search/IndexBuilder.cs",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "ASP",
"bytes": "196611"
},
{
"name": "C#",
"bytes": "941492"
},
{
"name": "CSS",
"bytes": "91926"
},
{
"name": "JavaScript",
"bytes": "300125"
},
{
"name": "SQL",
"bytes": "306384"
}
],
"symlink_target": ""
} |
package nz.ac.lconz.irr.dspace.app.irrstats;
import org.dspace.core.Context;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.sql.SQLException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.Locale;
/**
* @author Andrea Schweer schweer@waikato.ac.nz for the LCoNZ Institutional Research Repositories
*/
public class IRRStatsCreator {
public static void main(String[] args) throws SQLException, IOException {
if (args.length < 3) {
System.out.println("Usage: IRRStatsCreator fromDate toDate filename");
System.out.println(" Dates given as yyyy-MM-dd; start date is inclusive but end date is exclusive (eg for all of 2012, specify 2012-01-01 2013-01-01");
return;
}
Date startDate;
Date endDate;
try {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
dateFormat.setTimeZone(Calendar.getInstance().getTimeZone());
startDate = dateFormat.parse(args[0]);
endDate = dateFormat.parse(args[1]);
System.out.println("Using start date " + dateFormat.format(startDate));
System.out.println("Using end date " + dateFormat.format(endDate));
} catch (ParseException e) {
e.printStackTrace(System.err);
return;
}
Context context = null;
try {
context = new Context();
context.turnOffAuthorisationSystem();
IRRStatsController controller = new IRRStatsController();
controller.gatherData(context, startDate, endDate);
BufferedWriter writer = new BufferedWriter(new FileWriter(args[2]));
for (Metric metric : Metric.values()) {
writer.write(metric.name());
writer.write(",");
writer.write(Long.toString(controller.getValueFor(metric)));
writer.write("\n");
}
writer.flush();
writer.close();
} catch (StatsDataException e) {
e.printStackTrace(System.err);
} finally {
if (context != null && context.isValid()) {
context.abort();
}
}
}
}
| {
"content_hash": "bfc301905bb63711ec97abaee82d2733",
"timestamp": "",
"source": "github",
"line_count": 66,
"max_line_length": 155,
"avg_line_length": 30.257575757575758,
"alnum_prop": 0.7175763645468203,
"repo_name": "lconz-irr/CAUL-IRR-Stats",
"id": "a270b60dfaac13cc5e5b52307b07cb277b43b80e",
"size": "1997",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/main/java/nz/ac/lconz/irr/dspace/app/irrstats/IRRStatsCreator.java",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "Java",
"bytes": "9627"
}
],
"symlink_target": ""
} |
[](https://packagist.org/packages/chrisullyott/human-name-parser)
[](https://packagist.org/packages/chrisullyott/human-name-parser)
A human name parser written in PHP.
Based on Josh Fraser's [PHP-Name-Parser](https://github.com/joshfraser/PHP-Name-Parser). I attempted to rewrite the library to be more easily understandable (at least to myself). Nearly all the original features are maintained.
The algorithm first sanitizes a name string, and then breaks it into smaller pieces using a library of professional titles and suffixes.
### Installation
Include in your project, or, install with [Composer](https://getcomposer.org/):
```bash
$ composer require chrisullyott/human-name-parser
```
### Parsing a name
```php
use ChrisUllyott\HumanNameParser;
$parser = new HumanNameParser('Dr. martin luther king jr');
print_r($parser->parse());
```
```
Array
(
[full] => Dr. Martin Luther King Jr.
[salutation] => Dr.
[first] => Martin
[middle] => Luther
[last] => King
[suffix] => Jr.
)
```
### Methods
| Name | Sample output |
|---|---|
| getFullName() | _Dr. Martin Luther King Jr._ |
| getSalutation() | _Dr._ |
| getFirstName() | _Martin_ |
| getMiddleName() | _Luther_ |
| getLastName() | _King_ |
| getSuffix() | _Jr._ |
| {
"content_hash": "e8d29371428157589297d6dd672ba16e",
"timestamp": "",
"source": "github",
"line_count": 48,
"max_line_length": 227,
"avg_line_length": 30.291666666666668,
"alnum_prop": 0.68707015130674,
"repo_name": "chrisullyott/human-name-parser",
"id": "b71d4083d48a4444b987f1b3814fa3a4067fb3ca",
"size": "1475",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "README.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "PHP",
"bytes": "22362"
}
],
"symlink_target": ""
} |
<div class="row">
<div class="col-md-12">
<br>
<br>
<form class="form-signin center-block">
<h4 class="form-signin-heading">Por favor, introduzca sus
datos</h4>
<label for="inputEmail" class="sr-only">Usuario</label>
<input type="email" id="inputEmail" class="form-control" placeholder="Usuario">
<label for="inputPassword" class="sr-only">Contraseña</label>
<input type="password" id="inputPassword" class="form-control" placeholder="Contraseña">
<a href="#/application" class="btn btn-lg btn-primary btn-block" type="submit">Entrar</a>
</form>
</div>
</div>
| {
"content_hash": "955eeba249f0054ad23c089270717c77",
"timestamp": "",
"source": "github",
"line_count": 15,
"max_line_length": 101,
"avg_line_length": 46.2,
"alnum_prop": 0.5815295815295816,
"repo_name": "andgau/client",
"id": "50258b5fbcdeb889bf63173e4e16cc22100e5955",
"size": "695",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "basico/src/main/resources/webapp/pages/login.html",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "2409"
},
{
"name": "HTML",
"bytes": "39861"
},
{
"name": "Java",
"bytes": "8453"
},
{
"name": "JavaScript",
"bytes": "7425"
}
],
"symlink_target": ""
} |
package toml
import (
gs "github.com/rafrombrc/gospec/src/gospec"
"time"
)
func CheckTypeSpec(c gs.Context) {
var err error
var tomlBlob = `
ranking = ["Springsteen", "J Geils"]
[bands.Springsteen]
type = "ignore_this"
started = 1973
albums = ["Greetings", "WIESS", "Born to Run", "Darkness"]
not_albums = ["Greetings", "WIESS", "Born to Run", "Darkness"]
[bands.J Geils]
started = 1970
albums = ["The J. Geils Band", "Full House", "Blow Your Face Out"]
`
type classics struct {
Ranking []string
Bands map[string]Primitive
}
c.Specify("check mapping", func() {
// Do the initial decode. Reflection is delayed on Primitive values.
var music classics
var md MetaData
md, err = Decode(tomlBlob, &music)
c.Assume(err, gs.IsNil)
empty_ignore := map[string]interface{}{}
err = CheckType(md.mapping, music, empty_ignore)
c.Assume(err, gs.IsNil)
})
}
func DecodeStrictSpec(c gs.Context) {
// This blob when used with an empty_ignore blob
var testSimple = `
age = 250
andrew = "gallant"
kait = "brady"
now = 1987-07-05T05:45:00Z
yesOrNo = true
pi = 3.14
colors = [
["red", "green", "blue"],
["cyan", "magenta", "yellow", "black"],
]
[Annoying.Cats]
plato = "smelly"
cauchy = "stupido"
`
var tomlBlob = `
# Some comments.
[alpha]
ip = "10.0.0.1"
[alpha.config]
Ports = [8001, 8002]
Location = "Toronto"
Created = 1987-07-05T05:45:00Z
`
type serverConfig struct {
Ports []int
Location string
Created time.Time
}
type server struct {
IPAddress string `toml:"ip"`
Config serverConfig `toml:"config"`
}
type kitties struct {
Plato string
Cauchy string
}
type simple struct {
Age int
Colors [][]string
Pi float64
YesOrNo bool
Now time.Time
Andrew string
Kait string
Annoying map[string]kitties
}
type servers map[string]server
var config servers
var val simple
var err error
empty_ignore := map[string]interface{}{}
_, err = DecodeStrict(tomlBlob, &config, empty_ignore)
c.Assume(err, gs.IsNil)
_, err = DecodeStrict(testSimple, &val, empty_ignore)
c.Assume(err, gs.IsNil)
_, err = DecodeStrict(testBadArg, &val, empty_ignore)
c.Assume(err.Error(), gs.Equals, "Configuration contains key [not_andrew] which doesn't exist in struct")
}
func DecodeStrictInterfaceSpec(c gs.Context) {
// Check that we can safely decode into an empty interface
// properly
var tomlBlob = `
[MyMultiDecoder]
type = "MultiDecoder"
order = ["MyJsonDecoder", "MyProtobufDecoder"]
[MyMultiDecoder.delegates.MyJsonDecoder]
type = "JsonDecoder"
encoding_name = "JSON"
[MyMultiDecoder.delegates.MyProtobufDecoder]
type = "ProtobufDecoder"
encoding_name = "PROTOCOL_BUFFER"
`
var err error
var obj interface{}
empty_ignore := map[string]interface{}{}
_, err = DecodeStrict(tomlBlob, &obj, empty_ignore)
c.Assume(err, gs.IsNil)
actualObj := obj.(map[string]interface{})
multidecoder := actualObj["MyMultiDecoder"].(map[string]interface{})
c.Expect(multidecoder["type"], gs.Equals, "MultiDecoder")
order := multidecoder["order"].([]interface{})
d1 := order[0].(string)
d2 := order[1].(string)
c.Expect(d1, gs.Equals, "MyJsonDecoder")
c.Expect(d2, gs.Equals, "MyProtobufDecoder")
delegates := multidecoder["delegates"].(map[string]interface{})
myjson := delegates["MyJsonDecoder"].(map[string]interface{})
myproto := delegates["MyProtobufDecoder"].(map[string]interface{})
c.Expect(myjson["type"], gs.Equals, "JsonDecoder")
c.Expect(myjson["encoding_name"], gs.Equals, "JSON")
c.Expect(myproto["type"], gs.Equals, "ProtobufDecoder")
c.Expect(myproto["encoding_name"], gs.Equals, "PROTOCOL_BUFFER")
}
| {
"content_hash": "4cd34ec44aba54dd0b2c96c70d6fc8fd",
"timestamp": "",
"source": "github",
"line_count": 163,
"max_line_length": 106,
"avg_line_length": 22.319018404907975,
"alnum_prop": 0.6871907641561298,
"repo_name": "cherry-hyx/gxs",
"id": "1dabae85f788c369999ee196219397fd7a3f702a",
"size": "3638",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/github.com/bbangert/toml/checktype_test.go",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Assembly",
"bytes": "278668"
},
{
"name": "Batchfile",
"bytes": "46"
},
{
"name": "C",
"bytes": "8009"
},
{
"name": "C++",
"bytes": "18351"
},
{
"name": "CSS",
"bytes": "230704"
},
{
"name": "Go",
"bytes": "47038031"
},
{
"name": "HTML",
"bytes": "474975"
},
{
"name": "JavaScript",
"bytes": "877561"
},
{
"name": "Makefile",
"bytes": "105865"
},
{
"name": "PHP",
"bytes": "6981"
},
{
"name": "Perl",
"bytes": "68450"
},
{
"name": "Protocol Buffer",
"bytes": "645988"
},
{
"name": "Python",
"bytes": "140524"
},
{
"name": "Roff",
"bytes": "73746"
},
{
"name": "Ruby",
"bytes": "2640"
},
{
"name": "Shell",
"bytes": "94708"
},
{
"name": "Vim script",
"bytes": "110"
}
],
"symlink_target": ""
} |
@implementation UIAlert
static NSString* defaultTitle = @"";
+ (UIAlertView *)alertViewFromError:(NSError *)error {
UIAlertView *result = [[UIAlertView alloc] initWithTitle:[error localizedFailureReason]
message:[error localizedDescription]
delegate:nil
cancelButtonTitle:NSLocalizedString(@"OK", @"")
otherButtonTitles:nil];
return result;
}
+ (void) setDefaultTitle:(NSString*) title {
defaultTitle = title;
}
+ (void)showWithTitle:(NSString *)title message:(NSString *)message {
[[[UIAlertView alloc] initWithTitle:title
message:message
delegate:nil
cancelButtonTitle:NSLocalizedString(@"OK", @"")
otherButtonTitles:nil] show];
}
+ (void)showWithMessage:(NSString *)message {
[UIAlert showWithTitle:defaultTitle message:message];
}
+ (BOOL) showOnceWithTitle:(NSString*) title
andLocalizedMessage:(NSString*) messageId {
return [UIAlert showOnceWithTitle:NSLocalizedString(title, @"")
message:NSLocalizedString(messageId, @"")
andIdentifier:messageId];
}
+ (BOOL) showOnceWithMessage:(NSString*) message
andIdentifier:(NSString*) identifier {
return [UIAlert showOnceWithTitle:@"" message:message andIdentifier:identifier];
}
+ (BOOL) showOnceWithTitle:(NSString*) title
message:(NSString*) message
andIdentifier:(NSString*) identifier {
// add prefix to add clarity and be able to reset all prompts
NSString* defaultsKey = [ONCE_PREFIX stringByAppendingString:identifier];
// check if already displayed
NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults];
BOOL displayed = [userDefaults boolForKey:defaultsKey];
if (displayed) {
return FALSE;
}
// store it is
[userDefaults setBool:TRUE forKey:defaultsKey];
// show it
[UIAlert showWithTitle:title message:message];
// done
return TRUE;
}
+ (void) resetAllPrompts {
// get all keys
NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults];
NSArray* keys = [[userDefaults dictionaryRepresentation] allKeys];
// iterate
for (NSString* key in keys) {
if ([key hasPrefix:ONCE_PREFIX]) {
[userDefaults removeObjectForKey:key];
}
}
}
@end
| {
"content_hash": "49a64bde499b2ae6187de8fe32cd6859",
"timestamp": "",
"source": "github",
"line_count": 84,
"max_line_length": 88,
"avg_line_length": 27.19047619047619,
"alnum_prop": 0.6873905429071804,
"repo_name": "nbonamy/iOS-Foundation",
"id": "6f7fd466b2b9834183b49801d11953fab4641abf",
"size": "2488",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Pod/Classes/UIAlert.m",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Objective-C",
"bytes": "37365"
},
{
"name": "Ruby",
"bytes": "693"
}
],
"symlink_target": ""
} |
using System;
namespace GitHub.Logging
{
public interface ILogging
{
void Info(string message);
void Info(string format, params object[] objects);
void Info(Exception ex, string message);
void Info(Exception ex);
void Info(Exception ex, string format, params object[] objects);
void Debug(string message);
void Debug(string format, params object[] objects);
void Debug(Exception ex);
void Debug(Exception ex, string message);
void Debug(Exception ex, string format, params object[] objects);
void Trace(string message);
void Trace(string format, params object[] objects);
void Trace(Exception ex);
void Trace(Exception ex, string message);
void Trace(Exception ex, string format, params object[] objects);
void Warning(string message);
void Warning(string format, params object[] objects);
void Warning(Exception ex);
void Warning(Exception ex, string message);
void Warning(Exception ex, string format, params object[] objects);
void Error(string message);
void Error(string format, params object[] objects);
void Error(Exception ex);
void Error(Exception ex, string message);
void Error(Exception ex, string format, params object[] objects);
}
}
| {
"content_hash": "3258975a48a5f65dd7a61651c39336a2",
"timestamp": "",
"source": "github",
"line_count": 37,
"max_line_length": 75,
"avg_line_length": 36.891891891891895,
"alnum_prop": 0.6527472527472528,
"repo_name": "github-for-unity/Unity",
"id": "94d3550b896c26de617368839ecc95d76ac099d4",
"size": "1365",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/GitHub.Logging/ILogging.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "4616"
},
{
"name": "C#",
"bytes": "2291818"
},
{
"name": "JavaScript",
"bytes": "17688"
},
{
"name": "Shell",
"bytes": "6345"
},
{
"name": "Smalltalk",
"bytes": "4182"
}
],
"symlink_target": ""
} |
<html>
<head>
<title>Opera/9.80 (Linux armv7l; HbbTV/1.2.1 (; Philips; 55PFS710912; ; PHILIPSTV; CE-HTML/1.0 NETTV/4.4.1 SmartTvA/3.0.0 Firmware/012.002.016.128 (PhilipsTV, 3.1.1,)en) ) Presto/2.12.407 Version/12.50</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">
</head>
<body>
<div class="container">
<div class="section">
<h1 class="header center orange-text">User agent detail</h1>
<div class="row center">
Opera/9.80 (Linux armv7l; HbbTV/1.2.1 (; Philips; 55PFS710912; ; PHILIPSTV; CE-HTML/1.0 NETTV/4.4.1 SmartTvA/3.0.0 Firmware/012.002.016.128 (PhilipsTV, 3.1.1,)en) ) Presto/2.12.407 Version/12.50
<p>
Detected by 8 of 8 providers<br />
As bot detected by 0 of 7
</p>
</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></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>Actions</th></tr><tr><td>BrowscapPhp<br /><small>6011</small></td><td>Opera 12.50</td><td>Presto 2.12</td><td>Linux Smartphone OS </td><td></td><td>Linux Desktop</td><td>Desktop</td><td></td><td></td><td></td><td></td><td></td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-cbfe2df3-330b-4abd-b5df-0ca181549ca9">Detail</a>
<!-- Modal Structure -->
<div id="modal-cbfe2df3-330b-4abd-b5df-0ca181549ca9" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>BrowscapPhp result detail</h4>
<p><pre><code class="php">stdClass Object
(
[browser_name_regex] => /^opera\/9\.80.*\(.*linux armv.*\).*version\/12\.50.*$/
[browser_name_pattern] => opera/9.80*(*linux armv*)*version/12.50*
[parent] => Opera 12.50
[comment] => Opera 12.50
[browser] => Opera
[browser_type] => Browser
[browser_bits] => 32
[browser_maker] => Opera Software ASA
[browser_modus] => unknown
[version] => 12.50
[majorver] => 12
[minorver] => 50
[platform] => Linux Smartphone OS
[platform_version] => unknown
[platform_description] => Linux Smartphone OS
[platform_bits] => 32
[platform_maker] => Linux Foundation
[alpha] =>
[beta] =>
[win16] =>
[win32] =>
[win64] =>
[frames] => 1
[iframes] => 1
[tables] => 1
[cookies] => 1
[backgroundsounds] =>
[javascript] => 1
[vbscript] =>
[javaapplets] =>
[activexcontrols] =>
[ismobiledevice] =>
[istablet] =>
[issyndicationreader] =>
[crawler] =>
[cssversion] => 0
[aolversion] => 0
[device_name] => Linux Desktop
[device_maker] => Various
[device_type] => Desktop
[device_pointing_method] => mouse
[device_code_name] => Linux Desktop
[device_brand_name] => unknown
[renderingengine_name] => Presto
[renderingengine_version] => 2.12
[renderingengine_description] => For Opera 7 and above, Macromedia Dreamweaver MX and MX 2004 (Mac), and Adobe Creative Suite 2.
[renderingengine_maker] => Opera Software ASA
)
</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.0</small></td><td>Opera 12.50</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><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><i class="material-icons">close</i></td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-6fae891b-b0d5-4415-b07d-355015c3af67">Detail</a>
<!-- Modal Structure -->
<div id="modal-6fae891b-b0d5-4415-b07d-355015c3af67" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>DonatjUAParser result detail</h4>
<p><pre><code class="php">Array
(
[platform] => Linux
[browser] => Opera
[version] => 12.50
)
</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.5.1</small></td><td>Opera 12.50</td><td>Presto </td><td>GNU/Linux </td><td>Philips</td><td>55PFS710912</td><td>tv</td><td></td><td></td><td></td><td></td><td></td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-fc0f1b55-50d8-49c2-bb12-4cc1d8144ebf">Detail</a>
<!-- Modal Structure -->
<div id="modal-fc0f1b55-50d8-49c2-bb12-4cc1d8144ebf" 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] => Opera
[short_name] => OP
[version] => 12.50
[engine] => Presto
)
[operatingSystem] => Array
(
[name] => GNU/Linux
[short_name] => LIN
[version] =>
[platform] => ARM
)
[device] => Array
(
[brand] => PH
[brandName] => Philips
[model] => 55PFS710912
[device] => 5
[deviceName] => tv
)
[bot] =>
[extra] => Array
(
[isBot] =>
[isBrowser] => 1
[isFeedReader] =>
[isMobileApp] =>
[isPIM] =>
[isLibrary] =>
[isMediaPlayer] =>
[isCamera] =>
[isCarBrowser] =>
[isConsole] =>
[isFeaturePhone] =>
[isPhablet] =>
[isPortableMediaPlayer] =>
[isSmartDisplay] =>
[isSmartphone] =>
[isTablet] =>
[isTV] => 1
[isDesktop] => 1
[isMobile] =>
[isTouchEnabled] =>
)
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>SinergiBrowserDetector<br /><small>6.0.0</small></td><td>Opera 12.50</td><td><i class="material-icons">close</i></td><td>Linux </td><td><i class="material-icons">close</i></td><td></td><td><i class="material-icons">close</i></td><td></td><td><i class="material-icons">close</i></td><td></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-8c08f104-4e61-421b-9405-291b09c383dc">Detail</a>
<!-- Modal Structure -->
<div id="modal-8c08f104-4e61-421b-9405-291b09c383dc" 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] => Opera/9.80 (Linux armv7l; HbbTV/1.2.1 (; Philips; 55PFS710912; ; PHILIPSTV; CE-HTML/1.0 NETTV/4.4.1 SmartTvA/3.0.0 Firmware/012.002.016.128 (PhilipsTV, 3.1.1,)en) ) Presto/2.12.407 Version/12.50
)
[name:Sinergi\BrowserDetector\Browser:private] => Opera
[version:Sinergi\BrowserDetector\Browser:private] => 12.50
[isRobot:Sinergi\BrowserDetector\Browser:private] =>
[isChromeFrame:Sinergi\BrowserDetector\Browser:private] =>
)
[operatingSystem] => Sinergi\BrowserDetector\Os Object
(
[name:Sinergi\BrowserDetector\Os:private] => Linux
[version:Sinergi\BrowserDetector\Os:private] => unknown
[isMobile:Sinergi\BrowserDetector\Os:private] =>
[userAgent:Sinergi\BrowserDetector\Os:private] => Sinergi\BrowserDetector\UserAgent Object
(
[userAgentString:Sinergi\BrowserDetector\UserAgent:private] => Opera/9.80 (Linux armv7l; HbbTV/1.2.1 (; Philips; 55PFS710912; ; PHILIPSTV; CE-HTML/1.0 NETTV/4.4.1 SmartTvA/3.0.0 Firmware/012.002.016.128 (PhilipsTV, 3.1.1,)en) ) Presto/2.12.407 Version/12.50
)
)
[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] => Opera/9.80 (Linux armv7l; HbbTV/1.2.1 (; Philips; 55PFS710912; ; PHILIPSTV; CE-HTML/1.0 NETTV/4.4.1 SmartTvA/3.0.0 Firmware/012.002.016.128 (PhilipsTV, 3.1.1,)en) ) Presto/2.12.407 Version/12.50
)
)
)
</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></td><td>HbbTV 1.2.1</td><td><i class="material-icons">close</i></td><td>Linux </td><td>Philips</td><td>55PFS710912</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></td><td></td><td><i class="material-icons">close</i></td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-8f4c86c5-433e-4536-b799-ad26d77264e0">Detail</a>
<!-- Modal Structure -->
<div id="modal-8f4c86c5-433e-4536-b799-ad26d77264e0" 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] => 1
[minor] => 2
[patch] => 1
[family] => HbbTV
)
[os] => UAParser\Result\OperatingSystem Object
(
[major] =>
[minor] =>
[patch] =>
[patchMinor] =>
[family] => Linux
)
[device] => UAParser\Result\Device Object
(
[brand] => Philips
[model] => 55PFS710912
[family] => HbbTV
)
[originalUserAgent] => Opera/9.80 (Linux armv7l; HbbTV/1.2.1 (; Philips; 55PFS710912; ; PHILIPSTV; CE-HTML/1.0 NETTV/4.4.1 SmartTvA/3.0.0 Firmware/012.002.016.128 (PhilipsTV, 3.1.1,)en) ) Presto/2.12.407 Version/12.50
)
</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>2.0.9</small></td><td>Opera Devices 3.4</td><td>Presto 2.12.407</td><td> </td><td>Philips</td><td>PFS7109 Net TV</td><td>television</td><td></td><td><i class="material-icons">close</i></td><td></td><td></td><td><i class="material-icons">close</i></td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-62f1f3a3-0c44-4ecb-9ee2-48145e35736b">Detail</a>
<!-- Modal Structure -->
<div id="modal-62f1f3a3-0c44-4ecb-9ee2-48145e35736b" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>WhichBrowser result detail</h4>
<p><pre><code class="php">Array
(
[browser] => Array
(
[name] => Opera Devices
[version] => 3.4
[type] => browser
)
[engine] => Array
(
[name] => Presto
[version] => 2.12.407
)
[device] => Array
(
[type] => television
[manufacturer] => Philips
[model] => PFS7109
[series] => Net TV
)
)
</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></td><td>Opera 12.50</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>pc</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td></td><td></td><td><i class="material-icons">close</i></td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-bd437f52-91e9-4ce8-88f7-6e5206ed6635">Detail</a>
<!-- Modal Structure -->
<div id="modal-bd437f52-91e9-4ce8-88f7-6e5206ed6635" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>Woothee result detail</h4>
<p><pre><code class="php">Array
(
[name] => Opera
[vendor] => Opera
[version] => 12.50
[category] => pc
[os] => Linux
[os_version] => UNKNOWN
)
</code></pre></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a>
</div>
</div>
</td></tr><tr><td>Wurfl<br /><small>1.6.4</small></td><td>Opera 12.50</td><td><i class="material-icons">close</i></td><td>Linux armv7l </td><td></td><td>SmartTV</td><td>Smart-TV</td><td></td><td></td><td></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>
<!-- Modal Trigger -->
<a class="modal-trigger btn waves-effect waves-light" href="#modal-3a72b31e-c3c1-4317-a357-7a6d5e3c7027">Detail</a>
<!-- Modal Structure -->
<div id="modal-3a72b31e-c3c1-4317-a357-7a6d5e3c7027" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>Wurfl result detail</h4>
<p><pre><code class="php">Array
(
[virtual] => Array
(
[is_android] => false
[is_ios] => false
[is_windows_phone] => false
[is_app] => false
[is_full_desktop] => false
[is_largescreen] => true
[is_mobile] => false
[is_robot] => false
[is_smartphone] => false
[is_touchscreen] => false
[is_wml_preferred] => false
[is_xhtmlmp_preferred] => false
[is_html_preferred] => true
[advertised_device_os] => Linux armv7l
[advertised_device_os_version] =>
[advertised_browser] => Opera
[advertised_browser_version] => 12.50
[complete_device_name] => Generic SmartTV
[form_factor] => Smart-TV
[is_phone] => false
[is_app_webview] => false
)
[all] => Array
(
[brand_name] => Generic
[model_name] => SmartTV
[unique] => true
[ununiqueness_handler] =>
[is_wireless_device] => false
[device_claims_web_support] => true
[has_qwerty_keyboard] => true
[can_skip_aligned_link_row] => true
[uaprof] =>
[uaprof2] =>
[uaprof3] =>
[nokia_series] => 0
[nokia_edition] => 0
[device_os] =>
[mobile_browser] =>
[mobile_browser_version] =>
[device_os_version] =>
[pointing_method] =>
[release_date] => 2011_january
[marketing_name] =>
[model_extra_info] =>
[nokia_feature_pack] => 0
[can_assign_phone_number] => false
[is_tablet] => false
[manufacturer_name] =>
[is_bot] => false
[is_google_glass] => false
[proportional_font] => false
[built_in_back_button_support] => false
[card_title_support] => false
[softkey_support] => false
[table_support] => false
[numbered_menus] => false
[menu_with_select_element_recommended] => false
[menu_with_list_of_links_recommended] => false
[icons_on_menu_items_support] => false
[break_list_of_links_with_br_element_recommended] => false
[access_key_support] => false
[wrap_mode_support] => false
[times_square_mode_support] => false
[deck_prefetch_support] => false
[elective_forms_recommended] => false
[wizards_recommended] => false
[image_as_link_support] => false
[insert_br_element_after_widget_recommended] => false
[wml_can_display_images_and_text_on_same_line] => false
[wml_displays_image_in_center] => false
[opwv_wml_extensions_support] => false
[wml_make_phone_call_string] => none
[chtml_display_accesskey] => false
[emoji] => false
[chtml_can_display_images_and_text_on_same_line] => false
[chtml_displays_image_in_center] => false
[imode_region] => none
[chtml_make_phone_call_string] => tel:
[chtml_table_support] => true
[xhtml_honors_bgcolor] => true
[xhtml_supports_forms_in_table] => true
[xhtml_support_wml2_namespace] => false
[xhtml_autoexpand_select] => false
[xhtml_select_as_dropdown] => true
[xhtml_select_as_radiobutton] => true
[xhtml_select_as_popup] => true
[xhtml_display_accesskey] => false
[xhtml_supports_invisible_text] => false
[xhtml_supports_inline_input] => false
[xhtml_supports_monospace_font] => false
[xhtml_supports_table_for_layout] => false
[xhtml_supports_css_cell_table_coloring] => false
[xhtml_format_as_css_property] => false
[xhtml_format_as_attribute] => false
[xhtml_nowrap_mode] => false
[xhtml_marquee_as_css_property] => false
[xhtml_readable_background_color1] => #FFFFFF
[xhtml_readable_background_color2] => #FFFFFF
[xhtml_allows_disabled_form_elements] => false
[xhtml_document_title_support] => true
[xhtml_preferred_charset] => utf8
[opwv_xhtml_extensions_support] => false
[xhtml_make_phone_call_string] => none
[xhtmlmp_preferred_mime_type] => text/html
[xhtml_table_support] => false
[xhtml_send_sms_string] => none
[xhtml_send_mms_string] => none
[xhtml_file_upload] => supported
[cookie_support] => true
[accept_third_party_cookie] => true
[xhtml_supports_iframe] => full
[xhtml_avoid_accesskeys] => true
[xhtml_can_embed_video] => play_and_stop
[ajax_support_javascript] => true
[ajax_manipulate_css] => true
[ajax_support_getelementbyid] => true
[ajax_support_inner_html] => true
[ajax_xhr_type] => standard
[ajax_manipulate_dom] => true
[ajax_support_events] => true
[ajax_support_event_listener] => true
[ajax_preferred_geoloc_api] => none
[xhtml_support_level] => 4
[preferred_markup] => html_web_4_0
[wml_1_1] => false
[wml_1_2] => false
[wml_1_3] => false
[html_wi_w3_xhtmlbasic] => true
[html_wi_oma_xhtmlmp_1_0] => false
[html_wi_imode_html_1] => false
[html_wi_imode_html_2] => false
[html_wi_imode_html_3] => false
[html_wi_imode_html_4] => false
[html_wi_imode_html_5] => false
[html_wi_imode_htmlx_1] => false
[html_wi_imode_htmlx_1_1] => false
[html_wi_imode_compact_generic] => false
[html_web_3_2] => true
[html_web_4_0] => true
[voicexml] => false
[multipart_support] => false
[total_cache_disable_support] => false
[time_to_live_support] => false
[resolution_width] => 685
[resolution_height] => 600
[columns] => 120
[max_image_width] => 650
[max_image_height] => 600
[rows] => 200
[physical_screen_width] => 400
[physical_screen_height] => 400
[dual_orientation] => false
[density_class] => 1.0
[wbmp] => false
[bmp] => true
[epoc_bmp] => false
[gif_animated] => true
[jpg] => true
[png] => true
[tiff] => false
[transparent_png_alpha] => false
[transparent_png_index] => false
[svgt_1_1] => true
[svgt_1_1_plus] => false
[greyscale] => false
[gif] => true
[colors] => 65536
[webp_lossy_support] => false
[webp_lossless_support] => false
[post_method_support] => true
[basic_authentication_support] => true
[empty_option_value_support] => true
[emptyok] => false
[nokia_voice_call] => false
[wta_voice_call] => false
[wta_phonebook] => false
[wta_misc] => false
[wta_pdc] => false
[https_support] => true
[phone_id_provided] => false
[max_data_rate] => 3200
[wifi] => true
[sdio] => false
[vpn] => false
[has_cellular_radio] => false
[max_deck_size] => 100000
[max_url_length_in_requests] => 128
[max_url_length_homepage] => 0
[max_url_length_bookmark] => 0
[max_url_length_cached_page] => 0
[max_no_of_connection_settings] => 0
[max_no_of_bookmarks] => 0
[max_length_of_username] => 0
[max_length_of_password] => 0
[max_object_size] => 0
[downloadfun_support] => false
[directdownload_support] => false
[inline_support] => false
[oma_support] => false
[ringtone] => false
[ringtone_3gpp] => false
[ringtone_midi_monophonic] => false
[ringtone_midi_polyphonic] => false
[ringtone_imelody] => false
[ringtone_digiplug] => false
[ringtone_compactmidi] => false
[ringtone_mmf] => false
[ringtone_rmf] => false
[ringtone_xmf] => false
[ringtone_amr] => false
[ringtone_awb] => false
[ringtone_aac] => false
[ringtone_wav] => false
[ringtone_mp3] => false
[ringtone_spmidi] => false
[ringtone_qcelp] => false
[ringtone_voices] => 1
[ringtone_df_size_limit] => 0
[ringtone_directdownload_size_limit] => 0
[ringtone_inline_size_limit] => 0
[ringtone_oma_size_limit] => 0
[wallpaper] => false
[wallpaper_max_width] => 0
[wallpaper_max_height] => 0
[wallpaper_preferred_width] => 0
[wallpaper_preferred_height] => 0
[wallpaper_resize] => none
[wallpaper_wbmp] => false
[wallpaper_bmp] => false
[wallpaper_gif] => false
[wallpaper_jpg] => false
[wallpaper_png] => false
[wallpaper_tiff] => false
[wallpaper_greyscale] => false
[wallpaper_colors] => 2
[wallpaper_df_size_limit] => 0
[wallpaper_directdownload_size_limit] => 0
[wallpaper_inline_size_limit] => 0
[wallpaper_oma_size_limit] => 0
[screensaver] => false
[screensaver_max_width] => 0
[screensaver_max_height] => 0
[screensaver_preferred_width] => 0
[screensaver_preferred_height] => 0
[screensaver_resize] => none
[screensaver_wbmp] => false
[screensaver_bmp] => false
[screensaver_gif] => false
[screensaver_jpg] => false
[screensaver_png] => false
[screensaver_greyscale] => false
[screensaver_colors] => 2
[screensaver_df_size_limit] => 0
[screensaver_directdownload_size_limit] => 0
[screensaver_inline_size_limit] => 0
[screensaver_oma_size_limit] => 0
[picture] => false
[picture_max_width] => 0
[picture_max_height] => 0
[picture_preferred_width] => 0
[picture_preferred_height] => 0
[picture_resize] => none
[picture_wbmp] => false
[picture_bmp] => false
[picture_gif] => false
[picture_jpg] => false
[picture_png] => false
[picture_greyscale] => false
[picture_colors] => 2
[picture_df_size_limit] => 0
[picture_directdownload_size_limit] => 0
[picture_inline_size_limit] => 0
[picture_oma_size_limit] => 0
[video] => false
[oma_v_1_0_forwardlock] => false
[oma_v_1_0_combined_delivery] => false
[oma_v_1_0_separate_delivery] => false
[streaming_video] => false
[streaming_3gpp] => false
[streaming_mp4] => false
[streaming_mov] => false
[streaming_video_size_limit] => 0
[streaming_real_media] => none
[streaming_flv] => false
[streaming_3g2] => false
[streaming_vcodec_h263_0] => -1
[streaming_vcodec_h263_3] => -1
[streaming_vcodec_mpeg4_sp] => -1
[streaming_vcodec_mpeg4_asp] => -1
[streaming_vcodec_h264_bp] => -1
[streaming_acodec_amr] => none
[streaming_acodec_aac] => none
[streaming_wmv] => none
[streaming_preferred_protocol] => rtsp
[streaming_preferred_http_protocol] => none
[wap_push_support] => false
[connectionless_service_indication] => false
[connectionless_service_load] => false
[connectionless_cache_operation] => false
[connectionoriented_unconfirmed_service_indication] => false
[connectionoriented_unconfirmed_service_load] => false
[connectionoriented_unconfirmed_cache_operation] => false
[connectionoriented_confirmed_service_indication] => false
[connectionoriented_confirmed_service_load] => false
[connectionoriented_confirmed_cache_operation] => false
[utf8_support] => true
[ascii_support] => false
[iso8859_support] => false
[expiration_date] => false
[j2me_cldc_1_0] => false
[j2me_cldc_1_1] => false
[j2me_midp_1_0] => false
[j2me_midp_2_0] => false
[doja_1_0] => false
[doja_1_5] => false
[doja_2_0] => false
[doja_2_1] => false
[doja_2_2] => false
[doja_3_0] => false
[doja_3_5] => false
[doja_4_0] => false
[j2me_jtwi] => false
[j2me_mmapi_1_0] => false
[j2me_mmapi_1_1] => false
[j2me_wmapi_1_0] => false
[j2me_wmapi_1_1] => false
[j2me_wmapi_2_0] => false
[j2me_btapi] => false
[j2me_3dapi] => false
[j2me_locapi] => false
[j2me_nokia_ui] => false
[j2me_motorola_lwt] => false
[j2me_siemens_color_game] => false
[j2me_siemens_extension] => false
[j2me_heap_size] => 0
[j2me_max_jar_size] => 0
[j2me_storage_size] => 0
[j2me_max_record_store_size] => 0
[j2me_screen_width] => 0
[j2me_screen_height] => 0
[j2me_canvas_width] => 0
[j2me_canvas_height] => 0
[j2me_bits_per_pixel] => 0
[j2me_audio_capture_enabled] => false
[j2me_video_capture_enabled] => false
[j2me_photo_capture_enabled] => false
[j2me_capture_image_formats] => none
[j2me_http] => false
[j2me_https] => false
[j2me_socket] => false
[j2me_udp] => false
[j2me_serial] => false
[j2me_gif] => false
[j2me_gif89a] => false
[j2me_jpg] => false
[j2me_png] => false
[j2me_bmp] => false
[j2me_bmp3] => false
[j2me_wbmp] => false
[j2me_midi] => false
[j2me_wav] => false
[j2me_amr] => false
[j2me_mp3] => false
[j2me_mp4] => false
[j2me_imelody] => false
[j2me_rmf] => false
[j2me_au] => false
[j2me_aac] => false
[j2me_realaudio] => false
[j2me_xmf] => false
[j2me_wma] => false
[j2me_3gpp] => false
[j2me_h263] => false
[j2me_svgt] => false
[j2me_mpeg4] => false
[j2me_realvideo] => false
[j2me_real8] => false
[j2me_realmedia] => false
[j2me_left_softkey_code] => 0
[j2me_right_softkey_code] => 0
[j2me_middle_softkey_code] => 0
[j2me_select_key_code] => 0
[j2me_return_key_code] => 0
[j2me_clear_key_code] => 0
[j2me_datefield_no_accepts_null_date] => false
[j2me_datefield_broken] => false
[receiver] => false
[sender] => false
[mms_max_size] => 0
[mms_max_height] => 0
[mms_max_width] => 0
[built_in_recorder] => false
[built_in_camera] => false
[mms_jpeg_baseline] => false
[mms_jpeg_progressive] => false
[mms_gif_static] => false
[mms_gif_animated] => false
[mms_png] => false
[mms_bmp] => false
[mms_wbmp] => false
[mms_amr] => false
[mms_wav] => false
[mms_midi_monophonic] => false
[mms_midi_polyphonic] => false
[mms_midi_polyphonic_voices] => 0
[mms_spmidi] => false
[mms_mmf] => false
[mms_mp3] => false
[mms_evrc] => false
[mms_qcelp] => false
[mms_ota_bitmap] => false
[mms_nokia_wallpaper] => false
[mms_nokia_operatorlogo] => false
[mms_nokia_3dscreensaver] => false
[mms_nokia_ringingtone] => false
[mms_rmf] => false
[mms_xmf] => false
[mms_symbian_install] => false
[mms_jar] => false
[mms_jad] => false
[mms_vcard] => false
[mms_vcalendar] => false
[mms_wml] => false
[mms_wbxml] => false
[mms_wmlc] => false
[mms_video] => false
[mms_mp4] => false
[mms_3gpp] => false
[mms_3gpp2] => false
[mms_max_frame_rate] => 0
[nokiaring] => false
[picturemessage] => false
[operatorlogo] => false
[largeoperatorlogo] => false
[callericon] => false
[nokiavcard] => false
[nokiavcal] => false
[sckl_ringtone] => false
[sckl_operatorlogo] => false
[sckl_groupgraphic] => false
[sckl_vcard] => false
[sckl_vcalendar] => false
[text_imelody] => false
[ems] => false
[ems_variablesizedpictures] => false
[ems_imelody] => false
[ems_odi] => false
[ems_upi] => false
[ems_version] => 0
[siemens_ota] => false
[siemens_logo_width] => 101
[siemens_logo_height] => 29
[siemens_screensaver_width] => 101
[siemens_screensaver_height] => 50
[gprtf] => false
[sagem_v1] => false
[sagem_v2] => false
[panasonic] => false
[sms_enabled] => false
[wav] => false
[mmf] => false
[smf] => false
[mld] => false
[midi_monophonic] => false
[midi_polyphonic] => false
[sp_midi] => false
[rmf] => false
[xmf] => false
[compactmidi] => false
[digiplug] => false
[nokia_ringtone] => false
[imelody] => false
[au] => false
[amr] => false
[awb] => false
[aac] => false
[mp3] => false
[voices] => 1
[qcelp] => false
[evrc] => false
[flash_lite_version] =>
[fl_wallpaper] => false
[fl_screensaver] => false
[fl_standalone] => false
[fl_browser] => false
[fl_sub_lcd] => false
[full_flash_support] => true
[css_supports_width_as_percentage] => true
[css_border_image] => none
[css_rounded_corners] => none
[css_gradient] => none
[css_spriting] => 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] => -1
[playback_vcodec_h263_3] => -1
[playback_vcodec_mpeg4_sp] => -1
[playback_vcodec_mpeg4_asp] => -1
[playback_vcodec_h264_bp] => -1
[playback_real_media] => none
[playback_3gpp] => false
[playback_3g2] => false
[playback_mp4] => false
[playback_mov] => false
[playback_acodec_amr] => none
[playback_acodec_aac] => none
[playback_df_size_limit] => 0
[playback_directdownload_size_limit] => 0
[playback_inline_size_limit] => 0
[playback_oma_size_limit] => 0
[playback_acodec_qcelp] => false
[playback_wmv] => none
[hinted_progressive_download] => false
[html_preferred_dtd] => html4
[viewport_supported] => false
[viewport_width] =>
[viewport_userscalable] =>
[viewport_initial_scale] =>
[viewport_maximum_scale] =>
[viewport_minimum_scale] =>
[mobileoptimized] => false
[handheldfriendly] => false
[canvas_support] => none
[image_inlining] => true
[is_smarttv] => true
[is_console] => false
[nfc_support] => false
[ux_full_desktop] => false
[jqm_grade] => A
[is_sencha_touch_ok] => true
[controlcap_is_smartphone] => default
[controlcap_is_ios] => default
[controlcap_is_android] => default
[controlcap_is_robot] => default
[controlcap_is_app] => default
[controlcap_advertised_device_os] => default
[controlcap_advertised_device_os_version] => default
[controlcap_advertised_browser] => default
[controlcap_advertised_browser_version] => default
[controlcap_is_windows_phone] => default
[controlcap_is_full_desktop] => default
[controlcap_is_largescreen] => default
[controlcap_is_mobile] => default
[controlcap_is_touchscreen] => default
[controlcap_is_wml_preferred] => default
[controlcap_is_xhtmlmp_preferred] => default
[controlcap_is_html_preferred] => default
[controlcap_form_factor] => default
[controlcap_complete_device_name] => default
)
)
</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-01-26 16:39:23</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.1.1/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": "c1ba4e698c673ea74b774ed0da5d2264",
"timestamp": "",
"source": "github",
"line_count": 969,
"max_line_length": 548,
"avg_line_length": 40.30030959752322,
"alnum_prop": 0.5220865022662672,
"repo_name": "ThaDafinser/UserAgentParserComparison",
"id": "6ea99309bc15c6045bd4bd098383f4a9cd1de474",
"size": "39052",
"binary": false,
"copies": "1",
"ref": "refs/heads/gh-pages",
"path": "v3/user-agent-detail/cb/56/cb56fa23-fcd0-4d05-9ccd-4edc76903df7.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "HTML",
"bytes": "2060859160"
}
],
"symlink_target": ""
} |
<?php
namespace Vokuro\Models;
use Phalcon\Mvc\Model;
/**
* RememberTokens
* Stores the remember me tokens
*/
class RememberTokens extends Model
{
/**
*
* @var integer
*/
public $id;
/**
*
* @var integer
*/
public $usersId;
/**
*
* @var string
*/
public $token;
/**
*
* @var string
*/
public $userAgent;
/**
*
* @var integer
*/
public $createdAt;
/**
* Before create the user assign a password
*/
public function beforeValidationOnCreate()
{
// Timestamp the confirmaton
$this->createdAt = time();
}
public function initialize()
{
$this->belongsTo('usersId', __NAMESPACE__ . '\Users', 'id', array(
'alias' => 'user'
));
}
}
| {
"content_hash": "346f6eb45b2007fe1495bc3f200e6d4d",
"timestamp": "",
"source": "github",
"line_count": 58,
"max_line_length": 74,
"avg_line_length": 14.362068965517242,
"alnum_prop": 0.4897959183673469,
"repo_name": "jinghewang/vokuro",
"id": "66a948af0f771414739a664e6e26a7bfaa8ebe2b",
"size": "833",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "app/models/RememberTokens.php",
"mode": "33261",
"license": "apache-2.0",
"language": [
{
"name": "ApacheConf",
"bytes": "415"
},
{
"name": "CSS",
"bytes": "640"
},
{
"name": "HTML",
"bytes": "123"
},
{
"name": "PHP",
"bytes": "92748"
},
{
"name": "Volt",
"bytes": "28161"
}
],
"symlink_target": ""
} |
layout: post
title: "Sementes de Fogo"
date: 2018-01-01
source: Módulo Básico 201, Módulo Básico Edição Revisada 211.
tags: [nenhum, bardo]
---
**divina 6 (fogo)**
**Alcance**: toque
**Teste de Resistência**: Reflexos reduz à metade.
**Duração**: 1 hora ou até ser descarregado
**Alvo**: até 6 bolotas (fruto do carvalho)
**Tempo de Execução**: ação padrão
Você transforma até seis bolotas em bombas explosivas. As bolotas causam um total de 12d6 pontos de dano, divido entre todas. Por exemplo, você pode criar uma bolota que cause 12d6, duas que causem 6d6 e assim por diante.
As bolotas podem ser usadas como armas de arremesso (ataque de toque à distância com alcance de 30m) ou enterradas no chão, para explodirem quando você diz uma palavra pré-determinada.
A explosão de cada bolota atinge 3m de raio. Criaturas na área têm direito a um teste de Reflexos para reduzir o dano à metade. Uma criatura atingida diretamente por uma bolota arremessada não tem direito ao teste de resistência.
Componente material: até seis bolotas.
| {
"content_hash": "e5f022502c816971a6cf0911d25e22b9",
"timestamp": "",
"source": "github",
"line_count": 23,
"max_line_length": 229,
"avg_line_length": 45.34782608695652,
"alnum_prop": 0.7670182166826462,
"repo_name": "RoenMidnight/grimorio-trpg",
"id": "95fd37eb8f48f07573ead06593fa383aa26e550f",
"size": "1079",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "_posts/2018-01-01-Sementes-de-Fogo.markdown",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "23615"
},
{
"name": "HTML",
"bytes": "10302982"
},
{
"name": "JavaScript",
"bytes": "5261"
},
{
"name": "Python",
"bytes": "7617"
},
{
"name": "Ruby",
"bytes": "1803"
},
{
"name": "TypeScript",
"bytes": "7104"
}
],
"symlink_target": ""
} |
module Azure::Network::Mgmt::V2019_12_01
module Models
#
# Defines values for AuthenticationMethod
#
module AuthenticationMethod
EAPTLS = "EAPTLS"
EAPMSCHAPv2 = "EAPMSCHAPv2"
end
end
end
| {
"content_hash": "9cddacd0c8162c915782b2733f69e1ff",
"timestamp": "",
"source": "github",
"line_count": 11,
"max_line_length": 45,
"avg_line_length": 20.272727272727273,
"alnum_prop": 0.6636771300448431,
"repo_name": "Azure/azure-sdk-for-ruby",
"id": "aa28b9dcf6667b042beff4d8613070f87c61cc59",
"size": "387",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "management/azure_mgmt_network/lib/2019-12-01/generated/azure_mgmt_network/models/authentication_method.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Ruby",
"bytes": "345216400"
},
{
"name": "Shell",
"bytes": "305"
}
],
"symlink_target": ""
} |
var Model = {
PATH_MODULE: BASE_URL + "utility/",
checkKey: function(key, callback) {
$.ajax({
type: "get",
url: this.PATH_MODULE + "check_key_backup",
data: {
key: key
},
success: function(response) {
//console.log(response);
callback(JSON.parse(response));
},
error: function() {
callback({status:false});
}
});
},
getTables: function(callback) {
$.ajax({
type: "get",
url: this.PATH_MODULE + "get_tables",
success: function(response) {
//console.log(response);
callback(JSON.parse(response));
},
error: function() {
callback(false);
}
});
},
backup: function(tables, callback) {
$.ajax({
type: "post",
url: this.PATH_MODULE + "backup",
data: {
tables: tables
},
success: function(response) {
//console.log(response);
callback(JSON.parse(response));
},
error: function() {
callback({status: false, message: 'Error Request'});
}
});
}
}
/**
* =======================================
*/
Vue.component('notification', {
props: ['showSuccess', 'successMsg', 'showError', 'errorMsg'],
template: '#notification'
});
Vue.component('authBackup', {
props: [],
template: '#auth-backup',
data: function() {
return {
key: ''
}
},
methods: {
submitKey: function(event) {
event.preventDefault();
var self = this;
self.$dispatch('set-loading', true);
Model.checkKey(this.key, function(result) {
self.$dispatch('set-loading', false);
if(result.status) {
self.$dispatch('set-auth', true);
} else {
self.$dispatch('notification', 'error', result.message);
}
});
}
}
});
Vue.component('backup', {
props: [],
data: function() {
return {
tables: [],
doneBackup: false,
pathDownload: ''
}
},
template: '#backup',
methods: {
getTables: function() {
var self = this;
return Model.getTables(function(result) {
self.$set('tables', result);
});
},
checkAll: function(event) {
var checkboxes = $('.tables');
for (var i = 0, n = checkboxes.length; i < n; i++) {
checkboxes[i].checked = event.target.checked;
}
},
backup: function(event) {
event.preventDefault();
this.$dispatch('set-loading', true);
var self = this;
var tables = [];
var checkboxesTable = $('.tables');
for (var i = 0; i < checkboxesTable.length; i++) {
// And stick the checked ones onto an array...
if (checkboxesTable[i].checked) {
tables.push($(checkboxesTable[i]).val());
}
}
Model.backup(tables, function(result) {
self.$dispatch('set-loading', false);
if(result.status) {
self.doneBackup = true;
self.pathDownload = result.path;
} else {
self.$dispatch('notification', 'error', result.message);
}
});
},
downloadFile: function(event) {
event.preventDefault();
window.location = this.pathDownload;
this.$dispatch('set-auth', false);
this.$dispatch('notification', 'success', "Success Download File");
}
},
created: function() {
this.getTables();
}
});
var App = new Vue({
el: '#content',
data: function() {
return {
MODULE:'Utility',
auth: false,
showNotifSuccess: false,
showNotifError: false,
successMessage: '',
errorMessage: '',
loading: false
}
},
events: {
'set-auth': function(val) {
this.$set('auth', val);
},
'notification': function(type, msg) {
var self = this;
this.$set('showNotifSuccess', false);
this.$set('showNotifError', false);
if(type === 'success') {
this.$set('successMessage', msg);
this.$set('showNotifSuccess', true);
} else {
this.$set('errorMessage', msg);
this.$set('showNotifError', true);
}
setTimeout(function(){
self.$set('showNotifSuccess', false);
self.$set('showNotifError', false);
self.$set('successMessage', '');
self.$set('errorMessage', '');
}, 3000);
},
'set-loading': function(val) {
this.$set('loading', val);
}
}
});
| {
"content_hash": "2933f35d95fec6504e9993c3e6cf818f",
"timestamp": "",
"source": "github",
"line_count": 188,
"max_line_length": 70,
"avg_line_length": 21.329787234042552,
"alnum_prop": 0.5793017456359102,
"repo_name": "penandaku/backend-dev",
"id": "12892f911075bc71c1cb75e978ff70db0aee1c36",
"size": "4010",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "cdn/build/utility.js",
"mode": "33261",
"license": "mit",
"language": [
{
"name": "ApacheConf",
"bytes": "1135"
},
{
"name": "CSS",
"bytes": "296024"
},
{
"name": "HTML",
"bytes": "2614835"
},
{
"name": "JavaScript",
"bytes": "579883"
},
{
"name": "PHP",
"bytes": "1834998"
}
],
"symlink_target": ""
} |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_66-internal) on Tue Dec 08 09:26:31 GMT 2015 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Uses of Class org.apache.jena.shared.BadDescriptionNoRootException (Apache Jena)</title>
<meta name="date" content="2015-12-08">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Class org.apache.jena.shared.BadDescriptionNoRootException (Apache Jena)";
}
}
catch(err) {
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../org/apache/jena/shared/BadDescriptionNoRootException.html" title="class in org.apache.jena.shared">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/jena/shared/class-use/BadDescriptionNoRootException.html" target="_top">Frames</a></li>
<li><a href="BadDescriptionNoRootException.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h2 title="Uses of Class org.apache.jena.shared.BadDescriptionNoRootException" class="title">Uses of Class<br>org.apache.jena.shared.BadDescriptionNoRootException</h2>
</div>
<div class="classUseContainer">No usage of org.apache.jena.shared.BadDescriptionNoRootException</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../org/apache/jena/shared/BadDescriptionNoRootException.html" title="class in org.apache.jena.shared">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/jena/shared/class-use/BadDescriptionNoRootException.html" target="_top">Frames</a></li>
<li><a href="BadDescriptionNoRootException.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Licenced under the Apache License, Version 2.0</small></p>
</body>
</html>
| {
"content_hash": "650ae82536eb20b37e43e5b0f1179737",
"timestamp": "",
"source": "github",
"line_count": 126,
"max_line_length": 167,
"avg_line_length": 37.492063492063494,
"alnum_prop": 0.6287044877222693,
"repo_name": "Jelkya/amber-sparql",
"id": "13895b214a7785564570622302b323b9e93618e0",
"size": "4724",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "library/apache-jena-3.0.1/javadoc-core/org/apache/jena/shared/class-use/BadDescriptionNoRootException.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Java",
"bytes": "171714"
},
{
"name": "Shell",
"bytes": "902"
}
],
"symlink_target": ""
} |
var demand = require('must'),
CodeType = require('../CodeType');
exports.initList = function(List) {
List.add({
code: { type: CodeType },
nested: {
code: { type: CodeType }
},
lang: {
type: CodeType,
lang: 'c'
},
language: {
type: CodeType,
lang: 'js'
},
codemirror: {
type: CodeType,
lang: 'html',
codemirror: {
value: 'fooga'
}
}
});
};
exports.createData = function(List) {//eslint-disable-line no-unused-vars
};
exports.testFilters = function(List) {//eslint-disable-line no-unused-vars
};
exports.testFieldType = function(List) {
var testItem = new List.model();
it('should update top level fields', function(done) {
List.fields.code.updateItem(testItem, {
code: 'foo(bar);'
}, function() {
demand(testItem.code).be('foo(bar);');
testItem.code = undefined;
done();
});
});
it('should update nested fields', function(done) {
List.fields['nested.code'].updateItem(testItem, {
nested: {
code: 'foo(bar);'
}
}, function() {
demand(testItem.nested.code).be('foo(bar);');
testItem.nested.code = undefined;
done();
});
});
it('should update nested fields with flat paths', function(done) {
List.fields['nested.code'].updateItem(testItem, {
'nested.code': 'foo(bar);'
}, function() {
demand(testItem.nested.code).be('foo(bar);');
testItem.nested.code = undefined;
done();
});
});
it('should handle a `lang` config property', function() {
demand(List.fields.lang.lang).be('c');
});
it('should handle a `language` config property', function() {
demand(List.fields.language.lang).be('js');
});
it('should support a `codemirror` config property', function() {
demand(List.fields.codemirror.codemirror).be.object();
demand(List.fields.codemirror.codemirror.value).be('fooga');
});
it('should merge the `lang` and `codemirror` config properties', function() {
demand(List.fields.codemirror.editor).be.object();
demand(List.fields.codemirror.editor.mode).be('html');
demand(List.fields.codemirror.editor.value).be('fooga');
});
};
| {
"content_hash": "50000f799d6b50a6f86f6214d8bfa242",
"timestamp": "",
"source": "github",
"line_count": 89,
"max_line_length": 78,
"avg_line_length": 23.39325842696629,
"alnum_prop": 0.6397694524495677,
"repo_name": "riyadhalnur/keystone",
"id": "86ff5268d43fdc354c339c5af4a333b85b9ec764",
"size": "2082",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "fields/types/code/test/server.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "132506"
},
{
"name": "HTML",
"bytes": "30512"
},
{
"name": "JavaScript",
"bytes": "924426"
}
],
"symlink_target": ""
} |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>monae: 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.7.1 / monae - 0.1.2</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
monae
<small>
0.1.2
<span class="label label-info">Not compatible 👼</span>
</small>
</h1>
<p>📅 <em><script>document.write(moment("2022-05-15 18:57:04 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-05-15 18:57:04 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-threads base
base-unix base
camlp5 7.14 Preprocessor-pretty-printer of OCaml
conf-findutils 1 Virtual package relying on findutils
conf-perl 2 Virtual package relying on perl
coq 8.7.1 Formal proof management system
num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.09.1 The OCaml compiler (virtual package)
ocaml-base-compiler 4.09.1 Official release 4.09.1
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.3 A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "reynald.affeldt@aist.go.jp"
homepage: "https://github.com/affeldt-aist/monae"
bug-reports: "https://github.com/affeldt-aist/monae/issues"
dev-repo: "git+https://github.com/affeldt-aist/monae.git"
license: "GPL-3.0-or-later"
authors: [
"Reynald Affeldt"
"David Nowak"
"Takafumi Saikawa"
"Jacques Garrigue"
"Celestine Sauvage"
"Kazunari Tanaka"
]
build: [
[make "-j%{jobs}%"]
[make "sect5"]
[make "-C" "impredicative_set"]
]
install: [
[make "install"]
]
depends: [
"coq" { >= "8.11" & < "8.13~" }
"coq-infotheo" { >= "0.1.2" & < "0.2~" }
"coq-paramcoq" { >= "1.1.2" & < "1.2~" }
]
synopsis: "Monae"
description: """
This repository contains a formalization of monads including several
models, examples of monadic equational reasoning, and an application
to program semantics.
"""
tags: [
"category:Computer Science/Semantics and Compilation/Semantics"
"keyword: monads"
"keyword: effects"
"keyword: probability"
"keyword: nondeterminism"
"logpath:monae"
"date:2020-08-13"
]
url {
http: "https://github.com/affeldt-aist/monae/archive/0.1.2.tar.gz"
checksum: "sha512=fc06a3dc53e180940478ca8ec02755432c1fb29b6ed81f3312731a1d0435dbe67e78db5201a92e40c7f23068fc5d9343414fc06676bf3adf402836e8c69b0229"
}
</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-monae.0.1.2 coq.8.7.1</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.7.1).
The following dependencies couldn't be met:
- coq-monae -> coq >= 8.11
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-monae.0.1.2</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": "e2d0d6f9a1daf43123e2f1369cfb313a",
"timestamp": "",
"source": "github",
"line_count": 187,
"max_line_length": 159,
"avg_line_length": 39.283422459893046,
"alnum_prop": 0.5515927035121154,
"repo_name": "coq-bench/coq-bench.github.io",
"id": "3cc4ffb9828e5155b5b9e9e258909a9a1a93e012",
"size": "7371",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "clean/Linux-x86_64-4.09.1-2.0.6/released/8.7.1/monae/0.1.2.html",
"mode": "33188",
"license": "mit",
"language": [],
"symlink_target": ""
} |
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef mozilla_dom_HTMLSharedObjectElement_h
#define mozilla_dom_HTMLSharedObjectElement_h
#include "mozilla/Attributes.h"
#include "nsGenericHTMLElement.h"
#include "nsObjectLoadingContent.h"
#include "nsGkAtoms.h"
#include "nsError.h"
#include "nsIDOMHTMLAppletElement.h"
#include "nsIDOMHTMLEmbedElement.h"
namespace mozilla {
namespace dom {
class HTMLSharedObjectElement final : public nsGenericHTMLElement
, public nsObjectLoadingContent
, public nsIDOMHTMLAppletElement
, public nsIDOMHTMLEmbedElement
{
public:
explicit HTMLSharedObjectElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo,
mozilla::dom::FromParser aFromParser = mozilla::dom::NOT_FROM_PARSER);
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
virtual int32_t TabIndexDefault() override;
#ifdef XP_MACOSX
// nsIDOMEventTarget
NS_IMETHOD PostHandleEvent(EventChainPostVisitor& aVisitor) override;
#endif
// nsIDOMHTMLAppletElement
NS_DECL_NSIDOMHTMLAPPLETELEMENT
// Can't use macro for nsIDOMHTMLEmbedElement because it has conflicts with
// NS_DECL_NSIDOMHTMLAPPLETELEMENT.
// nsIDOMHTMLEmbedElement
NS_IMETHOD GetSrc(nsAString &aSrc) override;
NS_IMETHOD SetSrc(const nsAString &aSrc) override;
NS_IMETHOD GetType(nsAString &aType) override;
NS_IMETHOD SetType(const nsAString &aType) override;
virtual nsresult BindToTree(nsIDocument *aDocument, nsIContent *aParent,
nsIContent *aBindingParent,
bool aCompileEventHandlers) override;
virtual void UnbindFromTree(bool aDeep = true,
bool aNullParent = true) override;
virtual nsresult SetAttr(int32_t aNameSpaceID, nsIAtom *aName,
nsIAtom *aPrefix, const nsAString &aValue,
bool aNotify) override;
virtual bool IsHTMLFocusable(bool aWithMouse, bool *aIsFocusable, int32_t *aTabIndex) override;
virtual IMEState GetDesiredIMEState() override;
virtual void DoneAddingChildren(bool aHaveNotified) override;
virtual bool IsDoneAddingChildren() override;
virtual bool ParseAttribute(int32_t aNamespaceID,
nsIAtom *aAttribute,
const nsAString &aValue,
nsAttrValue &aResult) override;
virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction() const override;
NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom *aAttribute) const override;
virtual EventStates IntrinsicState() const override;
virtual void DestroyContent() override;
// nsObjectLoadingContent
virtual uint32_t GetCapabilities() const override;
virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const override;
nsresult CopyInnerTo(Element* aDest);
void StartObjectLoad() { StartObjectLoad(true); }
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED_NO_UNLINK(HTMLSharedObjectElement,
nsGenericHTMLElement)
// WebIDL API for <applet>
void GetAlign(DOMString& aValue)
{
GetHTMLAttr(nsGkAtoms::align, aValue);
}
void SetAlign(const nsAString& aValue, ErrorResult& aRv)
{
SetHTMLAttr(nsGkAtoms::align, aValue, aRv);
}
void GetAlt(DOMString& aValue)
{
GetHTMLAttr(nsGkAtoms::alt, aValue);
}
void SetAlt(const nsAString& aValue, ErrorResult& aRv)
{
SetHTMLAttr(nsGkAtoms::alt, aValue, aRv);
}
void GetArchive(DOMString& aValue)
{
GetHTMLAttr(nsGkAtoms::archive, aValue);
}
void SetArchive(const nsAString& aValue, ErrorResult& aRv)
{
SetHTMLAttr(nsGkAtoms::archive, aValue, aRv);
}
void GetCode(DOMString& aValue)
{
GetHTMLAttr(nsGkAtoms::code, aValue);
}
void SetCode(const nsAString& aValue, ErrorResult& aRv)
{
SetHTMLAttr(nsGkAtoms::code, aValue, aRv);
}
// XPCOM GetCodebase is ok; note that it's a URI attribute
void SetCodeBase(const nsAString& aValue, ErrorResult& aRv)
{
SetHTMLAttr(nsGkAtoms::codebase, aValue, aRv);
}
void GetHeight(DOMString& aValue)
{
GetHTMLAttr(nsGkAtoms::height, aValue);
}
void SetHeight(const nsAString& aValue, ErrorResult& aRv)
{
SetHTMLAttr(nsGkAtoms::height, aValue, aRv);
}
uint32_t Hspace()
{
return GetUnsignedIntAttr(nsGkAtoms::hspace, 0);
}
void SetHspace(uint32_t aValue, ErrorResult& aRv)
{
SetUnsignedIntAttr(nsGkAtoms::hspace, aValue, aRv);
}
void GetName(DOMString& aValue)
{
GetHTMLAttr(nsGkAtoms::name, aValue);
}
void SetName(const nsAString& aValue, ErrorResult& aRv)
{
SetHTMLAttr(nsGkAtoms::name, aValue, aRv);
}
// XPCOM GetObject is ok; note that it's a URI attribute with a weird base URI
void SetObject(const nsAString& aValue, ErrorResult& aRv)
{
SetHTMLAttr(nsGkAtoms::object, aValue, aRv);
}
uint32_t Vspace()
{
return GetUnsignedIntAttr(nsGkAtoms::vspace, 0);
}
void SetVspace(uint32_t aValue, ErrorResult& aRv)
{
SetUnsignedIntAttr(nsGkAtoms::vspace, aValue, aRv);
}
void GetWidth(DOMString& aValue)
{
GetHTMLAttr(nsGkAtoms::width, aValue);
}
void SetWidth(const nsAString& aValue, ErrorResult& aRv)
{
SetHTMLAttr(nsGkAtoms::width, aValue, aRv);
}
// WebIDL <embed> api
// XPCOM GetSrc is ok; note that it's a URI attribute
void SetSrc(const nsAString& aValue, ErrorResult& aRv)
{
SetHTMLAttr(nsGkAtoms::src, aValue, aRv);
}
void GetType(DOMString& aValue)
{
GetHTMLAttr(nsGkAtoms::type, aValue);
}
void SetType(const nsAString& aValue, ErrorResult& aRv)
{
SetHTMLAttr(nsGkAtoms::type, aValue, aRv);
}
// width covered by <applet>
// height covered by <applet>
// align covered by <applet>
// name covered by <applet>
nsIDocument* GetSVGDocument()
{
return GetContentDocument();
}
private:
virtual ~HTMLSharedObjectElement();
/**
* Calls LoadObject with the correct arguments to start the plugin load.
*/
void StartObjectLoad(bool aNotify);
nsIAtom *URIAttrName() const
{
return mNodeInfo->Equals(nsGkAtoms::applet) ?
nsGkAtoms::code :
nsGkAtoms::src;
}
// mIsDoneAddingChildren is only really used for <applet>. This boolean is
// always true for <embed>, per the documentation in nsIContent.h.
bool mIsDoneAddingChildren;
virtual void GetItemValueText(DOMString& text) override;
virtual void SetItemValueText(const nsAString& text) override;
virtual JSObject* WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto) override;
static void MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData);
};
} // namespace dom
} // namespace mozilla
#endif // mozilla_dom_HTMLSharedObjectElement_h
| {
"content_hash": "e86afeb47b9e7d8054d11dab37208845",
"timestamp": "",
"source": "github",
"line_count": 226,
"max_line_length": 105,
"avg_line_length": 31.82300884955752,
"alnum_prop": 0.6885428253615128,
"repo_name": "andrasigneczi/TravelOptimizer",
"id": "a4df86064ffbf60c2946b373c2aa5f961683efbf",
"size": "7192",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "DataCollector/mozilla/xulrunner-sdk/include/mozilla/dom/HTMLSharedObjectElement.h",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "C",
"bytes": "3443874"
},
{
"name": "C++",
"bytes": "33624518"
},
{
"name": "CSS",
"bytes": "1225"
},
{
"name": "HTML",
"bytes": "13117"
},
{
"name": "IDL",
"bytes": "1110940"
},
{
"name": "Java",
"bytes": "562163"
},
{
"name": "JavaScript",
"bytes": "1480"
},
{
"name": "Makefile",
"bytes": "360"
},
{
"name": "Objective-C",
"bytes": "3166"
},
{
"name": "Python",
"bytes": "322743"
},
{
"name": "Shell",
"bytes": "2539"
}
],
"symlink_target": ""
} |
[](https://travis-ci.org/omichelsen/compare-versions)
[](https://coveralls.io/github/omichelsen/compare-versions?branch=master)
Compare [semver](http://semver.org/) version strings to find greater, equal or lesser. Runs in the browser as well as node.js/iojs.
This library supports the full semver specification, including comparing versions with different number of digits like `1.0.0`, `1.0`, `1`, and pre-release versions like `1.0.0-alpha`. Also supports wildcards for minor and patch version like `1.0.x` or `1.0.*`. Any leading `v` is ignored.
## Install
Install with `npm` or `bower`:
```bash
$ npm install compare-versions --save
```
```bash
$ bower install compare-versions --save
```
## Usage
```javascript
var compareVersions = require('compare-versions');
compareVersions('10.1.8', '10.0.4'); // 1
compareVersions('10.0.1', '10.0.1'); // 0
compareVersions('10.1.1', '10.2.2'); // -1
```
Can also be used for sorting:
```javascript
var versions = [
'1.5.19'
'1.2.3',
'1.5.5',
];
console.log(versions.sort(compareVersions));
```
Outputs:
```javascript
[
'1.2.3',
'1.5.5',
'1.5.19'
]
```
| {
"content_hash": "ec78df06844f7006d7c4aef1cbc2620b",
"timestamp": "",
"source": "github",
"line_count": 49,
"max_line_length": 289,
"avg_line_length": 27.224489795918366,
"alnum_prop": 0.6881559220389805,
"repo_name": "juanmont/one",
"id": "11b1c0d20e711180f54a98c8f9dbfb5aef615b07",
"size": "1354",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": ".vscode/extensions/maddouri.cmake-tools-helper-0.1.1/node_modules/compare-versions/README.md",
"mode": "33261",
"license": "apache-2.0",
"language": [
{
"name": "AppleScript",
"bytes": "1153"
},
{
"name": "C",
"bytes": "178636"
},
{
"name": "C++",
"bytes": "3897252"
},
{
"name": "CSS",
"bytes": "134249"
},
{
"name": "HTML",
"bytes": "695949"
},
{
"name": "Java",
"bytes": "537349"
},
{
"name": "JavaScript",
"bytes": "2385751"
},
{
"name": "Lex",
"bytes": "10531"
},
{
"name": "Makefile",
"bytes": "450"
},
{
"name": "Python",
"bytes": "1685923"
},
{
"name": "Roff",
"bytes": "144875"
},
{
"name": "Ruby",
"bytes": "3071764"
},
{
"name": "Shell",
"bytes": "724008"
},
{
"name": "TeX",
"bytes": "1491"
},
{
"name": "TypeScript",
"bytes": "9848"
},
{
"name": "Yacc",
"bytes": "35797"
}
],
"symlink_target": ""
} |
package com.google.api.ads.adwords.jaxws.v201402.cm;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
*
* Specifies how the resulting information should be sorted.
*
*
* <p>Java class for OrderBy complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="OrderBy">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="field" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="sortOrder" type="{https://adwords.google.com/api/adwords/cm/v201402}SortOrder" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "OrderBy", propOrder = {
"field",
"sortOrder"
})
public class OrderBy {
protected String field;
protected SortOrder sortOrder;
/**
* Gets the value of the field property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getField() {
return field;
}
/**
* Sets the value of the field property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setField(String value) {
this.field = value;
}
/**
* Gets the value of the sortOrder property.
*
* @return
* possible object is
* {@link SortOrder }
*
*/
public SortOrder getSortOrder() {
return sortOrder;
}
/**
* Sets the value of the sortOrder property.
*
* @param value
* allowed object is
* {@link SortOrder }
*
*/
public void setSortOrder(SortOrder value) {
this.sortOrder = value;
}
}
| {
"content_hash": "6f1d2112f311e6dbdbc7155361f335ba",
"timestamp": "",
"source": "github",
"line_count": 91,
"max_line_length": 123,
"avg_line_length": 22.846153846153847,
"alnum_prop": 0.5781625781625782,
"repo_name": "nafae/developer",
"id": "e277202676e891a0f63bf1e79953e9ef70e98aec",
"size": "2079",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "modules/adwords_appengine/src/main/java/com/google/api/ads/adwords/jaxws/v201402/cm/OrderBy.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "127846798"
},
{
"name": "Perl",
"bytes": "28418"
}
],
"symlink_target": ""
} |
find_package(PythonInterp REQUIRED)
# Find python package directory
if(NOT DEFINED DEFAULT_PYTHON_PKG_DIR)
execute_process(
COMMAND ${PYTHON_EXECUTABLE} -c
"from distutils.sysconfig import get_python_lib; print(get_python_lib())"
OUTPUT_VARIABLE DEFAULT_PYTHON_PKG_DIR
)
if(DEFAULT_PYTHON_PKG_DIR )
string (STRIP ${DEFAULT_PYTHON_PKG_DIR} DEFAULT_PYTHON_PKG_DIR)
set(DEFAULT_PYTHON_PKG_DIR
${DEFAULT_PYTHON_PKG_DIR} CACHE PATH "Main python package repository.")
mark_as_advanced(DEFAULT_PYTHON_PKG_DIR)
endif(DEFAULT_PYTHON_PKG_DIR)
endif()
if(NOT DEFINED PYTHON_PKG_DIR AND CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(PYTHON_PKG_DIR "${DEFAULT_PYTHON_PKG_DIR}")
elseif(NOT DEFINED PYTHON_PKG_DIR)
set(PYTHON_PKG_DIR "${CMAKE_INSTALL_PREFIX}/lib/python")
set(PYTHON_PKG_DIR "${PYTHON_PKG_DIR}${PYTHON_VERSION_MAJOR}.")
set(PYTHON_PKG_DIR "${PYTHON_PKG_DIR}${PYTHON_VERSION_MINOR}/site-packages")
endif()
if(NOT DEFINED _OLD_PYTHON_PKG_DIR
OR NOT "${PYTHON_PKG_DIR}" STREQUAL "${_OLD_PYTHON_PKG_DIR}")
message(STATUS "Python install path (PYTHON_PKG_DIR): ${PYTHON_PKG_DIR}")
set(_OLD_PYTHON_PKG_DIR "${PYTHON_PKG_DIR}" CACHE INTERNAL
"Current python install path"
)
endif()
# Installs relative to PYTHON_PKG_DIR
function(install_python)
# Modify DESTINATION argument so that it points to the python directory,
# unless path is absolute
list(FIND ARGN DESTINATION destloc)
if(NOT destloc EQUAL -1)
math(EXPR destloc "${destloc} + 1")
list(GET ARGN ${destloc} destination)
if(NOT IS_ABSOLUTE ${destination})
list(REMOVE_AT ARGN ${destloc})
list(LENGTH ARGN length)
if(${length} EQUAL ${destloc})
list(APPEND ARGN "${PYTHON_PKG_DIR}/${destination}")
else()
list(INSERT ARGN ${destloc} "${PYTHON_PKG_DIR}/${destination}")
endif()
endif()
endif()
# Finally, calls normal install routine with modified argument list
install(${ARGN})
endfunction()
| {
"content_hash": "a4605fba191e9d8006fbea59dd8ecc4f",
"timestamp": "",
"source": "github",
"line_count": 53,
"max_line_length": 83,
"avg_line_length": 39.9811320754717,
"alnum_prop": 0.656441717791411,
"repo_name": "UCL/GreatCMakeCookOff",
"id": "7a421b53aca68c1fdddc5fe4a4120ef926239f89",
"size": "2230",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "scripts/PythonInstall.cmake",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "3225"
},
{
"name": "C++",
"bytes": "7885"
},
{
"name": "CMake",
"bytes": "262683"
},
{
"name": "Python",
"bytes": "12068"
},
{
"name": "Shell",
"bytes": "1249"
}
],
"symlink_target": ""
} |
<html>
<head>
<script
type="text/javascript"
src="../../../../js/jquery-1.4.2.min.js">
</script>
<script
type="text/javascript"
src="../../../../syntax_highlighter/scripts/shCore.js">
</script>
<script
type="text/javascript"
src="../../../../syntax_highlighter/scripts/shBrushJScript.js">
</script>
<script
type="text/javascript"
src="../../../../syntax_highlighter/scripts/shBrushPhp.js">
</script>
<script
type="text/javascript"
src="../../../../syntax_highlighter/scripts/shBrushXml.js">
</script>
<link
href="../../../../syntax_highlighter/styles/shCore.css" rel="stylesheet"
type="text/css"
/>
<link
href="../../../../syntax_highlighter/styles/shCoreEclipse.css"
rel="stylesheet" type="text/css"
/>
<link
href="../../../../syntax_highlighter/styles/shThemeWordpress.css"
rel="stylesheet" type="text/css"
/>
</head>
<body>
<pre class="brush: php"><?php
/**
* @see Zend_Gdata_Extension
*/
require_once 'Zend/Gdata/Extension.php';
/**
* Represents the yt:status element
*
* @category Zend
* @package Zend_Gdata
* @subpackage YouTube
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Gdata_YouTube_Extension_Status extends Zend_Gdata_Extension
{
protected $_rootElement = 'status';
protected $_rootNamespace = 'yt';
public function __construct($text = null)
{
$this->registerAllNamespaces(Zend_Gdata_YouTube::$namespaces);
parent::__construct();
$this->_text = $text;
}
}
</pre>
<script type="text/javascript">
SyntaxHighlighter.all();
jQuery('.gutter div').each(function(key, data){
jQuery(data).prepend('<a name="L'+jQuery(data).text()+'"/>');
});
</script>
</body>
</html> | {
"content_hash": "83770c57d73f3b2da487683efdbacdda",
"timestamp": "",
"source": "github",
"line_count": 77,
"max_line_length": 87,
"avg_line_length": 28.48051948051948,
"alnum_prop": 0.5330597355221158,
"repo_name": "VineGlobal/AngularJS-eCommerce",
"id": "3d2da941db206d278b31b42165f5935d415868bd",
"size": "2907",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "ZendGdata-1.12.11/documentation/api/core/source/Gdata/YouTube/Extension/Status.php.html",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ApacheConf",
"bytes": "227"
},
{
"name": "CSS",
"bytes": "117537"
},
{
"name": "HTML",
"bytes": "5958"
},
{
"name": "JavaScript",
"bytes": "51959"
},
{
"name": "PHP",
"bytes": "11924669"
}
],
"symlink_target": ""
} |
// This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
#include "config.h"
#include "V8BeforeInstallPromptEventInit.h"
#include "bindings/core/v8/ExceptionState.h"
#include "bindings/core/v8/V8EventInit.h"
namespace blink {
void V8BeforeInstallPromptEventInit::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value, BeforeInstallPromptEventInit& impl, ExceptionState& exceptionState)
{
if (isUndefinedOrNull(v8Value))
return;
if (!v8Value->IsObject()) {
exceptionState.throwTypeError("cannot convert to dictionary.");
return;
}
V8EventInit::toImpl(isolate, v8Value, impl, exceptionState);
if (exceptionState.hadException())
return;
v8::TryCatch block;
v8::Local<v8::Object> v8Object;
if (!v8Call(v8Value->ToObject(isolate->GetCurrentContext()), v8Object, block)) {
exceptionState.rethrowV8Exception(block.Exception());
return;
}
{
v8::Local<v8::Value> platformsValue;
if (!v8Object->Get(isolate->GetCurrentContext(), v8String(isolate, "platforms")).ToLocal(&platformsValue)) {
exceptionState.rethrowV8Exception(block.Exception());
return;
}
if (platformsValue.IsEmpty() || platformsValue->IsUndefined()) {
// Do nothing.
} else {
Vector<String> platforms = toImplArray<Vector<String>>(platformsValue, 0, isolate, exceptionState);
if (exceptionState.hadException())
return;
impl.setPlatforms(platforms);
}
}
}
v8::Local<v8::Value> toV8(const BeforeInstallPromptEventInit& impl, v8::Local<v8::Object> creationContext, v8::Isolate* isolate)
{
v8::Local<v8::Object> v8Object = v8::Object::New(isolate);
if (!toV8EventInit(impl, v8Object, creationContext, isolate))
return v8::Local<v8::Value>();
if (!toV8BeforeInstallPromptEventInit(impl, v8Object, creationContext, isolate))
return v8::Local<v8::Value>();
return v8Object;
}
bool toV8BeforeInstallPromptEventInit(const BeforeInstallPromptEventInit& impl, v8::Local<v8::Object> dictionary, v8::Local<v8::Object> creationContext, v8::Isolate* isolate)
{
if (impl.hasPlatforms()) {
if (!v8CallBoolean(dictionary->CreateDataProperty(isolate->GetCurrentContext(), v8String(isolate, "platforms"), toV8(impl.platforms(), creationContext, isolate))))
return false;
}
return true;
}
BeforeInstallPromptEventInit NativeValueTraits<BeforeInstallPromptEventInit>::nativeValue(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& exceptionState)
{
BeforeInstallPromptEventInit impl;
V8BeforeInstallPromptEventInit::toImpl(isolate, value, impl, exceptionState);
return impl;
}
} // namespace blink
| {
"content_hash": "37094d5fdca9dfa079093b045e6e7b5f",
"timestamp": "",
"source": "github",
"line_count": 76,
"max_line_length": 174,
"avg_line_length": 37.68421052631579,
"alnum_prop": 0.6731843575418994,
"repo_name": "weolar/miniblink49",
"id": "aea61f4a610dba73a4a511a1e5ed988882c33de9",
"size": "3032",
"binary": false,
"copies": "4",
"ref": "refs/heads/master",
"path": "gen/blink/bindings/modules/v8/V8BeforeInstallPromptEventInit.cpp",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Assembly",
"bytes": "11324372"
},
{
"name": "Batchfile",
"bytes": "52488"
},
{
"name": "C",
"bytes": "32157305"
},
{
"name": "C++",
"bytes": "280103993"
},
{
"name": "CMake",
"bytes": "88548"
},
{
"name": "CSS",
"bytes": "20839"
},
{
"name": "DIGITAL Command Language",
"bytes": "226954"
},
{
"name": "HTML",
"bytes": "202637"
},
{
"name": "JavaScript",
"bytes": "32539485"
},
{
"name": "Lua",
"bytes": "32432"
},
{
"name": "M4",
"bytes": "125191"
},
{
"name": "Makefile",
"bytes": "1517330"
},
{
"name": "NASL",
"bytes": "42"
},
{
"name": "Objective-C",
"bytes": "5320"
},
{
"name": "Objective-C++",
"bytes": "35037"
},
{
"name": "POV-Ray SDL",
"bytes": "307541"
},
{
"name": "Perl",
"bytes": "3283676"
},
{
"name": "Prolog",
"bytes": "29177"
},
{
"name": "Python",
"bytes": "4331616"
},
{
"name": "R",
"bytes": "10248"
},
{
"name": "Scheme",
"bytes": "25457"
},
{
"name": "Shell",
"bytes": "264021"
},
{
"name": "TypeScript",
"bytes": "166033"
},
{
"name": "Vim Script",
"bytes": "11362"
},
{
"name": "XS",
"bytes": "4319"
},
{
"name": "eC",
"bytes": "4383"
}
],
"symlink_target": ""
} |
namespace ginkgo
{
namespace feedbackLoop
{
namespace production
{
////////////////////////////////////////////////////////////////////////////////////////////////////
//
// TestingPolicy
//
////////////////////////////////////////////////////////////////////////////////////////////////////
enum class TestingPolicy
{
Unknown,
FindFirst,
TestAll
};
////////////////////////////////////////////////////////////////////////////////////////////////////
std::ostream &operator<<(std::ostream &ostream, const TestingPolicy &testingPolicy);
std::istream &operator>>(std::istream &istream, TestingPolicy &testingPolicy);
////////////////////////////////////////////////////////////////////////////////////////////////////
}
}
}
#endif
| {
"content_hash": "41c2ddc8f614d6593b58f48d2122e598",
"timestamp": "",
"source": "github",
"line_count": 32,
"max_line_length": 100,
"avg_line_length": 23.09375,
"alnum_prop": 0.33152909336941816,
"repo_name": "potassco/ginkgo",
"id": "fa9293cd55e217317ca9cd3044ad472d0ee9264d",
"size": "867",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "include/ginkgo/feedback-loop/production/TestingPolicy.h",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "962"
},
{
"name": "C++",
"bytes": "328632"
},
{
"name": "CMake",
"bytes": "16036"
}
],
"symlink_target": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.