text:
package com.jcwhatever.nucleus.managed.particles;

import com.jcwhatever.nucleus.Nucleus;
import com.jcwhatever.nucleus.managed.particles.IParticleEffectFactory;
import com.jcwhatever.nucleus.managed.particles.ParticleType;
import com.jcwhatever.nucleus.managed.particles.types.IBarrierParticle;
import com.jcwhatever.nucleus.managed.particles.types.IBlockCrackParticle;
import com.jcwhatever.nucleus.managed.particles.types.IBlockDustParticle;
import com.jcwhatever.nucleus.managed.particles.types.ICloudParticle;
import com.jcwhatever.nucleus.managed.particles.types.ICriticalHitMagicParticle;
import com.jcwhatever.nucleus.managed.particles.types.ICriticalHitParticle;
import com.jcwhatever.nucleus.managed.particles.types.IDripLavaParticle;
import com.jcwhatever.nucleus.managed.particles.types.IDripWaterParticle;
import com.jcwhatever.nucleus.managed.particles.types.IEnchantmentTableParticle;
import com.jcwhatever.nucleus.managed.particles.types.IExplosionHugeParticle;
import com.jcwhatever.nucleus.managed.particles.types.IExplosionLargeParticle;
import com.jcwhatever.nucleus.managed.particles.types.IExplosionNormalParticle;
import com.jcwhatever.nucleus.managed.particles.types.IFireworksSparkParticle;
import com.jcwhatever.nucleus.managed.particles.types.IFlameParticle;
import com.jcwhatever.nucleus.managed.particles.types.IFootstepParticle;
import com.jcwhatever.nucleus.managed.particles.types.IHeartParticle;
import com.jcwhatever.nucleus.managed.particles.types.IItemCrackParticle;
import com.jcwhatever.nucleus.managed.particles.types.ILavaParticle;
import com.jcwhatever.nucleus.managed.particles.types.INoteParticle;
import com.jcwhatever.nucleus.managed.particles.types.IPortalParticle;
import com.jcwhatever.nucleus.managed.particles.types.IRedstoneDustParticle;
import com.jcwhatever.nucleus.managed.particles.types.ISlimeParticle;
import com.jcwhatever.nucleus.managed.particles.types.ISmokeLargeParticle;
import com.jcwhatever.nucleus.managed.particles.types.ISmokeNormalParticle;
import com.jcwhatever.nucleus.managed.particles.types.ISnowShovelParticle;
import com.jcwhatever.nucleus.managed.particles.types.ISnowballParticle;
import com.jcwhatever.nucleus.managed.particles.types.ISpellInstantParticle;
import com.jcwhatever.nucleus.managed.particles.types.ISpellMobAmbientParticle;
import com.jcwhatever.nucleus.managed.particles.types.ISpellMobParticle;
import com.jcwhatever.nucleus.managed.particles.types.ISpellParticle;
import com.jcwhatever.nucleus.managed.particles.types.ISpellWitchParticle;
import com.jcwhatever.nucleus.managed.particles.types.ISuspendedDepthParticle;
import com.jcwhatever.nucleus.managed.particles.types.ITownAuraParticle;
import com.jcwhatever.nucleus.managed.particles.types.IVillagerAngryParticle;
import com.jcwhatever.nucleus.managed.particles.types.IVillagerHappyParticle;
import com.jcwhatever.nucleus.managed.particles.types.IWaterBubbleParticle;
import com.jcwhatever.nucleus.managed.particles.types.IWaterDropletParticle;
import com.jcwhatever.nucleus.managed.particles.types.IWaterSplashParticle;
import com.jcwhatever.nucleus.managed.particles.types.IWaterSuspendedParticle;
import com.jcwhatever.nucleus.managed.particles.types.IWaterWakeParticle;

/**
 * Particle effect factory utility.
 */
public final class Particles {

    private Particles() {}

    /**
     * Barrier block effect.
     */
    public static IBarrierParticle createBarrier() {
        return factory().create(ParticleType.BARRIER);
    }

    /**
     * Block break and sprinting effect.
     */
    public static IBlockCrackParticle createBlockCrack() {
        return factory().create(ParticleType.BLOCK_CRACK);
    }

    /**
     * Entity land on ground effect.
     */
    public static IBlockDustParticle createBlockDust() {
        return factory().create(ParticleType.BLOCK_DUST);
    }

    /**
     * Entity death effect.
     */
    public static ICloudParticle createCloud() {
        return factory().create(ParticleType.CLOUD);
    }

    /**
     * Critical hit with enchanted weapon effect.
     */
    public static ICriticalHitMagicParticle createCriticalHitMagic() {
        return factory().create(ParticleType.CRITICAL_HIT_MAGIC);
    }

    /**
     * Critical hit and arrow hit effect.
     */
    public static ICriticalHitParticle createCriticalHit() {
        return factory().create(ParticleType.CRITICAL_HIT);
    }

    /**
     * Lava dripping from ceiling effect.
     */
    public static IDripLavaParticle createDripLava() {
        return factory().create(ParticleType.DRIP_LAVA);
    }

    /**
     * Water dripping from ceiling effect.
     */
    public static IDripWaterParticle createDripWater() {
        return factory().create(ParticleType.DRIP_WATER);
    }

    /**
     * Enchantment table near book shelves effect.
     */
    public static IEnchantmentTableParticle createEnchantmentTable() {
        return factory().create(ParticleType.ENCHANTMENT_TABLE);
    }

    /**
     * TNT/Creeper explosion effect.
     */
    public static IExplosionHugeParticle createExplosionHuge() {
        return factory().create(ParticleType.EXPLOSION_HUGE);
    }

    /**
     * Ghast fireball and wither skull explosion effect.
     */
    public static IExplosionLargeParticle createExplosionLarge() {
        return factory().create(ParticleType.EXPLOSION_LARGE);
    }

    /**
     * TNT/Creeper explosion effect.
     */
    public static IExplosionNormalParticle createExplosionNormal() {
        return factory().create(ParticleType.EXPLOSION_NORMAL);
    }

    /**
     * Fireworks launch effect.
     */
    public static IFireworksSparkParticle createFireworksSpark() {
        return factory().create(ParticleType.FIREWORKS_SPARK);
    }

    /**
     * Monster spawner, torch, furnaces and magma cube flame effect.
     */
    public static IFlameParticle createFlame() {
        return factory().create(ParticleType.FLAME);
    }

    public static IFootstepParticle createFootstep() {
        return factory().create(ParticleType.FOOTSTEP);
    }

    /**
     * Animal taming and breeding effect.
     */
    public static IHeartParticle createHeart() {
        return factory().create(ParticleType.HEART);
    }

    /**
     * Tool break and egg hit effect.
     */
    public static IItemCrackParticle createItemCrack() {
        return factory().create(ParticleType.ITEM_CRACK);
    }

    /**
     * Lava block effect.
     */
    public static ILavaParticle createLava() {
        return factory().create(ParticleType.LAVA);
    }

    /**
     * Note block effect.
     */
    public static INoteParticle createNote() {
        return factory().create(ParticleType.NOTE);
    }

    /**
     * Nether portal, endermen, ender pearls, etc. effect.
     */
    public static IPortalParticle createPortal() {
        return factory().create(ParticleType.PORTAL);
    }

    /**
     * Redstone and redstone related block effect.
     */
    public static IRedstoneDustParticle createRedstoneDust() {
        return factory().create(ParticleType.RED_DUST);
    }

    /**
     * Slime entity effect.
     */
    public static ISlimeParticle createSlime() {
        return factory().create(ParticleType.SLIME);
    }

    /**
     * Smoke from fire and blazes.
     */
    public static ISmokeLargeParticle createSmokeLarge() {
        return factory().create(ParticleType.SMOKE_LARGE);
    }

    /**
     * Smoke from torches, end portals, brewing stands, TNT, droppers and
     * dispensers.
     */
    public static ISmokeNormalParticle createSmokeNormal() {
        return factory().create(ParticleType.SMOKE_NORMAL);
    }

    /**
     * Thrown snowball hit effect.
     */
    public static ISnowballParticle createSnowballPoof() {
        return factory().create(ParticleType.SNOWBALL_POOF);
    }

    public static ISnowShovelParticle createSnowShovel() {
        return factory().create(ParticleType.SNOW_SHOVEL);
    }

    /**
     * Instant splash potion break effect.
     */
    public static ISpellInstantParticle createSpellInstant() {
        return factory().create(ParticleType.SPELL_INSTANT);
    }

    /**
     * Entity enchanted by beacon effect.
     */
    public static ISpellMobAmbientParticle createSpellMobAmbient() {
        return factory().create(ParticleType.SPELL_MOB_AMBIENT);
    }

    /**
     * Entity enchanted effect.
     */
    public static ISpellMobParticle createSpellMob() {
        return factory().create(ParticleType.SPELL_MOB);
    }

    /**
     * Splash potion break effect.
     */
    public static ISpellParticle createSpell() {
        return factory().create(ParticleType.SPELL);
    }

    /**
     * Witch entity effect.
     */
    public static ISpellWitchParticle createSpellWitch() {
        return factory().create(ParticleType.SPELL_WITCH);
    }

    /**
     * Bedrock and void effect.
     */
    public static ISuspendedDepthParticle createSuspendedDepth() {
        return factory().create(ParticleType.SUSPENDED_DEPTH);
    }

    /**
     * Mycelium block effect.
     */
    public static ITownAuraParticle createTownAura() {
        return factory().create(ParticleType.TOWN_AURA);
    }

    /**
     * Villager entity when trading or using bone meal effect.
     */
    public static IVillagerHappyParticle createVillagerHappy() {
        return factory().create(ParticleType.VILLAGER_HAPPY);
    }

    /**
     * Villager entity effect when attacked.
     */
    public static IVillagerAngryParticle createVillagerAngry() {
        return factory().create(ParticleType.VILLAGER_ANGRY);
    }

    /**
     * Swimming entity effect.
     */
    public static IWaterBubbleParticle createWaterBubble() {
        return factory().create(ParticleType.WATER_BUBBLE);
    }

    /**
     * Rain water hitting the ground effect.
     */
    public static IWaterDropletParticle createWaterDroplet() {
        return factory().create(ParticleType.WATER_DROPLET);
    }

    /**
     * Swimming entity and shaking wolves effect.
     */
    public static IWaterSplashParticle createWaterSplash() {
        return factory().create(ParticleType.WATER_SPLASH);
    }

    /**
     * Water effect.
     */
    public static IWaterSuspendedParticle createWaterSuspended() {
        return factory().create(ParticleType.WATER_SUSPENDED);
    }

    /**
     * Fishing effect.
     */
    public static IWaterWakeParticle createWaterWake() {
        return factory().create(ParticleType.WATER_WAKE);
    }

    public static IParticleEffectFactory factory() {
        return Nucleus.getParticleEffects();
    }
}


