text:
package org.hisp.dhis.webapi.controller.event;

import org.hisp.dhis.common.IdentifiableObjectManager;
import org.hisp.dhis.common.OrganisationUnitSelectionMode;
import org.hisp.dhis.dataelement.DataElement;
import org.hisp.dhis.dataelement.DataElementService;
import org.hisp.dhis.dxf2.common.IdSchemes;
import org.hisp.dhis.dxf2.common.ImportOptions;
import org.hisp.dhis.dxf2.common.JacksonUtils;
import org.hisp.dhis.dxf2.events.event.Event;
import org.hisp.dhis.dxf2.events.event.EventSearchParams;
import org.hisp.dhis.dxf2.events.event.EventService;
import org.hisp.dhis.dxf2.events.event.Events;
import org.hisp.dhis.dxf2.events.event.ImportEventTask;
import org.hisp.dhis.dxf2.events.event.ImportEventsTask;
import org.hisp.dhis.dxf2.events.event.csv.CsvEventService;
import org.hisp.dhis.dxf2.events.report.EventRowService;
import org.hisp.dhis.dxf2.events.report.EventRows;
import org.hisp.dhis.dxf2.events.trackedentity.TrackedEntityInstanceService;
import org.hisp.dhis.dxf2.importsummary.ImportStatus;
import org.hisp.dhis.dxf2.importsummary.ImportSummaries;
import org.hisp.dhis.dxf2.importsummary.ImportSummary;
import org.hisp.dhis.event.EventStatus;
import org.hisp.dhis.importexport.ImportStrategy;
import org.hisp.dhis.organisationunit.OrganisationUnitService;
import org.hisp.dhis.program.Program;
import org.hisp.dhis.program.ProgramStatus;
import org.hisp.dhis.scheduling.TaskCategory;
import org.hisp.dhis.scheduling.TaskId;
import org.hisp.dhis.system.scheduling.Scheduler;
import org.hisp.dhis.system.util.StreamUtils;
import org.hisp.dhis.user.CurrentUserService;
import org.hisp.dhis.webapi.utils.ContextUtils;
import org.hisp.dhis.webapi.webdomain.WebOptions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.zip.GZIPInputStream;
import java.util.zip.GZIPOutputStream;

/**
 * @author Morten Olav Hansen <mortenoh@gmail.com>
 */
@Controller
@RequestMapping( value = EventController.RESOURCE_PATH )
public class EventController
{
    public static final String RESOURCE_PATH = "/events";

    private static final String META_DATA_KEY_DE = "de";

    //--------------------------------------------------------------------------
    // Dependencies
    //--------------------------------------------------------------------------

    @Autowired
    private IdentifiableObjectManager manager;

    @Autowired
    private CurrentUserService currentUserService;

    @Autowired
    private Scheduler scheduler;

    @Autowired
    private EventService eventService;

    @Autowired
    private CsvEventService csvEventService;

    @Autowired
    private EventRowService eventRowService;

    @Autowired
    private TrackedEntityInstanceService trackedEntityInstanceService;

    @Autowired
    private OrganisationUnitService organisationUnitService;

    @Autowired
    private DataElementService dataElementService;

    // -------------------------------------------------------------------------
    // READ
    // -------------------------------------------------------------------------

    @RequestMapping( value = "", method = RequestMethod.GET )
    @PreAuthorize( "hasRole('ALL') or hasRole('F_TRACKED_ENTITY_DATAVALUE_ADD')" )
    public String getEvents(
        @RequestParam( required = false ) String program,
        @RequestParam( required = false ) String programStage,
        @RequestParam( required = false ) ProgramStatus programStatus,
        @RequestParam( required = false ) Boolean followUp,
        @RequestParam( required = false ) String trackedEntityInstance,
        @RequestParam( required = false ) String orgUnit,
        @RequestParam( required = false ) OrganisationUnitSelectionMode ouMode,
        @RequestParam( required = false ) Date startDate,
        @RequestParam( required = false ) Date endDate,
        @RequestParam( required = false ) EventStatus status,
        @RequestParam( required = false ) Date lastUpdated,
        @RequestParam( required = false ) boolean skipMeta,
        @RequestParam( required = false ) Integer page,
        @RequestParam( required = false ) Integer pageSize,
        @RequestParam( required = false ) boolean totalPages,
        @RequestParam( required = false ) boolean skipPaging,
        @RequestParam( required = false ) String attachment,
        @RequestParam Map<String, String> parameters, IdSchemes idSchemes, Model model, HttpServletResponse response, HttpServletRequest request )
    {
        WebOptions options = new WebOptions( parameters );

        EventSearchParams params = eventService.getFromUrl( program, programStage, programStatus, followUp, orgUnit, ouMode,
            trackedEntityInstance, startDate, endDate, status, lastUpdated, idSchemes, page, pageSize, totalPages, skipPaging );

        Events events = eventService.getEvents( params );

        if ( options.hasLinks() )
        {
            for ( Event event : events.getEvents() )
            {
                event.setHref( ContextUtils.getRootPath( request ) + RESOURCE_PATH + "/" + event.getEvent() );
            }
        }

        if ( !skipMeta && params.getProgram() != null )
        {
            events.setMetaData( getMetaData( params.getProgram() ) );
        }

        model.addAttribute( "model", events );
        model.addAttribute( "viewClass", options.getViewClass( "detailed" ) );

        if ( !StringUtils.isEmpty( attachment ) )
        {
            response.addHeader( "Content-Disposition", "attachment; filename=" + attachment );
        }

        return "events";
    }

    @RequestMapping( value = "", method = RequestMethod.GET, produces = { "application/csv", "application/csv+gzip", "text/csv" } )
    @PreAuthorize( "hasRole('ALL') or hasRole('F_TRACKED_ENTITY_DATAVALUE_ADD')" )
    public void getCsvEvents(
        @RequestParam( required = false ) String program,
        @RequestParam( required = false ) String programStage,
        @RequestParam( required = false ) ProgramStatus programStatus,
        @RequestParam( required = false ) Boolean followUp,
        @RequestParam( required = false ) String trackedEntityInstance,
        @RequestParam( required = false ) String orgUnit,
        @RequestParam( required = false ) OrganisationUnitSelectionMode ouMode,
        @RequestParam( required = false ) Date startDate,
        @RequestParam( required = false ) Date endDate,
        @RequestParam( required = false ) EventStatus status,
        @RequestParam( required = false ) Date lastUpdated,
        @RequestParam( required = false ) Integer page,
        @RequestParam( required = false ) Integer pageSize,
        @RequestParam( required = false ) boolean totalPages,
        @RequestParam( required = false ) boolean skipPaging,
        @RequestParam( required = false ) String attachment,
        @RequestParam( required = false, defaultValue = "false" ) boolean skipHeader,
        @RequestParam Map<String, String> parameters,
        IdSchemes idSchemes, Model model, HttpServletResponse response, HttpServletRequest request ) throws IOException
    {
        EventSearchParams params = eventService.getFromUrl( program, programStage, programStatus, followUp, orgUnit, ouMode,
            trackedEntityInstance, startDate, endDate, status, lastUpdated, idSchemes, page, pageSize, totalPages, skipPaging );

        Events events = eventService.getEvents( params );

        OutputStream outputStream = response.getOutputStream();
        response.setContentType( "application/csv" );

        if ( ContextUtils.isAcceptGzip( request ) )
        {
            response.addHeader( ContextUtils.HEADER_CONTENT_TRANSFER_ENCODING, "binary" );
            outputStream = new GZIPOutputStream( outputStream );
            response.setContentType( "application/csv+gzip" );
        }

        if ( !StringUtils.isEmpty( attachment ) )
        {
            response.addHeader( "Content-Disposition", "attachment; filename=" + attachment );
        }

        csvEventService.writeEvents( outputStream, events, !skipHeader );
        response.getOutputStream().flush();
        response.getOutputStream().close();
    }

    @RequestMapping( value = "/eventRows", method = RequestMethod.GET )
    @PreAuthorize( "hasRole('ALL') or hasRole('F_TRACKED_ENTITY_DATAVALUE_ADD')" )
    public String getEventRows(
        @RequestParam( required = false ) String program,
        @RequestParam( required = false ) String orgUnit,
        @RequestParam( required = false ) OrganisationUnitSelectionMode ouMode,
        @RequestParam( required = false ) ProgramStatus programStatus,
        @RequestParam( required = false ) EventStatus eventStatus,
        @RequestParam( required = false ) Date startDate,
        @RequestParam( required = false ) Date endDate,
        @RequestParam( required = false ) boolean totalPages,
        @RequestParam( required = false ) boolean skipPaging,
        @RequestParam Map<String, String> parameters, Model model, HttpServletRequest request )
    {
        WebOptions options = new WebOptions( parameters );

        EventSearchParams params = eventService.getFromUrl( program, null, programStatus, null,
            orgUnit, ouMode, null, startDate, endDate, eventStatus, null, null, null, null, totalPages, skipPaging );

        EventRows eventRows = eventRowService.getEventRows( params );

        model.addAttribute( "model", eventRows );
        model.addAttribute( "viewClass", options.getViewClass( "detailed" ) );

        return "eventRows";
    }

    @RequestMapping( value = "/{uid}", method = RequestMethod.GET )
    @PreAuthorize( "hasRole('ALL') or hasRole('F_TRACKED_ENTITY_DATAVALUE_ADD')" )
    public String getEvent( @PathVariable( "uid" ) String uid, @RequestParam Map<String, String> parameters,
        Model model, HttpServletRequest request, HttpServletResponse response ) throws Exception
    {
        WebOptions options = new WebOptions( parameters );
        Event event = eventService.getEvent( uid );

        if ( event == null )
        {
            ContextUtils.notFoundResponse( response, "Event not found for uid: " + uid );
            return null;
        }

        if ( options.hasLinks() )
        {
            event.setHref( ContextUtils.getRootPath( request ) + RESOURCE_PATH + "/" + uid );
        }

        model.addAttribute( "model", event );
        model.addAttribute( "viewClass", options.getViewClass( "detailed" ) );

        return "event";
    }

    private Map<Object, Object> getMetaData( Program program )
    {
        Map<Object, Object> metaData = new HashMap<>();

        if ( program != null )
        {
            Map<String, String> dataElements = new HashMap<>();

            for ( DataElement de : program.getAllDataElements() )
            {
                dataElements.put( de.getUid(), de.getDisplayName() );
            }

            metaData.put( META_DATA_KEY_DE, dataElements );
        }

        return metaData;
    }

    // -------------------------------------------------------------------------
    // CREATE
    // -------------------------------------------------------------------------

    @RequestMapping( method = RequestMethod.POST, consumes = "application/xml" )
    @PreAuthorize( "hasRole('ALL') or hasRole('F_TRACKED_ENTITY_DATAVALUE_ADD')" )
    public void postXmlEvent( @RequestParam( defaultValue = "CREATE" ) ImportStrategy strategy, HttpServletResponse response, HttpServletRequest request, ImportOptions importOptions ) throws Exception
    {
        importOptions.setImportStrategy( strategy.name() );
        InputStream inputStream = StreamUtils.wrapAndCheckCompressionFormat( request.getInputStream() );

        if ( !importOptions.isAsync() )
        {
            ImportSummaries importSummaries = eventService.addEventsXml( inputStream, importOptions );

            for ( ImportSummary importSummary : importSummaries.getImportSummaries() )
            {
                if ( !importOptions.isDryRun() )
                {
                    if ( !importSummary.getStatus().equals( ImportStatus.ERROR ) )
                    {
                        importSummary.setHref( ContextUtils.getRootPath( request ) + RESOURCE_PATH + "/" + importSummary.getReference() );
                    }
                }
            }

            if ( importSummaries.getImportSummaries().size() == 1 )
            {
                ImportSummary importSummary = importSummaries.getImportSummaries().get( 0 );

                if ( !importOptions.isDryRun() )
                {
                    if ( !importSummary.getStatus().equals( ImportStatus.ERROR ) )
                    {
                        response.setHeader( "Location", ContextUtils.getRootPath( request ) + RESOURCE_PATH + "/" + importSummary.getReference() );
                    }
                }
            }

            JacksonUtils.toXml( response.getOutputStream(), importSummaries );
        }
        else
        {
            TaskId taskId = new TaskId( TaskCategory.EVENT_IMPORT, currentUserService.getCurrentUser() );
            scheduler.executeTask( new ImportEventTask( inputStream, eventService, importOptions, taskId, false ) );
            response.setHeader( "Location", ContextUtils.getRootPath( request ) + "/system/tasks/" + TaskCategory.EVENT_IMPORT );
            response.setStatus( HttpServletResponse.SC_NO_CONTENT );
        }
    }

