text:
package edu.utdallas.cs.stormrider.views.materialized;

import java.util.Iterator;
import java.util.List;

import org.apache.hadoop.hbase.client.Result;

import edu.utdallas.cs.stormrider.connection.StormRiderConnection;

public interface NodesView
{
	public void updateMetricValue( String row, String metric, double value ) ;

	public long getTotalNodes() ;

	public Iterator<Result> getAllRows() ;

	public String getClosestLandmark( String row ) ;

	public Iterator<byte[]> getAdjList( String row ) ;

	public String getLinkName() ;

	public StormRiderConnection getConnection() ;

	public void updateAdjacencyListValue( String row, String adjList ) ;

	public boolean getIsLandmark( String row ) ;

	public void updateIsLandmarkValue( String row, String value ) ;

	public void updateDistToClosestLandmarkValue( String row, String value ) ;

	public long getDistToClosestLandmark( String row ) ;

	public void updateClosestLandmarkValue( String row, String value ) ;

	public List<String> getNonLandmarksList() ;
}


text:
#ifndef _ORG_JITSI_WINDOWS_SETUP_BSPATCH_H_
#define _ORG_JITSI_WINDOWS_SETUP_BSPATCH_H_

#ifdef BSPATCH_API_STATIC
int bspatch_main(int argc, const char * argv[]);
#endif /* #ifdef BSPATCH_API_STATIC */

#endif /* #ifndef _ORG_JITSI_WINDOWS_SETUP_BSPATCH_H_ */

redpajama_set_name: RedPajamaGithub


text:
module AppKit::TableHelper
  def data_download_link(item, format)
    filter_label = "#{item.resource.model.name.underscore}_filter"
    link_to format.to_s.upcase,
      ak_path(item.resource.model,
              :format => format, filter_label.to_sym => params[filter_label])
  end

  def resource_table(resource, records, page)
    table = AppKit::Views::Table.new(resource, records: records, page: page)
    render 'app_kit/table', item: table
  end
end


text:
@echo off
setlocal EnableDelayedExpansion

set Config=Debug
:: CMD can't capture the output of functions unfortunately, so we
:: have to make a variable containing the commands we want to run
set "ListProjects=dir /a-d /b /s project.json | findstr /v /i /c:bin /c:obj"

goto ParseOptions

:: Functions

:BuildSubdir

for %%d in (%*) do (
    pushd "%%d"
    for /f "delims=" %%p in ('!ListProjects!') do call dnu pack "%%p" --configuration "!Config!"
    popd
)
goto :EOF

:CheckInstalled

for %%p in (%*) do (
    set "Program=%%p"
    where "!Program!" > NUL 2>&1
    if !ERRORLEVEL! NEQ 0 (
        echo !Program! wasn't found in your PATH! 1>&2
        echo See http://docs.asp.net/en/latest/getting-started/installing-on-windows.html for instructions on installing the DNX toolchain on your PC. 1>&2
        exit /b !ERRORLEVEL!
    )
)
goto :EOF

:Restore

for %%d in (%*) do (
    pushd "%%d"
    :: dnu is a batch script, so we need to `call` it
    for /f "delims=" %%p in ('!ListProjects!') do call dnu restore "%%p"
    popd
)
goto :EOF

:RunTests

for %%d in (%*) do (
    pushd "%%d"
    for /f "delims=" %%p in ('!ListProjects!') do dnx -p "%%p" test
    popd
)
goto :EOF

:: Entry point
:ParseOptions

if "%~1" == "" goto ParsingDone

if "%~1" == "-c" (
    set "Config=%~2"
    shift
    goto ParseOptions
)

if "%~1" == "--config" (
    set "Config=%~2"
    shift
    goto ParseOptions
)

shift
goto ParseOptions

:ParsingDone

:: Check for dnu and dnx
call :CheckInstalled dnu dnx

:: Do the actual work
pushd "%~dp0"
call :Restore src test
call :BuildSubdir src
call :RunTests test
popd


text:
package org.wallerlab.yoink.api.model.molecule;

import org.wallerlab.yoink.api.service.math.Vector;

/**
 * this interface for domain model Coord
 *
 * @author Min Zheng
 *
 */
public interface Coord {

	/**
	 * get the value of coordinate
	 *
	 * @return {@link org.wallerlab.yoink.api.service.math.Vector}
	 */
	Vector getCoords();

	/**
	 * set the value of coordinate
	 *
	 * @param coords
	 *            {@link org.wallerlab.yoink.api.service.math.Vector}
	 */
	void setCoords(Vector coords);

}


text:
title: "Gray tones and striped shirts"
excerpt: "PaperFaces portrait of @sushobhan drawn with Paper by 53 on an iPad."
image:
  feature: paperfaces-sushobhan-twitter-lg.jpg
  thumb: paperfaces-sushobhan-twitter-150.jpg
tags: [portrait, illustration, Paper by 53]
---

