text:
'use strict'

const autoprefixer = require('autoprefixer')
const postcss = require('jstransformer-postcss')
const objectAssign = require('object-assign')

exports.name = 'autoprefixer'
exports.inputFormats = ['autoprefixer', 'css']
exports.outputFormat = 'css'

exports.render = function (str, options) {
  return postcss.render(str, objectAssign({
    plugins: [
      autoprefixer(options)
    ]
  }, options))
}

exports.renderAsync = function (str, options) {
  return postcss.renderAsync(str, objectAssign({
    plugins: [
      autoprefixer(options)
    ]
  }, options))
}

redpajama_set_name: RedPajamaGithub


text:
import java.math.BigDecimal;

/**
 * Created by bbraun on 5/6/2014.
 */
public class Computer {
    private PcPart operatingsystem;
    private PcPart processor;
    private PcPart motherboard;
    private PcPart memory;
    private PcPart sysdrive;
    private PcPart adddrive;
    private PcPart optical;
    private PcPart video;
    private PcPart wifi;
    private PcPart extcase;
    private PcPart keyboardmouse;
    private PcPart monitor;
    private PcPart speakers;
    private PcPart software;

    public Computer(PartList pcList) {
        operatingsystem = pcList.getDefault(PartType.os);
        processor = pcList.getDefault(PartType.cpu);
        motherboard = pcList.getDefault(PartType.board);
        memory = pcList.getDefault(PartType.ram);
        sysdrive = pcList.getDefault(PartType.drive1);
        adddrive = pcList.getDefault(PartType.drive2);
        optical = pcList.getDefault(PartType.optic);
        video = pcList.getDefault(PartType.video);
        wifi = pcList.getDefault(PartType.wifi);
        extcase = pcList.getDefault(PartType.extcase);
        keyboardmouse = pcList.getDefault(PartType.keyboard);
        monitor = pcList.getDefault(PartType.monitor);
        speakers = pcList.getDefault(PartType.speakers);
        software = pcList.getDefault(PartType.software);
    }

    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Start get cost
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    public BigDecimal getCost(int computers, BigDecimal tax) {
        BigDecimal cost = new BigDecimal("0.00");
        cost = cost.add(operatingsystem.getCost());
        cost = cost.add(processor.getCost());
        cost = cost.add(motherboard.getCost());
        cost = cost.add(memory.getCost());
        cost = cost.add(sysdrive.getCost());
        cost = cost.add(adddrive.getCost());
        cost = cost.add(optical.getCost());
        cost = cost.add(video.getCost());
        cost = cost.add(wifi.getCost());
        cost = cost.add(extcase.getCost());
        cost = cost.add(keyboardmouse.getCost());
        cost = cost.add(monitor.getCost());
        cost = cost.add(speakers.getCost());
        cost = cost.add(software.getCost());
        cost = cost.multiply(new BigDecimal(computers));
        cost = cost.add(cost.multiply(tax));
        return cost.setScale(2,BigDecimal.ROUND_HALF_EVEN);
    }

    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Start setParts
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    public void setPart(PcPart part) {

        switch (part.getPartType()) {
            case os:
                operatingsystem = part;
                break;
            case cpu:
                processor = part;
                break;
            case board:
                motherboard = part;
                break;
            case ram:
                memory = part;
                break;
            case video:
                video = part;
                break;
            case drive1:
                sysdrive = part;
                break;
            case drive2:
                adddrive = part;
                break;
            case optic:
                optical = part;
                break;
            case monitor:
                monitor = part;
                break;
            case keyboard:
                keyboardmouse = part;
                break;
            case wifi:
                wifi = part;
                break;
            case extcase:
                extcase = part;
                break;
            case speakers:
                speakers = part;
                break;
            case software:
                software = part;
                break;
        }
    }

    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // End setParts
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Start getParts
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    public PcPart getPart(PartType type) {

        PcPart part;

        switch (type) {
            case os:
                part = operatingsystem;
                break;
            case cpu:
                part = processor;
                break;
            case board:
                part = motherboard;
                break;
            case ram:
                part = memory;
                break;
            case video:
                part = video;
                break;
            case drive1:
                part = sysdrive;
                break;
            case drive2:
                part = adddrive;
                break;
            case optic:
                part = optical;
                break;
            case monitor:
                part = monitor;
                break;
            case keyboard:
                part = keyboardmouse;
                break;
            case wifi:
                part = wifi;
                break;
            case extcase:
                part = extcase;
                break;
            case speakers:
                part = speakers;
                break;
            case software:
                part = software;
                break;
            default:
                part = null;
        }

        return part;
    }

    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // End getParts
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
}


text:
/*
 * EventHandler.cpp
 *
 *  Created on: May 21, 2014
 *      Author: sni
 */

#include "ice/processing/EventHandler.h"
#include "ice/ICEngine.h"

namespace ice
{

EventHandler::EventHandler(std::weak_ptr<ICEngine> engine)
{
  this->engine = engine;
  this->running = false;
}

EventHandler::EventHandler(const int numThreads, const int bufferSize)
{
  this->taskBuffer = std::unique_ptr<Buffer<AsynchronousTask> >(new Buffer<AsynchronousTask>(bufferSize, false));
  this->running = true;

  //initialize threads
  for (int i = 0; i < numThreads; ++i)
  {
    this->threadPool.push_back(std::thread(&EventHandler::performTask, this, i));
  }
}

EventHandler::~EventHandler()
{
  if (this->running)
    this->cleanUp();
}

void EventHandler::init()
{
  std::shared_ptr<Configuration> config;

  if (engine.expired())
    return;

  config = engine.lock()->getConfig();

  this->taskBuffer = std::unique_ptr<Buffer<AsynchronousTask> >(new Buffer<AsynchronousTask>(config->getEventHandlerBufferSize(), false));
  this->running = true;

  //initialize threads
  for (int i = 0; i < config->getEventHandlerThreadCount(); ++i)
  {
    this->threadPool.push_back(std::thread(&EventHandler::performTask, this, i));
  }
}

void EventHandler::cleanUp()
{
  //stopping all threads
  this->running = false;

  this->cv.notify_all();

  for (auto &t : this->threadPool)
  {
    t.join();
  }
}

const int EventHandler::addTask(std::shared_ptr<AsynchronousTask> event)
{
  std::lock_guard<std::mutex> guard(mtx_);

  std::shared_ptr<AsynchronousTask> returnValue = this->taskBuffer->add(event);

  if (returnValue)
  {
    std::cerr << "Error, Event Buffer full, dropping event" << returnValue << std::endl;

    return 1;
  }

  cv.notify_one();

  return 0;
}

const int EventHandler::addTimerTask(std::shared_ptr<AsynchronousTask> task, long time)
{
  std::thread([this, time, task]() {
    std::this_thread::sleep_for(std::chrono::milliseconds(time));
    task->performTask();
  }).detach();

  return 0;
}

std::shared_ptr<AsynchronousTask> EventHandler::popTask()
{
  std::shared_ptr<AsynchronousTask> ptr;

  std::unique_lock<std::mutex> lock(mtx_);
  this->cv.wait(lock, [&]()
  { return false == this->taskBuffer->isEmpty() || false == this->running;});

  if (false == this->running)
  {
    return ptr;
  }

  ptr = this->taskBuffer->popFirst();

  return ptr;
}

const int EventHandler::getThreadPoolSize() const
{
  return this->threadPool.size();
}

const int EventHandler::getBufferSize() const
{
  return this->taskBuffer->getBufferSize();
}

void EventHandler::performTask(const int id)
{
  std::shared_ptr<AsynchronousTask> ptr;

//  {
//    std::lock_guard<std::mutex> guard(this->mtx_);
//    std::cerr << id << ": Starting" << std::endl;
//  }

  while (this->running)
  {
    // get next event
    ptr = this->popTask();

    //no event exists
    if (false == ptr)
      continue;

    //perform event
    ptr->performTask();
  }

//  {
//    std::lock_guard<std::mutex> guard(this->mtx_);
//    std::cerr << id << ": Stopped" << std::endl;
//  }
}

} /* namespace ice */


text:
FROM biocontainers/biocontainers:vdebian-buster-backports_cv1
MAINTAINER biocontainers <biodocker@gmail.com>
LABEL    software="squizz" \
    base_image="biocontainers/biocontainers:vdebian-buster-backports_cv1" \
    container="squizz" \
    about.summary="Converter for genetic sequences and alignments" \
    about.home="ftp://ftp.pasteur.fr/pub/gensoft/projects/squizz/" \
    software.version="0.99ddfsg-2-deb" \
    version="1" \
    about.copyright="2011 Nicolas Joly<njoly@pasteur.fr>" \
    about.license="GPL-2+" \
    about.license_file="/usr/share/doc/squizz/copyright" \
    extra.binaries="/usr/bin/squizz" \
    about.tags="field::biology, field::biology:bioinformatics, implemented-in::c++,:commandline, role::program, scope::utility, use::converting"

USER root
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && (apt-get install -t buster-backports -y squizz || apt-get install -y squizz) && apt-get clean && apt-get purge && rm -rf /var/lib/apt/lists/* /tmp/*
USER biodocker


text:
package org.jetbrains.plugins.ipnb.editor.actions;

import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.plugins.ipnb.editor.IpnbFileEditor;
import org.jetbrains.plugins.ipnb.editor.panels.IpnbEditablePanel;
import org.jetbrains.plugins.ipnb.editor.panels.IpnbFilePanel;
import org.jetbrains.plugins.ipnb.format.cells.IpnbCell;
import org.jetbrains.plugins.ipnb.format.cells.IpnbEditableCell;
import org.jetbrains.plugins.ipnb.format.cells.IpnbMarkdownCell;

import java.util.List;

public class IpnbMarkdownCellAction extends AnAction {
  private final IpnbFileEditor myEditor;

  public IpnbMarkdownCellAction(IpnbFileEditor editor) {
    super("Markdown Cell");
    myEditor = editor;
  }

  @Override
  public void actionPerformed(@NotNull AnActionEvent event) {
    changeTypeToMarkdown(myEditor);
  }

  private static void changeTypeToMarkdown(@NotNull final IpnbFileEditor editor) {
    final IpnbFilePanel filePanel = editor.getIpnbFilePanel();
    final IpnbEditablePanel selectedCellPanel = filePanel.getSelectedCellPanel();
    if (selectedCellPanel == null) return;
    final IpnbEditableCell cell = selectedCellPanel.getCell();

    final List<IpnbCell> cells = filePanel.getIpnbFile().getCells();
    final int index = cells.indexOf(selectedCellPanel.getCell());
    final IpnbMarkdownCell markdownCell = new IpnbMarkdownCell(cell.getSource(), cell.getMetadata());
    filePanel.executeUndoableCommand(
      () -> {
        if (index >= 0) {
          cells.set(index, markdownCell);
        }
        filePanel.replaceComponent(selectedCellPanel, markdownCell);
        filePanel.saveToFile(false);
      },
      "Change Cell Type To Markdown");
  }
}


text:
package com.jwetherell.pedometer.service;

import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.logging.Logger;
import com.jwetherell.pedometer.R;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.hardware.Sensor;
import android.hardware.SensorManager;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.IBinder;
import android.os.PowerManager;
import android.os.RemoteException;
import android.os.PowerManager.WakeLock;

/**
 * This class extends the Service class. it is in charge of starting and
 * stopping the power, notification, and sensor managers. It also passes
 * information received from the sensor to the StepDetector.
 *
 * This code is losely based on http://code.google.com/p/pedometer/
 *
 * @author bagilevi <bagilevi@gmail.com>
 * @author Justin Wetherell <phishman3579@gmail.com>
 */
public class StepService extends Service implements StepListener {

    private static final Logger logger = Logger.getLogger(StepService.class.getSimpleName());

    private static int NOTIFY = 0x1001;
    private static AtomicBoolean updating = new AtomicBoolean(false);

    private static SensorManager sensorManager = null;
    private static StepDetector stepDetector = null;

    private static PowerManager powerManager = null;
    private static WakeLock wakeLock = null;
    private static NotificationManager notificatioManager = null;
    private static Notification notification = null;
    private static Intent passedIntent = null;
    private static List<IStepServiceCallback> mCallbacks = new ArrayList<IStepServiceCallback>();;