    @RequestMapping( method = RequestMethod.POST, consumes = "application/json" )
    @PreAuthorize( "hasRole('ALL') or hasRole('F_TRACKED_ENTITY_DATAVALUE_ADD')" )
    public void postJsonEvent( @RequestParam( defaultValue = "CREATE" ) ImportStrategy strategy, HttpServletResponse response, HttpServletRequest request, ImportOptions importOptions ) throws Exception
    {
        importOptions.setImportStrategy( strategy.name() );
        InputStream inputStream = StreamUtils.wrapAndCheckCompressionFormat( request.getInputStream() );

        if ( !importOptions.isAsync() )
        {
            ImportSummaries importSummaries = eventService.addEventsJson( inputStream, importOptions );

            for ( ImportSummary importSummary : importSummaries.getImportSummaries() )
            {
                if ( !importOptions.isDryRun() )
                {
                    if ( !importSummary.getStatus().equals( ImportStatus.ERROR ) )
                    {
                        importSummary.setHref( ContextUtils.getRootPath( request ) + RESOURCE_PATH + "/" + importSummary.getReference() );
                    }
                }
            }

            if ( importSummaries.getImportSummaries().size() == 1 )
            {
                ImportSummary importSummary = importSummaries.getImportSummaries().get( 0 );

                if ( !importOptions.isDryRun() )
                {
                    if ( !importSummary.getStatus().equals( ImportStatus.ERROR ) )
                    {
                        response.setHeader( "Location", ContextUtils.getRootPath( request ) + RESOURCE_PATH + "/" + importSummary.getReference() );
                    }
                }
            }

            JacksonUtils.toJson( response.getOutputStream(), importSummaries );
        }
        else
        {
            TaskId taskId = new TaskId( TaskCategory.EVENT_IMPORT, currentUserService.getCurrentUser() );
            scheduler.executeTask( new ImportEventTask( inputStream, eventService, importOptions, taskId, true ) );
            response.setHeader( "Location", ContextUtils.getRootPath( request ) + "/system/tasks/" + TaskCategory.EVENT_IMPORT );
            response.setStatus( HttpServletResponse.SC_NO_CONTENT );
        }
    }

    @RequestMapping( method = RequestMethod.POST, consumes = { "application/csv", "text/csv" } )
    @PreAuthorize( "hasRole('ALL') or hasRole('F_TRACKED_ENTITY_DATAVALUE_ADD')" )
    public void postCsvEvents(
        @RequestParam( required = false, defaultValue = "false" ) boolean skipFirst,
        HttpServletResponse response, HttpServletRequest request, ImportOptions importOptions ) throws IOException
    {
        InputStream inputStream = ContextUtils.isAcceptGzip( request ) ? new GZIPInputStream( request.getInputStream() ) : request.getInputStream();

        Events events = csvEventService.readEvents( inputStream, skipFirst );

        if ( !importOptions.isAsync() )
        {
            ImportSummaries importSummaries = eventService.addEvents( events.getEvents(), importOptions, null );
            JacksonUtils.toJson( response.getOutputStream(), importSummaries );
        }
        else
        {
            TaskId taskId = new TaskId( TaskCategory.EVENT_IMPORT, currentUserService.getCurrentUser() );
            scheduler.executeTask( new ImportEventsTask( events.getEvents(), eventService, importOptions, taskId ) );
            response.setHeader( "Location", ContextUtils.getRootPath( request ) + "/system/tasks/" + TaskCategory.EVENT_IMPORT );
            response.setStatus( HttpServletResponse.SC_NO_CONTENT );
        }
    }

    // -------------------------------------------------------------------------
    // UPDATE
    // -------------------------------------------------------------------------

    @RequestMapping( value = "/{uid}", method = RequestMethod.PUT, consumes = { "application/xml", "text/xml" } )
    @PreAuthorize( "hasRole('ALL') or hasRole('F_TRACKED_ENTITY_DATAVALUE_ADD')" )
    public void putXmlEvent( HttpServletResponse response, HttpServletRequest request, @PathVariable( "uid" ) String uid, ImportOptions importOptions ) throws IOException
    {
        Event event = eventService.getEvent( uid );

        if ( event == null )
        {
            ContextUtils.notFoundResponse( response, "Event not found for uid: " + uid );
            return;
        }

        Event updatedEvent = JacksonUtils.fromXml( request.getInputStream(), Event.class );
        updatedEvent.setEvent( uid );

        eventService.updateEvent( updatedEvent, false, importOptions );
        ContextUtils.okResponse( response, "Event updated: " + uid );
    }

    @RequestMapping( value = "/{uid}", method = RequestMethod.PUT, consumes = "application/json" )
    @PreAuthorize( "hasRole('ALL') or hasRole('F_TRACKED_ENTITY_DATAVALUE_ADD')" )
    public void putJsonEvent( HttpServletResponse response, HttpServletRequest request, @PathVariable( "uid" ) String uid, ImportOptions importOptions ) throws IOException
    {
        Event event = eventService.getEvent( uid );

        if ( event == null )
        {
            ContextUtils.notFoundResponse( response, "Event not found for uid: " + uid );
            return;
        }

        Event updatedEvent = JacksonUtils.fromJson( request.getInputStream(), Event.class );
        updatedEvent.setEvent( uid );

        eventService.updateEvent( updatedEvent, false, importOptions );
        ContextUtils.okResponse( response, "Event updated: " + uid );
    }

    @RequestMapping( value = "/{uid}/{dataElementUid}", method = RequestMethod.PUT, consumes = "application/json" )
    @PreAuthorize( "hasRole('ALL') or hasRole('F_TRACKED_ENTITY_DATAVALUE_ADD')" )
    public void putJsonEventSingleValue( HttpServletResponse response, HttpServletRequest request, @PathVariable( "uid" ) String uid, @PathVariable( "dataElementUid" ) String dataElementUid ) throws IOException
    {
        Event event = eventService.getEvent( uid );

        if ( event == null )
        {
            ContextUtils.notFoundResponse( response, "Event not found for uid: " + uid );
            return;
        }

        DataElement dataElement = dataElementService.getDataElement( dataElementUid );

        if ( dataElement == null )
        {
            ContextUtils.notFoundResponse( response, "DataElement not found for uid: " + dataElementUid );
            return;
        }

        Event updatedEvent = JacksonUtils.fromJson( request.getInputStream(), Event.class );
        updatedEvent.setEvent( uid );

        eventService.updateEvent( updatedEvent, true );
        ContextUtils.okResponse( response, "Event updated: " + uid );

    }

    @RequestMapping( value = "/{uid}/addNote", method = RequestMethod.PUT, consumes = "application/json" )
    @PreAuthorize( "hasRole('ALL') or hasRole('F_TRACKED_ENTITY_DATAVALUE_ADD')" )
    public void putJsonEventForNote( HttpServletResponse response, HttpServletRequest request, @PathVariable( "uid" ) String uid, ImportOptions importOptions ) throws IOException
    {
        Event event = eventService.getEvent( uid );

        if ( event == null )
        {
            ContextUtils.notFoundResponse( response, "Event not found for uid: " + uid );
            return;
        }

        Event updatedEvent = JacksonUtils.fromJson( request.getInputStream(), Event.class );
        updatedEvent.setEvent( uid );

        eventService.updateEventForNote( updatedEvent );
        ContextUtils.okResponse( response, "Event updated: " + uid );
    }

    @RequestMapping( value = "/{uid}/updateEventDate", method = RequestMethod.PUT, consumes = "application/json" )
    @PreAuthorize( "hasRole('ALL') or hasRole('F_TRACKED_ENTITY_DATAVALUE_ADD')" )
    public void putJsonEventForEventDate( HttpServletResponse response, HttpServletRequest request, @PathVariable( "uid" ) String uid, ImportOptions importOptions ) throws IOException
    {
        Event event = eventService.getEvent( uid );

        if ( event == null )
        {
            ContextUtils.notFoundResponse( response, "Event not found for uid: " + uid );
            return;
        }

        Event updatedEvent = JacksonUtils.fromJson( request.getInputStream(), Event.class );
        updatedEvent.setEvent( uid );

        eventService.updateEventForEventDate( updatedEvent );
        ContextUtils.okResponse( response, "Event updated: " + uid );
    }

    // -------------------------------------------------------------------------
    // DELETE
    // -------------------------------------------------------------------------

    @RequestMapping( value = "/{uid}", method = RequestMethod.DELETE )
    @PreAuthorize( "hasRole('ALL') or hasRole('F_TRACKED_ENTITY_DATAVALUE_DELETE')" )
    public void deleteEvent( HttpServletResponse response, @PathVariable( "uid" ) String uid )
    {
        Event event = eventService.getEvent( uid );

        if ( event == null )
        {
            ContextUtils.notFoundResponse( response, "Event not found for uid: " + uid );
            return;
        }

        response.setStatus( HttpServletResponse.SC_NO_CONTENT );
        eventService.deleteEvent( event );
    }
}


text:
<?php
namespace app\lib;

class Curl{
	protected $url;
	protected $postFields;
	protected $config;
	protected $curl;

	function __construct( $url, $postFields = null , $config = null )
	{
		$this->url = $url;
		$this->curl = \curl_init();
		$this->postFields = array();
		$this->config = array(
				CURLOPT_RETURNTRANSFER => 1,
				CURLOPT_USERAGENT => "NWRP Registration",
				CURLOPT_FAILONERROR => true,
				CURLOPT_POST => (!empty($postFields)),
		);
		if( is_array($postFields)){
			$this->postFields = array_merge($this->postFields, $postFields);
		}
		if( is_array($config)){
			$this->config = array_merge($this->config, $config);
		}
	}

	function addPostData( $var, $val )
	{
		$this->postFields[$var] = $val;
	}

	function addConfig( $var, $val )
	{
		$this->config[$var] = $val;
	}

	function curlRequest()
	{
		if( !$this->curl ){
			$this->curl = \curl_init($this->url);
		}

		$this->config[CURLOPT_URL] = $this->url;

		if(!empty($this->postFields)){
			$this->config[CURLOPT_POSTFIELDS] = $this->postFields;
			//$this->config[CURLOPT_HTTPHEADER][] = 'Content-length:'.strlen(implode('',$this->postFields));
		}

		\curl_setopt_array(
			$this->curl,
			$this->config
		);

		$resp = \curl_exec( $this->curl );

		if( !$resp ){
			throw new \Exception( 'Error: "' . \curl_error($this->curl) . '" - Code: ' . \curl_errno($this->curl) );
		}

		\curl_close( $this->curl );

		return $resp;
	}
}

redpajama_set_name: RedPajamaGithub


text:
<?php

declare(strict_types=1);

/*
 * This file is part of the RollerworksSearch package.
 *
 * (c) Sebastiaan Stok <s.stok@rollerscapes.net>
 *
 * This source file is subject to the MIT license that is bundled
 * with this source code in the file LICENSE.
 */

namespace Rollerworks\Component\Search\Elasticsearch;

interface ValueConversion
{
    /**
     * Returns the converted value as a valid Elasticsearch value.
     *
     * @param mixed $value
     *
     * @return mixed
     */
    public function convertValue($value);
}