PaperFaces portrait of [@sushobhan](http://twitter.com/sushobhan).

{% include boilerplate/paperfaces.html %}


text:
//--------------------------------------------------------------------
// Copyright (c) 2014, Emad Barsoum All rights reserved.
//--------------------------------------------------------------------

using Emgu.CV;
using Emgu.CV.Structure;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.Serialization.Formatters.Binary;
using System.Text;
using System.Xml;
using System.Xml.Serialization;

namespace Visa
{
    [Serializable()]
    public class ImageItem
    {
        public string Name
        {
            get
            {
                return _name;
            }
            set
            {
                _name = value;
            }
        }

        public string Path
        {
            get
            {
                return _path;
            }
            set
            {
                _path = value;
            }
        }

        public Matrix<float> PointDescriptors
        {
            get
            {
                return _pointDescriptors;
            }
            set
            {
                _pointDescriptors = value;
            }
        }

        public Matrix<float> ColorDescriptors
        {
            get
            {
                return _colorDescriptors;
            }
            set
            {
                _colorDescriptors = value;
            }
        }

        public List<string> Labels
        {
            get
            {
                return _labels;
            }
            set
            {
                _labels = value;
            }
        }

        public List<string> DisplayLabels
        {
            get
            {
                return _displayLabels;
            }
            set
            {
                _displayLabels = value;
            }
        }

        public List<MCvObjectDetection[]> Objects
        {
            get
            {
                return _objects;
            }
            set
            {
                _objects = value;
            }
        }

        public ImageItem()
        {}

        public ImageItem(string name,
                         string path)
        {
            _name = name;
            _path = path;
        }

        public ImageItem(string name,
                         string path,
                         Matrix<float> pointDescriptors,
                         Matrix<float> colorDescriptors)
        {
            _name = name;
            _path = path;
            _pointDescriptors = pointDescriptors;
            _colorDescriptors = colorDescriptors;
        }

        public ImageItem(string name,
                         string path,
                         List<string> labels,
                         List<string> displayLabels,
                         List<MCvObjectDetection[]> objects)
        {
            _name = name;
            _path = path;
            _labels = labels;
            _displayLabels = displayLabels;
            _objects = objects;
        }

        private string _name;
        private string _path;
        private List<string> _labels;
        private List<string> _displayLabels;
        private List<MCvObjectDetection[]> _objects;
        private Matrix<float> _pointDescriptors;
        private Matrix<float> _colorDescriptors;
    }

    [Serializable()]
    public class ImageItemCollection
    {
        public int Count
        {
            get
            {
                return _images.Count;
            }
        }

        public List<ImageItem> ImageItems
        {
            get
            {
                return _images;
            }
            set
            {
                _images = value;
            }
        }

        public ImageItemCollection()
        {
        }

        public void Add(ImageItem image)
        {
            _images.Add(image);
        }

        public void Clear()
        {
            _images.Clear();
        }

        public void Save(string filename)
        {
            using (StreamWriter writer = new StreamWriter(filename))
            {
                XmlSerializer serializer = new XmlSerializer(typeof(ImageItemCollection));
                serializer.Serialize(writer, this);
            }
        }

        public void Load(string filename)
        {
            using (Stream fileStream = new FileStream(filename, FileMode.Open))
            {
                XmlSerializer serializer = new XmlSerializer(typeof(ImageItemCollection));
                ImageItemCollection images = (ImageItemCollection)serializer.Deserialize(fileStream);
                _images = images.ImageItems;
            }
        }

        public void Append(ImageItemCollection images)
        {
            foreach (var image in images.ImageItems)
            {
                _images.Add(image);
            }
        }

        private List<ImageItem> _images = new List<ImageItem>();
    }
}


text:
package org.springframework.restdocs.hypermedia;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.jayway.jsonpath.JsonPath;
import org.springframework.restdocs.operation.OperationResponse;

import java.io.IOException;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

/**
 * Extractor that extracts HAL-type links from a sub-node of a JSON document
 * identified by a JSON path.
 */
public class JsonPathLinkExtractor extends HalLinkExtractor {

    private final ObjectMapper objectMapper = new ObjectMapper();

    private String jsonPath;

    /**
     * Constructor.
     * @param jsonPath the JSON path to the sub-node whose "_links" attribute contains
     *                 the links that are to be extracted.
     */
    public JsonPathLinkExtractor(String jsonPath){
        this.jsonPath = jsonPath;
    }

    @Override
    @SuppressWarnings("unchecked")
    public Map<String, List<Link>> extractLinks(OperationResponse response)
            throws IOException {
        Map<String, Object> jsonContent = this.objectMapper
                .readValue(extractPath(response, this.jsonPath), Map.class);
        return extractLinks(jsonContent);
    }

    private String extractPath(OperationResponse response, String jsonPath) throws JsonProcessingException {
        String json = response.getContentAsString();
        LinkedHashMap<String, Object> node = JsonPath.read(json, jsonPath);
        return objectMapper.writeValueAsString(node);
    }

}


text:
<!DOCTYPE html>
<meta charset=utf-8>
<title>Redirecting...</title>
<link rel=canonical href="../幕/index.html">
<meta http-equiv=refresh content="0; url='../幕/index.html'">

Redirecting...

Click here if you are not redirected.


text:
namespace eddic {

namespace ast {

typedef boost::variant<
            Integer,
            IntegerSuffix,
            Float,
            Literal,
            CharLiteral,
            VariableValue,
            Expression,
            Null,
            True,
            False,
            FunctionCall,
            Cast,
            BuiltinOperator,
            Assignment,
            PrefixOperation,
            Ternary,
            New,
            NewArray
        > Value;

} //end of ast

} //end of eddic

#include "ast/Assignment.hpp"
#include "ast/Ternary.hpp"
#include "ast/Expression.hpp"
#include "ast/FunctionCall.hpp"
#include "ast/BuiltinOperator.hpp"
#include "ast/Cast.hpp"
#include "ast/New.hpp"
#include "ast/NewArray.hpp"
#include "ast/PrefixOperation.hpp"

#endif


text:
<!DOCTYPE html>

		<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1" />

	<title>20 Agenda · The Plain</title>

<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@" />
<meta name="twitter:title" content="20 Agenda" />
<meta name="twitter:description" content="Comandos que te introducirán en el uso de la agenda:">

<meta name="description" content="Comandos que te introducirán en el uso de la agenda:">

<link rel="icon" href="/emacs/assets/favicon.png">
<link rel="apple-touch-icon" href="/emacs/assets/touch-icon.png">
<link rel="stylesheet" href="/emacs/assets/core.css">
<link rel="canonical" href="/emacs/notes/agenda">
<link rel="alternate" type="application/atom+xml" title="The Plain" href="/emacs/feed.xml" />

	Back to Home

20 Agenda

		<time>March 30, 2017</time>

Comandos que te introducirán en el uso de la agenda:

M-x org-agenda Menú para utilizar la agenda

C-c C-d     (org-deadline) Inserta fecha final

C-c C-s     (org-schedule) Inserta fecha para realizr la tarea

C-c / d     (org-check-deadlines) Lista citas por fecha límite

C-c / b     (org-check-before-date) Lista citas antes de una fecha

C-c / a     (org-check-after-date) Lista citas después de una fecha

    <<
		 ·

		Home

		 ·
    >>

  </> The Plain theme by Heiswayi Nrird.
  © 2020 Alfons Rovira


text:
package com.netsteadfast.greenstep.bsc.service.impl;

import javax.annotation.Resource;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Required;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.netsteadfast.greenstep.base.dao.IBaseDAO;
import com.netsteadfast.greenstep.base.service.BaseService;
import com.netsteadfast.greenstep.bsc.dao.IPdcaItemOwnerDAO;
import com.netsteadfast.greenstep.po.hbm.BbPdcaItemOwner;
import com.netsteadfast.greenstep.bsc.service.IPdcaItemOwnerService;
import com.netsteadfast.greenstep.vo.PdcaItemOwnerVO;

@Service("bsc.service.PdcaItemOwnerService")
@Scope("prototype")
@Transactional(propagation=Propagation.REQUIRED, readOnly=true)
public class PdcaItemOwnerServiceImpl extends BaseService<PdcaItemOwnerVO, BbPdcaItemOwner, String> implements IPdcaItemOwnerService<PdcaItemOwnerVO, BbPdcaItemOwner, String> {
	protected Logger logger=Logger.getLogger(PdcaItemOwnerServiceImpl.class);
	private IPdcaItemOwnerDAO<BbPdcaItemOwner, String> pdcaItemOwnerDAO;

	public PdcaItemOwnerServiceImpl() {
		super();
	}

	public IPdcaItemOwnerDAO<BbPdcaItemOwner, String> getPdcaItemOwnerDAO() {
		return pdcaItemOwnerDAO;
	}

	@Autowired
	@Resource(name="bsc.dao.PdcaItemOwnerDAO")
	@Required
	public void setPdcaItemOwnerDAO(
			IPdcaItemOwnerDAO<BbPdcaItemOwner, String> pdcaItemOwnerDAO) {
		this.pdcaItemOwnerDAO = pdcaItemOwnerDAO;
	}

	@Override
	protected IBaseDAO<BbPdcaItemOwner, String> getBaseDataAccessObject() {
		return pdcaItemOwnerDAO;
	}

	@Override
	public String getMapperIdPo2Vo() {
		return MAPPER_ID_PO2VO;
	}

	@Override
	public String getMapperIdVo2Po() {
		return MAPPER_ID_VO2PO;
	}

}


text:
<?php
/**
 * 戦闘スキル。
 *
 * マスタ的なものなので
 *
 * @author main
 *
 */
class Entity_Battle_BattleSkill extends EntityAbstract
{
  public $skillId;
  public $name;
  public $skillEffectId;
  public $invocationRate;
  public $cutIn;
  public $effectType;
  public $contents;
  public $skillLevel;
  public $maxLevel;
  public $range;
  public $targetType;
  public $effectAmount;
  public $triggeringType;
  public $controlType;
  public $sideType;
  public $costType;
  public $costValue;
}


text:
'use strict';

import 'vs/css!./media/explorerviewlet';
import { IDisposable } from 'vs/base/common/lifecycle';
import { IAction, IActionRunner } from 'vs/base/common/actions';
import { TPromise } from 'vs/base/common/winjs.base';
import { Dimension, Builder } from 'vs/base/browser/builder';
import { Scope } from 'vs/workbench/common/memento';
import { VIEWLET_ID, ExplorerViewletVisible, IFilesConfiguration } from 'vs/workbench/parts/files/common/files';
import { IViewletView, Viewlet } from 'vs/workbench/browser/viewlet';
import { SplitView, Orientation } from 'vs/base/browser/ui/splitview/splitview';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { ActionRunner, FileViewletState } from 'vs/workbench/parts/files/browser/views/explorerViewer';
import { ExplorerView } from 'vs/workbench/parts/files/browser/views/explorerView';
import { EmptyView } from 'vs/workbench/parts/files/browser/views/emptyView';
import { OpenEditorsView } from 'vs/workbench/parts/files/browser/views/openEditorsView';
import { IStorageService } from 'vs/platform/storage/common/storage';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { DelegatingWorkbenchEditorService } from 'vs/workbench/services/editor/browser/editorService';
import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection';
import { EditorInput, EditorOptions } from 'vs/workbench/common/editor';
import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor';
import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService';
import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService';
import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey';

export class ExplorerViewlet extends Viewlet {
	private viewletContainer: Builder;
	private splitView: SplitView;
	private views: IViewletView[];

	private explorerView: ExplorerView;
	private openEditorsView: OpenEditorsView;
	private emptyView: EmptyView;

	private openEditorsVisible: boolean;
	private lastFocusedView: ExplorerView | OpenEditorsView | EmptyView;
	private focusListener: IDisposable;
	private delayEditorOpeningInOpenedEditors: boolean;

	private viewletSettings: any;
	private viewletState: FileViewletState;
	private dimension: Dimension;

	private viewletVisibleContextKey: IContextKey<boolean>;

	constructor(
		@ITelemetryService telemetryService: ITelemetryService,
		@IWorkspaceContextService private contextService: IWorkspaceContextService,
		@IStorageService storageService: IStorageService,
		@IEditorGroupService private editorGroupService: IEditorGroupService,
		@IWorkbenchEditorService private editorService: IWorkbenchEditorService,
		@IConfigurationService private configurationService: IConfigurationService,
		@IInstantiationService private instantiationService: IInstantiationService,
		@IContextKeyService contextKeyService: IContextKeyService
	) {
		super(VIEWLET_ID, telemetryService);

		this.views = [];

		this.viewletState = new FileViewletState();
		this.viewletVisibleContextKey = ExplorerViewletVisible.bindTo(contextKeyService);

		this.viewletSettings = this.getMemento(storageService, Scope.WORKSPACE);
		this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationUpdated(e.config));
	}

	public create(parent: Builder): TPromise<void> {
		super.create(parent);

		this.viewletContainer = parent.div().addClass('explorer-viewlet');

		const settings = this.configurationService.getConfiguration<IFilesConfiguration>();

		return this.onConfigurationUpdated(settings);
	}

	public getActions(): IAction[] {
		if (this.openEditorsVisible) {
			return [];
		}

		if (this.explorerView) {
			return this.explorerView.getActions();
		}

		return [];
	}

	private onConfigurationUpdated(config: IFilesConfiguration): TPromise<void> {

		// No need to delay if preview is disabled
		this.delayEditorOpeningInOpenedEditors = !!config.workbench.editor.enablePreview;

		// Open editors view should always be visible in no folder workspace.
		const openEditorsVisible = !this.contextService.hasWorkspace() || config.explorer.openEditors.visible !== 0;

		// Create views on startup and if open editors visibility has changed #6919
		if (this.openEditorsVisible !== openEditorsVisible) {
			this.dispose();
			this.openEditorsVisible = openEditorsVisible;
			this.views = [];
			this.viewletContainer.clearChildren();

			if (this.openEditorsVisible) {
				this.splitView = new SplitView(this.viewletContainer.getHTMLElement());

				// Open editors view
				this.addOpenEditorsView();

				// Track focus
				this.focusListener = this.splitView.onFocus((view: ExplorerView | OpenEditorsView | EmptyView) => {
					this.lastFocusedView = view;
				});
			}

			// Explorer view
			this.addExplorerView();
			this.lastFocusedView = this.explorerView;

			return TPromise.join(this.views.map(view => view.create())).then(() => void 0).then(() => {
				if (this.dimension) {
					this.layout(this.dimension);
				}

				// Update title area since the title actions have changed.
				this.updateTitleArea();
				return this.setVisible(this.isVisible()).then(() => this.focus()); // Focus the viewlet since that triggers a rerender.
			});
		}

		return TPromise.as(null);
	}

	private addOpenEditorsView(): void {
		this.openEditorsView = this.instantiationService.createInstance(OpenEditorsView, this.getActionRunner(), this.viewletSettings);
		this.splitView.addView(this.openEditorsView);

		this.views.push(this.openEditorsView);
	}

	private addExplorerView(): void {
		let explorerOrEmptyView: ExplorerView | EmptyView;

		// With a Workspace
		if (this.contextService.hasWorkspace()) {

			// Create a delegating editor service for the explorer to be able to delay the refresh in the opened
			// editors view above. This is a workaround for being able to double click on a file to make it pinned
			// without causing the animation in the opened editors view to kick in and change scroll position.
			// We try to be smart and only use the delay if we recognize that the user action is likely to cause
			// a new entry in the opened editors view.
			const delegatingEditorService = this.instantiationService.createInstance(DelegatingWorkbenchEditorService, (input: EditorInput, options?: EditorOptions, arg3?: any) => {
				if (this.openEditorsView) {
					let delay = 0;
					if (this.delayEditorOpeningInOpenedEditors && (arg3 === false /* not side by side */ || typeof arg3 !== 'number' /* no explicit position */)) {
						const activeGroup = this.editorGroupService.getStacksModel().activeGroup;
						if (!activeGroup || !activeGroup.previewEditor) {
							delay = 250; // a new editor entry is likely because there is either no group or no preview in group
						}
					}

					this.openEditorsView.setStructuralRefreshDelay(delay);
				}

				const onSuccessOrError = (editor?: BaseEditor) => {
					if (this.openEditorsView) {
						this.openEditorsView.setStructuralRefreshDelay(0);
					}

					return editor;
				};

				return this.editorService.openEditor(input, options, arg3).then(onSuccessOrError, onSuccessOrError);
			});

			const explorerInstantiator = this.instantiationService.createChild(new ServiceCollection([IWorkbenchEditorService, delegatingEditorService]));

			const headerSize = this.openEditorsVisible ? undefined : 0; // If open editors are not visible set header size explicitly to 0, otherwise const it be computed by super class.
			this.explorerView = explorerOrEmptyView = explorerInstantiator.createInstance(ExplorerView, this.viewletState, this.getActionRunner(), this.viewletSettings, headerSize);
		}

		// No workspace
		else {
			this.emptyView = explorerOrEmptyView = this.instantiationService.createInstance(EmptyView, this.getActionRunner());
		}

		if (this.openEditorsVisible) {
			this.splitView.addView(explorerOrEmptyView);
		} else {
			explorerOrEmptyView.render(this.viewletContainer.getHTMLElement(), Orientation.VERTICAL);
		}

		this.views.push(explorerOrEmptyView);
	}

	public getExplorerView(): ExplorerView {
		return this.explorerView;
	}

	public getOpenEditorsView(): OpenEditorsView {
		return this.openEditorsView;
	}

	public setVisible(visible: boolean): TPromise<void> {
		this.viewletVisibleContextKey.set(visible);

		return super.setVisible(visible).then(() => {
			return TPromise.join(this.views.map((view) => view.setVisible(visible))).then(() => void 0);
		});
	}

	public focus(): void {
		super.focus();

		const hasOpenedEditors = !!this.editorGroupService.getStacksModel().activeGroup;

		if (this.lastFocusedView && this.lastFocusedView.isExpanded() && this.hasSelectionOrFocus(this.lastFocusedView)) {
			if (this.lastFocusedView !== this.openEditorsView || hasOpenedEditors) {
				this.lastFocusedView.focusBody();
				return;
			}
		}

		if (this.hasSelectionOrFocus(this.openEditorsView) && hasOpenedEditors) {
			return this.openEditorsView.focusBody();
		}

		if (this.hasSelectionOrFocus(this.explorerView)) {
			return this.explorerView.focusBody();
		}

		if (this.openEditorsView && this.openEditorsView.isExpanded() && hasOpenedEditors) {
			return this.openEditorsView.focusBody(); // we have entries in the opened editors view to focus on
		}

		if (this.explorerView && this.explorerView.isExpanded()) {
			return this.explorerView.focusBody();
		}

		if (this.emptyView && this.emptyView.isExpanded()) {
			return this.emptyView.focusBody();
		}

		return this.openEditorsView.focus();
	}

	private hasSelectionOrFocus(view: ExplorerView | OpenEditorsView | EmptyView): boolean {
		if (!view) {
			return false;
		}

		if (!view.isExpanded()) {
			return false;
		}

		if (view instanceof ExplorerView || view instanceof OpenEditorsView) {
			const viewer = view.getViewer();
			if (!viewer) {
				return false;
			}

			return !!viewer.getFocus() || (viewer.getSelection() && viewer.getSelection().length > 0);

		}

		return false;
	}

	public layout(dimension: Dimension): void {
		this.dimension = dimension;

		if (this.openEditorsVisible) {
			this.splitView.layout(dimension.height);
		} else if (this.explorerView) {
			this.explorerView.layout(dimension.height, Orientation.VERTICAL);
		}
	}

	public getActionRunner(): IActionRunner {
		if (!this.actionRunner) {
			this.actionRunner = new ActionRunner(this.viewletState);
		}

		return this.actionRunner;
	}

	public getOptimalWidth(): number {
		const additionalMargin = 16;
		const openedEditorsViewWidth = this.openEditorsVisible ? this.openEditorsView.getOptimalWidth() : 0;
		const explorerView = this.getExplorerView();
		const explorerViewWidth = explorerView ? explorerView.getOptimalWidth() : 0;
		const optimalWidth = Math.max(openedEditorsViewWidth, explorerViewWidth);

		return optimalWidth + additionalMargin;
	}

	public shutdown(): void {
		this.views.forEach((view) => view.shutdown());

		super.shutdown();
	}

	public dispose(): void {
		if (this.splitView) {
			this.splitView.dispose();
			this.splitView = null;
		}

		if (this.explorerView) {
			this.explorerView.dispose();
			this.explorerView = null;
		}

		if (this.openEditorsView) {
			this.openEditorsView.dispose();
			this.openEditorsView = null;
		}

		if (this.emptyView) {
			this.emptyView.dispose();
			this.emptyView = null;
		}

		if (this.focusListener) {
			this.focusListener.dispose();
			this.focusListener = null;
		}
	}
}


