text:
package org.apache.edgent.connectors.mqtt.iot;

import java.nio.charset.StandardCharsets;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Properties;
import java.util.Set;

import org.apache.edgent.connectors.iot.IotDevice;
import org.apache.edgent.connectors.mqtt.MqttConfig;
import org.apache.edgent.connectors.mqtt.MqttStreams;
import org.apache.edgent.function.Function;
import org.apache.edgent.function.UnaryOperator;
import org.apache.edgent.topology.TSink;
import org.apache.edgent.topology.TStream;
import org.apache.edgent.topology.Topology;
import org.apache.edgent.topology.json.JsonFunctions;

import com.google.gson.JsonObject;

/**
 * An MQTT based Edgent {@link IotDevice} connector.
 *

 * The MQTT {@code IotDevice} is an abstraction on top of
 * the {@link MqttStreams} connector.
 *

 * The connector doesn't presume a particular pattern for
 * Device MQTT "event" and "command" topics though default
 * patterns are provided.
 *

 * The MQTT message content for device events and device commands must be JSON.
 * The contents of the JSON are under the control of the collaborating MQTT clients.
 * Typically a device to defines its event and command schemas
 * and the other clients to adapt accordingly.
 * See {@link #commands(String...)} and {@link #events(TStream, String, int) events()}
 * for a description of how MQTT messages are converted to and from stream tuples.
 *

 * Connector configuration Properties fall into two categories:
 *

 *
MQTT Device abstraction properties

 *
Base MQTT connector properties - see {@link MqttConfig#fromProperties(Properties)}
 *

 *
 *
Device properties

 *

 *
mqttDevice.id - Required. An identifier that uniquely identifies
 *     the device in the device event and device command MQTT topic namespaces.
 *

 *
mqttDevice.topic.prefix - A optional prefix that by default is used when
 *     composing device event and command MQTT topics, and the client's MQTT
 *     clientId.  The default is no prefix.

 *
mqttDevice.event.topic.pattern - Optional.  The topic pattern used
 *     for MQTT device event topics.
 *     Defaults to {@code {mqttDevice.topic.prefix}id/{mqttDevice.id}/evt/{EVENTID}/fmt/json}
 *     The pattern must include {EVENTID} and must end with "/fmt/json".
 *

 *
mqttDevice.command.topic.pattern - Optional.  The topic pattern used
 *     for MQTT device command topics.
 *     Defaults to {@code {mqttDevice.topic.prefix}id/{mqttDevice.id}/cmd/{COMMAND}/fmt/json}
 *     The pattern must include {COMMAND} and must end with "/fmt/json".
 *

 *
mqttDevice.command.qos - An optional MQTT QoS value for commands. Defaults to 0.

 *
mqttDevice.events.retain - Optional MQTT "retain" behavior for published events.  Defaults to false.

 *
mqttDevice.mqtt.clientId - Optional value to use for the MQTT clientId.
 *     Defaults to {mqttDevice.topic.prefix}id/{mqttDevice.id}.

 *

 * Sample use:
 *
{@code
 *  // assuming a properties file containing at least:
 *  // mqttDevice.id=012345678
 *  // mqtt.serverURLs=tcp://myMqttBrokerHost:1883
 *
 * String propsPath = <path to properties file>;
 * Properties properties = new Properties();
 * properties.load(Files.newBufferedReader(new File(propsPath).toPath()));

 * Topology t = new DirectProvider();
 * MqttDevice mqttDevice = new MqttDevice(t, properties);
 *
 * // publish JSON "status" device event tuples every hour
 * TStream<JsonObject> myStatusEvents = t.poll(myGetStatusAsJson(), 1, TimeUnit.HOURS);
 * mqttDevice.events(myStatusEvents, "status", QoS.FIRE_AND_FORGET);
 *
 * // handle a device command.  In this example the payload is expected
 * // to be JSON and have a "value" property containing the new threshold.
 * mqttDevice.command("setSensorThreshold")
 *     .sink(json -> setSensorThreshold(json.get(CMD_PAYLOAD).getAsJsonObject().get("value").getAsString());
 * }

 */
public class MqttDevice implements IotDevice {

    private final Topology topology;
    private final String deviceId;
    private String topicPrefix = "";
    private String clientId = "{mqttDevice.topic.prefix}id/{mqttDevice.id}";
    private String evtTopic = "{mqttDevice.topic.prefix}id/{mqttDevice.id}/evt/{EVENTID}/fmt/json";
    private String cmdTopic = "{mqttDevice.topic.prefix}id/{mqttDevice.id}/cmd/{COMMAND}/fmt/json";
    private int commandQoS = 0;
    private boolean retainEvents = false;
    private final MqttConfig mqttConfig;
    private final MqttStreams connector;
    private TStream<JsonObject> commandStream;

    /**
     * Create an MqttDevice connector.
     *

     * All configuration information comes from {@code properties}.
     *
     * @param topology topology to add the connector to.
     * @param properties connector properties.
     */
    public MqttDevice(Topology topology, Properties properties) {
        this(topology, properties, null);
    }

    /**
     * Create an MqttDevice connector.
     *

     * Uses {@code mattConfig} for the base MQTT connector configuration
     * and uses {@code properties} only for MQTT Device properties.
     *
     * @param topology topology to add the connector to.
     * @param properties connector properties.  Properties beyond those
     *        noted in the Device properties section above are ignored.
     * @param mqttConfig base MQTT configuration. may be null.
     */
    public MqttDevice(Topology topology, Properties properties, MqttConfig mqttConfig) {
        this.topology = topology;
        this.deviceId = properties.getProperty("mqttDevice.id");
        if (deviceId == null || deviceId.isEmpty())
            throw new IllegalArgumentException("mqttDevice.id");
        String cqos = properties.getProperty("mqttDevice.command.qos", Integer.valueOf(commandQoS).toString());
        commandQoS = Integer.valueOf(cqos);
        String eretain = properties.getProperty("mqttDevice.events.retain", Boolean.valueOf(retainEvents).toString());
        retainEvents = Boolean.valueOf(eretain);
        topicPrefix = properties.getProperty("mqttDevice.topic.prefix", topicPrefix);
        clientId = properties.getProperty("mqttDevice.mqtt.clientId", clientId);
        evtTopic = properties.getProperty("mqttDevice.event.topic.pattern", evtTopic);
        if (!evtTopic.endsWith("/fmt/json"))
            throw new IllegalArgumentException("mqttDevice.event.topic.pattern");
        cmdTopic = properties.getProperty("mqttDevice.command.topic.pattern", cmdTopic);
        if (!cmdTopic.endsWith("/fmt/json"))
            throw new IllegalArgumentException("mqttDevice.command.topic.pattern");
        initVars();
        if (mqttConfig == null) {
            mqttConfig = MqttConfig.fromProperties(properties);
            mqttConfig.setClientId(clientId);
        }
        this.mqttConfig = mqttConfig;
        this.connector = new MqttStreams(topology, () -> this.mqttConfig);
    }

    private void initVars() {
        clientId = clientId
                    .replace("{mqttDevice.topic.prefix}", topicPrefix)
                    .replace("{mqttDevice.id}", deviceId);
        evtTopic = evtTopic
                    .replace("{mqttDevice.topic.prefix}", topicPrefix)
                    .replace("{mqttDevice.id}", deviceId);
        cmdTopic = cmdTopic
                    .replace("{mqttDevice.topic.prefix}", topicPrefix)
                    .replace("{mqttDevice.id}", deviceId);
    }

    /**
     * Get the MQTT topic for an device event.
     * @param eventId the event id.
     *         if null, returns a topic filter for all of the device's events.
     * @return the topic
     */
    public String eventTopic(String eventId) {
        if (eventId == null) {
            eventId = "+";  // retain the trailing fmt/json
        }
        return evtTopic.replace("{EVENTID}", eventId);
    }

    /**
     * Get the MQTT topic for a command.
     * @param command the command id.
     *         if null, returns a topic filter for all of the device's commands.
     * @return the topic
     */
    public String commandTopic(String command) {
        if (command == null) {
            command = "+";  // retain the trailing fmt/json
        }
        return cmdTopic.replace("{COMMAND}", command);
    }

    /**
     * Get the device's {@link MqttConfig}
     * @return the config
     */
    public MqttConfig getMqttConfig() {
        return mqttConfig;
    }

    /**
     * {@inheritDoc}
     *
     *
The event is published to the configured MQTT {@code mqttDevice.event.topic.pattern},
     * as described in the above class documentation, substituting the value returned
     * by the {@code eventId} function for "{EVENTID}" in the pattern.
     * The MQTT message's payload is the JSON representation
     * of the JsonObject stream tuple.
     */
    @Override
    public TSink<JsonObject> events(TStream<JsonObject> stream, Function<JsonObject, String> eventId,
            UnaryOperator<JsonObject> payload, Function<JsonObject, Integer> qos) {

        Function<JsonObject, String> topic = jo -> eventTopic(eventId.apply(jo));
        Function<JsonObject,byte[]> payloadFn =
                jo -> JsonFunctions.asBytes().apply(payload.apply(jo));

        return connector.publish(stream, topic, payloadFn, qos, jo -> retainEvents);
    }

    /**
     * {@inheritDoc}
     *
     *
The event is published to the configured MQTT {@code mqttDevice.event.topic.pattern},
     * as described in the above class documentation, substituting the {@code eventId} for
     * "{EVENTID}" in the pattern.
     * The MQTT message's payload is the JSON representation
     * of the JsonObject stream tuple.
     */
    @Override
    public TSink<JsonObject> events(TStream<JsonObject> stream, String eventId, int qos) {
        return events(stream, jo -> eventId, jo -> jo, jo -> qos);
    }

    /**
     * {@inheritDoc}
     *
     *

     * Subscribes to the configured MQTT {@code mqttDevice.command.topic.pattern}
     * as described in the above class documentation.
     * The received MQTT message's payload is required to be JSON.
     * The message's JSON payload is converted to a JsonObject and
     * set as the {@code payload} key's value in the stream tuple JsonObject.
     */
    @Override
    public TStream<JsonObject> commands(String... commands) {
        TStream<JsonObject> all = allCommands();

        if (commands.length != 0) {
            Set<String> uniqueCommands = new HashSet<>();
            uniqueCommands.addAll(Arrays.asList(commands));
            all = all.filter(jo -> uniqueCommands.contains(jo.get(CMD_ID).getAsString()));
        }

        return all;
    }

    private TStream<JsonObject> allCommands() {
        if (commandStream == null) {
            String topicFilter = commandTopic(null);
            commandStream = connector.subscribe(topicFilter, commandQoS,
                    (topic, payload) -> {
                        JsonObject jo = new JsonObject();
                        jo.addProperty(CMD_DEVICE, deviceId);
                        jo.addProperty(CMD_ID, extractCmd(topic));
                        jo.addProperty(CMD_TS, System.currentTimeMillis());
                        String fmt = extractCmdFmt(topic);
                        jo.addProperty(CMD_FORMAT, fmt);
                        if ("json".equals(fmt)) {
                            jo.add(CMD_PAYLOAD, JsonFunctions.fromBytes().apply(payload));
                        }
                        else {
                            jo.addProperty(CMD_PAYLOAD, new String(payload, StandardCharsets.UTF_8));
                        }
                        return jo;
                    })
                    .tag("allDeviceCmds");
        }
        return commandStream;
    }

    private String extractCmd(String topic) {
        String prefix = cmdTopic.substring(0, cmdTopic.indexOf("{COMMAND}"));
        String cmd = topic.substring(prefix.length());
        int endCmd = cmd.indexOf('/');
        if (endCmd != -1)
            cmd = cmd.substring(0, endCmd);
        return cmd;
    }

    private String extractCmdFmt(String cmdTopic) {
        return cmdTopic.endsWith("/fmt/json") ? "json" : "string";
    }

    @Override
    public Topology topology() {
        return topology;
    }

    /**
     * {@inheritDoc}
     *

     * This connector does not support the notion of a device-type
     * as part of its device id model.  An empty string is returned.
     */
    @Override
    public String getDeviceType() {
      // not part of this connector's device identifier model
      return "";
    }

    @Override
    public String getDeviceId() {
      return deviceId;
    }
}


text:
@implementation FBNRootListController

- (NSArray *)specifiers {
	if (!_specifiers) {
		_specifiers = [[self loadSpecifiersFromPlistName:@"Root" target:self] retain];
	}

	return _specifiers;
}

