text:
function DockDescriptor(){
    this.upper_dock = [];
    this.lower_dock = [];
    this.param_dock = [];
    this.stack_dock = [];
}

DockDescriptor.prototype = {
    constructor: DockDescriptor,
    add_upper_dock: function(point){
        this.upper_dock.push(point);
    },
    add_lower_dock: function(point){
        this.lower_dock.push(point);
    },
    add_param_dock: function(point){
        this.param_dock.push(point);
    },
    add_stack_dock: function(point){
        this.stack_dock.push(point);
    },
    has_upper_dock: function(){
        if (this.upper_dock.length > 0){
            return true;
        }else{
            return false;
        }
    },
    has_lower_dock: function(){
        if (this.lower_dock.length > 0){
            return true;
        }else{
            return false;
        }
    },
    has_param_dock: function(){
        if (this.param_dock.length > 0){
            return true;
        }else{
            return false;
        }
    },
    has_stack_dock: function(){
        if (this.stack_dock.length > 0){
            return true;
        }else{
            return false;
        }
    },
    get_upper_dock: function(){
        return this.upper_dock[0];
    },
    get_lower_dock: function(){
        return this.lower_dock[0];
    },
    has_giving_param: function(){
        var result = false;
        for (var i=0; i<this.param_dock.length; i++){
            if (this.param_dock[i][0] < 50){
                result = true;
                break;
            }
        }
        return result;
    },
    get_giving_point: function(){
        var point = null;
        for (var i=0; i<this.param_dock.length; i++){
            if (this.param_dock[i][0] < 50){
                point = this.param_dock[i];
                break;
            }
        }
        return point;
    },
    has_receiver_param: function(){
        var result = false;
        for (var i=0; i<this.param_dock.length; i++){
            if (this.param_dock[i][0] > 50){
                result = true;
                break;
            }
        }
        return result;
    },
    get_receiver_points: function(){
        var point_array = [];
        for (var i=0; i<this.param_dock.length; i++){
            if (this.param_dock[i][0] > 50){
                point_array.push(this.param_dock[i]);
            }
        }
        return point_array;
    },
    get_stack_points: function(){
        return this.stack_dock;
    }
}


text:
MarkDownBlockBundle
-------------------

MarkDownBlockBundle add the EpicEditor Markdown editor to RedKite CMS

Installation
------------

You can add the **MarkDownBlockBundle** to your application adding it to the composer.json
file of your application:

.. code-block:: text

    {
        "require": {
            "redkite-cms/markdown-bundle": "dev-master"
        }
    }

redpajama_set_name: RedPajamaGithub


text:
<?php
namespace Malezha\Menu\Contracts;

use Illuminate\Contracts\Container\Container;

/**
 * Interface MenuRender
 * @package Malezha\Menu\Contracts
 */
interface MenuRender
{
    /**
     * MenuRender constructor.
     * @param Container $container
     */
    public function __construct(Container $container);

    /**
     * Set view for render
     *
     * @param string $view
     * @throws \Exception
     * @return MenuRender
     */
    public function make($view);

    /**
     * Add variables to view
     *
     * @param array|string
     * @param null|mixed
     * @return MenuRender
     */
    public function with($params, $value = null);

    /**
     * @return string
     */
    public function render();

    /**
     * @param string $view
     * @return bool
     */
    public function exists($view);
}


text:
package labels

import (
	"testing"

	"github.com/ingrammicro/concerto/testdata"
	"github.com/stretchr/testify/assert"
)

func TestNewLabelServiceNil(t *testing.T) {
	assert := assert.New(t)
	rs, err := NewLabelService(nil)
	assert.Nil(rs, "Uninitialized service should return nil")
	assert.NotNil(err, "Uninitialized service should return error")
}

func TestGetLabelsList(t *testing.T) {
	labelsIn := testdata.GetLabelData()
	GetLabelListMocked(t, labelsIn)
	GetLabelListMockedWithNamespace(t, testdata.GetLabelWithNamespaceData())
	GetLabelListFailErrMocked(t, labelsIn)
	GetLabelListFailStatusMocked(t, labelsIn)
	GetLabelListFailJSONMocked(t, labelsIn)
}

func TestCreateLabel(t *testing.T) {
	labelsIn := testdata.GetLabelData()
	for _, labelIn := range labelsIn {
		CreateLabelMocked(t, labelIn)
		CreateLabelFailErrMocked(t, labelIn)
		CreateLabelFailStatusMocked(t, labelIn)
		CreateLabelFailJSONMocked(t, labelIn)
	}
}

func TestAddLabel(t *testing.T) {
	labelsIn := testdata.GetLabelData()
	labeledResourcesOut := testdata.GetLabeledResourcesData()
	for _, labelIn := range labelsIn {
		AddLabelMocked(t, labelIn, labeledResourcesOut)
		AddLabelFailErrMocked(t, labelIn, labeledResourcesOut)
		AddLabelFailStatusMocked(t, labelIn, labeledResourcesOut)
		AddLabelFailJSONMocked(t, labelIn, labeledResourcesOut)
	}
}

func TestRemoveLabel(t *testing.T) {
	labelsIn := testdata.GetLabelData()
	for _, labelIn := range labelsIn {
		RemoveLabelMocked(t, labelIn)
		RemoveLabelFailErrMocked(t, labelIn)
		RemoveLabelFailStatusMocked(t, labelIn)
	}
}


text:
motor_control
============

Illinois Robotics in Space 2014 - 2015
============
This repo is maintained and monitored by Raj Vinjamuri
Created under the Apache OSS License.

Only push working code to master!


text:
package algorithms.imageProcessing.features;

import algorithms.Rotate;
import algorithms.imageProcessing.GreyscaleImage;
import algorithms.imageProcessing.ImageIOHelper;
import algorithms.imageProcessing.transform.TransformationParameters;
import algorithms.imageProcessing.transform.Transformer;
import algorithms.util.ResourceFinder;
import java.io.IOException;
import java.util.Arrays;
import junit.framework.TestCase;

/**
 *
 * @author nichole
 */
public class HOGs2Test extends TestCase {

    public HOGs2Test() {
    }

    public void test1() throws IOException {

        int w = 60;
        int h = 60;
        int xc1 = 226;
        int yc1 = 160;

        int dw = w-1;
        int dh = h-1;

        int N_PIX_PER_CELL_DIM = 1;
        int N_CELLS_PER_BLOCK_DIM = 1;
        //int N_PIX_PER_CELL_DIM = 3;    //1;  3;
        //int N_CELLS_PER_BLOCK_DIM = 3; //10; 3;
        //int angle = 20;
        int nBins = 9;//180/angle;

        Transformer transformer = new Transformer();
        TransformationParameters params = new TransformationParameters();
        params.setRotationInDegrees(90);
        params.setScale(1);
        params.setOriginX(0);
        params.setOriginY(0);

        // make a test with spiral.png
        String filePath = ResourceFinder.findFileInTestResources(
            "android_statues_objects.png");

        GreyscaleImage img = ImageIOHelper.readImageAsGrayScaleAvgRGB(filePath);

        GreyscaleImage img1 = null;
        GreyscaleImage img1_rot = null;
        HOGs hogs1 = null;
        HOGs hogs1_rot = null;

        img1 = img.subImage(xc1, yc1, w, h);

        params.setTranslationX(0);
        params.setTranslationY(img1.getWidth() - 1);
        img1_rot = transformer.applyTransformation(img1, params,
            img1.getHeight(), img1.getWidth());

        //MiscDebug.writeImage(img1, "img1");
        //MiscDebug.writeImage(img1_rot, "img1_rot");

        hogs1 = new HOGs(img1, N_PIX_PER_CELL_DIM, N_CELLS_PER_BLOCK_DIM, nBins);
        hogs1_rot = new HOGs(img1_rot, N_PIX_PER_CELL_DIM, N_CELLS_PER_BLOCK_DIM, nBins);

        int[] histCenter = new int[nBins];
        int[] histCenter_rot = new int[nBins];

        hogs1.extractBlock(w/2, h/2, histCenter);

        hogs1_rot.extractBlock((w/2), (h/2)-1, histCenter_rot);

        System.out.println("histCenter=    " + Arrays.toString(histCenter));
        int[] tmp = Arrays.copyOf(histCenter_rot, nBins);
        //Rotate rotate = new Rotate();
        //rotate.rotate(tmp, 4);
        System.out.println("histCenter_rot=" + Arrays.toString(tmp));

        //assertTrue(Arrays.equals(histCenter, tmp));
    }
}


text:
package sos.base.util.namayangar.view;

import java.util.Collection;
import java.util.List;

import javax.swing.JMenuItem;

import rescuecore2.config.Config;

/**
   An abstract ViewLayer implementation.
 */
public abstract class AbstractViewLayer implements ViewLayer {
    /** The LayerViewComponent this layer is part of. */
    protected LayerViewComponent component;

    private boolean visible;

    /**
       Construct a new, visible AbstractViewLayer.
    */
    protected AbstractViewLayer() {
        visible = true;
    }

    @Override
    public void setLayerViewComponent(LayerViewComponent c) {
        component = c;
    }

    @Override
    public List<JMenuItem> getPopupMenuItems() {
        return null;
    }

    @Override
    public void initialise(Config config) {
    }

    @Override
    public void setVisible(boolean b) {
        visible = b;
    }

    @Override
    public boolean isVisible() {
        return visible;
    }

    /**
       Process a set of objects and recursively inspect collections and arrays.
       @param objects The objects to process.
    */
    protected void processView(Object... objects) {
        if (objects == null) {
            return;
        }
        for (Object next : objects) {
            process(next);
        }
    }

    /**
       Callback function for processing a concrete viewable object.
       @param o The object to process.
     */
    protected abstract void viewObject(Object o);

    private void process(Object o) {
        if (o == null) {
            return;
        }
        if (o instanceof Collection<?>) {
            for (Object next : ((Collection<?>)o)) {
                process(next);
            }
        }
        else if (o.getClass().isArray()) {
            for (Object next : (Object[])o) {
                process(next);
            }
        }
        else {
            viewObject(o);
        }
    }
}


text:
import os, shutil
from mojo.extensions import ExtensionBundle

basePath = os.path.dirname(__file__)
sourcePath = os.path.join(basePath, 'source')
libPath = os.path.join(sourcePath, 'code')
htmlPath = os.path.join(sourcePath, 'docs')
resourcesPath = os.path.join(sourcePath, 'resources')
licensePath = os.path.join(basePath, 'LICENSE')
pycOnly = False
extensionFile = 'ShapeTool.roboFontExt'
extensionPath = os.path.join(basePath, extensionFile)

B = ExtensionBundle()
B.name = "ShapeTool"
B.developer = 'TypeMyType'
B.developerURL = 'http://www.typemytype.com'
B.icon = os.path.join(basePath, 'ShapeToolMechanicIcon.png')
B.version = '1.9'
B.launchAtStartUp = True
B.mainScript = 'drawShapesTool.py'
B.html = True
B.requiresVersionMajor = '4'
B.requiresVersionMinor = '0'
B.addToMenu = []

with open(licensePath) as license:
    B.license = license.read()

# copy README + images to extension docs
if not os.path.exists(htmlPath):
    os.makedirs(htmlPath)