text:
const listeners = {};
let ID = 0;

const pub = function() {
  return function(next) {
    return function(action) {
      Object.keys(listeners).forEach(function(id) {
        listeners[id].call(null, action);
      });

      return next(action);
    };
  };
};

const unsubscribe = function(id) {
  return function() {
    delete listeners[id];
  };
};

const sub = function(callback) {
  listeners[++ID] = callback;

  return unsubscribe(ID);
};

module.exports = {
  pub,
  sub
};


text:
<!--[metadata]>
+++
title = "stats"
description = "The stats command description and usage"
keywords = ["container, resource, statistics"]
[menu.main]
parent = "smn_cli"
weight=1
+++
<![end-metadata]-->

# stats

    Usage: docker stats CONTAINER [CONTAINER...]

    Display a live stream of one or more containers' resource usage statistics

      --help=false       Print usage
      --no-stream=false  Disable streaming stats and only pull the first result

Running `docker stats` on multiple containers

    $ docker stats redis1 redis2
    CONTAINER           CPU %               MEM USAGE/LIMIT     MEM %               NET I/O
    redis1              0.07%               796 KB/64 MB        1.21%               788 B/648 B
    redis2              0.07%               2.746 MB/64 MB      4.29%               1.266 KB/648 B

The `docker stats` command will only return a live stream of data for running
containers. Stopped containers will not return any data.

> **Note:**
> If you want more detailed information about a container's resource
> usage, use the API endpoint.


text:
using UnityEngine;
using System.Collections;
using LuaInterface;
using System;

public class ToLua_UnityEngine_GameObject
{
    public static string SendMessageDefined =
@"		IntPtr L0 = LuaException.L;

		try
		{
            ++LuaException.SendMsgCount;
            LuaException.L = L;
			int count = LuaDLL.lua_gettop(L);

			if (count == 2 && TypeChecker.CheckTypes<string>(L, 2))
			{
				UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
				string arg0 = ToLua.ToString(L, 2);
				obj.SendMessage(arg0);

                if (LuaDLL.lua_toboolean(L, LuaDLL.lua_upvalueindex(1)))
                {
                    string error = LuaDLL.lua_tostring(L, -1);
                    LuaDLL.lua_pop(L, 1);
                    throw new LuaException(error, LuaException.GetLastError());
                }

				--LuaException.SendMsgCount;
                LuaException.L = L0;
				return 0;
			}
			else if (count == 3 && TypeChecker.CheckTypes<string, UnityEngine.SendMessageOptions>(L, 2))
			{
				UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
				string arg0 = ToLua.ToString(L, 2);
				UnityEngine.SendMessageOptions arg1 = (UnityEngine.SendMessageOptions)ToLua.ToObject(L, 3);
				obj.SendMessage(arg0, arg1);

                if (LuaDLL.lua_toboolean(L, LuaDLL.lua_upvalueindex(1)))
                {
                    string error = LuaDLL.lua_tostring(L, -1);
                    LuaDLL.lua_pop(L, 1);
                    throw new LuaException(error, LuaException.GetLastError());
                }

				--LuaException.SendMsgCount;
                LuaException.L = L0;
				return 0;
			}
			else if (count == 3 && TypeChecker.CheckTypes<string, object>(L, 2))
			{
				UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
				string arg0 = ToLua.ToString(L, 2);
				object arg1 = ToLua.ToVarObject(L, 3);
				obj.SendMessage(arg0, arg1);

                if (LuaDLL.lua_toboolean(L, LuaDLL.lua_upvalueindex(1)))
                {
                    string error = LuaDLL.lua_tostring(L, -1);
                    LuaDLL.lua_pop(L, 1);
                    throw new LuaException(error, LuaException.GetLastError());
                }

				--LuaException.SendMsgCount;
                LuaException.L = L0;
				return 0;
			}
			else if (count == 4 && TypeChecker.CheckTypes<string, object, UnityEngine.SendMessageOptions>(L, 2))
			{
				UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
				string arg0 = ToLua.ToString(L, 2);
				object arg1 = ToLua.ToVarObject(L, 3);
				UnityEngine.SendMessageOptions arg2 = (UnityEngine.SendMessageOptions)ToLua.ToObject(L, 4);
				obj.SendMessage(arg0, arg1, arg2);

                if (LuaDLL.lua_toboolean(L, LuaDLL.lua_upvalueindex(1)))
                {
                    string error = LuaDLL.lua_tostring(L, -1);
                    LuaDLL.lua_pop(L, 1);
                    throw new LuaException(error, LuaException.GetLastError());
                }

				--LuaException.SendMsgCount;
                LuaException.L = L0;
				return 0;
			}
			else
			{
                --LuaException.SendMsgCount;
                LuaException.L = L0;
                return LuaDLL.luaL_throw(L, ""invalid arguments to method: UnityEngine.GameObject.SendMessage"");
			}
		}
		catch(Exception e)
		{
			--LuaException.SendMsgCount;
			LuaException.L = L0;
			return LuaDLL.toluaL_exception(L, e);
		}";

    public static string SendMessageUpwardsDefined =
@"		IntPtr L0 = LuaException.L;

		try
		{
            ++LuaException.SendMsgCount;
            LuaException.L = L;
            int count = LuaDLL.lua_gettop(L);

			if (count == 2 && TypeChecker.CheckTypes<string>(L, 2))
			{
				UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
				string arg0 = ToLua.ToString(L, 2);
				obj.SendMessageUpwards(arg0);

                if (LuaDLL.lua_toboolean(L, LuaDLL.lua_upvalueindex(1)))
                {
                    string error = LuaDLL.lua_tostring(L, -1);
                    LuaDLL.lua_pop(L, 1);
                    throw new LuaException(error, LuaException.GetLastError());
                }

				--LuaException.SendMsgCount;
                LuaException.L = L0;
                return 0;
			}
			else if (count == 3 && TypeChecker.CheckTypes<string, UnityEngine.SendMessageOptions>(L, 2))
			{
				UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
				string arg0 = ToLua.ToString(L, 2);
				UnityEngine.SendMessageOptions arg1 = (UnityEngine.SendMessageOptions)ToLua.ToObject(L, 3);
				obj.SendMessageUpwards(arg0, arg1);

                if (LuaDLL.lua_toboolean(L, LuaDLL.lua_upvalueindex(1)))
                {
                    string error = LuaDLL.lua_tostring(L, -1);
                    LuaDLL.lua_pop(L, 1);
                    throw new LuaException(error, LuaException.GetLastError());
                }

				--LuaException.SendMsgCount;
                LuaException.L = L0;
                return 0;
			}
			else if (count == 3 && TypeChecker.CheckTypes<string, object>(L, 2))
			{
				UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
				string arg0 = ToLua.ToString(L, 2);
				object arg1 = ToLua.ToVarObject(L, 3);
				obj.SendMessageUpwards(arg0, arg1);

                if (LuaDLL.lua_toboolean(L, LuaDLL.lua_upvalueindex(1)))
                {
                    string error = LuaDLL.lua_tostring(L, -1);
                    LuaDLL.lua_pop(L, 1);
                    throw new LuaException(error, LuaException.GetLastError());
                }

				--LuaException.SendMsgCount;
                LuaException.L = L0;
                return 0;
			}
			else if (count == 4 && TypeChecker.CheckTypes<string, object, UnityEngine.SendMessageOptions>(L, 2))
			{
				UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
				string arg0 = ToLua.ToString(L, 2);
				object arg1 = ToLua.ToVarObject(L, 3);
				UnityEngine.SendMessageOptions arg2 = (UnityEngine.SendMessageOptions)ToLua.ToObject(L, 4);
				obj.SendMessageUpwards(arg0, arg1, arg2);

                if (LuaDLL.lua_toboolean(L, LuaDLL.lua_upvalueindex(1)))
                {
                    string error = LuaDLL.lua_tostring(L, -1);
                    LuaDLL.lua_pop(L, 1);
                    throw new LuaException(error, LuaException.GetLastError());
                }

				--LuaException.SendMsgCount;
                LuaException.L = L0;
                return 0;
			}
			else
			{
				--LuaException.SendMsgCount;
                LuaException.L = L0;
                return LuaDLL.luaL_throw(L, ""invalid arguments to method: UnityEngine.GameObject.SendMessageUpwards"");
			}
		}
		catch (Exception e)
		{
			--LuaException.SendMsgCount;
			LuaException.L = L0;
			return LuaDLL.toluaL_exception(L, e);
		}";

    public static string BroadcastMessageDefined =
@"		IntPtr L0 = LuaException.L;

		try
		{
            ++LuaException.SendMsgCount;
            LuaException.L = L;
            int count = LuaDLL.lua_gettop(L);

			if (count == 2 && TypeChecker.CheckTypes<string>(L, 2))
			{
				UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
				string arg0 = ToLua.ToString(L, 2);
				obj.BroadcastMessage(arg0);

                if (LuaDLL.lua_toboolean(L, LuaDLL.lua_upvalueindex(1)))
                {
                    string error = LuaDLL.lua_tostring(L, -1);
                    LuaDLL.lua_pop(L, 1);
                    throw new LuaException(error, LuaException.GetLastError());
                }

				--LuaException.SendMsgCount;
                LuaException.L = L0;
                return 0;
			}
			else if (count == 3 && TypeChecker.CheckTypes<string, UnityEngine.SendMessageOptions>(L, 2))
			{
				UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
				string arg0 = ToLua.ToString(L, 2);
				UnityEngine.SendMessageOptions arg1 = (UnityEngine.SendMessageOptions)ToLua.ToObject(L, 3);
				obj.BroadcastMessage(arg0, arg1);

                if (LuaDLL.lua_toboolean(L, LuaDLL.lua_upvalueindex(1)))
                {
                    string error = LuaDLL.lua_tostring(L, -1);
                    LuaDLL.lua_pop(L, 1);
                    throw new LuaException(error, LuaException.GetLastError());
                }

				--LuaException.SendMsgCount;
                LuaException.L = L0;
                return 0;
			}
			else if (count == 3 && TypeChecker.CheckTypes<string, object>(L, 2))
			{
				UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
				string arg0 = ToLua.ToString(L, 2);
				object arg1 = ToLua.ToVarObject(L, 3);
				obj.BroadcastMessage(arg0, arg1);

                if (LuaDLL.lua_toboolean(L, LuaDLL.lua_upvalueindex(1)))
                {
                    string error = LuaDLL.lua_tostring(L, -1);
                    LuaDLL.lua_pop(L, 1);
                    throw new LuaException(error, LuaException.GetLastError());
                }

				--LuaException.SendMsgCount;
                LuaException.L = L0;
                return 0;
			}
			else if (count == 4 && TypeChecker.CheckTypes<string, object, UnityEngine.SendMessageOptions>(L, 2))
			{
				UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
				string arg0 = ToLua.ToString(L, 2);
				object arg1 = ToLua.ToVarObject(L, 3);
				UnityEngine.SendMessageOptions arg2 = (UnityEngine.SendMessageOptions)ToLua.ToObject(L, 4);
				obj.BroadcastMessage(arg0, arg1, arg2);

                if (LuaDLL.lua_toboolean(L, LuaDLL.lua_upvalueindex(1)))
                {
                    string error = LuaDLL.lua_tostring(L, -1);
                    LuaDLL.lua_pop(L, 1);
                    throw new LuaException(error, LuaException.GetLastError());
                }

				--LuaException.SendMsgCount;
                LuaException.L = L0;
                return 0;
			}
			else
			{
                --LuaException.SendMsgCount;
                LuaException.L = L0;
                return LuaDLL.luaL_throw(L, ""invalid arguments to method: UnityEngine.GameObject.BroadcastMessage"");
			}
		}
		catch (Exception e)
		{
			--LuaException.SendMsgCount;
			LuaException.L = L0;
			return LuaDLL.toluaL_exception(L, e);
		}";