    private static int mSteps = 0;
    private static boolean running = false;

    /**
     * {@inheritDoc}
     */
    @Override
    public void onCreate() {
        super.onCreate();
        logger.info("onCreate");

        notificatioManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
        initNotification();

        powerManager = (PowerManager) getSystemService(Context.POWER_SERVICE);
        wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "StepService");
        if (!wakeLock.isHeld()) wakeLock.acquire();

        if (stepDetector == null) {
            stepDetector = StepDetector.getInstance();
            stepDetector.addStepListener(this);
        }

        sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);
        sensorManager.registerListener(stepDetector, sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER), SensorManager.SENSOR_DELAY_GAME);
        running = true;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void onDestroy() {
        super.onDestroy();
        logger.info("onDestroy");
        running = false;
        mSteps = 0;

        notificatioManager.cancel(NOTIFY);
        if (wakeLock.isHeld()) wakeLock.release();
        sensorManager.unregisterListener(stepDetector);

        stopForegroundCompat(NOTIFY);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void onStart(Intent intent, int startId) {
        super.onStart(intent, startId);
        logger.info("onStart");

        passedIntent = intent;
        Bundle extras = passedIntent.getExtras();
        if (extras != null) {
            NOTIFY = extras.getInt("int");
        }

        // Work around a bug where notif number has to be > 0
        updateNotification((mSteps > 0) ? mSteps : 1);
        startForegroundCompat(NOTIFY, notification);
    }

    /**
     * This is a wrapper around the new startForeground method, using the older
     * APIs if it is not available.
     *
     * @param id
     *            Integer representing the service to start.
     * @param notif
     *            Notification to display when service is running.
     */
    public void startForegroundCompat(int id, Notification notif) {
        Method mStartForeground = null;
        try {
            mStartForeground = getClass().getMethod("startForeground", new Class[] { int.class, Notification.class });
        } catch (Exception e) {
            // Should happen in Android OS < 2.0
        }

        // If we have the new startForeground API, then use it.
        if (mStartForeground != null) {
            try {
                mStartForeground.invoke(this, id, notif);
            } catch (Exception e) {
                // Should not happen.
            }
            return;
        }

        // Fall back on the old API.
        setForeground(true);
        notificatioManager.notify(id, notif);
    }

    /**
     * This is a wrapper around the new stopForeground method, using the older
     * APIs if it is not available.
     *
     * @param id
     *            Integer of the service to stop.
     */
    public void stopForegroundCompat(int id) {
        Method mStopForeground = null;
        try {
            mStopForeground = getClass().getMethod("stopForeground", new Class[] { boolean.class });
        } catch (Exception e) {
            // Should happen in Android OS < 2.0
        }

        // If we have the new stopForeground API, then use it.
        if (mStopForeground != null) {
            try {
                mStopForeground.invoke(this, true);
            } catch (Exception e) {
                // Should not happen.
            }
            return;
        }

        // Fall back on the old API. Note to cancel BEFORE changing the
        // foreground state, since we could be killed at that point.
        notificatioManager.cancel(id);
        setForeground(false);
    }

    private void initNotification() {
        notification = new Notification(R.drawable.icon, "Pedometer started.", System.currentTimeMillis());
        notification.flags = Notification.FLAG_NO_CLEAR | Notification.FLAG_ONGOING_EVENT;
    }

    private void updateNotification(int steps) {
        if (!updating.compareAndSet(false, true)) return;

        notification.number = steps;
        notification.when = System.currentTimeMillis();
        PendingIntent contentIntent = PendingIntent.getActivity(this, 0, passedIntent, 0);
        notification.setLatestEventInfo(this, getText(R.string.app_name), "Total steps: " + steps, contentIntent);
        notificatioManager.notify(NOTIFY, notification);

        updating.set(false);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void onStep() {
        logger.info("onStep()");
        mSteps++;

        if (!updating.get()) {
            UpdateNotificationAsyncTask update = new UpdateNotificationAsyncTask();
            update.doInBackground(mSteps);
        }

        if (mCallbacks != null) {
            List<IStepServiceCallback> callbacksToRemove = null;
            for (IStepServiceCallback mCallback : mCallbacks) {
                try {
                    mCallback.stepsChanged(mSteps);
                } catch (RemoteException e) {
                    // Remove old callbacks if they failed to unbind
                    callbacksToRemove = new ArrayList<IStepServiceCallback>();
                    callbacksToRemove.add(mCallback);
                    e.printStackTrace();
                }
            }
            if (callbacksToRemove != null) {
                for (IStepServiceCallback mCallback : callbacksToRemove) {
                    mCallbacks.remove(mCallback);
                }
            }
        }
    }

    private class UpdateNotificationAsyncTask extends AsyncTask<Integer, Integer, Boolean> {

        /**
         * {@inheritDoc}
         */
        @Override
        protected Boolean doInBackground(Integer... params) {
            updateNotification(params[0]);
            return true;
        }
    }

    private final IStepService.Stub mBinder = new IStepService.Stub() {

        /**
         * {@inheritDoc}
         */
        @Override
        public boolean isRunning() throws RemoteException {
            return running;
        }

        /**
         * {@inheritDoc}
         */
        @Override
        public void setSensitivity(int sens) throws RemoteException {
            logger.info("setSensitivity: " + sens);
            StepDetector.setSensitivity(sens);
        }

        /**
         * {@inheritDoc}
         */
        @Override
        public void registerCallback(IStepServiceCallback cb) throws RemoteException {
            if (cb == null) return;

            logger.info("registerCallback: " + cb.toString());
            cb.stepsChanged(mSteps);
            if (!mCallbacks.contains(cb)) mCallbacks.add(cb);
        }

        /**
         * {@inheritDoc}
         */
        @Override
        public void unregisterCallback(IStepServiceCallback cb) throws RemoteException {
            if (cb == null) return;

            logger.info("unregisterCallback: " + cb.toString());
            if (mCallbacks.contains(cb)) mCallbacks.remove(cb);
        }
    };

    /**
     * {@inheritDoc}
     */
    @Override
    public IBinder onBind(Intent intent) {
        logger.info("onBind()");
        return mBinder;
    }
}


text:
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE190_Integer_Overflow__int_connect_socket_postinc_67b.c
Label Definition File: CWE190_Integer_Overflow__int.label.xml
Template File: sources-sinks-67b.tmpl.c
*/
/*
 * @description
 * CWE: 190 Integer Overflow
 * BadSource: connect_socket Read data using a connect socket (client side)
 * GoodSource: Set data to a small, non-zero number (two)
 * Sinks: increment
 *    GoodSink: Ensure there will not be an overflow before incrementing data
 *    BadSink : Increment data, which can cause an overflow
 * Flow Variant: 67 Data flow: data passed in a struct from one function to another in different source files
 *
 * */

#include "std_testcase.h"

#ifdef _WIN32
#include <winsock2.h>
#include <windows.h>
#include <direct.h>
#pragma comment(lib, "ws2_32") /* include ws2_32.lib when linking */
#define CLOSE_SOCKET closesocket
#else /* NOT _WIN32 */
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#define INVALID_SOCKET -1
#define SOCKET_ERROR -1
#define CLOSE_SOCKET close
#define SOCKET int
#endif

#define TCP_PORT 27015
#define IP_ADDRESS "127.0.0.1"
#define CHAR_ARRAY_SIZE (3 * sizeof(data) + 2)

typedef struct _CWE190_Integer_Overflow__int_connect_socket_postinc_67_structType
{
    int structFirst;
} CWE190_Integer_Overflow__int_connect_socket_postinc_67_structType;

#ifndef OMITBAD

void CWE190_Integer_Overflow__int_connect_socket_postinc_67b_badSink(CWE190_Integer_Overflow__int_connect_socket_postinc_67_structType myStruct)
{
    int data = myStruct.structFirst;
    {
        /* POTENTIAL FLAW: Incrementing data could cause an overflow */
        data++;
        int result = data;
        printIntLine(result);
    }
}

#endif /* OMITBAD */

#ifndef OMITGOOD

/* goodG2B uses the GoodSource with the BadSink */
void CWE190_Integer_Overflow__int_connect_socket_postinc_67b_goodG2BSink(CWE190_Integer_Overflow__int_connect_socket_postinc_67_structType myStruct)
{
    int data = myStruct.structFirst;
    {
        /* POTENTIAL FLAW: Incrementing data could cause an overflow */
        data++;
        int result = data;
        printIntLine(result);
    }
}

/* goodB2G uses the BadSource with the GoodSink */
void CWE190_Integer_Overflow__int_connect_socket_postinc_67b_goodB2GSink(CWE190_Integer_Overflow__int_connect_socket_postinc_67_structType myStruct)
{
    int data = myStruct.structFirst;
    /* FIX: Add a check to prevent an overflow from occurring */
    if (data < INT_MAX)
    {
        data++;
        int result = data;
        printIntLine(result);
    }
    else
    {
        printLine("data value is too large to perform arithmetic safely.");
    }
}

#endif /* OMITGOOD */


text:
using UnityEditor;
using UnityEngine;
using System.Collections.Generic;

[CustomEditor(typeof(vp_UITouchWeaponSwitcher))]
public class vp_UITouchWeaponSwitcherEditor : vp_UIControlEditor
{

	protected vp_UITouchWeaponSwitcher m_Target = null;

	protected override void OnEnable()
	{

		base.OnEnable();

		m_Target = (vp_UITouchWeaponSwitcher)target;

	}

	/// <summary>
	///
	/// </summary>
	protected override void DoInspector()
	{

		m_Target.WeaponScroller = (Transform)EditorGUILayout.ObjectField("Weapon Scroller", m_Target.WeaponScroller, typeof(Transform), true);
		m_Target.ChangeOnRelease = EditorGUILayout.Toggle("Change On Release", m_Target.ChangeOnRelease);
		m_Target.WieldTouchDelay = EditorGUILayout.Slider("Wield Touch Delay", m_Target.WieldTouchDelay, 0, 5);
		m_Target.ChangeWeaponThreshold = EditorGUILayout.FloatField("Change Weapon Threshold", m_Target.ChangeWeaponThreshold);
		m_Target.ItemWidth = EditorGUILayout.FloatField("Item Width", m_Target.ItemWidth);
		m_Target.Angle = EditorGUILayout.FloatField("Angle", m_Target.Angle);
		m_Target.ItemYOffset = EditorGUILayout.FloatField("Item Y Offset", m_Target.ItemYOffset);

	}

}


text:
<?php
// Prepare classes
$classes[] = "block";
if (isset($class)) {
    $classes[] = $class;
}

// Load content details from route
if (isset($contentRoute)) {
    extract($this->getContentForRoute($contentRoute));
}

//var_dump(get_defined_vars());

// Prepare title
$title = isset($title) && !empty($title)? $title : null;
$header = isset($header) ? $header : $title;

// Prepare content into text
$content = isset($content) ? $content : null;
$text = isset($text) ? $text : $content;

?><div <?= $this->classList($classes) ?>>

    <?php if (isset($header)) : ?>

<?= $header ?>

    <?php endif; ?>

    <?php if (isset($text)) : ?>
        <?= $text ?>
    <?php endif; ?>

    <?php if (isset($links)) :
        $this->renderView("default/link-list", [
            "links" => $links
        ]);
    endif; ?>

    <?php if (isset($toc)) :
        $this->renderView("default/toc-list", [
            "toc" => $toc
        ]);
    endif; ?>


text:
namespace novo {
namespace entities {

using glm::vec3;

class Entity
{
protected:
	vec3 pos;
public:
	Entity(vec3 position);

	vec3 getPosition() const;
	void setPosition(const vec3& new_pos);
};

}}

#endif // ENTITY_H


text:
(function () {
    "use strict";

    function BackdropDirective($timeout, $http) {

        function link(scope, el, attr, ctrl) {

            var events = [];

            scope.clickBackdrop = function (event) {
                if (scope.disableEventsOnClick === true) {
                    event.preventDefault();
                    event.stopPropagation();
                }
            };

            function onInit() {

                if (scope.highlightElement) {
                    setHighlight();
                }

            }

            function setHighlight() {

                scope.loading = true;

                $timeout(function () {

                    // The element to highlight
                    var highlightElement = $(scope.highlightElement);

                    if (highlightElement && highlightElement.length > 0) {

                        var offset = highlightElement.offset();
                        var width = highlightElement.outerWidth();
                        var height = highlightElement.outerHeight();

                        // Rounding numbers
                        var topDistance = offset.top.toFixed();
                        var topAndHeight = (offset.top + height).toFixed();
                        var leftDistance = offset.left.toFixed();
                        var leftAndWidth = (offset.left + width).toFixed();

                        // The four rectangles
                        var rectTop = el.find(".umb-backdrop__rect--top");
                        var rectRight = el.find(".umb-backdrop__rect--right");
                        var rectBottom = el.find(".umb-backdrop__rect--bottom");
                        var rectLeft = el.find(".umb-backdrop__rect--left");

                        // Add the css
                        scope.rectTopCss = { "height": topDistance, "left": leftDistance + "px", opacity: scope.backdropOpacity };
                        scope.rectRightCss = { "left": leftAndWidth + "px", "top": topDistance + "px", "height": height, opacity: scope.backdropOpacity };
                        scope.rectBottomCss = { "height": "100%", "top": topAndHeight + "px", "left": leftDistance + "px", opacity: scope.backdropOpacity };
                        scope.rectLeftCss = { "width": leftDistance, opacity: scope.backdropOpacity };

                        // Prevent interaction in the highlighted area
                        if (scope.highlightPreventClick) {
                            var preventClickElement = el.find(".umb-backdrop__highlight-prevent-click");
                            preventClickElement.css({ "width": width, "height": height, "left": offset.left, "top": offset.top });
                        }

                    }

                    scope.loading = false;

                });

            }

            function resize() {
                setHighlight();
            }

            events.push(scope.$watch("highlightElement", function (newValue, oldValue) {
                if (!newValue) { return; }
                if (newValue === oldValue) { return; }
                setHighlight();
            }));

            $(window).on("resize.umbBackdrop", resize);

            scope.$on("$destroy", function () {
                // unbind watchers
                for (var e in events) {
                    events[e]();
                }
                $(window).off("resize.umbBackdrop");
            });

            onInit();

        }

        var directive = {
            transclude: true,
            restrict: "E",
            replace: true,
            templateUrl: "views/components/application/umb-backdrop.html",
            link: link,
            scope: {
                backdropOpacity: "=?",
                highlightElement: "=?",
                highlightPreventClick: "=?",
                disableEventsOnClick: "=?"
            }
        };

        return directive;

    }

    angular.module("umbraco.directives").directive("umbBackdrop", BackdropDirective);

})();


text:
package com.cineplex.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;

import com.cineplex.util.MyToString;

/**
 * manager entity
 * @author Andy 1993sj19993@gmail.com
 * @date 2015年1月30日 下午1:31:39
 *
 */

@Entity
public class Manager {
	/**
	 * the id of the manager
	 */
	private int id;
	/**
	 * the login account of the manager
	 */
	private String account;
	/**
	 * the password of the account
	 */
	private String password;

	@Column(name = "id", length = 20, nullable = false)
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	@Id
	@Column(name = "account", nullable = false)
	public String getAccount() {
		return account;
	}

	public void setAccount(String account) {
		this.account = account;
	}

	@Column(name = "password", nullable = false)
	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return MyToString.getString(this);
	}
}