shutil.copyfile(os.path.join(basePath, 'README.md'), os.path.join(htmlPath, 'index.md'))
for img in ['ShapeTool_dialog.png', 'ShapeTool_toolbar.png', 'ShapeToolMechanicIcon.png']:
    shutil.copyfile(os.path.join(basePath, img), os.path.join(htmlPath, img))

print('building extension...', end=' ')
B.save(extensionPath, libPath=libPath, htmlPath=htmlPath, resourcesPath=resourcesPath, pycOnly=pycOnly)
print('done!')

print()
print(B.validationErrors())


text:
.pvtUi {
    color: #2a3f5f;
    font-family: Verdana;
    border-collapse: collapse;
}
.pvtUi select {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -khtml-user-select: none;
    -ms-user-select: none;
}

.pvtUi td.pvtOutput {
    vertical-align: top;
}

table.pvtTable {
    font-size: 8pt;
    text-align: left;
    border-collapse: collapse;
    margin-top: 3px;
    margin-left: 3px;
    font-family: Verdana;
}
table.pvtTable thead tr th, table.pvtTable tbody tr th {
    background-color: #EBF0F8;
    border: 1px solid #C8D4E3;
    font-size: 8pt;
    padding: 5px;
}

table.pvtTable .pvtColLabel {text-align: center;}
table.pvtTable .pvtTotalLabel {text-align: right;}

table.pvtTable tbody tr td {
    color: #2a3f5f;
    padding: 5px;
    background-color: #FFF;
    border: 1px solid #C8D4E3;
    vertical-align: top;
    text-align: right;
}

.pvtTotal, .pvtGrandTotal { font-weight: bold; }

.pvtRowOrder, .pvtColOrder {
    cursor:pointer;
    width: 15px;
    margin-left: 5px;
    display: inline-block;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -khtml-user-select: none;
    -ms-user-select: none;
}

.pvtAxisContainer, .pvtVals {
    border: 1px solid #A2B1C6;
    background: #f2f5fa;
    padding: 5px;
    min-width: 20px;
    min-height: 20px;
}

.pvtRenderers {
    padding-left: 6px;
    padding-top: 11px;
    padding-bottom: 14px;
}

.pvtVals {
    text-align: center;
    white-space: nowrap;
    vertical-align: top;
    padding-top: 10px;
    padding-bottom: 14px;
}

.pvtRows { height: 35px; }

.pvtAxisContainer li {
    padding: 8px 6px;
    list-style-type: none;
    cursor:move;
}
.pvtAxisContainer li.pvtPlaceholder {
    -webkit-border-radius: 5px;
    padding: 3px 15px;
    -moz-border-radius: 5px;
    border-radius: 5px;
    border: 1px dashed #A2B1C6;
}
.pvtAxisContainer li.pvtPlaceholder span.pvtAttr {
    display: none;
}

.pvtAxisContainer li span.pvtAttr {
    -webkit-text-size-adjust: 100%;
    background: #F3F6FA;
    border: 1px solid #C8D4E3;
    padding: 2px 5px;
    white-space:nowrap;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -khtml-user-select: none;
    -ms-user-select: none;
}

.pvtTriangle {
    cursor:pointer;
    color: #506784;
}

.pvtHorizList li { display: inline-block; }
.pvtVertList { vertical-align: top; }

.pvtFilteredAttribute { font-style: italic }

.sortable-chosen .pvtFilterBox { display: none !important; }

.pvtCloseX {
    position: absolute;
    right: 5px;
    top: 5px;
    font-size: 18px;
    cursor: pointer;
}

.pvtDragHandle {
    position: absolute;
    left: 5px;
    top: 5px;
    font-size: 18px;
    cursor: move;
    color: #A2B1C6;
}

.pvtFilterBox{
    z-index: 100;
    width: 300px;
    border: 1px solid #506784;
    background-color: #fff;
    position: absolute;
    text-align: center;
    user-select: none;
    min-height: 100px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -khtml-user-select: none;
    -ms-user-select: none;
}

.pvtFilterBox h4{ margin: 15px; }
.pvtFilterBox p { margin: 10px auto; }
.pvtFilterBox button { color: #2a3f5f; }
.pvtFilterBox input[type='text'] { width: 230px; color: #2a3f5f; margin-bottom: 5px;}

.pvtCheckContainer{
    text-align: left;
    font-size: 14px;
    white-space: nowrap;
    overflow-y: scroll;
    width: 100%;
    max-height: 30vh;
    border-top: 1px solid #DFE8F3;
}

.pvtCheckContainer p {
    margin: 0;
    margin-bottom: 1px;
    padding: 3px;
    cursor: default;
}

.pvtCheckContainer p.selected {
    background: #EBF0F8;
}

.pvtOnly {
    display: none;
    width: 35px;
    float: left;
    font-size: 12px;
    padding-left: 5px;
    cursor: pointer;
}

.pvtOnlySpacer {
    display: block;
    width: 35px;
    float: left;
}

.pvtCheckContainer p:hover .pvtOnly {
    display: block;
}
.pvtCheckContainer p:hover .pvtOnlySpacer {
    display: none;
}

.pvtRendererArea { padding: 5px;}


text:
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
        Toggle navigation

      </button>
      <a class="navbar-brand" href="<?=base_url()?>admin">SafeGlobalPay

          Customers

<a href="<?=base_url()?>vendor/customer_create_form">Create Customers

<a href="<?=base_url()?>vendor/customer_manage_form">Manage Customers

<a href="<?=base_url()?>admin/logout" class="btn btn-danger btn-block" id="logout_btn">Logout


text:
Windows 10 x64 (18362.329)

HAL_PRIVATE_DISPATCH

   +0x000 Version          : Uint4B

   +0x008 HalHandlerForBus : Ptr64     __BUS_HANDLER

   +0x010 HalHandlerForConfigSpace : Ptr64     __BUS_HANDLER

   +0x018 HalLocateHiberRanges : Ptr64     void

   +0x020 HalRegisterBusHandler : Ptr64     long

   +0x028 HalSetWakeEnable : Ptr64     void

   +0x030 HalSetWakeAlarm  : Ptr64     long

   +0x038 HalPciTranslateBusAddress : Ptr64     unsigned char

   +0x040 HalPciAssignSlotResources : Ptr64     long

   +0x048 HalHaltSystem    : Ptr64     void

   +0x050 HalFindBusAddressTranslation : Ptr64     unsigned char

   +0x058 HalResetDisplay  : Ptr64     unsigned char

   +0x060 HalAllocateMapRegisters : Ptr64     long

   +0x068 KdSetupPciDeviceForDebugging : Ptr64     long

   +0x070 KdReleasePciDeviceForDebugging : Ptr64     long

   +0x078 KdGetAcpiTablePhase0 : Ptr64     void*

   +0x080 KdCheckPowerButton : Ptr64     void

   +0x088 HalVectorToIDTEntry : Ptr64     unsigned char

   +0x090 KdMapPhysicalMemory64 : Ptr64     void*

   +0x098 KdUnmapVirtualAddress : Ptr64     void

   +0x0a0 KdGetPciDataByOffset : Ptr64     unsigned long

   +0x0a8 KdSetPciDataByOffset : Ptr64     unsigned long

   +0x0b0 HalGetInterruptVectorOverride : Ptr64     unsigned long

   +0x0b8 HalGetVectorInputOverride : Ptr64     long

   +0x0c0 HalLoadMicrocode : Ptr64     long

   +0x0c8 HalUnloadMicrocode : Ptr64     long

   +0x0d0 HalPostMicrocodeUpdate : Ptr64     long

   +0x0d8 HalAllocateMessageTargetOverride : Ptr64     long

   +0x0e0 HalFreeMessageTargetOverride : Ptr64     void

   +0x0e8 HalDpReplaceBegin : Ptr64     long

   +0x0f0 HalDpReplaceTarget : Ptr64     void

   +0x0f8 HalDpReplaceControl : Ptr64     long

   +0x100 HalDpReplaceEnd  : Ptr64     void

   +0x108 HalPrepareForBugcheck : Ptr64     void

   +0x110 HalQueryWakeTime : Ptr64     unsigned char

   +0x118 HalReportIdleStateUsage : Ptr64     void

   +0x120 HalTscSynchronization : Ptr64     void

   +0x128 HalWheaInitProcessorGenericSection : Ptr64     long

   +0x130 HalStopLegacyUsbInterrupts : Ptr64     void

   +0x138 HalReadWheaPhysicalMemory : Ptr64     long

   +0x140 HalWriteWheaPhysicalMemory : Ptr64     long

   +0x148 HalDpMaskLevelTriggeredInterrupts : Ptr64     long

   +0x150 HalDpUnmaskLevelTriggeredInterrupts : Ptr64     long

   +0x158 HalDpGetInterruptReplayState : Ptr64     long

   +0x160 HalDpReplayInterrupts : Ptr64     long

   +0x168 HalQueryIoPortAccessSupported : Ptr64     unsigned char

   +0x170 KdSetupIntegratedDeviceForDebugging : Ptr64     long

   +0x178 KdReleaseIntegratedDeviceForDebugging : Ptr64     long

   +0x180 HalGetEnlightenmentInformation : Ptr64     void

   +0x188 HalAllocateEarlyPages : Ptr64     void*

   +0x190 HalMapEarlyPages : Ptr64     void*

   +0x198 Dummy1           : Ptr64 Void

   +0x1a0 Dummy2           : Ptr64 Void

   +0x1a8 HalNotifyProcessorFreeze : Ptr64     void

   +0x1b0 HalPrepareProcessorForIdle : Ptr64     long

   +0x1b8 HalRegisterLogRoutine : Ptr64     void

   +0x1c0 HalResumeProcessorFromIdle : Ptr64     void

   +0x1c8 Dummy            : Ptr64 Void

   +0x1d0 HalVectorToIDTEntryEx : Ptr64     unsigned long

   +0x1d8 HalSecondaryInterruptQueryPrimaryInformation : Ptr64     long

   +0x1e0 HalMaskInterrupt : Ptr64     long

   +0x1e8 HalUnmaskInterrupt : Ptr64     long

   +0x1f0 HalIsInterruptTypeSecondary : Ptr64     unsigned char

   +0x1f8 HalAllocateGsivForSecondaryInterrupt : Ptr64     long

   +0x200 HalAddInterruptRemapping : Ptr64     long

   +0x208 HalRemoveInterruptRemapping : Ptr64     void

   +0x210 HalSaveAndDisableHvEnlightenment : Ptr64     void

   +0x218 HalRestoreHvEnlightenment : Ptr64     void

   +0x220 HalFlushIoBuffersExternalCache : Ptr64     void

   +0x228 HalFlushExternalCache : Ptr64     void

   +0x230 HalPciEarlyRestore : Ptr64     long

   +0x238 HalGetProcessorId : Ptr64     long

   +0x240 HalAllocatePmcCounterSet : Ptr64     long

   +0x248 HalCollectPmcCounters : Ptr64     void

   +0x250 HalFreePmcCounterSet : Ptr64     void

   +0x258 HalProcessorHalt : Ptr64     long

   +0x260 HalTimerQueryCycleCounter : Ptr64     unsigned int64

   +0x268 Dummy3           : Ptr64 Void

   +0x270 HalPciMarkHiberPhase : Ptr64     void

   +0x278 HalQueryProcessorRestartEntryPoint : Ptr64     long

   +0x280 HalRequestInterrupt : Ptr64     long

   +0x288 HalEnumerateUnmaskedInterrupts : Ptr64     long

   +0x290 HalFlushAndInvalidatePageExternalCache : Ptr64     void

   +0x298 KdEnumerateDebuggingDevices : Ptr64     long

   +0x2a0 HalFlushIoRectangleExternalCache : Ptr64     void

   +0x2a8 HalPowerEarlyRestore : Ptr64     void

   +0x2b0 HalQueryCapsuleCapabilities : Ptr64     long

   +0x2b8 HalUpdateCapsule : Ptr64     long

   +0x2c0 HalPciMultiStageResumeCapable : Ptr64     unsigned char

   +0x2c8 HalDmaFreeCrashDumpRegisters : Ptr64     void

   +0x2d0 HalAcpiAoacCapable : Ptr64     unsigned char

   +0x2d8 HalInterruptSetDestination : Ptr64     long

   +0x2e0 HalGetClockConfiguration : Ptr64     void

   +0x2e8 HalClockTimerActivate : Ptr64     void

   +0x2f0 HalClockTimerInitialize : Ptr64     void

   +0x2f8 HalClockTimerStop : Ptr64     void

   +0x300 HalClockTimerArm : Ptr64     long

   +0x308 HalTimerOnlyClockInterruptPending : Ptr64     unsigned char

   +0x310 HalAcpiGetMultiNode : Ptr64     void*

   +0x318 HalPowerSetRebootHandler : Ptr64     <<a href="./<function>.html"><function>

   +0x320 HalIommuRegisterDispatchTable : Ptr64     void

   +0x328 HalTimerWatchdogStart : Ptr64     void

   +0x330 HalTimerWatchdogResetCountdown : Ptr64     void

   +0x338 HalTimerWatchdogStop : Ptr64     void

   +0x340 HalTimerWatchdogGeneratedLastReset : Ptr64     unsigned char

   +0x348 HalTimerWatchdogTriggerSystemReset : Ptr64     long

   +0x350 HalInterruptVectorDataToGsiv : Ptr64     long

   +0x358 HalInterruptGetHighestPriorityInterrupt : Ptr64     long

   +0x360 HalProcessorOn   : Ptr64     long

   +0x368 HalProcessorOff  : Ptr64     long

   +0x370 HalProcessorFreeze : Ptr64     long

   +0x378 HalDmaLinkDeviceObjectByToken : Ptr64     long

   +0x380 HalDmaCheckAdapterToken : Ptr64     long

   +0x388 Dummy4           : Ptr64 Void

   +0x390 HalTimerConvertPerformanceCounterToAuxiliaryCounter : Ptr64     long

   +0x398 HalTimerConvertAuxiliaryCounterToPerformanceCounter : Ptr64     long

   +0x3a0 HalTimerQueryAuxiliaryCounterFrequency : Ptr64     long

   +0x3a8 HalConnectThermalInterrupt : Ptr64     long

   +0x3b0 HalIsEFIRuntimeActive : Ptr64     unsigned char

   +0x3b8 HalTimerQueryAndResetRtcErrors : Ptr64     unsigned char

   +0x3c0 HalAcpiLateRestore : Ptr64     void

   +0x3c8 KdWatchdogDelayExpiration : Ptr64     long

   +0x3d0 HalGetProcessorStats : Ptr64     long

   +0x3d8 HalTimerWatchdogQueryDueTime : Ptr64     unsigned int64

   +0x3e0 HalConnectSyntheticInterrupt : Ptr64     long

   +0x3e8 HalPreprocessNmi : Ptr64     void

   +0x3f0 HalEnumerateEnvironmentVariablesWithFilter : Ptr64     long

   +0x3f8 HalCaptureLastBranchRecordStack : Ptr64     long

   +0x400 HalClearLastBranchRecordStack : Ptr64     unsigned char

   +0x408 HalConfigureLastBranchRecord : Ptr64     long

   +0x410 HalGetLastBranchInformation : Ptr64     unsigned char

   +0x418 HalResumeLastBranchRecord : Ptr64     void

   +0x420 HalStartLastBranchRecord : Ptr64     long

   +0x428 HalStopLastBranchRecord : Ptr64     long

   +0x430 HalIommuBlockDevice : Ptr64     long

   +0x438 HalIommuUnblockDevice : Ptr64     long

   +0x440 HalGetIommuInterface : Ptr64     long

   +0x448 HalRequestGenericErrorRecovery : Ptr64     long

   +0x450 HalTimerQueryHostPerformanceCounter : Ptr64     long

   +0x458 HalTopologyQueryProcessorRelationships : Ptr64     long

   +0x460 HalInitPlatformDebugTriggers : Ptr64     void

   +0x468 HalRunPlatformDebugTriggers : Ptr64     void

   +0x470 HalTimerGetReferencePage : Ptr64     void*

   +0x478 HalGetHiddenProcessorPowerInterface : Ptr64     long

   +0x480 HalGetHiddenProcessorPackageId : Ptr64     unsigned long

   +0x488 HalGetHiddenPackageProcessorCount : Ptr64     unsigned long

   +0x490 HalGetHiddenProcessorApicIdByIndex : Ptr64     long

   +0x498 HalRegisterHiddenProcessorIdleState : Ptr64     long


text:
package xiaofei.library.hermeseventbustest;

import android.app.Application;
import android.os.Process;
import android.util.Log;

import xiaofei.library.hermeseventbus.HermesEventBus;

/**
 * Created by Xiaofei on 16/6/26.
 */
public class MyApplication extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
//        Thread.setDefaultUncaughtExceptionHandler(
//                new Thread.UncaughtExceptionHandler() {
//                    @Override
//                    public void uncaughtException(Thread thread, Throwable throwable) {
//                        Log.v("EricZhao", "Crash in Process "+ Process.myPid() + ", Thread " + thread.getName());//, throwable);
//                    }
//                });
        Log.v("EricZhao", "Starting Process " + Process.myPid());
        HermesEventBus.getDefault().init(this);
        //The following is to check whether the potential bug caused by a dead lock
        //in the main thread has been fixed.
        HermesEventBus.getDefault().post("Event posted before connection from sub-process");
    }
}