- (void) followOnTwitter:(PSSpecifier*) specifier {

	if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"tweetbot:"]]) {
        [[UIApplication sharedApplication] openURL:[NSURL URLWithString:[@"tweetbot:///user_profile/" stringByAppendingString:@"TwizzyIndy"]]];
    } else if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"twitter:"]]) {
        [[UIApplication sharedApplication] openURL:[NSURL URLWithString:[@"twitter://user?screen_name=" stringByAppendingString:@"TwizzyIndy"]]];
    } else {
        [[UIApplication sharedApplication] openURL:[NSURL URLWithString:[@"https://mobile.twitter.com/" stringByAppendingString:@"TwizzyIndy"]]];
    }

}

@end

redpajama_set_name: RedPajamaGithub


text:
using System.Collections.Generic;
using Nest.Resolvers.Converters;
using Newtonsoft.Json;
using System;
using Nest.Resolvers;

namespace Nest
{
	[JsonObject(MemberSerialization.OptIn)]
	public class GeoPointMapping : IElasticType
	{
		public PropertyNameMarker Name { get; set; }

		[JsonProperty("type")]
		public virtual TypeNameMarker Type { get { return new TypeNameMarker { Name = "geo_point" }; } }

		[JsonProperty("similarity")]
		public string Similarity { get; set; }

		[JsonProperty("lat_lon")]
		public bool? IndexLatLon { get; set; }

		[JsonProperty("geohash")]
		public bool? IndexGeoHash { get; set; }

		[JsonProperty("geohash_precision")]
		public int? GeoHashPrecision { get; set; }
	}
}


text:
namespace i {
}
// CHECK-WARN: warning: namespace 'i' not terminated with a closing comment [llvm-namespace-comment]
// CHECK-WERR: error: namespace 'i' not terminated with a closing comment [llvm-namespace-comment,-warnings-as-errors]
// CHECK-WERR-QUIET: error: namespace 'i' not terminated with a closing comment [llvm-namespace-comment,-warnings-as-errors]

// CHECK-WARN-NOT: treated as
// CHECK-WERR: 1 warning treated as error
// CHECK-WERR-QUIET-NOT: treated as


text:
<!DOCTYPE html>

	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>About Us|CampusPuppy</title>
	<link href="<?php echo base_url('/assets/css/remodal.css'); ?>" rel="stylesheet">
	<link href="<?php echo base_url('/assets/css/remodal-default-theme.css'); ?>" rel="stylesheet">
	<link href="<?php if(isset($_SESSION['userData']['loggedIn'])){ echo base_url('assets/css/components/header.css'); } else { echo base_url('/assets/css/components/logged-out-header.css'); }  ?>" rel="stylesheet">
	<link href="/assets/css/content.css" rel="stylesheet">
	<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
	<link rel="shortcut icon" href="<?php echo base_url('assets/img/favicon.ico'); ?>" type="image/x-icon">

	<?php
	if($message['content']!=''){?>
	<div class="message <?=$message['class']?>">
<?=$message['content']?>

	<?php }?>

		<?php if(isset($_SESSION['userData']['loggedIn'])){ echo $header; } else { echo $headerLogin; } ?>

About Us

					<?php echo $about[0]['aboutUs']; ?>

		<?php echo $footer; ?>

		<button data-remodal-action="close" class="remodal-close"></button>

Forgot your Password?

				<form method="get" class="form forgot-psswd-form" action="<?php echo base_url('web/forgotPassword'); ?>">

						Registered E-Mail
						<input type="email" class="form__input" id="forgot-psswd-email" name="email" placeholder="E-Mail Address" required>

						<input type="hidden" name="<?php echo $csrf_token_name; ?>" value="<?php echo $csrf_token; ?>">
						<input type="submit" value="Send Me Instructions" class="btn btn--primary">

				</form>


text:
file="dompackage"
#if [ "$file" == "" ]; then
#	echo Usage: ./buildpackage.sh PACKAGENAME
#	echo Note: PACKAGENAME must be without .node.js, a .js and a min.js will be made
#	echo Ensure you have browserify and uglify-es installed.
#	exit 0;
#fi
if ! [ -f $file.node.js ]; then
	echo "Could not find template file $file.node.js"
	exit 1;
fi
echo Browserfying...

# We're using dompackage.node.js as a boilerplate for browserify to do something useful with
browserify $file.node.js -d -o $file.js
echo Adding a wrapper for Threading.js import.

# This needs to be in the thread..
cat dependency.syncDOM.js >> $file.js

# We need to wrap te thread for injection
sed -i '1s/^/self.threadingjs.helpers.push(function\(\)\{\n /' $file.js
echo "});" >> $file.js

# We need these also in the window thread as well.
cat dependency.diffDOM.js >> $file.js
cat dependency.syncDOM.js >> $file.js

# Make it smaller
echo Uglifying...
uglifyjs $file.js  --output $file.min.js

# We're done, show the new files.
echo Done!
ls -lah $file.min.js $file.js


text:
Iniciação Científica - Crescimento de superfícies
=========

Repositório da iniciação científica com o Prof.º Dr. Leonardo Grigorio


text:
package us.dot.its.jpo.ode.wrapper;

import javax.websocket.CloseReason;
import javax.websocket.Session;

import us.dot.its.jpo.ode.model.OdeMessage;
import us.dot.its.jpo.ode.model.OdeRequest;

public interface WebSocketClient {

   OdeRequest getRequest();

   void onMessage(OdeMessage message);

   void onOpen(Session session);

   void onClose(CloseReason reason);

   void onError(Throwable t);
}


text:
/**
 * @fileoverview This file contains various event related functions for
 * o3d.  It puts them in the 'event' module on the o3djs object.
 *
 * TODO Add selenium tests.
 *
 *
 */
o3djs.provide('o3djs.event');

/**
 * A Module for handling events related to o3d and various browsers.
 * @namespace
 */
o3djs.event = o3djs.event || {};

/**
  * @param {string} inStr base string.
  * @param {string} extraStr string to append.
  * @return {string} inStr + ' ' + extraStr, or just inStr if extraStr is ''.
  */
o3djs.event.appendWithSpace = function(inStr, extraStr) {
  return (inStr.length == 0) ? extraStr : inStr + ' ' + extraStr;
};

/**
  * @param {boolean} state whether to append or not.
  * @param {string} inStr base string.
  * @param {string} extraStr string to append.
  * @return {string} inStr + ' ' + extraStr, or just inStr if state is false.
  */
o3djs.event.appendWithSpaceIf = function(state, inStr, extraStr) {
  return (state) ? o3djs.event.appendWithSpace(inStr, extraStr) : inStr;
};

/**
 * Builds a DOM-level 3 modifier string for a KeyboardEvent - see
 * http://www.w3.org/TR/DOM-Level-3-Events/events.html
 * #Events-KeyboardEvents-Interfaces.
 * @param {boolean} control whether the control key is down.
 * @param {boolean} alt whether the alt/option key is down.
 * @param {boolean} shift whether the shift key is down.
 * @param {boolean} meta whether the meta/command key is down.
 * @return {string} space delimited list of keys that are down.
 */
o3djs.event.getModifierString = function(control, alt, shift, meta) {
  var modStr = o3djs.event.appendWithSpaceIf(control, '', 'Control');
  modStr = o3djs.event.appendWithSpaceIf(alt, modStr, 'Alt');
  modStr = o3djs.event.appendWithSpaceIf(shift, modStr, 'Shift');
  return o3djs.event.appendWithSpaceIf(meta, modStr, 'Meta');
};

/**
 * Pad a string with leading zeroes if needed until it is the length desired.
 * @param {string} str The input string, probably representing a number.
 * @param {number} to_length The desired minimum length of string with padding.
 * @return {string} A string padded with leading zeroes as needed to be the
 * length desired.
 */
o3djs.event.padWithLeadingZeroes = function(str, to_length) {
  while (str.length < to_length)
    str = '0' + str;
  return str;
};

/**
 * Creates a keyIdentifer string for a given keystroke as specified in the w3c
 * spec on http://www.w3.org/TR/DOM-Level-3-Events/events.html.
 * @param {number} charCode numeric unicode code point as reported by the OS.
 * @param {number} keyCode numeric keyCode as reported by the OS, currently
 * unused but will probably be necessary in the future.
 * @return {string} eg 'Left' or 'U+0040'.
 */
o3djs.event.getKeyIdentifier = function(charCode, keyCode) {
  if (!charCode) {
    // TODO: This works for webkit for keydown and keyup, for basic
    // alphanumeric keys, at least.  Likely it needs lots of work to handle
    // accented characters, various keyboards, etc., as does the rest of our
    // keyboard event code.
    charCode = keyCode;
  }
  switch (charCode) {
    case 3: case 13: return 'Enter';  // spec merges these.
    case 37: return 'Left';
    case 39: return 'Right';
    case 38: return 'Up';
    case 40: return 'Down';
  }
  charCode = (charCode >= 97 && charCode <= 122) ? charCode - 32 : charCode;
  var keyStr = charCode.toString(16).toUpperCase();
  return 'U+' + o3djs.event.padWithLeadingZeroes(keyStr, 4);
};

/** Takes a keyIdentifier string and remaps it to an ASCII/Unicode value
 *  suitable for javascript event handling.
 * @param {string} keyIdent a keyIdentifier string as generated above.
 * @return {number} the numeric Unicode code point represented.
 */
o3djs.event.keyIdentifierToChar = function(keyIdent) {
  if (keyIdent) {
    switch (keyIdent) {
      case 'Enter': return 13;
      case 'Left': return 37;
      case 'Right': return 39;
      case 'Up': return 38;
      case 'Down': return 40;
    }
  if (keyIdent.indexOf('U+') == 0)
    return parseInt(keyIdent.substr(2).toUpperCase(), 16);
  }
  return 0;
};

/**
 *  Extracts the key char in number form from the event, in a cross-browser
 *  manner.
 * @param {!Event} event .
 * @return {number} unicode code point for the key.
 */
o3djs.event.getEventKeyChar = function(event) {
  if (!event) {
    event = window.event;
  }
  var charCode = 0;
  if (event.keyIdentifier)
    charCode = o3djs.event.keyIdentifierToChar(event.keyIdentifier);
  if (!charCode)
    charCode = (window.event) ? window.event.keyCode : event.charCode;
  if (!charCode)
    charCode = event.keyCode;
  return charCode;
};

/**
 * Cancel an event we've handled so it stops propagating upwards.
 * The cancelBubble is for IE, stopPropagation is for all other browsers.
 * preventDefault ensures that the default action is also canceled.
 * @param {!Event} event - the event to cancel.
 */
o3djs.event.cancel = function(event) {
  if (!event)
    event = window.event;
  event.cancelBubble = true;
  if (event.stopPropagation)
    event.stopPropagation();
  if (event.preventDefault)
    event.preventDefault();
};

/**
 * Convenience function to setup synthesizing and dispatching of keyboard events
 * whenever the focussed plug-in calls Javascript to report a keyboard action.
 * @param {!Element} pluginObject the <object> where the o3d plugin lives,
 * which the caller probably obtained by calling getElementById.
 */
o3djs.event.startKeyboardEventSynthesis = function(pluginObject) {
  var handler = function(event) {
    o3djs.event.onKey(event, pluginObject);
  };

  o3djs.event.addEventListener(pluginObject, 'keypress', handler);
  o3djs.event.addEventListener(pluginObject, 'keydown', handler);
  o3djs.event.addEventListener(pluginObject, 'keyup', handler);
};

/**
 * Dispatches a DOM-level 3 KeyboardEvent when called back by the plugin.
 * see http://www.w3.org/TR/DOM-Level-3-Events/events.html
 * #Events-KeyboardEvents-Interfaces
 * see http://developer.mozilla.org/en/DOM/event.initKeyEvent
 * @param {!Element} event an O3D event object.
 * @param {!o3d.Plugin} pluginObject the plugin object on the page.
 */
o3djs.event.onKey = function(event, pluginObject) {
  var k_evt = o3djs.event.createKeyEvent(event.type, event.charCode,
      event.keyCode, event.ctrlKey, event.altKey, event.shiftKey,
      event.metaKey);
  if (k_evt) {
    if (pluginObject.parentNode.dispatchEvent) {
      // Using the pluginObject itself fails for non-capturing event listeners
      // on keypress events on Firefox only, as far as I've been able to
      // determine.  I have no idea why.
      pluginObject.parentNode.dispatchEvent(k_evt);
    } else if (pluginObject.fireEvent) {
      pluginObject.fireEvent('on' + event.type, k_evt);
    }
  }
};

/**
 * Creates a DOM-level 3 KeyboardEvent.
 * see http://www.w3.org/TR/DOM-Level-3-Events/events.html
 * #Events-KeyboardEvents-Interfaces.
 * see http://developer.mozilla.org/en/DOM/event.initKeyEvent
 * @param {string} eventName one of 'keypress', 'keydown' or 'keyup'.
 * @param {number} charCode the character code for the key.
 * @param {number} keyCode the key code for the key.
 * @param {boolean} control whether the control key is down.
 * @param {boolean} alt whether the alt/option key is down.
 * @param {boolean} shift whether the shift key is down.
 * @param {boolean} meta whether the meta/command key is down.
 */