text:
.standard-body .full-width .container {
	max-width: none;
	width: 1030px;
}

.no-responsive body {
	min-width: 1070px;
}

.standard-body .fixed .background {
	width: 940px;
	max-width: none;
}

.main-fixed,
.fixed-body-2-2,
.standard-body .fixed2 .background {
	width: 1030px;
	max-width: none;
}

.main-fixed .main-content .pattern > .container {
     padding-bottom: 50px;
}

ul.megamenu li .sub-menu.full-width-sub-menu .content {
     padding: 30px 40px 25px 40px;
}

@media (min-width:992px) and (max-width:1098px) {
	.responsive .standard-body .full-width .container {
		width: 926px;
	}

	.responsive .standard-body .fixed .background {
		width: 836px;
	}

	.responsive .main-fixed,
	.responsive .fixed-body-2-2,
	.responsive .standard-body .fixed2 .background {
		width: 926px;
	}
}

@media (min-width:768px) and (max-width:992px) {
	.responsive .standard-body .full-width .container {
		width: 728px;
	}

	.responsive .standard-body .fixed .background {
		width: 688px;
	}

	.responsive .main-fixed,
	.responsive .fixed-body-2-2,
	.responsive .standard-body .fixed2 .background {
		width: 728px;
	}
}

@media (max-width:768px) {
	.responsive .standard-body .full-width .container {
		width: auto;
	}

	.responsive .standard-body .fixed .background {
		width: auto;
	}

	.responsive .main-fixed,
	.responsive .fixed-body-2-2,
	.responsive .standard-body .fixed2 .background {
		width: auto;
	}

	.responsive .main-fixed .main-content .pattern > .container {
		padding-bottom: 35px;
	}
}


text:
@interface PodsDummy_HHZUtils : NSObject
@end
@implementation PodsDummy_HHZUtils
@end


text:
classdef dst
% Functions related to discrete sine transform
%
% Remarks:
%
%
%  Influenced by:
%  - WaveLab

methods(Static)

    function alpha = forward_1(x)
        % Forward transform for DST type 1.
        options.length_constraint = @spx.dsp.dyadic_minus_one_length_constraint;
        alpha = spx.dsp.apply_transform(x, @dst_1_impl, options);
    end

    function x = inverse_1(alpha)
        % Inverse transform for DST type 1.
        options.length_constraint = @spx.dsp.dyadic_minus_one_length_constraint;
        x = spx.dsp.apply_transform(alpha, @dst_1_impl, options);
    end

    function alpha = forward_2(x)
        % Forward transform for DST type 2.
        options.length_constraint = @spx.dsp.dyadic_length_constraint;
        alpha = spx.dsp.apply_transform(x, @dst_2_impl, options);
    end

    function x = inverse_2(alpha)
        % Inverse transform for DST type 2.
        options.length_constraint = @spx.dsp.dyadic_length_constraint;
        x = spx.dsp.apply_transform(alpha, @dst_3_impl, options);
    end

    function alpha = forward_3(x)
        % Forward transform for DST type 3.
        options.length_constraint = @spx.dsp.dyadic_length_constraint;
        alpha = spx.dsp.apply_transform(x, @dst_3_impl, options);
    end

    function x = inverse_3(alpha)
        % Inverse transform for DST type 3.
        options.length_constraint = @spx.dsp.dyadic_length_constraint;
        x = spx.dsp.apply_transform(alpha, @dst_2_impl, options);
    end

end

end

function alpha = dst_1_impl(x)
    % Forward and inverse transform for DST type 1.
    n = length(x);
    n = n + 1;
    y = zeros(1, 2*n);
    y(2:n) = -x;
    z = fft(y);
    alpha = sqrt(2/n) .* imag(z(2:n));
end

function alpha = dst_2_impl(x)
    % Forward transform for DST type 2.
    % Inverse transform for DST type 3.
    n   = length(x);
    % Interleave with 0s like 0 x1 0 x2 0 x3 ...
    x_up  = reshape([ zeros(1,n) ; x ],1,2*n);
    % Pad with 2n zeros at the end
    x_padded   = [x_up zeros(1,2*n)];
    % Compute FFT and take the imaginary part
    w   = - imag(fft(x_padded)) ;
    % Normalize and prepare transformed coefficients.
    alpha   = sqrt(2/n)*w(2:n+1);
    alpha(n)= alpha(n)/sqrt(2);
end

function alpha = dst_3_impl(x)
    % Forward transform for DST type 3.
    % Inverse transform for DST type 2.
    n   = length(x);
    % Scale down
    x(n) = x(n)/sqrt(2);
    % Pad with zeros
    y    = [ 0 x zeros(1,(3*n-1)) ];
    % Compute FFT and take the imaginary part, negate it.
    w    = - imag(fft(y)) ;
    % Normalize to obtain the transform coefficients.
    alpha = sqrt(2/n)*w(2:2:2*n);
end


text:
<?php

namespace Laravel\Forge;

use ArrayAccess;
use InvalidArgumentException;
use GuzzleHttp\ClientInterface;
use Psr\Http\Message\ResponseInterface;
use GuzzleHttp\Exception\RequestException;
use Laravel\Forge\Traits\ArrayAccessTrait;
use Laravel\Forge\Contracts\ResourceContract;
use Laravel\Forge\Exceptions\Resources\DeleteResourceException;
use Laravel\Forge\Exceptions\Resources\UpdateResourceException;

abstract class ApiResource implements ArrayAccess, ResourceContract
{
    use ArrayAccessTrait;

    /**
     * @var \Laravel\Forge\ApiProvider
     */
    protected $api;

    /**
     * @var array
     */
    protected $data = [];

    /**
     * @var \Laravel\Forge\Contracts\ResourceContract
     */
    protected $owner;

    /**
     * Create new resource instance.
     *
     * @param \Laravel\Forge\ApiProvider                $api   = null
     * @param array                                     $data  = []
     * @param \Laravel\Forge\Contracts\ResourceContract $owner
     */
    public function __construct(ApiProvider $api = null, array $data = [], ResourceContract $owner = null)
    {
        $this->api = $api;
        $this->data = $data;
        $this->owner = $owner;
    }

    /**
     * Resource type.
     *
     * @return string
     */
    abstract public static function resourceType();

    /**
     * Resource path (relative to owner or API root).
     *
     * @return string
     */
    abstract public function resourcePath();

    /**
     * Create new Resource instance from HTTP response.
     *
     * @param \Psr\Http\Message\ResponseInterface       $response
     * @param \Laravel\Forge\ApiProvider                $api
     * @param \Laravel\Forge\Contracts\ResourceContract $owner    = null
     *
     * @return static
     */
    public static function createFromResponse(ResponseInterface $response, ApiProvider $api, ResourceContract $owner = null)
    {
        $json = json_decode((string) $response->getBody(), true);
        $resourceType = static::resourceType();

        if (empty($json[$resourceType])) {
            static::throwNotFoundException();
        }

        return new static($api, $json[$resourceType], $owner);
    }

    /**
     * Throw HTTP Not Found exception.
     *
     * @throws \InvalidArgumentException
     */
    protected static function throwNotFoundException()
    {
        throw new InvalidArgumentException('Given response is not a '.static::resourceType().' response.');
    }

    /**
     * Determines if current resource has an owner.
     *
     * @return bool
     */
    public function hasResourceOwner(): bool
    {
        return !is_null($this->owner);
    }

    /**
     * Get current resource owner.
     *
     * @return \Laravel\Forge\Contracts\ResourceContract|null
     */
    public function resourceOwner()
    {
        return $this->owner;
    }

    /**
     * Get API provider.
     *
     * @return \Laravel\Forge\ApiProvider
     */
    public function getApi(): ApiProvider
    {
        return $this->api;
    }

    /**
     * Get underlying API provider's HTTP client.
     *
     * @return \GuzzleHttp\ClientInterface
     */
    public function getHttpClient(): ClientInterface
    {
        return $this->api->getClient();
    }

    /**
     * Get resource data.
     *
     * @param string|int $key
     * @param mixed      $default = null
     *
     * @return mixed|null
     */
    public function getData($key, $default = null)
    {
        return $this->data[$key] ?? $default;
    }

    /**
     * Get full resource data.
     *
     * @return array
     */
    public function getFullData()
    {
        return $this->data;
    }

    /**
     * Resource API URL.
     *
     * @param string $path            = ''
     * @param bool   $withPropagation = true
     *
     * @return string
     */
    public function apiUrl(string $path = '', bool $withPropagation = true): string
    {
        $path = ($path ? '/'.ltrim($path, '/') : '');
        $resourcePath = rtrim($this->resourcePath(), '/').'/'.$this->id().$path;

        if (!$this->hasResourceOwner() || !$withPropagation) {
            return $resourcePath;
        }

        return $this->resourceOwner()->apiUrl($resourcePath);
    }

    /**
     * Resource ID.
     *
     * @return int
     */
    public function id(): int
    {
        return intval($this->getData('id', 0));
    }

    /**
     * Resource name.
     *
     * @return string|null
     */
    public function name()
    {
        return $this->getData('name');
    }

    /**
     * Resource status.
     *
     * @return string|null
     */
    public function status()
    {
        return $this->getData('status');
    }

    /**
     * Get resource creation date.
     *
     * @return string|null
     */
    public function createdAt()
    {
        return $this->getData('created_at');
    }

    /**
     * Update resource data.
     *
     * @param array $payload
     *
     * @throws UpdateResourceException
     *
     * @return bool
     */
    public function update(array $payload): bool
    {
        $resourceType = static::resourceType();

        try {
            $response = $this->getHttpClient()->request('PUT', $this->apiUrl(), [
                'json' => $payload,
            ]);
        } catch (RequestException $e) {
            $this->throwResourceException($e->getResponse(), 'update', UpdateResourceException::class);
        }

        $json = json_decode((string) $response->getBody(), true);

        if (empty($json[$resourceType])) {
            return false;
        }

        $this->data = $json[$resourceType];

        return true;
    }

    /**
     * Delete current resource.
     *
     * @throws \Laravel\Forge\Exceptions\Resources\DeleteResourceException
     *
     * @return bool
     */
    public function delete()
    {
        try {
            $this->getHttpClient()->request('DELETE', $this->apiUrl());
        } catch (RequestException $e) {
            $this->throwResourceException($e->getResponse(), 'delete', DeleteResourceException::class);
        }

        return true;
    }

    /**
     * Throw resource exception.
     *
     * @param \Psr\Http\Message\ResponseInterface $response
     * @param string                              $action
     * @param string                              $exceptionClass
     *
     * @throws \Exception
     */
    protected function throwResourceException(ResponseInterface $response, string $action, string $exceptionClass)
    {
        $message = 'Unable to '.$action.' resource (type: '.static::resourceType().', ID: '.$this->id().').';

        if (is_null($response)) {
            throw new InvalidArgumentException($message);
        }

        $message .= ' Server response: "'.((string) $response->getBody()).'".';

        throw new $exceptionClass($message, $response->getStatusCode());
    }
}


text:
/* File ggets.c  - goodgets is a safe alternative to gets */
/* By C.B. Falconer.  Public domain 2002-06-22            */
/*    attribution appreciated.                            */

/* Revised 2002-06-26  New prototype.
           2002-06-27  Incomplete final lines
           2006-06-14  Simplified, using getc, not fgets
           2006-06-15  Fixed memory leak at EOF
 */

/* fggets and ggets [which is fggets(ln, stdin)] set *ln to
   a buffer filled with the next complete line from the text
   stream f.  The storage has been allocated within fggets,
   and is normally reduced to be an exact fit.  The trailing
   \n has been removed, so the resultant line is ready for
   dumping with puts.  The buffer will be as large as is
   required to hold the complete line.

   Note: this means a final file line without a \n terminator
   has an effective \n appended, as EOF occurs within the read.

   If no error occurs fggets returns 0.  If an EOF occurs on
   the input file, EOF is returned.  For memory allocation
   errors some positive value is returned.  In this case *ln
   may point to a partial line.  For other errors memory is
   freed and *ln is set to NULL.

   Freeing of assigned storage is the callers responsibility
 */

