text:
<?php
/*
   NOTE-
   Google caches the result of the kml path presented it in a weird way (clearing browser cache doesn't seem to clear it). So, if it's 'not updating' when you edit it, that's why.
 */

require_once('../../config.class.php');
require_once('media.php');

$conn = mysql_pconnect(Config::dbHost, Config::dbUser, Config::dbPass);
mysql_select_db (Config::dbSchema);
$prefix = $_REQUEST['gameId'];
//$query = "SELECT {$prefix}_items.*, media.*, players.* FROM {$prefix}_items, media, players WHERE {$prefix}_items.media_id = media.media_id AND {$prefix}_items.creator_player_id = players.player_id";
$query = "SELECT m.note_id, m.user_name, m.content_id, m.title, m.file_path, game_locations.latitude, game_locations.longitude FROM
(SELECT nc.note_id, nc.user_name, nc.content_id, nc.title, media.file_path FROM
 (SELECT n.note_id, n.user_name, note_content.content_id, note_content.title, note_content.media_id FROM
  (SELECT notes.note_id, players.user_name FROM notes LEFT JOIN players ON notes.owner_id = players.player_id WHERE game_id='{$prefix}')
  AS n LEFT JOIN note_content ON n.note_id = note_content.note_id)
 AS nc LEFT JOIN media ON nc.media_id = media.media_id)
AS m LEFT JOIN (SELECT * FROM locations WHERE game_id + {$prefix}) AS game_locations ON m.note_id = game_locations.type_id ORDER BY note_id ASC";
$result = @mysql_query($query);

if (mysql_error()) die ("ERROR: Bad gameId- $query");

// Creates an array of strings to hold the lines of the KML file.
$kml = array('<?xml version="1.0" encoding="UTF-8"?>');
$kml[] = '<kml xmlns="http://earth.google.com/kml/2.1">';
$kml[] = ' <Document>';

$row;
$nextRow = @mysql_fetch_assoc($result);
$count = 0;

while ($nextRow)
{
    $mediaHtml = "";
    $kml[] = ' <Placemark id="placemark' . $count . '">';
    $kml[] = ' <name>' . htmlentities($nextRow['title']) . '</name>';
    $description = array("<![CDATA[");
    $description[] = "Created By: {$nextRow['user_name']}
";
    do{
        $row = $nextRow;
        $mediaURL = Config::gamedataWWWPath . "/{$_REQUEST['gameId']}/{$row['file_path']}";

        $mediaObject = new Media;
        $type = $mediaObject->getMediaType($mediaURL);

        if ($type == Media::MEDIA_IMAGE) $mediaHtml .= "";
        else if ($type == Media::MEDIA_AUDIO) $mediaHtml .= "Link to Audio";
        else if ($type == Media::MEDIA_VIDEO) $mediaHtml .= "

            <object height='175' width='212'>
                <param value='" . $mediaURL . "' name='movie'>
                <param value='transparent' name='wmode'>
                <embed wmode='transparent' type='application/x-shockwave-flash'
                src='".$mediaURL."' height='175'
                width='212'>
                </object>

";
        $mediaHtml.="
";
        if(!($nextRow = @mysql_fetch_assoc($result))) $nextRow = false;
    } while($nextRow && $nextRow['note_id'] == $row['note_id']);
    //echo $mediaHtml;
    $description[] = $mediaHtml;
    //$description[] = "Date: {$row['origin_timestamp']}
";
    //$description[] = '
' . $row['description'] . '
';
    $description[] = "]]>";
    $descriptionHtml = join("\n", $description);

    $kml[] = ' <description>' . $descriptionHtml . '</description>';
    $kml[] = ' <Point>';
    $kml[] = ' <coordinates>' . $row['longitude'] . ','  . $row['latitude'] . '</coordinates>';
    $kml[] = ' </Point>';
    $kml[] = ' </Placemark>';
    $count++;
}

/*
   <![CDATA[

   The Spaghetti Film

http://www.youtube.com/?v=FICUvrVlyXc

<object height="175" width="212">
<param value="http://www.youtube.com/v/FICUvrVlyXc" name="movie">
<param value="transparent" name="wmode">
<embed wmode="transparent" type="application/x-shockwave-flash"
src="http://www.youtube.com/v/FICUvrVlyXc" height="175"
width="212">
</object>

Saved from

YouTubeVideos

]]>
 */

// End KML file
$kml[] = ' </Document>';
$kml[] = '</kml>';
$kmlOutput = join("\n", $kml);

switch ($_REQUEST['type']) {
    case 'kml':
        header('Content-type: application/vnd.google-earth.kml+xml');
        header('Content-Disposition: attachment; filename="PlayerCollectedItems.kml"');
        echo $kmlOutput;
        break;
    case 'map':
        //echo $kmlOutput;
        $kmlPath = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF'] . '?type=kml&gameId=' . $_REQUEST['gameId'];
        //echo $kmlPath;
        include ('REST_GoogleMapWithKMLVariable.inc.php');
        break;
    default:
        echo 'Please add a "type" GET variable of "kml" or "map"';
}
?>


text:
package net.kucoe.elvn.lang;

import java.util.*;
import java.util.regex.Pattern;

import net.kucoe.elvn.ListColor;
import net.kucoe.elvn.lang.result.*;

/**
 * Enumerates EL commands.
 *
 * @author Vitaliy Basyuk
 */
public enum ELCommand {

    /**
     * End command.
     */
    End("."),

    /**
     * String command.
     */
    String("") {
        @Override
        protected ELCommand doNext() {
            String[] split = split(processing, ':');
            String text = split[0];
            String list = null;
            int length = split.length;
            if (length > 1) {
                list = split[0];
                text = split[1];
            }
            if (result == null) {
                result = doEditTask(result, list, text);
            } else if (result instanceof SearchTask) {
                String query = parseTill("=");
                result = new SearchTask(null, null, query);
                String string = parseNext(1, "=");
                ELCommand next = command(string);
                if (next != null) {
                    return next;
                }
            } else if (result instanceof LocateTask) {
                result = new TaskCommand(((LocateTask) result).position, processing);
            } else if (result instanceof TaskGroup) {
                result = new GroupTaskCommand(processing, ((TaskGroup) result).positions);
            } else if (result instanceof EditTask) {
                result = doEditTask(result, list, text);
            } else if (result instanceof SwitchSync) {
                result = new SyncCommand(processing);
            } else if (result instanceof SwitchTimer) {
                result = new TimerCommand(processing);
            } else if (result instanceof Switch) {
                ListColor color = ListColor.color(processing);
                if (color == null) {
                    result = new SwitchListLabel(processing);
                } else {
                    result = new SwitchListColor(color);
                }
            }
            return super.doNext();
        }

        protected TaskResult doEditTask(final ELResult result, final String list, final String text) {
            if (result instanceof EditTask) {
                TaskResult mainResult = ((EditTask) result).mainResult;
                return doEditTask(mainResult, list, text);
            } else if (result instanceof SearchTask) {
                return new SearchTask(list, text, ((SearchTask) result).query);
            } else if (result instanceof LocateTask) {
                return new LocateTask(list, text, ((LocateTask) result).position);
            } else {
                return new TaskResult(list, text);
            }
        }
    },

    /**
     * Group command
     */
    Group(",") {
        @Override
        protected ELCommand doNext() {
            if (result instanceof LocateTask) {
                int[] positions = { ((LocateTask) result).position };
                result = new TaskGroup(positions);
                return Number;
            } else if (result instanceof TaskGroup) {
                return Number;
            }
            return super.doNext();
        }
    },

    /**
     * Range command
     */
    Range("-") {
        @Override
        protected ELCommand doNext() {
            if (result instanceof LocateTask) {
                result = new TaskRange(((LocateTask) result).position, -1);
                return Number;
            }
            return super.doNext();
        }
    },

    /**
     * All command
     */
    All("*") {
        @Override
        protected ELCommand doNext() {
            if (result instanceof LocateTask) {
                result = new TaskGroup(null);
                return String;
            }
            return super.doNext();
        }
    },

    /**
     * Number command.
     */
    Number("") {
        @Override
        protected ELCommand doNext() {
            if (result instanceof LocateTask) {
                String next = parseNext(1, "*");
                if (next != null) {
                    return findNext(next);
                }
                String num = parseWhile("\\d");
                int position = toInt(num);
                try {
                    checkPosition(position);
                } catch (Exception e) {
                    result = null;
                    processing = Locate.el() + processing;
                    return String;
                }
                result = new LocateTask(null, null, position);
                String string = parseNext(1, "=-,");
                return findNext(string);
            } else if (result instanceof TaskRange) {
                String num = parseWhile("\\d");
                int start = ((TaskRange) result).start;
                int end = toInt(num);
                checkPosition(start);
                try {
                    checkPosition(end);
                } catch (Exception e) {
                    result = new TaskCommand(start, Range.el());
                    return super.doNext();
                }
                int l = 0;
                int min = 0;
                if (start < end) {
                    l = end - start + 1;
                    min = start;
                } else {
                    l = start - end + 1;
                    min = end;
                }
                int[] positions = new int[l];
                for (int i = 0; i < l; i++) {
                    positions[i] = min + i;
                }
                result = new TaskGroup(positions);
                String string = parseNext(1, "=");
                return findNext(string);
            } else if (result instanceof TaskGroup) {
                String num = parseWhile("\\d");
                int i = toInt(num);
                checkPosition(i);
                int[] pos = ((TaskGroup) result).positions;
                int l = pos.length + 1;
                int[] positions = Arrays.copyOf(pos, l);
                positions[l - 1] = i;
                result = new TaskGroup(positions);
                String string = parseNext(1, "=,");
                return findNext(string);
            }
            return super.doNext();
        }

        private ELCommand findNext(final String string) {
            ELCommand next = command(string);
            if (next != null) {
                return next;
            }
            if (!processing.isEmpty()) {
                return String;
            }
            return super.doNext();
        }

        private void checkPosition(final int position) {
            if (position <= 0) {
                throw new IllegalArgumentException("Wrong position" + position);
            }
        }
    },

    /**
     * Start command.
     */
    Start("") {
        @Override
        protected ELCommand doNext() {
            String string = parseNext(1, "/?#$!@&%");
            ELCommand next = command(string);
            if (next == null) {
                next = String;
            }
            return next;
        }
    },

    /**
     * List edit command.
     */
    ListEdit("&") {
        @Override
        protected ELCommand doNext() {
            if (processing.isEmpty()) {
                result = new SwitchListEdit();
                return super.doNext();
            }
            processing = el + processing;
            return String;
        }
    },

    /**
     * Ideas command.
     */
    Ideas("@") {
        @Override
        protected ELCommand doNext() {
            if (processing.isEmpty()) {
                result = new SwitchIdeas();
                return super.doNext();
            }
            processing = el + processing;
            return String;
        }
    },

