text:
package com.intellij.uiDesigner.inspections;

import com.intellij.openapi.module.Module;
import com.intellij.ui.components.JBScrollPane;
import com.intellij.uiDesigner.UIDesignerBundle;
import com.intellij.uiDesigner.actions.SurroundAction;
import com.intellij.uiDesigner.designSurface.GuiEditor;
import com.intellij.uiDesigner.lw.IComponent;
import com.intellij.uiDesigner.palette.ComponentItem;
import com.intellij.uiDesigner.palette.Palette;
import com.intellij.uiDesigner.quickFixes.QuickFix;
import com.intellij.uiDesigner.radComponents.RadComponent;
import org.jetbrains.annotations.NotNull;

import javax.swing.*;
import java.util.ArrayList;
import java.util.Collections;

/**
 * @author yole
 */
public class NoScrollPaneInspection extends BaseFormInspection {
  public NoScrollPaneInspection() {
    super("NoScrollPane");
  }

  @NotNull
  @Override public String getDisplayName() {
    return UIDesignerBundle.message("inspection.no.scroll.pane");
  }

  @Override
  protected void checkComponentProperties(Module module, @NotNull IComponent component, FormErrorCollector collector) {
    if (FormInspectionUtil.isComponentClass(module, component, Scrollable.class) &&
        !FormInspectionUtil.isComponentClass(module, component, JTextField.class) &&
        !FormInspectionUtil.isComponentClass(module, component.getParentContainer(), JScrollPane.class)) {
      collector.addError(getID(), component, null, UIDesignerBundle.message("inspection.no.scroll.pane"),
                         (EditorQuickFixProvider)MyQuickFix::new);

    }
  }

  private static class MyQuickFix extends QuickFix {
    MyQuickFix(final GuiEditor editor, RadComponent component) {
      super(editor, UIDesignerBundle.message("inspection.no.scroll.pane.quickfix"), component);
    }

    @Override
    public void run() {
      String scrollPane = JScrollPane.class.getName();
      ComponentItem item = Palette.getInstance(myEditor.getProject()).getItem(scrollPane);

      SurroundAction action = new SurroundAction(item == null ? JBScrollPane.class.getName() : scrollPane);

      ArrayList<RadComponent> targetList = new ArrayList<>(Collections.singletonList(myComponent));
      action.actionPerformed(myEditor, targetList, null);
    }
  }
}


text:
package org.zaproxy.zap.extension.customreport;

import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.JTabbedPane;
import org.parosproxy.paros.Constant;
import org.parosproxy.paros.view.AbstractFrame;

public class OptionDialog extends AbstractFrame {

    private static final long serialVersionUID = 1L;
    private ExtensionCustomReport extension = null;

    public OptionDialog(
            ExtensionCustomReport extension,
            ScopePanel scopepanel,
            AlertsPanel alertspanel,
            AlertDetailsPanel alertdetailspanel) {
        this.extension = extension;
        JPanel optiondialog = new JPanel();
        optiondialog.setLayout(new BorderLayout());

        JTabbedPane mainpane = new JTabbedPane();
        mainpane.add(Constant.messages.getString("customreport.menu.scope"), scopepanel);
        mainpane.add(Constant.messages.getString("customreport.menu.alerts"), alertspanel);
        mainpane.add(
                Constant.messages.getString("customreport.menu.alertdetails"), alertdetailspanel);

        JPanel buttonpane = new JPanel(new FlowLayout(FlowLayout.RIGHT));
        buttonpane.add(getCancelButton());
        buttonpane.add(getHTMLButton());

        optiondialog.add(mainpane, BorderLayout.CENTER);
        optiondialog.add(buttonpane, BorderLayout.SOUTH);

        setDefaultCloseOperation(DISPOSE_ON_CLOSE);
        this.addWindowListener(
                new WindowAdapter() {

                    @Override
                    public void windowClosed(WindowEvent e) {
                        extension.dialogClosed();
                    }
                });
        this.setTitle(Constant.messages.getString("customreport.menu.title"));
        this.add(optiondialog);
        this.pack();
    }

    private JButton getCancelButton() {
        JButton cancelbutton = new JButton(Constant.messages.getString("customreport.cancel"));
        cancelbutton.addActionListener(e -> dispose());
        return cancelbutton;
    }

    private JButton getHTMLButton() {
        JButton generatebutton = new JButton(Constant.messages.getString("customreport.generate"));
        generatebutton.addActionListener(
                new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        extension.generateReport();
                        dispose();
                    }
                });
        return generatebutton;
    }
}

redpajama_set_name: RedPajamaGithub


text:
package org.onosproject.incubator.net.virtual.impl;

import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
import org.onosproject.cluster.ClusterService;
import org.onosproject.cluster.NodeId;
import org.onosproject.core.ApplicationId;
import org.onosproject.incubator.net.virtual.AbstractVnetService;
import org.onosproject.incubator.net.virtual.NetworkId;
import org.onosproject.incubator.net.virtual.VirtualNetworkPacketStore;
import org.onosproject.incubator.net.virtual.VirtualNetworkService;
import org.onosproject.incubator.net.virtual.provider.AbstractVirtualProviderService;
import org.onosproject.incubator.net.virtual.provider.VirtualPacketProvider;
import org.onosproject.incubator.net.virtual.provider.VirtualPacketProviderService;
import org.onosproject.incubator.net.virtual.provider.VirtualProviderRegistryService;
import org.onosproject.net.Device;
import org.onosproject.net.DeviceId;
import org.onosproject.net.device.DeviceService;
import org.onosproject.net.flow.DefaultTrafficTreatment;
import org.onosproject.net.flow.TrafficSelector;
import org.onosproject.net.flowobjective.DefaultForwardingObjective;
import org.onosproject.net.flowobjective.FlowObjectiveService;
import org.onosproject.net.flowobjective.ForwardingObjective;
import org.onosproject.net.flowobjective.Objective;
import org.onosproject.net.flowobjective.ObjectiveContext;
import org.onosproject.net.flowobjective.ObjectiveError;
import org.onosproject.net.packet.DefaultPacketRequest;
import org.onosproject.net.packet.OutboundPacket;
import org.onosproject.net.packet.PacketContext;
import org.onosproject.net.packet.PacketEvent;
import org.onosproject.net.packet.PacketPriority;
import org.onosproject.net.packet.PacketProcessor;
import org.onosproject.net.packet.PacketProcessorEntry;
import org.onosproject.net.packet.PacketRequest;
import org.onosproject.net.packet.PacketService;
import org.onosproject.net.packet.PacketStoreDelegate;
import org.onosproject.net.provider.ProviderId;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.List;
import java.util.Optional;
import java.util.Set;