o3djs.event.createKeyEvent = function(eventName, charCode, keyCode,
                                      control, alt, shift, meta) {
  var k_evt;
  var keyIdentifier = o3djs.event.getKeyIdentifier(charCode, keyCode);
  if (document.createEvent) {
    k_evt = document.createEvent('KeyboardEvent');
    if (k_evt.initKeyboardEvent) {  // WebKit.
      k_evt.initKeyboardEvent(eventName, true, true, window,
                   keyIdentifier, 0,
                   control, alt, shift, meta);
      // TODO: These actually fail to do anything in Chrome; those are
      // read-only fields, and it's not setting them in initKeyboardEvent.
      k_evt.charCode = charCode;
      if (eventName == 'keypress')
        k_evt.keyCode = charCode;
      else
        k_evt.keyCode = keyCode;
    } else if (k_evt.initKeyEvent) {  // FF.
      k_evt.initKeyEvent(eventName, true, true, window,
                         control, alt, shift, meta, keyCode, charCode);
      k_evt.keyIdentifier = keyIdentifier;
    }
  } else if (document.createEventObject) {
    k_evt = document.createEventObject();
    k_evt.ctrlKey = control;
    k_evt.altKey = alt;
    k_evt.shiftKey = shift;
    k_evt.metaKey = meta;
    k_evt.keyCode = charCode;  // Emulate IE charcode-in-the-keycode onkeypress.
    k_evt.keyIdentifier = keyIdentifier;
  }
  k_evt.synthetic = true;
  return k_evt;
};

/*
 * Function to create a closure that will call each event handler in an array
 * whenever it gets called, passing its single argument through to the
 * sub-handlers.  The sub-handlers may either be functions or EventListeners.
 * This is generally expected to be used only through
 * o3djs.event.addEventListener.
 * @param {!Array.<*>} listenerSet an array of handlers.
 * @return {!function(*): void} a closure to be used to multiplex out
 *     event-handling.
 */
o3djs.event.createEventHandler = function(listenerSet) {
  return function(event) {
    var length = listenerSet.length;
    for (var index = 0; index < length; ++index) {
      var handler = listenerSet[index];
      if (typeof(handler.handleEvent) == 'function') {
        handler.handleEvent(event);
      } else {
        handler(event);
      }
    }
  }
};

/**
 * Convenience function to manage event listeners on the o3d plugin object,
 * intended as a drop-in replacement for the DOM addEventListener [with slightly
 * different arguments, but the same effect].
 * @param {!Element} pluginObject the html object where the o3d plugin lives,
 * which the caller probably obtained by calling getElementById or makeClients.
 * @param {string} type the event type on which to trigger, e.g. 'mousedown',
 * 'mousemove', etc.
 * @param {!Object} handler either a function or an EventListener object.
 */
o3djs.event.addEventListener = function(pluginObject, type, handler) {
  if (!handler || typeof(type) != 'string' ||
      (typeof(handler) != 'function' &&
       typeof(handler.handleEvent) != 'function')) {
    throw new Error('Invalid argument.');
  }
  pluginObject.o3d_eventRegistry = pluginObject.o3d_eventRegistry || [];
  var registry = pluginObject.o3d_eventRegistry;
  var listenerSet = registry[type];
  if (!listenerSet || listenerSet.length == 0) {
    listenerSet = registry[type] = [];
    pluginObject.client.setEventCallback(type,
        o3djs.event.createEventHandler(listenerSet));
  } else {
    for (var index in listenerSet) {
      if (listenerSet[index] == handler) {
        return;  // We're idempotent.
      }
    }
  }
  listenerSet.push(handler);
};

/**
 * Convenience function to manage event listeners on the o3d plugin object,
 * intended as a drop-in replacement for the DOM removeEventListener [with
 * slightly different arguments, but the same effect].
 * @param {!Element} pluginObject the <object> where the o3d plugin lives,
 * which the caller probably obtained by calling getElementById.
 * @param {string} type the event type on which the handler to be removed was to
 * trigger, e.g. 'mousedown', 'mousemove', etc.
 * @param {!Object} handler either a function or an EventListener object.
 */
o3djs.event.removeEventListener = function(pluginObject, type, handler) {
  var registry = pluginObject.o3d_eventRegistry;
  if (!registry) {
    return;
  }
  var listenerSet = registry[type];
  if (!listenerSet) {
    return;
  }
  for (var index in listenerSet) {
    if (listenerSet[index] == handler) {
      if (listenerSet.length == 1) {
        pluginObject.client.clearEventCallback(type);
      }
      listenerSet.splice(index, 1);
      break;
    }
  }
};


text:
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.plugins.groovy.gant;

import com.intellij.execution.CantRunException;
import com.intellij.execution.configurations.JavaParameters;
import com.intellij.execution.configurations.RuntimeConfigurationException;
import com.intellij.openapi.module.Module;
import com.intellij.openapi.options.ShowSettingsUtil;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.roots.libraries.LibraryUtil;
import com.intellij.openapi.util.io.FileUtil;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.util.containers.ContainerUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.plugins.groovy.GroovyBundle;
import org.jetbrains.plugins.groovy.config.GroovyConfigUtils;
import org.jetbrains.plugins.groovy.runner.GroovyScriptRunConfiguration;
import org.jetbrains.plugins.groovy.runner.GroovyScriptRunner;
import org.jetbrains.plugins.groovy.util.GroovyUtils;
import org.jetbrains.plugins.groovy.util.LibrariesUtil;

import java.io.File;
import java.util.List;

/**
 * @author ilyas
 */
public class GantRunner extends GroovyScriptRunner {

  private static final String UNIQUE_STRING = "d230efbae4b744ae86ef4014eef1b387";

  @Override
  public boolean shouldRefreshAfterFinish() {
    return true;
  }

  @Override
  public boolean isValidModule(@NotNull Module module) {
    return GantUtils.isSDKConfiguredToRun(module);
  }

  @Override
  public void ensureRunnerConfigured(@NotNull GroovyScriptRunConfiguration configuration) throws RuntimeConfigurationException {
    Project project = configuration.getProject();
    if (GantUtils.getSDKInstallPath(configuration.getModule(), project).isEmpty()) {
      RuntimeConfigurationException e = new RuntimeConfigurationException(GroovyBundle.message("dialog.message.gant.not.configured"));
      e.setQuickFix(() -> ShowSettingsUtil.getInstance().editConfigurable(project, new GantConfigurable(project)));
      throw e;
    }
  }

  @Nullable
  private static String getGantConfPath(final String gantHome) {
    String confPath = FileUtil.toSystemDependentName(gantHome + "/conf/gant-starter.conf");
    if (new File(confPath).exists()) {
      return confPath;
    }

    return getConfPath(gantHome);
  }

  @Override
  public void configureCommandLine(JavaParameters params, @Nullable Module module, boolean tests, VirtualFile script, GroovyScriptRunConfiguration configuration) throws CantRunException {
    String gantHome = GantUtils.getSDKInstallPath(module, configuration.getProject());

    addGroovyAndAntJars(params, module, gantHome);

    setToolsJar(params);

    setGroovyHome(params, gantHome);

    final String confPath = getGantConfPath(gantHome);
    if (confPath != null) {
      params.getVMParametersList().add("-Dgroovy.starter.conf=" + confPath);
      params.getProgramParametersList().add("--conf");
      params.getProgramParametersList().add(confPath);
    }

    params.getVMParametersList().addParametersString(configuration.getVMParameters());
    params.setMainClass("org.codehaus.groovy.tools.GroovyStarter");

    if (gantHome.contains("grails")) {
      params.getClassPath().addAllFiles(GroovyUtils.getFilesInDirectoryByPattern(gantHome + "/lib", ".*\\.jar"));
    }

    addClasspathFromRootModel(module, tests, params, false);

    String antHome = System.getenv("ANT_HOME");
    if (StringUtil.isEmpty(antHome)) {
      antHome = gantHome;
    }

    params.getVMParametersList().add("-Dant.home=" + antHome);
    params.getVMParametersList().add("-Dgant.home=" + gantHome);

    params.getProgramParametersList().add("--main");
    params.getProgramParametersList().add("gant.Gant");

    params.getProgramParametersList().add("--file");
    params.getProgramParametersList().add(FileUtil.toSystemDependentName(configuration.getScriptPath()));

    if (configuration.isDebugEnabled()) {
      params.getProgramParametersList().add("--debug");
      params.getProgramParametersList().add("-D" + UNIQUE_STRING);
    }

    params.getProgramParametersList().addParametersString(configuration.getProgramParameters());
  }

  private static void addGroovyAndAntJars(JavaParameters params, Module module, String gantHome) {
    final File[] groovyJars = GroovyConfigUtils.getGroovyAllJars(gantHome + "/lib/");
    if (groovyJars.length > 0) {
      params.getClassPath().add(groovyJars[0].getAbsolutePath());
    }

    if (module == null) {
      return;
    }

    final String groovyHome = LibrariesUtil.getGroovyHomePath(module);
    if (groovyHome != null) {
      File[] libJars = GroovyUtils.getFilesInDirectoryByPattern(groovyHome + "/lib/", ".*\\.jar");
      if (libJars.length > 0) {
        params.getClassPath().addAllFiles(libJars);
      }
    }

    List<VirtualFile> classpath = params.getClassPath().getRootDirs();

    String[] characteristicClasses = ContainerUtil.ar(
      LibrariesUtil.SOME_GROOVY_CLASS, "org.apache.tools.ant.BuildException", "org.apache.tools.ant.launch.AntMain",
      "org.apache.commons.cli.ParseException");
    for (String someClass : characteristicClasses) {
      if (!LibraryUtil.isClassAvailableInLibrary(classpath, someClass)) {
        VirtualFile jar = LibrariesUtil.findJarWithClass(module, someClass);
        if (jar != null) {
          params.getClassPath().add(jar);
        }
      }
    }
  }
}


text:
<?php
namespace api\common\models;

use Yii;
use yii\db\Query;
use yii\helpers\Html;

class ResourceClass extends \yii\db\ActiveRecord
{

}


text:
package org.eclipse.php.internal.ui;

/**
 * This code was generated using build.xml
 */
 @SuppressWarnings("all")
public interface IPHPHelpContextIds {