    public static string AddComponentDefined =
@"		IntPtr L0 = LuaException.L;

        try
        {
            ++LuaException.InstantiateCount;
            LuaException.L = L;
            ToLua.CheckArgsCount(L, 2);
			UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
			System.Type arg0 = ToLua.CheckMonoType(L, 2);
			UnityEngine.Component o = obj.AddComponent(arg0);

            if (LuaDLL.lua_toboolean(L, LuaDLL.lua_upvalueindex(1)))
            {
                string error = LuaDLL.lua_tostring(L, -1);
                LuaDLL.lua_pop(L, 1);
                throw new LuaException(error, LuaException.GetLastError());
            }

            ToLua.Push(L, o);
            LuaException.L = L0;
            --LuaException.InstantiateCount;
            return 1;
		}
		catch (Exception e)
		{
            LuaException.L = L0;
            --LuaException.InstantiateCount;
            return LuaDLL.toluaL_exception(L, e);
		}";
    [UseDefinedAttribute]
    public void SendMessage(string methodName)
    {
    }

    [UseDefinedAttribute]
    public void SendMessageUpwards(string methodName)
    {
    }

    [UseDefinedAttribute]
    public void BroadcastMessage(string methodName)
    {

    }

    [UseDefinedAttribute]
    public void AddComponent(Type t)
    {

    }
}


text:
require 'rails_helper'

RSpec.describe "challenges/1/timeslots/index.html.erb", type: :view do
  describe "students can see a list of timeslots" do
    let!(:timeslot1) { FactoryGirl.create(:timeslot) }
    let!(:timeslot2) { FactoryGirl.create(:timeslot) }
    let!(:timeslot3) { FactoryGirl.create(:timeslot) }
    let(:demo_old_timeslot) {
      t = FactoryGirl.build(:timeslot, :old_start_at_date)
      t.save(:validate => false)
      t
    }
    before(:each) do
      @not_soon_timeslots = {
        Monday: Timeslot.all,
        Tuesday: Timeslot.all,
        Wednesday: Timeslot.all,
        Thursday: Timeslot.all,
        Friday: Timeslot.all,
        Saturday: Timeslot.all,
        Sunday: Timeslot.all
      }
      @soon_timeslots = {
        Monday: nil,
        Tuesday: nil,
        Wednesday: nil,
        Thursday: nil,
        Friday: nil,
        Saturday: nil,
        Sunday: nil
      }
      @challenge = timeslot1.challenge
      render :template => "/timeslots/index.html.erb"
    end

    it "displays list" do
      rendered.should match(/Create/)
      rendered.should match(Regexp.new timeslot1.start_at.strftime("%l:%M %P"))
      rendered.should match(Regexp.new timeslot2.start_at.strftime("%l:%M %P"))
    end

    it 'does not show the old timeslot' do
      rendered.should_not include("href=\"/challenges/#{@challenge.id}/timeslots/#{demo_old_timeslot.id}\"")
      rendered.should include("href=\"/challenges/#{@challenge.id}/timeslots/#{timeslot1.id}\"")
    end
  end
end


text:
.class public interface abstract Landroid/widget/ExpandableListView$OnGroupClickListener;
.super Ljava/lang/Object;
.source "ExpandableListView.java"

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Landroid/widget/ExpandableListView;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x609
    name = "OnGroupClickListener"
.end annotation

# virtual methods
.method public abstract onGroupClick(Landroid/widget/ExpandableListView;Landroid/view/View;IJ)Z
.end method


text:
static NSString * const BTLaunchViewCacheNamespace = @"com.beauty.btlaunchview";

@interface BTLaunchCache()
@property (nonatomic,strong) dispatch_queue_t ioQueue;
@property (nonatomic,strong) NSString *diskCachePath;

@end

@implementation BTLaunchCache

+ (BTLaunchCache *)sharedCache
{
    static BTLaunchCache *cache = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        cache = [[BTLaunchCache alloc] init];
    });
    return cache;
}

- (instancetype)init
{
    self = [super init];
    if (!self) return nil;

    _ioQueue = dispatch_queue_create("com.beauty.btlaunchview.ioqueue", NULL);
    _diskCachePath = [self diskCachePathForNamespace:@"default"];

    [self createLocalDiskCachePath];

    return self;
}

- (void)createLocalDiskCachePath
{
    NSError *error = nil;
    if (![[NSFileManager defaultManager] fileExistsAtPath:_diskCachePath])
    {
        [[NSFileManager defaultManager] createDirectoryAtPath:_diskCachePath withIntermediateDirectories:YES attributes:nil error:&error];
        if (error)
        {
            NSLog(@"BTLaunchView Create File Error : %@",error);
        }
    }
}

- (void)createFileAtPath:(NSString *)path withData:(NSData *)data
{
    if (path == NULL || data == NULL) return;
    dispatch_async(_ioQueue, ^{
        [[NSFileManager defaultManager] createFileAtPath:path contents:data attributes:NULL];
    });
}

- (NSData *)dataFromUrl:(NSString *)url
{
    NSString *aurl = [self pathFromUrl:url];
    return [NSData dataWithContentsOfFile:aurl];
}

- (BOOL)isFileExistAtUrl:(NSString *)url
{
    NSString *cachePath = [self pathFromUrl:url];
    return [[NSFileManager defaultManager] fileExistsAtPath:cachePath];
}

- (NSString *)pathFromUrl:(NSString *)url
{
    NSString *key = [self keyFromUrl:url];
    return [_diskCachePath stringByAppendingPathComponent:key];
}

- (NSString *)diskCachePathForNamespace:(NSString *)ns
{
    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
    return [[[paths firstObject] stringByAppendingPathComponent:BTLaunchViewCacheNamespace] stringByAppendingPathComponent:ns];
}

- (NSString *)keyFromUrl:(NSString *)url
{
    const char *str = url.UTF8String;
    if (str == NULL)
    {
        str = "";
    }
    unsigned char r[CC_MD5_DIGEST_LENGTH];
    CC_MD5(str, (CC_LONG)strlen(str), r);
    NSString *key = [NSString stringWithFormat:@"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%@",
                     r[0], r[1], r[2], r[3], r[4], r[5], r[6], r[7], r[8], r[9], r[10],
                     r[11], r[12], r[13], r[14], r[15], [url.pathExtension isEqualToString:@""] ? @"" : [NSString stringWithFormat:@".%@", url.pathExtension]];
    return key;
}

@end


text:
package pro.taskana.task.rest.routing;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import pro.taskana.common.api.TaskanaEngine;
import pro.taskana.spi.routing.api.TaskRoutingProvider;
import pro.taskana.task.api.models.Task;

public class IntegrationTestTaskRouter implements TaskRoutingProvider {

  public static final String DEFAULT_ROUTING_TARGET = "WBI:100000000000000000000000000000000002";
  private static final Logger LOGGER = LoggerFactory.getLogger(IntegrationTestTaskRouter.class);

  private TaskanaEngine taskanaEngine;

  @Override
  public void initialize(TaskanaEngine taskanaEngine) {
    this.taskanaEngine = taskanaEngine;
  }

  @Override
  public String determineWorkbasketId(Task task) {
    return DEFAULT_ROUTING_TARGET;
  }
}


text:
/**
 * @file
 * Composite element styles
 *
 * @see /webform/example_elements_composite
 */

/* Remove extra margin are composite element which already contain form elements with margins */
fieldset.form-composite {
  margin: 0;
}


text:
<?php

$currentPath = realpath(__DIR__);
$rootPath = realpath($currentPath.'/..');

define('ROOT_PATH',$rootPath);

$loader = require_once(ROOT_PATH.'/vendor/autoload.php');

use OAuth\Config\DoctrineConfigurator;
use Doctrine\ORM\Tools\Console\ConsoleRunner as ConsoleRunner;

$app = array();
$app['config'] = parse_ini_file(ROOT_PATH.'/config/parameters.ini');
$ormConfigurator = new OAuth\Config\DoctrineConfigurator($app['config']['doctrine.proxyDirectory']);

$helperSet = $ormConfigurator->createHelperSet($app['config']);

ConsoleRunner::run($helperSet);


text:
Widget Basic Information

    <form class="form-horizontal">

    </form>


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>jQuery测试学习</title>
    <link rel="stylesheet" href="css/custom.css">

        Have a nice day!

        Have a nice day!

        Have a nice day!

        http://www.baidu.com
        <button id="btn">Test a:href</button>


text:
CREATE TABLE country (id NVARCHAR(2) NOT NULL, name NVARCHAR(64) NOT NULL, PRIMARY KEY (id));