text:
import { currentRouteName } from '@ember/test-helpers';
import { module, test } from 'qunit';
import { setupAuthentication } from 'ilios-common';
import { setupApplicationTest } from 'ember-qunit';
import setupMirage from 'ember-cli-mirage/test-support/setup-mirage';
import page from 'ilios/tests/pages/curriculum-inventory-report-rollover';

module('Acceptance | curriculum inventory report/rollover', function (hooks) {
  setupApplicationTest(hooks);
  setupMirage(hooks);

  hooks.beforeEach(async function () {
    this.school = this.server.create('school');
    this.user = await setupAuthentication({ school: this.school });
  });

  test('rollover button hidden on rollover route', async function (assert) {
    this.user.update({ directedSchools: [this.school] });
    const program = this.server.create('program', {
      school: this.school,
      title: 'Doctor of Medicine',
    });
    const report = this.server.create('curriculumInventoryReport', {
      year: 2013,
      name: 'foo bar',
      description: 'lorem ipsum',
      program,
    });
    const reportModel = await this.owner
      .lookup('service:store')
      .findRecord('curriculumInventoryReport', report.id);
    await page.visit({ reportId: reportModel.id });
    assert.strictEqual(currentRouteName(), 'curriculum-inventory-report.rollover');
    assert.notOk(page.details.overview.rolloverLink.isVisible);
  });
});

redpajama_set_name: RedPajamaGithub


text:
package puzzledice;

import gui.PuzzleEditPanel;
import gui.WindowMain;

import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import javax.swing.BoxLayout;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;

import com.mxgraph.view.mxGraph;

public class CombinePuzzleBlock extends PuzzleBlock {

	private PuzzleBlock _ingredientBlock1, _ingredientBlock2;
	private static int nextIndex = 0;
	public static void reset() {
		nextIndex = 0;
	}

	private String _ingredientName1, _ingredientName2;
	public void setIngredientName1(String value) {
		_ingredientName1 = value;
	}
	public void setIngredientName2(String value) {
		_ingredientName2 = value;
	}

	private JComboBox _ingredientSelect1, _ingredientSelect2;

	public CombinePuzzleBlock()
	{
		_name = "Combine-Puzzle-" + ++nextIndex;
		_type = "Combine Puzzle";

		JPanel editPanel = new JPanel();
		editPanel.setLayout(new BoxLayout(editPanel, BoxLayout.Y_AXIS));

		// First combobox panel
		JPanel ingredientPanel1 = new JPanel();
		ingredientPanel1.setLayout(new BoxLayout(ingredientPanel1, BoxLayout.X_AXIS));

		JLabel ingredientLabel1 = new JLabel("Ingredient 1:");
		ingredientPanel1.add(ingredientLabel1);

		_ingredientSelect1 = new JComboBox();
		_ingredientSelect1.setMaximumSize(new Dimension(Integer.MAX_VALUE, _ingredientSelect1.getPreferredSize().height));
		ingredientPanel1.add(_ingredientSelect1);

		editPanel.add(ingredientPanel1);

		JPanel ingredientPanel2 = new JPanel();
		ingredientPanel2.setLayout(new BoxLayout(ingredientPanel2, BoxLayout.X_AXIS));

		JLabel ingredientLabel2 = new JLabel("Ingredient 2:");
		ingredientPanel2.add(ingredientLabel2);

		_ingredientSelect2 = new JComboBox();
		_ingredientSelect2.setMaximumSize(new Dimension(Integer.MAX_VALUE, _ingredientSelect2.getPreferredSize().height));
		ingredientPanel2.add(_ingredientSelect2);

		editPanel.add(ingredientPanel2);

		_editUI = editPanel;

		_ingredientSelect1.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent evt) {
				if(_ingredientBlock1 == _ingredientSelect1.getSelectedItem() || _ingredientBlock1 == null && _ingredientSelect1.getSelectedItem().equals("None"))
					return;
				mxGraph puzzleGraph = WindowMain.getPuzzleGraph();

				// Before anything, check for a cycle
				if (_ingredientSelect1.getSelectedItem() != null && !_ingredientSelect1.getSelectedItem().equals("None")) {
					PuzzleBlock block = (PuzzleBlock)_ingredientSelect1.getSelectedItem();
					if (block.canReachBlockBackwards(CombinePuzzleBlock.this)) {
						SwingUtilities.invokeLater(new Runnable() {
							public void run() {
								JOptionPane.showMessageDialog(null, "Error: Cannot add cycle to puzzle graph.");
							}
						});
						if (_ingredientBlock1 != null)
							_ingredientSelect1.setSelectedItem(_ingredientBlock1);
						else
							_ingredientSelect1.setSelectedIndex(0);
						return;
					}
				}

				// first, see if we need to remove a previous edge
				if(_ingredientBlock1 != null)
				{
					puzzleGraph.getModel().beginUpdate();
					try	{ puzzleGraph.removeCells(puzzleGraph.getEdgesBetween(_ingredientBlock1.getGraphCell(), _graphCell, false));}
					finally {puzzleGraph.getModel().endUpdate();}
				}
				if (_ingredientSelect1.getSelectedItem() == null)
					_ingredientSelect1.setSelectedIndex(0);

				if(_ingredientSelect1.getSelectedItem().equals("None"))
					_ingredientBlock1 = null;
				else
				{
					_ingredientBlock1 = (PuzzleBlock)_ingredientSelect1.getSelectedItem();
					// update the graph with a new edge
					puzzleGraph.getModel().beginUpdate();
					try { puzzleGraph.insertEdge(puzzleGraph.getDefaultParent(), null, null, _ingredientBlock1.getGraphCell(), _graphCell); }
					finally {puzzleGraph.getModel().endUpdate();}
				}
				// Need to update our other ingredient list
				_ingredientSelect2.setModel(new DefaultComboBoxModel(makeComboBoxList2()));
				// Update our selected values
				if (_ingredientBlock2 == null)
					_ingredientSelect2.setSelectedIndex(0);
				else
					_ingredientSelect2.setSelectedItem(_ingredientBlock2);
				PuzzleEditPanel.resetTextualDescription();
				WindowMain.updatePuzzleGraph();
			}
		});

		_ingredientSelect2.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent evt) {
				if(_ingredientBlock2 == _ingredientSelect2.getSelectedItem() ||   _ingredientBlock2 == null && _ingredientSelect2.getSelectedItem().equals("None"))
					return;
				mxGraph puzzleGraph = WindowMain.getPuzzleGraph();

				// Before anything, check for a cycle
				if (_ingredientSelect2.getSelectedItem() != null && !_ingredientSelect2.getSelectedItem().equals("None")) {
					PuzzleBlock block = (PuzzleBlock)_ingredientSelect2.getSelectedItem();
					if (block.canReachBlockBackwards(CombinePuzzleBlock.this)) {
						SwingUtilities.invokeLater(new Runnable() {
							public void run() {
								JOptionPane.showMessageDialog(null, "Error: Cannot add cycle to puzzle graph.");
							}
						});
						if (_ingredientBlock2 != null)
							_ingredientSelect2.setSelectedItem(_ingredientBlock2);
						else
							_ingredientSelect2.setSelectedIndex(0);
						return;
					}
				}

				// first, see if we need to remove a previous edge
				if(_ingredientBlock2 != null)
				{
					puzzleGraph.getModel().beginUpdate();
					try	{ puzzleGraph.removeCells(puzzleGraph.getEdgesBetween(_ingredientBlock2.getGraphCell(), _graphCell, false));}
					finally {puzzleGraph.getModel().endUpdate();}
				}
				if (_ingredientSelect2.getSelectedItem() == null)
					_ingredientSelect2.setSelectedIndex(0);

				if(_ingredientSelect2.getSelectedItem().equals("None"))
					_ingredientBlock2 = null;
				else
				{
					_ingredientBlock2 = (PuzzleBlock)_ingredientSelect2.getSelectedItem();
					// update the graph with a new edge
					puzzleGraph.getModel().beginUpdate();
					try { puzzleGraph.insertEdge(puzzleGraph.getDefaultParent(), null, null, _ingredientBlock2.getGraphCell(), _graphCell); }
					finally {puzzleGraph.getModel().endUpdate();}
				}

				_ingredientSelect1.setModel(new DefaultComboBoxModel(makeComboBoxList1()));
				// Update our selected values
				if (_ingredientBlock1 == null)
					_ingredientSelect1.setSelectedIndex(0);
				else
					_ingredientSelect1.setSelectedItem(_ingredientBlock1);
				PuzzleEditPanel.resetTextualDescription();
				WindowMain.updatePuzzleGraph();
			}
		});

	}

	@Override
	public void update() {
		// Update the UI comboBoxes
		_ingredientSelect1.setModel(new DefaultComboBoxModel(makeComboBoxList1()));

		// Update our selected values
		if (_ingredientBlock1 == null)
			_ingredientSelect1.setSelectedIndex(0);
		else
			_ingredientSelect1.setSelectedItem(_ingredientBlock1);

		_ingredientSelect2.setModel(new DefaultComboBoxModel(makeComboBoxList2()));

		if(_ingredientBlock2 == null)
			_ingredientSelect2.setSelectedIndex(0);
		else
			_ingredientSelect2.setSelectedItem(_ingredientBlock2);
	}

	private Object[] makeComboBoxList1()
	{
		List<Object> retVal = new ArrayList<Object>();
		PuzzleBlock[] blockList = PuzzleEditPanel.getBlockList();
		retVal.add("None");
		for(PuzzleBlock p : blockList) {
			if(!p.equals(_ingredientSelect2.getSelectedItem()) && !p.equals(this))
				retVal.add(p);
		}
		return retVal.toArray();
	}

	private Object[] makeComboBoxList2()
	{
		List<Object> retVal = new ArrayList<Object>();
		PuzzleBlock[] blockList = PuzzleEditPanel.getBlockList();
		retVal.add("None");
		for(PuzzleBlock p : blockList) {
			if(!p.equals(_ingredientSelect1.getSelectedItem()) && !p.equals(this))
				retVal.add(p);
		}
		return retVal.toArray();
	}

	@Override
	public void maybeRemoveRef(PuzzleBlock block)
	{
		if(block.equals(_ingredientBlock1)) {
			_ingredientBlock1 = null;
			_ingredientSelect1.setSelectedIndex(0);
		}
		if(block.equals(_ingredientBlock2)) {
			_ingredientBlock2 = null;
			_ingredientSelect2.setSelectedIndex(0);
		}
	}

	@Override
	public String getTextualDescription()
	{
		String retVal = "";
		if(_ingredientBlock1 != null)
			retVal += _ingredientBlock1.getTextualDescription();
		if(_ingredientBlock2 != null)
			retVal += _ingredientBlock2.getTextualDescription();

		_outputTempName = PuzzleEditPanel.nextItemName();
		String input1 = (_ingredientBlock1 == null) ? "SOMETHING" : _ingredientBlock1.getOutputTempName();
		String input2 = (_ingredientBlock2 == null) ? "SOMETHING" : _ingredientBlock2.getOutputTempName();

		retVal += "The Player combines " + input1 +  " with " + input2 + " to create " + _outputTempName + ". ";

		return retVal;
	}

	@Override
	public void attachBlocksToName(Map<String, AreaBlock> areas, Map<String, PuzzleBlock> puzzles)
	{
		mxGraph puzzleGraph = WindowMain.getPuzzleGraph();
		if (_ingredientName1 != null) {
			_ingredientBlock1 = puzzles.get(_ingredientName1);
			puzzleGraph.getModel().beginUpdate();
			try { puzzleGraph.insertEdge(puzzleGraph.getDefaultParent(), null, null, _ingredientBlock1.getGraphCell(), _graphCell); }
			finally {puzzleGraph.getModel().endUpdate();}
		}
		if (_ingredientName2 != null) {
			_ingredientBlock2 = puzzles.get(_ingredientName2);
			puzzleGraph.getModel().beginUpdate();
			try { puzzleGraph.insertEdge(puzzleGraph.getDefaultParent(), null, null, _ingredientBlock2.getGraphCell(), _graphCell); }
			finally {puzzleGraph.getModel().endUpdate();}
		}

		this.update();
	}

	@Override
	public PuzzleBlock[] getPuzzleInputs()
	{
		if (_ingredientBlock1 != null && _ingredientBlock2 != null)
			return new PuzzleBlock[] { _ingredientBlock1, _ingredientBlock2 };
		else if (_ingredientBlock1 != null)
			return new PuzzleBlock[] { _ingredientBlock1 };
		else if (_ingredientBlock2 != null)
			return new PuzzleBlock[] { _ingredientBlock2 };
		else
			return new PuzzleBlock[0];
	}

	@Override
	public String toXML()
	{
		String xml = "<CombinePuzzle name=\"" + _name + "\" ";

		if (_ingredientBlock1 != null)
			xml += "ingredient1=\"" + _ingredientBlock1.getName() + "\" ";
		if (_ingredientBlock2 != null)
			xml += "ingredient2=\"" + _ingredientBlock2.getName() + "\" ";

		xml += "/>";

		return xml;
	}

}