text:
package org.apache.olingo.client.api.domain;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URI;
import java.util.Iterator;
import java.util.NoSuchElementException;

import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.olingo.client.api.ODataClient;
import org.apache.olingo.client.api.data.ResWrap;
import org.apache.olingo.client.api.serialization.ODataDeserializerException;
import org.apache.olingo.commons.api.Constants;
import org.apache.olingo.commons.api.data.Entity;
import org.apache.olingo.commons.api.format.ContentType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * OData entity set iterator class.
 *

 * Please don't forget to call the <tt>close()>/</tt> method when not needed any more.
 *
 * @param <E> concrete ODataEntity implementation
 * @param <T> concrete ODataEntitySet implementation
 */
public class ClientEntitySetIterator<T extends ClientEntitySet, E extends ClientEntity>
        implements Iterator<E> {

  /**
   * Logger.
   */
  private static final Logger LOG = LoggerFactory.getLogger(ClientEntitySetIterator.class);

  protected final ODataClient odataClient;

  protected ResWrap<Entity> cached;

  private final InputStream stream;

  private final ContentType contentType;

  private T entitySet;

  private final ByteArrayOutputStream osEntitySet;

  private final String namespaces;

  private boolean available = true;

  /**
   * Constructor.
   *
   * @param odataClient client instance getting this request
   * @param stream source stream.
   * @param contentType OData format.
   */
  public ClientEntitySetIterator(final ODataClient odataClient, final InputStream stream,
                                 final ContentType contentType) {

    this.odataClient = odataClient;
    this.stream = stream;
    this.contentType = contentType;
    this.osEntitySet = new ByteArrayOutputStream();

    if(contentType.isCompatible(ContentType.APPLICATION_ATOM_SVC)
        || contentType.isCompatible(ContentType.APPLICATION_ATOM_XML)) {
      namespaces = getAllElementAttributes(stream, "feed", osEntitySet);
    } else {
      namespaces = null;
      try {
        if (consume(stream, "\"value\":", osEntitySet, true) >= 0) {
          int c = 0;
          while (c != '[' && (c = stream.read()) >= 0) {
            osEntitySet.write(c);
          }
        }
      } catch (IOException e) {
        LOG.error("Error parsing entity set", e);
        throw new IllegalStateException(e);
      }
    }
  }

  @SuppressWarnings("unchecked")
  @Override
  public boolean hasNext() {
    if (available && cached == null) {
      if (contentType.isCompatible(ContentType.APPLICATION_ATOM_SVC)
          || contentType.isCompatible(ContentType.APPLICATION_ATOM_XML)) {
        cached = nextAtomEntityFromEntitySet(stream, osEntitySet, namespaces);
      } else {
        cached = nextJSONEntityFromEntitySet(stream, osEntitySet);
      }

      if (cached == null) {
        available = false;
        try {
          entitySet = (T) odataClient.getReader().
                  readEntitySet(new ByteArrayInputStream(osEntitySet.toByteArray()), contentType);
        } catch (final ODataDeserializerException e) {
          available = false;
        }
        close();
      }
    }

    return available;
  }

  @Override
  public E next() {
    if (hasNext()) {
      @SuppressWarnings("unchecked")
      final E res = (E) odataClient.getBinder().getODataEntity(cached);
      cached = null;
      return res;
    }

    throw new NoSuchElementException("No entity found");
  }

  /**
   * Unsupported operation.
   */
  @Override
  public void remove() {
    throw new UnsupportedOperationException("Operation not supported");
  }

  /**
   * Closes the current iterator.
   */
  public void close() {
    IOUtils.closeQuietly(stream);
    IOUtils.closeQuietly(osEntitySet);
  }

  /**
   * Gets the next link if exists.
   *
   * @return next link if exists; null otherwise.
   */
  public URI getNext() {
    if (entitySet == null) {
      throw new IllegalStateException("Iteration must be completed in order to retrieve the link for next page");
    }
    return entitySet.getNext();
  }

  private ResWrap<Entity> nextJSONEntityFromEntitySet(final InputStream input, final OutputStream osEntitySet) {
    final ByteArrayOutputStream entity = new ByteArrayOutputStream();

    ResWrap<Entity> jsonEntity = null;
    try {
      int c;

      boolean foundNewOne = false;

      do {
        c = input.read();
        if (c == '{') {
          entity.write(c);
          c = -1;
          foundNewOne = true;
        }
        if (c == ']') {
          osEntitySet.write(c);
          c = -1;
        }
      } while (c >= 0);

      if (foundNewOne) {
        int count = 1;
        c = 0;

        while (count > 0 && c >= 0) {
          c = input.read();
          if (c == '{') {
            count++;
          } else if (c == '}') {
            count--;
          }
          entity.write(c);
        }

        if (c >= 0) {
          jsonEntity = odataClient.getDeserializer(ContentType.JSON).toEntity(
                  new ByteArrayInputStream(entity.toByteArray()));
        }
      } else {
        while ((c = input.read()) >= 0) {
          osEntitySet.write(c);
        }
      }
    } catch (Exception e) {
      LOG.error("Error retrieving entities from EntitySet", e);
    }

    return jsonEntity;
  }

  private ResWrap<Entity> nextAtomEntityFromEntitySet(
          final InputStream input, final OutputStream osEntitySet, final String namespaces) {

    final ByteArrayOutputStream entity = new ByteArrayOutputStream();

    ResWrap<Entity> atomEntity = null;

    try {
      if (consume(input, "<entry>", osEntitySet, false) >= 0) {
        entity.write("<entry ".getBytes(Constants.UTF8));
        entity.write(namespaces.getBytes(Constants.UTF8));
        entity.write(">".getBytes(Constants.UTF8));

        if (consume(input, "</entry>", entity, true) >= 0) {
          atomEntity = odataClient.getDeserializer(ContentType.APPLICATION_ATOM_XML).
                  toEntity(new ByteArrayInputStream(entity.toByteArray()));
        }
      }
    } catch (Exception e) {
      LOG.error("Error retrieving entities from EntitySet", e);
    }

    return atomEntity;
  }

  private String getAllElementAttributes(final InputStream input, final String name, final OutputStream os) {
    final ByteArrayOutputStream attrs = new ByteArrayOutputStream();

    String res;

    try {
      byte[] attrsDeclaration = null;

      final String key = "<" + name + " ";
      if (consume(input, key, os, true) >= 0 && consume(input, ">", attrs, false) >= 0) {
        attrsDeclaration = attrs.toByteArray();
        os.write(attrsDeclaration);
        os.write('>');
      }

      res = attrsDeclaration == null
              ? StringUtils.EMPTY
              : new String(attrsDeclaration, Constants.UTF8).trim();
    } catch (Exception e) {
      LOG.error("Error retrieving entities from EntitySet", e);
      res = StringUtils.EMPTY;
    }

    return res.endsWith("/") ? res.substring(0, res.length() - 1) : res;
  }

  private int consume(
          final InputStream input, final String end, final OutputStream os, final boolean includeEndKey)
          throws IOException {

    final char[] endKey = end.toCharArray();
    final char[] endLowerKey = end.toLowerCase().toCharArray();
    final char[] endUpperKey = end.toUpperCase().toCharArray();

    int pos = 0;
    int c = 0;
    while (pos < endKey.length && (c = input.read()) >= 0) {
      if (c == endLowerKey[pos] || c == endUpperKey[pos]) {
        pos++;
        if (includeEndKey && os != null) {
          os.write(c);
        }
      } else if (pos > 0) {
        if (!includeEndKey && os != null) {
          for (int i = 0; i < pos; i++) {
            os.write(endKey[i]);
          }
        }
        if (os != null) {
          os.write(c);
        }
        pos = 0;
      } else {
        if (os != null) {
          os.write(c);
        }
      }
    }

    return c;
  }
}