    public static final String PREFIX = "org.eclipse.php.help."; //$NON-NLS-1$
public static final String PDT_USER_GUIDE = PREFIX + "pdt_user_guide"; //$NON-NLS-1$ 000-index.md

public static final String TABLE_OF_CONTENTS = PREFIX + "table_of_contents"; //$NON-NLS-1$ 001-table_of_contents.md

public static final String GETTING_STARTED = PREFIX + "getting_started"; //$NON-NLS-1$ 008-getting_started/000-index.md

public static final String QUICK_START = PREFIX + "quick_start"; //$NON-NLS-1$ 008-getting_started/008-quick_start.md

public static final String BASIC_TUTORIAL = PREFIX + "basic_tutorial"; //$NON-NLS-1$ 008-getting_started/016-basic_tutorial/000-index.md

public static final String CREATING_AND_UPLOADING_A_PROJECT = PREFIX + "creating_and_uploading_a_project"; //$NON-NLS-1$ 008-getting_started/016-basic_tutorial/008-creating_and_uploading_a_project.md

public static final String CREATING_PROJECTS_AND_FILES = PREFIX + "creating_projects_and_files"; //$NON-NLS-1$ 008-getting_started/016-basic_tutorial/008-creating_and_uploading_a_project.md

public static final String WORKING_WITH_CODE_ASSIST = PREFIX + "working_with_code_assist"; //$NON-NLS-1$ 008-getting_started/016-basic_tutorial/016-working_with_code_assist.md

public static final String WORKING_WITH_REFACTORING = PREFIX + "working_with_refactoring"; //$NON-NLS-1$ 008-getting_started/016-basic_tutorial/020-working_with_refactoring.md

public static final String WORKING_WITH_THE_DEBUGGER = PREFIX + "working_with_the_debugger"; //$NON-NLS-1$ 008-getting_started/016-basic_tutorial/024-working_with_the_debugger.md

public static final String CONCEPTS = PREFIX + "concepts"; //$NON-NLS-1$ 016-concepts/000-index.md

public static final String PHP_SUPPORT = PREFIX + "php_support"; //$NON-NLS-1$ 016-concepts/008-php_support.md

public static final String CODE_ASSIST_CONCEPT = PREFIX + "code_assist_concept"; //$NON-NLS-1$ 016-concepts/016-code_assist_concept.md

public static final String SYNTAX_HIGHLIGHTING = PREFIX + "syntax_highlighting"; //$NON-NLS-1$ 016-concepts/024-syntax_highlighting.md

public static final String AUTOMATIC_INSERTION = PREFIX + "automatic_insertion"; //$NON-NLS-1$ 016-concepts/032-automatic_insertion.md

public static final String MATCHING_BRACKETS = PREFIX + "matching_brackets"; //$NON-NLS-1$ 016-concepts/040-matching_brackets.md

public static final String MARK_OCCURRENCES = PREFIX + "mark_occurrences"; //$NON-NLS-1$ 016-concepts/048-mark_occurrences.md

public static final String CODE_FOLDING = PREFIX + "code_folding"; //$NON-NLS-1$ 016-concepts/056-code_folding.md

public static final String COMMENTING_CODE = PREFIX + "commenting_code"; //$NON-NLS-1$ 016-concepts/064-commenting_code/000-index.md

public static final String PHPDOC_COMMENTS = PREFIX + "phpdoc_comments"; //$NON-NLS-1$ 016-concepts/064-commenting_code/008-phpdoc_comments.md

public static final String BOOKMARKS = PREFIX + "bookmarks"; //$NON-NLS-1$ 016-concepts/064-commenting_code/016-bookmarks.md

public static final String HOVER_SUPPORT = PREFIX + "hover_support"; //$NON-NLS-1$ 016-concepts/072-hover_support.md

public static final String REFACTORING = PREFIX + "refactoring"; //$NON-NLS-1$ 016-concepts/076-refactoring.md

public static final String OVERRIDE_INDICATORS = PREFIX + "override_indicators"; //$NON-NLS-1$ 016-concepts/080-override_indicators.md

public static final String PHP_WORKING_SETS = PREFIX + "php_working_sets"; //$NON-NLS-1$ 016-concepts/088-php_working_sets.md

public static final String SHOW_TYPE_HIERARCHY = PREFIX + "show_type_hierarchy"; //$NON-NLS-1$ 016-concepts/096-show_type_hierarchy.md

public static final String PHP_MANUAL_INTEGRATION = PREFIX + "php_manual_integration"; //$NON-NLS-1$ 016-concepts/104-php_manual_integration.md

public static final String REAL_TIME_ERROR_DETECTION = PREFIX + "real_time_error_detection"; //$NON-NLS-1$ 016-concepts/112-real_time_error_detection.md

public static final String RUNNING = PREFIX + "running"; //$NON-NLS-1$ 016-concepts/120-running.md

public static final String DEBUGGING_CONCEPT = PREFIX + "debugging_concept"; //$NON-NLS-1$ 016-concepts/128-debugging_concept.md

public static final String BREAKPOINTS = PREFIX + "breakpoints"; //$NON-NLS-1$ 016-concepts/136-breakpoints.md

public static final String INCLUDE_PATHS = PREFIX + "include_paths"; //$NON-NLS-1$ 016-concepts/144-include_paths.md

public static final String BUILD_PATHS = PREFIX + "build_paths"; //$NON-NLS-1$ 016-concepts/152-build_paths.md

public static final String PATH_MAPPING = PREFIX + "path_mapping"; //$NON-NLS-1$ 016-concepts/160-path_mapping.md

public static final String JAVASCRIPT = PREFIX + "javascript"; //$NON-NLS-1$ 016-concepts/168-javascript.md

public static final String MYLYN_INTEGRATION = PREFIX + "mylyn_integration"; //$NON-NLS-1$ 016-concepts/176-mylyn_integration.md

public static final String PHAR_INTEGRATION = PREFIX + "phar_integration"; //$NON-NLS-1$ 016-concepts/184-phar_integration.md

public static final String EXCEPTION_BREAKPOINTS = PREFIX + "exception_breakpoints"; //$NON-NLS-1$ 016-concepts/192-exception_breakpoints.md

public static final String TASKS = PREFIX + "tasks"; //$NON-NLS-1$ 024-tasks/000-index.md

public static final String CREATING_PHP_PROJECTS = PREFIX + "creating_php_projects"; //$NON-NLS-1$ 024-tasks/008-creating_php_projects.md

public static final String FILE_CREATION = PREFIX + "file_creation"; //$NON-NLS-1$ 024-tasks/016-file_creation/000-index.md

public static final String CREATING_A_PHP_FILE_WITHIN_A_PROJECT = PREFIX + "creating_a_php_file_within_a_project"; //$NON-NLS-1$ 024-tasks/016-file_creation/008-creating_a_php_file_within_a_project.md

public static final String CREATING_A_NEW_PHP_FILE_OUTSIDE_OF_A_PROJECT = PREFIX + "creating_a_new_php_file_outside_of_a_project"; //$NON-NLS-1$ 024-tasks/016-file_creation/016-creating_a_new_php_file_outside_of_a_project.md

public static final String OPENING_AN_EXTERNAL_FILE_IN_NEON = PREFIX + "opening_an_external_file_in_neon"; //$NON-NLS-1$ 024-tasks/016-file_creation/024-opening_an_external_file_in_neon.md

public static final String USING_CODE_ASSIST = PREFIX + "using_code_assist"; //$NON-NLS-1$ 024-tasks/024-using_code_assist.md

public static final String USING_TEMPLATES = PREFIX + "using_templates"; //$NON-NLS-1$ 024-tasks/032-using_templates.md

public static final String DRAG_AND_DROP = PREFIX + "drag_and_drop"; //$NON-NLS-1$ 024-tasks/040-drag_and_drop.md

public static final String FORMATTING_CODE = PREFIX + "formatting_code"; //$NON-NLS-1$ 024-tasks/048-formatting_code.md

public static final String USING_CODE_FOLDING = PREFIX + "using_code_folding"; //$NON-NLS-1$ 024-tasks/056-using_code_folding.md

public static final String SEARCHING_FOR_PHP_ELEMENTS = PREFIX + "searching_for_php_elements"; //$NON-NLS-1$ 024-tasks/064-searching_for_php_elements.md

public static final String OPENING_PHP_ELEMENTS = PREFIX + "opening_php_elements"; //$NON-NLS-1$ 024-tasks/072-opening_php_elements.md

public static final String OPENING_TYPES_METHODS = PREFIX + "opening_types_methods"; //$NON-NLS-1$ 024-tasks/080-opening_types_methods.md

public static final String USING_SMART_GOTO_SOURCE = PREFIX + "using_smart_goto_source"; //$NON-NLS-1$ 024-tasks/088-using_smart_goto_source.md

public static final String VIEWING_TYPE_HIERARCHIES = PREFIX + "viewing_type_hierarchies"; //$NON-NLS-1$ 024-tasks/096-viewing_type_hierarchies.md

public static final String CREATING_PHP_WORKING_SETS = PREFIX + "creating_php_working_sets"; //$NON-NLS-1$ 024-tasks/104-creating_php_working_sets.md

public static final String USING_MARK_OCCURRENCES = PREFIX + "using_mark_occurrences"; //$NON-NLS-1$ 024-tasks/112-using_mark_occurrences.md

public static final String USING_REFACTORING = PREFIX + "using_refactoring"; //$NON-NLS-1$ 024-tasks/116-using_refactoring/000-index.md

public static final String RENAMING_FILES = PREFIX + "renaming_files"; //$NON-NLS-1$ 024-tasks/116-using_refactoring/008-renaming_files.md

public static final String RENAMING_ELEMENTS = PREFIX + "renaming_elements"; //$NON-NLS-1$ 024-tasks/116-using_refactoring/016-renaming_elements.md

public static final String MOVING_FILES = PREFIX + "moving_files"; //$NON-NLS-1$ 024-tasks/116-using_refactoring/024-moving_files.md

public static final String EXTRACTING_VARIABLES = PREFIX + "extracting_variables"; //$NON-NLS-1$ 024-tasks/116-using_refactoring/032-extracting_variables.md

public static final String EXTRACTING_METHODS = PREFIX + "extracting_methods"; //$NON-NLS-1$ 024-tasks/116-using_refactoring/040-extracting_methods.md

public static final String HOW_TO_COMMENT_AND_UNCOMMENT_PHP_CODE = PREFIX + "how_to_comment_and_uncomment_php_code"; //$NON-NLS-1$ 024-tasks/120-how_to_comment_and_uncomment_php_code.md

public static final String COMMENTING_PHP_DOCBLOCKS = PREFIX + "commenting_php_docblocks"; //$NON-NLS-1$ 024-tasks/128-commenting_php_docblocks.md

public static final String ACCESSING_AN_EXISTING_CVS_CHECKOUT = PREFIX + "accessing_an_existing_cvs_checkout"; //$NON-NLS-1$ 024-tasks/136-accessing_an_existing_cvs_checkout.md

public static final String RUNNING_FILES_AND_APPLICATIONS = PREFIX + "running_files_and_applications"; //$NON-NLS-1$ 024-tasks/144-running_files_and_applications/000-index.md

public static final String RUNNING_PHP_SCRIPTS_LOCALLY = PREFIX + "running_php_scripts_locally"; //$NON-NLS-1$ 024-tasks/144-running_files_and_applications/008-running_php_scripts_locally.md

public static final String RUNNING_PHP_SCRIPTS_REMOTELY = PREFIX + "running_php_scripts_remotely"; //$NON-NLS-1$ 024-tasks/144-running_files_and_applications/016-running_php_scripts_remotely.md

public static final String RUNNING_PHP_WEB_PAGES = PREFIX + "running_php_web_pages"; //$NON-NLS-1$ 024-tasks/144-running_files_and_applications/024-running_php_web_pages.md

public static final String DEBUGGING = PREFIX + "debugging"; //$NON-NLS-1$ 024-tasks/152-debugging/000-index.md

public static final String SETTING_BREAKPOINTS = PREFIX + "setting_breakpoints"; //$NON-NLS-1$ 024-tasks/152-debugging/008-setting_breakpoints.md

public static final String USING_THE_INSPECT_ACTION = PREFIX + "using_the_inspect_action"; //$NON-NLS-1$ 024-tasks/152-debugging/016-using_the_inspect_action.md

public static final String LOCALLY_DEBUGGING_A_PHP_SCRIPT = PREFIX + "locally_debugging_a_php_script"; //$NON-NLS-1$ 024-tasks/152-debugging/024-locally_debugging_a_php_script.md

public static final String DEBUGGING_A_PHP_WEB_PAGE = PREFIX + "debugging_a_php_web_page"; //$NON-NLS-1$ 024-tasks/152-debugging/032-debugging_a_php_web_page.md

public static final String ANALYZING_DEBUGGER_RESULTS = PREFIX + "analyzing_debugger_results"; //$NON-NLS-1$ 024-tasks/152-debugging/040-analyzing_debugger_results.md

public static final String SETTING_EXCEPTION_BREAKPOINTS = PREFIX + "setting_exception_breakpoints"; //$NON-NLS-1$ 024-tasks/152-debugging/048-setting_exception_breakpoints.md

public static final String TROUBLESHOOTING_REMOTE_DEBUGGING = PREFIX + "troubleshooting_remote_debugging"; //$NON-NLS-1$ 024-tasks/152-debugging/048-troubleshooting_remote_debugging/000-index.md

public static final String SETTING_UP_REMOTE_DEBUGGING = PREFIX + "setting_up_remote_debugging"; //$NON-NLS-1$ 024-tasks/152-debugging/048-troubleshooting_remote_debugging/000-index.md

public static final String SETTING_YOUR_ZEND_STUDIO_FOR_ECLIPSE_TO_BE_AN_ALLOWED_HOST = PREFIX + "setting_your_zend_studio_for_eclipse_to_be_an_allowed_host"; //$NON-NLS-1$ 024-tasks/152-debugging/048-troubleshooting_remote_debugging/008-setting_your_zend_studio_for_eclipse_to_be_an_allowed_host.md

public static final String ENSURING_THE_PLACEMENT_OF_DUMMY_PHP = PREFIX + "ensuring_the_placement_of_dummy_php"; //$NON-NLS-1$ 024-tasks/152-debugging/048-troubleshooting_remote_debugging/016-ensuring_the_placement_of_dummy_php.md

public static final String PHP_LIBRARIES_PREFERENCES = PREFIX + "php_libraries_preferences"; //$NON-NLS-1$ 024-tasks/160-php_libraries_preferences/000-index.md

public static final String ADDING_A_PHP_LIBRARY = PREFIX + "adding_a_php_library"; //$NON-NLS-1$ 024-tasks/160-php_libraries_preferences/008-adding_a_php_library.md

public static final String ADDING_EXTERNAL_FOLDERS_TO_PHP_LIBRARIES = PREFIX + "adding_external_folders_to_php_libraries"; //$NON-NLS-1$ 024-tasks/160-php_libraries_preferences/016-adding_external_folders_to_php_libraries.md

public static final String IMPORTING_PHP_USER_LIBRARIES = PREFIX + "importing_php_user_libraries"; //$NON-NLS-1$ 024-tasks/160-php_libraries_preferences/024-importing_php_user_libraries.md

public static final String EXPORTING_PHP_USER_LIBRARIES = PREFIX + "exporting_php_user_libraries"; //$NON-NLS-1$ 024-tasks/160-php_libraries_preferences/032-exporting_php_user_libraries.md

public static final String EDITING_PHP_LIBRARY_COMPONENTS_OR_FOLDERS = PREFIX + "editing_php_library_components_or_folders"; //$NON-NLS-1$ 024-tasks/160-php_libraries_preferences/040-editing_php_library_components_or_folders.md

public static final String EDITING_PHP_USER_LIBRARIES = PREFIX + "editing_php_user_libraries"; //$NON-NLS-1$ 024-tasks/160-php_libraries_preferences/048-editing_php_user_libraries.md

public static final String REMOVING_A_PHP_LIBRARY_OR_LIBRARY_FOLDER = PREFIX + "removing_a_php_library_or_library_folder"; //$NON-NLS-1$ 024-tasks/160-php_libraries_preferences/056-removing_a_php_library_or_library_folder.md

public static final String ADDING_ELEMENTS_TO_A_PROJECT_S_INCLUDE_PATH = PREFIX + "adding_elements_to_a_project_s_include_path"; //$NON-NLS-1$ 024-tasks/168-adding_elements_to_a_project_s_include_path.md

public static final String CONFIGURING_BUILD_PATHS = PREFIX + "configuring_build_paths"; //$NON-NLS-1$ 024-tasks/176-configuring_build_paths.md

public static final String ADDING_A_SERVER_PATH_MAP = PREFIX + "adding_a_server_path_map"; //$NON-NLS-1$ 024-tasks/184-adding_a_server_path_map.md

public static final String USING_THE_PHP_HTML_WYSYWIG_EDITOR = PREFIX + "using_the_php_html_wysywig_editor"; //$NON-NLS-1$ 024-tasks/192-using_the_php_html_wysywig_editor.md

public static final String MYLYN_INTEGRATION1 = PREFIX + "mylyn_integration1"; //$NON-NLS-1$ 024-tasks/200-mylyn_integration1.md

public static final String USING_JAVASCRIPT = PREFIX + "using_javascript"; //$NON-NLS-1$ 024-tasks/208-using_javascript/000-index.md

public static final String ENABLING_JAVASCRIPT_SUPPORT_IN_PHP_PROJECTS = PREFIX + "enabling_javascript_support_in_php_projects"; //$NON-NLS-1$ 024-tasks/208-using_javascript/008-enabling_javascript_support_in_php_projects.md

public static final String SETTING_THE_JAVASCRIPT_BUILD_PATH = PREFIX + "setting_the_javascript_build_path"; //$NON-NLS-1$ 024-tasks/208-using_javascript/016-setting_the_javascript_build_path.md

public static final String VIEWING_JAVASCRIPT_ELEMENTS_IN_THE_OUTLINE_VIEW = PREFIX + "viewing_javascript_elements_in_the_outline_view"; //$NON-NLS-1$ 024-tasks/208-using_javascript/024-viewing_javascript_elements_in_the_outline_view.md

public static final String USING_JAVASCRIPT_CONTENT_ASSIST = PREFIX + "using_javascript_content_assist"; //$NON-NLS-1$ 024-tasks/208-using_javascript/032-using_javascript_content_assist.md

public static final String USING_JAVASCRIPT_SYNTAX_COLORING = PREFIX + "using_javascript_syntax_coloring"; //$NON-NLS-1$ 024-tasks/208-using_javascript/040-using_javascript_syntax_coloring.md

public static final String USING_JAVASCRIPT_MARK_OCCURENCES = PREFIX + "using_javascript_mark_occurences"; //$NON-NLS-1$ 024-tasks/208-using_javascript/048-using_javascript_mark_occurences.md

public static final String REFERENCE = PREFIX + "reference"; //$NON-NLS-1$ 032-reference/000-index.md

public static final String PHP_PERSPECTIVES_AND_VIEWS = PREFIX + "php_perspectives_and_views"; //$NON-NLS-1$ 032-reference/008-php_perspectives_and_views/000-index.md

public static final String PHP_PERSPECTIVE_VIEWS = PREFIX + "php_perspective_views"; //$NON-NLS-1$ 032-reference/008-php_perspectives_and_views/008-php_perspective_views/000-index.md

public static final String PHP_EXPLORER_VIEW = PREFIX + "php_explorer_view"; //$NON-NLS-1$ 032-reference/008-php_perspectives_and_views/008-php_perspective_views/008-php_explorer_view.md

public static final String OUTLINE_VIEW = PREFIX + "outline_view"; //$NON-NLS-1$ 032-reference/008-php_perspectives_and_views/008-php_perspective_views/016-php_outline_view.md

public static final String TYPE_HIERARCHY_VIEW = PREFIX + "type_hierarchy_view"; //$NON-NLS-1$ 032-reference/008-php_perspectives_and_views/008-php_perspective_views/024-type_hierarchy_view.md

public static final String PHP_DEBUG_PERSPECTIVE = PREFIX + "php_debug_perspective"; //$NON-NLS-1$ 032-reference/008-php_perspectives_and_views/016-php_debug_perspective/000-index.md

public static final String DEBUG_VIEW = PREFIX + "debug_view"; //$NON-NLS-1$ 032-reference/008-php_perspectives_and_views/016-php_debug_perspective/008-debug_view.md

public static final String VARIABLES_VIEW = PREFIX + "variables_view"; //$NON-NLS-1$ 032-reference/008-php_perspectives_and_views/016-php_debug_perspective/016-variables_view.md

public static final String BREAKPOINTS_VIEW = PREFIX + "breakpoints_view"; //$NON-NLS-1$ 032-reference/008-php_perspectives_and_views/016-php_debug_perspective/024-breakpoints_view.md

public static final String EXPRESSIONS_VIEW = PREFIX + "expressions_view"; //$NON-NLS-1$ 032-reference/008-php_perspectives_and_views/016-php_debug_perspective/040-expressions_view.md

public static final String DEBUG_OUTPUT_VIEW = PREFIX + "debug_output_view"; //$NON-NLS-1$ 032-reference/008-php_perspectives_and_views/016-php_debug_perspective/048-debug_output_view.md

public static final String BROWSER_OUTPUT_VIEW = PREFIX + "browser_output_view"; //$NON-NLS-1$ 032-reference/008-php_perspectives_and_views/016-php_debug_perspective/056-browser_output_view.md

public static final String PHP_ADDITIONAL_VIEWS = PREFIX + "php_additional_views"; //$NON-NLS-1$ 032-reference/008-php_perspectives_and_views/024-php_additional_views/000-index.md

public static final String PHP_FUNCTIONS_VIEW = PREFIX + "php_functions_view"; //$NON-NLS-1$ 032-reference/008-php_perspectives_and_views/024-php_additional_views/008-php_functions_view.md

public static final String PROJECT_OUTLINE_VIEW = PREFIX + "project_outline_view"; //$NON-NLS-1$ 032-reference/008-php_perspectives_and_views/024-php_additional_views/016-project_outline_view.md

public static final String MENUS = PREFIX + "menus"; //$NON-NLS-1$ 032-reference/016-menus/000-index.md

public static final String FILE = PREFIX + "file"; //$NON-NLS-1$ 032-reference/016-menus/008-file/000-index.md

public static final String NEW = PREFIX + "new"; //$NON-NLS-1$ 032-reference/016-menus/008-file/008-new.md

public static final String IMPORT = PREFIX + "import"; //$NON-NLS-1$ 032-reference/016-menus/008-file/016-import.md

public static final String EXPORT = PREFIX + "export"; //$NON-NLS-1$ 032-reference/016-menus/008-file/024-export.md

public static final String EDIT = PREFIX + "edit"; //$NON-NLS-1$ 032-reference/016-menus/016-edit.md

public static final String SOURCE = PREFIX + "source"; //$NON-NLS-1$ 032-reference/016-menus/024-source.md

public static final String REFACTOR = PREFIX + "refactor"; //$NON-NLS-1$ 032-reference/016-menus/032-refactor.md

public static final String NAVIGATE = PREFIX + "navigate"; //$NON-NLS-1$ 032-reference/016-menus/040-navigate.md

public static final String SEARCH = PREFIX + "search"; //$NON-NLS-1$ 032-reference/016-menus/048-search.md

public static final String PROJECT = PREFIX + "project"; //$NON-NLS-1$ 032-reference/016-menus/056-project.md

public static final String RUN = PREFIX + "run"; //$NON-NLS-1$ 032-reference/016-menus/064-run.md

public static final String NAVIGATION = PREFIX + "navigation"; //$NON-NLS-1$ 032-reference/016-menus/072-navigation.md

public static final String WINDOW = PREFIX + "window"; //$NON-NLS-1$ 032-reference/016-menus/080-window.md

public static final String HELP = PREFIX + "help"; //$NON-NLS-1$ 032-reference/016-menus/088-help.md

public static final String PHP_PERSPECTIVE_MAIN_TOOLBAR = PREFIX + "php_perspective_main_toolbar"; //$NON-NLS-1$ 032-reference/024-php_perspective_main_toolbar.md

public static final String PREFERENCES = PREFIX + "preferences"; //$NON-NLS-1$ 032-reference/032-preferences/000-index.md

public static final String PHP = PREFIX + "php"; //$NON-NLS-1$ 032-reference/032-preferences/008-php.md

public static final String APPEARANCE_PREFERENCES = PREFIX + "appearance_preferences"; //$NON-NLS-1$ 032-reference/032-preferences/016-appearance.md

public static final String CODE_REFACTOR_PREFERENCES = PREFIX + "code_refactor_preferences"; //$NON-NLS-1$ 032-reference/032-preferences/020-code_refactor.md

public static final String CODE_STYLE_PREFERENCES = PREFIX + "code_style_preferences"; //$NON-NLS-1$ 032-reference/032-preferences/024-code_style_preferences/000-index.md

public static final String CODE_TEMPLATES_PREFERENCES = PREFIX + "code_templates_preferences"; //$NON-NLS-1$ 032-reference/032-preferences/024-code_style_preferences/008-code_templates_preferences.md

public static final String FORMATTER_PREFERENCES = PREFIX + "formatter_preferences"; //$NON-NLS-1$ 032-reference/032-preferences/024-code_style_preferences/016-formatter.md

public static final String DEBUG_PREFERENCES = PREFIX + "debug_preferences"; //$NON-NLS-1$ 032-reference/032-preferences/032-debug/000-index.md

public static final String INSTALLED_DEBUGGERS = PREFIX + "installed_debuggers"; //$NON-NLS-1$ 032-reference/032-preferences/032-debug/008-installed_debuggers.md

public static final String STEP_FILTERING_PREFERENCES = PREFIX + "step_filtering_preferences"; //$NON-NLS-1$ 032-reference/032-preferences/032-debug/016-step_filtering_preferences.md

public static final String LAUNCHING = PREFIX + "launching"; //$NON-NLS-1$ 032-reference/032-preferences/032-debug/024-launching.md

public static final String WORKBENCH_OPTIONS = PREFIX + "workbench_options"; //$NON-NLS-1$ 032-reference/032-preferences/032-debug/024-launching.md

public static final String EDITOR_PREFERENCES = PREFIX + "editor_preferences"; //$NON-NLS-1$ 032-reference/032-preferences/040-editor/000-index.md

public static final String CODE_ASSIST_PREFERENCES = PREFIX + "code_assist_preferences"; //$NON-NLS-1$ 032-reference/032-preferences/040-editor/008-code_assist.md

public static final String FOLDING_PREFERENCES = PREFIX + "folding_preferences"; //$NON-NLS-1$ 032-reference/032-preferences/040-editor/016-folding.md

public static final String HOVERS_PREFERENCES = PREFIX + "hovers_preferences"; //$NON-NLS-1$ 032-reference/032-preferences/040-editor/024-hovers.md

public static final String MARK_OCCURRENCES_PREFERENCES = PREFIX + "mark_occurrences_preferences"; //$NON-NLS-1$ 032-reference/032-preferences/040-editor/032-mark_occurences.md

public static final String SAVE_ACTIONS_PREFERENCES = PREFIX + "save_actions_preferences"; //$NON-NLS-1$ 032-reference/032-preferences/040-editor/040-save_actions.md

public static final String SYNTAX_COLORING_PREFERENCES = PREFIX + "syntax_coloring_preferences"; //$NON-NLS-1$ 032-reference/032-preferences/040-editor/048-syntax_coloring.md

public static final String TEMPLATES_PREFERENCES = PREFIX + "templates_preferences"; //$NON-NLS-1$ 032-reference/032-preferences/040-editor/064-templates.md

public static final String TYPING_PREFERENCES = PREFIX + "typing_preferences"; //$NON-NLS-1$ 032-reference/032-preferences/040-editor/072-typing.md

public static final String NEW_PROJECT_LAYOUT_PREFERENCES = PREFIX + "new_project_layout_preferences"; //$NON-NLS-1$ 032-reference/032-preferences/048-new_project_layout_preferences.md

public static final String PHP_EXECUTABLES = PREFIX + "php_executables"; //$NON-NLS-1$ 032-reference/032-preferences/056-php_executables/000-index.md

public static final String PHP_EXECUTABLES_PREFERENCES = PREFIX + "php_executables_preferences"; //$NON-NLS-1$ 032-reference/032-preferences/056-php_executables/000-index.md

public static final String PHPEXE_ENV_PREFERENCES = PREFIX + "phpexe_env_preferences"; //$NON-NLS-1$ 032-reference/032-preferences/056-php_executables/008-php-execution-environment.md

public static final String PHP_INTERPRETER_PREFERENCES = PREFIX + "php_interpreter_preferences"; //$NON-NLS-1$ 032-reference/032-preferences/064-php_interpreter.md

public static final String PATH_VARIABLES_PREFERENCES = PREFIX + "path_variables_preferences"; //$NON-NLS-1$ 032-reference/032-preferences/068-path_variables.md

public static final String PHP_MANUAL_PREFERENCES = PREFIX + "php_manual_preferences"; //$NON-NLS-1$ 032-reference/032-preferences/072-php_manual.md

public static final String PHP_SERVERS_PREFERENCES = PREFIX + "php_servers_preferences"; //$NON-NLS-1$ 032-reference/032-preferences/080-php_servers.md

public static final String CONFIGURING_TUNNELING_DEBUG_PREFERENCES = PREFIX + "configuring_tunneling_debug_preferences"; //$NON-NLS-1$ 032-reference/032-preferences/088-configuring_tunneling_debug_preferences.md

public static final String VALIDATION_PREFERENCES = PREFIX + "validation_preferences"; //$NON-NLS-1$ 032-reference/032-preferences/096-validation/000-index.md

public static final String TASK_TAGS_PREFERENCES = PREFIX + "task_tags_preferences"; //$NON-NLS-1$ 032-reference/032-preferences/096-validation/008-task_tags.md

public static final String PHP_PROJECT_PROPERTIES = PREFIX + "php_project_properties"; //$NON-NLS-1$ 032-reference/040-php_project_properties/000-index.md

public static final String RESOURCE_PROPERTIES = PREFIX + "resource_properties"; //$NON-NLS-1$ 032-reference/040-php_project_properties/008-resource_properties.md

public static final String BUILDERS_PROPERTIES = PREFIX + "builders_properties"; //$NON-NLS-1$ 032-reference/040-php_project_properties/016-builders_properties.md

public static final String CODE_STYLE_PROPERTIES = PREFIX + "code_style_properties"; //$NON-NLS-1$ 032-reference/040-php_project_properties/024-code_style_properties/000-index.md

public static final String CODE_TEMPLATES_PROPERTIES = PREFIX + "code_templates_properties"; //$NON-NLS-1$ 032-reference/040-php_project_properties/024-code_style_properties/008-code_templates_properties.md

public static final String FORMATTER_PROPERTIES = PREFIX + "formatter_properties"; //$NON-NLS-1$ 032-reference/040-php_project_properties/024-code_style_properties/016-formatter_properties.md

public static final String PHP_BUILD_PATH_PROPERTIES = PREFIX + "php_build_path_properties"; //$NON-NLS-1$ 032-reference/040-php_project_properties/032-php_build_path_properties.md

public static final String PHP_DEBUG_PROPERTIES = PREFIX + "php_debug_properties"; //$NON-NLS-1$ 032-reference/040-php_project_properties/040-php_debug_properties.md

public static final String PHP_INCLUDE_PATH_PROPERTIES = PREFIX + "php_include_path_properties"; //$NON-NLS-1$ 032-reference/040-php_project_properties/048-php_include_path_properties.md

public static final String PHP_INTERPRETER_PROPERTIES = PREFIX + "php_interpreter_properties"; //$NON-NLS-1$ 032-reference/040-php_project_properties/056-php_interpreter_properties.md

public static final String PHP_TASK_TAGS_PROPERTIES = PREFIX + "php_task_tags_properties"; //$NON-NLS-1$ 032-reference/040-php_project_properties/064-php_task_tags_properties.md

public static final String PROJECT_REFERENCES_PROPERTIES = PREFIX + "project_references_properties"; //$NON-NLS-1$ 032-reference/040-php_project_properties/072-project_references_properties.md

public static final String RUN_DEBUG_SETTINGS_PROPERTIES = PREFIX + "run_debug_settings_properties"; //$NON-NLS-1$ 032-reference/040-php_project_properties/088-run_debug_settings_properties.md

public static final String EDITOR_PROPERTIES = PREFIX + "editor_properties"; //$NON-NLS-1$ 032-reference/040-php_project_properties/096-editor/000-index.md

public static final String SAVE_ACTIONS_PROPERTIES = PREFIX + "save_actions_properties"; //$NON-NLS-1$ 032-reference/040-php_project_properties/096-editor/008-save_actions_properties.md

public static final String VALIDATION_PROPERTIES = PREFIX + "validation_properties"; //$NON-NLS-1$ 032-reference/040-php_project_properties/112-validation_properties/000-index.md

public static final String TASK_TAGS_PROPERTIES = PREFIX + "task_tags_properties"; //$NON-NLS-1$ 032-reference/040-php_project_properties/112-validation_properties/008-task_tags_properties.md

public static final String PHP_ICONS = PREFIX + "php_icons"; //$NON-NLS-1$ 032-reference/048-php_icons.md

public static final String KEYMAP = PREFIX + "keymap"; //$NON-NLS-1$ 032-reference/056-keymap.md

public static final String PHARPACKAGER_WIZARD_PAGE = PREFIX + "pharpackager_wizard_page"; //$NON-NLS-1$ 032-reference/056-keymap.md

public static final String PHAR_FILE_IMPORT_WIZARD_PAGE = PREFIX + "phar_file_import_wizard_page"; //$NON-NLS-1$ 032-reference/056-keymap.md

public static final String VIDEO_TUTORIALS = PREFIX + "video_tutorials"; //$NON-NLS-1$ 040-video_tutorials.md

}