INSERT INTO [country] ([id], [name]) VALUES ('AF', 'Afganistāna');
INSERT INTO [country] ([id], [name]) VALUES ('AL', 'Albānija');
INSERT INTO [country] ([id], [name]) VALUES ('DZ', 'Alžīrija');
INSERT INTO [country] ([id], [name]) VALUES ('AS', 'Amerikāņu Samoa');
INSERT INTO [country] ([id], [name]) VALUES ('US', 'Amerikas Savienotās Valstis');
INSERT INTO [country] ([id], [name]) VALUES ('AD', 'Andora');
INSERT INTO [country] ([id], [name]) VALUES ('AI', 'Angilja');
INSERT INTO [country] ([id], [name]) VALUES ('AO', 'Angola');
INSERT INTO [country] ([id], [name]) VALUES ('AQ', 'Antarktika');
INSERT INTO [country] ([id], [name]) VALUES ('AG', 'Antigva un Barbuda');
INSERT INTO [country] ([id], [name]) VALUES ('AE', 'Apvienotie Arābu Emirāti');
INSERT INTO [country] ([id], [name]) VALUES ('AR', 'Argentīna');
INSERT INTO [country] ([id], [name]) VALUES ('AM', 'Armēnija');
INSERT INTO [country] ([id], [name]) VALUES ('AW', 'Aruba');
INSERT INTO [country] ([id], [name]) VALUES ('UM', 'ASV Mazās Aizjūras salas');
INSERT INTO [country] ([id], [name]) VALUES ('VI', 'ASV Virdžīnas');
INSERT INTO [country] ([id], [name]) VALUES ('AU', 'Austrālija');
INSERT INTO [country] ([id], [name]) VALUES ('AT', 'Austrija');
INSERT INTO [country] ([id], [name]) VALUES ('TL', 'Austrumtimora');
INSERT INTO [country] ([id], [name]) VALUES ('AZ', 'Azerbaidžāna');
INSERT INTO [country] ([id], [name]) VALUES ('BS', 'Bahamu salas');
INSERT INTO [country] ([id], [name]) VALUES ('BH', 'Bahreina');
INSERT INTO [country] ([id], [name]) VALUES ('BY', 'Baltkrievija');
INSERT INTO [country] ([id], [name]) VALUES ('BD', 'Bangladeša');
INSERT INTO [country] ([id], [name]) VALUES ('BB', 'Barbadosa');
INSERT INTO [country] ([id], [name]) VALUES ('BZ', 'Beliza');
INSERT INTO [country] ([id], [name]) VALUES ('BE', 'Beļģija');
INSERT INTO [country] ([id], [name]) VALUES ('BJ', 'Benina');
INSERT INTO [country] ([id], [name]) VALUES ('BM', 'Bermudu salas');
INSERT INTO [country] ([id], [name]) VALUES ('BO', 'Bolīvija');
INSERT INTO [country] ([id], [name]) VALUES ('BA', 'Bosnija un Hercegovina');
INSERT INTO [country] ([id], [name]) VALUES ('BW', 'Botsvāna');
INSERT INTO [country] ([id], [name]) VALUES ('BR', 'Brazīlija');
INSERT INTO [country] ([id], [name]) VALUES ('VG', 'Britu Virdžīnas');
INSERT INTO [country] ([id], [name]) VALUES ('BN', 'Bruneja');
INSERT INTO [country] ([id], [name]) VALUES ('BG', 'Bulgārija');
INSERT INTO [country] ([id], [name]) VALUES ('BF', 'Burkinafaso');
INSERT INTO [country] ([id], [name]) VALUES ('BI', 'Burundi');
INSERT INTO [country] ([id], [name]) VALUES ('BT', 'Butāna');
INSERT INTO [country] ([id], [name]) VALUES ('BV', 'Buvē sala');
INSERT INTO [country] ([id], [name]) VALUES ('CF', 'Centrālāfrikas Republika');
INSERT INTO [country] ([id], [name]) VALUES ('TD', 'Čada');
INSERT INTO [country] ([id], [name]) VALUES ('CZ', 'Čehija');
INSERT INTO [country] ([id], [name]) VALUES ('CL', 'Čīle');
INSERT INTO [country] ([id], [name]) VALUES ('DK', 'Dānija');
INSERT INTO [country] ([id], [name]) VALUES ('AC', 'Debesbraukšanas sala');
INSERT INTO [country] ([id], [name]) VALUES ('ZA', 'Dienvidāfrikas Republika');
INSERT INTO [country] ([id], [name]) VALUES ('GS', 'Dienviddžordžija un Dienvidsendviču salas');
INSERT INTO [country] ([id], [name]) VALUES ('KR', 'Dienvidkoreja');
INSERT INTO [country] ([id], [name]) VALUES ('DG', 'Djego Garsijas atols');
INSERT INTO [country] ([id], [name]) VALUES ('DM', 'Dominika');
INSERT INTO [country] ([id], [name]) VALUES ('DO', 'Dominikānas Republika');
INSERT INTO [country] ([id], [name]) VALUES ('JE', 'Džērsija');
INSERT INTO [country] ([id], [name]) VALUES ('DJ', 'Džibutija');
INSERT INTO [country] ([id], [name]) VALUES ('EG', 'Ēģipte');
INSERT INTO [country] ([id], [name]) VALUES ('EU', 'Eiropas Savienība');
INSERT INTO [country] ([id], [name]) VALUES ('EC', 'Ekvadora');
INSERT INTO [country] ([id], [name]) VALUES ('GQ', 'Ekvatoriālā Gvineja');
INSERT INTO [country] ([id], [name]) VALUES ('ER', 'Eritreja');
INSERT INTO [country] ([id], [name]) VALUES ('ET', 'Etiopija');
INSERT INTO [country] ([id], [name]) VALUES ('FO', 'Fēru Salas');
INSERT INTO [country] ([id], [name]) VALUES ('FJ', 'Fidži');
INSERT INTO [country] ([id], [name]) VALUES ('PH', 'Filipīnas');
INSERT INTO [country] ([id], [name]) VALUES ('FK', 'Folklenda salas');
INSERT INTO [country] ([id], [name]) VALUES ('FR', 'Francija');
INSERT INTO [country] ([id], [name]) VALUES ('TF', 'Franču dienvidu teritorijas');
INSERT INTO [country] ([id], [name]) VALUES ('GF', 'Franču Gviāna');
INSERT INTO [country] ([id], [name]) VALUES ('PF', 'Franču Polinēzija');
INSERT INTO [country] ([id], [name]) VALUES ('GA', 'Gabona');
INSERT INTO [country] ([id], [name]) VALUES ('GY', 'Gajāna');
INSERT INTO [country] ([id], [name]) VALUES ('GM', 'Gambija');
INSERT INTO [country] ([id], [name]) VALUES ('GH', 'Gana');
INSERT INTO [country] ([id], [name]) VALUES ('GG', 'Gērnsija');
INSERT INTO [country] ([id], [name]) VALUES ('GI', 'Gibraltārs');
INSERT INTO [country] ([id], [name]) VALUES ('GD', 'Grenāda');
INSERT INTO [country] ([id], [name]) VALUES ('GL', 'Grenlande');
INSERT INTO [country] ([id], [name]) VALUES ('GR', 'Grieķija');
INSERT INTO [country] ([id], [name]) VALUES ('GE', 'Gruzija');
INSERT INTO [country] ([id], [name]) VALUES ('GU', 'Guama');
INSERT INTO [country] ([id], [name]) VALUES ('GP', 'Gvadelupa');
INSERT INTO [country] ([id], [name]) VALUES ('GT', 'Gvatemala');
INSERT INTO [country] ([id], [name]) VALUES ('GN', 'Gvineja');
INSERT INTO [country] ([id], [name]) VALUES ('GW', 'Gvineja-Bisava');
INSERT INTO [country] ([id], [name]) VALUES ('HT', 'Haiti');
INSERT INTO [country] ([id], [name]) VALUES ('HM', 'Hērda un Makdonalda salas');
INSERT INTO [country] ([id], [name]) VALUES ('HN', 'Hondurasa');
INSERT INTO [country] ([id], [name]) VALUES ('HR', 'Horvātija');
INSERT INTO [country] ([id], [name]) VALUES ('EE', 'Igaunija');
INSERT INTO [country] ([id], [name]) VALUES ('IN', 'Indija');
INSERT INTO [country] ([id], [name]) VALUES ('IO', 'Indijas okeāna Britu teritorija');
INSERT INTO [country] ([id], [name]) VALUES ('ID', 'Indonēzija');
INSERT INTO [country] ([id], [name]) VALUES ('IQ', 'Irāka');
INSERT INTO [country] ([id], [name]) VALUES ('IR', 'Irāna');
INSERT INTO [country] ([id], [name]) VALUES ('IE', 'Īrija');
INSERT INTO [country] ([id], [name]) VALUES ('IS', 'Īslande');
INSERT INTO [country] ([id], [name]) VALUES ('IT', 'Itālija');
INSERT INTO [country] ([id], [name]) VALUES ('IL', 'Izraēla');
INSERT INTO [country] ([id], [name]) VALUES ('JM', 'Jamaika');
INSERT INTO [country] ([id], [name]) VALUES ('JP', 'Japāna');
INSERT INTO [country] ([id], [name]) VALUES ('NC', 'Jaunkaledonija');
INSERT INTO [country] ([id], [name]) VALUES ('NZ', 'Jaunzēlande');
INSERT INTO [country] ([id], [name]) VALUES ('YE', 'Jemena');
INSERT INTO [country] ([id], [name]) VALUES ('JO', 'Jordānija');
INSERT INTO [country] ([id], [name]) VALUES ('CV', 'Kaboverde');
INSERT INTO [country] ([id], [name]) VALUES ('KY', 'Kaimanu salas');
INSERT INTO [country] ([id], [name]) VALUES ('KH', 'Kambodža');
INSERT INTO [country] ([id], [name]) VALUES ('CM', 'Kamerūna');
INSERT INTO [country] ([id], [name]) VALUES ('CA', 'Kanāda');
INSERT INTO [country] ([id], [name]) VALUES ('IC', 'Kanāriju salas');
INSERT INTO [country] ([id], [name]) VALUES ('QA', 'Katara');
INSERT INTO [country] ([id], [name]) VALUES ('KZ', 'Kazahstāna');
INSERT INTO [country] ([id], [name]) VALUES ('KE', 'Kenija');
INSERT INTO [country] ([id], [name]) VALUES ('CY', 'Kipra');
INSERT INTO [country] ([id], [name]) VALUES ('KG', 'Kirgīzija');
INSERT INTO [country] ([id], [name]) VALUES ('KI', 'Kiribati');
INSERT INTO [country] ([id], [name]) VALUES ('CP', 'Klipertona sala');
INSERT INTO [country] ([id], [name]) VALUES ('CC', 'Kokosu jeb Kīlinga salas');
INSERT INTO [country] ([id], [name]) VALUES ('CO', 'Kolumbija');
INSERT INTO [country] ([id], [name]) VALUES ('KM', 'Komoru salas');
INSERT INTO [country] ([id], [name]) VALUES ('CG', 'Kongo - Brazavila');
INSERT INTO [country] ([id], [name]) VALUES ('CD', 'Kongo Demokrātiskā Republika');
INSERT INTO [country] ([id], [name]) VALUES ('CR', 'Kostarika');
INSERT INTO [country] ([id], [name]) VALUES ('CI', 'Kotdivuāra');
INSERT INTO [country] ([id], [name]) VALUES ('RU', 'Krievija');
INSERT INTO [country] ([id], [name]) VALUES ('CU', 'Kuba');
INSERT INTO [country] ([id], [name]) VALUES ('CK', 'Kuka salas');
INSERT INTO [country] ([id], [name]) VALUES ('KW', 'Kuveita');
INSERT INTO [country] ([id], [name]) VALUES ('CN', 'Ķīna');
INSERT INTO [country] ([id], [name]) VALUES ('HK', 'Ķīnas īpašās pārvaldes apgabals Honkonga');
INSERT INTO [country] ([id], [name]) VALUES ('MO', 'Ķīnas īpašās pārvaldes apgabals Makao');
INSERT INTO [country] ([id], [name]) VALUES ('LA', 'Laosa');
INSERT INTO [country] ([id], [name]) VALUES ('LV', 'Latvija');
INSERT INTO [country] ([id], [name]) VALUES ('LS', 'Lesoto');
INSERT INTO [country] ([id], [name]) VALUES ('LB', 'Libāna');
INSERT INTO [country] ([id], [name]) VALUES ('LR', 'Libērija');
INSERT INTO [country] ([id], [name]) VALUES ('LY', 'Lībija');
INSERT INTO [country] ([id], [name]) VALUES ('GB', 'Lielbritānija');
INSERT INTO [country] ([id], [name]) VALUES ('LT', 'Lietuva');
INSERT INTO [country] ([id], [name]) VALUES ('LI', 'Lihtenšteina');
INSERT INTO [country] ([id], [name]) VALUES ('LU', 'Luksemburga');
INSERT INTO [country] ([id], [name]) VALUES ('MG', 'Madagaskara');
INSERT INTO [country] ([id], [name]) VALUES ('YT', 'Majota');
INSERT INTO [country] ([id], [name]) VALUES ('MK', 'Maķedonija');
INSERT INTO [country] ([id], [name]) VALUES ('MY', 'Malaizija');
INSERT INTO [country] ([id], [name]) VALUES ('MW', 'Malāvija');
INSERT INTO [country] ([id], [name]) VALUES ('MV', 'Maldīvija');
INSERT INTO [country] ([id], [name]) VALUES ('ML', 'Mali');
INSERT INTO [country] ([id], [name]) VALUES ('MT', 'Malta');
INSERT INTO [country] ([id], [name]) VALUES ('MA', 'Maroka');
INSERT INTO [country] ([id], [name]) VALUES ('MH', 'Māršala salas');
INSERT INTO [country] ([id], [name]) VALUES ('MQ', 'Martinika');
INSERT INTO [country] ([id], [name]) VALUES ('MU', 'Maurīcija');
INSERT INTO [country] ([id], [name]) VALUES ('MR', 'Mauritānija');
INSERT INTO [country] ([id], [name]) VALUES ('MX', 'Meksika');
INSERT INTO [country] ([id], [name]) VALUES ('ME', 'Melnkalne');
INSERT INTO [country] ([id], [name]) VALUES ('IM', 'Mena');
INSERT INTO [country] ([id], [name]) VALUES ('FM', 'Mikronēzija');
INSERT INTO [country] ([id], [name]) VALUES ('MM', 'Mjanma [Birma]');
INSERT INTO [country] ([id], [name]) VALUES ('MD', 'Moldova');
INSERT INTO [country] ([id], [name]) VALUES ('MC', 'Monako');
INSERT INTO [country] ([id], [name]) VALUES ('MN', 'Mongolija');
INSERT INTO [country] ([id], [name]) VALUES ('MS', 'Montserrata');
INSERT INTO [country] ([id], [name]) VALUES ('MZ', 'Mozambika');
INSERT INTO [country] ([id], [name]) VALUES ('NA', 'Namībija');
INSERT INTO [country] ([id], [name]) VALUES ('NR', 'Nauru');
INSERT INTO [country] ([id], [name]) VALUES ('NP', 'Nepāla');
INSERT INTO [country] ([id], [name]) VALUES ('NL', 'Nīderlande');
INSERT INTO [country] ([id], [name]) VALUES ('AN', 'Nīderlandes Antiļas');
INSERT INTO [country] ([id], [name]) VALUES ('NE', 'Nigēra');
INSERT INTO [country] ([id], [name]) VALUES ('NG', 'Nigērija');
INSERT INTO [country] ([id], [name]) VALUES ('NI', 'Nikaragva');
INSERT INTO [country] ([id], [name]) VALUES ('NU', 'Niue');
INSERT INTO [country] ([id], [name]) VALUES ('NF', 'Norfolkas sala');
INSERT INTO [country] ([id], [name]) VALUES ('NO', 'Norvēģija');
INSERT INTO [country] ([id], [name]) VALUES ('QO', 'Okeānijas attālās salas');
INSERT INTO [country] ([id], [name]) VALUES ('AX', 'Olandes salas');
INSERT INTO [country] ([id], [name]) VALUES ('OM', 'Omāna');
INSERT INTO [country] ([id], [name]) VALUES ('PK', 'Pakistāna');
INSERT INTO [country] ([id], [name]) VALUES ('PW', 'Palau');
INSERT INTO [country] ([id], [name]) VALUES ('PS', 'Palestīna');
INSERT INTO [country] ([id], [name]) VALUES ('PA', 'Panama');
INSERT INTO [country] ([id], [name]) VALUES ('PG', 'Papua-Jaungvineja');
INSERT INTO [country] ([id], [name]) VALUES ('PY', 'Paragvaja');
INSERT INTO [country] ([id], [name]) VALUES ('PE', 'Peru');
INSERT INTO [country] ([id], [name]) VALUES ('PN', 'Pitkērna');
INSERT INTO [country] ([id], [name]) VALUES ('PL', 'Polija');
INSERT INTO [country] ([id], [name]) VALUES ('PT', 'Portugāle');
INSERT INTO [country] ([id], [name]) VALUES ('PR', 'Puertoriko');
INSERT INTO [country] ([id], [name]) VALUES ('RE', 'Reinjona');
INSERT INTO [country] ([id], [name]) VALUES ('EH', 'Rietumsahāra');
INSERT INTO [country] ([id], [name]) VALUES ('RW', 'Ruanda');
INSERT INTO [country] ([id], [name]) VALUES ('RO', 'Rumānija');
INSERT INTO [country] ([id], [name]) VALUES ('SV', 'Salvadora');
INSERT INTO [country] ([id], [name]) VALUES ('WS', 'Samoa');
INSERT INTO [country] ([id], [name]) VALUES ('SM', 'Sanmarīno');
INSERT INTO [country] ([id], [name]) VALUES ('ST', 'Santome un Prinsipi');
INSERT INTO [country] ([id], [name]) VALUES ('SA', 'Saūda Arābija');
INSERT INTO [country] ([id], [name]) VALUES ('SC', 'Seišeļu salas');
INSERT INTO [country] ([id], [name]) VALUES ('BL', 'Senbartelmī');
INSERT INTO [country] ([id], [name]) VALUES ('SN', 'Senegāla');
INSERT INTO [country] ([id], [name]) VALUES ('MF', 'Senmartēna');
INSERT INTO [country] ([id], [name]) VALUES ('PM', 'Senpjēra un Mikelona');
INSERT INTO [country] ([id], [name]) VALUES ('KN', 'Sentkitsa un Nevisa');
INSERT INTO [country] ([id], [name]) VALUES ('LC', 'Sentlūsija');
INSERT INTO [country] ([id], [name]) VALUES ('VC', 'Sentvinsenta un Grenadīnas');
INSERT INTO [country] ([id], [name]) VALUES ('RS', 'Serbija');
INSERT INTO [country] ([id], [name]) VALUES ('CS', 'Serbija un Melnkalne');
INSERT INTO [country] ([id], [name]) VALUES ('EA', 'Seūta un Meliļa');
INSERT INTO [country] ([id], [name]) VALUES ('SG', 'Singapūra');
INSERT INTO [country] ([id], [name]) VALUES ('SY', 'Sīrija');
INSERT INTO [country] ([id], [name]) VALUES ('SL', 'Sjerraleone');
INSERT INTO [country] ([id], [name]) VALUES ('SK', 'Slovākija');
INSERT INTO [country] ([id], [name]) VALUES ('SI', 'Slovēnija');
INSERT INTO [country] ([id], [name]) VALUES ('SO', 'Somālija');
INSERT INTO [country] ([id], [name]) VALUES ('FI', 'Somija');
INSERT INTO [country] ([id], [name]) VALUES ('ES', 'Spānija');
INSERT INTO [country] ([id], [name]) VALUES ('SD', 'Sudāna');
INSERT INTO [country] ([id], [name]) VALUES ('SR', 'Surinama');
INSERT INTO [country] ([id], [name]) VALUES ('SH', 'Sv. Helēnas sala');
INSERT INTO [country] ([id], [name]) VALUES ('SJ', 'Svalbāra un Jana Majena sala');
INSERT INTO [country] ([id], [name]) VALUES ('SZ', 'Svazilenda');
INSERT INTO [country] ([id], [name]) VALUES ('LK', 'Šrilanka');
INSERT INTO [country] ([id], [name]) VALUES ('CH', 'Šveice');
INSERT INTO [country] ([id], [name]) VALUES ('TJ', 'Tadžikistāna');
INSERT INTO [country] ([id], [name]) VALUES ('TW', 'Taivāna');
INSERT INTO [country] ([id], [name]) VALUES ('TH', 'Taizeme');
INSERT INTO [country] ([id], [name]) VALUES ('TZ', 'Tanzānija');
INSERT INTO [country] ([id], [name]) VALUES ('TC', 'Tērksas un Kaikosas salas');
INSERT INTO [country] ([id], [name]) VALUES ('TG', 'Togo');
INSERT INTO [country] ([id], [name]) VALUES ('TK', 'Tokelau');
INSERT INTO [country] ([id], [name]) VALUES ('TO', 'Tonga');
INSERT INTO [country] ([id], [name]) VALUES ('TT', 'Trinidāda un Tobāgo');
INSERT INTO [country] ([id], [name]) VALUES ('TA', 'Tristana da Kuņas salas');
INSERT INTO [country] ([id], [name]) VALUES ('TN', 'Tunisija');
INSERT INTO [country] ([id], [name]) VALUES ('TR', 'Turcija');
INSERT INTO [country] ([id], [name]) VALUES ('TM', 'Turkmenistāna');
INSERT INTO [country] ([id], [name]) VALUES ('TV', 'Tuvalu');
INSERT INTO [country] ([id], [name]) VALUES ('UG', 'Uganda');
INSERT INTO [country] ([id], [name]) VALUES ('UA', 'Ukraina');
INSERT INTO [country] ([id], [name]) VALUES ('HU', 'Ungārija');
INSERT INTO [country] ([id], [name]) VALUES ('UY', 'Urugvaja');
INSERT INTO [country] ([id], [name]) VALUES ('UZ', 'Uzbekistāna');
INSERT INTO [country] ([id], [name]) VALUES ('DE', 'Vācija');
INSERT INTO [country] ([id], [name]) VALUES ('VU', 'Vanuatu');
INSERT INTO [country] ([id], [name]) VALUES ('VA', 'Vatikāns');
INSERT INTO [country] ([id], [name]) VALUES ('VE', 'Venecuēla');
INSERT INTO [country] ([id], [name]) VALUES ('VN', 'Vjetnama');
INSERT INTO [country] ([id], [name]) VALUES ('WF', 'Volisa un Futuna');
INSERT INTO [country] ([id], [name]) VALUES ('SB', 'Zālamana salas');
INSERT INTO [country] ([id], [name]) VALUES ('ZM', 'Zambija');
INSERT INTO [country] ([id], [name]) VALUES ('KP', 'Ziemeļkoreja');
INSERT INTO [country] ([id], [name]) VALUES ('MP', 'Ziemeļu Marianas salas');
INSERT INTO [country] ([id], [name]) VALUES ('CX', 'Ziemsvētku sala');
INSERT INTO [country] ([id], [name]) VALUES ('ZW', 'Zimbabve');
INSERT INTO [country] ([id], [name]) VALUES ('SE', 'Zviedrija');