#include <stdio.h>
#include <stdlib.h>
#include "ggets.h"

#define INITSIZE   112  /* power of 2 minus 16, helps malloc */
#define DELTASIZE ( INITSIZE + 16 )

enum {OK = 0, NOMEM};

int
fggets( char* *ln,
        FILE * f )
{
    int   cursize, ch, ix;
    char *buffer, *temp;

    *ln = NULL; /* default */
    if( NULL == ( buffer = malloc( INITSIZE ) ) ) return NOMEM;
    cursize = INITSIZE;

    ix = 0;
    while( ( EOF != ( ch = getc( f ) ) ) && ( '\n' != ch ) )
    {
        if( ix >= ( cursize - 1 ) ) /* extend buffer */
        {
            cursize += DELTASIZE;
            if( NULL == ( temp = realloc( buffer, (size_t)cursize ) ) )
            {
                /* ran out of memory, return partial line */
                buffer[ix] = '\0';
                *ln = buffer;
                return NOMEM;
            }
            buffer = temp;
        }
        buffer[ix++] = ch;
    }

    if( ( EOF == ch ) && ( 0 == ix ) )
    {
        free( buffer );
        return EOF;
    }

    buffer[ix] = '\0';
    if( NULL == ( temp = realloc( buffer, (size_t)ix + 1 ) ) )
    {
        *ln = buffer; /* without reducing it */
    }
    else *ln = temp;
    return OK;
} /* fggets */

/* End of ggets.c */


text:
namespace Mordor {

class NamedPipeStream : public HandleStream
{
public:
    typedef boost::shared_ptr<NamedPipeStream> ptr;

    enum Flags {
        READ = PIPE_ACCESS_INBOUND,
        WRITE = PIPE_ACCESS_OUTBOUND,
        READWRITE = PIPE_ACCESS_DUPLEX
    };

public:
    NamedPipeStream(const std::string &name, Flags flags = READWRITE, IOManager *ioManager = NULL, Scheduler *scheduler = NULL);
    NamedPipeStream(const std::wstring &name, Flags flags = READWRITE, IOManager *ioManager = NULL, Scheduler *scheduler = NULL);

    bool supportsRead() { return m_supportsRead; }
    bool supportsWrite() { return m_supportsWrite; }
    bool supportsSeek() { return false; }

    void close(CloseType type = BOTH);

    void accept();
    void cancelAccept();

private:
    bool m_supportsRead, m_supportsWrite;
};

}

#endif


text:
wm size 1920x1200
wm density 240
# mounting system as rw
mount -o remount,rw /system
export DENSITY=`cat /system/build.prop|grep ro.sf.lcd_density`
sed -i s/$DENSITY/ro.sf.lcd_density=240/g /system/build.prop
mount -o remount,ro /system


text:
package com.bitdubai.fermat_api.layer.dmp_network_service.crypto_transmission.interfaces.structure;

import com.bitdubai.fermat_api.layer.all_definition.enums.CryptoCurrency;

import java.util.UUID;

/**
 * Created by mati on 2015.10.03..
 */
public interface CryptoTransmissionMetadata {

    public UUID getTransmissionId();

    public UUID getRequestId();

    public CryptoCurrency getCryptoCurrency();

    public long getCryptoAmount();

    public String getSenderPublicKey();

    public String getDestinationPublicKey();

    public String getAssociatedCryptoTransactionHash();

    public String getPaymentDescription();
}


text:
<?php

namespace Opis\Database\Test\SQL;

use Opis\Database\SQL\Expression;

class UpdateTest extends BaseClass
{
    public function testUpdate()
    {
        $expected = 'UPDATE "users" SET "age" = 18';
        $actual = $this->db->update('users')->set(['age' => 18]);
        $this->assertEquals($expected, $actual);
    }

    public function testUpdateMultiple()
    {
        $expected = 'UPDATE "users" SET "age" = 18, "name" = \'foo\'';
        $actual = $this->db->update('users')->set(['age' => 18, 'name' => 'foo']);
        $this->assertEquals($expected, $actual);
    }

    public function testUpdateColAsCol()
    {
        $expected = 'UPDATE "users" SET "name" = "username"';
        $actual = $this->db->update('users')->set([
            'name' => function (Expression $expr) {
                $expr->column("username");
            },
        ]);
        $this->assertEquals($expected, $actual);
    }

    public function testUpdateIncrementByOne()
    {
        $expected = 'UPDATE "users" SET "age" = "age" + 1';
        $actual = $this->db->update('users')->increment("age");
        $this->assertEquals($expected, $actual);
    }

    public function testUpdateIncrementMultipleByOne()
    {
        $expected = 'UPDATE "users" SET "age" = "age" + 1, "foo" = "foo" + 1';
        $actual = $this->db->update('users')->increment(["age", "foo"]);
        $this->assertEquals($expected, $actual);
    }

    public function testUpdateIncrementByN()
    {
        $expected = 'UPDATE "users" SET "age" = "age" + 5';
        $actual = $this->db->update('users')->increment("age", 5);
        $this->assertEquals($expected, $actual);
    }

    public function testUpdateIncrementMultipleByN()
    {
        $expected = 'UPDATE "users" SET "age" = "age" + 5, "foo" = "foo" + 5';
        $actual = $this->db->update('users')->increment(["age", "foo"], 5);
        $this->assertEquals($expected, $actual);
    }

    public function testUpdateDecrementByOne()
    {
        $expected = 'UPDATE "users" SET "age" = "age" - 1';
        $actual = $this->db->update('users')->decrement("age");
        $this->assertEquals($expected, $actual);
    }

    public function testUpdateDecrementMultipleByOne()
    {
        $expected = 'UPDATE "users" SET "age" = "age" - 1, "foo" = "foo" - 1';
        $actual = $this->db->update('users')->decrement(["age", "foo"]);
        $this->assertEquals($expected, $actual);
    }

    public function testUpdateDecrementByN()
    {
        $expected = 'UPDATE "users" SET "age" = "age" - 5';
        $actual = $this->db->update('users')->decrement("age", 5);
        $this->assertEquals($expected, $actual);
    }

    public function testUpdateDecrementMultipleByN()
    {
        $expected = 'UPDATE "users" SET "age" = "age" - 5, "foo" = "foo" - 5';
        $actual = $this->db->update('users')->decrement(["age", "foo"], 5);
        $this->assertEquals($expected, $actual);
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/activity_movie_details"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="0dp"
    android:paddingRight="0dp"
    android:paddingTop="0dp"
    tools:context="org.ethp.codepath.flicks.MovieDetailsActivity">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <FrameLayout
            android:id="@+id/frame"
            android:layout_width="match_parent" android:layout_height="wrap_content">

            <ImageView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                tools:src="@mipmap/ic_launcher"
                android:id="@+id/ivMovieImage"
                android:adjustViewBounds="true"
                android:scaleType="fitXY" />

            <ImageView
                android:layout_height="match_parent"
                android:layout_width="match_parent"
                android:id="@+id/ivPlayButtonOverlay"
                android:src="@drawable/play_circle_outline"
                android:tint="@color/colorAccent"
                android:padding="50dp" />

        </FrameLayout>

        <RatingBar
            android:id="@+id/rbPopularity"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:stepSize="0.1"
            android:isIndicator="true"
            android:layout_below="@+id/frame"
            android:layout_centerHorizontal="true" />

        <TextView
            android:id="@+id/tvOverview"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:paddingLeft="16dp"
            android:paddingRight="16dp"
            tools:text="Blah blah blah, Blah blah blah, Blah blah blah, Blah blah blah, Blah blah blah, Blah blah blah"
            android:layout_below="@+id/rbPopularity"
            android:layout_centerHorizontal="true"
            android:textAppearance="@style/TextAppearance.AppCompat.Large" />
    </RelativeLayout>

</ScrollView>


text:
<?php
/**
 * Carlisle Photo functions and definitions.
 *
 * @author Julian Dawson <julian@juliandawson.co.uk>
 * @license MIT License
 * @link https://github.com/carlislephoto/carlislephoto-org-uk-theme
 *
 * @package WordPress
 * @subpackage CarlislePhoto
 */

if ( ! function_exists( 'carlislephoto_setup' ) ) :

/**
 * Sets up theme defaults and registers support for various WordPress features.
 *
 * Note that this function is hooked into the after_setup_theme hook, which
 * runs before the init hook. The init hook is too late for some features, such
 * as indicating support for post thumbnails.
 */
function carlislephoto_setup() {

  /**
   * Enable support for Post Thumbnails.
   * @link https://codex.wordpress.org/Post_Thumbnails
   */
  add_theme_support( 'post-thumbnails' );

	// Featured Post Main Thumbnail on the front page & single page template
	add_image_size( 'carlislephoto-flex-thumbnail', false, false, true );

  /**
   * Enable support for Custom Header.
   * @link https://codex.wordpress.org/Custom_Headers
   */
  add_theme_support( 'custom-header' );

  /**
   * Register multiple custom navigation menus.
   * @link https://codex.wordpress.org/Function_Reference/register_nav_menus
   */
  register_nav_menus(
    array(
      'primary' => __( 'Primary Nav' ),
      'secondary' => __( 'Secondary Nav' ),
      'social' => __(' Social Follow Links')
    )
  );

}
endif;

add_action( 'after_setup_theme', 'carlislephoto_setup' );
?>


text:
package com.vaadin.server;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.LogRecord;
import java.util.logging.Logger;
import java.util.logging.StreamHandler;

import org.easymock.EasyMock;
import org.junit.Assert;
import org.junit.Test;

import com.vaadin.event.dd.DropHandler;
import com.vaadin.event.dd.TargetDetails;
import com.vaadin.ui.AbstractComponent;

/**
 * Tests for {@link DragAndDropService}.
 *
 * @author Vaadin Ltd
 */
public class DragAndDropServiceTest {

    @Test
    public void changeVariables_isSourceConnectorEnabledCalled() {
        final List<Level> levels = new ArrayList<Level>();
        Logger.getLogger(DragAndDropService.class.getName()).addHandler(
                new StreamHandler() {
                    @Override
                    public synchronized void publish(LogRecord record) {
                        levels.add(record.getLevel());
                    }
                });
        Map<String, Object> variables = new HashMap<String, Object>();
        final boolean[] isConnectorEnabledCalled = new boolean[1];
        AbstractComponent component = new AbstractComponent() {
            @Override
            public boolean isConnectorEnabled() {
                isConnectorEnabledCalled[0] = true;
                return false;
            }
        };
        variables.put("component", component);

        DragAndDropService service = new DragAndDropService(
                EasyMock.createMock(VaadinSession.class));
        service.changeVariables(null, variables);

        Assert.assertTrue("isConnectorEnabled() method is not called",
                isConnectorEnabledCalled[0]);
        Assert.assertTrue("No warning on drop from disabled source",
                levels.contains(Level.WARNING));

    }

    @Test
    public void changeVariables_isTargetConnectorEnabledCalled() {
        final List<Level> levels = new ArrayList<Level>();
        Logger.getLogger(DragAndDropService.class.getName()).addHandler(
                new StreamHandler() {
                    @Override
                    public void publish(LogRecord record) {
                        levels.add(record.getLevel());
                    }
                });
        Map<String, Object> variables = new HashMap<String, Object>();
        TestDropTarget target = new TestDropTarget();
        variables.put("dhowner", target);

        DragAndDropService service = new DragAndDropService(
                EasyMock.createMock(VaadinSession.class));
        service.changeVariables(null, variables);

        Assert.assertTrue("isConnectorEnabled() method is not called",
                target.isConnectorEnabledCalled());
        Assert.assertTrue("No warning on drop to disabled target",
                levels.contains(Level.WARNING));

    }

    private static class TestDropTarget extends AbstractComponent implements
            com.vaadin.event.dd.DropTarget {
        @Override
        public boolean isConnectorEnabled() {
            isConnectorEnabledCalled = true;
            return false;
        }

        @Override
        public DropHandler getDropHandler() {
            return null;
        }

        @Override
        public TargetDetails translateDropTargetDetails(
                Map<String, Object> clientVariables) {
            return null;
        }

        boolean isConnectorEnabledCalled() {
            return isConnectorEnabledCalled;
        }

        private boolean isConnectorEnabledCalled;

    }
}


text:
package car.app.maintain;

import java.util.List;

import car.domain.maintain.RegisterItemVO;
import car.domain.maintain.RegisterVO;

public class RegisterAppVO {

	private String id;

	private String vehicleNumber;

	private List<RegisterItemVO> items;

	private String state;

	public RegisterAppVO() {

	}

	public RegisterAppVO(RegisterVO obtainRegister) {
		// TODO Auto-generated constructor stub
	}

	public String getId() {
		return id;
	}

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

	public String getVehicleNumber() {
		return vehicleNumber;
	}

	public void setVehicleNumber(String vehicleNumber) {
		this.vehicleNumber = vehicleNumber;
	}

	public List<RegisterItemVO> getItems() {
		return items;
	}

	public void setItems(List<RegisterItemVO> items) {
		this.items = items;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

}


text:
layout: kanji
v4: 1720
v6: 1856
kanji: 参
keyword: visit
elements: nonplussed, visit, elbow, large, St. Bernard, shape
strokes: 8
image: E58F82
on-yomi: サン、シン
kun-yomi: まい.る、まい-、まじわる、みつ
permalink: /rtk/参/
prev: 膨
next: 惨
---

1) [Zarxrax] 13-6-2008(137): I'm going to visit my grandpa in the hospital. He broke his elbow, and it became really big and contorted into a weird shape. I hope he will be all right!

2) [erikkusan] 22-3-2006(89): Whenever the postman has to pay a visit to this place, he brings an elbow-shaped thingy that he throws to the St. Bernard.

3) [Green_Airplane] 7-8-2008(43): I paid a visit to my neighbour, but I forgot he had this huge St. Bernard dog. The doctor said my elbow will never be the same shape.