text:
import { v4 as uuid } from 'uuid';
import fromBuffer from 'image-type';
import imageSize from 'image-size';
import { KeystoneConfig, ImageMetadata, ImagesContext } from '../../types';
import { ImageAdapter } from './types';
import { localImageAssetsAPI } from './local';
import { s3ImageAssetsAPI } from './s3';
import { streamToBuffer } from './utils';

export function getImageMetadataFromBuffer(buffer: Buffer): ImageMetadata {
  const fileType = fromBuffer(buffer);
  if (!fileType) {
    throw new Error('File type not found');
  }

  const extension = fileType.ext;
  if (extension !== 'jpg' && extension !== 'png' && extension !== 'webp' && extension !== 'gif') {
    throw new Error(`${extension} is not a supported image type`);
  }

  const { height, width } = imageSize(buffer);

  if (width === undefined || height === undefined) {
    throw new Error('Height and width could not be found for image');
  }
  return { width, height, filesize: buffer.length, extension };
}

export function createImagesContext(config: KeystoneConfig): ImagesContext {
  const imageAssetsAPIs = new Map<string, ImageAdapter>();
  for (const [storageKey, storageConfig] of Object.entries(config.storage || {})) {
    if (storageConfig.type === 'image') {
      imageAssetsAPIs.set(
        storageKey,
        storageConfig.kind === 'local'
          ? localImageAssetsAPI(storageConfig)
          : s3ImageAssetsAPI(storageConfig)
      );
    }
  }

  return (storageString: string) => {
    const adapter = imageAssetsAPIs.get(storageString);
    if (adapter === undefined) {
      throw new Error(`No file assets API found for storage string "${storageString}"`);
    }

    return {
      getUrl: async (id, extension) => {
        return adapter.url(id, extension);
      },
      getDataFromStream: async (stream, originalFilename) => {
        const storageConfig = config.storage![storageString];
        const { transformName = () => uuid() } = storageConfig;

        const buffer = await streamToBuffer(stream);
        const { extension, ...rest } = getImageMetadataFromBuffer(buffer);

        const id = await transformName(originalFilename, extension);

        await adapter.upload(buffer, id, extension);
        return { id, extension, ...rest };
      },
      deleteAtSource: adapter.delete,
    };
  };
}