text:
namespace Assertions_Homework
{
    using System;
    using System.Linq;

    public class AssertionsHomework
    {
        public static void Main()
        {
            int[] arr = new int[] { 3, -1, 15, 4, 17, 2, 33, 0 };
            Console.WriteLine("arr = [{0}]", string.Join(", ", arr));
            SortingMethods.SelectionSort(arr);
            Console.WriteLine("sorted = [{0}]", string.Join(", ", arr));

            SortingMethods.SelectionSort(new int[0]); // Test sorting empty array
            SortingMethods.SelectionSort(new int[1]); // Test sorting single element array

            Console.WriteLine(SearchingMethods.BinarySearch(arr, -1000));
            Console.WriteLine(SearchingMethods.BinarySearch(arr, 0));
            Console.WriteLine(SearchingMethods.BinarySearch(arr, 17));
            Console.WriteLine(SearchingMethods.BinarySearch(arr, 10));
            Console.WriteLine(SearchingMethods.BinarySearch(arr, 1000));
        }
    }
}


text:
.class Landroid/widget/SlidingDrawer$DrawerToggler;
.super Ljava/lang/Object;
.source "SlidingDrawer.java"

# interfaces
.implements Landroid/view/View$OnClickListener;

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Landroid/widget/SlidingDrawer;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x2
    name = "DrawerToggler"
.end annotation

# instance fields
.field final synthetic this$0:Landroid/widget/SlidingDrawer;

# direct methods
.method private constructor <init>(Landroid/widget/SlidingDrawer;)V
    .locals 0

    .prologue
    .line 947
    iput-object p1, p0, Landroid/widget/SlidingDrawer$DrawerToggler;->this$0:Landroid/widget/SlidingDrawer;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method synthetic constructor <init>(Landroid/widget/SlidingDrawer;Landroid/widget/SlidingDrawer$1;)V
    .locals 0
    .param p1, "x0"    # Landroid/widget/SlidingDrawer;
    .param p2, "x1"    # Landroid/widget/SlidingDrawer$1;

    .prologue
    .line 947
    invoke-direct {p0, p1}, Landroid/widget/SlidingDrawer$DrawerToggler;-><init>(Landroid/widget/SlidingDrawer;)V

    return-void
.end method

# virtual methods
.method public onClick(Landroid/view/View;)V
    .locals 1
    .param p1, "v"    # Landroid/view/View;

    .prologue
    .line 949
    iget-object v0, p0, Landroid/widget/SlidingDrawer$DrawerToggler;->this$0:Landroid/widget/SlidingDrawer;

    # getter for: Landroid/widget/SlidingDrawer;->mLocked:Z
    invoke-static {v0}, Landroid/widget/SlidingDrawer;->access$200(Landroid/widget/SlidingDrawer;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 961
    :goto_0
    return-void

    .line 956
    :cond_0
    iget-object v0, p0, Landroid/widget/SlidingDrawer$DrawerToggler;->this$0:Landroid/widget/SlidingDrawer;

    # getter for: Landroid/widget/SlidingDrawer;->mAnimateOnClick:Z
    invoke-static {v0}, Landroid/widget/SlidingDrawer;->access$300(Landroid/widget/SlidingDrawer;)Z

    move-result v0

    if-eqz v0, :cond_1

    .line 957
    iget-object v0, p0, Landroid/widget/SlidingDrawer$DrawerToggler;->this$0:Landroid/widget/SlidingDrawer;

    invoke-virtual {v0}, Landroid/widget/SlidingDrawer;->animateToggle()V

    goto :goto_0

    .line 959
    :cond_1
    iget-object v0, p0, Landroid/widget/SlidingDrawer$DrawerToggler;->this$0:Landroid/widget/SlidingDrawer;

    invoke-virtual {v0}, Landroid/widget/SlidingDrawer;->toggle()V

    goto :goto_0
.end method


text:
<?php

namespace App\EveOnline;

/*
 * [
 *     "aggregateYears" => [
 *         {year} => [ {array of statistics key-value pairs} ]
 *     ]
 * ]
 *
 */

class EveUserStats extends EveCRESTResponse
{
    public function isValid()
    {
        return $this->has('aggregateYears');
    }

    public function getErrorMessage()
    {
        return $this->get('message');
    }

    public function getYearlyStats()
    {
        return array_map(function($yearstats) {
            return new EveYearlyStats($yearstats);
        }, $this->get('aggregateYears'));
    }
}


text:
package com.onboard.domain.transform;

import java.util.List;

import org.springframework.beans.BeanUtils;

import com.google.common.collect.Lists;
import com.onboard.domain.model.Department;
import com.onboard.domain.model.User;
import com.onboard.dto.DepartmentDTO;

public class DepartmentTransform {
    public static DepartmentDTO departmentAndUsersToDepartmentDTO(Department department, List<User> users) {
        DepartmentDTO departmentDTO = new DepartmentDTO();
        BeanUtils.copyProperties(department, departmentDTO);
        departmentDTO.setUsers(Lists.transform(users, UserTransform.USER_TO_USERDTO_FUNCTION));
        return departmentDTO;
    }

}


text:
<?php

namespace DI\Test\UnitTest\Definition\Resolver;

use DI\Definition\AliasDefinition;
use DI\Definition\Resolver\AliasResolver;
use EasyMock\EasyMock;

/**
 * @covers \DI\Definition\Resolver\AliasResolver
 */
class AliasResolverTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @test
     */
    public function should_resolve_aliases()
    {
        $container = EasyMock::mock('Interop\Container\ContainerInterface', [
            'get' => 42,
        ]);
        $resolver = new AliasResolver($container);

        $value = $resolver->resolve(new AliasDefinition('foo', 'bar'));

        $this->assertEquals(42, $value);
    }
}