    /**
     * Sync command.
     */
    Sync("%") {
        @Override
        protected ELCommand doNext() {
            if (processing.isEmpty() || processing.length() == 1) {
                result = new SwitchSync();
                return processing.isEmpty() ? super.doNext() : String;
            }
            processing = el + processing;
            return String;
        }
    },

    /**
     * Timer command.
     */
    Timer("$") {
        @Override
        protected ELCommand doNext() {
            if (processing.isEmpty() || processing.length() == 1) {
                result = new SwitchTimer();
                return processing.isEmpty() ? super.doNext() : String;
            }
            processing = el + processing;
            return String;
        }
    },

    /**
     * Status command.
     */
    Status("!") {
        @Override
        protected ELCommand doNext() {
            if (processing.isEmpty()) {
                result = new SwitchStatus();
                return super.doNext();
            }
            processing = el + processing;
            return String;
        }
    },

    /**
     * Assign command.
     */
    Assign("=") {
        @Override
        protected ELCommand doNext() {
            result = new EditTask((TaskResult) result);
            return String;
        }
    },

    /**
     * Search command.
     */
    Search("?") {
        @Override
        protected ELCommand doNext() {
            result = new SearchTask();
            return String;
        }
    },

    /**
     * Locate command.
     */
    Locate("#") {
        @Override
        protected ELCommand doNext() {
            result = new LocateTask();
            return Number;
        }
    },

    /**
     * Switch command.
     */
    Switch("/") {
        @Override
        protected ELCommand doNext() {
            result = new Switch();
            return String;
        }
    };

    protected String el;
    protected String processing;
    protected ELResult result;

    private ELCommand(final String el) {
        this.el = el;
    }

    /**
     * Returns command
     *
     * @return string
     */
    public String el() {
        return el;
    }

    /**
     * Returns result.
     *
     * @return {@link Object}
     */
    public ELResult getResult() {
        return result;
    }

    /**
     * Initializes command.
     *
     * @param command {@link String}
     */
    public void init(final String command) {
        processing = command;
    }

    /**
     * Returns next command.
     *
     * @return {@link ELCommand}
     */
    public ELCommand next() {
        ELCommand next = doNext();
        next.result = result;
        next.init(processing);
        return next;
    }

    protected ELCommand doNext() {
        return End;
    }

    protected String parseWhile(final String match) {
        if (processing == null) {
            return processing;
        }
        int i = 0;
        Pattern p = Pattern.compile(match);
        while (processing.length() > i && p.matcher("" + processing.charAt(i)).matches()) {
            i++;
        }
        String result = processing.substring(0, i);
        processing = processing.substring(i);
        return result;
    }

    protected String parseTill(final String string) {
        if (processing == null || !processing.contains(string)) {
            return processing;
        }
        int i = processing.indexOf(string);
        String result = processing.substring(0, i);
        processing = processing.substring(i);
        return result;
    }

    protected String parseNext(final int number, final String expect) {
        if (processing == null || processing.length() < number) {
            return null;
        }
        String next = processing.substring(0, number);
        if (expect == null || expect.contains(next)) {
            processing = processing.substring(number);
            return next;
        }
        return null;
    }

    protected static String[] split(final String haystack, final char needle) {
        List<String> splits = new ArrayList<String>();
        int lastPoint = 0;
        for (int i = 0; i < haystack.length(); i++) {
            if (haystack.charAt(i) == needle) {
                splits.add(haystack.substring(lastPoint, i));
                lastPoint = i;
            }
        }
        splits.add(haystack.substring(lastPoint));
        List<String> newSplits = new ArrayList<String>();
        for (String string : splits) {
            newSplits.add(string.replace(":", ""));
        }
        return newSplits.toArray(new String[] {});
    }

    protected int toInt(final String string) {
        int i = 0;
        try {
            i = Integer.valueOf(string);
        } catch (NumberFormatException e) {
            // ignore
        }
        return i;
    }

    private static Map<String, ELCommand> commands = new HashMap<String, ELCommand>();

    static {
        for (ELCommand command : ELCommand.values()) {
            String st = command.el;
            if (!st.isEmpty()) {
                commands.put(st, command);
            }
        }
    }

    /**
     * Returns command by string
     *
     * @param string
     * @return {@link ELCommand}
     */
    public static ELCommand command(final String string) {
        return commands.get(string);
    }

}

redpajama_set_name: RedPajamaGithub


text:
package org.lp20.aikuma.audio;

import android.util.Log;
import org.lp20.aikuma.util.FileIO;
import org.lp20.aikuma.model.Segments;
import org.lp20.aikuma.model.Segments.Segment;
import android.test.AndroidTestCase;

public class SegmentsTest extends AndroidTestCase {
	public void testSegments() {
		Segments segments = new Segments();
		segments.put(new Segment(0l,100l), new Segment(0l, 200l));
	}
}


text:
package com.cezarykluczynski.stapi.auth.oauth.github.service;

import com.cezarykluczynski.stapi.auth.oauth.github.configuration.GitHubOAuthProperties;
import com.cezarykluczynski.stapi.auth.oauth.github.dto.GitHubRedirectUrlDTO;
import com.google.common.base.Preconditions;
import org.springframework.stereotype.Service;

@Service
class GitHubOAuthUrlFactory {

	private static final String GITHUB_CLIENT_ID_CANNOT_BE_NULL = "GitHub client_id cannot be null";
	private static final String GITHUB_CLIENT_SECRET_CANNOT_BE_NULL = "GitHub client_secret cannot be null";

	private final GitHubOAuthProperties gitHubOAuthProperties;

	GitHubOAuthUrlFactory(GitHubOAuthProperties gitHubOAuthProperties) {
		this.gitHubOAuthProperties = gitHubOAuthProperties;
	}

	GitHubRedirectUrlDTO createGitHubOAuthorizeUrl() {
		String clientId = gitHubOAuthProperties.getClientId();
		Preconditions.checkNotNull(clientId, GITHUB_CLIENT_ID_CANNOT_BE_NULL);
		return new GitHubRedirectUrlDTO("https://github.com/login/oauth/authorize?client_id=" + clientId);
	}

	GitHubRedirectUrlDTO createAccessTokenUrl(String code) {
		String clientId = gitHubOAuthProperties.getClientId();
		Preconditions.checkNotNull(clientId, GITHUB_CLIENT_ID_CANNOT_BE_NULL);
		String clientSecret = gitHubOAuthProperties.getClientSecret();
		Preconditions.checkNotNull(clientSecret, GITHUB_CLIENT_SECRET_CANNOT_BE_NULL);
		return new GitHubRedirectUrlDTO("https://github.com/login/oauth/access_token?client_id=" + clientId + "&client_secret=" + clientSecret
				+ "&code=" + code);
	}

	GitHubRedirectUrlDTO createUserUrl(String accessToken) {
		return new GitHubRedirectUrlDTO("https://api.github.com/user?access_token=" + accessToken);
	}

}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Skr. Svalbard Ishavet (Oslo) 27: 128 (1930)

#### Original name
Hermanniasporidium Thor

### Remarks
null


text:
using System;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Reflection;