text:
<?php

/**
 * Permite realizar logs en archivos de texto en la carpeta Logs
 *
 * $fileLogger = Es el File Handle para escribir los logs
 * $transaction = Indica si hay o no transaccion
 * $queue = array con lista de logs pendientes
 *
 * Ej:
 * <code>
 * //Empieza un log en logs/logDDMMYY.txt
 *
 *
 * Logger::debug('Loggear esto como un debug');
 *
 * //Esto se guarda al log inmediatamente
 * Logger::error('Loggear esto como un error');
 *
 * //Inicia una transacción
 * Logger::begin();
 *
 * //Esto queda pendiente hasta que se llame a commit para guardar
 * //ó rollback para cancelar
 * Logger::warning('Esto es un log en la fila');
 * Logger::notice('Esto es un otro log en la fila');
 *
 * //Se guarda al log
 * Logger::commit();
 *
 * //Cierra el Log
 * Logger::close();
 * </code>
 *
 * @category   Kumbia
 * @package    Logger
 */
abstract class Logger
{

    /**
     * Resource hacia el Archivo del Log
     *
     * @var null|resource
     */
    private static $fileLogger;
    /**
     * @var
     */
    private static $log_name = null;
    /**
     * Indica si hay transaccion o no
     *
     * @var boolean
     */
    private static $transaction = false;
    /**
     * Array con mensajes de log en cola en una transsaccion
     *
     * @var array
     */
    private static $queue = array();
    /**
     * Path donde se guardaran los logs
     *
     * @var string
     */
    private static $log_path = '';

    /**
     * Inicializa el Logger
     *
     * @param string $name
     */
    public static function initialize(string $name = ''): void
    {
        self::$log_path = APP_PATH . 'temp/logs/'; //TODO poder cambiar el path
        if ($name === '') {
            $name = 'log' . date('Y-m-d') . '.txt';
        }
        self::$fileLogger = fopen(self::$log_path . $name, 'a');
        if (!self::$fileLogger) {
            throw new KumbiaException("No se puede abrir el log llamado: " . $name);
        }
    }

    /**
     * Especifica el PATH donde se guardan los logs
     *
     * @param string $path
     */
    public static function set_path(string $path): void
    {
        self::$log_path = $path;
    }

    /**
     * Obtener el path actual
     *
     * @return string
     */
    public static function get_path(): string
    {
        return self::$log_path;
    }

    /**
     * Almacena un mensaje en el log
     *
     * @param string $type
     * @param string|array $msg
     * @param string $name_log
     */
    public static function log(string $type = 'DEBUG', string|array $msg, string $name_log): void
    {
        if (is_array($msg)) {
            $msg = print_r($msg, true);
        }
        //TODO poder añadir otros formatos de log
        $date = date(DATE_RFC1036);
        $msg = "[$date][$type] " . $msg;
        if (self::$transaction) {
            self::$queue[] = $msg;
            return;
        }
        self::write($msg, $name_log);
    }

    /**
     * Escribir en el log
     *
     * @param string $msg
     */
    protected static function write(string $msg, string $name_log): void
    {
        self::initialize($name_log); //TODO dejarlo abierto cuando es un commit
        fputs(self::$fileLogger, $msg . PHP_EOL);
        self::close();
    }

    /**
     * Inicia una transacción
     *
     */
    public static function begin(): void
    {
        self::$transaction = true;
    }

    /**
     * Deshace una transacción
     *
     */
    public static function rollback(): void
    {
        self::$transaction = false;
        self::$queue = array();
    }

    /**
     * Commit a una transacción
     *
     * @param string $name_log
     */
    public static function commit(string $name_log = ''): void
    {
        foreach (self::$queue as $msg) {
            self::write($msg, $name_log);
        }
        self::$queue = array();
        self::$transaction = false;
    }

    /**
     * Cierra el Logger
     *
     */
    public static function close(): bool
    {
        if (!self::$fileLogger) {
            throw new KumbiaException("No se puede cerrar el log porque es invalido");
        }
        return fclose(self::$fileLogger);
    }