text:
class PagesController < ApplicationController
  before_filter :authenticate_user!

  def index
  end

end


text:
{% extends 'one_finger/base.html' %}

{% block css %}
    <link href="/static/font-awesome/css/font-awesome.css" rel="stylesheet">
    <link href="/static/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="/static/css/animate.css" rel="stylesheet">
    <link href="/static/css/style.css" rel="stylesheet">

{% endblock %}

{% block content %}

                <form method="get" action="index.html" class="pull-right mail-search">

                        <input type="text" class="form-control input-sm" name="search" placeholder="Search email">

                            <button type="submit" class="btn btn-sm btn-primary">
                                Search
                            </button>

                </form>

                    Inbox (16)

                        <button class="btn btn-white btn-sm"></button>
                        <button class="btn btn-white btn-sm"></button>

                    <button class="btn btn-white btn-sm" data-toggle="tooltip" data-placement="left" title="Refresh inbox"> Refresh</button>
                    <button class="btn btn-white btn-sm" data-toggle="tooltip" data-placement="top" title="Mark as read"> </button>
                    <button class="btn btn-white btn-sm" data-toggle="tooltip" data-placement="top" title="Mark as important"> </button>
                    <button class="btn btn-white btn-sm" data-toggle="tooltip" data-placement="top" title="Move to trash"> </button>

                    {% for event in events %}

                         {{ event.event_type.top_type.name }}

                         {{ event.event_type.name }}
                        {% if event.level == 'INFO' %}
                          {{ event.level }}
                        {% elif event.level == 'WARNING' %}
                          {{ event.level }}
                        {% else %}
                          {{ event.level }}
                        {% endif %}

                        {{ event.event_time.year }}-{{ event.event_time.month }}-{{ event.event_time.day }} {{ event.event_time.hour }}:{{ event.event_time.minute }}:{{ event.event_time.second }}

                        {% if event.event_node.hostname %}
                      {{ event.event_node.hostname }}
                        {% else %}
                      NULL
                        {% endif %}
                      {{ event.event_content }}

                    {% endfor %}

                    Facebook WARNING
                    Many desktop publishing packages and web page editors.

                    Jan 16

                    Alex T. Documents
                    Lorem ipsum dolor noretek imit set.

                    December 22

                    Patrick Pertners Adv
                    If you are going to use a passage of Lorem

                    May 28

                10GB of 250GB Free.

                Copyright Example Company © 2014-2015

{% endblock %}

{% block js %}

{% endblock %}


text:
package ru.stqa.selenium.factory;

import org.openqa.selenium.Capabilities;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.remote.RemoteWebDriver;

import java.net.URL;

public interface RemoteDriverProvider {

  /**
   * Creates a new remote driver with the desired capabilities, or throws an error if the driver can't be instantiated.
   */
  default WebDriver createDriver(URL hub, Capabilities capabilities) {
    return new RemoteWebDriver(hub, capabilities);
  }

}


text:
package org.apache.cassandra.db.marshal;

import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.nio.ByteBuffer;
import java.util.*;

import com.google.common.base.Verify;
import com.google.common.collect.ImmutableMap;

import org.apache.cassandra.cql3.FieldIdentifier;
import org.apache.cassandra.exceptions.*;
import org.apache.cassandra.utils.ByteBufferUtil;
import org.apache.cassandra.utils.FBUtilities;
import org.apache.cassandra.utils.Pair;

/**
 * Parse a string containing an Type definition.
 */
public class TypeParser
{
    private final String str;
    private int idx;

    // A cache of parsed string, specially useful for DynamicCompositeType
    private static volatile ImmutableMap<String, AbstractType<?>> cache = ImmutableMap.of();

    public static final TypeParser EMPTY_PARSER = new TypeParser("", 0);

    private TypeParser(String str, int idx)
    {
        this.str = str;
        this.idx = idx;
    }

    public TypeParser(String str)
    {
        this(str, 0);
    }

    /**
     * Parse a string containing an type definition.
     */
    public static AbstractType<?> parse(String str) throws SyntaxException, ConfigurationException
    {
        if (str == null)
            return BytesType.instance;

        // A single volatile read of 'cache' should not hurt.
        AbstractType<?> type = cache.get(str);

        if (type != null)
            return type;

        // This could be simplier (i.e. new TypeParser(str).parse()) but we avoid creating a TypeParser object if not really necessary.
        int i = 0;
        i = skipBlank(str, i);
        int j = i;
        while (!isEOS(str, i) && isIdentifierChar(str.charAt(i)))
            ++i;

        if (i == j)
            return BytesType.instance;

        String name = str.substring(j, i);
        i = skipBlank(str, i);

        if (!isEOS(str, i) && str.charAt(i) == '(')
            type = getAbstractType(name, new TypeParser(str, i));
        else
            type = getAbstractType(name);

        Verify.verify(type != null, "Parsing %s yielded null, which is a bug", str);

        // Prevent concurrent modification to the map acting as the cache for TypeParser at the expense of
        // more allocation when the cache needs to be updated, since updates to the cache are rare compared
        // to the amount of reads.
        //
        // Copy the existing cache into a new map and add the parsed AbstractType instance and replace
        // the cache, if the type is not already in the cache.
        //
        // The cache-update is done in a short synchronized block to prevent duplicate instances of AbstractType
        // for the same string representation.
        synchronized (TypeParser.class)
        {
            if (!cache.containsKey(str))
            {
                ImmutableMap.Builder<String, AbstractType<?>> builder = ImmutableMap.builder();
                builder.putAll(cache).put(str, type);
                cache = builder.build();
            }
            return type;
        }
    }

    public static AbstractType<?> parse(CharSequence compareWith) throws SyntaxException, ConfigurationException
    {
        return parse(compareWith == null ? null : compareWith.toString());
    }

    /**
     * Parse an AbstractType from current position of this parser.
     */
    public AbstractType<?> parse() throws SyntaxException, ConfigurationException
    {
        skipBlank();
        String name = readNextIdentifier();

        skipBlank();
        if (!isEOS() && str.charAt(idx) == '(')
            return getAbstractType(name, this);
        else
            return getAbstractType(name);
    }

    public Map<String, String> getKeyValueParameters() throws SyntaxException
    {
        if (isEOS())
            return Collections.emptyMap();

        if (str.charAt(idx) != '(')
            throw new IllegalStateException();

        Map<String, String> map = new HashMap<>();
        ++idx; // skipping '('

        while (skipBlankAndComma())
        {
            if (str.charAt(idx) == ')')
            {
                ++idx;
                return map;
            }

            String k = readNextIdentifier();
            String v = "";
            skipBlank();
            if (str.charAt(idx) == '=')
            {
                ++idx;
                skipBlank();
                v = readNextIdentifier();
            }
            else if (str.charAt(idx) != ',' && str.charAt(idx) != ')')
            {
                throwSyntaxError("unexpected character '" + str.charAt(idx) + "'");
            }
            map.put(k, v);
        }
        throw new SyntaxException(String.format("Syntax error parsing '%s' at char %d: unexpected end of string", str, idx));
    }

    public List<AbstractType<?>> getTypeParameters() throws SyntaxException, ConfigurationException
    {
        List<AbstractType<?>> list = new ArrayList<>();

        if (isEOS())
            return list;

        if (str.charAt(idx) != '(')
            throw new IllegalStateException();

        ++idx; // skipping '('

        while (skipBlankAndComma())
        {
            if (str.charAt(idx) == ')')
            {
                ++idx;
                return list;
            }

            try
            {
                list.add(parse());
            }
            catch (SyntaxException e)
            {
                SyntaxException ex = new SyntaxException(String.format("Exception while parsing '%s' around char %d", str, idx));
                ex.initCause(e);
                throw ex;
            }
        }
        throw new SyntaxException(String.format("Syntax error parsing '%s' at char %d: unexpected end of string", str, idx));
    }

    public Map<Byte, AbstractType<?>> getAliasParameters() throws SyntaxException, ConfigurationException
    {
        Map<Byte, AbstractType<?>> map = new HashMap<>();

        if (isEOS())
            return map;

        if (str.charAt(idx) != '(')
            throw new IllegalStateException();

        ++idx; // skipping '('

        while (skipBlankAndComma())
        {
            if (str.charAt(idx) == ')')
            {
                ++idx;
                return map;
            }

            String alias = readNextIdentifier();
            if (alias.length() != 1)
                throwSyntaxError("An alias should be a single character");
            char aliasChar = alias.charAt(0);
            if (aliasChar < 33 || aliasChar > 127)
                throwSyntaxError("An alias should be a single character in [0..9a..bA..B-+._&]");

            skipBlank();
            if (!(str.charAt(idx) == '=' && str.charAt(idx+1) == '>'))
                throwSyntaxError("expecting '=>' token");

            idx += 2;
            skipBlank();
            try
            {
                map.put((byte)aliasChar, parse());
            }
            catch (SyntaxException e)
            {
                SyntaxException ex = new SyntaxException(String.format("Exception while parsing '%s' around char %d", str, idx));
                ex.initCause(e);
                throw ex;
            }
        }
        throw new SyntaxException(String.format("Syntax error parsing '%s' at char %d: unexpected end of string", str, idx));
    }