namespace OpenDis.Enumerations.Logistics
{
    /// <summary>
    /// Enumeration values for WeaponRepairCode (log.repaircomplete.weapons, Weapons,
    /// section 6.2.5)
    /// The enumeration values are generated from the SISO DIS XML EBV document (R35), which was
    /// obtained from http://discussions.sisostds.org/default.asp?action=10&fd=31
    /// </summary>
    [SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", Justification = "Due to SISO standardized naming.")]
    [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Justification = "Due to SISO standardized naming.")]
    [SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", Justification = "Due to SISO standardized naming.")]
    [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", Justification = "Due to SISO standardized naming.")]
    [Serializable]
    public enum WeaponRepairCode : ushort
    {
        /// <summary>
        /// gun elevation drive.
        /// </summary>
        [SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", Justification = "Due to SISO standardized naming.")]
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Justification = "Due to SISO standardized naming.")]
        [SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", Justification = "Due to SISO standardized naming.")]
        [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", Justification = "Due to SISO standardized naming.")]
        [Description("gun elevation drive.")]
        GunElevationDrive = 2000,

        /// <summary>
        /// gun stabilization system.
        /// </summary>
        [SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", Justification = "Due to SISO standardized naming.")]
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Justification = "Due to SISO standardized naming.")]
        [SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", Justification = "Due to SISO standardized naming.")]
        [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", Justification = "Due to SISO standardized naming.")]
        [Description("gun stabilization system.")]
        GunStabilizationSystem = 2010,

        /// <summary>
        /// gunner's primary sight (GPS).
        /// </summary>
        [SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", Justification = "Due to SISO standardized naming.")]
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Justification = "Due to SISO standardized naming.")]
        [SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", Justification = "Due to SISO standardized naming.")]
        [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", Justification = "Due to SISO standardized naming.")]
        [Description("gunner's primary sight (GPS).")]
        GunnerSPrimarySightGPS = 2020,

        /// <summary>
        /// commander's extension to the GPS.
        /// </summary>
        [SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", Justification = "Due to SISO standardized naming.")]
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Justification = "Due to SISO standardized naming.")]
        [SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", Justification = "Due to SISO standardized naming.")]
        [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", Justification = "Due to SISO standardized naming.")]
        [Description("commander's extension to the GPS.")]
        CommanderSExtensionToTheGPS = 2030,

        /// <summary>
        /// loading mechanism.
        /// </summary>
        [SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", Justification = "Due to SISO standardized naming.")]
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Justification = "Due to SISO standardized naming.")]
        [SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", Justification = "Due to SISO standardized naming.")]
        [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", Justification = "Due to SISO standardized naming.")]
        [Description("loading mechanism.")]
        LoadingMechanism = 2040,

        /// <summary>
        /// gunner's auxiliary sight.
        /// </summary>
        [SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", Justification = "Due to SISO standardized naming.")]
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Justification = "Due to SISO standardized naming.")]
        [SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", Justification = "Due to SISO standardized naming.")]
        [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", Justification = "Due to SISO standardized naming.")]
        [Description("gunner's auxiliary sight.")]
        GunnerSAuxiliarySight = 2050,

        /// <summary>
        /// gunner's control panel.
        /// </summary>
        [SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", Justification = "Due to SISO standardized naming.")]
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Justification = "Due to SISO standardized naming.")]
        [SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", Justification = "Due to SISO standardized naming.")]
        [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", Justification = "Due to SISO standardized naming.")]
        [Description("gunner's control panel.")]
        GunnerSControlPanel = 2060,

        /// <summary>
        /// gunner's control assembly handle(s).
        /// </summary>
        [SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", Justification = "Due to SISO standardized naming.")]
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Justification = "Due to SISO standardized naming.")]
        [SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", Justification = "Due to SISO standardized naming.")]
        [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", Justification = "Due to SISO standardized naming.")]
        [Description("gunner's control assembly handle(s).")]
        GunnerSControlAssemblyHandleS = 2070,

        /// <summary>
        /// commander's control handles/assembly.
        /// </summary>
        [SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", Justification = "Due to SISO standardized naming.")]
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Justification = "Due to SISO standardized naming.")]
        [SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", Justification = "Due to SISO standardized naming.")]
        [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", Justification = "Due to SISO standardized naming.")]
        [Description("commander's control handles/assembly.")]
        CommanderSControlHandlesAssembly = 2090,

        /// <summary>
        /// commander's weapon station.
        /// </summary>
        [SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", Justification = "Due to SISO standardized naming.")]
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Justification = "Due to SISO standardized naming.")]
        [SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", Justification = "Due to SISO standardized naming.")]
        [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", Justification = "Due to SISO standardized naming.")]
        [Description("commander's weapon station.")]
        CommanderSWeaponStation = 2100,

        /// <summary>
        /// commander's independent thermal viewer (CITV).
        /// </summary>
        [SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", Justification = "Due to SISO standardized naming.")]
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Justification = "Due to SISO standardized naming.")]
        [SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", Justification = "Due to SISO standardized naming.")]
        [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", Justification = "Due to SISO standardized naming.")]
        [Description("commander's independent thermal viewer (CITV).")]
        CommanderSIndependentThermalViewerCITV = 2110,

        /// <summary>
        /// general weapons.
        /// </summary>
        [SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", Justification = "Due to SISO standardized naming.")]
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Justification = "Due to SISO standardized naming.")]
        [SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", Justification = "Due to SISO standardized naming.")]
        [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", Justification = "Due to SISO standardized naming.")]
        [Description("general weapons.")]
        GeneralWeapons = 2120
    }
}


text:
[CmdletBinding()]
param(
	[Parameter(Mandatory=$true)]
	[string]$serverName,

	[Parameter(Mandatory=$true)]
	[string]$accountName,

	[Parameter(Mandatory=$true)]
	[string]$accountPassword,

	[Parameter(Mandatory=$true)]
	[string]$deployedFolderPath,

	[Parameter(Mandatory=$false)]
	[string]$dotnetRuntimePath = "",

	[Parameter(Mandatory=$true)]
	[string]$executablePath,

	[Parameter(Mandatory=$false)]
	[string]$executableParameters,

	[Parameter(Mandatory=$true)]
	[string]$serverType,

	[Parameter(Mandatory=$true)]
	[string]$serverAction,

	[Parameter(Mandatory=$true)]
	[string]$applicationBaseUrl,

	[Parameter(Mandatory=$false)]
	[string]$environmentVariables
)

Write-Host "`nExecuting deployment helper script on machine '$serverName'"
Write-Host "`nStarting a powershell session to machine '$serverName'"

$securePassword = ConvertTo-SecureString $accountPassword -AsPlainText -Force
$credentials= New-Object System.Management.Automation.PSCredential ($accountName, $securePassword)
$psSession = New-PSSession -ComputerName $serverName -credential $credentials

$remoteResult="0"
if ($serverAction -eq "StartServer")
{
	Write-Host "Starting the application on machine '$serverName'"
	$startServerScriptPath = "$PSScriptRoot\StartServer.ps1"
	$remoteResult=Invoke-Command -Session $psSession -FilePath $startServerScriptPath -ArgumentList $deployedFolderPath, $dotnetRuntimePath, $executablePath, $executableParameters, $serverType, $serverName, $applicationBaseUrl, $environmentVariables
}
else
{
	Write-Host "Stopping the application on machine '$serverName'"
	$stopServerScriptPath = "$PSScriptRoot\StopServer.ps1"
	$serverProcessName = [System.IO.Path]::GetFileNameWithoutExtension($executablePath)
	$remoteResult=Invoke-Command -Session $psSession -FilePath $stopServerScriptPath -ArgumentList $deployedFolderPath, $serverProcessName, $serverType, $serverName
}

Remove-PSSession $psSession

# NOTE: Currenty there is no straight forward way to get the exit code from a remotely executing session, so
# we print out the exit code in the remote script and capture it's output to get the exit code.
if($remoteResult.Length > 0)
{
    $finalExitCode=$remoteResult[$remoteResult.Length-1]
    exit $finalExitCode
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
in Batista, Matta & Bezerra, Anais XIII Congr. Soc. bot. Brasil 395 (1964)

#### Original name
Corynespora helminthosporioides Bat., J.L. Bezerra & Matta

### Remarks
null


text:
.response {
  margin: 10px 0;
  padding: 10px 0;
  border-bottom: 1px solid #DDD;
}

.response-action::before {
  content: 'action: ';
}

.response-timestamp::before {
  content: 'timestamp: ';
}

.response-platform::before {
  content: 'platform: ';
}

.response-context::before {
  content: 'context: ';
}

.response-location::before {
  content: 'location: ';
}

.response-data::before {
  content: 'data: ';
}

.response-target::before {
  content: 'target data: ';
}

.response-item::before {
  display: inline-block;
  width: 100px;
}


text:
'use strict';

//
// test global method (setTimeout)
//

setTimeout(function callback() {
  throw new Error('trace');
}, 0);


text:
const RealityCheckData = require('./reality_check.data');
const RealityCheckUI   = require('./reality_check.ui');
const Client           = require('../../../base/client');
const BinarySocket     = require('../../../base/socket');

const RealityCheck = (() => {
    const storageHandler = (ev) => {
        const key       = ev.key;
        const new_value = ev.newValue;
        if ((key === 'reality_check.ack' && +new_value === 1) ||
            (key === 'reality_check.keep_open' && +new_value === 0)) {
            RealityCheckUI.closePopUp();
        }
    };

    const onLoad = () => {
        if (RealityCheckUI.shouldShowPopup()) {
            BinarySocket.wait('landing_company').then(() => {
                if ((Client.currentLandingCompany() || {}).has_reality_check) {
                    window.addEventListener('storage', storageHandler, false);

                    RealityCheckData.resetInvalid();

                    if (!RealityCheckData.get('ack')) {
                        RealityCheckUI.renderFrequencyPopUp();
                    } else if (RealityCheckData.get('keep_open')) {
                        RealityCheckUI.getSummaryAsync();
                    } else {
                        RealityCheckUI.startSummaryTimer();
                    }
                } else {
                    clearTimeout(RealityCheckUI.getRealityTimeout());
                }
            });
        }
    };

    return {
        onLoad,
    };
})();

module.exports = RealityCheck;


text:
from django.contrib import admin

from market_buy.models import EditorPick, Show, WishListItem, MarketPlacePick, DealerPick, BestSeller

admin.site.register(EditorPick)
admin.site.register(BestSeller)
admin.site.register(DealerPick)
admin.site.register(MarketPlacePick)
admin.site.register(Show)
admin.site.register(WishListItem)


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:background="@color/black_overlay"
    android:orientation="vertical" >

     <TextView
         android:id="@+id/txtTime"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_gravity="center"
         android:textColor="@color/write"
         android:textSize="20dp" />

    <ImageView
        android:id="@+id/imgIcon"
        android:layout_width="64dp"
        android:layout_height="64dp"
        android:layout_gravity="center"
        android:paddingBottom="10dp"
        android:paddingTop="10dp"
        android:src="@drawable/partly_cloudy_day" />

    <TextView
        android:id="@+id/txtTemperature"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:textColor="@color/write"
        android:textSize="24dp" />

    <TextView
        android:id="@+id/txtWind"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:paddingTop="10dp"
        android:textColor="@color/write"
        android:textSize="18dp" />

    <TextView
        android:id="@+id/txtWindBearing"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:textColor="@color/write"
        android:textSize="18dp" />

</LinearLayout>


text:
from __future__ import with_statement, division

from mapproxy.test.system import module_setup, module_teardown, SystemTest
from mapproxy.test.system.test_wms import is_111_capa, is_110_capa, is_100_capa, is_130_capa, ns130

from nose.tools import eq_

test_config = {}
test_config_with_root = {}

def setup_module():
    module_setup(test_config, 'layergroups.yaml')
    module_setup(test_config_with_root, 'layergroups_root.yaml')

def teardown_module():
    module_teardown(test_config)
    module_teardown(test_config_with_root)

TESTSERVER_ADDRESS = 'localhost', 42423

class TestWMSWithRoot(SystemTest):
    config = test_config_with_root
    def setup(self):
        SystemTest.setup(self)

    def _check_layernames(self, xml):
        eq_(xml.xpath('//Capability/Layer/Title/text()'),
            ['Root Layer'])
        eq_(xml.xpath('//Capability/Layer/Name/text()'),
            ['root'])
        eq_(xml.xpath('//Capability/Layer/Layer/Name/text()'),
            ['layer1', 'layer2'])
        eq_(xml.xpath('//Capability/Layer/Layer[1]/Layer/Name/text()'),
            ['layer1a', 'layer1b'])

    def _check_layernames_with_namespace(self, xml, namespaces=None):
        eq_(xml.xpath('//wms:Capability/wms:Layer/wms:Title/text()', namespaces=namespaces),
            ['Root Layer'])
        eq_(xml.xpath('//wms:Capability/wms:Layer/wms:Name/text()', namespaces=namespaces),
            ['root'])
        eq_(xml.xpath('//wms:Capability/wms:Layer/wms:Layer/wms:Name/text()', namespaces=namespaces),
            ['layer1', 'layer2'])
        eq_(xml.xpath('//wms:Capability/wms:Layer/wms:Layer[1]/wms:Layer/wms:Name/text()', namespaces=namespaces),
            ['layer1a', 'layer1b'])

    def test_100_capa(self):
        resp = self.app.get("/service?request=GetCapabilities&service=WMS&wmtver=1.0.0")
        xml = resp.lxml
        assert is_100_capa(xml)
        self._check_layernames(xml)

    def test_110_capa(self):
        resp = self.app.get("/service?request=GetCapabilities&service=WMS&version=1.1.0")
        xml = resp.lxml
        assert is_110_capa(xml)
        self._check_layernames(xml)

    def test_111_capa(self):
        resp = self.app.get("/service?request=GetCapabilities&service=WMS&version=1.1.1")
        xml = resp.lxml
        assert is_111_capa(xml)
        self._check_layernames(xml)

    def test_130_capa(self):
        resp = self.app.get("/service?request=GetCapabilities&service=WMS&version=1.3.0")
        xml = resp.lxml
        assert is_130_capa(xml)
        self._check_layernames_with_namespace(xml, ns130)

class TestWMSWithoutRoot(SystemTest):
    config = test_config
    def setup(self):
        SystemTest.setup(self)

    def _check_layernames(self, xml):
        eq_(xml.xpath('//Capability/Layer/Title/text()'),
            ['My WMS'])
        eq_(xml.xpath('//Capability/Layer/Name/text()'),
            [])
        eq_(xml.xpath('//Capability/Layer/Layer/Name/text()'),
            ['layer1', 'layer2'])
        eq_(xml.xpath('//Capability/Layer/Layer[1]/Layer/Name/text()'),
            ['layer1a', 'layer1b'])
        eq_(xml.xpath('//Capability/Layer/Layer[2]/Layer/Name/text()'),
            ['layer2a', 'layer2b'])
        eq_(xml.xpath('//Capability/Layer/Layer[2]/Layer/Layer[1]/Name/text()'),
            ['layer2b1'])

    def _check_layernames_with_namespace(self, xml, namespaces=None):
        eq_(xml.xpath('//wms:Capability/wms:Layer/wms:Title/text()', namespaces=namespaces),
            ['My WMS'])
        eq_(xml.xpath('//wms:Capability/wms:Layer/wms:Name/text()', namespaces=namespaces),
            [])
        eq_(xml.xpath('//wms:Capability/wms:Layer/wms:Layer/wms:Name/text()', namespaces=namespaces),
            ['layer1', 'layer2'])
        eq_(xml.xpath('//wms:Capability/wms:Layer/wms:Layer[1]/wms:Layer/wms:Name/text()', namespaces=namespaces),
            ['layer1a', 'layer1b'])
        eq_(xml.xpath('//wms:Capability/wms:Layer/wms:Layer[2]/wms:Layer/wms:Name/text()', namespaces=namespaces),
            ['layer2a', 'layer2b'])
        eq_(xml.xpath('//wms:Capability/wms:Layer/wms:Layer[2]/wms:Layer/wms:Layer[1]/wms:Name/text()', namespaces=namespaces),
            ['layer2b1'])

    def test_100_capa(self):
        resp = self.app.get("/service?request=GetCapabilities&service=WMS&wmtver=1.0.0")
        xml = resp.lxml
        assert is_100_capa(xml)
        self._check_layernames(xml)

    def test_110_capa(self):
        resp = self.app.get("/service?request=GetCapabilities&service=WMS&version=1.1.0")
        xml = resp.lxml
        assert is_110_capa(xml)
        self._check_layernames(xml)

    def test_111_capa(self):
        resp = self.app.get("/service?request=GetCapabilities&service=WMS&version=1.1.1")
        xml = resp.lxml
        assert is_111_capa(xml)
        self._check_layernames(xml)

    def test_130_capa(self):
        resp = self.app.get("/service?request=GetCapabilities&service=WMS&version=1.3.0")
        xml = resp.lxml
        assert is_130_capa(xml)
        self._check_layernames_with_namespace(xml, ns130)


text:
package com.complexible.basecrm;

import com.google.common.base.Objects;

/**
 *

 *
 * @author  Michael Grove
 * @since   0.1
 * @version 0.1
 */
public class AuthenticationToken {
	private String mToken;

	public AuthenticationToken() {
	}

	public AuthenticationToken(final String theToken) {
		mToken = theToken;
	}

	public String getToken() {
		return mToken;
	}

	public void setToken(final String theToken) {
		mToken = theToken;
	}

	/**
	 * @{inheritDoc}
	 */
	@Override
	public int hashCode() {
		return Objects.hashCode(mToken);
	}

	/**
	 * @{inheritDoc}
	 */
	@Override
	public boolean equals(final Object theObj) {
		if (theObj == this) {
			return true;
		}
		else if (theObj instanceof AuthenticationToken) {
			AuthenticationToken aToken = (AuthenticationToken) theObj;
			return Objects.equal(mToken, aToken.getToken());
		}
		else {
			return false;
		}
	}
}


text:
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Class template unordered_set</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../index.html" title="Chapter 1. Boost.Unordered">
<link rel="up" href="../header/boost/unordered_set_hpp.html" title="Header <boost/unordered_set.hpp>">
<link rel="prev" href="../header/boost/unordered_set_hpp.html" title="Header <boost/unordered_set.hpp>">
<link rel="next" href="unordered_multiset.html" title="Class template unordered_multiset">

Home
Libraries
People
FAQ
More

Class template unordered_set

boost::unordered_set —
            An unordered associative container that stores unique values.

Synopsis

// In header: <boost/unordered_set.hpp>

template<typename Value, typename Hash = boost::hash<Value>,
         typename Pred = std::equal_to<Value>,
         typename Alloc = std::allocator<Value> >
class unordered_set {
public:
  // types
  typedef Value                                  key_type;
  typedef Value                                  value_type;
  typedef Hash                                   hasher;
  typedef Pred                                   key_equal;
  typedef Alloc                                  allocator_type;
  typedef typename allocator_type::pointer       pointer;
  typedef typename allocator_type::const_pointer const_pointer;
  typedef value_type&                            reference;
  typedef value_type const&                      const_reference;
  typedef implementation-defined                 size_type;
  typedef implementation-defined                 difference_type;
  typedef implementation-defined                 iterator;
  typedef implementation-defined                 const_iterator;
  typedef implementation-defined                 local_iterator;
  typedef implementation-defined                 const_local_iterator;

  // construct/copy/destruct
  explicit unordered_set(size_type = implementation-defined,
                         hasher const& = hasher(),
                         key_equal const& = key_equal(),
                         allocator_type const& = allocator_type());
  template<typename InputIterator>
    unordered_set(InputIterator, InputIterator,
                  size_type = implementation-defined,
                  hasher const& = hasher(), key_equal const& = key_equal(),
                  allocator_type const& = allocator_type());
  unordered_set(unordered_set const&);
  unordered_set(unordered_set &&);
  explicit unordered_set(Allocator const&);
  unordered_set(unordered_set const&, Allocator const&);
  ~unordered_set();
  unordered_set& operator=(unordered_set const&);
  unordered_set& operator=(unordered_set &&);
  allocator_type get_allocator() const;

  // size and capacity
  bool empty() const;
  size_type size() const;
  size_type max_size() const;

  // iterators
  iterator begin();
  const_iterator begin() const;
  iterator end();
  const_iterator end() const;
  const_iterator cbegin() const;
  const_iterator cend() const;

  // modifiers
  template<typename... Args> std::pair<iterator, bool> emplace(Args&&...);
  template<typename... Args> iterator emplace_hint(const_iterator, Args&&...);
  std::pair<iterator, bool> insert(value_type const&);
  std::pair<iterator, bool> insert(value_type&&);
  iterator insert(const_iterator, value_type const&);
  iterator insert(const_iterator, value_type&&);
  template<typename InputIterator> void insert(InputIterator, InputIterator);
  iterator erase(const_iterator);
  size_type erase(key_type const&);
  iterator erase(const_iterator, const_iterator);
  void quick_erase(const_iterator);
  void erase_return_void(const_iterator);
  void clear();
  void swap(unordered_set&);

  // observers
  hasher hash_function() const;
  key_equal key_eq() const;

  // lookup
  iterator find(key_type const&);
  const_iterator find(key_type const&) const;
  template<typename CompatibleKey, typename CompatibleHash,
           typename CompatiblePredicate>
    iterator find(CompatibleKey const&, CompatibleHash const&,
                  CompatiblePredicate const&);
  template<typename CompatibleKey, typename CompatibleHash,
           typename CompatiblePredicate>
    const_iterator
    find(CompatibleKey const&, CompatibleHash const&,
         CompatiblePredicate const&) const;
  size_type count(key_type const&) const;
  std::pair<iterator, iterator> equal_range(key_type const&);
  std::pair<const_iterator, const_iterator> equal_range(key_type const&) const;

  // bucket interface
  size_type bucket_count() const;
  size_type max_bucket_count() const;
  size_type bucket_size(size_type) const;
  size_type bucket(key_type const&) const;
  local_iterator begin(size_type);
  const_local_iterator begin(size_type) const;
  local_iterator end(size_type);
  const_local_iterator end(size_type) const;
  const_local_iterator cbegin(size_type) const;
  const_local_iterator cend(size_type);

  // hash policy
  float load_factor() const;
  float max_load_factor() const;
  void max_load_factor(float);
  void rehash(size_type);
  void reserve(size_type);
};

// Equality Comparisons
template<typename Value, typename Hash, typename Pred, typename Alloc>
  bool operator==(unordered_set<Value, Hash, Pred, Alloc> const&,
                  unordered_set<Value, Hash, Pred, Alloc> const&);
template<typename Value, typename Hash, typename Pred, typename Alloc>
  bool operator!=(unordered_set<Value, Hash, Pred, Alloc> const&,
                  unordered_set<Value, Hash, Pred, Alloc> const&);

// swap
template<typename Value, typename Hash, typename Pred, typename Alloc>
  void swap(unordered_set<Value, Hash, Pred, Alloc>&,
            unordered_set<Value, Hash, Pred, Alloc>&);

Description

Template Parameters

<colgroup>
<col>
<col>
</colgroup>

Value

Value must be Erasable from the container
                        (i.e. allocator_traits can destroy it).

Hash
A unary function object type that acts a hash function for a Value. It takes a single argument of type Value and returns a value of type std::size_t.

Pred
A binary function object that implements an equivalence relation on values of type Value.
                        A binary function object that induces an equivalence relation on values of type Value.
                        It takes two arguments of type Value and returns a value of type bool.

Alloc
An allocator whose value type is the same as the container's value type.

The elements are organized into buckets. Keys with the same hash code are stored in the same bucket.

The number of buckets can be automatically increased by a call to insert, or as the result of calling rehash.

unordered_set
        public
       types

typedef Value key_type;

typedef Value value_type;

typedef Hash hasher;

typedef Pred key_equal;

typedef Alloc allocator_type;

typedef typename allocator_type::pointer pointer;

                value_type* if
                allocator_type::pointer is not defined.

typedef typename allocator_type::const_pointer const_pointer;

                boost::pointer_to_other<pointer, value_type>::type
                if allocator_type::const_pointer is not defined.

typedef value_type& reference;

typedef value_type const& const_reference;

typedef implementation-defined size_type;

An unsigned integral type.

size_type can represent any non-negative value of difference_type.

typedef implementation-defined difference_type;

A signed integral type.

Is identical to the difference type of iterator and const_iterator.

typedef implementation-defined iterator;

A constant iterator whose value type is value_type.

The iterator category is at least a forward iterator.

Convertible to const_iterator.

typedef implementation-defined const_iterator;

A constant iterator whose value type is value_type.

The iterator category is at least a forward iterator.

typedef implementation-defined local_iterator;

An iterator with the same value type, difference type and pointer and reference type as iterator.

A local_iterator object can be used to iterate through a single bucket.

typedef implementation-defined const_local_iterator;

A constant iterator with the same value type, difference type and pointer and reference type as const_iterator.

A const_local_iterator object can be used to iterate through a single bucket.

unordered_set
        public
       construct/copy/destruct

explicit unordered_set(size_type n = implementation-defined,
                       hasher const& hf = hasher(),
                       key_equal const& eq = key_equal(),
                       allocator_type const& a = allocator_type());

Constructs an empty container with at least n buckets, using hf as the hash function, eq as the key equality predicate, a as the allocator and a maximum load factor of 1.0.

<col align="left" valign="top">

Postconditions:

size() == 0

Requires:

If the defaults are used, hasher, key_equal and
                allocator_type need to be DefaultConstructible.

template<typename InputIterator>
  unordered_set(InputIterator f, InputIterator l,
                size_type n = implementation-defined,
                hasher const& hf = hasher(),
                key_equal const& eq = key_equal(),
                allocator_type const& a = allocator_type());

Constructs an empty container with at least n buckets, using hf as the hash function, eq as the key equality predicate, a as the allocator and a maximum load factor of 1.0 and inserts the elements from [f, l) into it.

<col align="left" valign="top">

Requires:

If the defaults are used, hasher, key_equal and
                allocator_type need to be DefaultConstructible.

unordered_set(unordered_set const&);

The copy constructor. Copies the contained elements, hash function, predicate, maximum load factor and allocator.

If Allocator::select_on_container_copy_construction
              exists and has the right signature, the allocator will be
              constructed from its result.

<col align="left" valign="top">

Requires:

value_type is copy constructible

unordered_set(unordered_set &&);

The move constructor.

<col align="left" valign="top">

Notes:

This is implemented using Boost.Move.

Requires:

                value_type is move constructible.

                On compilers without rvalue reference support the
                emulation does not support moving without calling
                boost::move if value_type is
                not copyable. So, for example, you can't return the
                container from a function.

explicit unordered_set(Allocator const& a);

Constructs an empty container, using allocator a.

unordered_set(unordered_set const& x, Allocator const& a);

Constructs an container, copying x's contained elements, hash function, predicate, maximum load factor, but using allocator a.

~unordered_set();

<col align="left" valign="top">

Notes:

The destructor is applied to every element, and all memory is deallocated

unordered_set& operator=(unordered_set const&);

The assignment operator. Copies the contained elements, hash function, predicate and maximum load factor but not the allocator.

If Alloc::propagate_on_container_copy_assignment
              exists and Alloc::propagate_on_container_copy_assignment::value
               is true, the allocator is overwritten, if not the
              copied elements are created using the existing
              allocator.

<col align="left" valign="top">

Requires:

value_type is copy constructible

unordered_set& operator=(unordered_set &&);

The move assignment operator.

If Alloc::propagate_on_container_move_assignment
              exists and Alloc::propagate_on_container_move_assignment::value
               is true, the allocator is overwritten, if not the
              moved elements are created using the existing
              allocator.

<col align="left" valign="top">

Notes:

                On compilers without rvalue references, this is emulated using
                Boost.Move. Note that on some compilers the copy assignment
                operator may be used in some circumstances.

Requires:

                value_type is move constructible.

allocator_type get_allocator() const;

unordered_set size and capacity

bool empty() const;

<col align="left" valign="top">

Returns:

size() == 0

size_type size() const;

<col align="left" valign="top">

Returns:

std::distance(begin(), end())

size_type max_size() const;

<col align="left" valign="top">

Returns:

size() of the largest possible container.

unordered_set iterators

iterator begin();
const_iterator begin() const;

<col align="left" valign="top">

Returns:

An iterator referring to the first element of the container, or if the container is empty the past-the-end value for the container.

iterator end();
const_iterator end() const;

<col align="left" valign="top">

Returns:

An iterator which refers to the past-the-end value for the container.

const_iterator cbegin() const;

<col align="left" valign="top">

Returns:

A constant iterator referring to the first element of the container, or if the container is empty the past-the-end value for the container.

const_iterator cend() const;

<col align="left" valign="top">

Returns:

A constant iterator which refers to the past-the-end value for the container.

unordered_set modifiers

template<typename... Args> std::pair<iterator, bool> emplace(Args&&... args);

Inserts an object, constructed with the arguments args, in the container if and only if there is no element in the container with an equivalent value.

<col align="left" valign="top">

Requires:

value_type is EmplaceConstructible into
                  X from args.

Returns:

The bool component of the return type is true if an insert took place.

If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent value.

Throws:

If an exception is thrown by an operation other than a call to hasher the function has no effect.

Notes:

Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.

Pointers and references to elements are never invalidated.

If the compiler doesn't support variadic template arguments or rvalue
                      references, this is emulated for up to 10 arguments, with no support
                      for rvalue references or move semantics.

Since existing std::pair implementations don't support
                      std::piecewise_construct this emulates it,
                      but using boost::unordered::piecewise_construct.

template<typename... Args>
  iterator emplace_hint(const_iterator hint, Args&&... args);

Inserts an object, constructed with the arguments args, in the container if and only if there is no element in the container with an equivalent value.

hint is a suggestion to where the element should be inserted.

<col align="left" valign="top">

Requires:

value_type is EmplaceConstructible into
                  X from args.

Returns:

If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent value.

Throws:

If an exception is thrown by an operation other than a call to hasher the function has no effect.

Notes:

The standard is fairly vague on the meaning of the hint. But the only practical way to use it, and the only way that Boost.Unordered supports is to point to an existing element with the same value.

Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.

Pointers and references to elements are never invalidated.

If the compiler doesn't support variadic template arguments or rvalue
                      references, this is emulated for up to 10 arguments, with no support
                      for rvalue references or move semantics.

Since existing std::pair implementations don't support
                      std::piecewise_construct this emulates it,
                      but using boost::unordered::piecewise_construct.

std::pair<iterator, bool> insert(value_type const& obj);

Inserts obj in the container if and only if there is no element in the container with an equivalent value.

<col align="left" valign="top">

Requires:

value_type is CopyInsertable.

Returns:

The bool component of the return type is true if an insert took place.

If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent value.

Throws:

If an exception is thrown by an operation other than a call to hasher the function has no effect.

Notes:

Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.

Pointers and references to elements are never invalidated.

std::pair<iterator, bool> insert(value_type&& obj);

Inserts obj in the container if and only if there is no element in the container with an equivalent value.

<col align="left" valign="top">

Requires:

value_type is MoveInsertable.

Returns:

The bool component of the return type is true if an insert took place.

If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent value.

Throws:

If an exception is thrown by an operation other than a call to hasher the function has no effect.

Notes:

Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.

Pointers and references to elements are never invalidated.

iterator insert(const_iterator hint, value_type const& obj);

Inserts obj in the container if and only if there is no element in the container with an equivalent value.

hint is a suggestion to where the element should be inserted.

<col align="left" valign="top">

Requires:

value_type is CopyInsertable.

Returns:

If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent value.

Throws:

If an exception is thrown by an operation other than a call to hasher the function has no effect.

Notes:

The standard is fairly vague on the meaning of the hint. But the only practical way to use it, and the only way that Boost.Unordered supports is to point to an existing element with the same value.

Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.

Pointers and references to elements are never invalidated.

iterator insert(const_iterator hint, value_type&& obj);

Inserts obj in the container if and only if there is no element in the container with an equivalent value.

hint is a suggestion to where the element should be inserted.

<col align="left" valign="top">

Requires:

value_type is MoveInsertable.

Returns:

If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent value.

Throws:

If an exception is thrown by an operation other than a call to hasher the function has no effect.

Notes:

The standard is fairly vague on the meaning of the hint. But the only practical way to use it, and the only way that Boost.Unordered supports is to point to an existing element with the same value.

Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.

Pointers and references to elements are never invalidated.

template<typename InputIterator>
  void insert(InputIterator first, InputIterator last);

Inserts a range of elements into the container. Elements are inserted if and only if there is no element in the container with an equivalent value.

<col align="left" valign="top">

Requires:

value_type is EmplaceConstructible into
                  X from *first.

Throws:

When inserting a single element, if an exception is thrown by an operation other than a call to hasher the function has no effect.

Notes:

Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.

Pointers and references to elements are never invalidated.

iterator erase(const_iterator position);

Erase the element pointed to by position.

<col align="left" valign="top">

Returns:

The iterator following position before the erasure.

Throws:

Only throws an exception if it is thrown by hasher or key_equal.

Notes:

                  In older versions this could be inefficient because it had to search
                  through several buckets to find the position of the returned iterator.
                  The data structure has been changed so that this is no longer the case,
                  and the alternative erase methods have been deprecated.

size_type erase(key_type const& k);

Erase all elements with key equivalent to k.

<col align="left" valign="top">

Returns:

The number of elements erased.

Throws:

Only throws an exception if it is thrown by hasher or key_equal.

iterator erase(const_iterator first, const_iterator last);

Erases the elements in the range from first to last.

<col align="left" valign="top">

Returns:

The iterator following the erased elements - i.e. last.

Throws:

Only throws an exception if it is thrown by hasher or key_equal.

In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.

void quick_erase(const_iterator position);

Erase the element pointed to by position.

<col align="left" valign="top">

Throws:

Only throws an exception if it is thrown by hasher or key_equal.

In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.

Notes:

                  This method was implemented because returning an iterator to
                  the next element from erase was expensive, but
                  the container has been redesigned so that is no longer the
                  case. So this method is now deprecated.

void erase_return_void(const_iterator position);

Erase the element pointed to by position.

<col align="left" valign="top">

Throws:

Only throws an exception if it is thrown by hasher or key_equal.

In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.

Notes:

                  This method was implemented because returning an iterator to
                  the next element from erase was expensive, but
                  the container has been redesigned so that is no longer the
                  case. So this method is now deprecated.

void clear();

Erases all elements in the container.

<col align="left" valign="top">

Postconditions:

size() == 0

Throws:

Never throws an exception.

void swap(unordered_set&);

Swaps the contents of the container with the parameter.

If Allocator::propagate_on_container_swap is declared and
                  Allocator::propagate_on_container_swap::value is true then the
                  containers' allocators are swapped. Otherwise, swapping with unequal allocators
                  results in undefined behavior.

<col align="left" valign="top">

Throws:

Doesn't throw an exception unless it is thrown by the copy constructor or copy assignment operator of key_equal or hasher.

Notes:

The exception specifications aren't quite the same as the C++11 standard, as
                  the equality predieate and hash function are swapped using their copy constructors.

unordered_set observers

hasher hash_function() const;

<col align="left" valign="top">

Returns:

The container's hash function.

key_equal key_eq() const;

<col align="left" valign="top">

Returns:

The container's key equality predicate.

unordered_set lookup

iterator find(key_type const& k);
const_iterator find(key_type const& k) const;
template<typename CompatibleKey, typename CompatibleHash,
         typename CompatiblePredicate>
  iterator find(CompatibleKey const& k, CompatibleHash const& hash,
                CompatiblePredicate const& eq);
template<typename CompatibleKey, typename CompatibleHash,
         typename CompatiblePredicate>
  const_iterator
  find(CompatibleKey const& k, CompatibleHash const& hash,
       CompatiblePredicate const& eq) const;

<col align="left" valign="top">

Returns:

An iterator pointing to an element with key equivalent to k, or b.end() if no such element exists.

Notes:

                The templated overloads are a non-standard extensions which
                allows you to use a compatible hash function and equality
                predicate for a key of a different type in order to avoid
                an expensive type cast. In general, its use is not encouraged.

size_type count(key_type const& k) const;

<col align="left" valign="top">

Returns:

The number of elements with key equivalent to k.

std::pair<iterator, iterator> equal_range(key_type const& k);
std::pair<const_iterator, const_iterator> equal_range(key_type const& k) const;

<col align="left" valign="top">

Returns:

A range containing all elements with key equivalent to k.
                  If the container doesn't container any such elements, returns
                  std::make_pair(b.end(),b.end()).

unordered_set bucket interface

size_type bucket_count() const;

<col align="left" valign="top">

Returns:

The number of buckets.

size_type max_bucket_count() const;

<col align="left" valign="top">

Returns:

An upper bound on the number of buckets.

size_type bucket_size(size_type n) const;

<col align="left" valign="top">

Requires:

n < bucket_count()

Returns:

The number of elements in bucket n.

size_type bucket(key_type const& k) const;

<col align="left" valign="top">

Returns:

The index of the bucket which would contain an element with key k.

Postconditions:

The return value is less than bucket_count()

local_iterator begin(size_type n);
const_local_iterator begin(size_type n) const;

<col align="left" valign="top">

Requires:

n shall be in the range [0, bucket_count()).

Returns:

A local iterator pointing the first element in the bucket with index n.

local_iterator end(size_type n);
const_local_iterator end(size_type n) const;

<col align="left" valign="top">

Requires:

n shall be in the range [0, bucket_count()).

Returns:

A local iterator pointing the 'one past the end' element in the bucket with index n.

const_local_iterator cbegin(size_type n) const;

<col align="left" valign="top">

Requires:

n shall be in the range [0, bucket_count()).

Returns:

A constant local iterator pointing the first element in the bucket with index n.

const_local_iterator cend(size_type n);

<col align="left" valign="top">

Requires:

n shall be in the range [0, bucket_count()).

Returns:

A constant local iterator pointing the 'one past the end' element in the bucket with index n.

unordered_set hash policy

float load_factor() const;

<col align="left" valign="top">

Returns:

The average number of elements per bucket.

float max_load_factor() const;

<col align="left" valign="top">

Returns:

Returns the current maximum load factor.

void max_load_factor(float z);

<col align="left" valign="top">

Effects:

Changes the container's maximum load factor, using z as a hint.

void rehash(size_type n);

Changes the number of buckets so that there at least n buckets, and so that the load factor is less than the maximum load factor.

Invalidates iterators, and changes the order of elements. Pointers and references to elements are not invalidated.

<col align="left" valign="top">

Throws:

The function has no effect if an exception is thrown, unless it is thrown by the container's hash function or comparison function.

void reserve(size_type n);

Invalidates iterators, and changes the order of elements. Pointers and references to elements are not invalidated.

<col align="left" valign="top">

Throws:

The function has no effect if an exception is thrown, unless it is thrown by the container's hash function or comparison function.

unordered_set Equality Comparisons

template<typename Value, typename Hash, typename Pred, typename Alloc>
  bool operator==(unordered_set<Value, Hash, Pred, Alloc> const& x,
                  unordered_set<Value, Hash, Pred, Alloc> const& y);

Return true if x.size() ==
                y.size and for every element in x,
                there is an element in y with the same
                for the same key, with an equal value (using
                operator== to compare the value types).

<col align="left" valign="top">

Notes:

The behavior of this function was changed to match
                  the C++11 standard in Boost 1.48.

Behavior is undefined if the two containers don't have
                    equivalent equality predicates.

template<typename Value, typename Hash, typename Pred, typename Alloc>
  bool operator!=(unordered_set<Value, Hash, Pred, Alloc> const& x,
                  unordered_set<Value, Hash, Pred, Alloc> const& y);

Return false if x.size() ==
                y.size and for every element in x,
                there is an element in y with the same
                for the same key, with an equal value (using
                operator== to compare the value types).

<col align="left" valign="top">

Notes:

The behavior of this function was changed to match
                  the C++11 standard in Boost 1.48.

Behavior is undefined if the two containers don't have
                    equivalent equality predicates.

unordered_set swap

template<typename Value, typename Hash, typename Pred, typename Alloc>
  void swap(unordered_set<Value, Hash, Pred, Alloc>& x,
            unordered_set<Value, Hash, Pred, Alloc>& y);

Swaps the contents of x and y.

If Allocator::propagate_on_container_swap is declared and
                  Allocator::propagate_on_container_swap::value is true then the
                  containers' allocators are swapped. Otherwise, swapping with unequal allocators
                  results in undefined behavior.

<col align="left" valign="top">

Effects:

x.swap(y)

Throws:

Doesn't throw an exception unless it is thrown by the copy constructor or copy assignment operator of key_equal or hasher.

Notes:

The exception specifications aren't quite the same as the C++11 standard, as
                  the equality predieate and hash function are swapped using their copy constructors.

Copyright © 2003, 2004 Jeremy B. Maitin-Shepard
Copyright © 2005-2008 Daniel
      James

        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)


text:
'use strict';

/**
 * Module dependencies.
 */
var db = require('../../config/sequelize');

var log = function(inst) {
    console.dir( inst.get() );
};

exports.search = function(req, res, next) {
    // set query parameter to wildcard if field not supplied
    var params = [req.query.sid, req.query.fname, req.query.lname];
    for (var i = 0, l = params.length; i < l; i++) {
        if( params[i] === undefined || params[i] === '') {
            params[i] = '%';
        }
    }

    var query_sid = "subjectID LIKE '" + params[0] + "' AND ";
    var query_fname = "firstname LIKE '" + params[1] + "' AND ";
    var query_lname = "lastname LIKE '" + params[2] + "'";

    var query = query_sid + query_fname + query_lname;

    db.subject.findAll({where: [query]}).then(function(data) {
        data.forEach(log);
        if(data === {} ) { res.send("No results found"); }
        else { res.send(data); }
    });
};


text:
package com.twitter.server.view
import com.twitter.finagle.client.{ClientInfo, ClientModuleInfo}

private[server] trait View

private[server] object ViewUtils {
  def mapParams(params:  Map[String, String]) =
    params.toList map {
      case (k, v) => Map("key" -> k, "value" -> pretty(v))
    }

  // Strip extraneous symbols from toString'd objects
  private[this] def pretty(value: String): String =
    """.+\.([\w]+)[$|@]""".r.findFirstMatchIn(value) match {
      case Some(name) => name.group(1)
      case _ => """\((.+)\)""".r.findFirstMatchIn(value) match {
        case Some(name) => name.group(1)
        case _ => value
      }
  }
}

private[server] class ClientInfoView(client: ClientInfo) extends View {
  val name = client.name
  val modules = client.modules.toList map {
    case ClientModuleInfo(role, description, perModuleParams) =>
      Map("role" -> role, "description" -> description, "perModuleParams" ->
        ViewUtils.mapParams(perModuleParams))
  }
}

private[server] class ClientListView(val clients: List[String], val baseUrl: String) extends View


text:
  We recommend the following hotels.

  For more choice consult  the webpage of Zurich tourism.

  To profit from the reservations and the special prices printed below, please use the keyword LISA Conference 2016 while booking and book before the deadline.
  Rates are in CHF and include city tax.
  If two rates are given, then the first is the weekend price, the second for during the week.
  The number in brackets after the room type show the total of available rooms
  (Not the number of free rooms left).

  Please make sure to book way in advance.

  September is a crowded time in Zurich and Hotels are likely to book out very early.

<?php /*
Link to edit the map:
    http://umap.openstreetmap.fr/en/map/anonymous-edit/78775%3AQazSqz7NxNtECK5cabetfRbeKfU
*/ ?>

        See full screen

<?php

$hotels = csv_to_array('data/hotels.csv');

foreach ($hotels as $hotel) {
    #var_dump($hotel);
    if (!$hotel['show']=="Y") {continue;}

    $shorttel = str_replace(' ', '', $hotel['tel']);
    $img = (isset($hotel['img']) && $hotel['img']) ? $hotel['img'] : 'generic_hotel.jpg';

    echo "
\n";
    echo "  \n";
    echo "    \n";

    if ($hotel['aircon'] === 'Y') {
        echo "    \n";
    }
    if ($hotel['wifi'] === 'Y') {
        echo "    \n";
    }
    if ($hotel['breakfast'] === 'Y') {
        echo "    \n";
    }
    echo "  \n";
    echo "
{$hotel['name']}
\n";
    echo "
\n";
    if (isset($hotel['street'])) { echo "    {$hotel['street']}
\n"; }
    if (isset($hotel['loc']))    { echo "    {$hotel['loc']}\n"; }
    echo "
\n";

    echo "
";
    if (isset($hotel['url']))   { echo "  {$hotel['url']}\n"; }
    if (isset($hotel['email'])) { echo "  {$hotel['email']}\n"; }
    if (isset($hotel['tel']))   { echo "  {$hotel['tel']}\n"; }
    echo "
";

    if (isset($hotel['name1']) && $hotel['name1'] ) {
        echo "
\n";
        echo "    {$hotel['name1']} ({$hotel['nr1']})\n";
        echo "    {$hotel['rates1']}\n";
        echo "
\n";
    }
    if (isset($hotel['name2']) && $hotel['name2'] ) {
        echo "
\n";
        echo "    {$hotel['name2']} ({$hotel['nr2']})\n";
        echo "    {$hotel['rates2']}\n";
        echo "
\n";
    }
    echo "
\n";
    echo "        Deadline:\n";
    echo "        {$hotel['deadline']}\n";
    echo "
\n";
    echo "
\n";
}
?>


text:
import java.util.*;

public abstract class ServiceWrapper {

  public String name;
  public boolean nsIn;
  public boolean nsOut;

  public ServiceWrapper(boolean nsIn, boolean nsOut) {
    this.nsIn = nsIn;
    this.nsOut = nsOut;
  }

  public boolean run(ArrayList<String> args, ArrayList<String> argNames, String resultQueue) {
    return true;
  }
}


text:
package org.apache.sis.referencing.cs;

import java.util.Map;
import org.opengis.referencing.cs.AxisDirection;
import org.apache.sis.measure.Units;

import static java.util.Collections.singletonMap;
import static org.opengis.referencing.IdentifiedObject.NAME_KEY;
import static org.apache.sis.referencing.IdentifiedObjects.getProperties;

/**
 * Collection of coordinate systems for testing purpose.
 *
 * @author  Martin Desruisseaux (Geomatys)
 * @version 0.8
 * @since   0.4
 * @module
 */
public final strictfp class HardCodedCS {
    /**
     * A two-dimensional ellipsoidal CS with
     * <var>{@linkplain HardCodedAxes#GEODETIC_LATITUDE geodetic latitude}</var>,
     * <var>{@linkplain HardCodedAxes#GEODETIC_LONGITUDE geodetic longitude}</var>
     * axes in decimal degrees.
     */
    public static final DefaultEllipsoidalCS GEODETIC_φλ = new DefaultEllipsoidalCS(
            singletonMap(NAME_KEY, "Geodetic 2D (φ,λ)"),
            HardCodedAxes.GEODETIC_LATITUDE,
            HardCodedAxes.GEODETIC_LONGITUDE);

    /**
     * A two-dimensional ellipsoidal CS with
     * <var>{@linkplain HardCodedAxes#GEODETIC_LONGITUDE geodetic longitude}</var>,
     * <var>{@linkplain HardCodedAxes#GEODETIC_LATITUDE geodetic latitude}</var>
     * axes in decimal degrees.
     */
    public static final DefaultEllipsoidalCS GEODETIC_2D = new DefaultEllipsoidalCS(
            singletonMap(NAME_KEY, "Geodetic 2D"),
            HardCodedAxes.GEODETIC_LONGITUDE,
            HardCodedAxes.GEODETIC_LATITUDE);

    /**
     * A three-dimensional ellipsoidal CS with
     * <var>{@linkplain HardCodedAxes#GEODETIC_LONGITUDE geodetic longitude}</var>,
     * <var>{@linkplain HardCodedAxes#GEODETIC_LATITUDE geodetic latitude}</var>,
     * <var>{@linkplain HardCodedAxes#ELLIPSOIDAL_HEIGHT ellipsoidal height}</var>
     * axes.
     */
    public static final DefaultEllipsoidalCS GEODETIC_3D = new DefaultEllipsoidalCS(
            singletonMap(NAME_KEY, "Geodetic 3D"),
            HardCodedAxes.GEODETIC_LONGITUDE,
            HardCodedAxes.GEODETIC_LATITUDE,
            HardCodedAxes.ELLIPSOIDAL_HEIGHT);

    /**
     * A two-dimensional ellipsoidal CS with
     * <var>{@linkplain HardCodedAxes#LONGITUDE_gon longitude}</var>,
     * <var>{@linkplain HardCodedAxes#LATITUDE_gon latitude}</var>
     * axes (without "Geodetic" prefix) in gradians.
     *
     *
This coordinate system is used for testing unit conversions without axes swapping.

     */
    public static final DefaultEllipsoidalCS ELLIPSOIDAL_gon = new DefaultEllipsoidalCS(
            singletonMap(NAME_KEY, "Ellipsoidal (gon)"),
            HardCodedAxes.LONGITUDE_gon,
            HardCodedAxes.LATITUDE_gon);

    /**
     * A three-dimensional spherical CS for geodetic use with
     * <var>{@linkplain HardCodedAxes#SPHERICAL_LATITUDE latitude}</var>,
     * <var>{@linkplain HardCodedAxes#SPHERICAL_LONGITUDE longitude}</var>,
     * <var>{@linkplain HardCodedAxes#GEOCENTRIC_RADIUS radius}</var> axes.
     * This axis order is the one of EPSG:6404.
     * Note that this is not a right-handed system.
     *
     * @see #SPHERICAL_ENGINEERING
     */
    public static final DefaultSphericalCS SPHERICAL = new DefaultSphericalCS(
            singletonMap(NAME_KEY, "Spherical"),
            HardCodedAxes.SPHERICAL_LATITUDE,
            HardCodedAxes.SPHERICAL_LONGITUDE,
            HardCodedAxes.GEOCENTRIC_RADIUS);

    /**
     * A three-dimensional spherical CS for geodetic use with
     * <var>{@linkplain HardCodedAxes#DISTANCE distance}</var>,
     * <var>{@linkplain HardCodedAxes#BEARING bearing}</var>,
     * <var>{@linkplain HardCodedAxes#ELEVATION elevation}</var> axes.
     */
    public static final DefaultSphericalCS SPHERICAL_ENGINEERING = new DefaultSphericalCS(
            singletonMap(NAME_KEY, SPHERICAL.getName()),
            HardCodedAxes.DISTANCE,
            HardCodedAxes.BEARING,
            HardCodedAxes.ELEVATION);

    /**
     * A three-dimensional Cartesian CS with geocentric
     * <var>{@linkplain HardCodedAxes#GEOCENTRIC_X x}</var>,
     * <var>{@linkplain HardCodedAxes#GEOCENTRIC_Y y}</var>,
     * <var>{@linkplain HardCodedAxes#GEOCENTRIC_Z z}</var>
     * axes in metres.
     */
    public static final DefaultCartesianCS GEOCENTRIC = new DefaultCartesianCS(
            singletonMap(NAME_KEY, "Geocentric"),
            HardCodedAxes.GEOCENTRIC_X,
            HardCodedAxes.GEOCENTRIC_Y,
            HardCodedAxes.GEOCENTRIC_Z);

    /**
     * A three-dimensional cylindrical CS with
     * <var>{@linkplain HardCodedAxes#DISTANCE distance}</var>,
     * <var>{@link HardCodedAxes#BEARING bearing}</var>,
     * <var>{@linkplain HardCodedAxes#Z z}</var> axes.
     * Note that this is not a right-handed system.
     *
     * @since 0.7
     */
    public static final DefaultCylindricalCS CYLINDRICAL = new DefaultCylindricalCS(
            singletonMap(NAME_KEY, "Cylindrical"),
            HardCodedAxes.DISTANCE,
            HardCodedAxes.BEARING,
            HardCodedAxes.Z);

    /**
     * A three-dimensional polar CS with
     * <var>{@linkplain HardCodedAxes#DISTANCE distance}</var>,
     * <var>{@link HardCodedAxes#BEARING bearing}</var> axes.
     * Note that this is not a right-handed system.
     *
     * @since 0.7
     */
    public static final DefaultPolarCS POLAR = new DefaultPolarCS(
            singletonMap(NAME_KEY, "Polar"),
            HardCodedAxes.DISTANCE,
            HardCodedAxes.BEARING);

    /**
     * A two-dimensional Cartesian CS with
     * <var>{@linkplain HardCodedAxes#EASTING Easting}</var>,
     * <var>{@linkplain HardCodedAxes#NORTHING Northing}</var>
     * axes in metres.
     */
    public static final DefaultCartesianCS PROJECTED = new DefaultCartesianCS(
            singletonMap(NAME_KEY, "Projected"),
            HardCodedAxes.EASTING,
            HardCodedAxes.NORTHING);

    /**
     * A three-dimensional Cartesian CS with
     * <var>{@linkplain HardCodedAxes#EASTING Easting}</var>,
     * <var>{@linkplain HardCodedAxes#NORTHING Northing}</var>
     * <var>{@linkplain HardCodedAxes#ELLIPSOIDAL_HEIGHT Height}</var>
     * axes in metres.
     */
    public static final DefaultCartesianCS PROJECTED_3D = new DefaultCartesianCS(
            singletonMap(NAME_KEY, "Projected"),
            HardCodedAxes.EASTING,
            HardCodedAxes.NORTHING,
            HardCodedAxes.ELLIPSOIDAL_HEIGHT);

    /**
     * A two-dimensional Cartesian CS with
     * <var>{@linkplain HardCodedAxes#X x}</var>,
     * <var>{@linkplain HardCodedAxes#Y y}</var>
     * axes in metres.
     */
    public static final DefaultCartesianCS CARTESIAN_2D = new DefaultCartesianCS(
            singletonMap(NAME_KEY, "Cartesian 2D"),
            HardCodedAxes.X,
            HardCodedAxes.Y);

    /**
     * A three-dimensional Cartesian CS with
     * <var>{@linkplain HardCodedAxes#X x}</var>,
     * <var>{@linkplain HardCodedAxes#Y y}</var>,
     * <var>{@linkplain HardCodedAxes#Z z}</var>
     * axes in metres.
     */
    public static final DefaultCartesianCS CARTESIAN_3D = new DefaultCartesianCS(
            singletonMap(NAME_KEY, "Cartesian 3D"),
            HardCodedAxes.X,
            HardCodedAxes.Y,
            HardCodedAxes.Z);

    /**
     * A two-dimensional Cartesian CS with
     * <var>{@linkplain HardCodedAxes#COLUMN column}</var>,
     * <var>{@linkplain HardCodedAxes#ROW row}</var>
     * axes.
     */
    public static final DefaultCartesianCS GRID = new DefaultCartesianCS(
            singletonMap(NAME_KEY, "Grid"),
            HardCodedAxes.COLUMN,
            HardCodedAxes.ROW);

    /**
     * A two-dimensional Cartesian CS with
     * <var>{@linkplain HardCodedAxes#DISPLAY_X display x}</var>,
     * <var>{@linkplain HardCodedAxes#DISPLAY_Y display y}</var>
     * axes.
     */
    public static final DefaultCartesianCS DISPLAY = new DefaultCartesianCS(
            singletonMap(NAME_KEY, "Display"),
            HardCodedAxes.DISPLAY_X,
            HardCodedAxes.DISPLAY_Y);

    /**
     * A one-dimensional vertical CS with
     * <var>{@linkplain HardCodedAxes#ELLIPSOIDAL_HEIGHT ellipsoidal height}</var>
     * axis in metres.
     */
    public static final DefaultVerticalCS ELLIPSOIDAL_HEIGHT = new DefaultVerticalCS(
            getProperties(HardCodedAxes.ELLIPSOIDAL_HEIGHT), HardCodedAxes.ELLIPSOIDAL_HEIGHT);

    /**
     * A one-dimensional vertical CS with
     * <var>{@linkplain HardCodedAxes#ELLIPSOIDAL_HEIGHT ellipsoidal height}</var>
     * axis in centimetres.
     *
     * @since 0.7
     */
    public static final DefaultVerticalCS ELLIPSOIDAL_HEIGHT_cm = new DefaultVerticalCS(
            getProperties(HardCodedAxes.ELLIPSOIDAL_HEIGHT_cm), HardCodedAxes.ELLIPSOIDAL_HEIGHT_cm);

    /**
     * A one-dimensional vertical CS with
     * <var>{@linkplain HardCodedAxes#GRAVITY_RELATED_HEIGHT gravity-related height}</var>
     * axis in metres.
     */
    public static final DefaultVerticalCS GRAVITY_RELATED_HEIGHT = new DefaultVerticalCS(
            getProperties(HardCodedAxes.GRAVITY_RELATED_HEIGHT), HardCodedAxes.GRAVITY_RELATED_HEIGHT);

    /**
     * A one-dimensional vertical CS with
     * <var>{@linkplain HardCodedAxes#DEPTH depth}</var>
     * axis in metres.
     */
    public static final DefaultVerticalCS DEPTH = new DefaultVerticalCS(
            getProperties(HardCodedAxes.DEPTH), HardCodedAxes.DEPTH);

    /**
     * A one-dimensional temporal CS with
     * <var>{@linkplain HardCodedAxes#TIME time}</var>,
     * axis in {@linkplain Units#DAY day} units.
     */
    public static final DefaultTimeCS DAYS;

    /**
     * A one-dimensional temporal CS with
     * <var>{@linkplain HardCodedAxes#TIME time}</var>,
     * axis in {@linkplain Units#SECOND second} units.
     */
    public static final DefaultTimeCS SECONDS;

    /**
     * A one-dimensional temporal CS with
     * <var>{@linkplain HardCodedAxes#TIME time}</var>,
     * axis in millisecond units.
     */
    public static final DefaultTimeCS MILLISECONDS;
    static {
        final Map<String,?> properties = getProperties(HardCodedAxes.TIME);
        DAYS         = new DefaultTimeCS(properties, HardCodedAxes.TIME);
        SECONDS      = new DefaultTimeCS(properties, new DefaultCoordinateSystemAxis(properties, "t", AxisDirection.FUTURE, Units.SECOND));
        MILLISECONDS = new DefaultTimeCS(properties, new DefaultCoordinateSystemAxis(properties, "t", AxisDirection.FUTURE, Units.MILLISECOND));
    }

    /**
     * Do not allow instantiation of this class.
     */
    private HardCodedCS() {
    }
}


text:
<Record>
<Term>Gadoversetamide</Term>
<SemanticType>Pharmacologic Substance</SemanticType>
<SemanticType>Organic Chemical</SemanticType>
<ParentTerm>Diagnostic Reagent</ParentTerm>
<ClassificationPath>Chemicals_and_Drugs_Kind/Drug, Food, Chemical or Biomedical Material/Biomedical Material/Reagent/Diagnostic Reagent/Gadoversetamide</ClassificationPath>
<BroaderTerm>Chemicals_and_Drugs_Kind</BroaderTerm>
<BroaderTerm>Reagent</BroaderTerm>
<BroaderTerm>Diagnostic Reagent</BroaderTerm>
<BroaderTerm>Biomedical Material</BroaderTerm>
<BroaderTerm>Gadoversetamide</BroaderTerm>
<BroaderTerm>Drug, Food, Chemical or Biomedical Material</BroaderTerm>
<Synonym>GADOVERSETAMIDE</Synonym>
<Synonym>Optimark</Synonym>
<Synonym>Gadoversetamide</Synonym>
<Synonym>Optimark in plastic container</Synonym>
<Description>A paramagnetic extracellular magnetic resonance imaging (MRI) contrast agent that facilitates visualization of abnormal vascularity. When placed in a magnetic field, gadoversetamide decreases T1 (spin-lattice or longitudinal relaxation time) and T2 (spin-spin or transverse relaxation time) values in tissues where it accumulates. At the recommended dose, the effect is primarily on T1 relaxation time, and produces an increase in signal intensity. Gadoversetamide does not cross the intact blood-brain barrier. However, abnormal vascularity or disruption of the blood-brain barrier allows accumulation of gadoversetamide. (NCI05)</Description>
<Source>FDA Registry</Source>
<Source>NCI Thesaurus</Source>
</Record>


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Pay
{
    /// <summary>
    /// 提供即时到帐功能。
    /// </summary>
    public interface IDirectPay
    {
        /// <summary>
        /// 创建并返回即时到帐 Url。
        /// </summary>
        /// <param name="out_trade_no">商户订单号。</param>
        /// <param name="subject">商品名称。</param>
        /// <param name="body">商品描述。</param>
        /// <param name="total_fee">订单总金额。</param>
        /// <param name="clientIPAddress">用户 IP。</param>
        /// <returns></returns>
        string CreateUrl(string out_trade_no, string subject, string body,
            double total_fee, string clientIPAddress);
    }
}


text:
import requests
import json

url = "http://marsweather.ingenology.com/v1/archive/"
weather_data_list = []

while url!=None:

	response = requests.get(url)
	jsondata = response.json()
	elems = jsondata[u'results']

	for elem in elems:
		weather_data_list.append(elem)

	url=jsondata[u'next']

with open('jsonfile.txt', 'w') as outfile:
	json.dump(weather_data_list, outfile, sort_keys=True, indent=4, ensure_ascii=False)


text:
class AssetCalculator
  TAX_ALIQUOT = {
    'common'   => BigDecimal('0.15'),
    'daytrade' => BigDecimal('0.20'),
    'fii'      => BigDecimal('0.20'),
  }

  IRRF_ALIQUOT = {
    'common'   => BigDecimal('0.15'),
    'daytrade' => BigDecimal('0.20'),
  }

  attr_accessor :session, :logs, :assets, :tax

  def initialize(session)
    self.session   = session
    self.logs      = []
    self.assets    = Asset::TYPE.values.map { |asset_class| [asset_class, {}] }.to_h
    self.tax       = TaxCalculator.new(session, self)
  end

  def calculate_and_save
    last_order_year = nil
    session.orders.order(:ordered_at).order_by_type.each do |order|
      if last_order_year && last_order_year != order.ordered_at.year
        save_assets_at_end_of_year(last_order_year, order.ordered_at.year - 1)
      end
      last_order_year = order.ordered_at.year
      case order.order_type
      when Order::TYPE['compra']
        compra(order)
      when Order::TYPE['venda']
        venda(order)
      when Order::TYPE['conversao']
        conversao(order)
      when Order::TYPE['compensacao']
        compensacao(order)
      when Order::TYPE['isencao']
        isencao(order)
      when Order::TYPE['semisencao']
        semisencao(order)
      end
    end
    save_assets_at_end_of_year(last_order_year, Date.today.year)
    save_assets
    tax.calculate_and_save
    save_logs
  end

  def save_assets_at_end_of_year(year_first, year_last)
    (year_first..year_last).each do |year|
      AssetsEndOfYear.create!(session_id: session.id, year: year, assets: assets)
    end
  end

  def save_assets
    assets.each do |asset_class, asset_class_assets|
      asset_class_assets.each do |asset_name, asset_values|
        next if asset_values['quantity'] == 0
        asset = Asset.create(
          session_id:     session.id,
          asset_class:    asset_class,
          name:           asset_name,
          quantity:       asset_values['quantity'],
          price:          asset_values['price'],
          current_price:  asset_values['price'],
          value:          asset_values['price'] * asset_values['quantity'],
          current_value:  asset_values['price'] * asset_values['quantity'],
          profit:         0,
          last_order_at:  asset_values['last_order_at'],
        )
        if asset.errors.any?
          logs << "Falha ao salvar posição em ativo. #{asset.errors.full_messages.join(', ')}"
        end
      end
    end
  end

  def save_logs
    (logs + tax.logs).sort.uniq.each do |log|
      SessionLog.create!(session_id: session.id, message: log)
    end
  end

  def compra(order)
    asset = asset_for(order)

    if asset['quantity'] >= 0
      # increase long allocation
      asset['price']          = (asset['quantity'] * asset['price'] + order.quantity * order.price_considering_costs) / (asset['quantity'] + order.quantity)
      asset['quantity']       += order.quantity

    elsif order.quantity <= asset['quantity'].abs
      # reduce short allocation
      tax.add_entry(order, asset)
      asset['quantity']       += order.quantity

    else
      # from short to long
      tax.add_entry(order, asset)
      asset['quantity']       += order.quantity
      asset['price']          = order.price_considering_costs
    end

    asset['last_order_at']    = order.ordered_at

    tax.add_trade(order)
  end

  def venda(order)
    asset = asset_for(order)
    tax.tax_for(order, asset)[0]['sales'] += (order.quantity * order.price)

    if asset['quantity'] <= 0
      # increase short allocation
      asset['price']          = (asset['quantity'].abs * asset['price'] + order.quantity * order.price_considering_costs) / (asset['quantity'].abs + order.quantity)
      asset['quantity']       -= order.quantity

    elsif order.quantity <= asset['quantity']
      # reduce long allocation
      tax.add_entry(order, asset)
      asset['quantity']       -= order.quantity

    else
      # from long to short
      tax.add_entry(order, asset)
      asset['quantity']       -= order.quantity
      asset['price']          = order.price_considering_costs
    end

    asset['last_order_at']    = order.ordered_at

    tax.add_trade(order)
  end

  def conversao(order)
    asset = asset_for('asset_class' => order.asset_class, 'name' => order.name)
    return if asset['quantity'] == 0

    # calculate price and quantity after conversion
    ratio    = order.new_quantity / order.old_quantity
    price    = asset['price'] / ratio
    quantity = (asset['quantity'] * ratio).to_i

    # reset (get rid of) the old asset
    asset['quantity'] = 0
    asset['price']    = 0

    # update the new asset (the one after conversion)
    new_asset = asset_for('asset_class' => order.asset_class, 'name' => order.new_name)
    new_asset['price']         = (new_asset['quantity']*new_asset['price'] + quantity * price)/(new_asset['quantity'] + quantity)
    new_asset['quantity']      += quantity
    new_asset['last_order_at'] = [asset['last_order_at'], new_asset['last_order_at']].max
  end

  def compensacao(order)
    tax.compensacoes[order.ordered_at.beginning_of_month] = {
      'common'          => order.accumulated_common,
      'daytrade'        => order.accumulated_daytrade,
      'fii'             => order.accumulated_fii,
      'irrf_common'     => order.accumulated_irrf, # consider IRRF for common
      'irrf_daytrade'   => 0,
      'irrf_fii'        => 0,
    }
  end

  def isencao(order)
    tax.isencoes["#{order.asset_class}-#{order.name}"] = true
  end

  def semisencao(order)
    tax.isencoes.delete("#{order.asset_class}-#{order.name}")
  end

  private
    def asset_for(options)
      asset_class = options['asset_class'] || options['order'].try(:asset_class)
      order_name = options['name'] || options['order'].try(:name)
      assets[asset_class][order_name] ||= {
        'quantity'      => 0,
        'price'         => 0,
        'last_order_at' => Date.new(1890, 8, 23)
      }
    end
end