text:
* animated with static velocities and timestamp
* waves by altering sizes of points
* getting feel for interleaved arrays
* size rather than colour looks pretty cool


text:
layout: page
title: Projects
permalink: /projects/
---

  * [Stochastic modelling for hydro]({% post_url 2016-08-07-project1 %})
  * [Variable selection problem and statistical prediction for an
  industrial reactor]({% post_url 2016-08-07-project2 %})
  * [Growth of nanoparticles for industrial production]({% post_url 2016-08-07-project3 %})
  * [Setting room capacities for safety]({% post_url 2016-08-07-project4 %})
  * [Modelling the performance of rechargable Li-Ion batteries]({% post_url 2016-08-07-project5 %})
  * [Modelling and optimisation of traffic light systems]({% post_url 2016-08-07-project6 %})


text:
/*
 * L.TileLayer is used for standard xyz-numbered tile layers.
 */

L.TileLayer = L.Class.extend({
	includes: L.Mixin.Events,

	options: {
		minZoom: 0,
		maxZoom: 18,
		tileSize: 256,
		subdomains: 'abc',
		errorTileUrl: '',
		attribution: '',
		zoomOffset: 0,
		opacity: 1,
		/* (undefined works too)
		zIndex: null,
		tms: false,
		continuousWorld: false,
		noWrap: false,
		zoomReverse: false,
		detectRetina: false,
		reuseTiles: false,
		bounds: false,
		*/
		unloadInvisibleTiles: L.Browser.mobile,
		updateWhenIdle: L.Browser.mobile
	},

	initialize: function (url, options) {
		options = L.setOptions(this, options);

		// detecting retina displays, adjusting tileSize and zoom levels
		if (options.detectRetina && L.Browser.retina && options.maxZoom > 0) {

			options.tileSize = Math.floor(options.tileSize / 2);
			options.zoomOffset++;

			if (options.minZoom > 0) {
				options.minZoom--;
			}
			this.options.maxZoom--;
		}

		if (options.bounds) {
			options.bounds = L.latLngBounds(options.bounds);
		}

		this._url = url;

		var subdomains = this.options.subdomains;

		if (typeof subdomains === 'string') {
			this.options.subdomains = subdomains.split('');
		}
	},

	onAdd: function (map) {
		this._map = map;
		this._animated = map._zoomAnimated;

		// create a container div for tiles
		this._initContainer();

		// create an image to clone for tiles
		this._createTileProto();

		// set up events
		map.on({
			'viewreset': this._reset,
			'moveend': this._update
		}, this);

		if (this._animated) {
			map.on({
				'zoomanim': this._animateZoom,
				'zoomend': this._endZoomAnim
			}, this);
		}

		if (!this.options.updateWhenIdle) {
			this._limitedUpdate = L.Util.limitExecByInterval(this._update, 150, this);
			map.on('move', this._limitedUpdate, this);
		}

		this._reset();
		this._update();
	},

	addTo: function (map) {
		map.addLayer(this);
		return this;
	},

	onRemove: function (map) {
		this._container.parentNode.removeChild(this._container);

		map.off({
			'viewreset': this._reset,
			'moveend': this._update
		}, this);

		if (this._animated) {
			map.off({
				'zoomanim': this._animateZoom,
				'zoomend': this._endZoomAnim
			}, this);
		}

		if (!this.options.updateWhenIdle) {
			map.off('move', this._limitedUpdate, this);
		}

		this._container = null;
		this._map = null;
	},

	bringToFront: function () {
		var pane = this._map._panes.tilePane;

		if (this._container) {
			pane.appendChild(this._container);
			this._setAutoZIndex(pane, Math.max);
		}

		return this;
	},

	bringToBack: function () {
		var pane = this._map._panes.tilePane;

		if (this._container) {
			pane.insertBefore(this._container, pane.firstChild);
			this._setAutoZIndex(pane, Math.min);
		}

		return this;
	},

	getAttribution: function () {
		return this.options.attribution;
	},

	getContainer: function () {
		return this._container;
	},

	setOpacity: function (opacity) {
		this.options.opacity = opacity;

		if (this._map) {
			this._updateOpacity();
		}

		return this;
	},

	setZIndex: function (zIndex) {
		this.options.zIndex = zIndex;
		this._updateZIndex();

		return this;
	},

	setUrl: function (url, noRedraw) {
		this._url = url;

		if (!noRedraw) {
			this.redraw();
		}

		return this;
	},

	redraw: function () {
		if (this._map) {
			this._reset({hard: true});
			this._update();
		}
		return this;
	},

	_updateZIndex: function () {
		if (this._container && this.options.zIndex !== undefined) {
			this._container.style.zIndex = this.options.zIndex;
		}
	},

	_setAutoZIndex: function (pane, compare) {

		var layers = pane.children,
		    edgeZIndex = -compare(Infinity, -Infinity), // -Infinity for max, Infinity for min
		    zIndex, i, len;

		for (i = 0, len = layers.length; i < len; i++) {

			if (layers[i] !== this._container) {
				zIndex = parseInt(layers[i].style.zIndex, 10);

				if (!isNaN(zIndex)) {
					edgeZIndex = compare(edgeZIndex, zIndex);
				}
			}
		}

		this.options.zIndex = this._container.style.zIndex =
		        (isFinite(edgeZIndex) ? edgeZIndex : 0) + compare(1, -1);
	},

	_updateOpacity: function () {
		var i,
		    tiles = this._tiles;

		if (L.Browser.ielt9) {
			for (i in tiles) {
				L.DomUtil.setOpacity(tiles[i], this.options.opacity);
			}
		} else {
			L.DomUtil.setOpacity(this._container, this.options.opacity);
		}
	},

	_initContainer: function () {
		var tilePane = this._map._panes.tilePane;

		if (!this._container) {
			this._container = L.DomUtil.create('div', 'leaflet-layer');

			this._updateZIndex();

			if (this._animated) {
				var className = 'leaflet-tile-container leaflet-zoom-animated';

				this._bgBuffer = L.DomUtil.create('div', className, this._container);
				this._tileContainer = L.DomUtil.create('div', className, this._container);

			} else {
				this._tileContainer = this._container;
			}

			tilePane.appendChild(this._container);

			if (this.options.opacity < 1) {
				this._updateOpacity();
			}
		}
	},

	_reset: function (e) {
		for (var key in this._tiles) {
			this.fire('tileunload', {tile: this._tiles[key]});
		}

		this._tiles = {};
		this._tilesToLoad = 0;

		if (this.options.reuseTiles) {
			this._unusedTiles = [];
		}

		this._tileContainer.innerHTML = '';

		if (this._animated && e && e.hard) {
			this._clearBgBuffer();
		}

		this._initContainer();
	},

	_update: function () {

		if (!this._map) { return; }

		var bounds = this._map.getPixelBounds(),
		    zoom = this._map.getZoom(),
		    tileSize = this.options.tileSize;

		if (zoom > this.options.maxZoom || zoom < this.options.minZoom) {
			return;
		}

		var tileBounds = L.bounds(
		        bounds.min.divideBy(tileSize)._floor(),
		        bounds.max.divideBy(tileSize)._floor());

		this._addTilesFromCenterOut(tileBounds);

		if (this.options.unloadInvisibleTiles || this.options.reuseTiles) {
			this._removeOtherTiles(tileBounds);
		}
	},

	_addTilesFromCenterOut: function (bounds) {
		var queue = [],
		    center = bounds.getCenter();

		var j, i, point;

		for (j = bounds.min.y; j <= bounds.max.y; j++) {
			for (i = bounds.min.x; i <= bounds.max.x; i++) {
				point = new L.Point(i, j);

				if (this._tileShouldBeLoaded(point)) {
					queue.push(point);
				}
			}
		}

		var tilesToLoad = queue.length;

		if (tilesToLoad === 0) { return; }

		// load tiles in order of their distance to center
		queue.sort(function (a, b) {
			return a.distanceTo(center) - b.distanceTo(center);
		});

		var fragment = document.createDocumentFragment();

		// if its the first batch of tiles to load
		if (!this._tilesToLoad) {
			this.fire('loading');
		}

		this._tilesToLoad += tilesToLoad;

		for (i = 0; i < tilesToLoad; i++) {
			this._addTile(queue[i], fragment);
		}

		this._tileContainer.appendChild(fragment);
	},

	_tileShouldBeLoaded: function (tilePoint) {
		if ((tilePoint.x + ':' + tilePoint.y) in this._tiles) {
			return false; // already loaded
		}

		var options = this.options;

		if (!options.continuousWorld) {
			var limit = this._getWrapTileNum();

			// don't load if exceeds world bounds
			if ((options.noWrap && (tilePoint.x < 0 || tilePoint.x >= limit)) ||
				tilePoint.y < 0 || tilePoint.y >= limit) { return false; }
		}

		if (options.bounds) {
			var tileSize = options.tileSize,
			    nwPoint = tilePoint.multiplyBy(tileSize),
			    sePoint = nwPoint.add([tileSize, tileSize]),
			    nw = this._map.unproject(nwPoint),
			    se = this._map.unproject(sePoint);

			// TODO temporary hack, will be removed after refactoring projections
			// https://github.com/Leaflet/Leaflet/issues/1618
			if (!options.continuousWorld && !options.noWrap) {
				nw = nw.wrap();
				se = se.wrap();
			}

			if (!options.bounds.intersects([nw, se])) { return false; }
		}

		return true;
	},

	_removeOtherTiles: function (bounds) {
		var kArr, x, y, key;

		for (key in this._tiles) {
			kArr = key.split(':');
			x = parseInt(kArr[0], 10);
			y = parseInt(kArr[1], 10);

			// remove tile if it's out of bounds
			if (x < bounds.min.x || x > bounds.max.x || y < bounds.min.y || y > bounds.max.y) {
				this._removeTile(key);
			}
		}
	},

	_removeTile: function (key) {
		var tile = this._tiles[key];

		this.fire('tileunload', {tile: tile, url: tile.src});

		if (this.options.reuseTiles) {
			L.DomUtil.removeClass(tile, 'leaflet-tile-loaded');
			this._unusedTiles.push(tile);

		} else if (tile.parentNode === this._tileContainer) {
			this._tileContainer.removeChild(tile);
		}

		// for https://github.com/CloudMade/Leaflet/issues/137
		if (!L.Browser.android) {
			tile.onload = null;
			tile.src = L.Util.emptyImageUrl;
		}

		delete this._tiles[key];
	},

	_addTile: function (tilePoint, container) {
		var tilePos = this._getTilePos(tilePoint);

		// get unused tile - or create a new tile
		var tile = this._getTile();

		/*
		Chrome 20 layouts much faster with top/left (verify with timeline, frames)
		Android 4 browser has display issues with top/left and requires transform instead
		Android 2 browser requires top/left or tiles disappear on load or first drag
		(reappear after zoom) https://github.com/CloudMade/Leaflet/issues/866
		(other browsers don't currently care) - see debug/hacks/jitter.html for an example
		*/
		L.DomUtil.setPosition(tile, tilePos, L.Browser.chrome || L.Browser.android23);

		this._tiles[tilePoint.x + ':' + tilePoint.y] = tile;

		this._loadTile(tile, tilePoint);

		if (tile.parentNode !== this._tileContainer) {
			container.appendChild(tile);
		}
	},

	_getZoomForUrl: function () {

		var options = this.options,
		    zoom = this._map.getZoom();

		if (options.zoomReverse) {
			zoom = options.maxZoom - zoom;
		}

		return zoom + options.zoomOffset;
	},

	_getTilePos: function (tilePoint) {
		var origin = this._map.getPixelOrigin(),
		    tileSize = this.options.tileSize;

		return tilePoint.multiplyBy(tileSize).subtract(origin);
	},

	// image-specific code (override to implement e.g. Canvas or SVG tile layer)

	getTileUrl: function (tilePoint) {
		return L.Util.template(this._url, L.extend({
			s: this._getSubdomain(tilePoint),
			z: tilePoint.z,
			x: tilePoint.x,
			y: tilePoint.y
		}, this.options));
	},

	_getWrapTileNum: function () {
		// TODO refactor, limit is not valid for non-standard projections
		return Math.pow(2, this._getZoomForUrl());
	},

	_adjustTilePoint: function (tilePoint) {

		var limit = this._getWrapTileNum();

		// wrap tile coordinates
		if (!this.options.continuousWorld && !this.options.noWrap) {
			tilePoint.x = ((tilePoint.x % limit) + limit) % limit;
		}

		if (this.options.tms) {
			tilePoint.y = limit - tilePoint.y - 1;
		}

		tilePoint.z = this._getZoomForUrl();
	},

	_getSubdomain: function (tilePoint) {
		var index = Math.abs(tilePoint.x + tilePoint.y) % this.options.subdomains.length;
		return this.options.subdomains[index];
	},

	_createTileProto: function () {
		var img = this._tileImg = L.DomUtil.create('img', 'leaflet-tile');
		img.style.width = img.style.height = this.options.tileSize + 'px';
		img.galleryimg = 'no';
	},

	_getTile: function () {
		if (this.options.reuseTiles && this._unusedTiles.length > 0) {
			var tile = this._unusedTiles.pop();
			this._resetTile(tile);
			return tile;
		}
		return this._createTile();
	},

	// Override if data stored on a tile needs to be cleaned up before reuse
	_resetTile: function (/*tile*/) {},

	_createTile: function () {
		var tile = this._tileImg.cloneNode(false);
		tile.onselectstart = tile.onmousemove = L.Util.falseFn;

		if (L.Browser.ielt9 && this.options.opacity !== undefined) {
			L.DomUtil.setOpacity(tile, this.options.opacity);
		}
		return tile;
	},

	_loadTile: function (tile, tilePoint) {
		tile._layer  = this;
		tile.onload  = this._tileOnLoad;
		tile.onerror = this._tileOnError;

		this._adjustTilePoint(tilePoint);
		tile.src     = this.getTileUrl(tilePoint);
	},

	_tileLoaded: function () {
		this._tilesToLoad--;
		if (!this._tilesToLoad) {
			this.fire('load');

			if (this._animated) {
				// clear scaled tiles after all new tiles are loaded (for performance)
				clearTimeout(this._clearBgBufferTimer);
				this._clearBgBufferTimer = setTimeout(L.bind(this._clearBgBuffer, this), 500);
			}
		}
	},

	_tileOnLoad: function () {
		var layer = this._layer;

		//Only if we are loading an actual image
		if (this.src !== L.Util.emptyImageUrl) {
			L.DomUtil.addClass(this, 'leaflet-tile-loaded');

			layer.fire('tileload', {
				tile: this,
				url: this.src
			});
		}

		layer._tileLoaded();
	},

	_tileOnError: function () {
		var layer = this._layer;

		layer.fire('tileerror', {
			tile: this,
			url: this.src
		});

		var newUrl = layer.options.errorTileUrl;
		if (newUrl) {
			this.src = newUrl;
		}

		layer._tileLoaded();
	}
});