    public Map<ByteBuffer, CollectionType> getCollectionsParameters() throws SyntaxException, ConfigurationException
    {
        Map<ByteBuffer, CollectionType> map = new HashMap<>();

        if (isEOS())
            return map;

        if (str.charAt(idx) != '(')
            throw new IllegalStateException();

        ++idx; // skipping '('

        while (skipBlankAndComma())
        {
            if (str.charAt(idx) == ')')
            {
                ++idx;
                return map;
            }

            ByteBuffer bb = fromHex(readNextIdentifier());

            skipBlank();
            if (str.charAt(idx) != ':')
                throwSyntaxError("expecting ':' token");

            ++idx;
            skipBlank();
            try
            {
                AbstractType<?> type = parse();
                if (!(type instanceof CollectionType))
                    throw new SyntaxException(type + " is not a collection type");
                map.put(bb, (CollectionType)type);
            }
            catch (SyntaxException e)
            {
                SyntaxException ex = new SyntaxException(String.format("Exception while parsing '%s' around char %d", str, idx));
                ex.initCause(e);
                throw ex;
            }
        }
        throw new SyntaxException(String.format("Syntax error parsing '%s' at char %d: unexpected end of string", str, idx));
    }

    private ByteBuffer fromHex(String hex) throws SyntaxException
    {
        try
        {
            return ByteBufferUtil.hexToBytes(hex);
        }
        catch (NumberFormatException e)
        {
            throwSyntaxError(e.getMessage());
            return null;
        }
    }

    public Pair<Pair<String, ByteBuffer>, List<Pair<ByteBuffer, AbstractType>>> getUserTypeParameters() throws SyntaxException, ConfigurationException
    {

        if (isEOS() || str.charAt(idx) != '(')
            throw new IllegalStateException();

        ++idx; // skipping '('

        skipBlankAndComma();
        String keyspace = readNextIdentifier();
        skipBlankAndComma();
        ByteBuffer typeName = fromHex(readNextIdentifier());
        List<Pair<ByteBuffer, AbstractType>> defs = new ArrayList<>();

        while (skipBlankAndComma())
        {
            if (str.charAt(idx) == ')')
            {
                ++idx;
                return Pair.create(Pair.create(keyspace, typeName), defs);
            }

            ByteBuffer name = fromHex(readNextIdentifier());
            skipBlank();
            if (str.charAt(idx) != ':')
                throwSyntaxError("expecting ':' token");
            ++idx;
            skipBlank();
            try
            {
                AbstractType type = parse();
                defs.add(Pair.create(name, type));
            }
            catch (SyntaxException e)
            {
                SyntaxException ex = new SyntaxException(String.format("Exception while parsing '%s' around char %d", str, idx));
                ex.initCause(e);
                throw ex;
            }
        }
        throw new SyntaxException(String.format("Syntax error parsing '%s' at char %d: unexpected end of string", str, idx));
    }

    private static AbstractType<?> getAbstractType(String compareWith) throws ConfigurationException
    {
        String className = compareWith.contains(".") ? compareWith : "org.apache.cassandra.db.marshal." + compareWith;
        Class<? extends AbstractType<?>> typeClass = FBUtilities.<AbstractType<?>>classForName(className, "abstract-type");
        try
        {
            Field field = typeClass.getDeclaredField("instance");
            return (AbstractType<?>) field.get(null);
        }
        catch (NoSuchFieldException | IllegalAccessException e)
        {
            // Trying with empty parser
            return getRawAbstractType(typeClass, EMPTY_PARSER);
        }
    }

    private static AbstractType<?> getAbstractType(String compareWith, TypeParser parser) throws SyntaxException, ConfigurationException
    {
        String className = compareWith.contains(".") ? compareWith : "org.apache.cassandra.db.marshal." + compareWith;
        Class<? extends AbstractType<?>> typeClass = FBUtilities.<AbstractType<?>>classForName(className, "abstract-type");
        try
        {
            Method method = typeClass.getDeclaredMethod("getInstance", TypeParser.class);
            return (AbstractType<?>) method.invoke(null, parser);
        }
        catch (NoSuchMethodException | IllegalAccessException e)
        {
            // Trying to see if we have an instance field and apply the default parameter to it
            AbstractType<?> type = getRawAbstractType(typeClass);
            return AbstractType.parseDefaultParameters(type, parser);
        }
        catch (InvocationTargetException e)
        {
            ConfigurationException ex = new ConfigurationException("Invalid definition for comparator " + typeClass.getName() + ".");
            ex.initCause(e.getTargetException());
            throw ex;
        }
    }

    private static AbstractType<?> getRawAbstractType(Class<? extends AbstractType<?>> typeClass) throws ConfigurationException
    {
        try
        {
            Field field = typeClass.getDeclaredField("instance");
            return (AbstractType<?>) field.get(null);
        }
        catch (NoSuchFieldException | IllegalAccessException e)
        {
            throw new ConfigurationException("Invalid comparator class " + typeClass.getName() + ": must define a public static instance field or a public static method getInstance(TypeParser).");
        }
    }

    private static AbstractType<?> getRawAbstractType(Class<? extends AbstractType<?>> typeClass, TypeParser parser) throws ConfigurationException
    {
        try
        {
            Method method = typeClass.getDeclaredMethod("getInstance", TypeParser.class);
            return (AbstractType<?>) method.invoke(null, parser);
        }
        catch (NoSuchMethodException | IllegalAccessException e)
        {
            throw new ConfigurationException("Invalid comparator class " + typeClass.getName() + ": must define a public static instance field or a public static method getInstance(TypeParser).");
        }
        catch (InvocationTargetException e)
        {
            ConfigurationException ex = new ConfigurationException("Invalid definition for comparator " + typeClass.getName() + ".");
            ex.initCause(e.getTargetException());
            throw ex;
        }
    }

    private void throwSyntaxError(String msg) throws SyntaxException
    {
        throw new SyntaxException(String.format("Syntax error parsing '%s' at char %d: %s", str, idx, msg));
    }

    private boolean isEOS()
    {
        return isEOS(str, idx);
    }

    private static boolean isEOS(String str, int i)
    {
        return i >= str.length();
    }

    private static boolean isBlank(int c)
    {
        return c == ' ' || c == '\t' || c == '\n';
    }

    private void skipBlank()
    {
        idx = skipBlank(str, idx);
    }

    private static int skipBlank(String str, int i)
    {
        while (!isEOS(str, i) && isBlank(str.charAt(i)))
            ++i;

        return i;
    }

    // skip all blank and at best one comma, return true if there not EOS
    private boolean skipBlankAndComma()
    {
        boolean commaFound = false;
        while (!isEOS())
        {
            int c = str.charAt(idx);
            if (c == ',')
            {
                if (commaFound)
                    return true;
                else
                    commaFound = true;
            }
            else if (!isBlank(c))
            {
                return true;
            }
            ++idx;
        }
        return false;
    }

    /*
     * [0..9a..bA..B-+._&]
     */
    private static boolean isIdentifierChar(int c)
    {
        return (c >= '0' && c <= '9')
            || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')
            || c == '-' || c == '+' || c == '.' || c == '_' || c == '&';
    }

    // left idx positioned on the character stopping the read
    public String readNextIdentifier()
    {
        int i = idx;
        while (!isEOS() && isIdentifierChar(str.charAt(idx)))
            ++idx;

        return str.substring(i, idx);
    }

    /**
     * Helper function to ease the writing of AbstractType.toString() methods.
     */
    public static String stringifyAliasesParameters(Map<Byte, AbstractType<?>> aliases)
    {
        StringBuilder sb = new StringBuilder();
        sb.append('(');
        Iterator<Map.Entry<Byte, AbstractType<?>>> iter = aliases.entrySet().iterator();
        if (iter.hasNext())
        {
            Map.Entry<Byte, AbstractType<?>> entry = iter.next();
            sb.append((char)(byte)entry.getKey()).append("=>").append(entry.getValue());
        }
        while (iter.hasNext())
        {
            Map.Entry<Byte, AbstractType<?>> entry = iter.next();
            sb.append(',').append((char)(byte)entry.getKey()).append("=>").append(entry.getValue());
        }
        sb.append(')');
        return sb.toString();
    }

    /**
     * Helper function to ease the writing of AbstractType.toString() methods.
     */
    public static String stringifyTypeParameters(List<AbstractType<?>> types)
    {
        return stringifyTypeParameters(types, false);
    }

    /**
     * Helper function to ease the writing of AbstractType.toString() methods.
     */
    public static String stringifyTypeParameters(List<AbstractType<?>> types, boolean ignoreFreezing)
    {
        StringBuilder sb = new StringBuilder("(");
        for (int i = 0; i < types.size(); i++)
        {
            if (i > 0)
                sb.append(",");
            sb.append(types.get(i).toString(ignoreFreezing));
        }
        return sb.append(')').toString();
    }

    public static String stringifyCollectionsParameters(Map<ByteBuffer, ? extends CollectionType> collections)
    {
        StringBuilder sb = new StringBuilder();
        sb.append('(');
        boolean first = true;
        for (Map.Entry<ByteBuffer, ? extends CollectionType> entry : collections.entrySet())
        {
            if (!first)
                sb.append(',');

            first = false;
            sb.append(ByteBufferUtil.bytesToHex(entry.getKey())).append(":");
            sb.append(entry.getValue());
        }
        sb.append(')');
        return sb.toString();
    }

    public static String stringifyUserTypeParameters(String keysace, ByteBuffer typeName, List<FieldIdentifier> fields,
                                                     List<AbstractType<?>> columnTypes, boolean ignoreFreezing)
    {
        StringBuilder sb = new StringBuilder();
        sb.append('(').append(keysace).append(",").append(ByteBufferUtil.bytesToHex(typeName));

        for (int i = 0; i < fields.size(); i++)
        {
            sb.append(',');
            sb.append(ByteBufferUtil.bytesToHex(fields.get(i).bytes)).append(":");
            sb.append(columnTypes.get(i).toString(ignoreFreezing));
        }
        sb.append(')');
        return sb.toString();
    }
}


text:
const shelljs = require('shelljs');
const chalk = require('chalk');
const crypto = require('crypto');