text:
import { Store } from '../../stores';

export const selectSearchPage = (appStore: Store): number => {
    return appStore.search.searchPage;
};


text:
<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.drools</groupId>
    <artifactId>drools-wb-drl-text-editor</artifactId>
    <version>7.40.0-SNAPSHOT</version>
  </parent>

  <artifactId>drools-wb-drl-text-editor-api</artifactId>
  <packaging>jar</packaging>

  <name>Drools Workbench - Technical Rule Editor - API</name>
  <description>Drools Workbench - Technical Rule Editor - API</description>

  <properties>
    <java.module.name>org.drools.wb.drl.text.editor.api</java.module.name>
  </properties>

  <dependencies>

    <!-- dependencies added because of new illegal transitive dependency check -->
    <dependency>
      <groupId>org.drools</groupId>
      <artifactId>drools-workbench-models-datamodel-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-bus</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-common</artifactId>
    </dependency>
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-api</artifactId>
    </dependency>

    <dependency>
      <groupId>org.kie.soup</groupId>
      <artifactId>kie-soup-commons</artifactId>
    </dependency>

    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-services-api</artifactId>
    </dependency>

    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-project-api</artifactId>
    </dependency>

    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-commons-editor-api</artifactId>
    </dependency>

  </dependencies>

</project>


text:
<?php

/**
 * @category   Technooze
 * @package    Tcategorystatus
 * @author     Damodar Bashyal @dbashyal
 */
class Technooze_Tcategorystatus_Helper_Data extends Mage_Core_Helper_Abstract
{
    /**
     * @var string
     */
    private $_today;

    /**
     * @return string
     */
    public function getDateToday()
    {
        if(empty($this->_today)){
            $timestamp      = Mage::getModel('core/date')->timestamp(time());
            $this->_today   = date('Y-m-d', $timestamp);
        }
        return $this->_today;
    }

    /**
     * @return bool
     */
    public function isLoggedIn(){
        /* @var $session Mage_Customer_Model_Session */
        $session = Mage::getSingleton('customer/session');
        return $session->isLoggedIn();
    }
}


text:
// Copyright 2015 The Bazel Authors. 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.
package com.google.devtools.build.lib.skyframe;

import static com.google.common.base.Preconditions.checkState;

import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Iterables;
import com.google.devtools.build.lib.actions.FilesetOutputSymlink;
import com.google.devtools.build.lib.actions.FilesetTraversalParams;
import com.google.devtools.build.lib.actions.FilesetTraversalParams.DirectTraversal;
import com.google.devtools.build.lib.actions.HasDigest;
import com.google.devtools.build.lib.skyframe.RecursiveFilesystemTraversalFunction.DanglingSymlinkException;
import com.google.devtools.build.lib.skyframe.RecursiveFilesystemTraversalFunction.RecursiveFilesystemTraversalException;
import com.google.devtools.build.lib.skyframe.RecursiveFilesystemTraversalValue.ResolvedFile;
import com.google.devtools.build.lib.vfs.Path;
import com.google.devtools.build.lib.vfs.PathFragment;
import com.google.devtools.build.skyframe.SkyFunction;
import com.google.devtools.build.skyframe.SkyFunctionException;
import com.google.devtools.build.skyframe.SkyKey;
import com.google.devtools.build.skyframe.SkyValue;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
import java.util.function.Function;
import javax.annotation.Nullable;

/** SkyFunction for {@link FilesetEntryValue}. */
public final class FilesetEntryFunction implements SkyFunction {

  private static final class FilesetEntryFunctionException extends SkyFunctionException {
    FilesetEntryFunctionException(RecursiveFilesystemTraversalException e) {
      super(e, Transience.PERSISTENT);
    }
  }

  private final Function<String, Path> getExecRoot;

  public FilesetEntryFunction(Function<String, Path> getExecRoot) {
    this.getExecRoot = getExecRoot;
  }

  @Override
  @Nullable
  public SkyValue compute(SkyKey key, Environment env)
      throws FilesetEntryFunctionException, InterruptedException {
    WorkspaceNameValue workspaceNameValue =
        (WorkspaceNameValue) env.getValue(WorkspaceNameValue.key());
    if (workspaceNameValue == null) {
      return null;
    }

    FilesetTraversalParams params = checkParams((FilesetEntryKey) key);

    RecursiveFilesystemTraversalValue traversalValue =
        (RecursiveFilesystemTraversalValue) env.getValue(FilesetTraversalRequest.create(params));
    if (traversalValue == null) {
      return null;
    }

    // The root can only be absent for the EMPTY RecursiveFilesystemTraversalValue instance.
    if (traversalValue.getResolvedRoot().isEmpty()) {
      return FilesetEntryValue.EMPTY;
    }

    ResolvedFile resolvedRoot = traversalValue.getResolvedRoot().get();

    // Handle dangling symlinks gracefully be returning empty results.
    if (!resolvedRoot.getType().exists()) {
      return FilesetEntryValue.EMPTY;
    }

    // The "direct" traversal params are present, which is the case when the FilesetEntry
    // specifies a package's BUILD file, a directory or a list of files.

    // The root of the direct traversal is defined as follows.
    //
    // If FilesetEntry.files is specified, then a TraversalRequest is created for each entry, the
    // root being the respective entry itself. These are all traversed for they may be
    // directories or symlinks to directories, and we need to establish Skyframe dependencies on
    // their contents for incremental correctness. If an entry is indeed a directory (but not when
    // it's a symlink to one) then we have to create symlinks to each of their children.
    // (NB: there seems to be no good reason for this, it's just how legacy Fileset works. We may
    // want to consider creating a symlink just for the directory and not for its child elements.)
    //
    // If FilesetEntry.files is not specified, then srcdir refers to either a BUILD file or a
    // directory. For the former, the root will be the parent of the BUILD file. For the latter,
    // the root will be srcdir itself.
    DirectTraversal direct = params.getDirectTraversal();

    // The prefix to remove is the entire path of the root. This is OK:
    // - when the root is a file, this removes the entire path, but the traversal's destination
    //   path is actually the name of the output symlink, so this works out correctly
    // - when the root is a directory or a symlink to one then we need to strip off the
    //   directory's path from every result (this is how the output symlinks must be created)
    //   before making them relative to the destination path
    PathFragment prefixToRemove = direct.getRoot().getRelativePart();

    Iterable<ResolvedFile> results;
    if (direct.isRecursive()
        || (resolvedRoot.getType().isDirectory() && !resolvedRoot.getType().isSymlink())) {
      // The traversal is recursive (requested for an entire FilesetEntry.srcdir) or it was
      // requested for a FilesetEntry.files entry which turned out to be a directory. We need to
      // create an output symlink for every file in it and all of its subdirectories. Only
      // exception is when the subdirectory is really a symlink to a directory -- no output
      // shall be created for the contents of those.
      // Now we create Dir objects to model the filesystem tree. The object employs a trick to
      // find directory symlinks: directory symlinks have corresponding ResolvedFile entries and
      // are added as files too, while their children, also added as files, contain the path of
      // the parent. Finding and discarding the children is easy if we traverse the tree from
      // root to leaf.
      DirectoryTree root = new DirectoryTree();
      for (ResolvedFile f : traversalValue.getTransitiveFiles().toList()) {
        PathFragment path = f.getNameInSymlinkTree().relativeTo(prefixToRemove);
        if (!path.isEmpty()) {
          path = params.getDestPath().getRelative(path);
          DirectoryTree dir = root;
          for (String segment : path.getParentDirectory().segments()) {
            dir = dir.addOrGetSubdir(segment);
          }
          dir.maybeAddFile(f);
        }
      }
      // Here's where the magic happens. The returned iterable will yield all files in the
      // directory that are not under symlinked directories, as well as all directory symlinks.
      results = root.iterateFiles();
    } else {
      // If we're on this branch then the traversal was done for just one entry in
      // FilesetEntry.files (which was not a directory, so it was either a file, a symlink to one
      // or a symlink to a directory), meaning we'll have only one output symlink.
      results = ImmutableList.of(resolvedRoot);
    }

    // The map of output symlinks. Each key is the path of an output symlink that the Fileset must
    // create, relative to the Fileset.out directory, and each value specifies extra information
    // about the link (its target, associated metadata, and again its name).
    Map<PathFragment, FilesetOutputSymlink> outputSymlinks = new LinkedHashMap<>();

    // Create one output symlink for each entry in the results.
    for (ResolvedFile f : results) {
      // The linkName has to be under the traversal's root, which is also the prefix to remove.
      PathFragment linkName = f.getNameInSymlinkTree().relativeTo(prefixToRemove);

      // Check whether the symlink is excluded before attempting to resolve it. It may be dangling,
      // but excluding it is still fine. Only top-level files can be excluded, i.e. ones that are
      // directly under the root if the root is a directory. Matching on getSegment(0) is sufficient
      // to satisfy this, since any specified exclusions with multiple segments will never match.
      // TODO(b/64754128): Investigate if we could have made the exclude earlier before
      //                   unnecessarily iterating over all the files in an excluded directory.
      if (!linkName.isEmpty() && params.getExcludedFiles().contains(linkName.getSegment(0))) {
        continue;
      }

      PathFragment targetName;
      try {
        targetName = f.getTargetInSymlinkTree(direct.isFollowingSymlinks());
      } catch (DanglingSymlinkException e) {
        throw new FilesetEntryFunctionException(e);
      }

      maybeStoreSymlink(
          linkName,
          targetName,
          f.getMetadata(),
          params.getDestPath(),
          direct.isGenerated(),
          outputSymlinks,
          getExecRoot.apply(workspaceNameValue.getName()));
    }

    return FilesetEntryValue.of(ImmutableSet.copyOf(outputSymlinks.values()));
  }

  /** Stores an output symlink unless it would overwrite an existing one. */
  private static void maybeStoreSymlink(
      PathFragment linkName,
      PathFragment linkTarget,
      HasDigest metadata,
      PathFragment destPath,
      boolean isGenerated,
      Map<PathFragment, FilesetOutputSymlink> result,
      Path execRoot) {
    linkName = destPath.getRelative(linkName);
    if (!result.containsKey(linkName)) {
      result.put(
          linkName,
          FilesetOutputSymlink.create(
              linkName, linkTarget, metadata, isGenerated, execRoot.asFragment()));
    }
  }

  /**
   * Returns the {@link TraversalRequest} node used to compute the Skyframe value for {@code
   * filesetEntryKey}. Should only be called to determine which nodes need to be rewound, and only
   * when {@code filesetEntryKey.isGenerated()}.
   */
  public static TraversalRequest getDependencyForRewinding(FilesetEntryKey key) {
    FilesetTraversalParams params = checkParams(key);
    checkState(
        params.getDirectTraversal().isGenerated(),
        "Rewinding is only supported for outputs: %s",
        params);
    // Traversals in the output tree inline any recursive TraversalRequest evaluations, i.e. there
    // won't be any transitively depended-on TraversalRequests.
    return FilesetTraversalRequest.create(params);
  }

  private static FilesetTraversalParams checkParams(FilesetEntryKey key) {
    FilesetTraversalParams params = key.argument();
    checkState(
        params.getDirectTraversal() != null && params.getNestedArtifact() == null,
        "FilesetEntry does not support nested traversal: %s",
        params);
    return params;
  }