L.tileLayer = function (url, options) {
	return new L.TileLayer(url, options);
};


text:
package org.onosproject.kafkaintegration.impl;

import org.apache.felix.scr.annotations.Activate;
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Service;
import org.apache.felix.scr.annotations.Deactivate;
import org.apache.felix.scr.annotations.Reference;
import org.apache.felix.scr.annotations.ReferenceCardinality;
import org.onosproject.kafkaintegration.api.KafkaEventStorageService;
import org.onosproject.kafkaintegration.api.dto.OnosEvent;
import org.onosproject.store.serializers.KryoNamespaces;
import org.onosproject.store.service.Serializer;
import org.onosproject.store.service.StorageService;
import org.onosproject.store.service.Task;
import org.onosproject.store.service.WorkQueue;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;

@Component(immediate = false)
@Service
public class KafkaStorageManager implements KafkaEventStorageService {

    @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
    protected StorageService storageService;

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

    private static final String KAFKA_WORK_QUEUE = "Kafka-Work-Queue";

    private WorkQueue<OnosEvent> queue;

    @Activate
    protected void activate() {
        queue = storageService.<OnosEvent>getWorkQueue(KAFKA_WORK_QUEUE,
                                                       Serializer.using(KryoNamespaces.API,
                                                                        OnosEvent.class,
                                                                        OnosEvent.Type.class));

        log.info("Started");
    }

    @Deactivate
    protected void deactivate() {
        queue = null;
        log.info("Stopped");
    }

    @Override
    public void publishEvent(OnosEvent e) {
        queue.addOne(e);
        log.debug("Published {} Event to Distributed Work Queue", e.type());
    }

    @Override
    public OnosEvent consumeEvent() {
        Task<OnosEvent> task = null;

        CompletableFuture<Task<OnosEvent>> future = queue.take();
        try {
            task = future.get();
        } catch (InterruptedException e) {
            e.printStackTrace();
        } catch (ExecutionException e) {
            e.printStackTrace();
        }

        if (task != null) {
            queue.complete(task.taskId());
            log.debug("Consumed {} Event from Distributed Work Queue with id {}",
                     task.payload().type(), task.taskId());
            return task.payload();
        }

        return null;
    }

}


text:
Dado los siguientes esquemas de relaciones, se pide

*clientes(__cod_cli__,nomb_y_apellido,domicilio,localidad,saldo);*

*facturas(__nrofactura__,cliente,fecha);*

*detalles(__nrofactura,cod_art__,cantidad);*

*articulos(__cod_art__,descripcion,cod_rubro,stock,pto_reposicion,precio);*

*rubros(__cod_rubro__,nombre_del_rubro);*

```
a) listar datos de los clientes que hayan que hayan comprado articulos de los rubros 'Sanitarios' y 'Electricidad'
b) listar codigos de rubros, nomrbe_del_rubro y el total facturado por rubro, para aquellos rubros que hayan facturado mas de $9000 durante el mes de enero de 2015.
```


text:
import chai from 'chai'
import EventEmitter from '../../src/event-emitter'
import { mutable, Value } from '../../src/objects'

const should = chai.should()

describe('mutable', () => {
  it('should be a Value', () => {
    const Mutable = mutable(Number)
    const instance = new Mutable(5)
    instance.should.be.an.instanceof(Value)
  })

  it('should be an EventEmitter', () => {
    const Mutable = mutable(Number)
    const instance = new Mutable(5)
    instance.should.be.an.instanceof(EventEmitter)
  })

  it('should initialise and get a value', () => {
    const Mutable = mutable(Number)
    const instance = new Mutable(5)
    instance.get().should.equal(5)
  })

  it('should initialise to 0', () => {
    const Mutable = mutable(Number)
    const instance = new Mutable(0)
    instance.get().should.equal(0)
  })

  it('should initialise to ""', () => {
    const Mutable = mutable(String)
    const instance = new Mutable("")
    instance.get().should.equal("")
  })

  it('should initialise to the default if provided', () => {
    const Mutable = mutable(Number, { default: 10 })
    const instance = new Mutable()
    instance.get().should.equal(10)
  })

  it('should initialise to the default from a function if provided', () => {
    const Mutable = mutable(Number, { default: () => 10 })
    const instance = new Mutable()
    instance.get().should.equal(10)
  })

  it('should be able to set a value and should emit when set', () => {
    const Mutable = mutable(Number)
    const instance = new Mutable(5)
    let evtEmitted = void (0)
    let metaEmitted = void (0)
    instance.on('change', (evt, meta) => {
      evtEmitted = evt
      metaEmitted = meta
    })
    const meta = { cause: 'user' }
    instance.set(6, meta)
    instance.get().should.equal(6)
    evtEmitted.should.eql(6)
    metaEmitted.should.eql(meta)
  })

  it('should emit a serializable-change event', () => {
    const Mutable = mutable(Number)
    const instance = new Mutable(5)
    let evtEmitted = void (0)
    let metaEmitted = void (0)
    instance.on('serializable-change', (evt, meta) => {
      evtEmitted = evt
      metaEmitted = meta
    })
    const meta = { cause: 'user' }
    instance.set(6, meta)
    instance.get().should.equal(6)
    evtEmitted.should.eql(6)
    metaEmitted.should.eql(meta)
  })

  it('should not emit a serializable-change event if the mutable is not serializable', () => {
    const Mutable = mutable(Number, {serializable: false})
    const instance = new Mutable(5)
    let evtEmitted = void (0)
    instance.on('serializable-change', (evt) => {
      evtEmitted = evt
    })
    instance.set(6)
    should.not.exist(evtEmitted)
  })

  it('should not emit a change event the value does not change', () => {
    const Mutable = mutable(Number)
    const instance = new Mutable(5)
    let evtEmitted = void (0)
    instance.on('serializable-change', (evt) => {
      evtEmitted = evt
    })
    instance.set(5)
    should.not.exist(evtEmitted)
  })

  it('should default to something sensible for a String', () => {
    const Mutable = mutable(String)
    const instance = new Mutable()
    instance.get().should.equal("")
  })

  it('should default to something sensible for a Number', () => {
    const Mutable = mutable(Number)
    const instance = new Mutable()
    instance.get().should.equal(0)
  })

  it('should default to something sensible for a Boolean', () => {
    const Mutable = mutable(Boolean)
    const instance = new Mutable()
    instance.get().should.equal(false)
  })

  it('should serialize correctly', () => {
    const Mutable = mutable(Number)
    const instance = new Mutable(5)
    instance.serialize().should.equal(5)
  })

  it('should throw an error when trying to serialize an unserializable', () => {
    const Mutable = mutable(Number, {serializable: false})
    const instance = new Mutable(5)
    should.throw(() => instance.serialize())
  })

  it('should map to a new Value', () => {
    const Mutable = mutable(Number)
    const instance = new Mutable(5)
    instance.map(x => x * 2).get().should.equal(10)
    instance.map(x => x * 2).serialize().should.equal(10)
  })

  it('should not be serializable after mapping if the original value was not serializable', () => {
    const Mutable = mutable(Number, {serializable: false})
    const instance = new Mutable(5)
    instance.map(x => x * 2).get().should.equal(10)
    should.throw(() => instance.map(x => x * 2).serialize())
  })

  it('should emit change events for mapped values', () => {
    const Mutable = mutable(Number)
    const instance = new Mutable(5)
    const mapped = instance.map(x => x * 2)

    let evtEmitted = void (0)
    let metaEmitted = void (0)

    mapped.on('change', (evt, meta) => {
      evtEmitted = evt
      metaEmitted = meta
    })

    const meta = { cause: 'user' }
    instance.set(3, meta)

    evtEmitted.should.eql(6)
    metaEmitted.should.eql(meta)
  })

  it('should emit serializable-change events for mapped values', () => {
    const Mutable = mutable(Number)
    const instance = new Mutable(5)
    const mapped = instance.map(x => x * 2)

    let evtEmitted = void (0)
    let metaEmitted = void (0)

    mapped.on('serializable-change', (evt, meta) => {
      evtEmitted = evt
      metaEmitted = meta
    })

    const meta = { cause: 'user' }
    instance.set(3, meta)

    evtEmitted.should.eql(6)
    metaEmitted.should.eql(meta)
  })

  it('should not emit serializable-change events for mapped values if the original value was not serializable', () => {
    const Mutable = mutable(Number, {serializable: false})
    const instance = new Mutable(5)
    const mapped = instance.map(x => x * 2)

    let called = false
    mapped.on('serializable-change', () => {
      called = true
    })

    instance.set(3)
    called.should.equal(false)
  })

  it('should throw an error when trying to assign to a mapped value', () => {
    const Mutable = mutable(Number)
    const instance = new Mutable(5)
    const mapped = instance.map(x => x * 2)
    should.throw(() => mapped.set(50))
  })
})