/**
 * This is the Generator base class.
 * This provides all the public API methods exposed via the module system.
 * The public API methods can be directly utilized as well using commonJS require.
 *
 * The method signatures in public API should not be changed without a major version change
 */
module.exports = {
    checkDocker,
    checkImages,
    generateJwtSecret,
    configureImageNames,
    setAppsFolderPaths,
};

function checkDocker() {
    const done = this.async();

    shelljs.exec('docker -v', { silent: true }, (code, stdout, stderr) => {
        if (stderr) {
            this.log(chalk.red('Docker version 1.10.0 or later is not installed on your computer.\n' +
                '         Read http://docs.docker.com/engine/installation/#installation\n'));
        } else {
            const dockerVersion = stdout.split(' ')[2].replace(/,/g, '');
            const dockerVersionMajor = dockerVersion.split('.')[0];
            const dockerVersionMinor = dockerVersion.split('.')[1];
            if (dockerVersionMajor < 1 || (dockerVersionMajor === 1 && dockerVersionMinor < 10)) {
                this.log(chalk.red(`${'Docker version 1.10.0 or later is not installed on your computer.\n' +
                    '         Docker version found: '}${dockerVersion}\n` +
                    '         Read http://docs.docker.com/engine/installation/#installation\n'));
            }
        }
        done();
    });
}

function checkImages() {
    this.log('\nChecking Docker images in applications\' directories...');

    let imagePath = '';
    let runCommand = '';
    this.warning = false;
    this.warningMessage = 'To generate the missing Docker image(s), please run:\n';
    this.appsFolders.forEach((appsFolder, index) => {
        const appConfig = this.appConfigs[index];
        if (appConfig.buildTool === 'maven') {
            imagePath = this.destinationPath(`${this.directoryPath + appsFolder}/target/docker`);
            runCommand = './mvnw package -Pprod dockerfile:build';
        } else {
            imagePath = this.destinationPath(`${this.directoryPath + appsFolder}/build/docker`);
            runCommand = './gradlew -Pprod bootRepackage buildDocker';
        }
        if (shelljs.ls(imagePath).length === 0) {
            this.warning = true;
            this.warningMessage += `  ${chalk.cyan(runCommand)} in ${this.destinationPath(this.directoryPath + appsFolder)}\n`;
        }
    });
}

function generateJwtSecret() {
    if (this.jwtSecretKey === undefined) {
        this.jwtSecretKey = crypto.randomBytes(20).toString('hex');
    }
}

function configureImageNames() {
    for (let i = 0; i < this.appsFolders.length; i++) {
        const originalImageName = this.appConfigs[i].baseName.toLowerCase();
        const targetImageName = this.dockerRepositoryName ? `${this.dockerRepositoryName}/${originalImageName}` : originalImageName;
        this.appConfigs[i].targetImageName = targetImageName;
    }
}

function setAppsFolderPaths() {
    if (this.applicationType) return;
    this.appsFolderPaths = [];
    for (let i = 0; i < this.appsFolders.length; i++) {
        const path = this.destinationPath(this.directoryPath + this.appsFolders[i]);
        this.appsFolderPaths.push(path);
    }
}


text:
package io.netty.channel;

/**
 * {@link ChannelHandler} which adds callbacks for state changes. This allows the user
 * to hook in to state changes easily.
 */
public interface ChannelInboundHandler extends ChannelHandler {

    /**
     * The {@link Channel} of the {@link ChannelHandlerContext} was registered with its {@link EventLoop}
     */
    void channelRegistered(ChannelHandlerContext ctx) throws Exception;

    /**
     * The {@link Channel} of the {@link ChannelHandlerContext} was unregistered from its {@link EventLoop}
     *
     * @deprecated use {@link #channelInactive(ChannelHandlerContext)}
     */
    @Deprecated
    void channelUnregistered(ChannelHandlerContext ctx) throws Exception;

    /**
     * The {@link Channel} of the {@link ChannelHandlerContext} is now active
     */
    void channelActive(ChannelHandlerContext ctx) throws Exception;

    /**
     * The {@link Channel} of the {@link ChannelHandlerContext} was registered is now inactive and reached its
     * end of lifetime.
     */
    void channelInactive(ChannelHandlerContext ctx) throws Exception;

    /**
     * Invoked when the current {@link Channel} has read a message from the peer.
     */
    void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception;

    /**
     * Invoked when the last message read by the current read operation has been consumed by
     * {@link #channelRead(ChannelHandlerContext, Object)}.  If {@link ChannelOption#AUTO_READ} is off, no further
     * attempt to read an inbound data from the current {@link Channel} will be made until
     * {@link ChannelHandlerContext#read()} is called.
     */
    void channelReadComplete(ChannelHandlerContext ctx) throws Exception;

    /**
     * Gets called if an user event was triggered.
     */
    void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception;

    /**
     * Gets called once the writable state of a {@link Channel} changed. You can check the state with
     * {@link Channel#isWritable()}.
     */
    void channelWritabilityChanged(ChannelHandlerContext ctx) throws Exception;

    /**
     * Gets called if a {@link Throwable} was thrown.
     */
    @Override
    void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception;
}


text: {% with release.package as package %}{% include "pypi_frontend/package_doap.xml" %}{% endwith %}


text:
<?php

use yii\db\Schema;
use yii\db\Migration;
use common\models\Account;

class m150402_090507_add_key_flag_to_account extends Migration
{
    public function up()
    {
        $this->addColumn(Account::tableName(), 'include_key_in_email', Schema::TYPE_BOOLEAN.' NOT NULL DEFAULT 0');
    }

    public function down()
    {
        $this->dropColumn(Account::tableName(), 'include_key_in_email');
    }
}


text:
import numpy as np
import time

from paddle.fluid.op import Operator
from op_test import OpTest

class BenchmarkSuite(OpTest):
    def timeit_function(self, callback, iters, *args, **kwargs):
        assert iters != 0, "Iters should >= 1"
        start = time.time()
        for i in range(iters):
            callback(*args, **kwargs)
        elapse = time.time() - start
        return elapse / iters

    def _assert_cpu_gpu_same(self, cpu_outs, gpu_outs, fetch_list, atol):
        for item_cpu_out, item_gpu_out, variable in zip(
            cpu_outs, gpu_outs, fetch_list
        ):
            # the cpu version is baseline, expect gpu version keep same with cpu version.
            expect = item_cpu_out
            expect_t = np.array(item_cpu_out)
            actual = item_gpu_out
            actual_t = np.array(item_gpu_out)
            var_name = variable if isinstance(variable, str) else variable.name
            np.testing.assert_allclose(
                actual_t, expect_t, rtol=1e-05, atol=atol
            )
            self.assertListEqual(
                actual.lod(),
                expect.lod(),
                "Output (" + var_name + ") has different lod",
            )

    def _get_input_names(self):
        inputs = []
        for name, value in self.inputs.items():
            if isinstance(value, list):
                inputs.extend([sub_name for sub_name, _ in value])
            inputs.append(name)
        return inputs

    def _get_output_names(self):
        outputs = []
        for var_name, var in self.outputs.items():
            if isinstance(var, list):
                for sub_var_name, sub_var in var:
                    outputs.append(sub_var_name)
            else:
                outputs.append(var_name)
        if len(outputs) == 0:
            for out_name, out_dup in Operator.get_op_outputs(self.op_type):
                outputs.append(str(out_name))
        return outputs

    def check_output_stability(self, atol=1e-8):
        places = self._get_places()
        if len(places) < 2:
            return
        cpu_outs, fetch_list = self._calc_output(places[0])
        gpu_outs, _ = self._calc_output(places[1])
        self._assert_cpu_gpu_same(cpu_outs, gpu_outs, fetch_list, atol)

    def timeit_output_with_place(self, place, iters):
        return self.timeit_function(self.calc_output, iters, place)

    def timeit_output(self, iters=100):
        places = self._get_places()
        elapses = []
        for place in places:
            elapses.append(self.timeit_output_with_place(place, iters))
        for place, elapse in zip(places, elapses):
            print(
                "One pass of ({2}_op) at {0} cost {1}".format(
                    str(place), elapse, self.op_type
                )
            )

    def timeit_grad_with_place(self, place, iters=100):
        inputs_to_check = self._get_input_names()
        output_names = self._get_output_names()
        return self.timeit_function(
            self._get_gradient,
            iters,
            inputs_to_check,
            place,
            output_names,
            no_grad_set=None,
        )

    def timeit_grad(self, iters=100):
        places = self._get_places()
        elapses = []
        for place in places:
            elapses.append(self.timeit_grad_with_place(place, iters))
        for place, elapse in zip(places, elapses):
            print(
                "One pass of ({2}_grad_op) at {0} cost {1}".format(
                    str(place), elapse, self.op_type
                )
            )


text:
using X3Code.Utilities.MemoryAndStreams.Streams.Memory;
using Xunit;

// ReSharper disable ArrangeTypeMemberModifiers
// ReSharper disable UnusedMember.Local
// ReSharper disable InconsistentNaming
#pragma warning disable 0169

namespace UnitTests.XUnit.UtilitiesTests.MemoryAndStreams.Streams.Memory
{
	public class MemorySerializer_specs
	{
		[Fact]
		public void Falls_der_MemorySerializer_ein_array_serialisiert()
		{
			var referenzDaten = new object[5];
			for (int i = 0; i < referenzDaten.Length; i++)
			{
				referenzDaten[i] = $"The cake nr {i} is a lie";
			}

			//Should not throw an Exception
			var serialisiert = MemorySerializer.Serialize(referenzDaten);
			var testDaten = MemorySerializer.Deserialize(serialisiert);

			Assert.NotNull(serialisiert);
			Assert.Equal(testDaten, referenzDaten);
	}
}
}

#pragma warning restore 0169


text:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Networking;
using Zeltex.Characters;
using Zeltex;
using System.Reflection;

namespace Zeltex.Networking
{
    /// <summary>
    /// Things to do:
    /// List characters in gui
    /// List Players in gui
    /// </summary>
    public class NetworkManager : UnityEngine.Networking.NetworkManager
    {
        private bool IsHost;
        private static NetworkManager Instance;
        [SerializeField]
        private bool IsDebugGui = false;
        [SerializeField]
        private bool IsPossessOnBegin = true;

        public static NetworkManager Get()
        {
            return Instance;
        }

        private void Awake()
        {
            Instance = this;
        }