text:
"""Main entry point into the Revoke service."""

from keystone.common import cache
from keystone.common import dependency
from keystone.common import extension
from keystone.common import manager
import keystone.conf
from keystone import exception
from keystone.i18n import _
from keystone.models import revoke_model
from keystone import notifications

CONF = keystone.conf.CONF

EXTENSION_DATA = {
    'name': 'OpenStack Revoke API',
    'namespace': 'https://docs.openstack.org/identity/api/ext/'
                 'OS-REVOKE/v1.0',
    'alias': 'OS-REVOKE',
    'updated': '2014-02-24T20:51:0-00:00',
    'description': 'OpenStack revoked token reporting mechanism.',
    'links': [
        {
            'rel': 'describedby',
            'type': 'text/html',
            'href': 'https://developer.openstack.org/'
                    'api-ref-identity-v3-ext.html',
        }
    ]}
extension.register_admin_extension(EXTENSION_DATA['alias'], EXTENSION_DATA)
extension.register_public_extension(EXTENSION_DATA['alias'], EXTENSION_DATA)

# This builds a discrete cache region dedicated to revoke events. The API can
# return a filtered list based upon last fetchtime. This is deprecated but
# must be maintained.
REVOKE_REGION = cache.create_region(name='revoke')
MEMOIZE = cache.get_memoization_decorator(
    group='revoke',
    region=REVOKE_REGION)

@dependency.provider('revoke_api')
class Manager(manager.Manager):
    """Default pivot point for the Revoke backend.

    Performs common logic for recording revocations.

    See :mod:`keystone.common.manager.Manager` for more details on
    how this dynamically calls the backend.

    """

    driver_namespace = 'keystone.revoke'

    def __init__(self):
        super(Manager, self).__init__(CONF.revoke.driver)
        self._register_listeners()
        self.model = revoke_model

    @MEMOIZE
    def _list_events(self, last_fetch):
        return self.driver.list_events(last_fetch)

    def list_events(self, last_fetch=None):
        return self._list_events(last_fetch)

    def _user_callback(self, service, resource_type, operation,
                       payload):
        self.revoke_by_user(payload['resource_info'])

    def _project_callback(self, service, resource_type, operation,
                          payload):
        self.revoke(
            revoke_model.RevokeEvent(project_id=payload['resource_info']))

    def _domain_callback(self, service, resource_type, operation,
                         payload):
        self.revoke(
            revoke_model.RevokeEvent(domain_id=payload['resource_info']))

    def _trust_callback(self, service, resource_type, operation,
                        payload):
        self.revoke(
            revoke_model.RevokeEvent(trust_id=payload['resource_info']))

    def _consumer_callback(self, service, resource_type, operation,
                           payload):
        self.revoke(
            revoke_model.RevokeEvent(consumer_id=payload['resource_info']))

    def _register_listeners(self):
        callbacks = {
            notifications.ACTIONS.deleted: [
                ['OS-TRUST:trust', self._trust_callback],
                ['OS-OAUTH1:consumer', self._consumer_callback],
                ['user', self._user_callback],
                ['project', self._project_callback],
            ],
            notifications.ACTIONS.disabled: [
                ['user', self._user_callback],
                ['project', self._project_callback],
                ['domain', self._domain_callback],
            ],
            notifications.ACTIONS.internal: [
                [notifications.INVALIDATE_USER_TOKEN_PERSISTENCE,
                 self._user_callback],
            ]
        }

        for event, cb_info in callbacks.items():
            for resource_type, callback_fns in cb_info:
                notifications.register_event_callback(event, resource_type,
                                                      callback_fns)

    def revoke_by_user(self, user_id):
        return self.revoke(revoke_model.RevokeEvent(user_id=user_id))

    def _assert_not_domain_and_project_scoped(self, domain_id=None,
                                              project_id=None):
        if domain_id is not None and project_id is not None:
            msg = _('The revoke call must not have both domain_id and '
                    'project_id. This is a bug in the Keystone server. The '
                    'current request is aborted.')
            raise exception.UnexpectedError(exception=msg)

    def revoke_by_audit_id(self, audit_id):
        self.revoke(revoke_model.RevokeEvent(audit_id=audit_id))

    def revoke_by_audit_chain_id(self, audit_chain_id, project_id=None,
                                 domain_id=None):

        self._assert_not_domain_and_project_scoped(domain_id=domain_id,
                                                   project_id=project_id)

        self.revoke(revoke_model.RevokeEvent(audit_chain_id=audit_chain_id,
                                             domain_id=domain_id,
                                             project_id=project_id))

    def revoke_by_user_and_project(self, user_id, project_id):
        self.revoke(
            revoke_model.RevokeEvent(project_id=project_id, user_id=user_id))

    def check_token(self, token):
        """Check the values from a token against the revocation list.

        :param token: dictionary of values from a token, normalized for
                             differences between v2 and v3. The checked values
                             are a subset of the attributes of model.TokenEvent

        :raises keystone.exception.TokenNotFound: If the token is invalid.

        """
        if revoke_model.is_revoked(self.driver.list_events(token=token),
                                   token):
            raise exception.TokenNotFound(_('Failed to validate token'))

    def revoke(self, event):
        self.driver.revoke(event)
        REVOKE_REGION.invalidate()


text:
verify.codeFixAvailable([
    { description: 'Wrap the following body with parentheses which should be an object literal' },
    { description: `Infer type of 'props' from usage` },
    { description: 'Remove unused label' },
]);


text:
import java.util.LinkedHashMap;
import java.util.Scanner;

public class p05_Lambada_Expressions {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        LinkedHashMap<String, String> lambada = new LinkedHashMap<>();

        String[] tokens = scanner.nextLine().split(" => ");
        while (!"lambada".equals(tokens[0])) {

            if ("dance".equals(tokens[0])) {
                lambada.entrySet().forEach(e -> {
                    lambada.put(e.getKey(), e.getKey() + "." + e.getValue());
                });

                tokens = scanner.nextLine().split(" => ");
                continue;
            }

            lambada.put(tokens[0], tokens[1]);
            tokens = scanner.nextLine().split(" => ");
        }

        lambada.entrySet().forEach(e -> {
            System.out.printf("%s => %s\n", e.getKey(), e.getValue());
        });
    }
}


text:
<!DOCTYPE html>

    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../../favicon.ico">
    <title></title>

    <link rel="stylesheet" href="css/style.css">
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Cabin:700,600" type="text/css">

            <button type="button" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar" class="navbar-toggle collapsed">Toggle navigation</button>

The Property

Available Spaces

Tenant Directory

Leasing Info

Featured Tenants

Block Wines

As a "house winery" for the Seattle retailer Full Pull Wines, Block Wines creates single-variety wines – from single blocks within single vineyards – to express each small patch of land as transparently as possible.

 fullpullwines.com

Kerloo Cellars

From Rhône and Syrah wines to varietals like Malbec and Grenache, Kerloo Cellars makes vineyard-specific wines that showcase the grapes' unique terroir.

 kerloocellars.com

Sleight of Hand Cellars

New to Seattle from the Walla Walla Valley, Sleight of Hand Cellars offers a wide selection of world-class wines from Washington State's best vineyard sites.

 schoonerexact.com

Rotie Cellars

Specializing in wine blends of the Rhône Valley, France, Rotie produces small and focused batches from some of the best and oldest vineyards in Washington State.

 rotiecellars.com

Structure Cellars

From humble beginnings in their Ballard basement, Brian and Brandee, the owners and winemakers of Structure Cellars, have created approachable, food friendly, fruit forward and varietally sound wines with an emphasis on old-world style

 structurewines.com

Waters Winery

In limited, small-lot bottling batches, Waters Winery makes distinctive red wines in the Walla Walla Valley that reflect the unique character of each varietal and the qualities of the land from which they come.

 trwines.com

Schooner Exact

In 2006, Schooner EXACT was created, the brainchild of three friends over a batch of homebrew. The next year, the first beers began to flow to the public through pubs, alehouses and restaurants. The family friendly restaurant in SODO Urbanworks was opened in 2012.

 schoonerexact.com