export default {}


text:
test_description='git rebase --onto A...B'

. ./test-lib.sh
. "$TEST_DIRECTORY/lib-rebase.sh"

# Rebase only the tip commit of "topic" on merge base between "master"
# and "topic".  Cannot do this for "side" with "master" because there
# is no single merge base.
#
#
#	    F---G topic                             G'
#	   /                                       /
# A---B---C---D---E master      -->       A---B---C---D---E
#      \   \ /
#	\   x
#	 \ / \
#	  H---I---J---K side

test_expect_success setup '
	test_commit A &&
	test_commit B &&
	git branch side &&
	test_commit C &&
	git branch topic &&
	git checkout side &&
	test_commit H &&
	git checkout master &&
	test_tick &&
	git merge H &&
	git tag D &&
	test_commit E &&
	git checkout topic &&
	test_commit F &&
	test_commit G &&
	git checkout side &&
	test_tick &&
	git merge C &&
	git tag I &&
	test_commit J &&
	test_commit K
'

test_expect_success 'rebase --onto master...topic' '
	git reset --hard &&
	git checkout topic &&
	git reset --hard G &&

	git rebase --onto master...topic F &&
	git rev-parse HEAD^1 >actual &&
	git rev-parse C^0 >expect &&
	test_cmp expect actual
'

test_expect_success 'rebase --onto master...' '
	git reset --hard &&
	git checkout topic &&
	git reset --hard G &&

	git rebase --onto master... F &&
	git rev-parse HEAD^1 >actual &&
	git rev-parse C^0 >expect &&
	test_cmp expect actual
'

test_expect_success 'rebase --onto master...side' '
	git reset --hard &&
	git checkout side &&
	git reset --hard K &&

	test_must_fail git rebase --onto master...side J
'

test_expect_success 'rebase -i --onto master...topic' '
	git reset --hard &&
	git checkout topic &&
	git reset --hard G &&
	set_fake_editor &&
	EXPECT_COUNT=1 git rebase -i --onto master...topic F &&
	git rev-parse HEAD^1 >actual &&
	git rev-parse C^0 >expect &&
	test_cmp expect actual
'

test_expect_success 'rebase -i --onto master...' '
	git reset --hard &&
	git checkout topic &&
	git reset --hard G &&
	set_fake_editor &&
	EXPECT_COUNT=1 git rebase -i --onto master... F &&
	git rev-parse HEAD^1 >actual &&
	git rev-parse C^0 >expect &&
	test_cmp expect actual
'

test_expect_success 'rebase -i --onto master...side' '
	git reset --hard &&
	git checkout side &&
	git reset --hard K &&

	test_must_fail git rebase -i --onto master...side J
'

test_done


text:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.guyz.glauncherbeta" >

    <application
        android:allowBackup="true"
		android:label="GLauncher"
        android:theme="@style/AppTheme"
		android:resizeableActivity = "true"
		android:hardwareAccelerated="true">
        <activity
            android:name=".MainActivity"
            android:label="GLauncher"
			android:theme="@android:style/Theme.Holo.Wallpaper"
			android:launchMode="singleTask"
			android:stateNotNeeded="true">
			<!--
				<category android.name="...Home <= Make it becomes a launcher app
			-->
			<intent-filter>
				<action android:name="android.intent.action.MAIN" />
				<category android:name="android.intent.category.LAUNCHER" />
				<category android:name="android.intent.category.HOME" />
				<category android:name="android.intent.category.DEFAULT" />
			</intent-filter>
        </activity>
    </application>

</manifest>


text:
/* global Handlebars */