        #region GUI
        private void OnGUI()
        {
            if (IsDebugGui)
            {
                GUILayout.Space(100);
                if (!NetworkClient.active && !NetworkServer.active && matchMaker == null)
                //if (client != null && client.isConnected)
                {
                    if (GUILayout.Button("Host"))
                    {
                        HostGame();
                    }
                    if (GUILayout.Button("Join"))
                    {
                        JoinGame();
                    }
                }
               /* else
                {
                    if (NetworkServer.active)
                    {
                        GUILayout.Label("Server: port=" + networkPort);
                    }
                    if (NetworkClient.active)
                    {
                        GUILayout.Label("Client: address=" + networkAddress + " port=" + networkPort);
                    }
                }*/

                /*if (NetworkClient.active && !ClientScene.ready)
                {
                    if (GUILayout.Button("Client Ready"))
                    {
                        ClientScene.Ready(client.connection);
                        if (ClientScene.localPlayers.Count == 0)
                        {
                            ClientScene.AddPlayer(0);
                        }
                    }
                }*/

                if (NetworkServer.active || NetworkClient.active)
                {
                    if (IsHost)
                    {
                       /* if (GUILayout.Button("Spawn Objects"))
                        {
                            NetworkServer.SpawnObjects();
                        }
                        if (GUILayout.Button("Clear Objects"))
                        {
                            NetworkServer.ClearLocalObjects();
                        }
                        */
                        if (GUILayout.Button("Stop Host"))
                        {
                            StopHosting();
                        }
                    }
                    else
                    {
                       /* if (GUILayout.Button("Exit Game"))
                        {
                            Camera.main.GetComponent<Possess>().RemoveCharacter(true);
                            Game.GameMode.IsPlaying = false;
                            StopClient();
                        }*/
                    }
                }
                /*GUILayout.Label("Me: " + Network.natFacilitatorIP + " -:- " + Network.natFacilitatorPort);
                for (int i = 0; i < Network.connections.Length; i++)
                {
                    GUILayout.Label(i + ": " + Network.connections[i].ipAddress + " -:- " + Network.connections[i].port);
                }*/
            }
        }

        public void HostGame()
        {
//#if UNITY_WEBGL
           // useWebSockets = true;
//#endif
            //Debug.LogError("Hosting from " + name);
            IsHost = true;
            StartHost();
           // GameManager.Get().BeginGame();
        }

        public void StopHosting()
        {
            IsHost = false;
            /*if (CameraManager.Get().GetMainCamera() && CameraManager.Get().GetMainCamera().GetComponent<Possess>())
            {
                CameraManager.Get().GetMainCamera().GetComponent<Possess>().RemoveCharacter(true);
            }*/
            //GameManager.Get().EndGame();
            StopHost();
        }

        public void JoinGame()
        {
/*#if UNITY_WEBGL
            useWebSockets = true;
#endif*/
            StartClient();
        }

        private void CleanupPlayer()
        {
            Camera.main.GetComponent<Possess>().RemoveCharacter(true);
            if (CameraManager.Get().GetGuiCamera())
            {
                CameraManager.Get().GetGuiCamera().gameObject.SetActive(true);
            }
        }

        private void DrawConenctedGui()
        {
            /*if (Network.isServer)
            {
                if (GUILayout.Button("Stop Hosting"))
                {
                    CleanupPlayer();
                    for (int i = 0; i < Network.connections.Length; i++)
                    {
                        Network.CloseConnection(Network.connections[i], true);
                    }
                    IsHost = false;
                    //MyClient.Disconnect();
                    NetworkServer.DisconnectAll();
                    Network.Disconnect();
                }
            }
            else
            {
                if (GUILayout.Button("Exit Game"))
                {
                    CleanupPlayer();
                    for (int i = 0; i < Network.connections.Length; i++)
                    {
                        Network.CloseConnection(Network.connections[i], true);
                    }
                    //StopClient();
                    //MyClient.Disconnect();
                    Network.Disconnect();
                }
            }*/

            /*if (GUILayout.Button("Spawn"))
            {
                if (Network.isServer)
                {
                    OnServerAddPlayer(client.connection, 1);
                }
                else
                {
                    ClientScene.AddPlayer(client.connection, 1);
                }
            }*/
        }
        #endregion

        public override void OnServerConnect(NetworkConnection conn)
        {
            LogManager.Get().Log("New client connected, ID: " + conn.connectionId.ToString(), "NetworkManager");
        }
        public override void OnServerDisconnect(NetworkConnection conn)
        {
            LogManager.Get().Log("Client disconnected, ID: " + conn.connectionId.ToString(), "NetworkManager");
        }

        public override void OnClientConnect(NetworkConnection conn)
        {
            LogManager.Get().Log("Connected to Server connectionId: " + conn.connectionId, "NetworkManager");
            base.OnClientConnect(conn);
            StartCoroutine(OnClientConnectRoutine());
        }

        private IEnumerator OnClientConnectRoutine()
        {
            yield return new WaitForSeconds(0.2f);
            PoolsManager.Get().SynchPools.Invoke();
            if (IsPossessOnBegin)
            {
                yield return new WaitForSeconds(1f);
                Character MyCharacter = CharacterManager.Get().GetPoolObject();
                yield return new WaitForSeconds(1f);
                if (MyCharacter)
                {
                    Camera.main.GetComponent<Possess>().SetCharacter(MyCharacter);
                }
                else
                {
                    Debug.LogError("Could not get character from pool");
                }
            }
        }

        public override void OnClientDisconnect(NetworkConnection conn)
        {
            base.OnClientDisconnect(conn);
            LogManager.Get().Log("Disconnected from Server.", "NetworkManager");
            if (Camera.main == null)
            {
                CameraManager.Get().SpawnMainMenuCamera();
            }
        }
    }
}


text:
/**
 * Message requesting an exchange of neighborhood.
 * @private
 */
class MExchange {
  /**
     * @param {string} id The identifier of the peer.
     * @private
     */
  constructor (id) {
    this.id = id
    this.type = 'MExchange'
  }
  /**
   * get type of the message
   * @type {String}
   * @private
   */
  static get type () {
    return 'MExchange'
  }
}

module.exports = MExchange


text:
#include "search/model.hpp"

#include "indexer/classificator.hpp"
#include "indexer/feature.hpp"

#include "base/macros.hpp"
#include "base/stl_helpers.hpp"

using namespace ftypes;

namespace search
{
TwoLevelPOIChecker::TwoLevelPOIChecker() : ftypes::BaseChecker(2 /* level */)
{
  Classificator const & c = classif();
  base::StringIL arr[] = {{"highway", "bus_stop"},
                          {"highway", "speed_camera"},
                          {"waterway", "waterfall"},
                          {"natural", "volcano"},
                          {"natural", "cave_entrance"},
                          {"natural", "beach"},
                          {"emergency", "defibrillator"},
                          {"emergency", "fire_hydrant"}};

  for (size_t i = 0; i < ARRAY_SIZE(arr); ++i)
    m_types.push_back(c.GetTypeByPath(arr[i]));
}

namespace
{
/// Should be similar with ftypes::IsAddressObjectChecker object classes.
class OneLevelPOIChecker : public ftypes::BaseChecker
{
public:
  OneLevelPOIChecker() : ftypes::BaseChecker(1 /* level */)
  {
    Classificator const & c = classif();

    auto paths = {"amenity", "historic", "office", "railway", "shop", "sport", "tourism", "craft"};
    for (auto const & path : paths)
      m_types.push_back(c.GetTypeByPath({path}));
  }
};

class IsPoiChecker
{
public:
  IsPoiChecker() {}

  static IsPoiChecker const & Instance()
  {
    static const IsPoiChecker inst;
    return inst;
  }

  bool operator()(FeatureType & ft) const { return m_oneLevel(ft) || m_twoLevel(ft); }

private:
  OneLevelPOIChecker const m_oneLevel;
  TwoLevelPOIChecker const m_twoLevel;
};

class CustomIsBuildingChecker
{
public:
  static CustomIsBuildingChecker const & Instance()
  {
    static const CustomIsBuildingChecker inst;
    return inst;
  }

  bool operator()(FeatureType & ft) const
  {
    return !ft.GetHouseNumber().empty() || IsBuildingChecker::Instance()(ft);
  }

private:
  CustomIsBuildingChecker() {}
};
}  // namespace

Model::Type Model::GetType(FeatureType & feature) const
{
  static auto const & buildingChecker = CustomIsBuildingChecker::Instance();
  static auto const & streetChecker = IsStreetOrSuburbChecker::Instance();
  static auto const & localityChecker = IsLocalityChecker::Instance();
  static auto const & poiChecker = IsPoiChecker::Instance();

  // Check whether object is POI first to mark POIs with address tags as POI.
  if (poiChecker(feature))
    return TYPE_POI;

  if (buildingChecker(feature))
    return TYPE_BUILDING;

  if (streetChecker(feature))
    return TYPE_STREET;

  if (localityChecker(feature))
  {
    auto const type = localityChecker.GetType(feature);
    switch (type)
    {
    case NONE: ASSERT(false, ("Unknown locality.")); return TYPE_UNCLASSIFIED;
    case STATE: return TYPE_STATE;
    case COUNTRY: return TYPE_COUNTRY;
    case CITY:
    case TOWN: return TYPE_CITY;
    case VILLAGE: return TYPE_VILLAGE;
    case LOCALITY_COUNT: return TYPE_UNCLASSIFIED;
    }
  }

  return TYPE_UNCLASSIFIED;
}

std::string DebugPrint(Model::Type type)
{
  switch (type)
  {
  case Model::TYPE_POI: return "POI";
  case Model::TYPE_BUILDING: return "Building";
  case Model::TYPE_STREET: return "Street";
  case Model::TYPE_CITY: return "City";
  case Model::TYPE_VILLAGE: return "Village";
  case Model::TYPE_STATE: return "State";
  case Model::TYPE_COUNTRY: return "Country";
  case Model::TYPE_UNCLASSIFIED: return "Unclassified";
  case Model::TYPE_COUNT: return "Count";
  }
  ASSERT(false, ("Unknown search type:", static_cast<int>(type)));
  return {};
}
}  // namespace search