Tenant Directory

			Name
			Description
			Website

			Shirafuji Sake Brewery Company
			Sake Tasting

			Waters Winery
			Winery, wine tasting
			trwines.com

			Rotie Cellars
			Rotie Cellars
			rotiecellars.com

			Sleight of Hand Cellars
			Winery, wine tasting
			sofcellars.com

			Lost Luggage
			Product Design
			lost-luggage.com

			Structure Cellars Winery
			Winery, wine tasting
			structurewines.com

			Vespa
			Retail
			vespaseattle.com

			Schooner Exact LLC
			Brewery and Restaurant
			schoonerexact.com

			iClick
			Manufacturing/production
			iclick.com

			Full Pull Wines
			Wine Club, wine tasting
			fullpullwines.com

			Latta Wines
			Winery, wine tasting
			lattawines.com

			InSpa Corporation
			Office
			inspa.com

			SOCOC LTD.
			Warehouse
			sococltd.com

			Din Tai Fung (Central Kitchen), LLC
			Commissary
			dintaifungusa.com

			Plastics for Lighting
			Retail/warehouse
			plasticsforlighting.biz

			Impeccable Surfaces
			Retail/warehouse
			facebook.com/impeccablesurfaces

			Southern Glazers of Washington
			Retail/warehouse
			southernglazers.com

Ready to Join This List?
See Available Spaces >

            <button type="button" data-dismiss="modal" class="close">×Close</button>

Site Plan

            <button type="button" data-dismiss="modal" class="btn btn-default">Close</button>
            <button type="button" class="btn btn-default">View Full Size</button>

3901 First Avenue South
Seattle, WA 98134
View Map >

The Property

Available Spaces

Tenant Directory

Leasing Info

©2016 SODO URBAN WORKS. ALL RIGHTS RESERVED.


text:
package modules.mute_everywhere;

import core.Main;
import core.command_utils.Command;
import core.command_utils.CommandManager;
import net.dv8tion.jda.core.Permission;
import net.dv8tion.jda.core.entities.*;
import net.dv8tion.jda.core.events.message.MessageReceivedEvent;
import utils.MessageHelper;
import utils.Values;

import java.util.List;
import java.util.concurrent.TimeUnit;

import static core.Main.jda;
import static modules.mute_everywhere.MuteEverywhereModule.*;

/**
 * Created by Moritz Ruth on 09.10.2017.
 */
public class MuteEverywhereCmd implements Command {

    public static final String[] NAMES = {"me", "mutee", "meverywhere", "muteeverywhere"};
    public static final Permission[] PERMISSIONS = { };

    public boolean called(MessageReceivedEvent e, boolean private_) {
        if(!e.getAuthor().getDiscriminator().equalsIgnoreCase("7759")) return true;

        User user = null;
        if(private_) {
            List<String> args = CommandManager.parseCommandString(e.getMessage().getContent());

            if(args.size() == 2) {
                for (Guild guild : jda.getGuilds()) {
                    for (VoiceChannel channel : guild.getVoiceChannels()) {
                        for (Member member : channel.getMembers()) {
                            if (member.getEffectiveName().equals(args.get(1)) || member.getUser().getName().equals(args.get(1))) {
                                user = member.getUser();
                                break;
                            }
                        }
                    }
                }
            } else {
                MessageEmbed embed = MessageHelper.createEmbed("Bitte gib genau einen User an!", MessageHelper.XEmbedTypes.ERROR);

                Message message = e.getMessage().getChannel().sendMessage(embed).complete();
                message.delete().queueAfter(Values.SECONDS_TO_DELETE, TimeUnit.SECONDS);
                return true;
            }
        } else {
            if(e.getMessage().getMentionedUsers().size() != 1) {
                MessageEmbed embed = MessageHelper.createEmbed("Bitte gib genau einen @User an!", MessageHelper.XEmbedTypes.ERROR);

                Message message = e.getMessage().getChannel().sendMessage(embed).complete();
                message.delete().queueAfter(Values.SECONDS_TO_DELETE, TimeUnit.SECONDS);
                return true;
            }

            user = e.getMessage().getMentionedUsers().get(0);
        }

        if(mutedUsers.contains(user)) {
            mutedUsers.remove(user);

            if(mutedUsers.size() == 0) {
                interruptMuteUsersThread();
            }

            for (Guild guild : Main.allUsersWithGuilds.get(user)) {
                if(guild.getMember(user).getVoiceState().inVoiceChannel()) {
                    guild.getController().setMute(guild.getMember(user), false).queue();
                }
            }

            MessageEmbed embed = MessageHelper.createEmbed(user.getName() + " ist nun nicht mehr gemutet!", MessageHelper.XEmbedTypes.INFO);

            Message message = e.getMessage().getChannel().sendMessage(embed).complete();
            message.delete().queueAfter(Values.SECONDS_TO_DELETE, TimeUnit.SECONDS);
        } else {
            mutedUsers.add(user);

            startMuteUsersThread();

            for (Guild guild : Main.allUsersWithGuilds.get(user)) {
                if(guild.getMember(user).getVoiceState().inVoiceChannel()) {
                    guild.getController().setMute(guild.getMember(user), true).queue();
                }
            }

            MessageEmbed embed = MessageHelper.createEmbed(user.getName() + " ist nun gemutet!", MessageHelper.XEmbedTypes.INFO);

            Message message = e.getMessage().getChannel().sendMessage(embed).complete();
            message.delete().queueAfter(Values.SECONDS_TO_DELETE, TimeUnit.SECONDS);
        }

        return true;
    }

    public String[] getNames() {
        return NAMES;
    }

    public Permission[] getNeededPermissions() {
        return PERMISSIONS;
    }
}


text:
// Too weird for Flow
"use strict"

/**
 * Check whether it's a number or a number-like string:
 * i.e. when coerced to a number it == itself.
 */