4) [cbogart] 22-2-2007(33): I was a little nonplussed by the inappropriateness of this keyword, so I decided to use "the three kings" instead; they are a threesome, and they make a religiously-motivated visit, right? Anyway, they travel by night, so they're just these three shapes moving through the gloom. They can't see well, so a St. Bernard dog noses their elbows whenever they start to go the wrong way.

5) [DrJones] 19-3-2008(32): Hint: This is the humble/old kanji of the verb "to go/to come", and also is the kanji for "three" on legal documents. I suggest using the "three musketeers" for this primitive, raising their three blades with the elbow. (the elbow primitive could be viewed as a pictograph of the musketeer's hat, with a feather on the side, too).


text:
exports.handleRouteError = function ( err, res ) {

    if ( err.type === "custom" && err.code === 400 ) {
        return res.json( err.messages, err.code );
    }

    if ( err.type === "custom" ) {
        return res.json( err, err.code );
    }

    return res.json( err, 500 );

};


text:
<Record>
<Term>Ferrous Fumarate</Term>
<SemanticType>Pharmacologic Substance</SemanticType>
<ParentTerm>Dietary Supplement</ParentTerm>
<ClassificationPath>Chemicals_and_Drugs_Kind/Drug, Food, Chemical or Biomedical Material/Dietary Supplement/Ferrous Fumarate</ClassificationPath>
<BroaderTerm>Dietary Supplement</BroaderTerm>
<BroaderTerm>Chemicals_and_Drugs_Kind</BroaderTerm>
<BroaderTerm>Ferrous Fumarate</BroaderTerm>
<BroaderTerm>Drug, Food, Chemical or Biomedical Material</BroaderTerm>
<Synonym>FERROUS FUMARATE</Synonym>
<Synonym>Ferrous Fumarate</Synonym>
<Description>The fumarate salt form of the mineral iron. Administration of ferrous fumarate results in elevation of serum iron concentration, which is then assimilated into hemoglobin, required for the transport of oxygen, or trapped in the reticuloendothelial cells for storage. This agent is used as a dietary supplement, and to prevent or treat iron deficiency related syndromes.</Description>
<Source>NCI Thesaurus</Source>
</Record>


text:
mkdir -p next-models

wget https://next.cs.cmu.edu/data/pretrained_models/actev_single_model.tar -O next-models/actev_single_model.tar
wget https://next.cs.cmu.edu/data/pretrained_models/ethucy_single_model.tar -O next-models/ethucy_single_model.tar

# extract and delete the tar files
cd next-models
tar -xvf actev_single_model.tar
rm actev_single_model.tar
tar -xvf ethucy_single_model.tar
rm ethucy_single_model.tar
cd ..


text:
package example.repo;

import example.model.Customer1313;

import java.util.List;

import org.springframework.data.repository.CrudRepository;

public interface Customer1313Repository extends CrudRepository<Customer1313, Long> {

	List<Customer1313> findByLastName(String lastName);
}


text:
package com.intellij.ide.util.projectWizard;

import com.intellij.openapi.module.ModuleType;
import com.intellij.openapi.module.StdModuleTypes;
import com.intellij.openapi.options.ConfigurationException;
import com.intellij.openapi.projectRoots.JavaSdkType;
import com.intellij.openapi.projectRoots.SdkTypeId;
import com.intellij.openapi.roots.CompilerModuleExtension;
import com.intellij.openapi.roots.ContentEntry;
import com.intellij.openapi.roots.ModifiableRootModel;
import com.intellij.openapi.roots.OrderRootType;
import com.intellij.openapi.roots.libraries.Library;
import com.intellij.openapi.roots.libraries.LibraryTable;
import com.intellij.openapi.util.Pair;
import com.intellij.openapi.util.io.FileUtil;
import com.intellij.openapi.vfs.LocalFileSystem;
import com.intellij.openapi.vfs.VfsUtil;
import com.intellij.openapi.vfs.VirtualFile;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

public class JavaModuleBuilder extends ModuleBuilder implements SourcePathsBuilder {
  private String myCompilerOutputPath;
  // Pair<Source Path, Package Prefix>
  private List<Pair<String,String>> mySourcePaths;
  // Pair<Library path, Source path>
  private final List<Pair<String, String>> myModuleLibraries = new ArrayList<Pair<String, String>>();

  public final void setCompilerOutputPath(String compilerOutputPath) {
    myCompilerOutputPath = acceptParameter(compilerOutputPath);
  }

  public List<Pair<String,String>> getSourcePaths() {
    if (mySourcePaths == null) {
      final List<Pair<String, String>> paths = new ArrayList<Pair<String, String>>();
      @NonNls final String path = getContentEntryPath() + File.separator + "src";
      new File(path).mkdirs();
      paths.add(Pair.create(path, ""));
      return paths;
    }
    return mySourcePaths;
  }

  public void setSourcePaths(List<Pair<String,String>> sourcePaths) {
    mySourcePaths = sourcePaths != null? new ArrayList<Pair<String, String>>(sourcePaths) : null;
  }

  public void addSourcePath(Pair<String,String> sourcePathInfo) {
    if (mySourcePaths == null) {
      mySourcePaths = new ArrayList<Pair<String, String>>();
    }
    mySourcePaths.add(sourcePathInfo);
  }

  public ModuleType getModuleType() {
    return StdModuleTypes.JAVA;
  }

  @Override
  public boolean isSuitableSdkType(SdkTypeId sdkType) {
    return sdkType instanceof JavaSdkType;
  }

  @Nullable
  @Override
  public ModuleWizardStep modifySettingsStep(@NotNull SettingsStep settingsStep) {
    return StdModuleTypes.JAVA.modifySettingsStep(settingsStep, this);
  }

  public void setupRootModel(ModifiableRootModel rootModel) throws ConfigurationException {
    final CompilerModuleExtension compilerModuleExtension = rootModel.getModuleExtension(CompilerModuleExtension.class);
    compilerModuleExtension.setExcludeOutput(true);
    if (myJdk != null){
      rootModel.setSdk(myJdk);
    } else {
      rootModel.inheritSdk();
    }

    ContentEntry contentEntry = doAddContentEntry(rootModel);
    if (contentEntry != null) {
      final List<Pair<String,String>> sourcePaths = getSourcePaths();

      if (sourcePaths != null) {
        for (final Pair<String, String> sourcePath : sourcePaths) {
          String first = sourcePath.first;
          new File(first).mkdirs();
          final VirtualFile sourceRoot = LocalFileSystem.getInstance()
            .refreshAndFindFileByPath(FileUtil.toSystemIndependentName(first));
          if (sourceRoot != null) {
            contentEntry.addSourceFolder(sourceRoot, false, sourcePath.second);
          }
        }
      }
    }

    if (myCompilerOutputPath != null) {
      // should set only absolute paths
      String canonicalPath;
      try {
        canonicalPath = FileUtil.resolveShortWindowsName(myCompilerOutputPath);
      }
      catch (IOException e) {
        canonicalPath = myCompilerOutputPath;
      }
      compilerModuleExtension
        .setCompilerOutputPath(VfsUtil.pathToUrl(FileUtil.toSystemIndependentName(canonicalPath)));
    }
    else {
      compilerModuleExtension.inheritCompilerOutputPath(true);
    }

    LibraryTable libraryTable = rootModel.getModuleLibraryTable();
    for (Pair<String, String> libInfo : myModuleLibraries) {
      final String moduleLibraryPath = libInfo.first;
      final String sourceLibraryPath = libInfo.second;
      Library library = libraryTable.createLibrary();
      Library.ModifiableModel modifiableModel = library.getModifiableModel();
      modifiableModel.addRoot(getUrlByPath(moduleLibraryPath), OrderRootType.CLASSES);
      if (sourceLibraryPath != null) {
        modifiableModel.addRoot(getUrlByPath(sourceLibraryPath), OrderRootType.SOURCES);
      }
      modifiableModel.commit();
    }
  }

  private static String getUrlByPath(final String path) {
    return VfsUtil.getUrlForLibraryRoot(new File(path));
  }

  public void addModuleLibrary(String moduleLibraryPath, String sourcePath) {
    myModuleLibraries.add(Pair.create(moduleLibraryPath,sourcePath));
  }

  @Nullable
  protected static String getPathForOutputPathStep() {
    return null;
  }
}


text:
/**
 * Licensed under Apache License v2. See LICENSE for more information.
 */

#include <stdlib.h>
#include <string.h>

#include "bundle_activator.h"
#include "constants.h"
#include "service_registration.h"

#include "remote_service_admin_inaetics_impl.h"
#include "export_registration_dfi.h"
#include "import_registration_dfi.h"

#include "wiring_topology_manager.h"
#include "wiring_endpoint_listener.h"

static celix_status_t bundleActivator_createEPLTracker(struct activator *activator, service_tracker_pt *tracker);
static celix_status_t bundleActivator_createWTMTracker(struct activator *activator, service_tracker_pt *tracker);

celix_status_t bundleActivator_create(bundle_context_pt context, void **userData) {
    celix_status_t status = CELIX_SUCCESS;
    struct activator *activator;

    activator = calloc(1, sizeof(*activator));
    if (!activator) {
        status = CELIX_ENOMEM;
    } else {
        activator->admin = NULL;
        activator->registration = NULL;
        activator->eplTracker = NULL;
        activator->wtmTracker = NULL;

        *userData = activator;
    }

    return status;
}

celix_status_t bundleActivator_start(void * userData, bundle_context_pt context) {
    celix_status_t status;
    struct activator *activator = userData;
    remote_service_admin_service_pt remoteServiceAdminService = NULL;

    status = remoteServiceAdmin_create(context, &activator->admin);
    if (status == CELIX_SUCCESS) {
        remoteServiceAdminService = calloc(1, sizeof(*remoteServiceAdminService));

        wiring_endpoint_listener_pt wEndpointListener = (wiring_endpoint_listener_pt) calloc(1, sizeof(*wEndpointListener));

        if (!remoteServiceAdminService || !wEndpointListener) {

            if (wEndpointListener) {
                free(wEndpointListener);
            }
            if (remoteServiceAdminService) {
                free(remoteServiceAdminService);
            }

            status = CELIX_ENOMEM;
        } else {
            status = bundleActivator_createEPLTracker(activator, &activator->eplTracker);

            if (status != CELIX_SUCCESS) {
                printf("RSA: Creation of EPLTracker failed\n");
            } else {
                status = bundleActivator_createWTMTracker(activator, &activator->wtmTracker);
            }

            if (status != CELIX_SUCCESS) {
                printf("RSA: Creation of WTMTracker failed\n");
            } else {

                /* the rsa also has a wiringEndpointListener because it needs to be informed, when a
                 * wiring endpoint has been sucessfully exported/imported and therefore it
                 * the according services can be exported/imported.
                 */
                wEndpointListener->handle = (void*) activator->admin;
                wEndpointListener->wiringEndpointAdded = remoteServiceAdmin_addWiringEndpoint;
                wEndpointListener->wiringEndpointRemoved = remoteServiceAdmin_removeWiringEndpoint;

                activator->wEndpointListener = wEndpointListener;
                activator->wEndpointListenerRegistration = NULL;

                remoteServiceAdminService->admin = activator->admin;

                remoteServiceAdminService->exportService = remoteServiceAdmin_exportService;
                remoteServiceAdminService->getExportedServices = remoteServiceAdmin_getExportedServices;
                remoteServiceAdminService->getImportedEndpoints = remoteServiceAdmin_getImportedEndpoints;
                remoteServiceAdminService->importService = remoteServiceAdmin_importService;

                remoteServiceAdminService->exportReference_getExportedEndpoint = exportReference_getExportedEndpoint;
                remoteServiceAdminService->exportReference_getExportedService = exportReference_getExportedService;

                remoteServiceAdminService->exportRegistration_close = remoteServiceAdmin_removeExportedService;
                remoteServiceAdminService->exportRegistration_getException = exportRegistration_getException;
                remoteServiceAdminService->exportRegistration_getExportReference = exportRegistration_getExportReference;

                remoteServiceAdminService->importReference_getImportedEndpoint = importReference_getImportedEndpoint;
                remoteServiceAdminService->importReference_getImportedService = importReference_getImportedService;

                remoteServiceAdminService->importRegistration_close = remoteServiceAdmin_removeImportedService;
                remoteServiceAdminService->importRegistration_getException = importRegistration_getException;
                remoteServiceAdminService->importRegistration_getImportReference = importRegistration_getImportReference;
                char *uuid = NULL;

                properties_pt props = properties_create();
                bundleContext_getProperty(context, OSGI_FRAMEWORK_FRAMEWORK_UUID, &uuid);
                size_t len = 11 + strlen(OSGI_FRAMEWORK_OBJECTCLASS) + strlen(OSGI_RSA_ENDPOINT_FRAMEWORK_UUID) + strlen(uuid);

                char scope[len + 1];
                // check that we are not informed by node_discovery
                sprintf(scope, "(%s=%s)", OSGI_RSA_ENDPOINT_FRAMEWORK_UUID, uuid);
                properties_set(props, (char *) INAETICS_WIRING_ENDPOINT_LISTENER_SCOPE, scope);
                properties_set(props, "RSA", "true");

                activator->adminService = remoteServiceAdminService;

                serviceTracker_open(activator->eplTracker);

                // wiring endpoint listener needs to be before wtm tracker, otherwise rsa will not be informed about wiring endpoints
                status = bundleContext_registerService(context, (char *) INAETICS_WIRING_ENDPOINT_LISTENER_SERVICE, wEndpointListener, props, &activator->wEndpointListenerRegistration);

                if (status != CELIX_SUCCESS) {
                    properties_destroy(props);
                    printf("RSA: service registration of wiring endpoint listener failed\n");
                }

                serviceTracker_open(activator->wtmTracker);

            }
        }
    }

    return status;
}

celix_status_t bundleActivator_stop(void * userData, bundle_context_pt context) {
    celix_status_t status = CELIX_SUCCESS;
    struct activator *activator = userData;

    if (activator->wtmTracker != NULL) {
    	if (serviceTracker_close(activator->wtmTracker) == CELIX_SUCCESS) {
    		serviceTracker_destroy(activator->wtmTracker);
    	}
    }

    if (activator->eplTracker != NULL) {
    	if (serviceTracker_close(activator->eplTracker) == CELIX_SUCCESS) {
    		serviceTracker_destroy(activator->eplTracker);
    	}
    }

    if (activator->registration != NULL) {
        serviceRegistration_unregister(activator->registration);
        activator->registration = NULL;
    }

    remoteServiceAdmin_stop(activator->admin);

    remoteServiceAdmin_destroy(&activator->admin);
    free(activator->adminService);

    serviceRegistration_unregister(activator->wEndpointListenerRegistration);
    free(activator->wEndpointListener);

    return status;
}

celix_status_t bundleActivator_destroy(void * userData, bundle_context_pt context) {
    celix_status_t status = CELIX_SUCCESS;
    struct activator *activator = userData;

    free(activator);

    return status;
}

static celix_status_t bundleActivator_createEPLTracker(struct activator *activator, service_tracker_pt *tracker) {
    celix_status_t status;

    service_tracker_customizer_pt customizer = NULL;

    status = serviceTrackerCustomizer_create(activator->admin, remoteServiceAdmin_endpointListenerAdding, remoteServiceAdmin_endpointListenerAdded, remoteServiceAdmin_endpointListenerModified,
            remoteServiceAdmin_endpointListenerRemoved, &customizer);

    if (status == CELIX_SUCCESS) {
        status = serviceTracker_create(activator->admin->context, (char *) OSGI_ENDPOINT_LISTENER_SERVICE, customizer, tracker);
    }

    return status;
}

static celix_status_t bundleActivator_createWTMTracker(struct activator *activator, service_tracker_pt *tracker) {
    celix_status_t status;

    service_tracker_customizer_pt customizer = NULL;

    status = serviceTrackerCustomizer_create(activator, remoteServiceAdmin_wtmAdding, remoteServiceAdmin_wtmAdded, remoteServiceAdmin_wtmModified, remoteServiceAdmin_wtmRemoved, &customizer);

    if (status == CELIX_SUCCESS) {
        status = serviceTracker_create(activator->admin->context, (char*) INAETICS_WIRING_TOPOLOGY_MANAGER_SERVICE, customizer, tracker);
    }

    return status;
}


text:
package com.example.diary.opiekun;

import java.util.List;
import java.util.Map;

import com.example.diary.*;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Color;
import android.graphics.Typeface;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.EditText;
import android.widget.TableLayout;
import android.widget.TableRow;
import android.widget.TextView;
import android.widget.Toast;

// uniwersalny, bedzie mo¿na powtorzyc dla nauczyciela i wychowawcy

public class OpiekunKomunikatorNoweRozmowaActivity extends Activity {

	List<Map<String, String>> getNowe = null;
	int ustawOdebrane, wyslij;
	String data="", idNadawcy="", idUser="", nadawca="", nowa="";
	EditText odpowiedz;
	Intent i;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_opiekun_komunikator_nowe_rozmowa);
		TextView info = (TextView)findViewById(R.id.info);
		odpowiedz = (EditText)findViewById(R.id.odpowiedz);

		idUser = getIntent().getExtras().getString("idUser");
		data = getIntent().getExtras().getString("data");
		idNadawcy = getIntent().getExtras().getString("idNadawca");
		nadawca = getIntent().getExtras().getString("nadawca");

		Log.d("idUser", idUser);
		Log.d("data", data);
		Log.d("idNadawcy", idNadawcy);
		// na poczatek ustawiamy wiadomosc jako przeczytana
		getNowe = Utilities.query(this, "getNowe",idUser, idNadawcy,data );
		ustawOdebrane = Utilities.udi(this, "ustawOdebrane",data, idNadawcy);
		if(ustawOdebrane>0){
			Log.d("odebrane", "ustawiono");
		}
		TableLayout nowe = (TableLayout) findViewById(R.id.tabelka);
		nowe.setStretchAllColumns(true);
		nowe.setColumnShrinkable(1, true);
		nowe.bringToFront();

		//wyswietlamy wszystkie nowe wiadomosci z danego dnia, sortowane od najstarszej godziny
		info.setText("Od: "+nadawca);
		info.setTypeface(Typeface.DEFAULT_BOLD);

		for(int a=0;a<getNowe.size();a++){
			TableRow tr = new TableRow(this);
			TextView tv = new TextView(this);
			tv.setText(getNowe.get(a).get("tresc").replace("+", " "));
			tv.setTextColor(Color.GREEN);
			tv.setBackgroundColor(Color.GRAY);
			tv.setTextSize(25F);
			TextView puste = new TextView(this);
			puste.setText(" ");
			puste.setWidth(10);
			tr.addView(tv);
			tr.addView(puste);
			nowe.addView(tr);
		}
	}

	public void onWyslij(View v) throws InterruptedException{
		nowa = odpowiedz.getText().toString();
		Log.d("OST: idUser",idUser );
		Log.d("idNadawcy", idNadawcy);
		Log.d("nowa", nowa );
		wyslij = Utilities.udi(this, "wyslij", idUser, idNadawcy, nowa);
		if(wyslij==0){
			Toast.makeText(this, "Nie uda³o siê wys³aæ wiadomoœci.\nSpróbuj ponownie póŸniej.", Toast.LENGTH_LONG).show();
		}
		else {
			Toast.makeText(this, "Pomyœlnie wyslano wiadomoœæ.", Toast.LENGTH_SHORT).show();
			i = new Intent(this, OpiekunKomunikatorRozmowaActivity.class);
			Bundle bundle = getIntent().getExtras();
			i.putExtras(bundle);
			i.putExtra("idOdbiorcy", idNadawcy);
			i.putExtra("odbiorca", nadawca);
			// fajnie wrzucic czekanie chwile
			startActivity(i);
			finish();
		}
	}
}


