Removed some cheerful words in the project

This commit is contained in:
Jose Gonzalez 2021-10-08 11:13:28 +02:00
parent 16f2c776f2
commit 4331438765
7 changed files with 483 additions and 444 deletions

View File

@ -88,7 +88,7 @@ public class PandoraWebView extends Activity {
//Check the first load the page for to hide a toast with the //Check the first load the page for to hide a toast with the
//connection message //connection message
//Close the CustomToast (I love this hack, fuck javalovers and yours patterns.). //Close the CustomToast.
if (ConnectionCustomToast.activity != null) if (ConnectionCustomToast.activity != null)
ConnectionCustomToast.activity.finish(); ConnectionCustomToast.activity.finish();
} }

View File

@ -1,428 +1,479 @@
<html> <html>
<head> <head>
<title>gatete</title> <title>gatete</title>
<script type="text/javascript" src="http://code.jquery.com/jquery-2.2.0.min.js"></script> <script
<script type="text/javascript" src="http://d3js.org/d3.v3.min.js"></script> type="text/javascript"
</head> src="http://code.jquery.com/jquery-2.2.0.min.js"
<body> ></script>
<script> <script type="text/javascript" src="http://d3js.org/d3.v3.min.js"></script>
</head>
var svg = d3.select("#test svg"); <body>
</script> <script>
var svg = d3.select("#test svg");
<div id="test"> </script>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1000px" height="1000px" style="background: black;">
<image id="cat_piano" x="400" y="-100" width="50%" height="50%" xlink:href="https://media.giphy.com/media/ymckEpq27dQ9W/giphy.gif" /> <div id="test">
<g id="zoom" transform="translate(-10 20) scale (1)"> <svg
xmlns="http://www.w3.org/2000/svg"
<g xmlns:xlink="http://www.w3.org/1999/xlink"
transform="translate(100, 300) scale(0.50)" width="1000px"
id="cat1"> height="1000px"
<path style="background: black;"
id="path8068" >
d="m 80,286.64792 28.57143,-31.42857 94.28571,60 5.71429,122.85714 L 200,472.3622 l 82.85714,-54.28571 194.28572,8.57143 191.42857,31.42857 48.57143,40 -11.42857,-65.71429 -48.57143,-94.28571 31.42857,-51.42857 14.28571,-88.57143 62.85715,74.28571 65.71428,0 31.42857,-82.85714 42.85715,94.28572 L 920,340.93363 897.14286,423.79078 868.57143,515.21935 800,663.79078 814.28571,795.21935 760,855.21935 734.28571,649.50506 691.42857,672.3622 714.28571,883.79078 640,895.21935 l -8.57143,-208.57143 -85.71428,71.42857 -160,-14.28571 L 317.14286,695.21935 360,838.07649 l -22.85714,65.71429 -74.28572,-200 -11.42857,162.85714 -74.28571,-17.14286 40,-217.14286 -42.85715,-17.14285 5.71429,-85.71429 -5.71429,-54.28571 -2.85714,-108.57143 -20,-42.85714 z" <image
style="fill:none;fill-rule:evenodd;stroke: red; fill: white; stroke-width:4px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> id="cat_piano"
</g> x="400"
y="-100"
<g width="50%"
transform="translate(700, 500) scale(0.25)" height="50%"
id="cat2"> xlink:href="https://media.giphy.com/media/ymckEpq27dQ9W/giphy.gif"
<path />
id="path8068" <g id="zoom" transform="translate(-10 20) scale (1)">
d="m 80,286.64792 28.57143,-31.42857 94.28571,60 5.71429,122.85714 L 200,472.3622 l 82.85714,-54.28571 194.28572,8.57143 191.42857,31.42857 48.57143,40 -11.42857,-65.71429 -48.57143,-94.28571 31.42857,-51.42857 14.28571,-88.57143 62.85715,74.28571 65.71428,0 31.42857,-82.85714 42.85715,94.28572 L 920,340.93363 897.14286,423.79078 868.57143,515.21935 800,663.79078 814.28571,795.21935 760,855.21935 734.28571,649.50506 691.42857,672.3622 714.28571,883.79078 640,895.21935 l -8.57143,-208.57143 -85.71428,71.42857 -160,-14.28571 L 317.14286,695.21935 360,838.07649 l -22.85714,65.71429 -74.28572,-200 -11.42857,162.85714 -74.28571,-17.14286 40,-217.14286 -42.85715,-17.14285 5.71429,-85.71429 -5.71429,-54.28571 -2.85714,-108.57143 -20,-42.85714 z" <g transform="translate(100, 300) scale(0.50)" id="cat1">
style="fill:none;fill-rule:evenodd;stroke: red; fill: white; stroke-width:4px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> <path
</g> id="path8068"
d="m 80,286.64792 28.57143,-31.42857 94.28571,60 5.71429,122.85714 L 200,472.3622 l 82.85714,-54.28571 194.28572,8.57143 191.42857,31.42857 48.57143,40 -11.42857,-65.71429 -48.57143,-94.28571 31.42857,-51.42857 14.28571,-88.57143 62.85715,74.28571 65.71428,0 31.42857,-82.85714 42.85715,94.28572 L 920,340.93363 897.14286,423.79078 868.57143,515.21935 800,663.79078 814.28571,795.21935 760,855.21935 734.28571,649.50506 691.42857,672.3622 714.28571,883.79078 640,895.21935 l -8.57143,-208.57143 -85.71428,71.42857 -160,-14.28571 L 317.14286,695.21935 360,838.07649 l -22.85714,65.71429 -74.28572,-200 -11.42857,162.85714 -74.28571,-17.14286 40,-217.14286 -42.85715,-17.14285 5.71429,-85.71429 -5.71429,-54.28571 -2.85714,-108.57143 -20,-42.85714 z"
<g style="fill:none;fill-rule:evenodd;stroke: red; fill: white; stroke-width:4px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
transform="translate(200, 0) scale(0.25)" />
id="cat3"> </g>
<path
id="path8068" <g transform="translate(700, 500) scale(0.25)" id="cat2">
d="m 80,286.64792 28.57143,-31.42857 94.28571,60 5.71429,122.85714 L 200,472.3622 l 82.85714,-54.28571 194.28572,8.57143 191.42857,31.42857 48.57143,40 -11.42857,-65.71429 -48.57143,-94.28571 31.42857,-51.42857 14.28571,-88.57143 62.85715,74.28571 65.71428,0 31.42857,-82.85714 42.85715,94.28572 L 920,340.93363 897.14286,423.79078 868.57143,515.21935 800,663.79078 814.28571,795.21935 760,855.21935 734.28571,649.50506 691.42857,672.3622 714.28571,883.79078 640,895.21935 l -8.57143,-208.57143 -85.71428,71.42857 -160,-14.28571 L 317.14286,695.21935 360,838.07649 l -22.85714,65.71429 -74.28572,-200 -11.42857,162.85714 -74.28571,-17.14286 40,-217.14286 -42.85715,-17.14285 5.71429,-85.71429 -5.71429,-54.28571 -2.85714,-108.57143 -20,-42.85714 z" <path
style="fill:none;fill-rule:evenodd;stroke: red; fill: white; stroke-width:4px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> id="path8068"
</g> d="m 80,286.64792 28.57143,-31.42857 94.28571,60 5.71429,122.85714 L 200,472.3622 l 82.85714,-54.28571 194.28572,8.57143 191.42857,31.42857 48.57143,40 -11.42857,-65.71429 -48.57143,-94.28571 31.42857,-51.42857 14.28571,-88.57143 62.85715,74.28571 65.71428,0 31.42857,-82.85714 42.85715,94.28572 L 920,340.93363 897.14286,423.79078 868.57143,515.21935 800,663.79078 814.28571,795.21935 760,855.21935 734.28571,649.50506 691.42857,672.3622 714.28571,883.79078 640,895.21935 l -8.57143,-208.57143 -85.71428,71.42857 -160,-14.28571 L 317.14286,695.21935 360,838.07649 l -22.85714,65.71429 -74.28572,-200 -11.42857,162.85714 -74.28571,-17.14286 40,-217.14286 -42.85715,-17.14285 5.71429,-85.71429 -5.71429,-54.28571 -2.85714,-108.57143 -20,-42.85714 z"
style="fill:none;fill-rule:evenodd;stroke: red; fill: white; stroke-width:4px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
<g />
transform="translate(600, 0) scale(0.25)" </g>
id="cat4">
<path <g transform="translate(200, 0) scale(0.25)" id="cat3">
id="path8068" <path
d="m 80,286.64792 28.57143,-31.42857 94.28571,60 5.71429,122.85714 L 200,472.3622 l 82.85714,-54.28571 194.28572,8.57143 191.42857,31.42857 48.57143,40 -11.42857,-65.71429 -48.57143,-94.28571 31.42857,-51.42857 14.28571,-88.57143 62.85715,74.28571 65.71428,0 31.42857,-82.85714 42.85715,94.28572 L 920,340.93363 897.14286,423.79078 868.57143,515.21935 800,663.79078 814.28571,795.21935 760,855.21935 734.28571,649.50506 691.42857,672.3622 714.28571,883.79078 640,895.21935 l -8.57143,-208.57143 -85.71428,71.42857 -160,-14.28571 L 317.14286,695.21935 360,838.07649 l -22.85714,65.71429 -74.28572,-200 -11.42857,162.85714 -74.28571,-17.14286 40,-217.14286 -42.85715,-17.14285 5.71429,-85.71429 -5.71429,-54.28571 -2.85714,-108.57143 -20,-42.85714 z" id="path8068"
style="fill:none;fill-rule:evenodd;stroke: red; fill: white; stroke-width:4px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> d="m 80,286.64792 28.57143,-31.42857 94.28571,60 5.71429,122.85714 L 200,472.3622 l 82.85714,-54.28571 194.28572,8.57143 191.42857,31.42857 48.57143,40 -11.42857,-65.71429 -48.57143,-94.28571 31.42857,-51.42857 14.28571,-88.57143 62.85715,74.28571 65.71428,0 31.42857,-82.85714 42.85715,94.28572 L 920,340.93363 897.14286,423.79078 868.57143,515.21935 800,663.79078 814.28571,795.21935 760,855.21935 734.28571,649.50506 691.42857,672.3622 714.28571,883.79078 640,895.21935 l -8.57143,-208.57143 -85.71428,71.42857 -160,-14.28571 L 317.14286,695.21935 360,838.07649 l -22.85714,65.71429 -74.28572,-200 -11.42857,162.85714 -74.28571,-17.14286 40,-217.14286 -42.85715,-17.14285 5.71429,-85.71429 -5.71429,-54.28571 -2.85714,-108.57143 -20,-42.85714 z"
</g> style="fill:none;fill-rule:evenodd;stroke: red; fill: white; stroke-width:4px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
</g> />
</svg> </g>
</div>
<script type="text/javascript"> <g transform="translate(600, 0) scale(0.25)" id="cat4">
var svg = d3.select("svg #zoom"); <path
id="path8068"
d="m 80,286.64792 28.57143,-31.42857 94.28571,60 5.71429,122.85714 L 200,472.3622 l 82.85714,-54.28571 194.28572,8.57143 191.42857,31.42857 48.57143,40 -11.42857,-65.71429 -48.57143,-94.28571 31.42857,-51.42857 14.28571,-88.57143 62.85715,74.28571 65.71428,0 31.42857,-82.85714 42.85715,94.28572 L 920,340.93363 897.14286,423.79078 868.57143,515.21935 800,663.79078 814.28571,795.21935 760,855.21935 734.28571,649.50506 691.42857,672.3622 714.28571,883.79078 640,895.21935 l -8.57143,-208.57143 -85.71428,71.42857 -160,-14.28571 L 317.14286,695.21935 360,838.07649 l -22.85714,65.71429 -74.28572,-200 -11.42857,162.85714 -74.28571,-17.14286 40,-217.14286 -42.85715,-17.14285 5.71429,-85.71429 -5.71429,-54.28571 -2.85714,-108.57143 -20,-42.85714 z"
style="fill:none;fill-rule:evenodd;stroke: red; fill: white; stroke-width:4px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
svg.append("g") />
.attr("id", "circulo") </g>
.attr("transform", </g>
function(d) { </svg>
return "translate(" + get_center_element("#cat1")[0] + " " + get_center_element("#cat1")[1] + ")";}) </div>
.append("circle") <script type="text/javascript">
.attr("style", "fill: rgb(0, 255, 0);") var svg = d3.select("svg #zoom");
.attr("cx", 0)
.attr("cy", 0) svg
.attr("r", 20); .append("g")
.attr("id", "circulo")
svg.append("g") .attr("transform", function(d) {
.attr("transform", return (
function(d) { return "translate(" + get_pos_element("#cat1")[0] + " " + get_pos_element("#cat1")[1] + ") scale(" + get_scale_element("#cat1") + ")";}) "translate(" +
.append("rect") get_center_element("#cat1")[0] +
.attr("style", "fill:none; stroke:#ffff00;stroke-width:5") " " +
.attr("width", function(d) { return get_size_element("#cat1")[0];}) get_center_element("#cat1")[1] +
.attr("height", function(d) { return get_size_element("#cat1")[1];}); ")"
);
svg.append("g") })
.attr("transform", .append("circle")
function(d) { .attr("style", "fill: rgb(0, 255, 0);")
return "translate(" + get_center_element("#cat1")[0] + " " + get_center_element("#cat1")[1] + ") scale(" + get_scale_element("#cat1") + ")";}) .attr("cx", 0)
.append("circle") .attr("cy", 0)
.attr("style", "fill: none; stroke-width: 5; stroke: rgb(0, 0, 255);") .attr("r", 20);
.attr("cx", 0)
.attr("cy", 0) svg
.attr("r", get_radius_element("#cat1")); .append("g")
.attr("transform", function(d) {
svg.append("g") return (
.attr("id", "circulo") "translate(" +
.attr("transform", get_pos_element("#cat1")[0] +
function(d) { " " +
return "translate(" + get_center_element("#cat3")[0] + " " + get_center_element("#cat3")[1] + ")";}) get_pos_element("#cat1")[1] +
.append("circle") ") scale(" +
.attr("style", "fill: rgb(0, 255, 0);") get_scale_element("#cat1") +
.attr("cx", 0) ")"
.attr("cy", 0) );
.attr("r", 20); })
.append("rect")
svg.append("g") .attr("style", "fill:none; stroke:#ffff00;stroke-width:5")
.attr("transform", .attr("width", function(d) {
function(d) { return "translate(" + get_pos_element("#cat3")[0] + " " + get_pos_element("#cat3")[1] + ") scale(" + get_scale_element("#cat3") + ")";}) return get_size_element("#cat1")[0];
.append("rect") })
.attr("style", "fill:none; stroke:#ffff00;stroke-width:5") .attr("height", function(d) {
.attr("width", function(d) { return get_size_element("#cat3")[0];}) return get_size_element("#cat1")[1];
.attr("height", function(d) { return get_size_element("#cat3")[1];}); });
svg.append("g") svg
.attr("transform", .append("g")
function(d) { .attr("transform", function(d) {
return "translate(" + get_center_element("#cat3")[0] + " " + get_center_element("#cat3")[1] + ") scale(" + get_scale_element("#cat3") + ")";}) return (
.append("circle") "translate(" +
.attr("style", "fill: none; stroke-width: 5; stroke: rgb(0, 0, 255);") get_center_element("#cat1")[0] +
.attr("cx", 0) " " +
.attr("cy", 0) get_center_element("#cat1")[1] +
.attr("r", get_radius_element("#cat3")); ") scale(" +
get_scale_element("#cat1") +
")"
);
})
arrow_by_pieces2("gatete_flecha", "cat1", "cat2"); .append("circle")
arrow_by_pieces2("gatete_flecha2", "cat1", "cat4"); .attr("style", "fill: none; stroke-width: 5; stroke: rgb(0, 0, 255);")
arrow_by_pieces2("gatete_flecha3", "cat3", "cat4"); .attr("cx", 0)
.attr("cy", 0)
.attr("r", get_radius_element("#cat1"));
//~ arrow_by_pieces("gatete_flecha", "cat1", "cat2"); svg
//~ arrow_by_pieces("gatete_flecha", "cat3", "cat4"); .append("g")
.attr("id", "circulo")
/** .attr("transform", function(d) {
* Function get_radius_element return (
* Return float "translate(" +
* This method get the element radius get_center_element("#cat3")[0] +
*/ " " +
function get_radius_element(element) { get_center_element("#cat3")[1] +
var size = get_size_element(element); ")"
);
return Math.sqrt( })
Math.pow(size[0] / 2, 2) + Math.pow(size[1] / 2, 2)); .append("circle")
} .attr("style", "fill: rgb(0, 255, 0);")
.attr("cx", 0)
/** .attr("cy", 0)
* Function get_scale_element .attr("r", 20);
* Return float
* This method get the element escale svg
*/ .append("g")
function get_scale_element(element) { .attr("transform", function(d) {
var element_t = d3.transform(d3.select(element).attr("transform")); return (
var element_t_scale = parseFloat(element_t['scale']); "translate(" +
get_pos_element("#cat3")[0] +
return element_t_scale; " " +
} get_pos_element("#cat3")[1] +
") scale(" +
/** get_scale_element("#cat3") +
* Function get_size_element ")"
* Return array[2] );
* This method get the element size [width, height] })
*/ .append("rect")
function get_size_element(element) { .attr("style", "fill:none; stroke:#ffff00;stroke-width:5")
var element_b = d3.select(element).node().getBBox(); .attr("width", function(d) {
return get_size_element("#cat3")[0];
return [element_b['width'], element_b['height']]; })
} .attr("height", function(d) {
return get_size_element("#cat3")[1];
/** });
* Function get_pos_element
* Return array[2] svg
* This method get the element position [x, y] .append("g")
*/ .attr("transform", function(d) {
function get_pos_element(element) { return (
var element_t = d3.transform(d3.select(element).attr("transform")); "translate(" +
var element_t_scale = parseFloat(element_t['scale']); get_center_element("#cat3")[0] +
var element_b = d3.select(element).node().getBBox(); " " +
get_center_element("#cat3")[1] +
var box_x = parseFloat(element_t.translate[0]) + ") scale(" +
parseFloat(element_b['x']) * element_t_scale; get_scale_element("#cat3") +
var box_y = parseFloat(element_t.translate[1]) + ")"
parseFloat(element_b['y']) * element_t_scale; );
})
return [box_x, box_y]; .append("circle")
} .attr("style", "fill: none; stroke-width: 5; stroke: rgb(0, 0, 255);")
.attr("cx", 0)
/** .attr("cy", 0)
* Function get_center_element .attr("r", get_radius_element("#cat3"));
* Return array[2]
* This method ge2t the element center point [x, y] arrow_by_pieces2("gatete_flecha", "cat1", "cat2");
*/ arrow_by_pieces2("gatete_flecha2", "cat1", "cat4");
function get_center_element(element) { arrow_by_pieces2("gatete_flecha3", "cat3", "cat4");
var element_t = d3.transform(d3.select(element).attr("transform"));
var element_t_scale = parseFloat(element_t['scale']); //~ arrow_by_pieces("gatete_flecha", "cat1", "cat2");
var element_b = d3.select(element).node().getBBox(); //~ arrow_by_pieces("gatete_flecha", "cat3", "cat4");
var box_x = parseFloat(element_t.translate[0]) + /**
parseFloat(element_b['x']) * element_t_scale; * Function get_radius_element
var box_y = parseFloat(element_t.translate[1]) + * Return float
parseFloat(element_b['y']) * element_t_scale; * This method get the element radius
*/
var width = (element_t_scale * element_b['width']); function get_radius_element(element) {
var height = (element_t_scale * element_b['height']); var size = get_size_element(element);
var c_x = box_x + (width / 2); return Math.sqrt(Math.pow(size[0] / 2, 2) + Math.pow(size[1] / 2, 2));
var c_y = box_y + (height / 2); }
return [c_x, c_y]; /**
} * Function get_scale_element
* Return float
/** * This method get the element escale
* Function get_distance_between_point */
* Return float function get_scale_element(element) {
* This method get the distance betweeen two points var element_t = d3.transform(d3.select(element).attr("transform"));
*/ var element_t_scale = parseFloat(element_t["scale"]);
function get_distance_between_point(point1, point2) {
delta_x = Math.abs(point1[0] - point2[0]); return element_t_scale;
delta_y = Math.abs(point1[1] - point1[1]); }
return Math.sqrt( /**
Math.pow(delta_x, 2) + Math.pow(delta_y, 2)); * Function get_size_element
} * Return array[2]
* This method get the element size [width, height]
*/
function get_size_element(element) {
/** var element_b = d3
* Function get_angle_of_line .select(element)
* Return float .node()
* This method get the angle of line and x axe .getBBox();
*/
function get_angle_of_line(point1, point2) { return [element_b["width"], element_b["height"]];
return Math.atan2(point2[1] - point1[1], point2[0] - point1[0]) * 180 / Math.PI; }
}
/**
* Function get_pos_element
* Return array[2]
//~ function wait_for_preload_symbol(symbol) { * This method get the element position [x, y]
//~ preload_symbol(symbol); */
//~ function get_pos_element(element) {
//~ while (!is_preload_symbol(symbol)) { var element_t = d3.transform(d3.select(element).attr("transform"));
//~ sleep(1000); var element_t_scale = parseFloat(element_t["scale"]);
//~ } var element_b = d3
//~ } .select(element)
//~ .node()
//~ function arrow_by_pieces(id_arrow, element1, element2, step) { .getBBox();
//~
//~ wait_for_preload_symbol('pedo'); var box_x =
//~ wait_for_preload_symbol('caca'); parseFloat(element_t.translate[0]) +
//~ ... parseFloat(element_b["x"]) * element_t_scale;
//~ } var box_y =
parseFloat(element_t.translate[1]) +
parseFloat(element_b["y"]) * element_t_scale;
function arrow_by_pieces2(id_arrow, element1, element2, step) { return [box_x, box_y];
if (typeof(step) === "undefined") }
step = 0;
/**
step++; * Function get_center_element
* Return array[2]
switch (step) { * This method ge2t the element center point [x, y]
case 1: */
wait_for_preload_symbols( function get_center_element(element) {
["body_arrow.svg#body_arrow", var element_t = d3.transform(d3.select(element).attr("transform"));
"head_arrow.svg#head_arrow"], var element_t_scale = parseFloat(element_t["scale"]);
function() { var element_b = d3
arrow_by_pieces2(id_arrow, element1, element2, step) .select(element)
}); .node()
break; .getBBox();
case 2:
var box_x =
var arrow = svg.append("g") parseFloat(element_t.translate[0]) +
.attr("id", id_arrow) parseFloat(element_b["x"]) * element_t_scale;
.attr("style", "opacity: 0"); var box_y =
parseFloat(element_t.translate[1]) +
arrow.append("g") parseFloat(element_b["y"]) * element_t_scale;
.attr("id", "body")
.append("use") var width = element_t_scale * element_b["width"];
.attr("xlink:href", "body_arrow.svg#body_arrow"); var height = element_t_scale * element_b["height"];
arrow.append("g") var c_x = box_x + width / 2;
.attr("id", "head") var c_y = box_y + height / 2;
.append("use")
.attr("xlink:href", "head_arrow.svg#head_arrow"); return [c_x, c_y];
}
var c_elem1 = get_center_element("#" + element1); /**
var c_elem2 = get_center_element("#" + element2); * Function get_distance_between_point
var distance = get_distance_between_point(c_elem1, c_elem2); * Return float
* This method get the distance betweeen two points
var transform = d3.transform(); */
function get_distance_between_point(point1, point2) {
/*---------------------------------------------*/ delta_x = Math.abs(point1[0] - point2[0]);
/*--- Position of layer arrow (body + head) ---*/ delta_y = Math.abs(point1[1] - point1[1]);
/*---------------------------------------------*/
var arrow = d3.select("#" + id_arrow); return Math.sqrt(Math.pow(delta_x, 2) + Math.pow(delta_y, 2));
}
var arrow_body = d3.select("#" + id_arrow + " #body");
var arrow_body_b = arrow_body.node().getBBox(); /**
* Function get_angle_of_line
transform.translate[0] = c_elem1[0]; * Return float
transform.translate[1] = c_elem1[1] - arrow_body_b['height'] / 2; * This method get the angle of line and x axe
transform.rotate = get_angle_of_line(c_elem1, c_elem2); */
function get_angle_of_line(point1, point2) {
arrow.attr("transform", transform.toString()); return (
(Math.atan2(point2[1] - point1[1], point2[0] - point1[0]) * 180) /
/*---------------------------------------------*/ Math.PI
/*-------- Resize the body arrow width --------*/ );
/*---------------------------------------------*/ }
var arrow_body = d3.select("#" + id_arrow + " #body");
var arrow_body_b = arrow_body.node().getBBox(); function arrow_by_pieces2(id_arrow, element1, element2, step) {
var arrow_head = d3.select("#" + id_arrow + " #head"); if (typeof step === "undefined") step = 0;
var arrow_head_b = arrow_head.node().getBBox();
step++;
var body_width = distance - arrow_head_b['width'];
switch (step) {
transform = d3.transform(); case 1:
transform.scale[0] = body_width / arrow_body_b['width']; wait_for_preload_symbols(
arrow_body.attr("transform", transform.toString()); ["body_arrow.svg#body_arrow", "head_arrow.svg#head_arrow"],
function() {
/*---------------------------------------------*/ arrow_by_pieces2(id_arrow, element1, element2, step);
/*---------- Position of head arrow -----------*/ }
/*---------------------------------------------*/ );
transform = d3.transform(); break;
case 2:
var arrow_body_t = d3.transform(arrow_body.attr("transform")); var arrow = svg
.append("g")
var scale = arrow_body_t.scale[0]; .attr("id", id_arrow)
var x = 0 + arrow_body_b['width'] * scale; .attr("style", "opacity: 0");
var y = 0 + (arrow_body_b['height'] / 2 - arrow_head_b['height'] / 2);
arrow
transform.translate[0] = x; .append("g")
transform.translate[1] = y; .attr("id", "body")
.append("use")
arrow_head.attr("transform", transform.toString()); .attr("xlink:href", "body_arrow.svg#body_arrow");
/*---------------------------------------------*/ arrow
/*------- Show the result in one time ---------*/ .append("g")
/*---------------------------------------------*/ .attr("id", "head")
arrow.attr("style", "opacity: 1"); .append("use")
break; .attr("xlink:href", "head_arrow.svg#head_arrow");
}
} var c_elem1 = get_center_element("#" + element1);
var c_elem2 = get_center_element("#" + element2);
function wait_for_preload_symbols(symbols, callback) { var distance = get_distance_between_point(c_elem1, c_elem2);
var count_symbols = symbols.length;
var transform = d3.transform();
function wait(symbol, callback) {
switch (is_preload_symbol(symbol)) { /*---------------------------------------------*/
case -1: /*--- Position of layer arrow (body + head) ---*/
preload_symbol(symbol); /*---------------------------------------------*/
var arrow = d3.select("#" + id_arrow);
setTimeout(function() {
wait(symbol, var arrow_body = d3.select("#" + id_arrow + " #body");
callback); var arrow_body_b = arrow_body.node().getBBox();
}, 100);
break; transform.translate[0] = c_elem1[0];
case 0: transform.translate[1] = c_elem1[1] - arrow_body_b["height"] / 2;
// Wait transform.rotate = get_angle_of_line(c_elem1, c_elem2);
setTimeout(function() {
wait(symbol, arrow.attr("transform", transform.toString());
callback);
}, 100); /*---------------------------------------------*/
break; /*-------- Resize the body arrow width --------*/
case 1: /*---------------------------------------------*/
count_symbols--; var arrow_body = d3.select("#" + id_arrow + " #body");
break; var arrow_body_b = arrow_body.node().getBBox();
} var arrow_head = d3.select("#" + id_arrow + " #head");
var arrow_head_b = arrow_head.node().getBBox();
if (count_symbols == 0) {
//~ setTimeout(function() { var body_width = distance - arrow_head_b["width"];
//~ callback();
//~ }, 1000); transform = d3.transform();
callback(); transform.scale[0] = body_width / arrow_body_b["width"];
} arrow_body.attr("transform", transform.toString());
}
/*---------------------------------------------*/
for (var i in symbols) { /*---------- Position of head arrow -----------*/
wait(symbols[i], callback); /*---------------------------------------------*/
} transform = d3.transform();
}
var arrow_body_t = d3.transform(arrow_body.attr("transform"));
function preload_symbol(symbol, param_step) { var scale = arrow_body_t.scale[0];
var step; var x = 0 + arrow_body_b["width"] * scale;
var y =
0 + (arrow_body_b["height"] / 2 - arrow_head_b["height"] / 2);
if (typeof(param_step) == "undefined") {
step = 1; transform.translate[0] = x;
param_step = 1; transform.translate[1] = y;
}
else { arrow_head.attr("transform", transform.toString());
step = param_step;
} /*---------------------------------------------*/
/*------- Show the result in one time ---------*/
/*---------------------------------------------*/
step++; arrow.attr("style", "opacity: 1");
break;
var base64symbol = btoa(symbol).replace(/=/g, ""); }
}
var callback = function (e) {
preload_symbol(symbol, step); function wait_for_preload_symbols(symbols, callback) {
} var count_symbols = symbols.length;
switch (param_step) { function wait(symbol, callback) {
case 1: switch (is_preload_symbol(symbol)) {
d3.select("svg").append("g") case -1:
.attr("id", base64symbol) preload_symbol(symbol);
.attr("data-loaded", 0)
.style("opacity", 0) setTimeout(function() {
.append("use") wait(symbol, callback);
.attr("xlink:href", symbol) }, 100);
.on("load", callback); break;
break; case 0:
case 2: // Wait
d3.select("#" + base64symbol).attr("data-loaded", 1); setTimeout(function() {
wait(symbol, callback);
break; }, 100);
} break;
} case 1:
count_symbols--;
function is_preload_symbol(symbol) { break;
var base64symbol = btoa(symbol).replace(/=/g, ""); }
if (d3.select("#" + base64symbol).node() === null) if (count_symbols == 0) {
return -1; //~ setTimeout(function() {
//~ callback();
return parseInt(d3.select("#" + base64symbol).attr("data-loaded")); //~ }, 1000);
} callback();
</script> }
</body> }
for (var i in symbols) {
wait(symbols[i], callback);
}
}
function preload_symbol(symbol, param_step) {
var step;
if (typeof param_step == "undefined") {
step = 1;
param_step = 1;
} else {
step = param_step;
}
step++;
var base64symbol = btoa(symbol).replace(/=/g, "");
var callback = function(e) {
preload_symbol(symbol, step);
};
switch (param_step) {
case 1:
d3.select("svg")
.append("g")
.attr("id", base64symbol)
.attr("data-loaded", 0)
.style("opacity", 0)
.append("use")
.attr("xlink:href", symbol)
.on("load", callback);
break;
case 2:
d3.select("#" + base64symbol).attr("data-loaded", 1);
break;
}
}
function is_preload_symbol(symbol) {
var base64symbol = btoa(symbol).replace(/=/g, "");
if (d3.select("#" + base64symbol).node() === null) return -1;
return parseInt(d3.select("#" + base64symbol).attr("data-loaded"));
}
</script>
</body>
</html> </html>

View File

@ -118,8 +118,8 @@ class ClientTest extends \PHPUnit\Framework\TestCase
system('echo "file3" > '.$path.'3'); system('echo "file3" > '.$path.'3');
file_put_contents($path.'extras/delete_files/delete_files.txt', "1\n"); file_put_contents($path.'extras/delete_files/delete_files.txt', "1\n");
system('echo -e "create table teta (id int);\n" >'.$path.'extras/mr/2.sql'); system('echo -e "create table toum1 (id int);\n" >'.$path.'extras/mr/2.sql');
system('echo -e "create table teto (id int);\n" >>'.$path.'extras/mr/2.sql'); system('echo -e "create table toum2 (id int);\n" >>'.$path.'extras/mr/2.sql');
system('cd '.$path.' && zip '.$target.'/test_3.zip -r * >/dev/null'); system('cd '.$path.' && zip '.$target.'/test_3.zip -r * >/dev/null');
system('mv '.$target.'/test_3.zip '.$target.'/test_3.oum'); system('mv '.$target.'/test_3.zip '.$target.'/test_3.oum');
@ -142,7 +142,7 @@ class ClientTest extends \PHPUnit\Framework\TestCase
system('echo "file4" > '.$path.'4'); system('echo "file4" > '.$path.'4');
file_put_contents($path.'extras/delete_files/delete_files.txt', "1\n"); file_put_contents($path.'extras/delete_files/delete_files.txt', "1\n");
system('echo -e "drop table teta;\n" >'.$path.'extras/mr/3.sql'); system('echo -e "drop table toum1;\n" >'.$path.'extras/mr/3.sql');
system('cd '.$path.' && zip '.$target.'/test_4.zip -r * >/dev/null'); system('cd '.$path.' && zip '.$target.'/test_4.zip -r * >/dev/null');
system('mv '.$target.'/test_4.zip '.$target.'/test_4.oum'); system('mv '.$target.'/test_4.zip '.$target.'/test_4.oum');

View File

@ -108,7 +108,7 @@ class ModuleGraph
$this->height -= 80; $this->height -= 80;
// Correct the height // Correct the height
// For to avoid fucking IPHONES when they are in horizontal. // For to avoid IPHONES when they are in horizontal.
if ($this->height < 140) { if ($this->height < 140) {
$this->height = 140; $this->height = 140;
} }

View File

@ -261,23 +261,22 @@ foreach ($result as $row) {
$data[] = $attr[1] ($row[$attr[0]]); $data[] = $attr[1] ($row[$attr[0]]);
} else if (($config['command_snapshot']) && (preg_match("/[\n]+/i", $row[$attr[0]]))) { } else if (($config['command_snapshot']) && (preg_match("/[\n]+/i", $row[$attr[0]]))) {
// Its a single-data, multiline data (data snapshot) ? // Its a single-data, multiline data (data snapshot) ?
// Detect string data with \n and convert to <br>'s // Detect string data with \n and convert to <br>'s.
$datos = preg_replace('/\n/i', '<br>', $row[$attr[0]]); $datos = preg_replace('/\n/i', '<br>', $row[$attr[0]]);
$datos = preg_replace('/\s/i', '&nbsp;', $datos); $datos = preg_replace('/\s/i', '&nbsp;', $datos);
// Because this *SHIT* of print_table monster, I cannot format properly this cells // Because this print_table monster, I cannot format properly this cells.
// so, eat this, motherfucker :))
$datos = "<span class='mono'>".$datos.'</span>'; $datos = "<span class='mono'>".$datos.'</span>';
// I dont why, but using index (value) method, data is automatically converted to html entities ¿? // I dont why, but using index (value) method, data is automatically converted to html entities ¿?
$data[$attr[1]] = $datos; $data[$attr[1]] = $datos;
} else if ($is_web_content_string) { } else if ($is_web_content_string) {
// Fixed the goliat sends the strings from web // Fixed the goliat sends the strings from web
// without HTML entities // without HTML entities.
$data[$attr[1]] = io_safe_input($row[$attr[0]]); $data[$attr[1]] = io_safe_input($row[$attr[0]]);
} else { } else {
// Just a string of alphanumerical data... just do print // Just a string of alphanumerical data... just do print
// Fixed the data from Selenium Plugin // Fixed the data from Selenium Plugin.
if ($row[$attr[0]] != strip_tags($row[$attr[0]])) { if ($row[$attr[0]] != strip_tags($row[$attr[0]])) {
$data[$attr[1]] = io_safe_input($row[$attr[0]]); $data[$attr[1]] = io_safe_input($row[$attr[0]]);
} else { } else {

View File

@ -134,9 +134,7 @@ sunshine
hunter hunter
4321 4321
buddy buddy
porn
morgan morgan
fuck
4128 4128
whatever whatever
matrix matrix
@ -164,7 +162,6 @@ charles
thomas thomas
casper casper
jackie jackie
cumshot
girls girls
tigger tigger
stupid stupid
@ -172,7 +169,6 @@ monica
boston boston
booboo booboo
robert robert
shit
midnight midnight
braves braves
coffee coffee
@ -212,11 +208,9 @@ sierra
mercedes mercedes
johnny johnny
george george
cumming
leather leather
5150 5150
gandalf gandalf
sexy
hunting hunting
232323 232323
doggie doggie
@ -279,8 +273,6 @@ member
anthony anthony
austin austin
paul paul
fucked
boobs
blowme blowme
william william
mine mine
@ -419,13 +411,11 @@ freedom
magnum magnum
extreme extreme
internet internet
fucking
ginger ginger
juice juice
redskins redskins
action action
captain captain
blowjob
abgrtyu abgrtyu
erotic erotic
carter carter
@ -478,7 +468,6 @@ winner
131313 131313
mistress mistress
florida florida
cock
samantha samantha
123123 123123
phantom phantom

View File

@ -929,9 +929,9 @@ sub PandoraFMS::Recon::Base::create_network_profile_modules($$) {
# 2. Verify Private Enterprise Number matches (PEN) # 2. Verify Private Enterprise Number matches (PEN)
if (defined($template->{'pen'})) { if (defined($template->{'pen'})) {
my @penes = split(',', $template->{'pen'}); my @pens = split(',', $template->{'pen'});
next unless (is_in_array(\@penes, $self->get_pen($device))); next unless (is_in_array(\@pens, $self->get_pen($device)));
} }
# 3. Retrieve module list from target template. # 3. Retrieve module list from target template.