public class VirtualNetworkPacketManager extends AbstractVnetService
        implements PacketService {

    private final Logger log = LoggerFactory.getLogger(getClass());

    private final VirtualNetworkService manager;

    protected VirtualNetworkPacketStore store;
    private final List<ProcessorEntry> processors = Lists.newCopyOnWriteArrayList();

    private NodeId localNodeId;

    private DeviceService deviceService;
    private FlowObjectiveService objectiveService;

    private VirtualProviderRegistryService providerRegistryService = null;

    private InternalPacketProviderService providerService = null;

    public VirtualNetworkPacketManager(VirtualNetworkService virtualNetworkManager,
                                       NetworkId networkId) {
        super(virtualNetworkManager, networkId);
        this.manager = virtualNetworkManager;

        //Set node id as same as the node hosting virtual manager
        ClusterService clusterService = serviceDirectory.get(ClusterService.class);
        this.localNodeId = clusterService.getLocalNode().id();

        this.store = serviceDirectory.get(VirtualNetworkPacketStore.class);
        this.store.setDelegate(networkId(), new InternalStoreDelegate());

        this.deviceService = manager.get(networkId(), DeviceService.class);
        this.objectiveService = manager.get(networkId(), FlowObjectiveService.class);

        providerRegistryService =
                serviceDirectory.get(VirtualProviderRegistryService.class);
        providerService = new InternalPacketProviderService();
        providerRegistryService.registerProviderService(networkId(), providerService);
    }

    @Override
    public void addProcessor(PacketProcessor processor, int priority) {
        ProcessorEntry entry = new ProcessorEntry(processor, priority);

        // Insert the new processor according to its priority.
        int i = 0;
        for (; i < processors.size(); i++) {
            if (priority < processors.get(i).priority()) {
                break;
            }
        }
        processors.add(i, entry);
    }

    @Override
    public void removeProcessor(PacketProcessor processor) {
        // Remove the processor entry.
        for (int i = 0; i < processors.size(); i++) {
            if (processors.get(i).processor() == processor) {
                processors.remove(i);
                break;
            }
        }
    }

    @Override
    public List<PacketProcessorEntry> getProcessors() {
        return ImmutableList.copyOf(processors);
    }

    @Override
    public void requestPackets(TrafficSelector selector, PacketPriority priority, ApplicationId appId) {
        PacketRequest request = new DefaultPacketRequest(selector, priority, appId,
                                                         localNodeId, Optional.empty());
        store.requestPackets(networkId(), request);
    }

    @Override
    public void requestPackets(TrafficSelector selector, PacketPriority priority,
                               ApplicationId appId, Optional<DeviceId> deviceId) {
        PacketRequest request =
                new DefaultPacketRequest(selector, priority, appId,
                                         localNodeId, deviceId);

        store.requestPackets(networkId(), request);
    }

    @Override
    public void cancelPackets(TrafficSelector selector, PacketPriority priority, ApplicationId appId) {
        PacketRequest request = new DefaultPacketRequest(selector, priority, appId,
                                                         localNodeId, Optional.empty());
        store.cancelPackets(networkId(), request);
    }

    @Override
    public void cancelPackets(TrafficSelector selector, PacketPriority priority,
                              ApplicationId appId, Optional<DeviceId> deviceId) {
        PacketRequest request = new DefaultPacketRequest(selector, priority,
                                                         appId, localNodeId,
                                                         deviceId);
        store.cancelPackets(networkId(), request);
    }

    @Override
    public List<PacketRequest> getRequests() {
        return store.existingRequests(networkId());
    }

    @Override
    public void emit(OutboundPacket packet) {
        store.emit(networkId(), packet);
    }

    /**
     * Personalized packet provider service issued to the supplied provider.
     */
    private class InternalPacketProviderService
            extends AbstractVirtualProviderService<VirtualPacketProvider>
            implements VirtualPacketProviderService {

        protected InternalPacketProviderService() {
            super();

            Set<ProviderId> providerIds =
                    providerRegistryService.getProvidersByService(this);
            ProviderId providerId = providerIds.stream().findFirst().get();
            VirtualPacketProvider provider = (VirtualPacketProvider)
                    providerRegistryService.getProvider(providerId);
            setProvider(provider);
        }

        @Override
        public void processPacket(PacketContext context) {
            // TODO filter packets sent to processors based on registrations
            for (ProcessorEntry entry : processors) {
                try {
                    long start = System.nanoTime();
                    entry.processor().process(context);
                    entry.addNanos(System.nanoTime() - start);
                } catch (Exception e) {
                    log.warn("Packet processor {} threw an exception", entry.processor(), e);
                }
            }
        }

    }

    /**
     * Entity for tracking stats for a packet processor.
     */
    private class ProcessorEntry implements PacketProcessorEntry {
        private final PacketProcessor processor;
        private final int priority;
        private long invocations = 0;
        private long nanos = 0;

        public ProcessorEntry(PacketProcessor processor, int priority) {
            this.processor = processor;
            this.priority = priority;
        }

        @Override
        public PacketProcessor processor() {
            return processor;
        }

        @Override
        public int priority() {
            return priority;
        }

        @Override
        public long invocations() {
            return invocations;
        }

        @Override
        public long totalNanos() {
            return nanos;
        }

        @Override
        public long averageNanos() {
            return invocations > 0 ? nanos / invocations : 0;
        }

        void addNanos(long nanos) {
            this.nanos += nanos;
            this.invocations++;
        }
    }

    private void localEmit(NetworkId networkId, OutboundPacket packet) {
        Device device = deviceService.getDevice(packet.sendThrough());
        if (device == null) {
            return;
        }
        VirtualPacketProvider packetProvider = providerService.provider();

        if (packetProvider != null) {
            packetProvider.emit(networkId, packet);
        }
    }

    /**
     * Internal callback from the packet store.
     */
    protected class InternalStoreDelegate implements PacketStoreDelegate {
        @Override
        public void notify(PacketEvent event) {
            localEmit(networkId(), event.subject());
        }

        @Override
        public void requestPackets(PacketRequest request) {
            DeviceId deviceid = request.deviceId().orElse(null);

            if (deviceid != null) {
                pushRule(deviceService.getDevice(deviceid), request);
            } else {
                pushToAllDevices(request);
            }

            providerService.provider().startPacketHandling(networkId);
        }

        @Override
        public void cancelPackets(PacketRequest request) {
            DeviceId deviceid = request.deviceId().orElse(null);

            if (deviceid != null) {
                removeRule(deviceService.getDevice(deviceid), request);
            } else {
                removeFromAllDevices(request);
            }

            providerService.provider().stopPacketHandling(networkId);
        }
    }

    /**
     * Pushes packet intercept flow rules to the device.
     *
     * @param device  the device to push the rules to
     * @param request the packet request
     */
    private void pushRule(Device device, PacketRequest request) {
        if (!device.type().equals(Device.Type.VIRTUAL)) {
            return;
        }

        ForwardingObjective forwarding = createBuilder(request)
                .add(new ObjectiveContext() {
                    @Override
                    public void onError(Objective objective, ObjectiveError error) {
                        log.warn("Failed to install packet request {} to {}: {}",
                                 request, device.id(), error);
                    }
                });

        objectiveService.forward(device.id(), forwarding);
    }

    /**
     * Removes packet intercept flow rules from the device.
     *
     * @param device  the device to remove the rules deom
     * @param request the packet request
     */
    private void removeRule(Device device, PacketRequest request) {
        if (!device.type().equals(Device.Type.VIRTUAL)) {
            return;
        }
        ForwardingObjective forwarding = createBuilder(request)
                .remove(new ObjectiveContext() {
                    @Override
                    public void onError(Objective objective, ObjectiveError error) {
                        log.warn("Failed to withdraw packet request {} from {}: {}",
                                 request, device.id(), error);
                    }
                });
        objectiveService.forward(device.id(), forwarding);
    }

    /**
     * Pushes a packet request flow rule to all devices.
     *
     * @param request the packet request
     */
    private void pushToAllDevices(PacketRequest request) {
        log.debug("Pushing packet request {} to all devices", request);
        for (Device device : deviceService.getDevices()) {
            pushRule(device, request);
        }
    }

    /**
     * Removes packet request flow rule from all devices.
     *
     * @param request the packet request
     */
    private void removeFromAllDevices(PacketRequest request) {
        deviceService.getAvailableDevices().forEach(d -> removeRule(d, request));
    }

    private DefaultForwardingObjective.Builder createBuilder(PacketRequest request) {
        return DefaultForwardingObjective.builder()
                .withPriority(request.priority().priorityValue())
                .withSelector(request.selector())
                .fromApp(request.appId())
                .withFlag(ForwardingObjective.Flag.VERSATILE)
                .withTreatment(DefaultTrafficTreatment.builder().punt().build())
                .makePermanent();
    }
}