text:
package net.fortuna.ical4j.model;

import java.io.Serializable;
import java.util.Iterator;

import net.fortuna.ical4j.util.Strings;

/**
 * Defines an iCalendar component. Subclasses of this class provide additional
 * validation and typed values for specific iCalendar components.
 *
 * @author Ben Fortuna
 */
public abstract class Component implements Serializable {

    public static final String BEGIN = "BEGIN";

    public static final String END = "END";

    public static final String VEVENT = "VEVENT";

    public static final String VTODO = "VTODO";

    public static final String VJOURNAL = "VJOURNAL";

    public static final String VFREEBUSY = "VFREEBUSY";

    public static final String VTIMEZONE = "VTIMEZONE";

    public static final String VALARM = "VALARM";

    public static final String EXPERIMENTAL_PREFIX = "X-";

    private String name;

    private PropertyList properties;

    /**
     * Constructs a new component containing no properties.
     * @param s a component name
     */
    protected Component(final String s) {
        this(s, new PropertyList());
    }

    /**
     * Constructor made protected to enforce the use of
     * ComponentFactory for component instantiation.
     * @param s component name
     * @param p a list of properties
     */
    protected Component(final String s, final PropertyList p) {
        this.name = s;
        this.properties = p;
    }

    /**
     * @see java.lang.Object#toString()
     */
    public String toString() {
        StringBuffer buffer = new StringBuffer();
        buffer.append(BEGIN);
        buffer.append(':');
        buffer.append(getName());
        buffer.append(Strings.LINE_SEPARATOR);
        buffer.append(getProperties());
        buffer.append(END);
        buffer.append(':');
        buffer.append(getName());
        buffer.append(Strings.LINE_SEPARATOR);

        return buffer.toString();
    }

    /**
     * @return Returns the name.
     */
    public final String getName() {
        return name;
    }