(function(OC) {
	var TEMPLATE =
		'<input class="systemTagsInputField" type="hidden" name="tags" value=""/>';

	var RESULT_TEMPLATE =
		'' +
		'    ' +
		'{{#if isAdmin}}' +
		'    {{{tagMarkup}}}' +
		'{{else}}' +
		'    {{name}}' +
		'{{/if}}' +
		'{{#allowActions}}' +
		'    ' +
		'        ' +
		'    ' +
		'{{/allowActions}}' +
		'';

	var SELECTION_TEMPLATE =
		'{{#if isAdmin}}' +
		'    {{{tagMarkup}}}' +
		'{{else}}' +
		'    {{name}}' +
		'{{/if}}';

	var RENAME_FORM_TEMPLATE =
		'<form class="systemtags-rename-form">' +
		'    {{renameLabel}}' +
		'    <input id="{{cid}}-rename-input" type="text" value="{{name}}">' +
		'    ' +
		'</form>';

	/**
	 * @class OC.SystemTags.SystemTagsInputField
	 * @classdesc
	 *
	 * Displays a file's system tags
	 *
	 */
	var SystemTagsInputField = OC.Backbone.View.extend(
		/** @lends OC.SystemTags.SystemTagsInputField.prototype */ {

		_rendered: false,

		_newTag: null,

		className: 'systemTagsInputFieldContainer',

		template: function(data) {
			if (!this._template) {
				this._template = Handlebars.compile(TEMPLATE);
			}
			return this._template(data);
		},

		/**
		 * Creates a new SystemTagsInputField
		 *
		 * @param {Object} [options]
		 * @param {string} [options.objectType=files] object type for which tags are assigned to
		 * @param {bool} [options.multiple=false] whether to allow selecting multiple tags
		 * @param {bool} [options.allowActions=true] whether tags can be renamed/delete within the dropdown
		 * @param {bool} [options.allowCreate=true] whether new tags can be created
		 * @param {bool} [options.isAdmin=true] whether the user is an administrator
		 * @param {Function} options.initSelection function to convert selection to data
		 */
		initialize: function(options) {
			options = options || {};

			this._multiple = !!options.multiple;
			this._allowActions = _.isUndefined(options.allowActions) || !!options.allowActions;
			this._allowCreate = _.isUndefined(options.allowCreate) || !!options.allowCreate;
			this._isAdmin = !!options.isAdmin;

			if (_.isFunction(options.initSelection)) {
				this._initSelection = options.initSelection;
			}

			this.collection = options.collection || OC.SystemTags.collection;

			var self = this;
			this.collection.on('change:name remove', function() {
				// refresh selection
				_.defer(self._refreshSelection);
			});

			_.bindAll(
				this,
				'_refreshSelection',
				'_onClickRenameTag',
				'_onClickDeleteTag',
				'_onSelectTag',
				'_onDeselectTag',
				'_onSubmitRenameTag'
			);
		},

		/**
		 * Refreshes the selection, triggering a call to
		 * select2's initSelection
		 */
		_refreshSelection: function() {
			this.$tagsField.select2('val', this.$tagsField.val());
		},

		/**
		 * Event handler whenever the user clicked the "rename" action.
		 * This will display the rename field.
		 */
		_onClickRenameTag: function(ev) {
			var $item = $(ev.target).closest('.systemtags-item');
			var tagId = $item.attr('data-id');
			var tagModel = this.collection.get(tagId);
			if (!this._renameFormTemplate) {
				this._renameFormTemplate = Handlebars.compile(RENAME_FORM_TEMPLATE);
			}

			var oldName = tagModel.get('name');
			var $renameForm = $(this._renameFormTemplate({
				cid: this.cid,
				name: oldName,
				deleteTooltip: t('core', 'Delete'),
				renameLabel: t('core', 'Rename')
			}));
			$item.find('.label').after($renameForm);
			$item.find('.label, .systemtags-actions').addClass('hidden');
			$item.closest('.select2-result').addClass('has-form');

			$renameForm.find('[title]').tooltip({
				placement: 'bottom',
				container: 'body'
			});
			$renameForm.find('input').focus().selectRange(0, oldName.length);
			return false;
		},

		/**
		 * Event handler whenever the rename form has been submitted after
		 * the user entered a new tag name.
		 * This will submit the change to the server.
		 *
		 * @param {Object} ev event
		 */
		_onSubmitRenameTag: function(ev) {
			ev.preventDefault();
			var $form = $(ev.target);
			var $item = $form.closest('.systemtags-item');
			var tagId = $item.attr('data-id');
			var tagModel = this.collection.get(tagId);
			var newName = $(ev.target).find('input').val().trim();
			if (newName && newName !== tagModel.get('name')) {
				tagModel.save({'name': newName});
				// TODO: spinner, and only change text after finished saving
				$item.find('.label').text(newName);
			}
			$item.find('.label, .systemtags-actions').removeClass('hidden');
			$form.remove();
			$item.closest('.select2-result').removeClass('has-form');
		},

		/**
		 * Event handler whenever a tag must be deleted
		 *
		 * @param {Object} ev event
		 */
		_onClickDeleteTag: function(ev) {
			var $item = $(ev.target).closest('.systemtags-item');
			var tagId = $item.attr('data-id');
			this.collection.get(tagId).destroy();
			$item.closest('.select2-result').remove();
			// TODO: spinner
			return false;
		},

		_addToSelect2Selection: function(selection) {
			var data = this.$tagsField.select2('data');
			data.push(selection);
			this.$tagsField.select2('data', data);
		},

		/**
		 * Event handler whenever a tag is selected.
		 * Also called whenever tag creation is requested through the dummy tag object.
		 *
		 * @param {Object} e event
		 */
		_onSelectTag: function(e) {
			var self = this;
			var tag;
			if (e.object && e.object.isNew) {
				// newly created tag, check if existing
				// create a new tag
				tag = this.collection.create({
					name: e.object.name.trim(),
					userVisible: true,
					userAssignable: true,
					userEditable: true,
					canAssign: true
				}, {
					success: function(model) {
						self._addToSelect2Selection(model.toJSON());
						self.trigger('select', model);
					},
					error: function(model, xhr) {
						if (xhr.status === 409) {
							// re-fetch collection to get the missing tag
							self.collection.reset();
							self.collection.fetch({
								success: function(collection) {
									// find the tag in the collection
									var model = collection.where({name: e.object.name.trim(), userVisible: true, userAssignable: true});
									if (model.length) {
										model = model[0];
										// the tag already exists or was already assigned,
										// add it to the list anyway
										self._addToSelect2Selection(model.toJSON());
										self.trigger('select', model);
									}
								}
							});
						}
					}
				});
				this.$tagsField.select2('close');
				e.preventDefault();
				return false;
			} else {
				tag = this.collection.get(e.object.id);
			}
			this._newTag = null;
			this.trigger('select', tag);
		},

		/**
		 * Event handler whenever a tag gets deselected.
		 *
		 * @param {Object} e event
		 */
		_onDeselectTag: function(e) {
			this.trigger('deselect', e.choice.id);
		},

		/**
		 * Autocomplete function for dropdown results
		 *
		 * @param {Object} query select2 query object
		 */
		_queryTagsAutocomplete: function(query) {
			var self = this;
			this.collection.fetch({
				success: function(collection) {
					var tagModels = collection.filterByName(query.term.trim());
					if (!self._isAdmin) {
						tagModels = _.filter(tagModels, function(tagModel) {
							return tagModel.get('canAssign');
						});
					}
					query.callback({
						results: _.invoke(tagModels, 'toJSON')
					});
				}
			});
		},

		_preventDefault: function(e) {
			e.stopPropagation();
		},

		/**
		 * Returns true if tag is static tag else false
		 *
		 * @param data
		 * @returns {boolean}
		 */
		_isStaticTag: function(data) {
			return data.userEditable === false && data.userAssignable === true;
		},

		/**
		 * Formats a single dropdown result
		 *
		 * @param {Object} data data to format
		 * @return {string} HTML markup
		 */
		_formatDropDownResult: function(data) {
			if (!this._resultTemplate) {
				this._resultTemplate = Handlebars.compile(RESULT_TEMPLATE);
			}

			/**
			 * Static tags are shown if the user belongs to group which is
			 * whitelisted in the tag. Else the tag is not seen. If the tag
			 * is visible, then no edit options are availbe to users. Admin user
			 * is the only exception here. Admin user can edit, delete, assign or
			 * unassign the tag.
			 *
			 */
			this._allowActions = true;
			if (data.editableInGroup === false && this._isStaticTag(data)) {
				//No need to show the static tag as it is not viewable for the user
				return;
			}
			if (this._isStaticTag(data)) {
				//Show the name of the static tag, rename and delete actions are forbidden for the user
				this._allowActions = false;
			}

			return this._resultTemplate(_.extend({
				renameTooltip: t('core', 'Rename'),
				allowActions: this._allowActions,
				tagMarkup: this._isAdmin ? OC.SystemTags.getDescriptiveTag(data)[0].innerHTML : null,
				isAdmin: this._isAdmin
			}, data));
		},

		/**
		 * Formats a single selection item
		 *
		 * @param {Object} data data to format
		 * @return {string} HTML markup
		 */
		_formatSelection: function(data) {
			if (!this._selectionTemplate) {
				this._selectionTemplate = Handlebars.compile(SELECTION_TEMPLATE);
			}
			return this._selectionTemplate(_.extend({
				tagMarkup: this._isAdmin ? OC.SystemTags.getDescriptiveTag(data)[0].innerHTML : null,
				isAdmin: this._isAdmin
			}, data));
		},

		/**
		 * Create new dummy choice for select2 when the user
		 * types an arbitrary string
		 *
		 * @param {string} term entered term
		 * @return {Object} dummy tag
		 */
		_createSearchChoice: function(term) {
			term = term.trim();
			if (this.collection.filter(function(entry) {
					return entry.get('name') === term;
				}).length) {
				return;
			}
			if (!this._newTag) {
				this._newTag = {
					id: -1,
					name: term,
					userAssignable: true,
					userVisible: true,
					canAssign: true,
					isNew: true
				};
			} else {
				this._newTag.name = term;
			}

			return this._newTag;
		},

		_initSelection: function(element, callback) {
			var self = this;
			var ids = $(element).val().split(',');

			function modelToSelection(model) {
				var data = model.toJSON();
				if (!self._isAdmin && !data.canAssign) {
					// lock static tags for non-admins
					data.locked = true;
				}
				return data;
			}

			function findSelectedObjects(ids) {
				var selectedModels = self.collection.filter(function(model) {
					return ids.indexOf(model.id) >= 0 && (self._isAdmin || model.get('userVisible'));
				});
				return _.map(selectedModels, modelToSelection);
			}

			this.collection.fetch({
				success: function() {
					callback(findSelectedObjects(ids));
				}
			});
		},

		/**
		 * Renders this details view
		 */
		render: function() {
			var self = this;
			this.$el.html(this.template());

			this.$el.find('[title]').tooltip({placement: 'bottom'});
			this.$tagsField = this.$el.find('[name=tags]');
			this.$tagsField.select2({
				placeholder: t('core', 'Collaborative tags'),
				containerCssClass: 'systemtags-select2-container',
				dropdownCssClass: 'systemtags-select2-dropdown',
				closeOnSelect: false,
				allowClear: false,
				multiple: this._multiple,
				toggleSelect: this._multiple,
				query: _.bind(this._queryTagsAutocomplete, this),
				id: function(tag) {
					return tag.id;
				},
				initSelection: _.bind(this._initSelection, this),
				formatResult: _.bind(this._formatDropDownResult, this),
				formatSelection: _.bind(this._formatSelection, this),
				createSearchChoice: this._allowCreate ? _.bind(this._createSearchChoice, this) : undefined,
				sortResults: function(results) {
					var selectedItems = _.pluck(self.$tagsField.select2('data'), 'id');
					results.sort(function(a, b) {
						var aSelected = selectedItems.indexOf(a.id) >= 0;
						var bSelected = selectedItems.indexOf(b.id) >= 0;
						if (aSelected === bSelected) {
							return OC.Util.naturalSortCompare(a.name, b.name);
						}
						if (aSelected && !bSelected) {
							return -1;
						}
						return 1;
					});
					return results;
				}
			})
				.on('select2-selecting', this._onSelectTag)
				.on('select2-removing', this._onDeselectTag);

			var $dropDown = this.$tagsField.select2('dropdown');
			// register events for inside the dropdown
			$dropDown.on('mouseup', '.rename', this._onClickRenameTag);
			$dropDown.on('mouseup', '.delete', this._onClickDeleteTag);
			$dropDown.on('mouseup', '.select2-result-selectable.has-form', this._preventDefault);
			$dropDown.on('submit', '.systemtags-rename-form', this._onSubmitRenameTag);

			this.delegateEvents();
		},

		remove: function() {
			if (this.$tagsField) {
				this.$tagsField.select2('destroy');
			}
		},

		getValues: function() {
			this.$tagsField.select2('val');
		},

		setValues: function(values) {
			this.$tagsField.select2('val', values);
		},

		setData: function(data) {
			this.$tagsField.select2('data', data);
		}
	});

	OC.SystemTags = OC.SystemTags || {};
	OC.SystemTags.SystemTagsInputField = SystemTagsInputField;

})(OC);


text:
class FeaturePromoBubbleView;

namespace feature_engagement {

// The IncognitoWindowTracker provides a backend for displaying in-product help
// for the incognito window. IncognitoWindowTracker is the interface through
// which the event constants for the IncognitoWindow feature can be be altered.
// Once all of the event constants are met, IncognitoWindowTracker calls for the
// IncognitoWindowPromo to be shown, along with recording when the
// IncognitoWindowPromo is dismissed. The requirements to show the
// IncognitoWindowPromo are as follows:
//
// - At least two hours of observed session time have elapsed.
// - The user has never opened incognito window through any means.
// - The user has cleared browsing data.
class IncognitoWindowTracker : public FeatureTracker,
                               public views::WidgetObserver {
 public:
  explicit IncognitoWindowTracker(Profile* profile);

  // Alerts the incognito window tracker that an incognito window was opened.
  void OnIncognitoWindowOpened();
  // Alerts the incognito window tracker that browsing history was deleted.
  void OnBrowsingDataCleared();
  // Clears the flag for whether there is any in-product help being displayed.
  void OnPromoClosed();
  // Shows |incognito_promo_|.
  void ShowPromo();

 protected:
  ~IncognitoWindowTracker() override;

 private:
  FRIEND_TEST_ALL_PREFIXES(IncognitoWindowTrackerBrowserTest, ShowPromo);
  FRIEND_TEST_ALL_PREFIXES(IncognitoWindowTrackerEventTest,
                           TestOnSessionTimeMet);
  FRIEND_TEST_ALL_PREFIXES(IncognitoWindowTrackerTest, TestShouldNotShowPromo);
  FRIEND_TEST_ALL_PREFIXES(IncognitoWindowTrackerTest, TestShouldShowPromo);

  // views::WidgetObserver:
  void OnWidgetDestroying(views::Widget* widget) override;

  FeaturePromoBubbleView* incognito_promo() { return incognito_promo_; }

  // FeatureTracker:
  void OnSessionTimeMet() override;

  // Promotional UI that appears next to the AppMenuButton and encourages its
  // use. Owned by its NativeWidget.
  FeaturePromoBubbleView* incognito_promo_ = nullptr;

  // Observes the |incognito_promo_|'s Widget. Used to tell whether the promo
  // is open and is called back when it closes.
  ScopedObserver<views::Widget, WidgetObserver> incognito_promo_observer_;

  DISALLOW_COPY_AND_ASSIGN(IncognitoWindowTracker);
};

}  // namespace feature_engagement

#endif  // CHROME_BROWSER_FEATURE_ENGAGEMENT_INCOGNITO_WINDOW_INCOGNITO_WINDOW_TRACKER_H_