    /**
     * Genera un log de tipo WARNING
     *
     * @return void
     * @param string $msg
     * @param string $name_log
     */
    public static function warning(string $msg, string $name_log = ''): void
    {
        self::log('WARNING', $msg, $name_log);
    }

    /**
     * Genera un log de tipo ERROR
     *
     * @return void
     * @param string|array $msg
     * @param string $name_log
     */
    public static function error(string|array $msg, string $name_log = ''): void
    {
        self::log('ERROR', $msg, $name_log);
    }

    /**
     * Genera un log de tipo DEBUG
     *
     * @return void
     * @param string|array $msg
     * @param string $name_log
     */
    public static function debug(string|array $msg, string $name_log = ''): void
    {
        self::log('DEBUG', $msg, $name_log);
    }

    /**
     * Genera un log de tipo ALERT
     *
     * @return void
     * @param string|array $msg
     * @param string $name_log
     */
    public static function alert(string|array $msg, string $name_log = ''): void
    {
        self::log('ALERT', $msg, $name_log);
    }

    /**
     * Genera un log de tipo CRITICAL
     *
     * @return void
     * @param string|array $msg
     * @param string $name_log
     */
    public static function critical(string|array $msg, string $name_log = ''): void
    {
        self::log('CRITICAL', $msg, $name_log);
    }

    /**
     * Genera un log de tipo NOTICE
     *
     * @return void
     * @param string|array $msg
     * @param string $name_log
     */
    public static function notice(string|array $msg, string $name_log = ''): void
    {
        self::log('NOTICE', $msg, $name_log);
    }

    /**
     * Genera un log de tipo INFO
     *
     * @return void
     * @param string|array $msg
     * @param string $name_log
     */
    public static function info(string|array $msg, string $name_log = ''): void
    {
        self::log('INFO', $msg, $name_log);
    }

    /**
     * Genera un log de tipo EMERGENCE
     *
     * @return void
     * @param string|array $msg
     * @param string $name_log
     */
    public static function emergence(string|array $msg, string $name_log = ''): void
    {
        self::log('EMERGENCE', $msg, $name_log);
    }

    /**
     * Genera un log Personalizado
     *
     * @param string $type
     * @param string|array $msg
     * @param string $name_log
     */
    public static function custom(string $type = 'CUSTOM', string|array $msg, string $name_log = ''): void
    {
        self::log($type, $msg, $name_log);
    }

}


text:
import ClustersStore from '~/clusters/stores/clusters_store';
import { APPLICATION_STATUS } from '~/clusters/constants';
import { CLUSTERS_MOCK_DATA } from '../services/mock_data';

describe('Clusters Store', () => {
  let store;

  beforeEach(() => {
    store = new ClustersStore();
  });

  describe('updateStatus', () => {
    it('should store new status', () => {
      expect(store.state.status).toEqual(null);

      const newStatus = 'errored';
      store.updateStatus(newStatus);

      expect(store.state.status).toEqual(newStatus);
    });
  });

  describe('updateStatusReason', () => {
    it('should store new reason', () => {
      expect(store.state.statusReason).toEqual(null);

      const newReason = 'Something went wrong!';
      store.updateStatusReason(newReason);

      expect(store.state.statusReason).toEqual(newReason);
    });
  });

  describe('updateAppProperty', () => {
    it('should store new request status', () => {
      expect(store.state.applications.helm.requestStatus).toEqual(null);

      const newStatus = APPLICATION_STATUS.INSTALLING;
      store.updateAppProperty('helm', 'requestStatus', newStatus);

      expect(store.state.applications.helm.requestStatus).toEqual(newStatus);
    });

    it('should store new request reason', () => {
      expect(store.state.applications.helm.requestReason).toEqual(null);

      const newReason = 'We broke it.';
      store.updateAppProperty('helm', 'requestReason', newReason);

      expect(store.state.applications.helm.requestReason).toEqual(newReason);
    });
  });

  describe('updateStateFromServer', () => {
    it('should store new polling data from server', () => {
      const mockResponseData = CLUSTERS_MOCK_DATA.GET['/gitlab-org/gitlab-shell/clusters/1/status.json'].data;
      store.updateStateFromServer(mockResponseData);

      expect(store.state).toEqual({
        helpPath: null,
        ingressHelpPath: null,
        status: mockResponseData.status,
        statusReason: mockResponseData.status_reason,
        applications: {
          helm: {
            title: 'Helm Tiller',
            status: mockResponseData.applications[0].status,
            statusReason: mockResponseData.applications[0].status_reason,
            requestStatus: null,
            requestReason: null,
          },
          ingress: {
            title: 'Ingress',
            status: mockResponseData.applications[1].status,
            statusReason: mockResponseData.applications[1].status_reason,
            requestStatus: null,
            requestReason: null,
            externalIp: null,
          },
          runner: {
            title: 'GitLab Runner',
            status: mockResponseData.applications[2].status,
            statusReason: mockResponseData.applications[2].status_reason,
            requestStatus: null,
            requestReason: null,
          },
          prometheus: {
            title: 'Prometheus',
            status: mockResponseData.applications[3].status,
            statusReason: mockResponseData.applications[3].status_reason,
            requestStatus: null,
            requestReason: null,
          },
          jupyter: {
            title: 'JupyterHub',
            status: mockResponseData.applications[4].status,
            statusReason: mockResponseData.applications[4].status_reason,
            requestStatus: null,
            requestReason: null,
            hostname: '',
          },
        },
      });
    });

    it('sets default hostname for jupyter when ingress has a ip address', () => {
      const mockResponseData = CLUSTERS_MOCK_DATA.GET['/gitlab-org/gitlab-shell/clusters/2/status.json'].data;

      store.updateStateFromServer(mockResponseData);

      expect(
        store.state.applications.jupyter.hostname,
      ).toEqual(`jupyter.${store.state.applications.ingress.externalIp}.nip.io`);
    });
  });
});


text:
            Key
            Default
            Type
            Description

cluster.evenly-spread-out-slots

            false
            Boolean
            Enable the slot spread out allocation strategy. This strategy tries to spread out the slots evenly across all available TaskExecutors.

cluster.fine-grained-resource-management.enabled

            false
            Boolean
            Defines whether the cluster uses fine-grained resource management.

fine-grained.shuffle-mode.all-blocking

            false
            Boolean
            Whether to convert all PIPELINE edges to BLOCKING when apply fine-grained resource management in batch jobs.

jobmanager.adaptive-batch-scheduler.avg-data-volume-per-task

            1 gb
            MemorySize
            The average size of data volume to expect each task instance to process if jobmanager.scheduler has been set to AdaptiveBatch. Note that since the parallelism of the vertices is adjusted to a power of 2, the actual average size will be 0.75~1.5 times this value. It is also important to note that when data skew occurs or the decided parallelism reaches the jobmanager.adaptive-batch-scheduler.max-parallelism (due to too much data), the data actually processed by some tasks may far exceed this value.

jobmanager.adaptive-batch-scheduler.default-source-parallelism

            1
            Integer
            The default parallelism of source vertices if jobmanager.scheduler has been set to AdaptiveBatch

jobmanager.adaptive-batch-scheduler.max-parallelism

            128
            Integer
            The upper bound of allowed parallelism to set adaptively if jobmanager.scheduler has been set to AdaptiveBatch. Currently, this option should be configured as a power of 2, otherwise it will also be rounded down to a power of 2 automatically.

jobmanager.adaptive-batch-scheduler.min-parallelism

            1
            Integer
            The lower bound of allowed parallelism to set adaptively if jobmanager.scheduler has been set to AdaptiveBatch. Currently, this option should be configured as a power of 2, otherwise it will also be rounded up to a power of 2 automatically.

jobmanager.adaptive-batch-scheduler.speculative.block-slow-node-duration

            1 min
            Duration
            Controls how long an detected slow node should be blocked for.

jobmanager.adaptive-batch-scheduler.speculative.enabled

            false
            Boolean
            Controls whether to enable speculative execution.

jobmanager.adaptive-batch-scheduler.speculative.max-concurrent-executions

            2
            Integer
            Controls the maximum number of execution attempts of each operator that can execute concurrently, including the original one and speculative ones.

jobmanager.adaptive-scheduler.min-parallelism-increase

            1
            Integer
            Configure the minimum increase in parallelism for a job to scale up.

jobmanager.adaptive-scheduler.resource-stabilization-timeout

            10 s
            Duration
            The resource stabilization timeout defines the time the JobManager will wait if fewer than the desired but sufficient resources are available. The timeout starts once sufficient resources for running the job are available. Once this timeout has passed, the job will start executing with the available resources.
If scheduler-mode is configured to REACTIVE, this configuration value will default to 0, so that jobs are starting immediately with the available resources.

jobmanager.adaptive-scheduler.resource-wait-timeout

            5 min
            Duration
            The maximum time the JobManager will wait to acquire all required resources after a job submission or restart. Once elapsed it will try to run the job with a lower parallelism, or fail if the minimum amount of resources could not be acquired.
Increasing this value will make the cluster more resilient against temporary resources shortages (e.g., there is more time for a failed TaskManager to be restarted).
Setting a negative duration will disable the resource timeout: The JobManager will wait indefinitely for resources to appear.
If scheduler-mode is configured to REACTIVE, this configuration value will default to a negative value to disable the resource timeout.

jobmanager.scheduler

            Default

Enum

            Determines which scheduler implementation is used to schedule tasks. Accepted values are:

'Default': Default scheduler

'Adaptive': Adaptive scheduler. More details can be found here.

'AdaptiveBatch': Adaptive batch scheduler. More details can be found here.

Possible values:

"Default"

"Adaptive"

"AdaptiveBatch"

scheduler-mode

            (none)

Enum

            Determines the mode of the scheduler. Note that scheduler-mode=REACTIVE is only supported by standalone application deployments, not by active resource managers (YARN, Kubernetes) or session clusters.

Possible values:

"REACTIVE"

slot.idle.timeout

            50000
            Long
            The timeout in milliseconds for a idle slot in Slot Pool.

slot.request.timeout

            300000
            Long
            The timeout in milliseconds for requesting a slot from Slot Pool.

slotmanager.max-total-resource.cpu

            (none)
            Double
            Maximum cpu cores the Flink cluster allocates for slots. Resources for JobManager and TaskManager framework are excluded. If not configured, it will be derived from 'slotmanager.number-of-slots.max'.

slotmanager.max-total-resource.memory

            (none)
            MemorySize
            Maximum memory size the Flink cluster allocates for slots. Resources for JobManager and TaskManager framework are excluded. If not configured, it will be derived from 'slotmanager.number-of-slots.max'.

slotmanager.number-of-slots.max

            2147483647
            Integer
            Defines the maximum number of slots that the Flink cluster allocates. This configuration option is meant for limiting the resource consumption for batch workloads. It is not recommended to configure this option for streaming workloads, which may fail if there are not enough slots. Note that this configuration option does not take effect for standalone clusters, where how many slots are allocated is not controlled by Flink.

slow-task-detector.check-interval

            1 s
            Duration
            The interval to check slow tasks.

slow-task-detector.execution-time.baseline-lower-bound

            1 min
            Duration
            The lower bound of slow task detection baseline.

slow-task-detector.execution-time.baseline-multiplier

            1.5
            Double
            The multiplier to calculate the slow tasks detection baseline. Given that the parallelism is N and the ratio is R, define T as the median of the first N*R finished tasks' execution time. The baseline will be T*M, where M is the multiplier of the baseline.

slow-task-detector.execution-time.baseline-ratio

            0.75
            Double
            The finished execution ratio threshold to calculate the slow tasks detection baseline. Given that the parallelism is N and the ratio is R, define T as the median of the first N*R finished tasks' execution time. The baseline will be T*M, where M is the multiplier of the baseline.


text:
var pd = require('./pageData.js');
var cfunc = require('../common/commonFunctions.js');