    /**
     * @return Returns the properties.
     */
    public final PropertyList getProperties() {
        return properties;
    }

    /**
     * Convenience method for retrieving a list of named properties.
     * @param name name of properties to retrieve
     * @return a property list containing only properties with the specified
     * name
     */
    public final PropertyList getProperties(final String name) {
        return getProperties().getProperties(name);
    }

    /**
     * Convenience method for retrieving a named property.
     * @param name name of the property to retrieve
     * @return the first matching property in the property list with the specified
     * name
     */
    public final Property getProperty(final String name) {
        return getProperties().getProperty(name);
    }

    /**
     * Perform validation on a component and its properties.
     * @throws ValidationException
     *             where the component is not in a valid state
     */
    public final void validate() throws ValidationException {
        validate(true);
    }

    /**
     * Perform validation on a component.
     * @param recurse indicates whether to validate the component's
     * properties
     * @throws ValidationException
     *             where the component is not in a valid state
     */
    public abstract void validate(final boolean recurse) throws ValidationException;

    /**
     * Invoke validation on the component properties in its current state.
     * @throws ValidationException
     *             where any of the component properties is not in a valid state
     */
    protected final void validateProperties() throws ValidationException {
        for (Iterator i = getProperties().iterator(); i.hasNext();) {
            Property property = (Property) i.next();
            property.validate();
        }
    }

    /**
     * Two components are equal if and only if their
     * name and property lists are equal.
     * @see java.lang.Object#equals(java.lang.Object)
     */
    public final boolean equals(final Object arg0) {
        if (arg0 instanceof Component) {
            Component c = (Component) arg0;
            return getName().equals(c.getName())
                    && getProperties().equals(c.getProperties());
        }
        return super.equals(arg0);
    }

    /*
     * @see java.lang.Object#hashCode()
     */
    public final int hashCode() {
        return getName().hashCode() + getProperties().hashCode();
    }
}


text:
@interface QBReactCallNative : NSObject <RCTBridgeModule>

@end


text:
db.groups.insert(
    {
	description: "Runner\'s High- juoksukoulun jäsenten oma ryhmä.",
	lname: "runnershigh",
	name: "RunnersHigh",
	users: ["AkiNummela", "Tero", "oikakati"]
    })


text:
@implementation HeadLineModel
+(instancetype)headWithDict:(NSDictionary *)dic{
    return [[self alloc]initWithDic:dic];
}
-(instancetype)initWithDic:(NSDictionary *)dic{
    if (self = [super init]) {
        [self setValuesForKeysWithDictionary:dic];
    }return self;
}
-(void)setValue:(id)value forUndefinedKey:(NSString *)key{

}
+(void)headLineDataWithURL:(NSString *)url success:(void(^)(NSArray *))success{
    NSCAssert(success != nil,@"回调不能为空");

    [[Manager shareApi]requestHeadLineDateWithURL:url success:^(NSDictionary * responseObject) {
        NSString *key = responseObject.keyEnumerator.nextObject;
        NSArray *data = responseObject[key];

        NSMutableArray *dataM = [NSMutableArray array];
        [data enumerateObjectsUsingBlock:^(id  _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
            [dataM addObject:[HeadLineModel headWithDict:obj]];
        }];
        success(dataM.copy);
    } error:^(NSError *errorInfo) {
        success(nil);
    }];
}
@end


text:
class OpensslAT11 < Formula
  desc "Cryptography and SSL/TLS Toolkit"
  homepage "https://openssl.org/"
  url "https://www.openssl.org/source/openssl-1.1.1d.tar.gz"
  mirror "https://dl.bintray.com/homebrew/mirror/openssl@1.1--1.1.1d.tar.gz"
  mirror "https://www.mirrorservice.org/sites/ftp.openssl.org/source/openssl-1.1.1d.tar.gz"
  sha256 "1e3a91bc1f9dfce01af26026f856e064eab4c8ee0a8f457b5ae30b40b8b711f2"
  version_scheme 1

  bottle do
    sha256 "d7f992ebfd78f80828051f6dc6a1a99aed405f86b0f39ea651fd0afeadd1b0f4" => :catalina
    sha256 "104ef018b7bb8fcc49f57e5a60359a28a02d480d85a959e6141394b0571cbb28" => :mojave
    sha256 "c7681ee40cb3680cd9fafcdb092bde153b9d4903907d67858baa5f19025f927b" => :high_sierra
    sha256 "a95d756e9aa3a8d118833f9083112048bf635f20c33943de04163bdcf7412328" => :sierra
  end

  keg_only :provided_by_macos,
    "openssl/libressl is provided by macOS so don't link an incompatible version"

  # SSLv2 died with 1.1.0, so no-ssl2 no longer required.
  # SSLv3 & zlib are off by default with 1.1.0 but this may not
  # be obvious to everyone, so explicitly state it for now to
  # help debug inevitable breakage.
  def configure_args; %W[
    --prefix=#{prefix}
    --openssldir=#{openssldir}
    no-ssl3
    no-ssl3-method
    no-zlib
  ]
  end

  def install
    # This could interfere with how we expect OpenSSL to build.
    ENV.delete("OPENSSL_LOCAL_CONFIG_DIR")

    # This ensures where Homebrew's Perl is needed the Cellar path isn't
    # hardcoded into OpenSSL's scripts, causing them to break every Perl update.
    # Whilst our env points to opt_bin, by default OpenSSL resolves the symlink.
    if which("perl") == Formula["perl"].opt_bin/"perl"
      ENV["PERL"] = Formula["perl"].opt_bin/"perl"
    end

    arch_args = %w[darwin64-x86_64-cc enable-ec_nistp_64_gcc_128]

    ENV.deparallelize
    system "perl", "./Configure", *(configure_args + arch_args)
    system "make"
    system "make", "test"
    system "make", "install", "MANDIR=#{man}", "MANSUFFIX=ssl"
  end

  def openssldir
    etc/"openssl@1.1"
  end

  def post_install
    keychains = %w[
      /System/Library/Keychains/SystemRootCertificates.keychain
    ]

    certs_list = `security find-certificate -a -p #{keychains.join(" ")}`
    certs = certs_list.scan(
      /-----BEGIN CERTIFICATE-----.*?-----END CERTIFICATE-----/m,
    )

    valid_certs = certs.select do |cert|
      IO.popen("#{bin}/openssl x509 -inform pem -checkend 0 -noout >/dev/null", "w") do |openssl_io|
        openssl_io.write(cert)
        openssl_io.close_write
      end

      $CHILD_STATUS.success?
    end

    openssldir.mkpath
    (openssldir/"cert.pem").atomic_write(valid_certs.join("\n") << "\n")
  end

  def caveats; <<~EOS
    A CA file has been bootstrapped using certificates from the system
    keychain. To add additional certificates, place .pem files in
      #{openssldir}/certs

    and run
      #{opt_bin}/c_rehash
  EOS
  end

  test do
    # Make sure the necessary .cnf file exists, otherwise OpenSSL gets moody.
    assert_predicate HOMEBREW_PREFIX/"etc/openssl@1.1/openssl.cnf", :exist?,
            "OpenSSL requires the .cnf file for some functionality"

    # Check OpenSSL itself functions as expected.
    (testpath/"testfile.txt").write("This is a test file")
    expected_checksum = "e2d0fe1585a63ec6009c8016ff8dda8b17719a637405a4e23c0ff81339148249"
    system bin/"openssl", "dgst", "-sha256", "-out", "checksum.txt", "testfile.txt"
    open("checksum.txt") do |f|
      checksum = f.read(100).split("=").last.strip
      assert_equal checksum, expected_checksum
    end
  end
end


text:
package com.github.sadikovi.riff

import java.io.{ByteArrayInputStream, ByteArrayOutputStream}

import org.apache.spark.sql.catalyst.InternalRow
import org.apache.spark.sql.types._
import org.apache.spark.unsafe.types.UTF8String

import com.github.sadikovi.riff.io._
import com.github.sadikovi.riff.row.IndexedRow
import com.github.sadikovi.riff.tree.{FilterApi, Tree}
import com.github.sadikovi.riff.tree.FilterApi._
import com.github.sadikovi.testutil.UnitTestSuite

// Test suite includes functionality for [[IndexedRowReader]] and [[IndexedRowWriter]]
class IndexedRowReadWriteSuite extends UnitTestSuite {
  test("write/read, indexed + data fields") {
    val schema = StructType(
      StructField("col1", IntegerType) ::
      StructField("col2", StringType) ::
      StructField("col3", LongType) ::
      StructField("col4", StringType) ::
      StructField("col5", IntegerType) ::
      StructField("col6", StringType) :: Nil)
    val row = InternalRow(24, UTF8String.fromString("abcd"), 123L,
      UTF8String.fromString("xyz"), 789, null)

    val td = new TypeDescription(schema, Array("col3", "col2"))
    val writer = new IndexedRowWriter(td)
    val reader = new IndexedRowReader(td)
    val stripe = new StripeOutputBuffer(1.toByte)
    val out = new OutStream(64, null, stripe)
    writer.writeRow(row, out)
    out.flush()
    val in = new InStream(64, null, new StripeInputBuffer(1.toByte, stripe.array()))
    val ind = reader.readRow(in).asInstanceOf[IndexedRow]

    ind.hasIndexRegion() should be (true)
    ind.hasDataRegion() should be (true)

    ind.isNullAt(0) should be (false)
    ind.getLong(0) should be (123L)
    ind.get(0, LongType) should be (123L)

    ind.isNullAt(1) should be (false)
    ind.getString(1) should be ("abcd")
    ind.get(1, StringType) should be (UTF8String.fromString("abcd"))

    ind.isNullAt(2) should be (false)
    ind.getInt(2) should be (24)
    ind.get(2, IntegerType) should be (24)

    ind.isNullAt(3) should be (false)
    ind.getString(3) should be ("xyz")
    ind.get(3, StringType) should be (UTF8String.fromString("xyz"))

    ind.isNullAt(4) should be (false)
    ind.getInt(4) should be (789)
    ind.get(4, IntegerType) should be (789)

    ind.isNullAt(5) should be (true)
  }

  test("write/read, indexed fields only") {
    val schema = StructType(
      StructField("col1", IntegerType) ::
      StructField("col2", StringType) ::
      StructField("col3", LongType) :: Nil)
    val row = InternalRow(24, UTF8String.fromString("abcd"), 123L)

    val td = new TypeDescription(schema, Array("col3", "col2", "col1"))
    val writer = new IndexedRowWriter(td)
    val reader = new IndexedRowReader(td)
    val stripe = new StripeOutputBuffer(1.toByte)
    val out = new OutStream(64, null, stripe)
    writer.writeRow(row, out)
    out.flush()
    val in = new InStream(64, null, new StripeInputBuffer(1.toByte, stripe.array()))
    val ind = reader.readRow(in).asInstanceOf[IndexedRow]

    ind.hasIndexRegion() should be (true)
    ind.hasDataRegion() should be (false)

    ind.isNullAt(0) should be (false)
    ind.getLong(0) should be (123L)
    ind.get(0, LongType) should be (123L)

    ind.isNullAt(1) should be (false)
    ind.getString(1) should be ("abcd")
    ind.get(1, StringType) should be (UTF8String.fromString("abcd"))

    ind.isNullAt(2) should be (false)
    ind.getInt(2) should be (24)
    ind.get(2, IntegerType) should be (24)
  }