text:
' Licensed to the .NET Foundation under one or more agreements.
' The .NET Foundation licenses this file to you under the MIT license.
' See the LICENSE file in the project root for more information.

Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.UnitTests.Recommendations.Declarations
    Public Class AttributeScopeKeywordRecommenderTests
        <Fact>
        <Trait(Traits.Feature, Traits.Features.KeywordRecommending)>
        Public Async Function AttributeScopesInFileTest() As Task
            Await VerifyRecommendationsContainAsync(<File><|</File>, "Assembly", "Module")
        End Function

        <Fact>
        <Trait(Traits.Feature, Traits.Features.KeywordRecommending)>
        Public Async Function AttributeScopesInFileAfterImportsTest() As Task
            Await VerifyRecommendationsContainAsync(<File>
Imports Goo
<|</File>, "Assembly", "Module")
        End Function

        <Fact>
        <Trait(Traits.Feature, Traits.Features.KeywordRecommending)>
        Public Async Function AttributeScopesInFileBeforeClassTest() As Task
            Await VerifyRecommendationsContainAsync(<File>
<|
Class Goo
End Class</File>, "Assembly", "Module")
        End Function

        <Fact>
        <Trait(Traits.Feature, Traits.Features.KeywordRecommending)>
        Public Async Function AttributeScopesInFileInsideClassTest() As Task
            Await VerifyRecommendationsAreExactlyAsync(<File>
Class Goo
<|
End Class</File>, {"Global"})
        End Function

        <WorkItem(542207, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/542207")>
        <Fact>
        <Trait(Traits.Feature, Traits.Features.KeywordRecommending)>
        Public Async Function AttributeScopesInFileAtStartOfMalformedAttributeTest() As Task
            Await VerifyRecommendationsContainAsync(<File><![CDATA[<|Assembly: AssemblyDelaySignAttribute(True)>]]></File>,
                                         "Assembly", "Module")
        End Function

        <Fact>
        <Trait(Traits.Feature, Traits.Features.KeywordRecommending)>
        Public Async Function AttributeScopesAtEndOfFileTest() As Task
            Await VerifyRecommendationsContainAsync(<File>
Class goo
End Class
<|
</File>, "Assembly", "Module")
        End Function

        <WorkItem(530953, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/530953")>
        <Fact, Trait(Traits.Feature, Traits.Features.KeywordRecommending)>
        Public Async Function AttributeScopesAfterEolTest() As Task
            Await VerifyRecommendationsContainAsync(<File>
Class goo
End Class
<
|
</File>, "Assembly", "Module")
        End Function
    End Class
End Namespace


text:
layout: nav/section
section: Conduct a content audit
---


text:
package com.aspose.cells.model;

import java.util.*;
import com.aspose.cells.model.Color;
import com.aspose.cells.model.LinkElement;
public class Worksheet {
  private List<Link> Links = new ArrayList<Link>();
  private Boolean DisplayRightToLeft = null;
  private Boolean DisplayZeros = null;
  private Integer FirstVisibleColumn = null;
  private Integer FirstVisibleRow = null;
  private String Name = null;
  private Integer Index = null;
  private Boolean IsGridlinesVisible = null;
  private Boolean IsOutlineShown = null;
  private Boolean IsPageBreakPreview = null;
  private Boolean IsVisible = null;
  private Boolean IsProtected = null;
  private Boolean IsRowColumnHeadersVisible = null;
  private Boolean IsRulerVisible = null;
  private Boolean IsSelected = null;
  private Color TabColor = null;
  private Boolean TransitionEntry = null;
  private Boolean TransitionEvaluation = null;
  private String Type = null;
  private String ViewType = null;
  private String VisibilityType = null;
  private Integer Zoom = null;
  private LinkElement Cells = null;
  private LinkElement Charts = null;
  private LinkElement AutoShapes = null;
  private LinkElement OleObjects = null;
  private LinkElement Comments = null;
  private LinkElement Pictures = null;
  private LinkElement MergedCells = null;
  private LinkElement Validations = null;
  private LinkElement ConditionalFormattings = null;
  private LinkElement Hyperlinks = null;
  /**
	 * getLinks
	 * Gets List<Link>
	 * @return Links
	 */
  public List<Link> getLinks() {
    return Links;
  }

	/**
	 * setLinks
	 * Sets List<Link>
	 * @param Links List<Link>
	 */
  public void setLinks(List<Link> Links) {
    this.Links = Links;
  }

  /**
	 * getDisplayRightToLeft
	 * Gets Boolean
	 * @return DisplayRightToLeft
	 */
  public Boolean getDisplayRightToLeft() {
    return DisplayRightToLeft;
  }

	/**
	 * setDisplayRightToLeft
	 * Sets Boolean
	 * @param DisplayRightToLeft Boolean
	 */
  public void setDisplayRightToLeft(Boolean DisplayRightToLeft) {
    this.DisplayRightToLeft = DisplayRightToLeft;
  }

  /**
	 * getDisplayZeros
	 * Gets Boolean
	 * @return DisplayZeros
	 */
  public Boolean getDisplayZeros() {
    return DisplayZeros;
  }

	/**
	 * setDisplayZeros
	 * Sets Boolean
	 * @param DisplayZeros Boolean
	 */
  public void setDisplayZeros(Boolean DisplayZeros) {
    this.DisplayZeros = DisplayZeros;
  }

  /**
	 * getFirstVisibleColumn
	 * Gets Integer
	 * @return FirstVisibleColumn
	 */
  public Integer getFirstVisibleColumn() {
    return FirstVisibleColumn;
  }

	/**
	 * setFirstVisibleColumn
	 * Sets Integer
	 * @param FirstVisibleColumn Integer
	 */
  public void setFirstVisibleColumn(Integer FirstVisibleColumn) {
    this.FirstVisibleColumn = FirstVisibleColumn;
  }

  /**
	 * getFirstVisibleRow
	 * Gets Integer
	 * @return FirstVisibleRow
	 */
  public Integer getFirstVisibleRow() {
    return FirstVisibleRow;
  }

	/**
	 * setFirstVisibleRow
	 * Sets Integer
	 * @param FirstVisibleRow Integer
	 */
  public void setFirstVisibleRow(Integer FirstVisibleRow) {
    this.FirstVisibleRow = FirstVisibleRow;
  }

  /**
	 * getName
	 * Gets String
	 * @return Name
	 */
  public String getName() {
    return Name;
  }

	/**
	 * setName
	 * Sets String
	 * @param Name String
	 */
  public void setName(String Name) {
    this.Name = Name;
  }

  /**
	 * getIndex
	 * Gets Integer
	 * @return Index
	 */
  public Integer getIndex() {
    return Index;
  }

	/**
	 * setIndex
	 * Sets Integer
	 * @param Index Integer
	 */
  public void setIndex(Integer Index) {
    this.Index = Index;
  }

  /**
	 * getIsGridlinesVisible
	 * Gets Boolean
	 * @return IsGridlinesVisible
	 */
  public Boolean getIsGridlinesVisible() {
    return IsGridlinesVisible;
  }

	/**
	 * setIsGridlinesVisible
	 * Sets Boolean
	 * @param IsGridlinesVisible Boolean
	 */
  public void setIsGridlinesVisible(Boolean IsGridlinesVisible) {
    this.IsGridlinesVisible = IsGridlinesVisible;
  }

  /**
	 * getIsOutlineShown
	 * Gets Boolean
	 * @return IsOutlineShown
	 */
  public Boolean getIsOutlineShown() {
    return IsOutlineShown;
  }

	/**
	 * setIsOutlineShown
	 * Sets Boolean
	 * @param IsOutlineShown Boolean
	 */
  public void setIsOutlineShown(Boolean IsOutlineShown) {
    this.IsOutlineShown = IsOutlineShown;
  }

  /**
	 * getIsPageBreakPreview
	 * Gets Boolean
	 * @return IsPageBreakPreview
	 */
  public Boolean getIsPageBreakPreview() {
    return IsPageBreakPreview;
  }

	/**
	 * setIsPageBreakPreview
	 * Sets Boolean
	 * @param IsPageBreakPreview Boolean
	 */
  public void setIsPageBreakPreview(Boolean IsPageBreakPreview) {
    this.IsPageBreakPreview = IsPageBreakPreview;
  }

  /**
	 * getIsVisible
	 * Gets Boolean
	 * @return IsVisible
	 */
  public Boolean getIsVisible() {
    return IsVisible;
  }

	/**
	 * setIsVisible
	 * Sets Boolean
	 * @param IsVisible Boolean
	 */
  public void setIsVisible(Boolean IsVisible) {
    this.IsVisible = IsVisible;
  }

  /**
	 * getIsProtected
	 * Gets Boolean
	 * @return IsProtected
	 */
  public Boolean getIsProtected() {
    return IsProtected;
  }

	/**
	 * setIsProtected
	 * Sets Boolean
	 * @param IsProtected Boolean
	 */
  public void setIsProtected(Boolean IsProtected) {
    this.IsProtected = IsProtected;
  }

  /**
	 * getIsRowColumnHeadersVisible
	 * Gets Boolean
	 * @return IsRowColumnHeadersVisible
	 */
  public Boolean getIsRowColumnHeadersVisible() {
    return IsRowColumnHeadersVisible;
  }

	/**
	 * setIsRowColumnHeadersVisible
	 * Sets Boolean
	 * @param IsRowColumnHeadersVisible Boolean
	 */
  public void setIsRowColumnHeadersVisible(Boolean IsRowColumnHeadersVisible) {
    this.IsRowColumnHeadersVisible = IsRowColumnHeadersVisible;
  }

  /**
	 * getIsRulerVisible
	 * Gets Boolean
	 * @return IsRulerVisible
	 */
  public Boolean getIsRulerVisible() {
    return IsRulerVisible;
  }

	/**
	 * setIsRulerVisible
	 * Sets Boolean
	 * @param IsRulerVisible Boolean
	 */
  public void setIsRulerVisible(Boolean IsRulerVisible) {
    this.IsRulerVisible = IsRulerVisible;
  }

  /**
	 * getIsSelected
	 * Gets Boolean
	 * @return IsSelected
	 */
  public Boolean getIsSelected() {
    return IsSelected;
  }

	/**
	 * setIsSelected
	 * Sets Boolean
	 * @param IsSelected Boolean
	 */
  public void setIsSelected(Boolean IsSelected) {
    this.IsSelected = IsSelected;
  }

  /**
	 * getTabColor
	 * Gets Color
	 * @return TabColor
	 */
  public Color getTabColor() {
    return TabColor;
  }

	/**
	 * setTabColor
	 * Sets Color
	 * @param TabColor Color
	 */
  public void setTabColor(Color TabColor) {
    this.TabColor = TabColor;
  }

  /**
	 * getTransitionEntry
	 * Gets Boolean
	 * @return TransitionEntry
	 */
  public Boolean getTransitionEntry() {
    return TransitionEntry;
  }

	/**
	 * setTransitionEntry
	 * Sets Boolean
	 * @param TransitionEntry Boolean
	 */
  public void setTransitionEntry(Boolean TransitionEntry) {
    this.TransitionEntry = TransitionEntry;
  }

  /**
	 * getTransitionEvaluation
	 * Gets Boolean
	 * @return TransitionEvaluation
	 */
  public Boolean getTransitionEvaluation() {
    return TransitionEvaluation;
  }

	/**
	 * setTransitionEvaluation
	 * Sets Boolean
	 * @param TransitionEvaluation Boolean
	 */
  public void setTransitionEvaluation(Boolean TransitionEvaluation) {
    this.TransitionEvaluation = TransitionEvaluation;
  }

  /**
	 * getType
	 * Gets String
	 * @return Type
	 */
  public String getType() {
    return Type;
  }

	/**
	 * setType
	 * Sets String
	 * @param Type String
	 */
  public void setType(String Type) {
    this.Type = Type;
  }

  /**
	 * getViewType
	 * Gets String
	 * @return ViewType
	 */
  public String getViewType() {
    return ViewType;
  }

	/**
	 * setViewType
	 * Sets String
	 * @param ViewType String
	 */
  public void setViewType(String ViewType) {
    this.ViewType = ViewType;
  }

  /**
	 * getVisibilityType
	 * Gets String
	 * @return VisibilityType
	 */
  public String getVisibilityType() {
    return VisibilityType;
  }

	/**
	 * setVisibilityType
	 * Sets String
	 * @param VisibilityType String
	 */
  public void setVisibilityType(String VisibilityType) {
    this.VisibilityType = VisibilityType;
  }

  /**
	 * getZoom
	 * Gets Integer
	 * @return Zoom
	 */
  public Integer getZoom() {
    return Zoom;
  }

	/**
	 * setZoom
	 * Sets Integer
	 * @param Zoom Integer
	 */
  public void setZoom(Integer Zoom) {
    this.Zoom = Zoom;
  }

  /**
	 * getCells
	 * Gets LinkElement
	 * @return Cells
	 */
  public LinkElement getCells() {
    return Cells;
  }

	/**
	 * setCells
	 * Sets LinkElement
	 * @param Cells LinkElement
	 */
  public void setCells(LinkElement Cells) {
    this.Cells = Cells;
  }

  /**
	 * getCharts
	 * Gets LinkElement
	 * @return Charts
	 */
  public LinkElement getCharts() {
    return Charts;
  }

	/**
	 * setCharts
	 * Sets LinkElement
	 * @param Charts LinkElement
	 */
  public void setCharts(LinkElement Charts) {
    this.Charts = Charts;
  }

  /**
	 * getAutoShapes
	 * Gets LinkElement
	 * @return AutoShapes
	 */
  public LinkElement getAutoShapes() {
    return AutoShapes;
  }

	/**
	 * setAutoShapes
	 * Sets LinkElement
	 * @param AutoShapes LinkElement
	 */
  public void setAutoShapes(LinkElement AutoShapes) {
    this.AutoShapes = AutoShapes;
  }

  /**
	 * getOleObjects
	 * Gets LinkElement
	 * @return OleObjects
	 */
  public LinkElement getOleObjects() {
    return OleObjects;
  }

	/**
	 * setOleObjects
	 * Sets LinkElement
	 * @param OleObjects LinkElement
	 */
  public void setOleObjects(LinkElement OleObjects) {
    this.OleObjects = OleObjects;
  }

  /**
	 * getComments
	 * Gets LinkElement
	 * @return Comments
	 */
  public LinkElement getComments() {
    return Comments;
  }

	/**
	 * setComments
	 * Sets LinkElement
	 * @param Comments LinkElement
	 */
  public void setComments(LinkElement Comments) {
    this.Comments = Comments;
  }

  /**
	 * getPictures
	 * Gets LinkElement
	 * @return Pictures
	 */
  public LinkElement getPictures() {
    return Pictures;
  }

	/**
	 * setPictures
	 * Sets LinkElement
	 * @param Pictures LinkElement
	 */
  public void setPictures(LinkElement Pictures) {
    this.Pictures = Pictures;
  }

  /**
	 * getMergedCells
	 * Gets LinkElement
	 * @return MergedCells
	 */
  public LinkElement getMergedCells() {
    return MergedCells;
  }

	/**
	 * setMergedCells
	 * Sets LinkElement
	 * @param MergedCells LinkElement
	 */
  public void setMergedCells(LinkElement MergedCells) {
    this.MergedCells = MergedCells;
  }

  /**
	 * getValidations
	 * Gets LinkElement
	 * @return Validations
	 */
  public LinkElement getValidations() {
    return Validations;
  }

	/**
	 * setValidations
	 * Sets LinkElement
	 * @param Validations LinkElement
	 */
  public void setValidations(LinkElement Validations) {
    this.Validations = Validations;
  }

  /**
	 * getConditionalFormattings
	 * Gets LinkElement
	 * @return ConditionalFormattings
	 */
  public LinkElement getConditionalFormattings() {
    return ConditionalFormattings;
  }

	/**
	 * setConditionalFormattings
	 * Sets LinkElement
	 * @param ConditionalFormattings LinkElement
	 */
  public void setConditionalFormattings(LinkElement ConditionalFormattings) {
    this.ConditionalFormattings = ConditionalFormattings;
  }

  /**
	 * getHyperlinks
	 * Gets LinkElement
	 * @return Hyperlinks
	 */
  public LinkElement getHyperlinks() {
    return Hyperlinks;
  }

	/**
	 * setHyperlinks
	 * Sets LinkElement
	 * @param Hyperlinks LinkElement
	 */
  public void setHyperlinks(LinkElement Hyperlinks) {
    this.Hyperlinks = Hyperlinks;
  }

  @Override
  public String toString()  {
    StringBuilder sb = new StringBuilder();
    sb.append("class Worksheet {\n");
    sb.append("  Links: ").append(Links).append("\n");
    sb.append("  DisplayRightToLeft: ").append(DisplayRightToLeft).append("\n");
    sb.append("  DisplayZeros: ").append(DisplayZeros).append("\n");
    sb.append("  FirstVisibleColumn: ").append(FirstVisibleColumn).append("\n");
    sb.append("  FirstVisibleRow: ").append(FirstVisibleRow).append("\n");
    sb.append("  Name: ").append(Name).append("\n");
    sb.append("  Index: ").append(Index).append("\n");
    sb.append("  IsGridlinesVisible: ").append(IsGridlinesVisible).append("\n");
    sb.append("  IsOutlineShown: ").append(IsOutlineShown).append("\n");
    sb.append("  IsPageBreakPreview: ").append(IsPageBreakPreview).append("\n");
    sb.append("  IsVisible: ").append(IsVisible).append("\n");
    sb.append("  IsProtected: ").append(IsProtected).append("\n");
    sb.append("  IsRowColumnHeadersVisible: ").append(IsRowColumnHeadersVisible).append("\n");
    sb.append("  IsRulerVisible: ").append(IsRulerVisible).append("\n");
    sb.append("  IsSelected: ").append(IsSelected).append("\n");
    sb.append("  TabColor: ").append(TabColor).append("\n");
    sb.append("  TransitionEntry: ").append(TransitionEntry).append("\n");
    sb.append("  TransitionEvaluation: ").append(TransitionEvaluation).append("\n");
    sb.append("  Type: ").append(Type).append("\n");
    sb.append("  ViewType: ").append(ViewType).append("\n");
    sb.append("  VisibilityType: ").append(VisibilityType).append("\n");
    sb.append("  Zoom: ").append(Zoom).append("\n");
    sb.append("  Cells: ").append(Cells).append("\n");
    sb.append("  Charts: ").append(Charts).append("\n");
    sb.append("  AutoShapes: ").append(AutoShapes).append("\n");
    sb.append("  OleObjects: ").append(OleObjects).append("\n");
    sb.append("  Comments: ").append(Comments).append("\n");
    sb.append("  Pictures: ").append(Pictures).append("\n");
    sb.append("  MergedCells: ").append(MergedCells).append("\n");
    sb.append("  Validations: ").append(Validations).append("\n");
    sb.append("  ConditionalFormattings: ").append(ConditionalFormattings).append("\n");
    sb.append("  Hyperlinks: ").append(Hyperlinks).append("\n");
    sb.append("}\n");
    return sb.toString();
  }
}


text:
--TEST--
Test gzopen() function : usage variation
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
	print "skip - zlib extension not loaded";
}
?>
--FILE--
<?php
/* Prototype  : resource gzopen(string filename, string mode [, int use_include_path])
 * Description: Open a .gz-file and return a .gz-file pointer
 * Source code: ext/zlib/zlib.c
 * Alias to functions:
 */

echo "*** Testing gzopen() : usage variation ***\n";

// Define error handler
function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
	if (error_reporting() != 0) {
		// report non-silenced errors
		echo "Error: $err_no - $err_msg, $filename($linenum)\n";
	}
}
set_error_handler('test_error_handler');