  /**
   * Models a FilesetEntryFunction's portion of the symlink output tree created by a Fileset rule.
   *
   *
A Fileset rule's output is computed by zero or more {@link FilesetEntryFunction}s, resulting
   * in one {@link FilesetEntryValue} for each. Each of those represents a portion of the grand
   * output tree of the Fileset. These portions are later merged and written to the fileset manifest
   * file, which is then consumed by a tool that ultimately creates the symlinks in the filesystem.
   *
   *
Because the Fileset doesn't process the lists in the FilesetEntryValues any further than
   * merging them, they have to adhere to the conventions of the manifest file. One of these is that
   * files are alphabetically ordered (enables the consumer of the manifest to work faster than
   * otherwise) and another is that the contents of regular directories are listed, but contents
   * of directory symlinks are not, only the symlinks are. (Other details of the manifest file are
   * not relevant here.)
   *
   *
See {@link DirectoryTree#iterateFiles()} for more details.
   */
  private static final class DirectoryTree {
    // Use TreeMaps for the benefit of alphabetically ordered iteration.
    public final Map<String, ResolvedFile> files = new TreeMap<>();
    public final Map<String, DirectoryTree> dirs = new TreeMap<>();

    DirectoryTree addOrGetSubdir(String name) {
      DirectoryTree result = dirs.get(name);
      if (result == null) {
        result = new DirectoryTree();
        dirs.put(name, result);
      }
      return result;
    }

    void maybeAddFile(ResolvedFile r) {
      String name = r.getNameInSymlinkTree().getBaseName();
      if (!files.containsKey(name)) {
        files.put(name, r);
      }
    }

    /**
     * Lazily yields all files in this directory and all of its subdirectories.
     *
     *
The function first yields all the files directly under this directory, in alphabetical
     * order. Then come the contents of subdirectories, processed recursively in the same fashion
     * as this directory, and also in alphabetical order.
     *
     *
If a directory symlink is encountered its contents are not listed, only the symlink is.
     */
    Iterable<ResolvedFile> iterateFiles() {
      // 1. Filter directory symlinks. If the symlink target contains files, those were added
      // as normal files so their parent directory (the symlink) would show up in the dirs map
      // (as a directory) as well as in the files map (as a symlink to a directory).
      final Set<String> fileNames = files.keySet();
      Iterable<Map.Entry<String, DirectoryTree>> noDirSymlinkes =
          Iterables.filter(dirs.entrySet(), input -> !fileNames.contains(input.getKey()));

      // 2. Extract the iterables of the true subdirectories.
      Iterable<Iterable<ResolvedFile>> subdirIters =
          Iterables.transform(noDirSymlinkes, input -> input.getValue().iterateFiles());

      // 3. Just concat all subdirectory iterations for one, seamless iteration.
      Iterable<ResolvedFile> dirsIter = Iterables.concat(subdirIters);

      return Iterables.concat(files.values(), dirsIter);
    }
  }
}


text:
import { Component, OnInit } from '@angular/core';

@Component({
  templateUrl: '../mastertmpl.comp.html'
})

export class EmployeeComp implements OnInit {
  menuid: string;
  constructor() {
    this.menuid = "emp"
  }
  ngOnInit() {
    this.menuid = "emp"
  }
}


text:
package org.bricket.web;

import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.IModel;
import org.apache.wicket.request.target.basic.RedirectRequestTarget;
import org.bricket.plugin.role.service.RoleService.Roles;
import org.bricket.plugin.user.domain.User;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.context.SecurityContextHolder;

import brix.BrixNodeModel;
import brix.jcr.wrapper.BrixNode;

/**
 * Basic bricket panel with common utility methods.
 *
 * @author Ingo Renner
 * @author Henning Teek
 */
public abstract class BricketPanel extends Panel {
    private BricketFeedbackPanel feedback;
    private IModel<BrixNode> tileNode;

    public BricketPanel(String id) {
        super(id);
    }

    public BricketPanel(String id, IModel<BrixNode> tileNode) {
        this(id);
        this.tileNode = tileNode;
    }

    @Override
    protected void onConfigure() {
        this.feedback = getApplication() instanceof BricketApplication ? ((BricketApplication) getApplication())
                .getBricketFeedbackPanel(getPage()) : null;
    }

    @Override
    protected void onBeforeRender() {
        if (!hasBeenRendered()) {
            initGui();
        }
        super.onBeforeRender();
    }

    protected abstract void initGui();

    /**
     * @return the bricket feedback panel
     */
    public BricketFeedbackPanel getFeedback() {
        return feedback;
    }

    /**
     * @return the logged in user
     */
    public User getUser() {
        return ((BricketWebSession) getSession()).getUser();
    }

    /**
     * @return the tileNode
     */
    public IModel<BrixNode> getTileNode() {
        return tileNode;
    }

    /**
     * @return true if a user is signed in. false otherwise
     */
    public boolean isSignedIn() {
        return ((BricketWebSession) getSession()).isSignedIn();
    }

    /**
     * @param path
     *            The path to a page
     * @return the i18n link for the path
     */
    public String getI18nLink(String path) {
        return getBricketWebSession().getI18nLink(path);
    }

    /**
     * @param bnm
     *            The BrixNodeModel for the link
     * @return the link to the given model
     */
    public String getBrixLinkUrl(BrixNodeModel bnm) {
        return getBricketApplication().getBrixLinkUrl(bnm, getRequestCycle());
    }

    /**
     * @param path
     *            the path for the link
     * @return the link to the path
     */
    public String getBrixLinkUrl(String path) {
        return getBrixLinkUrl(getBricketApplication().getBrixLink(path));
    }

    /**
     * @param bnm
     *            the BrixNodeModel for the redirect
     */
    public void redirectTo(BrixNodeModel bnm) {
        getRequestCycle().setRequestTarget(new RedirectRequestTarget(getBrixLinkUrl(bnm)));
    }

    /**
     * @param path
     *            the path for the redirect
     */
    public void redirectTo(String path) {
        getRequestCycle().setRequestTarget(new RedirectRequestTarget(getBrixLinkUrl(path)));
    }

    /**
     * @return current authenticated wicket web session
     */
    public BricketWebSession getBricketWebSession() {
        return (BricketWebSession) BricketWebSession.get();
    }

    /**
     * @return the bricket application
     */
    public BricketApplication getBricketApplication() {
        return (BricketApplication) this.getApplication();
    }

    public boolean isSuperuser() {
        return hasRole(Roles.ROLE_SUPERUSER.name());
    }

    public boolean hasRole(String role) {
        for (GrantedAuthority grantedAuthority : SecurityContextHolder.getContext().getAuthentication()
                .getAuthorities()) {
            if (grantedAuthority.getAuthority().equals(role)) {
                return true;
            }
        }
        return false;
    }
}


text:
class gpu_program;

namespace editor
{
class debugdraw_system
{
public:
	debugdraw_system();
	~debugdraw_system();

	//-----------------------------------------------------------------------------
	//  Name : frame_render ()
	/// <summary>
	///
	///
	///
	/// </summary>
	//-----------------------------------------------------------------------------
	void frame_render(delta_t dt);

private:
	///
	std::unique_ptr<gpu_program> program_;
};
}


text:
import React, { useState } from 'react'
import PropTypes from 'prop-types'

// FPCCC
import { DOC_IMAGE } from 'common/constants/docTypes'
import { getMediaUrl } from 'common/urlHelpers'
import mediaDataAdaptor from 'common/mediaDataAdaptor'
import useIcon from 'common/useIcon'

function MediaLibrary({ siteData, infiniteScroll, selectedImages, updateImageList, modalCloseHandler }) {
  const { isFetchingNextPage, fetchNextPage, hasNextPage } = infiniteScroll
  const [selectedImagesDialog, setSelectedImagesDialog] = useState(selectedImages)

  const getLoadLabel = () => {
    if (infiniteScroll?.isFetchingNextPage) {
      return 'Loading more...'
    } else if (infiniteScroll?.hasNextPage) {
      return 'Load more'
    } else {
      return 'End of results.'
    }
  }

  const _imageSelectHandler = (image) => {
    let updatedSelectedImages = [...selectedImagesDialog]
    if (selectedImagesDialog.some((elem) => elem?.id == image?.id)) {
      updatedSelectedImages = updatedSelectedImages.filter((elem) => elem?.id != image?.id)
    } else {
      updatedSelectedImages = [...updatedSelectedImages, image]
    }
    setSelectedImagesDialog(updatedSelectedImages)
  }

  return (

          {siteData?.pages !== undefined &&
            siteData?.pages?.[0]?.entries?.length > 0 &&
            siteData?.pages?.map((page, index) => (
              <React.Fragment key={index}>
                {page.entries.map((rawImageDoc) => {
                  const image = mediaDataAdaptor({ type: DOC_IMAGE, data: rawImageDoc })
                  return (

                        <img
                          src={getMediaUrl({ type: 'gifOrImg', id: image?.id, viewName: 'Small' })}
                          alt={`${image?.title}`}
                          className="object-cover pointer-events-none"
                        />
                        <button
                          type="button"
                          className="absolute inset-0 focus:outline-none"
                          onClick={() => _imageSelectHandler(image)}
                        ></button>

                      {selectedImagesDialog.some((elem) => elem?.id == image?.id) &&
                        useIcon('CheckCircleSolid', 'absolute top-0 right-0 h-8 w-8 fill-green-700')}

                  )
                })}
              </React.Fragment>
            ))}

          <button
            className={!hasNextPage ? 'cursor-text' : ''}
            onClick={() => fetchNextPage()}
            disabled={!hasNextPage || isFetchingNextPage}
          >
            {getLoadLabel()}
          </button>

        <button className="hover:underline text-red-600" onClick={() => setSelectedImagesDialog([])}>
          Clear Selection
        </button>
        <button
          className="bg-gray-200 py-2 px-4 rounded-sm hover:bg-gray-600 hover:text-white"
          onClick={() => {
            updateImageList(selectedImagesDialog)
            modalCloseHandler()
          }}
        >
          Insert Images
        </button>

  )
}

const { array, object, func } = PropTypes
MediaLibrary.propTypes = {
  siteData: object,
  infiniteScroll: object,
  selectedImages: array,
  updateImageList: func,
  modalCloseHandler: func,
}

export default MediaLibrary


text:
require 'bundler/setup'
require 'yaml'
require 'json'
require 'robot_sweatshop/moneta-queue'
require 'robot_sweatshop/payload'
require 'robot_sweatshop/config'

module QueueHelper
  def clear_all_queues
    MonetaQueue.watched_queues.each do |queue|
      queue = MonetaQueue.new queue
      queue.clear
    end
  end
  def enqueue(queue_name, item)
    queue = MonetaQueue.new queue_name
    queue.enqueue item
  end
end

module InHelper
  def example_raw_payload(of_format:)
    payload_strings = YAML.load_file "#{__dir__}/../data/payload_data.yaml"
    payload_strings[of_format.downcase]
  end
  def input_http_url(for_job: 'test_job')
    "http://localhost:#{configatron.http_port}/payload-for/#{for_job}"
  end
  def user_agent_for(format)
    case format
    when 'Bitbucket'
      'Bitbucket.org'
    when 'Github'
      'Github-Hookshot'
    else
      'SomeUserAgent'
    end
  end
  def example_payload_request(of_format:)
    {
      payload: example_raw_payload(of_format: of_format),
      user_agent: user_agent_for(of_format)
    }
  end
  def job_request_data(type)
    case type
    when 'Git'
      ['Bitbucket', 'git_job'] # develop branch payload
    when 'JSON'
      ['JSON', 'test_job']
    when 'MinimalJob'
      ['JSON', 'minimal_job']
    when 'IgnoredBranch'
      ['Github', 'git_job'] # master branch payload
    when 'UnknownJob'
      ['Bitbucket', 'unknown_job']
    when 'EmptyJob'
      ['JSON', 'empty_job']
    when 'NonJSON'
      ['NonJSON', 'test_job']
    else
      ['', '']
    end
  end
  def example_job_request(of_type:)
    format, job_name = job_request_data of_type
    JSON.generate payload: example_raw_payload(of_format: format),
                  job_name: job_name,
                  user_agent: user_agent_for(format)
  end
end

module JobHelper
  def example_job(in_context: {}, with_commands: [])
    JSON.generate context: in_context,
                  commands: with_commands,
                  job_name: 'test_job'
  end
  def reset_test_file
    test_file = File.expand_path "#{configatron.workspace_path}/test_job-testingid/test.txt"
    FileUtils.rm_rf test_file
    test_file
  end
end