  test("write/read, data fields only") {
    val schema = StructType(
      StructField("col1", IntegerType) ::
      StructField("col2", StringType) ::
      StructField("col3", LongType) :: Nil)
    val row = InternalRow(24, UTF8String.fromString("abcd"), 123L)

    val td = new TypeDescription(schema)
    val writer = new IndexedRowWriter(td)
    val reader = new IndexedRowReader(td)
    val stripe = new StripeOutputBuffer(1.toByte)
    val out = new OutStream(64, null, stripe)
    writer.writeRow(row, out)
    out.flush()
    val in = new InStream(64, null, new StripeInputBuffer(1.toByte, stripe.array()))
    val ind = reader.readRow(in).asInstanceOf[IndexedRow]

    ind.hasIndexRegion() should be (false)
    ind.hasDataRegion() should be (true)

    ind.isNullAt(0) should be (false)
    ind.getInt(0) should be (24)
    ind.get(0, IntegerType) should be (24)

    ind.isNullAt(1) should be (false)
    ind.getString(1) should be ("abcd")
    ind.get(1, StringType) should be (UTF8String.fromString("abcd"))

    ind.isNullAt(2) should be (false)
    ind.getLong(2) should be (123L)
    ind.get(2, LongType) should be (123L)
  }

  test("write/read, all null fields") {
    val schema = StructType(
      StructField("col1", IntegerType) ::
      StructField("col2", StringType) ::
      StructField("col3", LongType) :: Nil)
    val row = InternalRow(null, null, null)

    val td = new TypeDescription(schema)
    val writer = new IndexedRowWriter(td)
    val reader = new IndexedRowReader(td)
    val stripe = new StripeOutputBuffer(1.toByte)
    val out = new OutStream(64, null, stripe)
    writer.writeRow(row, out)
    out.flush()
    val in = new InStream(64, null, new StripeInputBuffer(1.toByte, stripe.array()))
    val ind = reader.readRow(in).asInstanceOf[IndexedRow]

    ind.hasIndexRegion() should be (false)
    ind.hasDataRegion() should be (false)

    ind.isNullAt(0) should be (true)
    ind.isNullAt(1) should be (true)
    ind.isNullAt(2) should be (true)
  }

  test("write/read, row batch") {
    val schema = StructType(
      StructField("col1", IntegerType) ::
      StructField("col2", StringType) ::
      StructField("col3", LongType) :: Nil)
    val batch = Seq(
      InternalRow(1, UTF8String.fromString("abc1"), 1L),
      InternalRow(2, UTF8String.fromString("abc2"), 2L),
      InternalRow(3, UTF8String.fromString("abc3"), 3L),
      InternalRow(4, UTF8String.fromString("abc4"), 4L),
      InternalRow(5, UTF8String.fromString("abc5"), 5L))

    val td = new TypeDescription(schema, Array("col2"))
    val writer = new IndexedRowWriter(td)
    val reader = new IndexedRowReader(td)
    val stripe = new StripeOutputBuffer(1.toByte)
    val out = new OutStream(64, null, stripe)

    for (row <- batch) {
      writer.writeRow(row, out)
    }
    out.flush()

    val in = new InStream(64, null, new StripeInputBuffer(1.toByte, stripe.array()))
    var ind = Seq[IndexedRow]()
    while (in.available() != 0) {
      ind = ind :+ reader.readRow(in).asInstanceOf[IndexedRow]
    }

    ind.length should be (batch.length)
    ind(0).toString should be (
      "[nulls=false, fields=3, " +
      "index_region=[0, 0, 0, 8, 0, 0, 0, 4, 97, 98, 99, 49], " +
      "data_region=[0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1]]")
    ind(1).toString should be (
      "[nulls=false, fields=3, " +
      "index_region=[0, 0, 0, 8, 0, 0, 0, 4, 97, 98, 99, 50], " +
      "data_region=[0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2]]")
    ind(2).toString should be (
      "[nulls=false, fields=3, " +
      "index_region=[0, 0, 0, 8, 0, 0, 0, 4, 97, 98, 99, 51], " +
      "data_region=[0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 3]]")
    ind(3).toString should be (
      "[nulls=false, fields=3, " +
      "index_region=[0, 0, 0, 8, 0, 0, 0, 4, 97, 98, 99, 52], " +
      "data_region=[0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 4]]")
    ind(4).toString should be (
      "[nulls=false, fields=3, " +
      "index_region=[0, 0, 0, 8, 0, 0, 0, 4, 97, 98, 99, 53], " +
      "data_region=[0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 5]]")
  }

  // read rows for provided filter
  // col2 - indexed field
  // col1 and col3 - data fields
  private def readWithPredicate(tree: Tree): (TypeDescription, Seq[IndexedRow]) = {
    val schema = StructType(
      StructField("col1", IntegerType) ::
      StructField("col2", StringType) ::
      StructField("col3", LongType) :: Nil)
    val batch = Seq(
      InternalRow(1, UTF8String.fromString("abc"), 1L),
      InternalRow(2, UTF8String.fromString("def"), 2L),
      InternalRow(3, UTF8String.fromString("abc"), 3L),
      InternalRow(4, UTF8String.fromString("xyz"), 4L),
      InternalRow(5, UTF8String.fromString("xyz"), 5L))

    val td = new TypeDescription(schema, Array("col2"))
    val writer = new IndexedRowWriter(td)
    val reader = new IndexedRowReader(td)
    val state = new PredicateState(tree, td)
    val stripe = new StripeOutputBuffer(1.toByte)
    val out = new OutStream(64, null, stripe)

    for (row <- batch) {
      writer.writeRow(row, out)
    }
    out.flush()

    val in = new InStream(64, null, new StripeInputBuffer(1.toByte, stripe.array()))
    var ind = Seq[IndexedRow]()
    while (in.available() != 0) {
      ind = ind :+ reader.readRow(in, state).asInstanceOf[IndexedRow]
    }
    (td, ind)
  }

  test("write/read with predicate on both index and data fields") {
    val (td, ind) = readWithPredicate(or(eqt("col2", "abc"), gt("col1", 4)))
    // sequence should contain following records
    ind(0).getUTF8String(td.position("col2")) should be (UTF8String.fromString("abc"))
    ind(0).getInt(td.position("col1")) should be (1)
    ind(1) should be (null)
    ind(2).getUTF8String(td.position("col2")) should be (UTF8String.fromString("abc"))
    ind(2).getInt(td.position("col1")) should be (3)
    ind(3) should be (null)
    ind(4).getUTF8String(td.position("col2")) should be (UTF8String.fromString("xyz"))
    ind(4).getInt(td.position("col1")) should be (5)
  }

  test("write/read with predicate on data fields") {
    val (td, ind) = readWithPredicate(in("col1",
      1.asInstanceOf[java.lang.Integer], 4.asInstanceOf[java.lang.Integer]))
    // sequence should contain following records
    ind(0).getUTF8String(td.position("col2")) should be (UTF8String.fromString("abc"))
    ind(0).getInt(td.position("col1")) should be (1)
    ind(1) should be (null)
    ind(2) should be (null)
    ind(3).getUTF8String(td.position("col2")) should be (UTF8String.fromString("xyz"))
    ind(3).getInt(td.position("col1")) should be (4)
    ind(4) should be (null)
  }

  test("write/read with predicate on index fields") {
    val (td, ind) = readWithPredicate(in("col2", "def", "abc"))
    // sequence should contain following records
    ind(0).getUTF8String(td.position("col2")) should be (UTF8String.fromString("abc"))
    ind(0).getInt(td.position("col1")) should be (1)
    ind(1).getUTF8String(td.position("col2")) should be (UTF8String.fromString("def"))
    ind(1).getInt(td.position("col1")) should be (2)
    ind(2).getUTF8String(td.position("col2")) should be (UTF8String.fromString("abc"))
    ind(2).getInt(td.position("col1")) should be (3)
    ind(3) should be (null)
    ind(4) should be (null)
  }

  test("write/read with predicate Not(IsNull)") {
    val (td, ind) = readWithPredicate(
      and(
        FilterApi.not(nvl("col1")),
        eqt("col1", 1)
      )
    )
    assert(ind(0) != null)
    ind(0).getInt(td.position("col1")) should be (1)
    ind(1) should be (null)
    ind(2) should be (null)
    ind(3) should be (null)
    ind(4) should be (null)
  }

  test("write/read date type and timestamp type") {
    val schema = StructType(
      StructField("col1", DateType) ::
      StructField("col2", TimestampType) :: Nil)
    val row = InternalRow(24, 1234567890L)

    val td = new TypeDescription(schema, Array("col1"))
    val writer = new IndexedRowWriter(td)
    val reader = new IndexedRowReader(td)
    val stripe = new StripeOutputBuffer(1.toByte)
    val out = new OutStream(64, null, stripe)
    writer.writeRow(row, out)
    out.flush()
    val in = new InStream(64, null, new StripeInputBuffer(1.toByte, stripe.array()))
    val ind = reader.readRow(in).asInstanceOf[IndexedRow]

    ind.hasIndexRegion() should be (true)
    ind.hasDataRegion() should be (true)

    ind.isNullAt(0) should be (false)
    ind.getInt(0) should be (24)
    ind.get(0, DateType) should be (24)

    ind.isNullAt(1) should be (false)
    ind.getLong(1) should be (1234567890L)
    ind.get(1, TimestampType) should be (1234567890L)
  }

  test("write/read boolean type") {
    val schema = StructType(
      StructField("col1", BooleanType) ::
      StructField("col2", BooleanType) :: Nil)
    val row = InternalRow(true, false)

    val td = new TypeDescription(schema, Array("col1"))
    val writer = new IndexedRowWriter(td)
    val reader = new IndexedRowReader(td)
    val stripe = new StripeOutputBuffer(1.toByte)
    val out = new OutStream(64, null, stripe)
    writer.writeRow(row, out)
    out.flush()
    val in = new InStream(64, null, new StripeInputBuffer(1.toByte, stripe.array()))
    val ind = reader.readRow(in).asInstanceOf[IndexedRow]

    ind.hasIndexRegion() should be (true)
    ind.hasDataRegion() should be (true)

    ind.isNullAt(0) should be (false)
    ind.getBoolean(0) should be (true)
    assert(ind.get(0, BooleanType) === true)

    ind.isNullAt(1) should be (false)
    ind.getBoolean(1) should be (false)
    assert(ind.get(1, BooleanType) === false)
  }

  test("write/read short type") {
    val schema = StructType(
      StructField("col1", ShortType) ::
      StructField("col2", ShortType) :: Nil)
    val row = InternalRow(12345.toShort, -673.toShort)

    val td = new TypeDescription(schema, Array("col1"))
    val writer = new IndexedRowWriter(td)
    val reader = new IndexedRowReader(td)
    val stripe = new StripeOutputBuffer(1.toByte)
    val out = new OutStream(64, null, stripe)
    writer.writeRow(row, out)
    out.flush()
    val in = new InStream(64, null, new StripeInputBuffer(1.toByte, stripe.array()))
    val ind = reader.readRow(in).asInstanceOf[IndexedRow]

    ind.hasIndexRegion() should be (true)
    ind.hasDataRegion() should be (true)

    ind.isNullAt(0) should be (false)
    ind.getShort(0) should be (12345)
    assert(ind.get(0, ShortType) === 12345)

    ind.isNullAt(1) should be (false)
    ind.getShort(1) should be (-673)
    assert(ind.get(1, ShortType) === -673)
  }

  test("write/read byte type") {
    val schema = StructType(
      StructField("col1", ByteType) ::
      StructField("col2", ByteType) :: Nil)
    val row = InternalRow(51.toByte, -67.toByte)

    val td = new TypeDescription(schema, Array("col1"))
    val writer = new IndexedRowWriter(td)
    val reader = new IndexedRowReader(td)
    val stripe = new StripeOutputBuffer(1.toByte)
    val out = new OutStream(64, null, stripe)
    writer.writeRow(row, out)
    out.flush()
    val in = new InStream(64, null, new StripeInputBuffer(1.toByte, stripe.array()))
    val ind = reader.readRow(in).asInstanceOf[IndexedRow]

    ind.hasIndexRegion() should be (true)
    ind.hasDataRegion() should be (true)

    ind.isNullAt(0) should be (false)
    ind.getByte(0) should be (51)
    assert(ind.get(0, ByteType) === 51)

    ind.isNullAt(1) should be (false)
    ind.getByte(1) should be (-67)
    assert(ind.get(1, ByteType) === -67)
  }
}