// Initialise function arguments not being substituted (if any)
$filename = dirname(__FILE__)."/004.txt.gz";
$use_include_path = false;

//get an unset variable
$unset_var = 10;
unset ($unset_var);

// define some classes
class classWithToString
{
	public function __toString() {
		return "Class A object";
	}
}

class classWithoutToString
{
}

// heredoc string
$heredoc = <<<EOT
hello world
EOT;

// get a resource variable
$fp = fopen(__FILE__, "r");

// add arrays
$index_array = array (1, 2, 3);
$assoc_array = array ('one' => 1, 'two' => 2);

//array of values to iterate over
$inputs = array(

      // int data
      'int 0' => 0,
      'int 1' => 1,
      'int 12345' => 12345,
      'int -12345' => -2345,

      // float data
      'float 10.5' => 10.5,
      'float -10.5' => -10.5,
      'float 12.3456789000e10' => 12.3456789000e10,
      'float -12.3456789000e10' => -12.3456789000e10,
      'float .5' => .5,

      // array data
      'empty array' => array(),
      'int indexed array' => $index_array,
      'associative array' => $assoc_array,
      'nested arrays' => array('foo', $index_array, $assoc_array),

      // null data
      'uppercase NULL' => NULL,
      'lowercase null' => null,

      // boolean data
      'lowercase true' => true,
      'lowercase false' =>false,
      'uppercase TRUE' =>TRUE,
      'uppercase FALSE' =>FALSE,

      // empty data
      'empty string DQ' => "",
      'empty string SQ' => '',

      // object data
      'instance of classWithToString' => new classWithToString(),
      'instance of classWithoutToString' => new classWithoutToString(),

      // undefined data
      'undefined var' => @$undefined_var,

      // unset data
      'unset var' => @$unset_var,

      // resource variable
      'resource' => $fp
);

// loop through each element of the array for mode

foreach($inputs as $key =>$value) {
      echo "\n--$key--\n";
      var_dump( gzopen($filename, $value, $use_include_path) );
};

fclose($fp);

?>
===DONE===
--EXPECTF--
*** Testing gzopen() : usage variation ***

--int 0--
Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d)
bool(false)

--int 1--
Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d)
bool(false)

--int 12345--
Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d)
bool(false)

--int -12345--
Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d)
bool(false)

--float 10.5--
Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d)
bool(false)

--float -10.5--
Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d)
bool(false)

--float 12.3456789000e10--
Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d)
bool(false)

--float -12.3456789000e10--
Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d)
bool(false)

--float .5--
Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d)
bool(false)

--empty array--
Error: 2 - gzopen() expects parameter 2 to be string, array given, %s(%d)
NULL

--int indexed array--
Error: 2 - gzopen() expects parameter 2 to be string, array given, %s(%d)
NULL

--associative array--
Error: 2 - gzopen() expects parameter 2 to be string, array given, %s(%d)
NULL

--nested arrays--
Error: 2 - gzopen() expects parameter 2 to be string, array given, %s(%d)
NULL

--uppercase NULL--
Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d)
bool(false)

--lowercase null--
Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d)
bool(false)

--lowercase true--
Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d)
bool(false)

--lowercase false--
Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d)
bool(false)

--uppercase TRUE--
Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d)
bool(false)

--uppercase FALSE--
Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d)
bool(false)

--empty string DQ--
Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d)
bool(false)

--empty string SQ--
Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d)
bool(false)

--instance of classWithToString--
Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d)
bool(false)

--instance of classWithoutToString--
Error: 2 - gzopen() expects parameter 2 to be string, object given, %s(%d)
NULL

--undefined var--
Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d)
bool(false)

--unset var--
Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d)
bool(false)

--resource--
Error: 2 - gzopen() expects parameter 2 to be string, resource given, %s(%d)
NULL
===DONE===


text:
Contains

    1. sendData.py . : a python file for running a simple script to publish to a pub/sub topic on GCP

    2. sensorData.txt : a text file of temperature and ambient pressure from a Rainbow HAT sensorHub.

Copy these files to your computer.

In GCP console, upload using Cloud shell.

There is an auth_certificate that is recognized by Cloud IoT Core.


text:
Advisor Link

Find the perfect financial advisor for you.

Stuff

        Description of stuff.


text:
using namespace coda::db;

std::shared_ptr<coda::db::session> current_session;

__attribute__((constructor)) void initialize(void)
{
    coda::db::sqlite::initialize();
    coda::db::mysql::initialize();
    coda::db::postgres::initialize();
}

void sqlite_setup()
{
    current_session->open();

    current_session->execute(
        "create table if not exists users(id integer primary key autoincrement, first_name varchar(45), last_name varchar(45), dval real, data "
        "blob, tval timestamp)");
    current_session->execute(
        "create table if not exists user_settings(id integer primary key autoincrement, user_id integer not null, valid int(1), created_at "
        "timestamp)");
}

void sqlite_teardown()
{
    current_session->close();
    unlink(current_session->connection_info().path.c_str());
}

void mysql_setup()
{
    current_session->open();
    current_session->execute(
        "create table if not exists users(id integer primary key auto_increment, first_name varchar(45), last_name varchar(45), dval real, data "
        "blob, tval timestamp)");
    current_session->execute(
        "create table if not exists user_settings(id integer primary key auto_increment, user_id integer not null, valid int(1), created_at "
        "timestamp)");
}

void mysql_teardown()
{
    current_session->execute("drop table users");
    current_session->execute("drop table user_settings");
    current_session->close();
}

void postgres_setup()
{
    current_session->open();
    current_session->execute(
        "create table if not exists users(id serial primary key unique, first_name varchar(45), last_name varchar(45), dval real, data bytea, "
        "tval "
        "timestamp)");
    current_session->execute(
        "create table if not exists user_settings(id serial primary key unique, user_id integer not null, valid smallint, created_at timestamp)");
}

void postgres_teardown()
{
    current_session->execute("drop table users");
    current_session->execute("drop table user_settings");
    current_session->close();
}

void benchmark_select(const std::string &tableName)
{
    select_query query(current_session);

    query.from(tableName);

    for (auto &row : query.execute()) {
        assert(row.column("first_name").is_valid());
    }
}

void benchmark_setup(const coda::db::uri &uri_s)
{
    current_session = sqldb::create_session(uri_s);

    current_session->open();
}

void benchmark_teardown()
{
    current_session->close();
}

void benchmark_insert(insert_query &insert, const std::shared_ptr<coda::db::session> &session)
{
    insert.values(random_name(), random_name(), random_num<int>(-123012, 1231232));

    if (!insert.execute()) {
        coda::db::log::error("unable to prepare test: %s", session->last_error().c_str());
    }
}

void benchmark_populate(benchpress::context *context)
{
    coda::db::insert_query query(current_session);

    query.into(user::TABLE_NAME).columns("first_name", "last_name", "dval");

    for (size_t i = 0; i < context->num_iterations(); i++) {
        benchmark_insert(query, current_session);
    }
}


text:
package com.zxinsight.classifier.core;

public interface MultilabelClassifier {

}