text:
namespace absl {
ABSL_NAMESPACE_BEGIN
namespace random_internal {

// Tristate tag types controlling the output of GenerateRealFromBits.
struct GeneratePositiveTag {};
struct GenerateNegativeTag {};
struct GenerateSignedTag {};

// GenerateRealFromBits generates a single real value from a single 64-bit
// `bits` with template fields controlling the output.
//
// The `SignedTag` parameter controls whether positive, negative,
// or either signed/unsigned may be returned.
//   When SignedTag == GeneratePositiveTag, range is U(0, 1)
//   When SignedTag == GenerateNegativeTag, range is U(-1, 0)
//   When SignedTag == GenerateSignedTag, range is U(-1, 1)
//
// When the `IncludeZero` parameter is true, the function may return 0 for some
// inputs, otherwise it never returns 0.
//
// When a value in U(0,1) is required, use:
//   Uniform64ToReal<double, PositiveValueT, true>;
//
// When a value in U(-1,1) is required, use:
//   Uniform64ToReal<double, SignedValueT, false>;
//
//   This generates more distinct values than the mathematical equivalent
//   `U(0, 1) * 2.0 - 1.0`.
//
// Scaling the result by powers of 2 (and avoiding a multiply) is also possible:
//   GenerateRealFromBits<double>(..., -1);  => U(0, 0.5)
//   GenerateRealFromBits<double>(..., 1);   => U(0, 2)
//
template <typename RealType,  // Real type, either float or double.
          typename SignedTag = GeneratePositiveTag,  // Whether a positive,
                                                     // negative, or signed
                                                     // value is generated.
          bool IncludeZero = true>
inline RealType GenerateRealFromBits(uint64_t bits, int exp_bias = 0) {
  using real_type = RealType;
  using uint_type = absl::conditional_t<std::is_same<real_type, float>::value,
                                        uint32_t, uint64_t>;

  static_assert(
      (std::is_same<double, real_type>::value ||
       std::is_same<float, real_type>::value),
      "GenerateRealFromBits must be parameterized by either float or double.");

  static_assert(sizeof(uint_type) == sizeof(real_type),
                "Mismatched unsinged and real types.");

  static_assert((std::numeric_limits<real_type>::is_iec559 &&
                 std::numeric_limits<real_type>::radix == 2),
                "RealType representation is not IEEE 754 binary.");

  static_assert((std::is_same<SignedTag, GeneratePositiveTag>::value ||
                 std::is_same<SignedTag, GenerateNegativeTag>::value ||
                 std::is_same<SignedTag, GenerateSignedTag>::value),
                "");

  static constexpr int kExp = std::numeric_limits<real_type>::digits - 1;
  static constexpr uint_type kMask = (static_cast<uint_type>(1) << kExp) - 1u;
  static constexpr int kUintBits = sizeof(uint_type) * 8;

  int exp = exp_bias + int{std::numeric_limits<real_type>::max_exponent - 2};

  // Determine the sign bit.
  // Depending on the SignedTag, this may use the left-most bit
  // or it may be a constant value.
  uint_type sign = std::is_same<SignedTag, GenerateNegativeTag>::value
                       ? (static_cast<uint_type>(1) << (kUintBits - 1))
                       : 0;
  if (std::is_same<SignedTag, GenerateSignedTag>::value) {
    if (std::is_same<uint_type, uint64_t>::value) {
      sign = bits & uint64_t{0x8000000000000000};
    }
    if (std::is_same<uint_type, uint32_t>::value) {
      const uint64_t tmp = bits & uint64_t{0x8000000000000000};
      sign = static_cast<uint32_t>(tmp >> 32);
    }
    // adjust the bits and the exponent to account for removing
    // the leading bit.
    bits = bits & uint64_t{0x7FFFFFFFFFFFFFFF};
    exp++;
  }
  if (IncludeZero) {
    if (bits == 0u) return 0;
  }

  // Number of leading zeros is mapped to the exponent: 2^-clz
  // bits is 0..01xxxxxx. After shifting, we're left with 1xxx...0..0
  int clz = countl_zero(bits);
  bits <<= (IncludeZero ? clz : (clz & 63));  // remove 0-bits.
  exp -= clz;                                 // set the exponent.
  bits >>= (63 - kExp);

  // Construct the 32-bit or 64-bit IEEE 754 floating-point value from
  // the individual fields: sign, exp, mantissa(bits).
  uint_type val = sign | (static_cast<uint_type>(exp) << kExp) |
                  (static_cast<uint_type>(bits) & kMask);

  // bit_cast to the output-type
  real_type result;
  memcpy(static_cast<void*>(&result), static_cast<const void*>(&val),
         sizeof(result));
  return result;
}

}  // namespace random_internal
ABSL_NAMESPACE_END
}  // namespace absl

#endif  // ABSL_RANDOM_INTERNAL_GENERATE_REAL_H_


text:
<?php

namespace Elastica\Test\Aggregation;

use Elastica\Aggregation\ExtendedStatsBucket;
use Elastica\Aggregation\Histogram;
use Elastica\Aggregation\Max;
use Elastica\Document;
use Elastica\Index;
use Elastica\Query;

/**
 * @internal
 */
class ExtendedStatsBucketTest extends BaseAggregationTest
{
    /**
     * @group functional
     */
    public function testExtendedStatBucketAggregation(): void
    {
        $bucketScriptAggregation = new ExtendedStatsBucket('result', 'age_groups>max_weight');

        $histogramAggregation = new Histogram('age_groups', 'age', 10);

        $histogramAggregation->addAggregation((new Max('max_weight'))->setField('weight'));

        $query = Query::create([])
            ->addAggregation($histogramAggregation)
            ->addAggregation($bucketScriptAggregation)
        ;

        $results = $this->_getIndexForTest()->search($query)->getAggregation('result');

        $this->assertEquals(3, $results['count']);
        $this->assertEquals(50, $results['min']);
        $this->assertEquals(70, $results['max']);
        $this->assertEquals(60, $results['avg']);
        $this->assertEquals(180, $results['sum']);
        $this->assertEquals(11000, $results['sum_of_squares']);
        $this->assertEquals(66.66666666666667, $results['variance']);
        $this->assertEquals(8.16496580927726, $results['std_deviation']);
        $this->assertEquals(['upper' => 76.32993161855453, 'lower' => 43.670068381445475], $results['std_deviation_bounds']);
    }

    /**
     * @group unit
     */
    public function testOverrideBucketsPathThroughSetters(): void
    {
        $serialDiffAgg = new ExtendedStatsBucket('bucket_part', 'foobar');

        $serialDiffAgg
            ->setBucketsPath('age_groups>max_weight')
            ->setFormat('test_format')
            ->setGapPolicy(10)
        ;

        $expected = [
            'extended_stats_bucket' => [
                'buckets_path' => 'age_groups>max_weight',
                'format' => 'test_format',
                'gap_policy' => 10,
            ],
        ];

        $this->assertEquals($expected, $serialDiffAgg->toArray());
    }

    private function _getIndexForTest(): Index
    {
        $index = $this->_createIndex();

        $index->addDocuments([
            Document::create(['weight' => 60, 'height' => 180, 'age' => 25]),
            Document::create(['weight' => 70, 'height' => 156, 'age' => 32]),
            Document::create(['weight' => 50, 'height' => 155, 'age' => 45]),
        ]);

        $index->refresh();

        return $index;
    }
}


text:
@lombok.RequiredArgsConstructor class RequiredArgsConstructor1 {
  final int x;
  String name;
  public @java.beans.ConstructorProperties({"x"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") RequiredArgsConstructor1(final int x) {
    super();
    this.x = x;
  }
}
@lombok.RequiredArgsConstructor(access = lombok.AccessLevel.PROTECTED) class RequiredArgsConstructorAccess {
  final int x;
  String name;
  protected @java.beans.ConstructorProperties({"x"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") RequiredArgsConstructorAccess(final int x) {
    super();
    this.x = x;
  }
}
@lombok.RequiredArgsConstructor(staticName = "staticname") class RequiredArgsConstructorStaticName {
  final int x;
  String name;
  private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") RequiredArgsConstructorStaticName(final int x) {
    super();
    this.x = x;
  }
  public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") RequiredArgsConstructorStaticName staticname(final int x) {
    return new RequiredArgsConstructorStaticName(x);
  }
}
@lombok.RequiredArgsConstructor() class RequiredArgsConstructorWithAnnotations {
  final int x;
  String name;
  public @Deprecated @java.beans.ConstructorProperties({"x"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") RequiredArgsConstructorWithAnnotations(final int x) {
    super();
    this.x = x;
  }
}
@lombok.AllArgsConstructor class AllArgsConstructor1 {
  final int x;
  String name;
  public @java.beans.ConstructorProperties({"x", "name"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") AllArgsConstructor1(final int x, final String name) {
    super();
    this.x = x;
    this.name = name;
  }
}
@lombok.NoArgsConstructor class NoArgsConstructor1 {
  int x;
  String name;
  public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") NoArgsConstructor1() {
    super();
  }
}
@lombok.RequiredArgsConstructor(staticName = "of") class RequiredArgsConstructorStaticNameGenerics<T extends Number> {
  final T x;
  String name;
  private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") RequiredArgsConstructorStaticNameGenerics(final T x) {
    super();
    this.x = x;
  }
  public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") <T extends Number>RequiredArgsConstructorStaticNameGenerics<T> of(final T x) {
    return new RequiredArgsConstructorStaticNameGenerics<T>(x);
  }
}
@lombok.RequiredArgsConstructor(staticName = "of") class RequiredArgsConstructorStaticNameGenerics2<T extends Number> {
  final Class<T> x;
  String name;
  private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") RequiredArgsConstructorStaticNameGenerics2(final Class<T> x) {
    super();
    this.x = x;
  }
  public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") <T extends Number>RequiredArgsConstructorStaticNameGenerics2<T> of(final Class<T> x) {
    return new RequiredArgsConstructorStaticNameGenerics2<T>(x);
  }
}
@lombok.AllArgsConstructor(access = lombok.AccessLevel.PACKAGE) class AllArgsConstructorPackageAccess {
  final String x;
  @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") AllArgsConstructorPackageAccess(final String x) {
    super();
    this.x = x;
  }
}
@lombok.NoArgsConstructor(force = true) class NoArgsConstructor2 {
  final int x;
  final double y;
  final char c;
  final boolean b;
  final float f;
  final String s;
  byte z;
  public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") NoArgsConstructor2() {
    super();
    this.x = 0;
    this.y = 0D;
    this.c = '\0';
    this.b = false;
    this.f = 0F;
    this.s = null;
  }
}


text:
div#reimbursements > div.panel-heading > span.pull-right {
    display: inline-block;
    width: 20%;
    position: relative;
    top: -25px;
    left: 12px;
}

div#reimbursements > div.panel-heading > span.pull-right:last-child {
    text-align: right;
    padding-right: 10px;
    line-height: 35px;
}

div#reimbursements tbody tr td:last-child div {
    width: 122px;
}

div#reimbursements tbody tr td:last-child div a.btn:first-child {
    width: 56px;
    margin-right: 8px;
}


text:
#ifndef itkBModeImageFilter_h
#define itkBModeImageFilter_h

#include "itkAddImageFilter.h"
#include "itkComplexToModulusImageFilter.h"
#include "itkConstantPadImageFilter.h"
#include "itkRegionFromReferenceImageFilter.h"
#include "itkImageToImageFilter.h"
#include "itkImage.h"
#include "itkLog10ImageFilter.h"

#include "itkAnalyticSignalImageFilter.h"