describe('Traffic Portal Cache Groups Test Suite', function() {
	const pageData = new pd();
	const commonFunctions = new cfunc();
	const myNewCG = {
		name: 'cache-group-' + commonFunctions.shuffle('abcdefghijklmonpqrstuvwxyz0123456789'),
		latitude: 45,
		longitude: 45
	};

	it('should go to the cache groups page', function() {
		console.log("Go to the cache groups page");
		browser.setLocation("cache-groups");
		expect(browser.getCurrentUrl().then(commonFunctions.urlPath)).toEqual(commonFunctions.urlPath(browser.baseUrl)+"#!/cache-groups");
	});

	it('should verify CSV link exists ', function() {
		console.log("Verify CSV button exists");
		expect(element(by.css('.dt-button.buttons-csv')).isPresent()).toBe(true);
	});

	it('should open new cache group form page', function() {
		console.log("Open new cache groups form page");
		browser.driver.findElement(by.name('createCacheGroupButton')).click();
		expect(browser.getCurrentUrl().then(commonFunctions.urlPath)).toEqual(commonFunctions.urlPath(browser.baseUrl)+"#!/cache-groups/new");
	});

	it('should fill out form, create button is enabled and submit', function () {
		console.log("Filling out form, check create button is enabled and submit");
		expect(pageData.createButton.isEnabled()).toBe(false);
		pageData.name.sendKeys(myNewCG.name);
		pageData.shortName.sendKeys(myNewCG.name);
		commonFunctions.selectDropdownbyNum(pageData.type, 1);
		pageData.latitude.sendKeys(myNewCG.latitude);
		pageData.longitude.sendKeys(myNewCG.longitude);
		expect(pageData.createButton.isEnabled()).toBe(true);
		pageData.createButton.click();
		expect(browser.getCurrentUrl().then(commonFunctions.urlPath)).toEqual(commonFunctions.urlPath(browser.baseUrl)+"#!/cache-groups");
	});

	it('should toggle the visibility of the first table column ', function() {
		browser.driver.findElement(by.id('toggleColumns')).click();
		let first = element.all(by.css('input[type=checkbox]')).first();
		expect(first.isSelected()).toBe(true);
		first.click();
		expect(first.isSelected()).toBe(false);
		let tableColumns = element.all(by.css('#cacheGroupsTable tr:first-child th'));
		expect(tableColumns.count()).toBe(6);
	});

});


text:
package shiver.me.timbers.aws.lambda.soap.stub;

import org.junit.Test;

import static org.mockito.Mockito.mock;
import static shiver.me.timbers.data.random.RandomStrings.someString;

public class SoapExceptionTest {

    @Test
    public void Instantiation_for_coverage() {
        new SoapException(someString(), mock(Throwable.class));
    }
}


text:
package flowprobe

import (
	"strconv"

	api "git.fd.io/govpp.git/api"
	codec "git.fd.io/govpp.git/codec"
	interface_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2106/interface_types"
)

// This is a compile-time assertion to ensure that this generated file
// is compatible with the GoVPP api package it is being compiled against.
// A compilation error at this line likely means your copy of the
// GoVPP api package needs to be updated.
const _ = api.GoVppAPIPackageIsVersion2

const (
	APIFile    = "flowprobe"
	APIVersion = "1.0.0"
	VersionCrc = 0x8da9f1c
)

// FlowprobeRecordFlags defines enum 'flowprobe_record_flags'.
type FlowprobeRecordFlags uint8

const (
	FLOWPROBE_RECORD_FLAG_L2 FlowprobeRecordFlags = 1
	FLOWPROBE_RECORD_FLAG_L3 FlowprobeRecordFlags = 2
	FLOWPROBE_RECORD_FLAG_L4 FlowprobeRecordFlags = 4
)

var (
	FlowprobeRecordFlags_name = map[uint8]string{
		1: "FLOWPROBE_RECORD_FLAG_L2",
		2: "FLOWPROBE_RECORD_FLAG_L3",
		4: "FLOWPROBE_RECORD_FLAG_L4",
	}
	FlowprobeRecordFlags_value = map[string]uint8{
		"FLOWPROBE_RECORD_FLAG_L2": 1,
		"FLOWPROBE_RECORD_FLAG_L3": 2,
		"FLOWPROBE_RECORD_FLAG_L4": 4,
	}
)

func (x FlowprobeRecordFlags) String() string {
	s, ok := FlowprobeRecordFlags_name[uint8(x)]
	if ok {
		return s
	}
	str := func(n uint8) string {
		s, ok := FlowprobeRecordFlags_name[uint8(n)]
		if ok {
			return s
		}
		return "FlowprobeRecordFlags(" + strconv.Itoa(int(n)) + ")"
	}
	for i := uint8(0); i <= 8; i++ {
		val := uint8(x)
		if val&(1<<i) != 0 {
			if s != "" {
				s += "|"
			}
			s += str(1 << i)
		}
	}
	if s == "" {
		return str(uint8(x))
	}
	return s
}

// FlowprobeWhichFlags defines enum 'flowprobe_which_flags'.
type FlowprobeWhichFlags uint8

const (
	FLOWPROBE_WHICH_FLAG_IP4 FlowprobeWhichFlags = 1
	FLOWPROBE_WHICH_FLAG_L2  FlowprobeWhichFlags = 2
	FLOWPROBE_WHICH_FLAG_IP6 FlowprobeWhichFlags = 4
)

var (
	FlowprobeWhichFlags_name = map[uint8]string{
		1: "FLOWPROBE_WHICH_FLAG_IP4",
		2: "FLOWPROBE_WHICH_FLAG_L2",
		4: "FLOWPROBE_WHICH_FLAG_IP6",
	}
	FlowprobeWhichFlags_value = map[string]uint8{
		"FLOWPROBE_WHICH_FLAG_IP4": 1,
		"FLOWPROBE_WHICH_FLAG_L2":  2,
		"FLOWPROBE_WHICH_FLAG_IP6": 4,
	}
)

func (x FlowprobeWhichFlags) String() string {
	s, ok := FlowprobeWhichFlags_name[uint8(x)]
	if ok {
		return s
	}
	str := func(n uint8) string {
		s, ok := FlowprobeWhichFlags_name[uint8(n)]
		if ok {
			return s
		}
		return "FlowprobeWhichFlags(" + strconv.Itoa(int(n)) + ")"
	}
	for i := uint8(0); i <= 8; i++ {
		val := uint8(x)
		if val&(1<<i) != 0 {
			if s != "" {
				s += "|"
			}
			s += str(1 << i)
		}
	}
	if s == "" {
		return str(uint8(x))
	}
	return s
}

// FlowprobeParams defines message 'flowprobe_params'.
type FlowprobeParams struct {
	RecordFlags  FlowprobeRecordFlags `binapi:"flowprobe_record_flags,name=record_flags" json:"record_flags,omitempty"`
	ActiveTimer  uint32               `binapi:"u32,name=active_timer" json:"active_timer,omitempty"`
	PassiveTimer uint32               `binapi:"u32,name=passive_timer" json:"passive_timer,omitempty"`
}

func (m *FlowprobeParams) Reset()               { *m = FlowprobeParams{} }
func (*FlowprobeParams) GetMessageName() string { return "flowprobe_params" }
func (*FlowprobeParams) GetCrcString() string   { return "baa46c09" }
func (*FlowprobeParams) GetMessageType() api.MessageType {
	return api.RequestMessage
}

func (m *FlowprobeParams) Size() (size int) {
	if m == nil {
		return 0
	}
	size += 1 // m.RecordFlags
	size += 4 // m.ActiveTimer
	size += 4 // m.PassiveTimer
	return size
}
func (m *FlowprobeParams) Marshal(b []byte) ([]byte, error) {
	if b == nil {
		b = make([]byte, m.Size())
	}
	buf := codec.NewBuffer(b)
	buf.EncodeUint8(uint8(m.RecordFlags))
	buf.EncodeUint32(m.ActiveTimer)
	buf.EncodeUint32(m.PassiveTimer)
	return buf.Bytes(), nil
}
func (m *FlowprobeParams) Unmarshal(b []byte) error {
	buf := codec.NewBuffer(b)
	m.RecordFlags = FlowprobeRecordFlags(buf.DecodeUint8())
	m.ActiveTimer = buf.DecodeUint32()
	m.PassiveTimer = buf.DecodeUint32()
	return nil
}

// FlowprobeParamsReply defines message 'flowprobe_params_reply'.
type FlowprobeParamsReply struct {
	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}

func (m *FlowprobeParamsReply) Reset()               { *m = FlowprobeParamsReply{} }
func (*FlowprobeParamsReply) GetMessageName() string { return "flowprobe_params_reply" }
func (*FlowprobeParamsReply) GetCrcString() string   { return "e8d4e804" }
func (*FlowprobeParamsReply) GetMessageType() api.MessageType {
	return api.ReplyMessage
}

func (m *FlowprobeParamsReply) Size() (size int) {
	if m == nil {
		return 0
	}
	size += 4 // m.Retval
	return size
}
func (m *FlowprobeParamsReply) Marshal(b []byte) ([]byte, error) {
	if b == nil {
		b = make([]byte, m.Size())
	}
	buf := codec.NewBuffer(b)
	buf.EncodeInt32(m.Retval)
	return buf.Bytes(), nil
}
func (m *FlowprobeParamsReply) Unmarshal(b []byte) error {
	buf := codec.NewBuffer(b)
	m.Retval = buf.DecodeInt32()
	return nil
}

// FlowprobeTxInterfaceAddDel defines message 'flowprobe_tx_interface_add_del'.
type FlowprobeTxInterfaceAddDel struct {
	IsAdd     bool                           `binapi:"bool,name=is_add" json:"is_add,omitempty"`
	Which     FlowprobeWhichFlags            `binapi:"flowprobe_which_flags,name=which" json:"which,omitempty"`
	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
}

func (m *FlowprobeTxInterfaceAddDel) Reset()               { *m = FlowprobeTxInterfaceAddDel{} }
func (*FlowprobeTxInterfaceAddDel) GetMessageName() string { return "flowprobe_tx_interface_add_del" }
func (*FlowprobeTxInterfaceAddDel) GetCrcString() string   { return "b782c976" }
func (*FlowprobeTxInterfaceAddDel) GetMessageType() api.MessageType {
	return api.RequestMessage
}

func (m *FlowprobeTxInterfaceAddDel) Size() (size int) {
	if m == nil {
		return 0
	}
	size += 1 // m.IsAdd
	size += 1 // m.Which
	size += 4 // m.SwIfIndex
	return size
}
func (m *FlowprobeTxInterfaceAddDel) Marshal(b []byte) ([]byte, error) {
	if b == nil {
		b = make([]byte, m.Size())
	}
	buf := codec.NewBuffer(b)
	buf.EncodeBool(m.IsAdd)
	buf.EncodeUint8(uint8(m.Which))
	buf.EncodeUint32(uint32(m.SwIfIndex))
	return buf.Bytes(), nil
}
func (m *FlowprobeTxInterfaceAddDel) Unmarshal(b []byte) error {
	buf := codec.NewBuffer(b)
	m.IsAdd = buf.DecodeBool()
	m.Which = FlowprobeWhichFlags(buf.DecodeUint8())
	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
	return nil
}

// FlowprobeTxInterfaceAddDelReply defines message 'flowprobe_tx_interface_add_del_reply'.
type FlowprobeTxInterfaceAddDelReply struct {
	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}

func (m *FlowprobeTxInterfaceAddDelReply) Reset() { *m = FlowprobeTxInterfaceAddDelReply{} }
func (*FlowprobeTxInterfaceAddDelReply) GetMessageName() string {
	return "flowprobe_tx_interface_add_del_reply"
}
func (*FlowprobeTxInterfaceAddDelReply) GetCrcString() string { return "e8d4e804" }
func (*FlowprobeTxInterfaceAddDelReply) GetMessageType() api.MessageType {
	return api.ReplyMessage
}

func (m *FlowprobeTxInterfaceAddDelReply) Size() (size int) {
	if m == nil {
		return 0
	}
	size += 4 // m.Retval
	return size
}
func (m *FlowprobeTxInterfaceAddDelReply) Marshal(b []byte) ([]byte, error) {
	if b == nil {
		b = make([]byte, m.Size())
	}
	buf := codec.NewBuffer(b)
	buf.EncodeInt32(m.Retval)
	return buf.Bytes(), nil
}
func (m *FlowprobeTxInterfaceAddDelReply) Unmarshal(b []byte) error {
	buf := codec.NewBuffer(b)
	m.Retval = buf.DecodeInt32()
	return nil
}

func init() { file_flowprobe_binapi_init() }
func file_flowprobe_binapi_init() {
	api.RegisterMessage((*FlowprobeParams)(nil), "flowprobe_params_baa46c09")
	api.RegisterMessage((*FlowprobeParamsReply)(nil), "flowprobe_params_reply_e8d4e804")
	api.RegisterMessage((*FlowprobeTxInterfaceAddDel)(nil), "flowprobe_tx_interface_add_del_b782c976")
	api.RegisterMessage((*FlowprobeTxInterfaceAddDelReply)(nil), "flowprobe_tx_interface_add_del_reply_e8d4e804")
}

// Messages returns list of all messages in this module.
func AllMessages() []api.Message {
	return []api.Message{
		(*FlowprobeParams)(nil),
		(*FlowprobeParamsReply)(nil),
		(*FlowprobeTxInterfaceAddDel)(nil),
		(*FlowprobeTxInterfaceAddDelReply)(nil),
	}
}