text:
{# Our new DevHub landing page represents an entirely different and new design
   which is why this page doesn't inherit any of our base templates. #}
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    {% if not settings.ENGAGE_ROBOTS %}
      <meta name="robots" content="noindex">
    {% endif %}
    {% block extrameta %}{% endblock %}

    <title>{% block title %}{{ dev_page_title() }}{% endblock %}</title>

    <link rel="shortcut icon" type="image/x-icon"
          href="{{ static('img/favicon.ico') }}">

    {% block rss_feed %}{% endblock %}

    {# L10n: {0} is an application, like Firefox. #}
    <link title="{{ _('{0} Add-ons')|format_html(amo.FIREFOX.pretty) }}"
          rel="search" type="application/opensearchdescription+xml"
          href="{{ url('amo.opensearch') }}" />

    {% block site_css %}
      {{ css('devhub/new-landing/css') }}
    {% endblock %}

    {% block extrahead %}{% endblock %}

    {% if request.user.is_authenticated %}
      <meta name="csrf" content="{{ csrf_token }}">
    {% endif %}

    {% if settings.DEBUG %}
      {% if settings.LESS_LIVE_REFRESH %}
        <meta id="live_refresh" name="live_refresh" value="1">
      {% endif %}
      {{ js('debug') }}
    {% endif %}

    {{ js('preload') }}

  {% set user_authenticated = request.user.is_authenticated %}

    {% include 'devhub/new-landing/components/navigation.html' %}

    {% if not user_authenticated %}
      {% include 'devhub/new-landing/components/overview.html' %}
      {% include 'devhub/new-landing/components/submit_or_manage_extension.html' %}
      {% include 'devhub/new-landing/components/get_involved.html' %}
    {% else %}
      {% include 'devhub/new-landing/components/banner.html' %}
      {% include 'devhub/new-landing/components/my-addons.html' %}
      {% include 'devhub/new-landing/components/dev_footer.html' %}
    {% endif %}
    {% include 'devhub/new-landing/components/connect.html' %}
    {% include 'photon-footer.html' %}

    {% block site_js %}

      {{ js('devhub/new-landing/js') }}
    {% endblock %}


text:
<?php

// web/index.php
$filename = __DIR__.preg_replace('#(\?.*)$#', '', $_SERVER['REQUEST_URI']);
if (php_sapi_name() === 'cli-server' && is_file($filename)) {
    return false;
}

if(substr($_SERVER['REQUEST_URI'], 0, 4) === "/app" || substr($_SERVER['REQUEST_URI'], 0, 4) === "/devtest") {
	return false;
}

require_once __DIR__.'/vendor/autoload.php';
require_once __DIR__.'/internal/index.php';


text:
/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 4.0.2
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package com.frostwire.jlibtorrent.swig;

public class file_index_string_map {
  private transient long swigCPtr;
  protected transient boolean swigCMemOwn;

  protected file_index_string_map(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  protected static long getCPtr(file_index_string_map obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  @SuppressWarnings("deprecation")
  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        libtorrent_jni.delete_file_index_string_map(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public file_index_string_map() {
    this(libtorrent_jni.new_file_index_string_map__SWIG_0(), true);
  }

  public file_index_string_map(file_index_string_map arg0) {
    this(libtorrent_jni.new_file_index_string_map__SWIG_1(file_index_string_map.getCPtr(arg0), arg0), true);
  }

  public long size() {
    return libtorrent_jni.file_index_string_map_size(swigCPtr, this);
  }

  public boolean empty() {
    return libtorrent_jni.file_index_string_map_empty(swigCPtr, this);
  }

  public void clear() {
    libtorrent_jni.file_index_string_map_clear(swigCPtr, this);
  }

  public String get(int key) {
    return libtorrent_jni.file_index_string_map_get(swigCPtr, this, key);
  }

  public void set(int key, String x) {
    libtorrent_jni.file_index_string_map_set(swigCPtr, this, key, x);
  }

  public void erase(int key) {
    libtorrent_jni.file_index_string_map_erase(swigCPtr, this, key);
  }

  public boolean has_key(int key) {
    return libtorrent_jni.file_index_string_map_has_key(swigCPtr, this, key);
  }

  public file_index_vector keys() {
    return new file_index_vector(libtorrent_jni.file_index_string_map_keys(swigCPtr, this), true);
  }

}


text:
package org.jboss.as.quickstarts.wsba.coordinatorcompletion.simple;

import com.arjuna.mw.wst11.BusinessActivityManager;
import com.arjuna.mw.wst11.BusinessActivityManagerFactory;
import com.arjuna.wst.SystemException;
import org.jboss.as.quickstarts.wsba.coordinatorcompletion.simple.jaxws.SetServiceBA;
import javax.jws.HandlerChain;
import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.servlet.annotation.WebServlet;
import java.util.UUID;

/**
 * An adapter class that exposes a set as a transactional Web Service.
 *
 * @author Paul Robinson (paul.robinson@redhat.com)
 */
@WebService(serviceName = "SetServiceBAService", portName = "SetServiceBA", name = "SetServiceBA",
    targetNamespace = "http://www.jboss.org/jboss-jdf/jboss-as-quickstart/helloworld/wsba/coordinatorcompletion/set")
@HandlerChain(file = "/context-handlers.xml", name = "Context Handlers")
@SOAPBinding(style = SOAPBinding.Style.RPC)
@WebServlet("/SetServiceBA")
public class SetServiceBAImpl implements SetServiceBA {
    /**
     * Add an item to a set and enroll a Participant if necessary then pass the call through to the business logic.
     *
     * @param value the value to add to the set.
     * @throws AlreadyInSetException if value is already in the set
     * @throws SetServiceException if an error occurred when attempting to add the item to the set.
     */
    @WebMethod
    public void addValueToSet(String value) throws AlreadyInSetException, SetServiceException {

        System.out.println("[SERVICE] invoked addValueToSet('" + value + "')");

        BusinessActivityManager activityManager = BusinessActivityManagerFactory.businessActivityManager();

        /*
         * get the transaction context of this thread:
         */
        String transactionId;
        try {
            transactionId = activityManager.currentTransaction().toString();
        } catch (SystemException e) {
            throw new SetServiceException("Unable to lookup existing BusinesActivity", e);
        }

        /*
         * Lookup existing participant or register new participant
         */
        SetParticipantBA participantBA = SetParticipantBA.getParticipant(transactionId);

        if (participantBA == null) {
            try {
                // enlist the Participant for this service:
                SetParticipantBA participant = new SetParticipantBA(transactionId, value);
                SetParticipantBA.recordParticipant(transactionId, participant);

                System.out.println("[SERVICE] Enlisting a participant into the BA");
                activityManager.enlistForBusinessAgreementWithCoordinatorCompletion(participant, "SetServiceBAImpl:"
                    + UUID.randomUUID());
            } catch (Exception e) {
                System.err.println("Participant enlistment failed");
                throw new SetServiceException("Error enlisting participant", e);
            }
        } else {
            System.out.println("[SERVICE] Re-using the existing participant, already registered for this BA");
            participantBA.addValue(value);
        }

        // invoke the back-end business logic
        System.out.println("[SERVICE] Invoking the back-end business logic");
        MockSetManager.add(value);
    }

    /**
     * Query the set to see if it contains a particular value.
     *
     * @param value the value to check for.
     * @return true if the value was present, false otherwise.
     */
    @WebMethod
    public boolean isInSet(String value) {
        return MockSetManager.isInSet(value);
    }

    /**
     * Empty the set
     * <p/>
     * Note: To simplify this example, this method is not part of the compensation logic, so will not be undone if the BA is
     * compensated. It can also be invoked outside of an active BA.
     */
    @WebMethod
    public void clear() {
        MockSetManager.clear();
    }
}


text: Pour lancer le jeux, mettez vous dans le répertoire de ce dernier et tapez "grunt"


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">
  <meta name="description" content="The notebook by hackers, for hackers.">
  <meta name="author" content="KarmaHostage">
  <meta name="keywords" content="ethical, hacking">
  <link rel="canonical" href="/ethicalhackernotebook/learn/">
  <title>Ethical Hacker's Notebook | Learn</title>

  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">

  <link href="/ethicalhackernotebook/css/grayscale.css" rel="stylesheet">

  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
  <link href="//fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic" rel="stylesheet" type="text/css">
  <link href="//fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
  <link rel="stylesheet" href="/ethicalhackernotebook/css/rrssb.css" />

    <link rel="shortcut icon" type="image/x-icon" href="/ethicalhackernotebook/img/favicon.ico">

  <meta name="apple-mobile-web-app-capable" content="yes">
  <link rel="apple-touch-icon" sizes="36x36" href="/ethicalhackernotebook/img/web-app/icon-36p.png">
  <link rel="apple-touch-icon" sizes="48x48" href="/ethicalhackernotebook/img/web-app/icon-48p.png">
  <link rel="apple-touch-icon" sizes="72x72" href="/ethicalhackernotebook/img/web-app/icon-72p.png">
  <link rel="apple-touch-icon" sizes="96x96" href="/ethicalhackernotebook/img/web-app/icon-96p.png">
  <link rel="apple-touch-icon" sizes="144x144" href="/ethicalhackernotebook/img/web-app/icon-144p.png">
  <link rel="apple-touch-icon" sizes="192x192" href="/ethicalhackernotebook/img/web-app/icon-192p.png">

  <link rel="manifest" href="/ethicalhackernotebook/manifest.json">

<meta name="theme-color" content="">

<meta name="msapplication-navbutton-color" content="">

<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="">

      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-main-collapse">

      </button>

            Ethical Hacker's Notebook

               Learn

               Subjects

Ethical Hacker's Notebook

an initiative written by hackers, for hackers

Introduction

TODO

Being Ethical

Different Phases during testing

How to contribute

As you've read, this repository and the resulting website is entirely crowdsourced. This means that everyone can create a fork of this repository and add sections or add information. After creating a pull request, we'll validate your changes and deploy them to our website.

Should you just have a question or suggestion, you can create a ticket and we'll be happy to respond and collaborate in order to keep this a good place for people to learn about cyber security.

Copyright © KarmaHostage 2016


text:
package org.codemucker.testfirst;

public class WhenStep extends ThenStep {

	public WhenStep(Scenario scenario, Object... objs) {
		super(scenario,objs);
	}

	@Override
	String getShortName() {
		return "when";
	}
}


text:
package org.etaoin.webrtcdemo.media.callback;

/**
 * @author Sergio Gutiérrez
 */
public interface IceCandidateCallback {

	public void onNewIceCandidate(String candidate);

}


text:
BVLC='http://dl.caffe.berkeleyvision.org/bvlc_googlenet.caffemodel'
PLACES205='https://s3-us-west-2.amazonaws.com/crowsonkb-deep-dream/googlelet_places205_train_iter_2400000.caffemodel'
PLACES365='http://places2.csail.mit.edu/models_places365/googlenet_places365.caffemodel'
RESNET50='http://www.deepdetect.com/models/resnet/ResNet-50-model.caffemodel'

( cd bvlc_googlenet && curl -O "$BVLC" )
( cd googlenet_places205 && curl -O "$PLACES205" )
( cd googlenet_places365 && curl -O "$PLACES365" )
( cd resnet && curl -O "$RESNET50" )


text:
#ifndef __itkArray_h
#define __itkArray_h

#include "itkMacro.h"

#include "vxl_version.h"
#if VXL_VERSION_DATE_FULL < 20110428
#error "System installed VXL version is too old. Please make sure the version date is later than 2011-04-28."
#endif

#include "vnl/vnl_vector.h"

namespace itk
{
/** \class Array
 *  \brief Array class with size defined at construction time.
 *
 * This class derives from the vnl_vector<> class.
 * Its size is assigned at construction time (run time) and can
 * not be changed afterwards except by using assignment to another
 * Array.
 *
 * The class is templated over the type of the elements.
 *
 * Template parameters for class Array:
 *
 * - TValueType = Element type stored at each location in the array.
 *
 * \ingroup DataRepresentation
 * \ingroup ITKCommon
 */
template< typename TValueType >
class Array : public vnl_vector< TValueType >
{
public:

  /** The element type stored at each location in the Array. */
  typedef TValueType                                  ValueType;
  typedef Array                                       Self;
  typedef vnl_vector< TValueType >                    VnlVectorType;
  typedef typename vnl_vector< TValueType>::size_type SizeValueType;

public:

  /** Default constructor. It is created with an empty array
   *  it has to be allocated later by assignment              */
  Array();

  /** Copy constructor.  Uses VNL copy construtor with correct
   *  setting for memory management.                          */
  Array(const Array&);

  /** Constructor with size. Size can only be changed by assignment */
  explicit Array(SizeValueType dimension);

  /** Constructor that initializes array with contents from a user supplied
   * buffer. The pointer to the buffer and the length is specified. By default,
   * the array does not manage the memory of the buffer. It merely points to
   * that location and it is the user's responsibility to delete it.
   * If "LetArrayManageMemory" is true, then this class will free the
   * memory when this object is destroyed. */
  Array(ValueType *data, SizeValueType sz, bool LetArrayManageMemory = false);

  /** Constructor that initializes array with contents from a user supplied
   * buffer. The pointer to the buffer and the length is specified. By default,
   * the array does not manage the memory of the buffer. It merely points to
   * that location and it is the user's responsibility to delete it.
   * If "LetArrayManageMemory" is true, then this class will free the
   * memory when this object is destroyed. */
  Array(const ValueType *data, SizeValueType sz,
        bool LetArrayManageMemory = false);

  /** Constructor to initialize an array from another of any data type */
  template< class TArrayValue >
  Array(const Array< TArrayValue > & r)
  {
    this->m_LetArrayManageMemory = true;
    this->SetSize( r.GetSize() );
    for( SizeValueType i=0; i<r.GetSize(); i++ )
      {
      this->operator[](i) = static_cast< TValueType >( r[i] );
      }
  }

  /** Set the all the elements of the array to the specified value */
  void Fill(TValueType const & v)
    {
    this->fill(v);
    }

  /** Copy opertor */
  const Self & operator=(const Self & rhs);

  const Self & operator=(const VnlVectorType & rhs);

  /** Return the number of elements in the Array  */
  SizeValueType Size(void) const
  { return static_cast<SizeValueType >( this->size() ); }
  unsigned int GetNumberOfElements(void) const
  { return static_cast<SizeValueType >( this->size() ); }

  /** Get one element */
  const TValueType & GetElement(SizeValueType i) const
  { return this->operator[](i); }

  /** Set one element */
  void SetElement(SizeValueType i, const TValueType & value)
  { this->operator[](i) = value; }

  /** Destructively set the size to that given.  Will lose data.  */
  void SetSize(SizeValueType sz);

  SizeValueType GetSize(void) const
  { return static_cast< SizeValueType >( this->size() ); }

  /** Set the pointer from which the data is imported.
   * If "LetArrayManageMemory" is false, then the application retains
   * the responsibility of freeing the memory for this data.  If
   * "LetArrayManageMemory" is true, then this class will free the
   * memory when this object is destroyed. */
  void SetData(TValueType *data, bool LetArrayManageMemory = false);

  /** Similar to the previous method. In the above method, the size must be
   * separately set prior to using user-supplied data. This introduces an
   * unnecessary allocation step to be performed. This method avoids it
   * and should be used to import data wherever possible to avoid this.
   * Set the pointer from which the data is imported.
   * If "LetArrayManageMemory" is false, then the application retains
   * the responsibility of freeing the memory for this data.  If
   * "LetArrayManageMemory" is true, then this class will free the
   * memory when this object is destroyed. */
  void SetData(TValueType *data, SizeValueType sz,
               bool LetArrayManageMemory = false);

#ifdef __INTEL_COMPILER
#pragma warning disable 444 //destructor for base class "itk::Array<>" is not virtual
#endif
  /** This destructor is not virtual for performance reasons. However, this
   * means that subclasses cannot allocate memory. */
  ~Array();

private:

  bool m_LetArrayManageMemory;
};

template< typename TValueType >
std::ostream & operator<<(std::ostream & os, const Array< TValueType > & arr)
{
  os << "[";
  const unsigned int length = arr.size();
  if ( length >= 1 )
    {
    const unsigned int   last   = length - 1;
    for ( unsigned int i = 0; i < last; ++i )
      {
      os << arr[i] << ", ";
      }
      os << arr[last];
    }
  os << "]";
  return os;
}
} // namespace itk

#ifndef ITK_MANUAL_INSTANTIATION
#include "itkArray.hxx"
#endif

#endif


text:
package com.vaadin.v7.data.validator;

/**
 * Validator for validating that an {@link Short} is inside a given range.
 *
 * @author Vaadin Ltd.
 * @since 7.4
 */
@SuppressWarnings("serial")
@Deprecated
public class ShortRangeValidator extends RangeValidator<Short> {

    /**
     * Creates a validator for checking that an Short is within a given range.
     *
     * By default the range is inclusive i.e. both minValue and maxValue are
     * valid values. Use {@link #setMinValueIncluded(boolean)} or
     * {@link #setMaxValueIncluded(boolean)} to change it.
     *
     *
     * @param errorMessage
     *            the message to display in case the value does not validate.
     * @param minValue
     *            The minimum value to accept or null for no limit
     * @param maxValue
     *            The maximum value to accept or null for no limit
     */
    public ShortRangeValidator(String errorMessage, Short minValue,
            Short maxValue) {
        super(errorMessage, Short.class, minValue, maxValue);
    }

}


text:
/* eslint-disable */
import { Coin } from '../../../cosmos/base/v1beta1/coin'
import { Writer, Reader } from 'protobufjs/minimal'

export const protobufPackage = 'cosmos.bank.v1beta1'

/** Params defines the parameters for the bank module. */
export interface Params {
  sendEnabled: SendEnabled[]
  defaultSendEnabled: boolean
}

/**
 * SendEnabled maps coin denom to a send_enabled status (whether a denom is
 * sendable).
 */
export interface SendEnabled {
  denom: string
  enabled: boolean
}

/** Input models transaction input. */
export interface Input {
  address: string
  coins: Coin[]
}

/** Output models transaction outputs. */
export interface Output {
  address: string
  coins: Coin[]
}

/**
 * Supply represents a struct that passively keeps track of the total supply
 * amounts in the network.
 * This message is deprecated now that supply is indexed by denom.
 *
 * @deprecated
 */
export interface Supply {
  total: Coin[]
}

/**
 * DenomUnit represents a struct that describes a given
 * denomination unit of the basic token.
 */
export interface DenomUnit {
  /** denom represents the string name of the given denom unit (e.g uatom). */
  denom: string
  /**
   * exponent represents power of 10 exponent that one must
   * raise the base_denom to in order to equal the given DenomUnit's denom
   * 1 denom = 1^exponent base_denom
   * (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with
   * exponent = 6, thus: 1 atom = 10^6 uatom).
   */
  exponent: number
  /** aliases is a list of string aliases for the given denom */
  aliases: string[]
}

/**
 * Metadata represents a struct that describes
 * a basic token.
 */
export interface Metadata {
  description: string
  /** denom_units represents the list of DenomUnit's for a given coin */
  denomUnits: DenomUnit[]
  /** base represents the base denom (should be the DenomUnit with exponent = 0). */
  base: string
  /**
   * display indicates the suggested denom that should be
   * displayed in clients.
   */
  display: string
  /** name defines the name of the token (eg: Cosmos Atom) */
  name: string
  /**
   * symbol is the token symbol usually shown on exchanges (eg: ATOM). This can
   * be the same as the display.
   */
  symbol: string
}

const baseParams: object = { defaultSendEnabled: false }

export const Params = {
  encode(message: Params, writer: Writer = Writer.create()): Writer {
    for (const v of message.sendEnabled) {
      SendEnabled.encode(v!, writer.uint32(10).fork()).ldelim()
    }
    if (message.defaultSendEnabled === true) {
      writer.uint32(16).bool(message.defaultSendEnabled)
    }
    return writer
  },

  decode(input: Reader | Uint8Array, length?: number): Params {
    const reader = input instanceof Uint8Array ? new Reader(input) : input
    let end = length === undefined ? reader.len : reader.pos + length
    const message = { ...baseParams } as Params
    message.sendEnabled = []
    while (reader.pos < end) {
      const tag = reader.uint32()
      switch (tag >>> 3) {
        case 1:
          message.sendEnabled.push(SendEnabled.decode(reader, reader.uint32()))
          break
        case 2:
          message.defaultSendEnabled = reader.bool()
          break
        default:
          reader.skipType(tag & 7)
          break
      }
    }
    return message
  },

  fromJSON(object: any): Params {
    const message = { ...baseParams } as Params
    message.sendEnabled = []
    if (object.sendEnabled !== undefined && object.sendEnabled !== null) {
      for (const e of object.sendEnabled) {
        message.sendEnabled.push(SendEnabled.fromJSON(e))
      }
    }
    if (object.defaultSendEnabled !== undefined && object.defaultSendEnabled !== null) {
      message.defaultSendEnabled = Boolean(object.defaultSendEnabled)
    } else {
      message.defaultSendEnabled = false
    }
    return message
  },

  toJSON(message: Params): unknown {
    const obj: any = {}
    if (message.sendEnabled) {
      obj.sendEnabled = message.sendEnabled.map((e) => (e ? SendEnabled.toJSON(e) : undefined))
    } else {
      obj.sendEnabled = []
    }
    message.defaultSendEnabled !== undefined && (obj.defaultSendEnabled = message.defaultSendEnabled)
    return obj
  },

  fromPartial(object: DeepPartial<Params>): Params {
    const message = { ...baseParams } as Params
    message.sendEnabled = []
    if (object.sendEnabled !== undefined && object.sendEnabled !== null) {
      for (const e of object.sendEnabled) {
        message.sendEnabled.push(SendEnabled.fromPartial(e))
      }
    }
    if (object.defaultSendEnabled !== undefined && object.defaultSendEnabled !== null) {
      message.defaultSendEnabled = object.defaultSendEnabled
    } else {
      message.defaultSendEnabled = false
    }
    return message
  }
}

const baseSendEnabled: object = { denom: '', enabled: false }

export const SendEnabled = {
  encode(message: SendEnabled, writer: Writer = Writer.create()): Writer {
    if (message.denom !== '') {
      writer.uint32(10).string(message.denom)
    }
    if (message.enabled === true) {
      writer.uint32(16).bool(message.enabled)
    }
    return writer
  },

  decode(input: Reader | Uint8Array, length?: number): SendEnabled {
    const reader = input instanceof Uint8Array ? new Reader(input) : input
    let end = length === undefined ? reader.len : reader.pos + length
    const message = { ...baseSendEnabled } as SendEnabled
    while (reader.pos < end) {
      const tag = reader.uint32()
      switch (tag >>> 3) {
        case 1:
          message.denom = reader.string()
          break
        case 2:
          message.enabled = reader.bool()
          break
        default:
          reader.skipType(tag & 7)
          break
      }
    }
    return message
  },

  fromJSON(object: any): SendEnabled {
    const message = { ...baseSendEnabled } as SendEnabled
    if (object.denom !== undefined && object.denom !== null) {
      message.denom = String(object.denom)
    } else {
      message.denom = ''
    }
    if (object.enabled !== undefined && object.enabled !== null) {
      message.enabled = Boolean(object.enabled)
    } else {
      message.enabled = false
    }
    return message
  },

  toJSON(message: SendEnabled): unknown {
    const obj: any = {}
    message.denom !== undefined && (obj.denom = message.denom)
    message.enabled !== undefined && (obj.enabled = message.enabled)
    return obj
  },

  fromPartial(object: DeepPartial<SendEnabled>): SendEnabled {
    const message = { ...baseSendEnabled } as SendEnabled
    if (object.denom !== undefined && object.denom !== null) {
      message.denom = object.denom
    } else {
      message.denom = ''
    }
    if (object.enabled !== undefined && object.enabled !== null) {
      message.enabled = object.enabled
    } else {
      message.enabled = false
    }
    return message
  }
}

const baseInput: object = { address: '' }

export const Input = {
  encode(message: Input, writer: Writer = Writer.create()): Writer {
    if (message.address !== '') {
      writer.uint32(10).string(message.address)
    }
    for (const v of message.coins) {
      Coin.encode(v!, writer.uint32(18).fork()).ldelim()
    }
    return writer
  },

  decode(input: Reader | Uint8Array, length?: number): Input {
    const reader = input instanceof Uint8Array ? new Reader(input) : input
    let end = length === undefined ? reader.len : reader.pos + length
    const message = { ...baseInput } as Input
    message.coins = []
    while (reader.pos < end) {
      const tag = reader.uint32()
      switch (tag >>> 3) {
        case 1:
          message.address = reader.string()
          break
        case 2:
          message.coins.push(Coin.decode(reader, reader.uint32()))
          break
        default:
          reader.skipType(tag & 7)
          break
      }
    }
    return message
  },

  fromJSON(object: any): Input {
    const message = { ...baseInput } as Input
    message.coins = []
    if (object.address !== undefined && object.address !== null) {
      message.address = String(object.address)
    } else {
      message.address = ''
    }
    if (object.coins !== undefined && object.coins !== null) {
      for (const e of object.coins) {
        message.coins.push(Coin.fromJSON(e))
      }
    }
    return message
  },

  toJSON(message: Input): unknown {
    const obj: any = {}
    message.address !== undefined && (obj.address = message.address)
    if (message.coins) {
      obj.coins = message.coins.map((e) => (e ? Coin.toJSON(e) : undefined))
    } else {
      obj.coins = []
    }
    return obj
  },

  fromPartial(object: DeepPartial<Input>): Input {
    const message = { ...baseInput } as Input
    message.coins = []
    if (object.address !== undefined && object.address !== null) {
      message.address = object.address
    } else {
      message.address = ''
    }
    if (object.coins !== undefined && object.coins !== null) {
      for (const e of object.coins) {
        message.coins.push(Coin.fromPartial(e))
      }
    }
    return message
  }
}

const baseOutput: object = { address: '' }

export const Output = {
  encode(message: Output, writer: Writer = Writer.create()): Writer {
    if (message.address !== '') {
      writer.uint32(10).string(message.address)
    }
    for (const v of message.coins) {
      Coin.encode(v!, writer.uint32(18).fork()).ldelim()
    }
    return writer
  },

  decode(input: Reader | Uint8Array, length?: number): Output {
    const reader = input instanceof Uint8Array ? new Reader(input) : input
    let end = length === undefined ? reader.len : reader.pos + length
    const message = { ...baseOutput } as Output
    message.coins = []
    while (reader.pos < end) {
      const tag = reader.uint32()
      switch (tag >>> 3) {
        case 1:
          message.address = reader.string()
          break
        case 2:
          message.coins.push(Coin.decode(reader, reader.uint32()))
          break
        default:
          reader.skipType(tag & 7)
          break
      }
    }
    return message
  },

  fromJSON(object: any): Output {
    const message = { ...baseOutput } as Output
    message.coins = []
    if (object.address !== undefined && object.address !== null) {
      message.address = String(object.address)
    } else {
      message.address = ''
    }
    if (object.coins !== undefined && object.coins !== null) {
      for (const e of object.coins) {
        message.coins.push(Coin.fromJSON(e))
      }
    }
    return message
  },

  toJSON(message: Output): unknown {
    const obj: any = {}
    message.address !== undefined && (obj.address = message.address)
    if (message.coins) {
      obj.coins = message.coins.map((e) => (e ? Coin.toJSON(e) : undefined))
    } else {
      obj.coins = []
    }
    return obj
  },

  fromPartial(object: DeepPartial<Output>): Output {
    const message = { ...baseOutput } as Output
    message.coins = []
    if (object.address !== undefined && object.address !== null) {
      message.address = object.address
    } else {
      message.address = ''
    }
    if (object.coins !== undefined && object.coins !== null) {
      for (const e of object.coins) {
        message.coins.push(Coin.fromPartial(e))
      }
    }
    return message
  }
}

const baseSupply: object = {}

export const Supply = {
  encode(message: Supply, writer: Writer = Writer.create()): Writer {
    for (const v of message.total) {
      Coin.encode(v!, writer.uint32(10).fork()).ldelim()
    }
    return writer
  },

  decode(input: Reader | Uint8Array, length?: number): Supply {
    const reader = input instanceof Uint8Array ? new Reader(input) : input
    let end = length === undefined ? reader.len : reader.pos + length
    const message = { ...baseSupply } as Supply
    message.total = []
    while (reader.pos < end) {
      const tag = reader.uint32()
      switch (tag >>> 3) {
        case 1:
          message.total.push(Coin.decode(reader, reader.uint32()))
          break
        default:
          reader.skipType(tag & 7)
          break
      }
    }
    return message
  },

  fromJSON(object: any): Supply {
    const message = { ...baseSupply } as Supply
    message.total = []
    if (object.total !== undefined && object.total !== null) {
      for (const e of object.total) {
        message.total.push(Coin.fromJSON(e))
      }
    }
    return message
  },

  toJSON(message: Supply): unknown {
    const obj: any = {}
    if (message.total) {
      obj.total = message.total.map((e) => (e ? Coin.toJSON(e) : undefined))
    } else {
      obj.total = []
    }
    return obj
  },

  fromPartial(object: DeepPartial<Supply>): Supply {
    const message = { ...baseSupply } as Supply
    message.total = []
    if (object.total !== undefined && object.total !== null) {
      for (const e of object.total) {
        message.total.push(Coin.fromPartial(e))
      }
    }
    return message
  }
}

const baseDenomUnit: object = { denom: '', exponent: 0, aliases: '' }

export const DenomUnit = {
  encode(message: DenomUnit, writer: Writer = Writer.create()): Writer {
    if (message.denom !== '') {
      writer.uint32(10).string(message.denom)
    }
    if (message.exponent !== 0) {
      writer.uint32(16).uint32(message.exponent)
    }
    for (const v of message.aliases) {
      writer.uint32(26).string(v!)
    }
    return writer
  },

  decode(input: Reader | Uint8Array, length?: number): DenomUnit {
    const reader = input instanceof Uint8Array ? new Reader(input) : input
    let end = length === undefined ? reader.len : reader.pos + length
    const message = { ...baseDenomUnit } as DenomUnit
    message.aliases = []
    while (reader.pos < end) {
      const tag = reader.uint32()
      switch (tag >>> 3) {
        case 1:
          message.denom = reader.string()
          break
        case 2:
          message.exponent = reader.uint32()
          break
        case 3:
          message.aliases.push(reader.string())
          break
        default:
          reader.skipType(tag & 7)
          break
      }
    }
    return message
  },

  fromJSON(object: any): DenomUnit {
    const message = { ...baseDenomUnit } as DenomUnit
    message.aliases = []
    if (object.denom !== undefined && object.denom !== null) {
      message.denom = String(object.denom)
    } else {
      message.denom = ''
    }
    if (object.exponent !== undefined && object.exponent !== null) {
      message.exponent = Number(object.exponent)
    } else {
      message.exponent = 0
    }
    if (object.aliases !== undefined && object.aliases !== null) {
      for (const e of object.aliases) {
        message.aliases.push(String(e))
      }
    }
    return message
  },

  toJSON(message: DenomUnit): unknown {
    const obj: any = {}
    message.denom !== undefined && (obj.denom = message.denom)
    message.exponent !== undefined && (obj.exponent = message.exponent)
    if (message.aliases) {
      obj.aliases = message.aliases.map((e) => e)
    } else {
      obj.aliases = []
    }
    return obj
  },

  fromPartial(object: DeepPartial<DenomUnit>): DenomUnit {
    const message = { ...baseDenomUnit } as DenomUnit
    message.aliases = []
    if (object.denom !== undefined && object.denom !== null) {
      message.denom = object.denom
    } else {
      message.denom = ''
    }
    if (object.exponent !== undefined && object.exponent !== null) {
      message.exponent = object.exponent
    } else {
      message.exponent = 0
    }
    if (object.aliases !== undefined && object.aliases !== null) {
      for (const e of object.aliases) {
        message.aliases.push(e)
      }
    }
    return message
  }
}

const baseMetadata: object = { description: '', base: '', display: '', name: '', symbol: '' }

export const Metadata = {
  encode(message: Metadata, writer: Writer = Writer.create()): Writer {
    if (message.description !== '') {
      writer.uint32(10).string(message.description)
    }
    for (const v of message.denomUnits) {
      DenomUnit.encode(v!, writer.uint32(18).fork()).ldelim()
    }
    if (message.base !== '') {
      writer.uint32(26).string(message.base)
    }
    if (message.display !== '') {
      writer.uint32(34).string(message.display)
    }
    if (message.name !== '') {
      writer.uint32(42).string(message.name)
    }
    if (message.symbol !== '') {
      writer.uint32(50).string(message.symbol)
    }
    return writer
  },

  decode(input: Reader | Uint8Array, length?: number): Metadata {
    const reader = input instanceof Uint8Array ? new Reader(input) : input
    let end = length === undefined ? reader.len : reader.pos + length
    const message = { ...baseMetadata } as Metadata
    message.denomUnits = []
    while (reader.pos < end) {
      const tag = reader.uint32()
      switch (tag >>> 3) {
        case 1:
          message.description = reader.string()
          break
        case 2:
          message.denomUnits.push(DenomUnit.decode(reader, reader.uint32()))
          break
        case 3:
          message.base = reader.string()
          break
        case 4:
          message.display = reader.string()
          break
        case 5:
          message.name = reader.string()
          break
        case 6:
          message.symbol = reader.string()
          break
        default:
          reader.skipType(tag & 7)
          break
      }
    }
    return message
  },

  fromJSON(object: any): Metadata {
    const message = { ...baseMetadata } as Metadata
    message.denomUnits = []
    if (object.description !== undefined && object.description !== null) {
      message.description = String(object.description)
    } else {
      message.description = ''
    }
    if (object.denomUnits !== undefined && object.denomUnits !== null) {
      for (const e of object.denomUnits) {
        message.denomUnits.push(DenomUnit.fromJSON(e))
      }
    }
    if (object.base !== undefined && object.base !== null) {
      message.base = String(object.base)
    } else {
      message.base = ''
    }
    if (object.display !== undefined && object.display !== null) {
      message.display = String(object.display)
    } else {
      message.display = ''
    }
    if (object.name !== undefined && object.name !== null) {
      message.name = String(object.name)
    } else {
      message.name = ''
    }
    if (object.symbol !== undefined && object.symbol !== null) {
      message.symbol = String(object.symbol)
    } else {
      message.symbol = ''
    }
    return message
  },

  toJSON(message: Metadata): unknown {
    const obj: any = {}
    message.description !== undefined && (obj.description = message.description)
    if (message.denomUnits) {
      obj.denomUnits = message.denomUnits.map((e) => (e ? DenomUnit.toJSON(e) : undefined))
    } else {
      obj.denomUnits = []
    }
    message.base !== undefined && (obj.base = message.base)
    message.display !== undefined && (obj.display = message.display)
    message.name !== undefined && (obj.name = message.name)
    message.symbol !== undefined && (obj.symbol = message.symbol)
    return obj
  },

  fromPartial(object: DeepPartial<Metadata>): Metadata {
    const message = { ...baseMetadata } as Metadata
    message.denomUnits = []
    if (object.description !== undefined && object.description !== null) {
      message.description = object.description
    } else {
      message.description = ''
    }
    if (object.denomUnits !== undefined && object.denomUnits !== null) {
      for (const e of object.denomUnits) {
        message.denomUnits.push(DenomUnit.fromPartial(e))
      }
    }
    if (object.base !== undefined && object.base !== null) {
      message.base = object.base
    } else {
      message.base = ''
    }
    if (object.display !== undefined && object.display !== null) {
      message.display = object.display
    } else {
      message.display = ''
    }
    if (object.name !== undefined && object.name !== null) {
      message.name = object.name
    } else {
      message.name = ''
    }
    if (object.symbol !== undefined && object.symbol !== null) {
      message.symbol = object.symbol
    } else {
      message.symbol = ''
    }
    return message
  }
}

type Builtin = Date | Function | Uint8Array | string | number | undefined
export type DeepPartial<T> = T extends Builtin
  ? T
  : T extends Array<infer U>
  ? Array<DeepPartial<U>>
  : T extends ReadonlyArray<infer U>
  ? ReadonlyArray<DeepPartial<U>>
  : T extends {}
  ? { [K in keyof T]?: DeepPartial<T[K]> }
  : Partial<T>


text:
from .get_handler import get_handler_class, get_handler  # noqa
from .handler_shortcuts import i18n_reverse, transform_url_to_languagecode  # noqa
from .i18n_urlpatterns import i18n_patterns, I18nLocalePrefixPattern  # noqa


text:
TIFF Compression
================

Rationale
---------

One goal when serving the landsat8 data from S3 is to avoid users having to
download a compress tar file with all the bands, and extract just what they
want from that.  In fact, I'd like the dataset to be directly exploitable
in a variety of ways:

 - scripts that fetch by http as part of an ingestion flow.
 - mounting the whole bucket as a file system on EC2 instances
 - accessing an individual file directly by GDAL's chunk oriented /vsicurl/
 - browsing the bucket as a http web tree (like a file system on a web server)

I'd still like to make use of compression to reduce storage volumes, and
transport volumes.

One approach is just to compress each of the individual files with something
like GZIP, BZIP2, etc.  That could be built into the name, and the client is
just responsible for uncompressing it.  With appropriate mimetypes browsers
would actually understand this nature and could do it transparently.

Another approach would be to use compression within the TIFF files themselves.
This means the files *are* compressed on cloud storage, and during delivery,
but even naive clients (curl, etc) would get a resulting file, and decompression
only needs to be done when a client image viewer, processor accesses the pixels.

Compression Comparison
----------------------
Here we try to explore some of the tradeoffs in compression.

Size  | Description   | Options
----- | -----------   | -------
140M  | original      | LC82301202013305LGN00_B1.TIF
57M   | external gzip | gzip -9
37M   | external bzip2 |
57M   | internal deflate | -co COMPRESS=DEFLATE
49M   | + horizontal differencing | -co COMPRESS=DEFLATE -co PREDICTOR=2
45M   | deflate+pred+tiled | -co COMPRESS=DEFLATE -co PREDICTOR=2 -co TILED=YES
47M   | deflate+pred+8line strips | -co COMPRESS=DEFLATE -co PREDICTOR=2 -co BLOCKYSIZE=8

The Landsat files are map projected which means substantial areas of all-zero nodata which compresses
really well with any compression technique.  Beyond that I was surprized how much better bzip2 is than
gzip -9.  I believe the DEFLATE compression in TIFF is roughly the same as gzip.  It would be nice to
have bzip2 equivelent in TIFF, but even if we supported it most clients would not.

The landsat data is 16bit which means things are not that coherent byte to byte.  Introducing
PREDICTOR=2 (horizontal differencing of pixels values) gives a substantial benefit (57M to 49M),
and is well worth while.  Essentially all TIFF clients should support this.

By default the TIFF files are produced with one scanline strips, so in this case about 16K of data.
Moving to a 256x256 tiled organization means we have bigger blocks and more data for the compressor
to optimize over.  I also tried a strip size of 8 lines which is roughly the same amount of data as
tiled blocks.  I'm not sure why it gave substantially less benefit than the tiling.

Using either bigger strips or tiling has compression benefits, and will be supported by clients, but
is does have performance implications for different data processing flows.  Simple viewers will often
be able to show downsampled images quickly when the strip size is one line because they just pull the
subset of lines they need. Big strips or tiles means they have to essentially scan all the data.  Tiling
is great for subregion requests (perhaps from a mapping server) but less ideal for serial processing
software that is going line by line. Overall, the organization options didn't give that much difference
in size, so we should likely consider the performance of utilization issues before finalizing a decision.

Overall, I conclude that in-file compression with COMPRESS=DEFLATE and PREDICTOR=2 is a good value, nd
we can continue to think about tiling or big strips for modest additional gains.  We are definately
paying a price though relative to bzip2 external compression.

Minimizing Metadata Effects
---------------------------

A downside of doing in-file compression is tha we are no longer deliverying
the exact same bytes originally offered by USGS.  It is easy to ensure that
the pixel values are exactly the same, but it is harder to ensure that the
metadata (TIFF tags, GeoTIFF tags, etc) are exactly the same.

Before as reported by gdalinfo:
```
$ gdalinfo LC82301202013305LGN00_B1.TIF
Driver: GTiff/GeoTIFF
Files: LC82301202013305LGN00_B1.TIF
Size is 8531, 8581
Coordinate System is:
PROJCS["PS         WGS84",
    GEOGCS["WGS 84",
        DATUM["WGS_1984",
            SPHEROID["WGS 84",6378137,298.257223563,
                AUTHORITY["EPSG","7030"]],
            AUTHORITY["EPSG","6326"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4326"]],
    PROJECTION["Polar_Stereographic"],
    PARAMETER["latitude_of_origin",-71],
    PARAMETER["central_meridian",0],
    PARAMETER["scale_factor",1],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]]]
Origin = (-795915.000000000000000,-533085.000000000000000)
Pixel Size = (30.000000000000000,-30.000000000000000)
Metadata:
  AREA_OR_POINT=Point
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  ( -795915.000, -533085.000) (123d48'47.66"W, 81d12' 0.12"S)
Lower Left  ( -795915.000, -790515.000) (134d48'17.90"W, 79d42' 7.89"S)
Upper Right ( -539985.000, -533085.000) (134d37'53.70"W, 83d 1'28.66"S)
Lower Right ( -539985.000, -790515.000) (145d39'49.67"W, 81d12'20.12"S)
Center      ( -667950.000, -661800.000) (134d44' 6.05"W, 81d21'42.03"S)
Band 1 Block=8531x1 Type=UInt16, ColorInterp=Gray
```

After as reported by gdalinfo:
```
$ gdalinfo b1_deflate.tif
Driver: GTiff/GeoTIFF
Files: b1_deflate.tif
Size is 8531, 8581
Coordinate System is:
PROJCS["PS         WGS84",
    GEOGCS["WGS 84",
        DATUM["WGS_1984",
            SPHEROID["WGS 84",6378137,298.257223563,
                AUTHORITY["EPSG","7030"]],
            AUTHORITY["EPSG","6326"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4326"]],
    PROJECTION["Polar_Stereographic"],
    PARAMETER["latitude_of_origin",-71],
    PARAMETER["central_meridian",0],
    PARAMETER["scale_factor",1],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]]]
Origin = (-795915.000000000000000,-533085.000000000000000)
Pixel Size = (30.000000000000000,-30.000000000000000)
Metadata:
  AREA_OR_POINT=Point
Image Structure Metadata:
  COMPRESSION=DEFLATE
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  ( -795915.000, -533085.000) (123d48'47.66"W, 81d12' 0.12"S)
Lower Left  ( -795915.000, -790515.000) (134d48'17.90"W, 79d42' 7.89"S)
Upper Right ( -539985.000, -533085.000) (134d37'53.70"W, 83d 1'28.66"S)
Lower Right ( -539985.000, -790515.000) (145d39'49.67"W, 81d12'20.12"S)
Center      ( -667950.000, -661800.000) (134d44' 6.05"W, 81d21'42.03"S)
Band 1 Block=8531x1 Type=UInt16, ColorInterp=Gray
```

It is good to see that there is no loss of numerical precision, and the geotiff tags
render to the same result in GDAL.  We ought to dig into the actual GeoTIFF tags and
other TIFF tags a bit to ensure there isn't dangerous permutation going on.


text:
class GURL;
class ProfilePickerForceSigninDialogHost;

namespace views {
class WebView;
class View;
}  // namespace views

namespace gfx {
class Point;
class Size;
}  // namespace gfx

namespace web_modal {
class ModalDialogHostObserver;
}

class ProfilePickerForceSigninDialogDelegate
    : public views::DialogDelegateView,
      public content::WebContentsDelegate,
      public ChromeWebModalDialogManagerDelegate,
      public web_modal::WebContentsModalDialogHost {
 public:
  METADATA_HEADER(ProfilePickerForceSigninDialogDelegate);
  ProfilePickerForceSigninDialogDelegate(
      ProfilePickerForceSigninDialogHost* host,
      std::unique_ptr<views::WebView> web_view,
      const GURL& url);
  ProfilePickerForceSigninDialogDelegate(
      const ProfilePickerForceSigninDialogDelegate&) = delete;
  ProfilePickerForceSigninDialogDelegate& operator=(
      const ProfilePickerForceSigninDialogDelegate&) = delete;
  ~ProfilePickerForceSigninDialogDelegate() override;

  void CloseDialog();

  // Display the local error message inside login window.
  void DisplayErrorMessage();

  // content::WebContentsDelegate
  bool HandleContextMenu(content::RenderFrameHost& render_frame_host,
                         const content::ContextMenuParams& params) override;

  // ChromeWebModalDialogManagerDelegate
  web_modal::WebContentsModalDialogHost* GetWebContentsModalDialogHost()
      override;

  // web_modal::WebContentsModalDialogHost
  gfx::NativeView GetHostView() const override;
  gfx::Point GetDialogPosition(const gfx::Size& size) override;
  gfx::Size GetMaximumDialogSize() override;
  void AddObserver(web_modal::ModalDialogHostObserver* observer) override;
  void RemoveObserver(web_modal::ModalDialogHostObserver* observer) override;

 private:
  // Before its destruction, tells its parent container to reset its reference
  // to the ProfilePickerForceSigninDialogDelegate.
  void OnDialogDestroyed();

  // views::DialogDelegateView:
  gfx::Size CalculatePreferredSize() const override;
  views::View* GetInitiallyFocusedView() override;

  raw_ptr<ProfilePickerForceSigninDialogHost> host_;  // Not owned.
  raw_ptr<views::WebView> web_view_;  // Owned by the view hierarchy.
};

#endif  // CHROME_BROWSER_UI_VIEWS_PROFILES_PROFILE_PICKER_FORCE_SIGNIN_DIALOG_DELEGATE_H_


text:
alias dc-up="docker-compose up -d "
alias dc-down="docker-compose down"
alias dc-logs="docker-compose logs -f "
alias restart-docker="killall Docker && open /Applications/Docker.app"


text:
(function( $ ) {

var equalHeight = TestHelpers.accordion.equalHeight,
	setupTeardown = TestHelpers.accordion.setupTeardown,
	state = TestHelpers.accordion.state;

module( "accordion: methods", setupTeardown() );

test( "destroy", function() {
	expect( 1 );
	domEqual( "#list1", function() {
		$( "#list1" ).accordion().accordion( "destroy" );
	});
});

test( "enable/disable", function() {
	expect( 4 );
	var element = $( "#list1" ).accordion();
	state( element, 1, 0, 0 );
	element.accordion( "disable" );
	// event does nothing
	element.find( ".ui-accordion-header" ).eq( 1 ).trigger( "click" );
	state( element, 1, 0, 0 );
	// option still works
	element.accordion( "option", "active", 1 );
	state( element, 0, 1, 0 );
	element.accordion( "enable" );
	element.accordion( "option", "active", 2 );
	state( element, 0, 0, 1 );
});

test( "refresh", function() {
	expect( 6 );
	var element = $( "#navigation" )
		.parent()
			.height( 300 )
		.end()
		.accordion({
			heightStyle: "fill"
		});
	equalHeight( element, 255 );

	element.parent().height( 500 );
	element.accordion( "refresh" );
	equalHeight( element, 455 );
});

}( jQuery ) );


text:
#ifndef AVCODEC_AC3_PARSER_H
#define AVCODEC_AC3_PARSER_H

#include "ac3.h"
#include "get_bits.h"

/**
 * Parse AC-3 frame header.
 * Parse the header up to the lfeon element, which is the first 52 or 54 bits
 * depending on the audio coding mode.
 * @param[in]  gbc BitContext containing the first 54 bits of the frame.
 * @param[out] hdr Pointer to struct where header info is written.
 * @return Returns 0 on success, -1 if there is a sync word mismatch,
 * -2 if the bsid (version) element is invalid, -3 if the fscod (sample rate)
 * element is invalid, or -4 if the frmsizecod (bit rate) element is invalid.
 */
int avpriv_ac3_parse_header(GetBitContext *gbc, AC3HeaderInfo *hdr);

#endif /* AVCODEC_AC3_PARSER_H */


text:
package cell

import (
	"time"

	"github.com/cilium/cilium/pkg/hive/internal"
)

type invoker struct {
	cont  container
	funcs []namedFunc
}

type namedFunc struct {
	name string
	fn   any
}

type InvokerList interface {
	AppendInvoke(func() error)
}

func (i *invoker) invoke() error {
	for _, afn := range i.funcs {
		log.WithField("function", afn.name).Debug("Invoking")
		t0 := time.Now()
		if err := i.cont.Invoke(afn.fn); err != nil {
			log.WithError(err).WithField("", afn.name).Error("Invoke failed")
			return err
		}
		d := time.Since(t0)
		log.WithField("duration", d).WithField("function", afn.name).Info("Invoked")
	}
	return nil
}

func (i *invoker) Apply(c container) error {
	// Remember the scope in which we need to invoke.
	i.cont = c

	// Append the invoker to the list of invoke functions. These are invoked
	// prior to start to build up the objects. They are not invoked directly
	// here as first the configuration flags need to be registered. This allows
	// using hives in a command-line application with many commands and where
	// we don't yet know which command to run, but we still need to register
	// all the flags.
	return c.Invoke(func(l InvokerList) {
		l.AppendInvoke(i.invoke)
	})
}

func (i *invoker) Info(container) Info {
	n := NewInfoNode("")
	for _, namedFunc := range i.funcs {
		n.AddLeaf("🛠 %s: %s", namedFunc.name, internal.PrettyType(namedFunc.fn))
	}
	return n
}

// Invoke constructs a cell for invoke functions. The invoke functions are executed
// when the hive is started to instantiate all objects via the constructors.
func Invoke(funcs ...any) Cell {
	namedFuncs := []namedFunc{}
	for _, fn := range funcs {
		namedFuncs = append(
			namedFuncs,
			namedFunc{name: internal.FuncNameAndLocation(fn), fn: fn})
	}
	return &invoker{funcs: namedFuncs}
}


text:
require 'one_gadget/gadget'
# https://gitlab.com/david942j/libcdb/blob/master/libc/libc6-amd64_2.30-0ubuntu2.1_i386/lib64/libc-2.30.so
#
# Advanced Micro Devices X86-64
#
# GNU C Library (Ubuntu GLIBC 2.30-0ubuntu2.1) stable release version 2.30.
# Copyright (C) 2019 Free Software Foundation, Inc.
# This is free software; see the source for copying conditions.
# There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
# Compiled by GNU CC version 9.2.1 20191008.
# libc ABIs: UNIQUE IFUNC ABSOLUTE
# For bug reporting instructions, please see:
# <https://bugs.launchpad.net/ubuntu/+source/glibc/+bugs>.

build_id = File.basename(__FILE__, '.rb').split('-').last
OneGadget::Gadget.add(build_id, 846513,
                      constraints: ["[r13] == NULL || r13 == NULL", "[r12] == NULL || r12 == NULL"],
                      effect: "execve(\"/bin/sh\", r13, r12)")
OneGadget::Gadget.add(build_id, 846516,
                      constraints: ["[r13] == NULL || r13 == NULL", "[rdx] == NULL || rdx == NULL"],
                      effect: "execve(\"/bin/sh\", r13, rdx)")
OneGadget::Gadget.add(build_id, 846519,
                      constraints: ["[rsi] == NULL || rsi == NULL", "[rdx] == NULL || rdx == NULL"],
                      effect: "execve(\"/bin/sh\", rsi, rdx)")
OneGadget::Gadget.add(build_id, 970123,
                      constraints: ["[rsp+0x60] == NULL"],
                      effect: "execve(\"/bin/sh\", rsp+0x60, environ)")
OneGadget::Gadget.add(build_id, 970135,
                      constraints: ["[rsi] == NULL || rsi == NULL", "[[rax]] == NULL || [rax] == NULL"],
                      effect: "execve(\"/bin/sh\", rsi, [rax])")


text:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="cc.ddknight.app.learngit"
    android:installLocation="auto">

    <application
        android:allowBackup="false"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>


text:
package org.apache.uima.casviewer.ui.internal.hover;

import org.eclipse.jface.text.AbstractHoverInformationControlManager;
import org.eclipse.jface.text.IInformationControlCreator;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.TreeItem;

public class HoverManager extends AbstractHoverInformationControlManager {

  private TreeViewer viewer;

  public HoverManager(TreeViewer viewer, IInformationControlCreator creator) {
    super(creator);
    this.viewer = viewer;
  }

  @Override
  protected void computeInformation() {
    Point pt = getHoverEventLocation();
    // Trace.err("x: " + pt.x + " y: " + pt.y);
    TreeItem item = viewer.getTree().getItem(pt);
    if (item != null) {
      // Trace.err("Hover");
      setInformation(item, item.getBounds());
    } else {
      // Trace.err("NOT Hover");
      setInformation(null, null);
    }
  }

}


text:
namespace Microsoft.AspNetCore.Mvc;

/// <summary>
/// Indicates that the type and any derived types that this attribute is applied to
/// is not considered a controller by the default controller discovery mechanism.
/// </summary>
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
public sealed class NonControllerAttribute : Attribute
{
}


text:
'use strict';

moduloPago.controller('PagoPListController', ['$scope', '$routeParams', 'serverService', '$location',
    function ($scope, $routeParams, serverService, $location) {

        $scope.visibles = {};
        $scope.visibles.id = true;
        $scope.visibles.fpago = true;
        $scope.visibles.id_afiliado = true;
        $scope.visibles.id_cuota = true;
        $scope.visibles.id_recibo = true;

        $scope.ob = "pago";
        $scope.op = "plist";
        $scope.title = "Listado de pagos";
        $scope.icon = "fa-credit-card";
        $scope.neighbourhood = 2;
        $scope.id = $routeParams.id;

        if (!$routeParams.page) {
            $routeParams.page = 1;
        }

        if (!$routeParams.rpp) {
            $routeParams.rpp = 5;
        }

        $scope.numpage = $routeParams.page;
        $scope.rpp = $routeParams.rpp;

        $scope.order = "";
        $scope.ordervalue = "";
        $scope.filter = "id";
        $scope.filteroperator = "like";
        $scope.filtervalue = "";
        $scope.systemfilter = "";
        $scope.systemfilteroperator = "";
        $scope.systemfiltervalue = "";
        $scope.params = "";
        $scope.paramsWithoutOrder = "";
        $scope.paramsWithoutFilter = "";
        $scope.paramsWithoutSystemFilter = "";

        if ($routeParams.order && $routeParams.ordervalue) {
            $scope.order = $routeParams.order;
            $scope.ordervalue = $routeParams.ordervalue;
            $scope.orderParams = "&order=" + $routeParams.order + "&ordervalue=" + $routeParams.ordervalue;
            $scope.paramsWithoutFilter += $scope.orderParams;
            $scope.paramsWithoutSystemFilter += $scope.orderParams;
        } else {
            $scope.orderParams = "";
        }

        if ($routeParams.filter && $routeParams.filteroperator && $routeParams.filtervalue) {
            $scope.filter = $routeParams.filter;
            $scope.filteroperator = $routeParams.filteroperator;
            $scope.filtervalue = $routeParams.filtervalue;
            $scope.filterParams = "&filter=" + $routeParams.filter + "&filteroperator=" + $routeParams.filteroperator + "&filtervalue=" + $routeParams.filtervalue;
            $scope.paramsWithoutOrder += $scope.filterParams;
            $scope.paramsWithoutSystemFilter += $scope.filterParams;
        } else {
            $scope.filterParams = "";
        }

        if ($routeParams.systemfilter && $routeParams.systemfilteroperator && $routeParams.systemfiltervalue) {
            $scope.systemFilterParams = "&systemfilter=" + $routeParams.systemfilter + "&systemfilteroperator=" + $routeParams.systemfilteroperator + "&systemfiltervalue=" + $routeParams.systemfiltervalue;
            $scope.paramsWithoutOrder += $scope.systemFilterParams;
            $scope.paramsWithoutFilter += $scope.systemFilterParams;
        } else {
            $scope.systemFilterParams = "";
        }

        $scope.params = ($scope.orderParams + $scope.filterParams + $scope.systemFilterParams);
        $scope.params = $scope.params.replace('&', '?');

        serverService.getDataFromPromise(serverService.promise_getSome($scope.ob, $scope.rpp, $scope.numpage, $scope.filterParams, $scope.orderParams, $scope.systemFilterParams)).then(function (data) {
            if (data.status != 200) {
                $scope.status = "Error en la recepción de datos del servidor";
            } else {
                $scope.pages = data.message.pages.message;
                if (parseInt($scope.numpage) > parseInt($scope.pages))
                    $scope.numpage = $scope.pages;

                $scope.page = data.message.page.message;
                $scope.registers = data.message.registers.message;
                $scope.status = "";
            }
        });

        $scope.getRangeArray = function (lowEnd, highEnd) {
            var rangeArray = [];
            for (var i = lowEnd; i <= highEnd; i++) {
                rangeArray.push(i);
            }
            return rangeArray;
        };
        $scope.evaluateMin = function (lowEnd, highEnd) {
            return Math.min(lowEnd, highEnd);
        };
        $scope.evaluateMax = function (lowEnd, highEnd) {
            return Math.max(lowEnd, highEnd);
        };

        $scope.dofilter = function () {
            if ($scope.filter != "" && $scope.filteroperator != "" && $scope.filtervalue != "") {
                if ($routeParams.order && $routeParams.ordervalue) {
                    if ($routeParams.systemfilter && $routeParams.systemfilteroperator) {
                        $location.path($scope.ob + '/' + $scope.op + '/' + $scope.numpage + '/' + $scope.rpp).search('filter', $scope.filter).search('filteroperator', $scope.filteroperator).search('filtervalue', $scope.filtervalue).search('order', $routeParams.order).search('ordervalue', $routeParams.ordervalue).search('systemfilter', $routeParams.systemfilter).search('systemfilteroperator', $routeParams.systemfilteroperator).search('systemfiltervalue', $routeParams.systemfiltervalue);
                    } else {
                        $location.path($scope.ob + '/' + $scope.op + '/' + $scope.numpage + '/' + $scope.rpp).search('filter', $scope.filter).search('filteroperator', $scope.filteroperator).search('filtervalue', $scope.filtervalue).search('order', $routeParams.order).search('ordervalue', $routeParams.ordervalue);
                    }
                } else {
                    $location.path($scope.ob + '/' + $scope.op + '/' + $scope.numpage + '/' + $scope.rpp).search('filter', $scope.filter).search('filteroperator', $scope.filteroperator).search('filtervalue', $scope.filtervalue);
                }
            }
            return false;
        };

        $scope.getLiquidacion = function () {
            serverService.getDataFromPromise(serverService.promise_getLiquidacionTotal()).then(function (data) {
                if (data.status != 200) {
                    $scope.liquidacion = data.total;
                }
            });
        }

        $scope.getLiquidacionPorCuota = function (idCuota) {
            serverService.getDataFromPromise(serverService.promise_getliquidacionPorCuota(idCuota)).then(function (data) {
                if (data.status != 200) {
                    $scope.liquidacion = data.total;
                }
            });
        }

    }]);


text:
require 'sendgrid-ruby'

sg = SendGrid::API.new(api_key: ENV['SENDGRID_API_KEY'])

##################################################
# Retrieve email statistics by device type. #
# GET /devices/stats #

params = JSON.parse('{"aggregated_by": "day", "limit": 1, "start_date": "2016-01-01", "end_date": "2016-04-01", "offset": 1}')
response = sg.client.devices.stats.get(query_params: params)
puts response.status_code
puts response.body
puts response.headers


text:
/**
 * Author: Normen Hansen
 */
#include "com_jme3_bullet_joints_SixDofJoint.h"
#include "jmeBulletUtil.h"

#ifdef __cplusplus
extern "C" {
#endif

    /*
     * Class:     com_jme3_bullet_joints_SixDofJoint
     * Method:    getRotationalLimitMotor
     * Signature: (JI)J
     */
    JNIEXPORT jlong JNICALL Java_com_jme3_bullet_joints_SixDofJoint_getRotationalLimitMotor
    (JNIEnv * env, jobject object, jlong jointId, jint index) {
        btGeneric6DofConstraint* joint = reinterpret_cast<btGeneric6DofConstraint*>(jointId);
        if (joint == NULL) {
            jclass newExc = env->FindClass("java/lang/NullPointerException");
            env->ThrowNew(newExc, "The native object does not exist.");
            return 0;
        }
        return reinterpret_cast<jlong>(joint->getRotationalLimitMotor(index));
    }

    /*
     * Class:     com_jme3_bullet_joints_SixDofJoint
     * Method:    getTranslationalLimitMotor
     * Signature: (J)J
     */
    JNIEXPORT jlong JNICALL Java_com_jme3_bullet_joints_SixDofJoint_getTranslationalLimitMotor
    (JNIEnv * env, jobject object, jlong jointId) {
        btGeneric6DofConstraint* joint = reinterpret_cast<btGeneric6DofConstraint*>(jointId);
        if (joint == NULL) {
            jclass newExc = env->FindClass("java/lang/NullPointerException");
            env->ThrowNew(newExc, "The native object does not exist.");
            return 0;
        }
        return reinterpret_cast<jlong>(joint->getTranslationalLimitMotor());
    }

    /*
     * Class:     com_jme3_bullet_joints_SixDofJoint
     * Method:    setLinearUpperLimit
     * Signature: (JLcom/jme3/math/Vector3f;)V
     */
    JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofJoint_setLinearUpperLimit
    (JNIEnv * env, jobject object, jlong jointId, jobject vector) {
        btGeneric6DofConstraint* joint = reinterpret_cast<btGeneric6DofConstraint*>(jointId);
        if (joint == NULL) {
            jclass newExc = env->FindClass("java/lang/NullPointerException");
            env->ThrowNew(newExc, "The native object does not exist.");
            return;
        }
        btVector3 vec = btVector3();
        jmeBulletUtil::convert(env, vector, &vec);
        joint->setLinearUpperLimit(vec);
    }

    /*
     * Class:     com_jme3_bullet_joints_SixDofJoint
     * Method:    setLinearLowerLimit
     * Signature: (JLcom/jme3/math/Vector3f;)V
     */
    JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofJoint_setLinearLowerLimit
    (JNIEnv * env, jobject object, jlong jointId, jobject vector) {
        btGeneric6DofConstraint* joint = reinterpret_cast<btGeneric6DofConstraint*>(jointId);
        if (joint == NULL) {
            jclass newExc = env->FindClass("java/lang/NullPointerException");
            env->ThrowNew(newExc, "The native object does not exist.");
            return;
        }
        btVector3 vec = btVector3();
        jmeBulletUtil::convert(env, vector, &vec);
        joint->setLinearLowerLimit(vec);
    }

    /*
     * Class:     com_jme3_bullet_joints_SixDofJoint
     * Method:    setAngularUpperLimit
     * Signature: (JLcom/jme3/math/Vector3f;)V
     */
    JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofJoint_setAngularUpperLimit
    (JNIEnv * env, jobject object, jlong jointId, jobject vector) {
        btGeneric6DofConstraint* joint = reinterpret_cast<btGeneric6DofConstraint*>(jointId);
        if (joint == NULL) {
            jclass newExc = env->FindClass("java/lang/NullPointerException");
            env->ThrowNew(newExc, "The native object does not exist.");
            return;
        }
        btVector3 vec = btVector3();
        jmeBulletUtil::convert(env, vector, &vec);
        joint->setAngularUpperLimit(vec);
    }

    /*
     * Class:     com_jme3_bullet_joints_SixDofJoint
     * Method:    setAngularLowerLimit
     * Signature: (JLcom/jme3/math/Vector3f;)V
     */
    JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofJoint_setAngularLowerLimit
    (JNIEnv * env, jobject object, jlong jointId, jobject vector) {
        btGeneric6DofConstraint* joint = reinterpret_cast<btGeneric6DofConstraint*>(jointId);
        if (joint == NULL) {
            jclass newExc = env->FindClass("java/lang/NullPointerException");
            env->ThrowNew(newExc, "The native object does not exist.");
            return;
        }
        btVector3 vec = btVector3();
        jmeBulletUtil::convert(env, vector, &vec);
        joint->setAngularLowerLimit(vec);
    }

    /*
     * Class:     com_jme3_bullet_joints_SixDofJoint
     * Method:    createJoint
     * Signature: (JJLcom/jme3/math/Vector3f;Lcom/jme3/math/Matrix3f;Lcom/jme3/math/Vector3f;Lcom/jme3/math/Matrix3f;Z)J
     */
    JNIEXPORT jlong JNICALL Java_com_jme3_bullet_joints_SixDofJoint_createJoint
    (JNIEnv * env, jobject object, jlong bodyIdA, jlong bodyIdB, jobject pivotA, jobject rotA, jobject pivotB, jobject rotB, jboolean useLinearReferenceFrameA) {
        jmeClasses::initJavaClasses(env);
        btRigidBody* bodyA = reinterpret_cast<btRigidBody*>(bodyIdA);
        btRigidBody* bodyB = reinterpret_cast<btRigidBody*>(bodyIdB);
        btMatrix3x3 mtx1 = btMatrix3x3();
        btMatrix3x3 mtx2 = btMatrix3x3();
        btTransform transA = btTransform(mtx1);
        jmeBulletUtil::convert(env, pivotA, &transA.getOrigin());
        jmeBulletUtil::convert(env, rotA, &transA.getBasis());
        btTransform transB = btTransform(mtx2);
        jmeBulletUtil::convert(env, pivotB, &transB.getOrigin());
        jmeBulletUtil::convert(env, rotB, &transB.getBasis());
        btGeneric6DofConstraint* joint = new btGeneric6DofConstraint(*bodyA, *bodyB, transA, transB, useLinearReferenceFrameA);
        return reinterpret_cast<jlong>(joint);
    }
#ifdef __cplusplus
}
#endif


text:
package api

type EventType string

const (
	Added   EventType = "ADDED"
	Deleted EventType = "DELETED"
)

type SubnetRegistry interface {
	GetSubnets() ([]Subnet, string, error)
	GetSubnet(nodeName string) (*Subnet, error)
	DeleteSubnet(nodeName string) error
	CreateSubnet(sn string, sub *Subnet) error
	WatchSubnets(receiver chan<- *SubnetEvent, ready chan<- bool, startVersion <-chan string, stop <-chan bool) error

	GetNodes() ([]Node, string, error)
	WatchNodes(receiver chan<- *NodeEvent, ready chan<- bool, startVersion <-chan string, stop <-chan bool) error

	WriteNetworkConfig(clusterNetworkCIDR string, clusterBitsPerSubnet uint, serviceNetworkCIDR string) error
	GetClusterNetworkCIDR() (string, error)

	GetNamespaces() ([]string, string, error)
	WatchNamespaces(receiver chan<- *NamespaceEvent, ready chan<- bool, startVersion <-chan string, stop <-chan bool) error

	WatchNetNamespaces(receiver chan<- *NetNamespaceEvent, ready chan<- bool, startVersion <-chan string, stop <-chan bool) error
	GetNetNamespaces() ([]NetNamespace, string, error)
	GetNetNamespace(name string) (NetNamespace, error)
	WriteNetNamespace(name string, id uint) error
	DeleteNetNamespace(name string) error

	GetServicesNetworkCIDR() (string, error)
	GetServices() ([]Service, string, error)
	WatchServices(receiver chan<- *ServiceEvent, ready chan<- bool, startVersion <-chan string, stop <-chan bool) error
}

type Subnet struct {
	NodeIP     string
	SubnetCIDR string
}

type SubnetEvent struct {
	Type     EventType
	NodeName string
	Subnet   Subnet
}

type Node struct {
	Name string
	IP   string
}

type NodeEvent struct {
	Type EventType
	Node Node
}

type NetNamespace struct {
	Name  string
	NetID uint
}

type NetNamespaceEvent struct {
	Type  EventType
	Name  string
	NetID uint
}

type NamespaceEvent struct {
	Type EventType
	Name string
}

type ServiceProtocol string

const (
	TCP ServiceProtocol = "TCP"
	UDP ServiceProtocol = "UDP"
)

type Service struct {
	Name      string
	Namespace string
	IP        string
	Protocol  ServiceProtocol
	Port      uint
}

type ServiceEvent struct {
	Type    EventType
	Service Service
}