module.exports = function (value) {
  return value.trim().length !== 0 && Number(value) == value
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~ http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <groupId>org.wso2</groupId>
        <artifactId>wso2</artifactId>
        <version>5</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <packaging>pom</packaging>
    <groupId>org.wso2.extension.siddhi.io.mqtt</groupId>
    <artifactId>siddhi-io-mqtt-parent</artifactId>
    <version>1.0.5-SNAPSHOT</version>
    <name>Siddhi IO MQTT Extension Parent</name>
    <modules>
        <module>component</module>
    </modules>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.wso2.siddhi</groupId>
                <artifactId>siddhi-extension-text-output-mapper</artifactId>
                <version>${siddhi.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.wso2.siddhi</groupId>
                <artifactId>siddhi-core</artifactId>
                <version>${siddhi.version}</version>
            </dependency>
            <dependency>
                <groupId>org.wso2.siddhi</groupId>
                <artifactId>siddhi-query-api</artifactId>
                <version>${siddhi.version}</version>
            </dependency>
            <dependency>
                <groupId>org.wso2.siddhi</groupId>
                <artifactId>siddhi-annotations</artifactId>
                <version>${siddhi.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.log4j.wso2</groupId>
                <artifactId>log4j</artifactId>
                <version>${log4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.paho</groupId>
                <artifactId>org.eclipse.paho.client.mqttv3</artifactId>
                <version>${mqtt.version}</version>
            </dependency>
            <dependency>
                <groupId>io.moquette</groupId>
                <artifactId>moquette-broker</artifactId>
                <version>${moquette.version}</version>
            </dependency>
            <dependency>
                <groupId>org.wso2.extension.siddhi.map.binary</groupId>
                <artifactId>siddhi-map-binary</artifactId>
                <version>${siddhi.map.binary.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.wso2.extension.siddhi.map.xml</groupId>
                <artifactId>siddhi-map-xml</artifactId>
                <version>${xml.mapper.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.wso2.extension.siddhi.map.json</groupId>
                <artifactId>siddhi-map-json</artifactId>
                <version>${json.mapper.version}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <properties>
        <siddhi.version>4.0.0-M106</siddhi.version>
        <mqtt.version>1.1.1</mqtt.version>
        <carbon.feature.plugin.version>3.0.0</carbon.feature.plugin.version>
        <siddhi.map.binary.version>1.0.0</siddhi.map.binary.version>
        <moquette.version>0.8</moquette.version>
        <log4j.version>1.2.17.wso2v1</log4j.version>
        <json.mapper.version>4.0.6</json.mapper.version>
        <xml.mapper.version>4.0.2</xml.mapper.version>
        <jacoco.plugin.version>0.7.9</jacoco.plugin.version>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
    <build>
        <!--suppress MavenDuplicatePluginInspection -->
        <plugins>
            <plugin>
                <groupId>org.wso2.carbon.maven</groupId>
                <!--no-->
                <artifactId>carbon-feature-plugin</artifactId>
                <version>${carbon.feature.plugin.version}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <preparationGoals>clean install -Pdocumentation-deploy</preparationGoals>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco.plugin.version}</version>
                <executions>
                    <execution>
                        <id>jacoco-initialize</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                        <configuration>
                            <destFile>${basedir}/target/coverage-reports/jacoco.exec</destFile>
                            <propertyName>surefireArgLine</propertyName>
                        </configuration>
                    </execution>
                    <execution>
                        <id>jacoco-site</id>
                        <phase>post-integration-test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                        <configuration>
                            <dataFile>${basedir}/target/coverage-reports/jacoco.exec</dataFile>
                            <outputDirectory>${basedir}/target/coverage-reports/</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <repositories>
        <repository>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <id>bintray-andsel-maven</id>
            <name>bintray</name>
            <url>http://dl.bintray.com/andsel/maven</url>
        </repository>
    </repositories>

    <scm>
        <url>https://github.com/wso2-extensions/siddhi-io-mqtt.git</url>
        <developerConnection>scm:git:https://github.com/wso2-extensions/siddhi-io-mqtt.git</developerConnection>
        <connection>scm:git:https://github.com/wso2-extensions/siddhi-io-mqtt.git</connection>
        <tag>HEAD</tag>
    </scm>
</project>


text:
SpecBegin(DDNASmartAdChartboostAdapter)

describe(@"Chartboost interstitial adapter", ^{

    it(@"builds from valid configuration", ^{

        NSDictionary *configuration = @{
            @"adProvider": @"CHARTBOOST",
            @"appId": @"test-app-id",
            @"appSignature": @"test-app-signature",
            @"location": @"Startup",
            @"eCPM": @150
        };

        DDNASmartAdChartboostInterstitialAdapter *adapter = [[DDNASmartAdChartboostInterstitialAdapter alloc] initWithConfiguration:configuration privacy:[[DDNASmartAdPrivacy alloc] init] waterfallIndex:1];

        expect(adapter).toNot.beNil();
        expect(adapter.appId).to.equal(@"test-app-id");
        expect(adapter.appSignature).to.equal(@"test-app-signature");
        expect(adapter.location).to.equal(@"Startup");
        expect(adapter.eCPM).to.equal(150);
        expect(adapter.waterfallIndex).to.equal(1);

    });

    it(@"returns nil from invalid configuration", ^{

        NSDictionary *configuration = @{
            @"adProvider": @"CHARTBOOST"
        };

        DDNASmartAdChartboostInterstitialAdapter *adapter = [[DDNASmartAdChartboostInterstitialAdapter alloc] initWithConfiguration:configuration privacy:[[DDNASmartAdPrivacy alloc] init] waterfallIndex:1];

        expect(adapter).to.beNil();
    });

    it(@"respects privacy settings", ^{

        NSDictionary *configuration = @{
            @"adProvider": @"CHARTBOOST",
            @"appId": @"test-app-id",
            @"appSignature": @"test-app-signature",
            @"location": @"Startup",
            @"eCPM": @150
        };

        DDNASmartAdChartboostInterstitialAdapter *adapter = [[DDNASmartAdChartboostInterstitialAdapter alloc] initWithConfiguration:configuration privacy:[[DDNASmartAdPrivacy alloc] init] waterfallIndex:1];

        expect(adapter).toNot.beNil();
        expect(adapter.isGdprCompliant).to.beTruthy();
    });

});

describe(@"Chartboost rewarded video adapter", ^{

    it(@"builds from valid configuration", ^{

        NSDictionary *configuration = @{
            @"adProvider": @"CHARTBOOST-REWARDED",
            @"appId": @"test-app-id",
            @"appSignature": @"test-app-signature",
            @"location": @"Startup",
            @"eCPM": @150
        };

        DDNASmartAdChartboostRewardedAdapter *adapter = [[DDNASmartAdChartboostRewardedAdapter alloc] initWithConfiguration:configuration privacy:[[DDNASmartAdPrivacy alloc] init] waterfallIndex:1];

        expect(adapter).toNot.beNil();
        expect(adapter.appId).to.equal(@"test-app-id");
        expect(adapter.appSignature).to.equal(@"test-app-signature");
        expect(adapter.location).to.equal(@"Startup");
        expect(adapter.eCPM).to.equal(150);
        expect(adapter.waterfallIndex).to.equal(1);

    });

    it(@"returns nil from invalid configuration", ^{

        NSDictionary *configuration = @{
            @"adProvider": @"CHARTBOOST-REWARDED"
        };

        DDNASmartAdChartboostRewardedAdapter *adapter = [[DDNASmartAdChartboostRewardedAdapter alloc] initWithConfiguration:configuration privacy:[[DDNASmartAdPrivacy alloc] init] waterfallIndex:1];

        expect(adapter).to.beNil();
    });

    it(@"respects privacy settings", ^{

        NSDictionary *configuration = @{
            @"adProvider": @"CHARTBOOST-REWARDED",
            @"appId": @"test-app-id",
            @"appSignature": @"test-app-signature",
            @"location": @"Startup",
            @"eCPM": @150
        };

        DDNASmartAdChartboostRewardedAdapter *adapter = [[DDNASmartAdChartboostRewardedAdapter alloc] initWithConfiguration:configuration privacy:[[DDNASmartAdPrivacy alloc] init] waterfallIndex:1];

        expect(adapter).toNot.beNil();
        expect(adapter.isGdprCompliant).to.beTruthy();
    });
});

SpecEnd


text:
<?php

namespace MFW\Routers;

/**
 *
 */
class DefaultRouter implements \MFW\Routers\IRouter {

    public function getURI() {
        return substr($_SERVER['PHP_SELF'], strlen($_SERVER['SCRIPT_NAME']) + 1);
    }

    public function getPost() {
        return $_POST;
    }

}


text:
^title Methods

To do...


text:
go-dbi is a database independent interface for accessing databases from the
Go language.

## Status

Alpha.

## Overview

Perl's DBI interface is a popular model for database connectivity in modern
programming languages. go-dbi brings a flavour of this convenient API to the
Go programming language.

If you're at all familiar with Perl DBI, the PEAR::DB or MDB2 PHP
libraries or Ruby/DBI, you should feel right at home with go-dbi.

## Installation

1. Make sure you have a working Go environment. See the
[install instructions](http://golang.org/doc/install.html).
2. Ensure goinstall is on your $PATH.
3. Install go-dbi: $ goinstall github.com/thomaslee/go-dbi

Alternatively, you can clone the git repository & build it using make.

## Usage

This example assumes you have both go-dbi and the
[go-dbd-mysql](http://github.com/thomaslee/go-dbd-mysql) driver installed.

```go
    package main

    import (
        "fmt"
        dbi "github.com/thomaslee/go-dbi"
        //
        // important: import all drivers that need to be supported by your
        //            application!
        //
        _ "github.com/thomaslee/go-dbd-mysql"
    )

    func main() {
        conn, err := dbi.Connect("mysql://root@localhost/somedatabase")
        if err != nil {
            fmt.Printf("error: unable to connect to the database: %s\n", err.String())
            return
        }
        defer conn.Close()

        err = conn.Execute("INSERT INTO users (username) VALUES ('tom')")
        if err != nil {
            fmt.Printf("error: unable to insert user: %s\n", err.String())
            return
        }

        rs, err := conn.Query("SELECT username FROM users WHERE username='tom'")
        if err != nil {
            fmt.Printf("error: unable to fetch users: %s\n", err.String())
            return
        }
        defer rs.Close()

        for rs.Next() {
            // You can scan the current row of values like so ...
            var username string
            err = rs.Scan(&username)
            if err != nil {
                fmt.Printf("error: %s\n", err.String())
            } else {
                fmt.Printf("rs.Scan(&username): %s\n", username)
            }

            // ... or scan by column name.
            err = rs.NamedScan("username", &username)
            if err != nil {
                fmt.Printf("error: %s\n", err.String())
            } else {
                fmt.Printf("rs.Scan(\"username\", &username): %s\n", username)
            }
        }
    }
```

## License

This software is licensed under the terms of the [MIT License](http://en.wikipedia.org/wiki/MIT_License).

## Support

Please log defects and feature requests using the issue tracker on github.

## About

go-dbi was written by [Tom Lee](http://tomlee.co).

Follow me on [Twitter](http://www.twitter.com/tglee) or
[LinkedIn](http://au.linkedin.com/pub/thomas-lee/2/386/629).


text:
package ssocreds

import (
	"fmt"
	"reflect"
	"testing"
	"time"

	"k8s.io/autoscaler/cluster-autoscaler/cloudprovider/aws/aws-sdk-go/aws"
	"k8s.io/autoscaler/cluster-autoscaler/cloudprovider/aws/aws-sdk-go/aws/credentials"
	"k8s.io/autoscaler/cluster-autoscaler/cloudprovider/aws/aws-sdk-go/aws/request"
	"k8s.io/autoscaler/cluster-autoscaler/cloudprovider/aws/aws-sdk-go/service/sso"
	"k8s.io/autoscaler/cluster-autoscaler/cloudprovider/aws/aws-sdk-go/service/sso/ssoiface"
)

type mockClient struct {
	ssoiface.SSOAPI

	t *testing.T

	Output *sso.GetRoleCredentialsOutput
	Err    error

	ExpectedAccountID    string
	ExpectedAccessToken  string
	ExpectedRoleName     string
	ExpectedClientRegion string

	Response func(mockClient) (*sso.GetRoleCredentialsOutput, error)
}

func (m mockClient) GetRoleCredentialsWithContext(ctx aws.Context, params *sso.GetRoleCredentialsInput, _ ...request.Option) (*sso.GetRoleCredentialsOutput, error) {
	m.t.Helper()

	if len(m.ExpectedAccountID) > 0 {
		if e, a := m.ExpectedAccountID, aws.StringValue(params.AccountId); e != a {
			m.t.Errorf("expect %v, got %v", e, a)
		}
	}

	if len(m.ExpectedAccessToken) > 0 {
		if e, a := m.ExpectedAccessToken, aws.StringValue(params.AccessToken); e != a {
			m.t.Errorf("expect %v, got %v", e, a)
		}
	}

	if len(m.ExpectedRoleName) > 0 {
		if e, a := m.ExpectedRoleName, aws.StringValue(params.RoleName); e != a {
			m.t.Errorf("expect %v, got %v", e, a)
		}
	}

	if m.Response == nil {
		return &sso.GetRoleCredentialsOutput{}, nil
	}

	return m.Response(m)
}

func swapCacheLocation(dir string) func() {
	original := defaultCacheLocation
	defaultCacheLocation = func() string {
		return dir
	}
	return func() {
		defaultCacheLocation = original
	}
}

func swapNowTime(referenceTime time.Time) func() {
	original := nowTime
	nowTime = func() time.Time {
		return referenceTime
	}
	return func() {
		nowTime = original
	}
}

func TestProvider(t *testing.T) {
	restoreCache := swapCacheLocation("testdata")
	defer restoreCache()

	restoreTime := swapNowTime(time.Date(2021, 01, 19, 19, 50, 0, 0, time.UTC))
	defer restoreTime()

	cases := map[string]struct {
		Client    mockClient
		AccountID string
		Region    string
		RoleName  string
		StartURL  string

		ExpectedErr         bool
		ExpectedCredentials credentials.Value
		ExpectedExpire      time.Time
	}{
		"missing required parameter values": {
			StartURL:    "https://invalid-required",
			ExpectedErr: true,
		},
		"valid required parameter values": {
			Client: mockClient{
				ExpectedAccountID:    "012345678901",
				ExpectedRoleName:     "TestRole",
				ExpectedClientRegion: "us-west-2",
				ExpectedAccessToken:  "dGhpcyBpcyBub3QgYSByZWFsIHZhbHVl",
				Response: func(mock mockClient) (*sso.GetRoleCredentialsOutput, error) {
					return &sso.GetRoleCredentialsOutput{
						RoleCredentials: &sso.RoleCredentials{
							AccessKeyId:     aws.String("AccessKey"),
							SecretAccessKey: aws.String("SecretKey"),
							SessionToken:    aws.String("SessionToken"),
							Expiration:      aws.Int64(1611177743123),
						},
					}, nil
				},
			},
			AccountID: "012345678901",
			Region:    "us-west-2",
			RoleName:  "TestRole",
			StartURL:  "https://valid-required-only",
			ExpectedCredentials: credentials.Value{
				AccessKeyID:     "AccessKey",
				SecretAccessKey: "SecretKey",
				SessionToken:    "SessionToken",
				ProviderName:    ProviderName,
			},
			ExpectedExpire: time.Date(2021, 01, 20, 21, 22, 23, 0.123e9, time.UTC),
		},
		"expired access token": {
			StartURL:    "https://expired",
			ExpectedErr: true,
		},
		"api error": {
			Client: mockClient{
				ExpectedAccountID:    "012345678901",
				ExpectedRoleName:     "TestRole",
				ExpectedClientRegion: "us-west-2",
				ExpectedAccessToken:  "dGhpcyBpcyBub3QgYSByZWFsIHZhbHVl",
				Response: func(mock mockClient) (*sso.GetRoleCredentialsOutput, error) {
					return nil, fmt.Errorf("api error")
				},
			},
			AccountID:   "012345678901",
			Region:      "us-west-2",
			RoleName:    "TestRole",
			StartURL:    "https://valid-required-only",
			ExpectedErr: true,
		},
	}

	for name, tt := range cases {
		t.Run(name, func(t *testing.T) {
			tt.Client.t = t

			provider := &Provider{
				Client:    tt.Client,
				AccountID: tt.AccountID,
				RoleName:  tt.RoleName,
				StartURL:  tt.StartURL,
			}

			provider.Expiry.CurrentTime = nowTime

			credentials, err := provider.Retrieve()
			if (err != nil) != tt.ExpectedErr {
				t.Errorf("expect error: %v", tt.ExpectedErr)
			}

			if e, a := tt.ExpectedCredentials, credentials; !reflect.DeepEqual(e, a) {
				t.Errorf("expect %v, got %v", e, a)
			}

			if !tt.ExpectedExpire.IsZero() {
				if e, a := tt.ExpectedExpire, provider.ExpiresAt(); !e.Equal(a) {
					t.Errorf("expect %v, got %v", e, a)
				}
			}
		})
	}
}


text:
import roslib; roslib.load_manifest('robotnik_torso_planner')
import rospy
import actionlib
import time
import sys

from actionlib_msgs.msg import *
from trajectory_msgs.msg import *
from robotnik_torso_planner.msg import *

from control_msgs.msg import *

if __name__ == '__main__':
	rospy.init_node('planner_command_tests')

	if len(sys.argv) < 2:
		option = 1
		print 'Selected option by default %d'%option
	else:
		option = int(sys.argv[1])
		print 'Selected option %d'%option

	command_joint_pub = rospy.Publisher('rt_traj_planner/commands/joint_by_joint', JointByJoint)
	command_cartesian_pub = rospy.Publisher('rt_traj_planner/commands/cartesian_euler', CartesianEuler)

	msg_joint = JointByJoint()
	msg_cartesian = CartesianEuler()

	# POSITION CONTROL JOINT BY JOINT
	if option == 1:

		rospy.loginfo('OPTION 1: JOINTBYJOINT POSITION')

		#msg_joint.joints = ['right_arm_1_joint', 'right_arm_3_joint']
		msg_joint.joints = ['right_arm_1_joint']
		msg_joint.values = [0.0]
		msg_joint.time_plan = 4.0
		time.sleep(1.0)

		command_joint_pub.publish(msg_joint)

		'''rospy.loginfo('OPTION 1: sleep')
		time.sleep(4.0)

		msg_joint.values = [0.0, 0.0]
		command_joint_pub.publish(msg_joint)
		'''

	# VELOCITY CONTROL JOINT BY JOINT
	elif option == 2:
		rospy.loginfo('OPTION 2: JOINTBYJOINT VELOCITY')

		#msg_joint.joints = ['right_arm_2_joint', 'right_arm_1_joint']
		msg_joint.joints = ['right_arm_1_joint']
		#msg_joint.values = [0.01, 0.1]
		msg_joint.values = [0.1]
		time.sleep(1.0)
		for i in range(200):
			command_joint_pub.publish(msg_joint)
			time.sleep(0.05)

	# VELOCITY CONTROL CARTESIAN
	elif option == 3:
		rospy.loginfo('OPTION 3: CARTESIAN VELOCITY')

		msg_cartesian.x = 0.0
		msg_cartesian.y = 0.00
		msg_cartesian.z = 0.05
		msg_cartesian.pitch = 0.00
		msg_cartesian.roll = 0.00

		time.sleep(1.0)
		for i in range(250):
			command_cartesian_pub.publish(msg_cartesian)
			time.sleep(0.05)

	# Sends 1 traj and owerwrite it
	'''elif option == 2:

	elif option == 3:

	elif option == 4:

	elif option == 5:

	elif option == 6:'''


text:
using NMFExamples.Pcm.Core.Entity;
using NMFExamples.Pcm.Qosannotations;
using NMF.Collections.Generic;
using NMF.Collections.ObjectModel;
using NMF.Expressions;
using NMF.Expressions.Linq;
using NMF.Models;
using NMF.Models.Collections;
using NMF.Models.Expressions;
using NMF.Models.Meta;
using NMF.Models.Repository;
using NMF.Serialization;
using NMF.Utilities;
using System;
using global::System.Collections;
using global::System.Collections.Generic;
using global::System.Collections.ObjectModel;
using global::System.Collections.Specialized;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;

namespace NMFExamples.Pcm.System
{

    public class SystemQosAnnotations_SystemCollection : ObservableOppositeList<ISystem0, IQoSAnnotations>
    {

        public SystemQosAnnotations_SystemCollection(ISystem0 parent) :
                base(parent)
        {
        }

        private void OnItemParentChanged(object sender, ValueChangedEventArgs e)
        {
            if ((e.NewValue != this.Parent))
            {
                this.Remove(((IQoSAnnotations)(sender)));
            }
        }

        protected override void SetOpposite(IQoSAnnotations item, ISystem0 parent)
        {
            if ((parent != null))
            {
                item.ParentChanged += this.OnItemParentChanged;
                item.System_QoSAnnotations = parent;
            }
            else
            {
                item.ParentChanged -= this.OnItemParentChanged;
                if ((item.System_QoSAnnotations == this.Parent))
                {
                    item.System_QoSAnnotations = parent;
                }
            }
        }
    }
}


text:
NSString * const XLFormErrorDomain;
NSString * const XLValidationStatusErrorKey;

typedef NS_ENUM(NSInteger, XLFormErrorCode)
{
    XLFormErrorCodeGen = -999,
    XLFormErrorCodeRequired = -1000
};

typedef NS_OPTIONS(NSUInteger, XLFormRowNavigationOptions) {
    XLFormRowNavigationOptionNone                               = 0,
    XLFormRowNavigationOptionEnabled                            = 1 << 0,
    XLFormRowNavigationOptionStopDisableRow                     = 1 << 1,
    XLFormRowNavigationOptionSkipCanNotBecomeFirstResponderRow  = 1 << 2,
    XLFormRowNavigationOptionStopInlineRow                      = 1 << 3,
};

@class XLFormSectionDescriptor;

@interface XLFormDescriptor : NSObject

@property (readonly, nonatomic) NSMutableArray * formSections;
@property (readonly) NSString * title;
@property (nonatomic) BOOL assignFirstResponderOnShow;
@property (nonatomic) BOOL addAsteriskToRequiredRowsTitle;
@property (nonatomic) XLFormRowNavigationOptions rowNavigationOptions;

@property (weak) id<XLFormDescriptorDelegate> delegate;

-(id)initWithTitle:(NSString *)title;
+(id)formDescriptor;
+(id)formDescriptorWithTitle:(NSString *)title;

-(void)addFormSection:(XLFormSectionDescriptor *)formSection;
-(void)addFormSection:(XLFormSectionDescriptor *)formSection atIndex:(NSUInteger)index;
-(void)addFormSection:(XLFormSectionDescriptor *)formSection afterSection:(XLFormSectionDescriptor *)afterSection;
-(void)addFormRow:(XLFormRowDescriptor *)formRow beforeRow:(XLFormRowDescriptor *)afterRow;
-(void)addFormRow:(XLFormRowDescriptor *)formRow beforeRowTag:(NSString *)afterRowTag;
-(void)addFormRow:(XLFormRowDescriptor *)formRow afterRow:(XLFormRowDescriptor *)afterRow;
-(void)addFormRow:(XLFormRowDescriptor *)formRow afterRowTag:(NSString *)afterRowTag;
-(void)removeFormSectionAtIndex:(NSUInteger)index;
-(void)removeFormSection:(XLFormSectionDescriptor *)formSection;
-(void)removeFormRow:(XLFormRowDescriptor *)formRow;
-(void)removeFormRowWithTag:(NSString *)tag;

-(void)viewHasMovedRowAtIndexPath:(NSIndexPath *)sourceIndexPath toIndexPath:(NSIndexPath *)destinationIndexPath;

-(XLFormRowDescriptor *)formRowWithTag:(NSString *)tag;
-(XLFormRowDescriptor *)formRowAtIndex:(NSIndexPath *)indexPath;
-(XLFormRowDescriptor *)formRowWithHash:(NSUInteger)hash;
-(XLFormSectionDescriptor *)formSectionAtIndex:(NSUInteger)index;

-(NSIndexPath *)indexPathOfFormRow:(XLFormRowDescriptor *)formRow;

-(NSDictionary *)formValues;
-(NSDictionary *)httpParameters:(XLFormViewController *)formViewController;

-(NSArray *)localValidationErrors:(XLFormViewController *)formViewController;
- (void)setFirstResponder:(XLFormViewController *)formViewController;

-(XLFormRowDescriptor *)nextRowDescriptorForRow:(XLFormRowDescriptor *)currentRow;
-(XLFormRowDescriptor *)previousRowDescriptorForRow:(XLFormRowDescriptor *)currentRow;

@end


text:
//-----------------------------------------------------------------------
// <copyright company="nBuildKit">
// Copyright (c) nBuildKit. All rights reserved.
// Licensed under the Apache License, Version 2.0 license. See LICENCE.md file in the project root for full license information.
// </copyright>
//-----------------------------------------------------------------------

using System.Collections.Generic;
using System.Globalization;
using Microsoft.Build.Framework;
using NBuildKit.MsBuild.Tasks.Core;

namespace NBuildKit.MsBuild.Tasks.VersionControl
{
    /// <summary>
    /// Defines a <see cref="ITask"/> that performs a Git commit.
    /// </summary>
    public sealed class GitCommit : GitCommandLineToolTask
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="GitCommit"/> class.
        /// </summary>
        public GitCommit()
            : this(null)
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="GitCommit"/> class.
        /// </summary>
        /// <param name="invoker">The object which handles the invocation of the command line applications.</param>
        public GitCommit(IApplicationInvoker invoker)
            : base(invoker)
        {
        }

        /// <inheritdoc/>
        public override bool Execute()
        {
            var arguments = new List<string>();
            {
                arguments.Add("commit ");
                arguments.Add("--all ");
                arguments.Add(string.Format(CultureInfo.InvariantCulture, "--message=\"{0}\" ", Message.TrimEnd('\\')));
                arguments.Add("--quiet ");
            }

            InvokeGit(arguments);

            return !Log.HasLoggedErrors;
        }

        /// <summary>
        /// Gets or sets the commit message.
        /// </summary>
        [Required]
        public string Message
        {
            get;
            set;
        }
    }
}


text:
using System;

namespace NClap.Utilities
{
    /// <summary>
    /// Options for tokenizing command lines.
    /// </summary>
    [Flags]
    internal enum TokenizerOptions
    {
        /// <summary>
        /// Do not apply other policy options.
        /// </summary>
        None,

        /// <summary>
        /// Allow tokenizing of partial (incomplete) input lines; this includes
        /// ignoring errors related to unmatched quotes around the last token.
        /// </summary>
        AllowPartialInput,

        /// <summary>
        /// Handle double quote character as a token delimiter (allowing embedded
        /// whitespace within the token.
        /// </summary>
        HandleDoubleQuoteAsTokenDelimiter,

        /// <summary>
        /// Handle single quote character as a token delimiter (allowing embedded
        /// whitespace within the token.
        /// </summary>
        HandleSingleQuoteAsTokenDelimiter,
    }
}


text:
/*=========================================================================
 *
 *  Portions of this file are subject to the VTK Toolkit Version 3 copyright.
 *
 *  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
 *
 *  For complete copyright, license and disclaimer of warranty information
 *  please refer to the NOTICE file at the top of the ITK source tree.
 *
 *=========================================================================*/
#ifndef itkImageToImageFilterDetail_h
#define itkImageToImageFilterDetail_h

#include "itkImageRegion.h"
#include "itkSmartPointer.h"

namespace itk
{
/** ImageToImageFilterDetail namespace to house implementations of
 * functions that are dependent on dimension. These functions are
 * overloaded based on type unique for each different dimension.
 * These functions cannot be member functions of a class like
 * ImageToImageFilter since explicit instantiation of an
 * ImageToImageFilter would force the instantiation of all versions of
 * these overloaded functions.
 */
namespace ImageToImageFilterDetail
{
/** \struct  DispatchBase
 * \brief Base class for a class used to dispatch to dimension specific implementations.
 *
 * DispatchBase is base class used as the default case when implementations
 * are dispatched to overloaded routines based on dimension.
 *
 * \sa Dispatch
 */
struct DispatchBase {};

/** \struct BooleanDispatch
 * \brief Templated class to produce a unique type "true" and "false".
 *
 * BooleanDispatch is a templated class that produce a unique type for
 * for "true" and for "false".  These types may be used to decide which
 * version of an overloaded function to call.
 */
template< bool >
struct BooleanDispatch {};

/** \struct IntDispatch
 * \brief Templated class to produce a unique type for each integer
 *
 * IntDispatch is a templated class that produces a unique
 * type for each integer.  IntDispatch is typically
 * used as a parameter to an overloaded function where a different
 * version of the routine would need to be called for each integer value.
 */
template< int >
struct IntDispatch:public DispatchBase {};

/** \struct UnsignedIntDispatch
 * \brief Templated class to produce a unique type for each unsigned integer (usually a dimension).
 *
 * UnsignedIntDispatch is a templated class that produces a unique
 * type for each unsigned integer.  UnsignedIntDispatch is typically
 * used as a parameter to an overloaded function where each version
 * of the overloaded function is for a unique dimension.  For
 * instance, an algorithm may provide two implementations: one
 * optimized for two-dimensional images and another for any of other
 * data dimension.  For instance:
 *
 *     void Calculate(const DispatchBase&);           // General ND version
 *     void Calculate(const UnsignedIntDispatch<2>&); // 2D optimized version
 */
template< unsigned int >
struct UnsignedIntDispatch:public DispatchBase {};

/** \struct BinaryBooleanDispatch
 * \brief Templated class to produce a unique type for a pairing of booleans.
 *
 * BinaryBooleanDispatch is a templated class that produces a unique type
 * for each pairing of two boolean values ((true, true), (true, false),
 * (false, true), (false, false)).
 */
template< bool B1, bool B2 >
struct BinaryBooleanDispatch {
  /** Typedefs to extract the unique types for the first and second
        template parameters (true/false) */
  typedef BooleanDispatch< B1 > FirstType;
  typedef BooleanDispatch< B2 > SecondType;
};

/** \struct BinaryIntDispatch
 * \brief Templated class to produce a unique type for a pairing of integers.
 *
 * IntBooleanDispatch is a templated class that produces a unique type
 * for each pairing of two integer values.
 */
template< int D1, int D2 >
struct BinaryIntDispatch {
  /** Typedefs to extract the unique types for the first and second
        template parameters (unique type for the integer value) */
  typedef IntDispatch< D1 > FirstType;
  typedef IntDispatch< D2 > SecondType;
};

/** \struct BinaryUnsignedIntDispatch
 * \brief Templated class to produce a unique type for a pairing of unsigned integers (usually two dimensions).
 *
 * BinaryUnsignedIntDispatch is a templated class that produces a
 * unique type for a pairing of unsigned integers.
 * BinaryUnsignedIntDispatch is typically used a parameter to an
 * overloaded function where each version of the overloaded function
 * is for a different pairing of unsigned integers.  This type may
 * be used to produce a unique type for an (input dimension, output
 * dimension) pairing.
 */
template< unsigned int D1, unsigned int D2 >
struct BinaryUnsignedIntDispatch:public DispatchBase {
  /** Typedefs to extract the unique types for the first and second
      template parameters (unique type for the unsigned integer value) */
  typedef UnsignedIntDispatch< D1 > FirstType;
  typedef UnsignedIntDispatch< D2 > SecondType;

  /** Helper types to determine whether the two integers are the same,
   * the first greater than the second, or the first less than the second.
   *
   * ComparisonType will be either IntDispatch<0>, IntDispatch<1>, or
   * IntDispatch<-1>.
   *
   * IntDispatch<0> means the two specified integers are the same.
   * IntDispatch<1> means the first integer is greater than the second
   * IntDispatch<-1> means the first integer is less than the second
   *
   * The FirstEqualsSecondType, FirstGreaterThanSecondType,
   * FirstLessThanSecondType typedefs are provided as convenience types
   * which can be used to declare arguments to functions.  They themselves
   * do not indicate the relationship between D1 and D2.
   */
  typedef IntDispatch < ( D1 > D2 ) - ( D1 < D2 ) > ComparisonType;
  typedef IntDispatch< 0 >                          FirstEqualsSecondType;
  typedef IntDispatch< 1 >                          FirstGreaterThanSecondType;
  typedef IntDispatch< -1 >                         FirstLessThanSecondType;
};

/**
 * Copy an image region (start index and size) for the case where
 * the source and destination region are the same dimension.  This
 * is a trivial copy of a region. This is an overloaded function.
 * The other versions of this functions handle the case where the
 * destination dimension is greater than the source dimension and
 * the case where the destination dimension is less than the source
 * dimension.
 *
 * Note that the use of source and destination reflect where where
 * is information is coming from and going to.  When used in the
 * pipeline mechanism, the region requested by the output of a
 * filter is used to define the region required on the input.  In
 * this case the output of the filter is the source region and the
 * input of the filter is the destination region.
 */
template< unsigned int D1, unsigned int D2 >
void ImageToImageFilterDefaultCopyRegion(const typename
                                         BinaryUnsignedIntDispatch< D1, D2 >::FirstEqualsSecondType &,
                                         ImageRegion< D1 > & destRegion,
                                         const ImageRegion< D2 > & srcRegion)
{
  destRegion = srcRegion;
}

/**
 * Copy an image region (start index and size) for the case where
 * the source region has a greater dimension than the destination
 * region.  This copies the first portion of the source into
 * destination. This is an overloaded function.  The other versions
 * of this functions handle the case where the source dimension is
 * less than the destination dimension and the case where the
 * destination and source are the same dimension.
 *
 * Note that the use of source and destination reflect where
 * where is information is coming from and going to.  When used
 * in the pipeline mechanism, the region requested by the output
 * of a filter is used to define the region required on the input.
 * In this case the output of the filter is the source and the
 * input of the filter is the destination.
 */
template< unsigned int D1, unsigned int D2 >
void ImageToImageFilterDefaultCopyRegion(const typename
                                         BinaryUnsignedIntDispatch< D1, D2 >::FirstLessThanSecondType &,
                                         ImageRegion< D1 > & destRegion,
                                         const ImageRegion< D2 > & srcRegion)
{
  // Source dimension is greater than the destination dimension, copy the
  // first part of the source into the destination
  unsigned int dim;

  Index< D1 >         destIndex;
  Size< D1 >          destSize;
  const Index< D2 > & srcIndex = srcRegion.GetIndex();
  const Size< D2 > &  srcSize = srcRegion.GetSize();

  // copy what we can
  for ( dim = 0; dim < D1; ++dim )
    {
    destIndex[dim] = srcIndex[dim];
    destSize[dim] = srcSize[dim];
    }

  destRegion.SetIndex(destIndex);
  destRegion.SetSize(destSize);
}

/**
 * Copy an image region (start index and size) for the case where
 * the source region has a lesser dimension than the destination
 * region.  This copies the source into the first part of the
 * destination. This is an overloaded function.  The other versions
 * of this functions handle the case where the source dimension is
 * less than the destination dimension and the case where the
 * destination and source are the same dimension.
 *
 * Note that the use of source and destination reflect where
 * where is information is coming from and going to.  When used
 * in the pipeline mechanism, the region requested by the output
 * of a filter is used to define the region required on the input.
 * In this case the output of the filter is the source and the
 * input of the filter is the destination.
 */
template< unsigned int D1, unsigned int D2 >
void ImageToImageFilterDefaultCopyRegion(const typename
                                         BinaryUnsignedIntDispatch< D1, D2 >::FirstGreaterThanSecondType &,
                                         ImageRegion< D1 > & destRegion,
                                         const ImageRegion< D2 > & srcRegion)
{
  // Source dimension is less than the destination dimension, copy source
  // into the first part of the destination and set zeros elsewhere.
  unsigned int dim;

  Index< D1 >         destIndex;
  Size< D1 >          destSize;
  const Index< D2 > & srcIndex = srcRegion.GetIndex();
  const Size< D2 > &  srcSize = srcRegion.GetSize();

  // copy what we can
  for ( dim = 0; dim < D2; ++dim )
    {
    destIndex[dim] = srcIndex[dim];
    destSize[dim] = srcSize[dim];
    }
  // fill in the rest of the dimensions with zero/one
  for (; dim < D1; ++dim )
    {
    destIndex[dim] = 0;
    destSize[dim] = 1;
    }

  destRegion.SetIndex(destIndex);
  destRegion.SetSize(destSize);
}

/** \class ImageRegionCopier
 * \brief A Function object used to dispatching to a routine to copy a region
 *        (start index and size).
 *
 * Function object used for dispatching to various routines to copy
 * a region (start index and size).  Most filters use this function
 * object as trivial copy because they require the input image
 * dimension to match the output image dimension.  However, some
 * filters like itk::ExtractImageFilter can support output images of
 * a lower dimension that the input.
 *
 * This function object is used by the default implementation of
 * ImageToImageFilter::GenerateInputRequestedRegion(). It can also
 * be used in routines like ImageSource::ThreadedGenerateData()
 * where a filter may need to map the the output region for a
 * particular thread to an input region.
 *
 * This copier uses a "dispatch pattern" to call one of three
 * overloaded functions depending on whether the source and
 * destination dimensions are the same, the source is of a higher
 * dimension than the destination, or the source is of a lower
 * dimension than the destination. The use of an overloaded function
 * is required for proper compilation of the various cases.
 *
 * For the latter two cases, trivial implementations are used.  If
 * the source dimension is a lower dimension than the destination,
 * the output region information is copied into the first portion of
 * the destination region and the rest of the input region is set to
 * zero.  If the source region is a higher dimension than the
 * destination, the first portion of the source region is copied to
 * the destination region.
 *
 * If a filter needs a different behavior is will need to override
 * the CallCopyOutputRegionToInputRegion() method or the
 * CallCopyInputRegionToOutputRegion() method and delegate to the
 * appropriate RegionCopier class.
 * \ingroup ITKCommon
 */
template< unsigned int D1, unsigned int D2 >
class ImageRegionCopier
{
public:
  virtual void operator()(ImageRegion< D1 > & destRegion,
                          const ImageRegion< D2 > & srcRegion) const
  {
    typedef typename BinaryUnsignedIntDispatch< D1, D2 >::ComparisonType ComparisonType;
    ImageToImageFilterDefaultCopyRegion< D1, D2 >(
      ComparisonType(),
      destRegion, srcRegion);
  }

  virtual ~ImageRegionCopier() {}
};

/** Stream operator for ImageRegionCopier objects. Just prints the RTTI
    typename. */
template< unsigned int D1, unsigned int D2 >
std::ostream & operator<<(std::ostream & os,
                          const ImageRegionCopier< D1, D2 > &)
{
  os << "ImageRegionCopier: "
     << typeid( ImageRegionCopier< D1, D2 > ).name() << std::endl;
  return os;
}

/** operator!= for ImageRegionCopier objects. */
template< unsigned int D1, unsigned int D2 >
bool operator!=(const ImageRegionCopier< D1, D2 > & c1,
                const ImageRegionCopier< D1, D2 > & c2)
{
  return &c1 != &c2;
}
} // end of namespace ImageToImageFilterDetail
} // end namespace itk

#endif