namespace itk
{

/**
 * \class BModeImageFilter
 *
 * \brief Create an ultrasound B-Mode (Brightness-Mode) image from raw
 * "RF" data.  The RF's envelope is calculated from the analytic signal and
 * logarithmic intensity transform is applied.
 *
 * Use SetDirection() to define the axis of propagation.
 *
 * Use SetFrequencyFilter() to add a filtering step before the analytic
 * signal computation.
 *
 * \sa AnalyticSignalImageFilter
 *
 * \ingroup Ultrasound
 */
template <typename TInputImage,
          typename TOutputImage = TInputImage,
          typename TComplexImage = Image<std::complex<typename TInputImage::PixelType>, TInputImage::ImageDimension>>
class ITK_TEMPLATE_EXPORT BModeImageFilter : public ImageToImageFilter<TInputImage, TOutputImage>
{
public:
  /** Standard class type alias.   */
  using Self = BModeImageFilter;
  using Superclass = ImageToImageFilter<TInputImage, TOutputImage>;
  using Pointer = SmartPointer<Self>;
  using ConstPointer = SmartPointer<const Self>;

  /** The type of input image.   */
  using InputImageType = TInputImage;

  /** Dimension of the input and output images. */
  itkStaticConstMacro(ImageDimension, unsigned int, TInputImage::ImageDimension);

  /** Typedef support for the input image scalar value type. */
  using InputPixelType = typename InputImageType::PixelType;

  /** The type of output image.   */
  using OutputImageType = TOutputImage;

  /** Typedef support for the output image scalar value type. */
  using OutputPixelType = typename OutputImageType::PixelType;

  /** Typedef of the image used for internal computations that has
   * std::complex pixels. */
  using ComplexImageType = TComplexImage;

  /** Other convenient type alias   */
  using InputRegionType = typename InputImageType::RegionType;
  using InputSizeType = typename InputImageType::SizeType;
  using InputIndexType = typename InputImageType::IndexType;

  /** Run-time type information (and related methods) */
  itkTypeMacro(BModeImageFilter, ImageToImageFilter);

  /** Method for creation through the object factory. */
  itkNewMacro(Self);

  using FrequencyFilterType = FrequencyDomain1DImageFilter<ComplexImageType, ComplexImageType>;

  /** Set the direction in which the envelope is to be calculated. */
  virtual void
  SetDirection(unsigned int direction)
  {
    this->m_AnalyticFilter->SetDirection(direction);
    this->Modified();
  }

  /** Get the direction in which the envelope is to be calculated. */
  virtual unsigned int
  GetDirection() const
  {
    return m_AnalyticFilter->GetDirection();
  }

  void
  SetFrequencyFilter(FrequencyFilterType * filter)
  {
    m_AnalyticFilter->SetFrequencyFilter(filter);
  }

protected:
  BModeImageFilter();
  ~BModeImageFilter() {}

  virtual void
  PrintSelf(std::ostream & os, Indent indent) const override;

  virtual void
  GenerateData() override;

  // These behave like their analogs in Forward1DFFTImageFilter.
  virtual void
  GenerateInputRequestedRegion() override;
  virtual void
  EnlargeOutputRequestedRegion(DataObject * output) override;

  /** Component filters. */
  using AnalyticType = AnalyticSignalImageFilter<InputImageType, ComplexImageType>;
  using ComplexToModulusType = ComplexToModulusImageFilter<typename AnalyticType::OutputImageType, OutputImageType>;
  using PadType = ConstantPadImageFilter<InputImageType, InputImageType>;
  using AddConstantType = AddImageFilter<InputImageType, InputImageType>;
  using LogType = Log10ImageFilter<InputImageType, OutputImageType>;
  using ROIType = RegionFromReferenceImageFilter<OutputImageType, OutputImageType>;

private:
  BModeImageFilter(const Self &); // purposely not implemented
  void
  operator=(const Self &); // purposely not implemented

  typename AnalyticType::Pointer         m_AnalyticFilter;
  typename ComplexToModulusType::Pointer m_ComplexToModulusFilter;
  typename PadType::Pointer              m_PadFilter;
  typename AddConstantType::Pointer      m_AddConstantFilter;
  typename LogType::Pointer              m_LogFilter;
  typename ROIType::Pointer              m_ROIFilter;
};

} // end namespace itk

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

#endif // itkBModeImageFilter_h


text:
package org.apache.druid.query.aggregation.momentsketch;

import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;

import java.io.IOException;

public class MomentSketchJsonSerializer extends JsonSerializer<MomentSketchWrapper>
{
  @Override
  public void serialize(
      MomentSketchWrapper momentsSketch,
      JsonGenerator jsonGenerator,
      SerializerProvider serializerProvider
  ) throws IOException
  {
    jsonGenerator.writeBinary(momentsSketch.toByteArray());
  }
}


text:
include_guard(GLOBAL)

include(extensions)

zephyr_get(APPLICATION_CONFIG_DIR)
if(DEFINED APPLICATION_CONFIG_DIR)
  string(CONFIGURE ${APPLICATION_CONFIG_DIR} APPLICATION_CONFIG_DIR)
  if(NOT IS_ABSOLUTE ${APPLICATION_CONFIG_DIR})
    get_filename_component(APPLICATION_CONFIG_DIR ${APPLICATION_CONFIG_DIR} ABSOLUTE)
  endif()
else()
  # Application config dir is not set, so we default to the  application
  # source directory as configuration directory.
  set(APPLICATION_CONFIG_DIR ${APPLICATION_SOURCE_DIR})
endif()

zephyr_get(CONF_FILE SYSBUILD LOCAL)
if(DEFINED CONF_FILE)
  # This ensures that CACHE{CONF_FILE} will be set correctly to current scope
  # variable CONF_FILE. An already current scope variable will stay the same.
  set(CONF_FILE ${CONF_FILE})

  # CONF_FILE has either been specified on the cmake CLI or is already
  # in the CMakeCache.txt. This has precedence over the environment
  # variable CONF_FILE and the default prj.conf

  # In order to support a `prj_<name>.conf pattern for auto inclusion of board
  # overlays, then we must first ensure only a single conf file is provided.
  string(CONFIGURE "${CONF_FILE}" CONF_FILE_EXPANDED)
  string(REPLACE " " ";" CONF_FILE_AS_LIST "${CONF_FILE_EXPANDED}")
  list(LENGTH CONF_FILE_AS_LIST CONF_FILE_LENGTH)
  if(${CONF_FILE_LENGTH} EQUAL 1)
    # Need the file name to look for match.
    # Need path in order to check if it is absolute.
    get_filename_component(CONF_FILE_NAME ${CONF_FILE} NAME)
    if(${CONF_FILE_NAME} MATCHES "prj_(.*).conf")
      set(CONF_FILE_BUILD_TYPE ${CMAKE_MATCH_1})
      set(CONF_FILE_INCLUDE_FRAGMENTS true)
    endif()
  endif()
elseif(CACHED_CONF_FILE)
  # Cached conf file is present.
  # That value has precedence over anything else than a new
  # `cmake -DCONF_FILE=<file>` invocation.
  set(CONF_FILE ${CACHED_CONF_FILE})
elseif(EXISTS   ${APPLICATION_CONFIG_DIR}/prj_${BOARD}.conf)
  set(CONF_FILE ${APPLICATION_CONFIG_DIR}/prj_${BOARD}.conf)

elseif(EXISTS   ${APPLICATION_CONFIG_DIR}/prj.conf)
  set(CONF_FILE ${APPLICATION_CONFIG_DIR}/prj.conf)
  set(CONF_FILE_INCLUDE_FRAGMENTS true)
endif()

if(CONF_FILE_INCLUDE_FRAGMENTS)
  zephyr_file(CONF_FILES ${APPLICATION_CONFIG_DIR}/boards KCONF CONF_FILE BUILD ${CONF_FILE_BUILD_TYPE})
endif()

set(APPLICATION_CONFIG_DIR ${APPLICATION_CONFIG_DIR} CACHE INTERNAL "The application configuration folder")
set(CACHED_CONF_FILE ${CONF_FILE} CACHE STRING "If desired, you can build the application using\
the configuration settings specified in an alternate .conf file using this parameter. \
These settings will override the settings in the application's .config file or its default .conf file.\
Multiple files may be listed, e.g. CONF_FILE=\"prj1.conf;prj2.conf\" \
The CACHED_CONF_FILE is internal Zephyr variable used between CMake runs. \
To change CONF_FILE, use the CONF_FILE variable.")
unset(CONF_FILE CACHE)

zephyr_file(CONF_FILES ${APPLICATION_CONFIG_DIR}/boards DTS APP_BOARD_DTS)

# The CONF_FILE variable is now set to its final value.
zephyr_boilerplate_watch(CONF_FILE)

zephyr_get(DTC_OVERLAY_FILE SYSBUILD LOCAL)
if(DTC_OVERLAY_FILE)
  # DTC_OVERLAY_FILE has either been specified on the cmake CLI or is already
  # in the CMakeCache.txt.
elseif(APP_BOARD_DTS)
  set(DTC_OVERLAY_FILE ${APP_BOARD_DTS})
elseif(EXISTS          ${APPLICATION_CONFIG_DIR}/${BOARD}.overlay)
  set(DTC_OVERLAY_FILE ${APPLICATION_CONFIG_DIR}/${BOARD}.overlay)
elseif(EXISTS          ${APPLICATION_CONFIG_DIR}/app.overlay)
  set(DTC_OVERLAY_FILE ${APPLICATION_CONFIG_DIR}/app.overlay)
endif()

set(DTC_OVERLAY_FILE ${DTC_OVERLAY_FILE} CACHE STRING "If desired, you can \
build the application using the DT configuration settings specified in an \
alternate .overlay file using this parameter. These settings will override the \
settings in the board's .dts file. Multiple files may be listed, e.g. \
DTC_OVERLAY_FILE=\"dts1.overlay dts2.overlay\"")

# The DTC_OVERLAY_FILE variable is now set to its final value.
zephyr_boilerplate_watch(DTC_OVERLAY_FILE)


text:
(function($) {

	var app = window.app || (window.app = {});

	app.page = function(root, params) {

	}

	app.page.prototype = {
		init: function() {
			//initialize the page
		}
	}

}(jQuery));

$(window).ready(function() {
	app.util.init("app.page", window.document, {});
});


text:
package xworker.javafx.util;

import javafx.beans.property.SimpleMapProperty;
import org.xmeta.ActionContext;
import org.xmeta.Thing;
import xworker.lang.actions.ActionContainer;

public class RunAction {
    public static Object create(ActionContext actionContext){
        Thing self = actionContext.getObject("self");
        Object result = null;
        for(Thing child : self.getChilds()){
            result = child.getAction().run(actionContext);
        }

        return result;
    }

    public static Object createActionContainer(ActionContext actionContext){
        Thing self = (Thing) actionContext.get("self");

        ActionContainer scriptContainer = new ActionContainer(self, actionContext);
        for(Thing ext : self.getExtends()) {
            scriptContainer.append(ext);
        }

        actionContext.getScope(0).put(self.getMetadata().getName(), scriptContainer);
        return scriptContainer;
    }
}