text:
@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (-webkit-min-device-pixel-ratio: 2)
{

    .esriCTTdHeaderSearch
    {
        background-image: url("../images/img2X/search@2X.png") !important;
    }
    .esriCTTdHeaderSearch-select
    {
        background-image: url("../images/img2X/search-select@2X-green.png") !important;
    }
    .esriCTHelpImg
    {
        background-image: url("../images/img2X/help@2X.png") !important;
    }
    .esriCTTdGeolocation
    {
        background-image: url("../images/img2X/geo-location@2x.png") !important;
    }
    .esriCTImgSocialMedia
    {
        background-image: url("../images/img2X/share@2X.png") !important;
    }

    .esriCTImgSocialMedia-select
    {
        background-image: url("../images/img2X/share-select@2X-green.png") !important;
    }
    .esriCTRouteImg
    {
        background-image: url("../images/img2X/get-route@2x.png") !important;
    }

    .esriCTRouteImg-select
    {
        background-image: url("../images/img2X/get-route-select@2x-green.png") !important;
    }

    .esriCTDirectionRefreshButton
    {
        background-image: url("../images/refresh-route-green.png") !important;
    }
    .facebook
    {
        background-image: url("../images/img2X/img_twitter@2x-green.png") !important;
    }

    .twitter
    {
        background-image: url("../images/img2X/img_twitter@2x-green.png") !important;
    }

    .email
    {
        background-image: url("../images/img2X/img-email@2x-green.png") !important;
    }

}

@media screen and (max-width: 1024px)
{
    .esriCTTdHeaderSearch
    {
        background-image: url("../images/img44x44/search.png") !important;
    }
    .esriCTTdHeaderSearch-select
    {
        background-image: url("../images/img44x44/search-select-green.png") !important;
    }
    .esriCTHelpImg
    {
        background-image: url("../images/img44x44/Help.png") !important;
    }

    .esriCTTdGeolocation
    {
        background-image: url("../images/img44x44/imgGeolocation.png") !important;
    }

    .esriCTImgSocialMedia
    {
        background-image: url("../images/img44x44/imgSocialMedia.png") !important;
    }
    .esriCTImgSocialMedia-select
    {
        background-image: url("../images/img44x44/imgSocialMedia-select-green.png") !important;
    }
    .esriCTRouteImg
    {
        background-image: url("../images/img44x44/get-route.png") !important;
    }
    .esriCTRouteImg-select
    {
        background-image: url("../images/img44x44/get-route-select-green.png") !important;
    }
    .facebook
    {
        background-image: url("../images/img44x44/img_facebook_green.png") !important;
    }

    .twitter
    {
        background-image: url("../images/img44x44/img_twitter_green.png") !important;
    }

    .email
    {
        background-image: url("../images/img44x44/img_email_green.png") !important;
    }
    .embedding
    {
        background-image: url("../images/img44x44/embedding_green.png") !important;
    }
}

/*main browser theme*/
.esriCTTdHeaderSearch
{
    background-image: url("../images/img24x24/search-24.png");
}
.esriCTHelpImg
{
    background-image: url("../images/img24x24/Help-24.png");
}

.esriCTTdHeaderSearch-select
{
    background-image: url("../images/img24x24/search-select-green-24.png");
}
.esriCTTdGeolocation
{
    background-image: url("../images/img24x24/imgGeolocation-24.png");
}
.esriCTImgSocialMedia-select
{
    background-image: url("../images/img24x24/imgSocialMedia_green-24.png");
}
.esriCTImgSocialMedia
{
    background-image: url("../images/img24x24/imgSocialMedia-24.png");
}
.esriCTRouteImg
{
    background-image: url("../images/img24x24/get-route-24.png");
}
.esriCTRouteImg-select
{
    background-image: url("../images/img24x24/get-route-select-green-24.png");
}
.facebook
{
    background-image: url("../images/img24x24/img_facebook_green-24.png");
}

.twitter
{
    background-image: url("../images/img24x24/img_twitter_green-24.png");
}

.email
{
    background-image: url("../images/img24x24/img_email_green-24.png");
}
.embedding
{
    background-image: url("../images/img24x24/embedding_green-24.png");
}

.locateSearchicon
{
    background-image: url("../images/search-green.png") !important;
}
.simpleDirections .esriStopsReverse
{
    background: url("../images/direction-green.png") !important;
}
.infoTitleArrow
{
    background-image: url("../images/right-arrow-blue-green.png");
}
.infoBackTiteArrow
{
    background-image: url("../images/blue-arrow-green.png");
}
.esriCTdivInfoRightArrow
{
    background: url("../images/right-arrow-blue-green.png");
}
.esriCTdivInfoLeftArrow
{
    background: url("../images/blue-arrow-green.png");
}
.esriCTRightArrow
{
    background-image: url("../images/right-green_Legend-arrow.png");
    background-repeat: no-repeat;
    background-position: center center;
}
.esriCTLeftArrow
{
    background-image: url('../images/left-green_Legend-arrow.png');
    background-repeat: no-repeat;
    background-position: center center;
}
.esriCTApplicationHeader
{
    border-bottom: 1px solid #028D6A;
    background: #fff;
}
.esriCTApplicationHeaderTextTD
{
    color: #028D6A;
    text-shadow: 0 0 1px #AAAAAA;
}
.esriCTRightTab
{
    background-color: #fff;
}

/* End of Application Header */

/* Address container Styles */

.esriCTAddressContent
{
    border-right: 1px solid #028D6A;
    border-left: 1px solid #028D6A;
    border-bottom: 1px solid #028D6A;
    background-color: #fff;
}
.esriCTTxtAddress
{
    border: #DFDFDF solid 1px;
}

input
{
    color: #808080 !important;
}
.divAddressList
{
    color: #6e6e6e !important;
    background-color: transparent;
    border: none;
    behavior: url("styles/PIE.htc");
}
.esriCTContentBottomBorder
{
    border-bottom: 1px solid #b4b4b4;
    color: #6e6e6e !important;
}
.esriCTColorChange
{
    color: #000 !important;
}
.esriCTBlurColorChange
{
    color: Gray;
}
.esriCTSearchClose
{
    background: none repeat scroll 0 0 #FFFFFF;
    border-top: 1px solid #DFDFDF;
    border-right: 1px solid #DFDFDF;
    border-bottom: 1px solid #DFDFDF;
}

.esriCTResultColor
{
    color: #028D6A;
}
.esriCTDivAppHolder
{
    background-color: #fff;
    border-right: 1px solid #028D6A;
    border-left: 1px solid #028D6A;
    border-bottom: 1px solid #028D6A;
}
.esriCTDivshareContainer
{
    background-color: #fff;
    border-right: 1px solid #028D6A;
    border-left: 1px solid #028D6A;
    border-bottom: 1px solid #028D6A;
}
.esriCTTxtShare
{
    border-top: 1px solid #028D6A;
    border-bottom: 1px solid #028D6A;
    border-left: 1px solid #028D6A;
    border-right: 1px solid #028D6A;
}

/* End of Share Container Styles */

/* Slider */

.esriSimpleSliderDecrementButton, .esriSimpleSliderIncrementButton
{
    background-color: #028D6A !important;
    border: #fff solid 0 !important;
}
.esriSimpleSlider
{
    background-color: transparent !important;
    color: #ffffff !important;
    border: #fff solid 0 !important;
}
.HomeButton .home, .HomeButton .home:hover
{
    background-image: url('../images/home.png');
    background-color: #028D6A;
    border: #fff solid 0 !important;
}

/* End of Slider */

.BasemapToggle .toggleButton
{
    border-radius: 0px !important;
    border: 2px solid #028D6A !important;
}
.BasemapToggle .basemapTitle
{
    color: #028D6A !important;
}
.BasemapToggle .basemapImage
{
    border: 1px solid #028D6A;
}

/* End of Basemap */

/* Route*/
.simpleDirections .esriResultsLoading .esriResultsContainer
{
    background-image: url("../images/blue-loader.gif") !important;
}

.simpleDirections .esriResultsPrint
{
    background: none !important;
    color: #028D6A;
}

.simpleDirections .esriGeocoder
{
    border: 1px solid #DFDFDF !important;
}
.esriCTDirectionContainer-select
{
    color: #028D6A;
}
.esriCTDirectionContainer
{
    background: none repeat scroll 0 0 #FAFAFA;
    border-right: 1px solid #028D6A;
    border-bottom: 1px solid #028D6A;
    color: #028D6A;
}
.esriCTHeaderRouteContainer
{
    background-color: #FFFFFF;
    border-left: 1px solid #028D6A;
    border-right: 1px solid #028D6A;
}
.esriCTFrequentRouteContainerButton
{
    border-right: 1px solid #028D6A;
    border-bottom: 1px solid #028D6A;
    color: #028D6A;
}

.esriCTFrequentRouteContainerTopButton
{
    border-top: 1px solid #028D6A;
    color: #028D6A;
}
.esriCTRouteInformationContainer-select
{
    background: none repeat scroll 0 0 #FAFAFA;
    border: 1px solid #028D6A;
    color: #028D6A;
}

.esriCTRouteInformationContainer
{
    color: #028D6A;
    border-bottom: 1px solid #FFFFFF;
    border-top: 1px solid #FFFFFF;
    border-left: 1px solid #FFFFFF;
    border-right: 1px solid #FFFFFF;
}
.esriCTRouteInformationContainerTab
{
    color: #028D6A;
    border-bottom: 1px solid #FFFFFF;
    border-top: 1px solid #FFFFFF;
    border-left: 1px solid #FFFFFF;
    border-right: 1px solid #FFFFFF;
}
.esriCTRouteInformationContent
{
    color: Black;
}
.esriCTRouteInformationDetails
{
    color: Black !important;
}
.esriCTRouteInformationTitle
{
    color: #6e6e6e;
    border-bottom: 1px solid #B4B4B4;
}

.esriCTdivFrequentRoute
{
    color: #028D6A;
}

.esriCTRouteInformationBackTitle
{
    color: #028D6A;
}
.simpleDirections .esriResultsViewFullRoute
{
    color: #028D6A;
}
.simpleDirections .esriStopsGetDirections
{
    color: #028D6A !important;
}

.simpleDirections .esriStopsAdd .esriStopsAddDestination
{
    color: #028D6A !important;
}

.esriCTRouteContainer
{
    background-color: #FFFFFF;
}

.simpleDirections .esriStopsGetDirections:hover, .simpleDirections .esriStopsGetDirections:focus
{
    background: linear-gradient(to bottom, #FFFFFF 0%, #FFFFFF 100%) repeat scroll 0 0 rgba(0, 0, 0, 0) !important;
}

.esriCTrouteUpTitleArrow
{
    background-image: url("../images/arrow-green-down.png");
}

.esriCTrouteDownTitleArrow
{
    background-image: url("../images/arrow-green-up.png");
}
/* End of Route */

/*splash Screen*/

.esriCTSplashScreenDialog
{
    background-color: #fff;
    color: #6e6e6e;
}

.applicationHeaderSplashscreenContainer
{
    background: rgba(0,0,0,0.65);
    -pie-background: rgba(0,0,0,0.65);
    behavior: url("styles/PIE.htc");
}
.divSplashScreenDialogContent
{
    -webkit-box-shadow: 0 0 10px #fff;
    -moz-box-shadow: 0 0 10px #fff;
    -o-box-shadow: 0 0 10px #fff;
    box-shadow: 0 0 10px #fff;
    behavior: url("styles/PIE.htc");
}
.divSplashScreenContent
{
    background-color: black;
}
.divSplashContent
{
    color: #fff;
}

.customButton
{
    color: #fff;
    background: #028D6A;
}

/* End of splash Screen */

/* CSS for styling corners*/

.esriCTRoundedCorner
{
    behavior: url("esri_template/core_library/PIE.htc");
}
.esriCTBoxShadow
{
    border: 2px solid #028D6A;
}

/* End of CSS for styling corners*/

/* CSS for Scroll Bar */

.scrollbar_handle
{
    background-color: #C0C0C0;
}

.divAddressResults
{
    color: White;
}

/* End of CSS for Scroll Bar */

/* CSS for Loading Indicator */

.esriGovtLoadingIndicator
{
    -pie-background: rgba(0,0,0,0.6);
    background: rgba(0,0,0,0.6);
}

/* End of CSS for Loading Indicator */

/*Styles for base-map container*/
.basemapThumbnail
{
    -moz-box-shadow: 0 0 5px #666;
    -webkit-box-shadow: 0 0 5px #666;
    box-shadow: 0 0 5px #666;
    behavior: url("PIE.htc");
    border: 4px solid #fff;
}

.selectedBaseMap
{
    -webkit-box-shadow: 0 0 15px #63BA65;
    -moz-box-shadow: 0 0 15px #63BA65;
    box-shadow: 0 0 15px #63BA65;
    filter: progid:DXImageTransform.Microsoft.Glow(color='#8EAE21', Strength='4');
    behavior: url("PIE.htc");
}

/* End of base-map container */

/*legends */

.legendbox
{
    background: #FFFFFF;
}

.legenboxInner
{
    border: 1px solid #028D6A;
    border-bottom: none !important;
}

.legendlbl
{
    color: #6e6e6e;
}

.legenboxInner div
{
    color: #6e6e6e;
}
/* End of legends */

.simpleDirections .esriRoutesError li
{
    color: #808080;
}

.esriCTRouteMapViewList
{
    border-bottom: 1px solid #e8e8e8;
}

.esriInfoPanelContainer
{
    color: #028D6A !important;
    border-bottom: 1px solid #b4b4b4;
}

.esriCTHeaderLine
{
    border-bottom: 1px solid #b4b4b4;
    color: #028D6A !important;
}

.esriCTRouteToplabel
{
    border-bottom: 1px solid #e8e8e8;
    color: #028D6A;
}

.esriCTRouteMapName
{
    color: #028D6A;
}
.esriCTRouteMapNum
{
    color: #028D6A;
}

.esriCTRouteMapArrow
{
    color: #028D6A;
    background-image: url("../images/arrow.png");
}

.esriCTRouteToplabelBackView
{
    border-bottom: 1px solid #e8e8e8;
    color: #028D6A;
}

.esriCTRouteBAck
{
    color: #028D6A;
    background-image: url("../images/back.png");
}

.simpleDirections .esriStopsRemovable .esriStop .esriStopIconRemove
{
    background: url("../images/close.png") !important;
}

.showRouteImgContent
{
    background-image: url("../images/re-route-green.png");
}

.esriCTshowRouteInfoContent
{
    color: #7b6e40;
}

.esriCTDirectionRefreshButton
{
    background-image: url("../images/refresh-route-green.png") !important;
}

.esriCTshowCountContent
{
    color: #7b6e40;
}

.esriCTdivShowReRouteContainer
{
    color: #028D6A !important;
    background: #ffecab;
}

.esriPopup .titlePane
{
    color: #028D6A !important;
    background: #fff !important;
    border-color: #028D6A !important;
    border-bottom: 1px solid #028D6A;
}

.esriPopup .contentPane
{
    background: #fff !important;
    border-color: #028D6A !important;
}

.esriPopup .actionsPane
{
    border-radius: 0px !important;
    background: #fff !important;
    border-color: #028D6A !important;
}

.esriPopup .titleButton
{
    background: url("../images/close.png") !important;
}

.esriPopup .pointer, .esriPopup .outerPointer
{
    background: url("../images/bottom-Arrow.png") !important;
}

.simpleDirections .esriStopsContainer
{
    border-bottom: 1px solid #028D6A;
}

/*Start of Infowindow style*/

.esriCTTInfoWindowContainer
{
    border: #028D6A solid 1px;
    background: #FFF;
    behavior: url("styles/PIE.htc");
}

.esriCTinfoWindow
{
    border: #028D6A solid 1px;
    background: #FFF;
}

.esriCTdivTransparent
{
    color: #6e6e6e;
}

.esriCTDisplayField
{
    color: #6e6e6e;
}

.esriCTValueField
{
    color: #6e6e6e;
}

.divInfoDetailsContainer
{
    color: #6e6e6e;
}

.esriCTclosediv
{
    background: url("../images/close.png");
}
.esriCTheadderPanel
{
    color: #028D6A;
}

.infopanel
{
    border-top: 1px #028D6A solid;
    color: #fff;
}

.esriCTdivTriangle
{
    background-image: url("../images/bottomArrow-green.png");
}

.esriCTInfoDetailsScroll
{
    color: White;
}

/* Loading indicator Styles */

.esriCTLoadingIndicator
{
    background-color: #000;
}
.esriCTMainLoader
{
    background-image: url('../images/blue-loader.gif');
}

/* End of loading indicator Styles */

.esriCTShowInfoLeftArrow
{
    display: block;
}
.divInfoMobileContent
{
    display: none !important;
}
.divInfoMobileContent
{
    color: #6e6e6e;
    background-color: #FFFFFF;
}
.calloutpanel
{
    background: #028D6A !important;
}
.calloutText
{
    color: #028D6A;
}
.esriCTdivInfoTotalFeatureCount
{
    color: #028D6A;
}
.esriCTdivInfoFeatureCount
{
    color: #028D6A;
}

.esriCTBottomBorder
{
    border-bottom: 1px solid #b4b4b4;
}

.simpleDirections .esriGeocoderResults
{
    color: #808080 !important;
}
.simpleDirections .esriGeocoderResults ul
{
    border: 1px solid #DFDFDF !important;
}
.esriCTRouteInformation511ttile
{
    color: #6e6e6e;
}

redpajama_set_name: RedPajamaGithub


text:
package opennlp.tools.convert;

import java.io.File;
import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.nio.file.Path;
import java.util.Arrays;
import java.util.List;

import org.apache.commons.io.FileUtils;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;

import opennlp.tools.formats.DirectorySampleStream;
import opennlp.tools.formats.convert.FileToStringSampleStream;

public class FileToStringSampleStreamTest {

  @TempDir
  public Path directory;

  @Test
  public void readFileTest() throws IOException {

    final String sentence1 = "This is a sentence.";
    final String sentence2 = "This is another sentence.";

    List<String> sentences = Arrays.asList(sentence1, sentence2);

    DirectorySampleStream directorySampleStream =
        new DirectorySampleStream(directory.toFile(), null, false);

    File tempFile1 = directory.resolve("tempFile1").toFile();
    FileUtils.writeStringToFile(tempFile1, sentence1, StandardCharsets.UTF_8);

    File tempFile2 = directory.resolve("tempFile2").toFile();
    FileUtils.writeStringToFile(tempFile2, sentence2, StandardCharsets.UTF_8);

    try (FileToStringSampleStream stream =
             new FileToStringSampleStream(directorySampleStream, Charset.defaultCharset())) {

      String read = stream.read();
      Assertions.assertTrue(sentences.contains(read));

      read = stream.read();
      Assertions.assertTrue(sentences.contains(read));
    }
  }

}


text:
{% if "projadmin" in request.user.roles %}

Project Admin

{% endif %}


text:
/**
 *
 */
package edu.berkeley.nlp.discPCFG;

import java.util.List;

import edu.berkeley.nlp.PCFGLA.BinaryRule;
import edu.berkeley.nlp.PCFGLA.Grammar;
import edu.berkeley.nlp.PCFGLA.HierarchicalAdaptiveBinaryRule;
import edu.berkeley.nlp.PCFGLA.HierarchicalAdaptiveGrammar;
import edu.berkeley.nlp.PCFGLA.HierarchicalAdaptiveLexicalRule;
import edu.berkeley.nlp.PCFGLA.HierarchicalAdaptiveUnaryRule;
import edu.berkeley.nlp.PCFGLA.HierarchicalFullyConnectedAdaptiveLexicon;
import edu.berkeley.nlp.PCFGLA.SimpleLexicon;
import edu.berkeley.nlp.PCFGLA.SpanPredictor;
import edu.berkeley.nlp.PCFGLA.UnaryRule;
import edu.berkeley.nlp.syntax.StateSet;
import edu.berkeley.nlp.syntax.StateSetWithFeatures;
import edu.berkeley.nlp.util.ArrayUtil;

/**
 * @author petrov
 *
 */
public class HiearchicalAdaptiveLinearizer extends HierarchicalLinearizer {
	private static final long serialVersionUID = 1L;

	HierarchicalAdaptiveGrammar grammar;
	HierarchicalFullyConnectedAdaptiveLexicon lexicon;

	public HiearchicalAdaptiveLinearizer(Grammar grammar,
			SimpleLexicon lexicon, SpanPredictor sp, int fLevel) {
		this.grammar = (HierarchicalAdaptiveGrammar) grammar;
		lexicon.explicitlyComputeScores(fLevel);
		grammar.closedSumRulesWithParent = grammar.closedViterbiRulesWithParent = grammar.unaryRulesWithParent;
		grammar.closedSumRulesWithChild = grammar.closedViterbiRulesWithChild = grammar.unaryRulesWithC;
		grammar.clearUnaryIntermediates();
		grammar.makeCRArrays();

		this.lexicon = (HierarchicalFullyConnectedAdaptiveLexicon) lexicon;
		this.spanPredictor = sp;
		this.finalLevel = fLevel;
		this.nSubstates = (int) ArrayUtil.max(grammar.numSubStates);
		init();
		computeMappings();

	}

	@Override
	public SimpleLexicon getLexicon() {
		return lexicon;
	}

	@Override
	public Grammar getGrammar() {
		return grammar;
	}

	@Override
	public double[] getLinearizedLexicon(boolean update) {
		if (update) {
			nLexiconWeights = 0;
			for (short tag = 0; tag < lexicon.rules.length; tag++) {
				for (int word = 0; word < lexicon.rules[tag].length; word++) {
					lexicon.rules[tag][word].identifier = nLexiconWeights
							+ nGrammarWeights;
					nLexiconWeights += lexicon.rules[tag][word].getFinalLevel()
							.size(); // lexicon.rules[tag][word].nParam;
				}
			}
		}
		double[] logProbs = new double[nLexiconWeights];
		// if (update) linearIndex = new int[lexicon.rules.length][];

		int index = 0;
		for (short tag = 0; tag < lexicon.rules.length; tag++) {
			// if (update) linearIndex[tag] = new
			// int[lexicon.rules[tag].length];
			for (int word = 0; word < lexicon.rules[tag].length; word++) {
				// if (update) linearIndex[tag][word] = index + nGrammarWeights;
				List<Double> vals = lexicon.rules[tag][word].getFinalLevel();
				for (Double val : vals) {
					logProbs[index++] = val;
				}
			}
		}
		if (index != logProbs.length)
			System.out.println("unequal length in lexicon");

		return logProbs;
	}

	public void delinearizeLexicon(double[] logProbs, boolean usingOnlyLastLevel) {
		for (short tag = 0; tag < lexicon.rules.length; tag++) {
			for (int word = 0; word < lexicon.rules[tag].length; word++) {
				lexicon.rules[tag][word].updateScores(logProbs);
				lexicon.rules[tag][word].explicitlyComputeScores(finalLevel,
						usingOnlyLastLevel);
			}
		}
	}

	@Override
	public void delinearizeLexicon(double[] logProbs) {
		for (short tag = 0; tag < lexicon.rules.length; tag++) {
			for (int word = 0; word < lexicon.rules[tag].length; word++) {
				lexicon.rules[tag][word].updateScores(logProbs);
				lexicon.rules[tag][word].explicitlyComputeScores(finalLevel,
						false);
			}
		}
	}

	@Override
	public void increment(double[] counts, StateSet stateSet, int tag,
			double[] weights, boolean isGold) {
		if (!(stateSet instanceof StateSetWithFeatures)) {
			int globalSigIndex = stateSet.sigIndex;
			if (globalSigIndex != -1) {
				int tagSpecificWordIndex = lexicon.tagWordIndexer[tag]
						.indexOf(globalSigIndex);
				if (tagSpecificWordIndex >= 0) {
					HierarchicalAdaptiveLexicalRule rule = lexicon.rules[tag][tagSpecificWordIndex];
					int startIndexWord = rule.identifier;
					short[] mapping = rule.mapping;
					for (int i = 0; i < nSubstates; i++) {
						if (isGold)
							counts[startIndexWord + mapping[i]] += weights[i];
						else
							counts[startIndexWord + mapping[i]] -= weights[i];
					}
				}
			}
			int globalWordIndex = stateSet.wordIndex;
			int tagSpecificWordIndex = lexicon.tagWordIndexer[tag]
					.indexOf(globalWordIndex);
			if (tagSpecificWordIndex < 0) {
				for (int i = 0; i < nSubstates; i++) {
					weights[i] = 0;
				}
			} else {
				HierarchicalAdaptiveLexicalRule rule = lexicon.rules[tag][tagSpecificWordIndex];
				int startIndexWord = rule.identifier;
				short[] mapping = rule.mapping;
				for (int i = 0; i < nSubstates; i++) {
					if (isGold)
						counts[startIndexWord + mapping[i]] += weights[i];
					else
						counts[startIndexWord + mapping[i]] -= weights[i];
					weights[i] = 0;
				}
			}
		} else {
			StateSetWithFeatures stateSetF = (StateSetWithFeatures) stateSet;
			for (int f : stateSetF.features) {
				if (f < 0)
					continue;
				int tagF = lexicon.tagWordIndexer[tag].indexOf(f);
				if (tagF < 0)
					continue;

				HierarchicalAdaptiveLexicalRule rule = lexicon.rules[tag][tagF];
				int startIndexWord = rule.identifier;
				short[] mapping = rule.mapping;
				for (int i = 0; i < nSubstates; i++) {
					if (isGold)
						counts[startIndexWord + mapping[i]] += weights[i];
					else
						counts[startIndexWord + mapping[i]] -= weights[i];
				}
			}
			for (int i = 0; i < nSubstates; i++) {
				weights[i] = 0;
			}
		}
	}

	@Override
	public void increment(double[] counts, BinaryRule rule, double[] weights,
			boolean isGold) {
		HierarchicalAdaptiveBinaryRule hr = (HierarchicalAdaptiveBinaryRule) rule;
		int thisStartIndex = hr.identifier;
		if (true) {
			for (int curInd = 0; curInd < hr.nParam; curInd++) {
				double val = weights[curInd];
				if (val > 0) {
					weights[curInd] = 0;
					if (isGold)
						counts[thisStartIndex + curInd] += val;
					else
						counts[thisStartIndex + curInd] -= val;
				}
				// System.out.println(counts[thisStartIndex + curInd]);
			}
		} else {
			int curInd = 0;
			for (int lp = 0; lp < nSubstates; lp++) {
				for (int rp = 0; rp < nSubstates; rp++) {
					// if (scores[cp]==null) continue;
					for (int np = 0; np < nSubstates; np++) {
						double val = weights[curInd];
						short mapping[][][] = hr.mapping;
						if (val > 0) {
							counts[thisStartIndex + mapping[lp][rp][np]] += val;
							weights[curInd] = 0;
						}
						curInd++;
					}
				}
			}
		}
	}

	@Override
	public void increment(double[] counts, UnaryRule rule, double[] weights,
			boolean isGold) {
		HierarchicalAdaptiveUnaryRule hr = (HierarchicalAdaptiveUnaryRule) rule;
		int thisStartIndex = hr.identifier;
		if (true) {
			// if (hr.parentState==0)
			// System.out.println("letss ee");
			for (int curInd = 0; curInd < hr.nParam; curInd++) {
				double val = weights[curInd];
				if (val > 0) {
					weights[curInd] = 0;
					if (isGold)
						counts[thisStartIndex + curInd] += val;
					else
						counts[thisStartIndex + curInd] -= val;
				}
				// System.out.println(counts[thisStartIndex + curInd]);
			}
		} else {
			int curInd = 0;
			if (rule.parentState == -1) {
				for (int cp = 0; cp < nSubstates; cp++) {
					double val = weights[curInd];
					short[][] mapping = hr.mapping;
					if (val > 0) {
						if (isGold)
							counts[thisStartIndex + mapping[cp][0]] += val;
						else
							counts[thisStartIndex + mapping[cp][0]] -= val;
						weights[curInd] = 0;
					}
					curInd++;
				}
				return;
			}

			for (int cp = 0; cp < nSubstates; cp++) {
				// if (scores[cp]==null) continue;
				for (int np = 0; np < nSubstates; np++) {
					double val = weights[curInd];
					short[][] mapping = hr.mapping;
					if (val > 0) {
						if (isGold)
							counts[thisStartIndex + mapping[cp][np]] += val;
						else
							counts[thisStartIndex + mapping[cp][np]] -= val;
						weights[curInd] = 0;
					}
					curInd++;
				}
			}
		}
	}

	@Override
	public void delinearizeGrammar(double[] probs) {
		int nDangerous = 0;
		for (BinaryRule bRule : grammar.binaryRuleMap.keySet()) {
			HierarchicalAdaptiveBinaryRule hRule = (HierarchicalAdaptiveBinaryRule) bRule;
			hRule.updateScores(probs);
		}
		if (nDangerous > 0)
			System.out
					.println("Left "
							+ nDangerous
							+ " binary rule weights unchanged since the proposed weight was dangerous.");

		nDangerous = 0;
		for (UnaryRule uRule : grammar.unaryRuleMap.keySet()) {
			HierarchicalAdaptiveUnaryRule hRule = (HierarchicalAdaptiveUnaryRule) uRule;
			hRule.updateScores(probs);
		}
		if (nDangerous > 0)
			System.out
					.println("Left "
							+ nDangerous
							+ " unary rule weights unchanged since the proposed weight was dangerous.");

		grammar.explicitlyComputeScores(finalLevel);
		grammar.closedSumRulesWithParent = grammar.closedViterbiRulesWithParent = grammar.unaryRulesWithParent;
		grammar.closedSumRulesWithChild = grammar.closedViterbiRulesWithChild = grammar.unaryRulesWithC;
		// computePairsOfUnaries();
		grammar.clearUnaryIntermediates();
		grammar.makeCRArrays();
		// return grammar;
	}

	@Override
	public double[] getLinearizedGrammar(boolean update) {
		if (update) {
			// int nRules = grammar.binaryRuleMap.size() +
			// grammar.unaryRuleMap.size();
			// startIndex = new int[nRules];

			nGrammarWeights = 0;
			for (BinaryRule bRule : grammar.binaryRuleMap.keySet()) {
				HierarchicalAdaptiveBinaryRule hRule = (HierarchicalAdaptiveBinaryRule) bRule;
				if (!grammar.isGrammarTag[bRule.parentState]) {
					System.out.println("Incorrect grammar tag");
				}
				bRule.identifier = nGrammarWeights;
				nGrammarWeights += hRule.nParam;
			}
			for (UnaryRule uRule : grammar.unaryRuleMap.keySet()) {
				HierarchicalAdaptiveUnaryRule hRule = (HierarchicalAdaptiveUnaryRule) uRule;
				uRule.identifier = nGrammarWeights;
				nGrammarWeights += hRule.nParam;
			}
		}
		double[] logProbs = new double[nGrammarWeights];

		for (BinaryRule bRule : grammar.binaryRuleMap.keySet()) {
			HierarchicalAdaptiveBinaryRule hRule = (HierarchicalAdaptiveBinaryRule) bRule;
			int ind = hRule.identifier;// startIndex[ruleIndexer.indexOf(hRule)];
			List<Double> vals = hRule.getFinalLevel();
			for (Double val : vals) {
				logProbs[ind++] = val;
			}
		}

		for (UnaryRule uRule : grammar.unaryRuleMap.keySet()) {
			HierarchicalAdaptiveUnaryRule hRule = (HierarchicalAdaptiveUnaryRule) uRule;
			int ind = hRule.identifier;// startIndex[ruleIndexer.indexOf(hRule)];
			if (uRule.childState == uRule.parentState)
				continue;
			List<Double> vals = hRule.getFinalLevel();
			for (Double val : vals) {
				logProbs[ind++] = val;
			}
		}
		return logProbs;
	}

	public void delinearizeLexiconWeights(double[] logWeights) {
		int nGrZ = 0, nLexZ = 0, nSpZ = 0;

		int tmpI = 0;
		for (int i = 0; i < nGrammarWeights; i++) {
			double val = logWeights[tmpI++];
			if (val == 0)
				nGrZ++;
		}

		for (int i = 0; i < nLexiconWeights; i++) {
			double val = logWeights[tmpI++];
			if (val == 0)
				nLexZ++;
		}
		delinearizeLexicon(logWeights, true);
	}

}


text:
@protocol JavaIoFlushable;

@interface ComGoogleCommonIoFlushables : NSObject

#pragma mark Public

+ (void)flushWithJavaIoFlushable:(id<JavaIoFlushable>)flushable
                     withBoolean:(jboolean)swallowIOException;

+ (void)flushQuietlyWithJavaIoFlushable:(id<JavaIoFlushable>)flushable;

@end

J2OBJC_STATIC_INIT(ComGoogleCommonIoFlushables)

FOUNDATION_EXPORT void ComGoogleCommonIoFlushables_flushWithJavaIoFlushable_withBoolean_(id<JavaIoFlushable> flushable, jboolean swallowIOException);

FOUNDATION_EXPORT void ComGoogleCommonIoFlushables_flushQuietlyWithJavaIoFlushable_(id<JavaIoFlushable> flushable);

J2OBJC_TYPE_LITERAL_HEADER(ComGoogleCommonIoFlushables)

#endif

#pragma pop_macro("ComGoogleCommonIoFlushables_INCLUDE_ALL")


text:
package org.projectfloodlight.openflow.protocol.action;

import org.projectfloodlight.openflow.protocol.*;
import org.projectfloodlight.openflow.protocol.action.*;
import org.projectfloodlight.openflow.protocol.actionid.*;
import org.projectfloodlight.openflow.protocol.bsntlv.*;
import org.projectfloodlight.openflow.protocol.errormsg.*;
import org.projectfloodlight.openflow.protocol.meterband.*;
import org.projectfloodlight.openflow.protocol.instruction.*;
import org.projectfloodlight.openflow.protocol.instructionid.*;
import org.projectfloodlight.openflow.protocol.match.*;
import org.projectfloodlight.openflow.protocol.stat.*;
import org.projectfloodlight.openflow.protocol.oxm.*;
import org.projectfloodlight.openflow.protocol.oxs.*;
import org.projectfloodlight.openflow.protocol.queueprop.*;
import org.projectfloodlight.openflow.types.*;
import org.projectfloodlight.openflow.util.*;
import org.projectfloodlight.openflow.exceptions.*;
import java.util.Set;
import io.netty.buffer.ByteBuf;

public interface OFActionSetNwDst extends OFObject, OFAction {
    OFActionType getType();
    IPv4Address getNwAddr();
    OFVersion getVersion();

    void writeTo(ByteBuf channelBuffer);

    Builder createBuilder();
    public interface Builder extends OFAction.Builder {
        OFActionSetNwDst build();
        OFActionType getType();
        IPv4Address getNwAddr();
        Builder setNwAddr(IPv4Address nwAddr);
        OFVersion getVersion();
    }
}


text:
package com.lympid.core.behaviorstatemachines.validation;

import com.lympid.core.behaviorstatemachines.PseudoState;
import com.lympid.core.behaviorstatemachines.PseudoStateKind;
import com.lympid.core.behaviorstatemachines.impl.MutableConnectionPointReference;
import com.lympid.core.behaviorstatemachines.impl.MutablePseudoState;
import static com.lympid.core.common.TestUtils.randomPseudoStateBut;
import static org.junit.Assert.assertEquals;
import org.junit.Test;

/**
 *
 * @author Fabien Renaud
 */
public class ConnectionPointReferenceConstraintsTest {

  /**
   * [1] The entry Pseudostates must be Pseudostates with kind entryPoint.
   */
  @Test
  public void contraint1_success() {
    MutableConnectionPointReference cpr = new MutableConnectionPointReference("123");
    PseudoState ps1 = new MutablePseudoState("10", PseudoStateKind.ENTRY_POINT);
    PseudoState ps2 = new MutablePseudoState("11", PseudoStateKind.ENTRY_POINT);

    cpr.entry().add(ps1);
    cpr.entry().add(ps2);

    StandardValidator.validate(cpr);
  }

  /**
   * [1] The entry Pseudostates must be Pseudostates with kind entryPoint.
   */
  @Test(expected = ConnectionPointReferenceConstraintException.class)
  public void contraint1_fail() {
    MutableConnectionPointReference cpr = new MutableConnectionPointReference("123");
    PseudoState ps1 = new MutablePseudoState("10", PseudoStateKind.ENTRY_POINT);
    PseudoState ps2 = randomPseudoStateBut(PseudoStateKind.ENTRY_POINT);

    cpr.entry().add(ps1);
    cpr.entry().add(ps2);

    try {
      StandardValidator.validate(cpr);
    } catch (ConnectionPointReferenceConstraintException ex) {
      assertEquals(cpr, ex.getConnectionPointReference());
      assertEquals(ps2.kind(), ex.getFaultyPseudoStateKind());
      throw ex;
    }
  }

  /**
   * [2] The exit Pseudostates must be Pseudostates with kind exitPoint.
   */
  @Test
  public void contraint2_success() {
    MutableConnectionPointReference cpr = new MutableConnectionPointReference("123");
    PseudoState ps1 = new MutablePseudoState("10", PseudoStateKind.EXIT_POINT);
    PseudoState ps2 = new MutablePseudoState("11", PseudoStateKind.EXIT_POINT);

    cpr.exit().add(ps1);
    cpr.exit().add(ps2);

    StandardValidator.validate(cpr);
  }

  /**
   * [2] The exit Pseudostates must be Pseudostates with kind exitPoint.
   */
  @Test(expected = ConnectionPointReferenceConstraintException.class)
  public void contraint2_fail() {
    MutableConnectionPointReference cpr = new MutableConnectionPointReference("123");
    PseudoState ps1 = new MutablePseudoState("10", PseudoStateKind.EXIT_POINT);
    PseudoState ps2 = randomPseudoStateBut(PseudoStateKind.EXIT_POINT);

    cpr.exit().add(ps1);
    cpr.exit().add(ps2);

    try {
      StandardValidator.validate(cpr);
    } catch (ConnectionPointReferenceConstraintException ex) {
      assertEquals(cpr, ex.getConnectionPointReference());
      assertEquals(ps2.kind(), ex.getFaultyPseudoStateKind());
      throw ex;
    }
  }
}


text:
<component name="ProjectRunConfigurationManager">
  <configuration default="false" name="ORMTest" type="Application" factoryName="Application">
    <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
    <option name="MAIN_CLASS_NAME" value="squire.ORMTest" />
    <option name="VM_PARAMETERS" value="" />
    <option name="PROGRAM_PARAMETERS" value="" />
    <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
    <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
    <option name="ALTERNATIVE_JRE_PATH" />
    <option name="ENABLE_SWING_INSPECTOR" value="false" />
    <option name="ENV_VARIABLES" />
    <option name="PASS_PARENT_ENVS" value="true" />
    <module name="sQuire" />
    <envs />
    <method />
  </configuration>
</component>


text:
local skynet = require "skynet"
local webclient_core = require "webclient.core"
local webclient = webclient_core.create()
local requests = nil

local function resopnd(request)
    if not request.response then
        return
    end

    local content, errmsg = webclient:get_respond(request.req)
    if not errmsg then
        request.response(true, true, content)
    else
        local info = webclient:get_info(request.req)
        if info.response_code == 200 and not info.content_save_failed then
            request.response(true, true, content, errmsg)
        else
            request.response(true, false, errmsg, info)
        end
    end
end

local function query()
    while next(requests) do
        local finish_key = webclient:query()
        if finish_key then
            local request = requests[finish_key];
            assert(request)

            xpcall(resopnd, function() skynet.error(debug.traceback()) end, request)

            webclient:remove_request(request.req)
            requests[finish_key] = nil
        else
            skynet.sleep(1)
        end
    end
    requests = nil
end

--- 请求某个url
-- @function request
-- @string url url
-- @tab[opt] get get的参数
-- @param[opt] post post参数,table or string类型
-- @bool[opt] no_reply 使用skynet.call则要设置为nil或false,使用skynet.send则要设置为true
-- @treturn bool 请求是否成功
-- @treturn string 当成功时,返回内容,当失败时,返回出错原因
-- @usage skynet.call(webclient, "lua", "request", "http://www.dpull.com")
-- @usage skynet.send(webclient, "lua", "request", "http://www.dpull.com", nil, nil, true)
local function request(url, get, post, header, no_reply)
    if get then
        local i = 0
        for k, v in pairs(get) do
            k = webclient:url_encoding(k)
            v = webclient:url_encoding(v)

            url = string.format("%s%s%s=%s", url, i == 0 and "?" or "&", k, v)
            i = i + 1
        end
    end

    if post and type(post) == "table" then
        local data = {}
        for k,v in pairs(post) do
            k = webclient:url_encoding(k)
            v = webclient:url_encoding(v)

            table.insert(data, string.format("%s=%s", k, v))
        end
        post = table.concat(data , "&")
    end

    local req, key = webclient:request(url, post)
    if not req then
        return skynet.ret()
    end
    assert(key)

    if header and type(header) == "table" then
        local data = {}
        for k, v in pairs(header) do
            table.insert(data, string.format("%s: %s", k, v))
        end
        if #data > 0 then
            webclient:set_httpheader(req, table.unpack(data))
        end
    end

    local response = nil
    if not no_reply then
        response = skynet.response()
    end

    if requests == nil then
        requests = {}
        skynet.fork(query)
    end

    requests[key] = {
        url = url,
        req = req,
        response = response,
    }
end

skynet.start(function()
    skynet.dispatch("lua", function(session, source, command, ...)
        assert(command == "request")
        request(...)
    end)
end)


text:
Be sure to check the existing issues, both open and closed.

Describe the issue briefly here.

##### Describe your environment

1. OS Type
1. Python version: `$ python -V`
1. Pipenv version: `$ pipenv --version`

##### Expected result

Describe what you expected.

##### Actual result

When possible, provide the verbose output (`--verbose`), especially for locking and dependencies resolving issues.

##### Steps to replicate

Provide the steps to replicate (which usually at least includes the commands and the Pipfile).


text:
<?php
namespace app\components\pic2sdk\conf;

class Conf{
    const CHARSET = "UTF-8";
	const SDK_VERSION = '1.0.0';
    const MANAGE_API_VERSION = "3.0";

    const UPLOAD_ENDPOINT = "http://upload.media.aliyun.com";
    const MANAGE_ENDPOINT = "http://rs.media.aliyun.com";

    const UPLOAD_API_UPLOAD = "/api/proxy/upload.json";
    const UPLOAD_API_BLOCK_INIT = "/api/proxy/blockInit.json";
    const UPLOAD_API_BLOCK_UPLOAD = "/api/proxy/blockUpload.json";
    const UPLOAD_API_BLOCK_COMPLETE = "/api/proxy/blockComplete.json";
    const UPLOAD_API_BLOCK_CANCEL = "/api/proxy/blockCancel.json";

    const TYPE_TOP = "TOP";
    const TYPE_CLOUD = "CLOUD";

    const DETECT_MIME = 1;
    const DETECT_MIME_NONE = 0;
    const INSERT_ONLY = 1;
    const INSERT_ONLY_NONE = 0;
    const MIN_OBJ_SIZE = 102400; //1024*100;
    const SUB_OBJ_SIZE = 10485760; //1024*1024*10;
}


text:
<!---
This README file is generated. Changes will be overwritten.
-->
[![Build Status](https://travis-ci.org/whiteinge/ok.sh.svg?branch=master)](https://travis-ci.org/whiteinge/ok.sh)
# A GitHub API client library written in POSIX sh

## Requirements

* A POSIX environment (tested against Busybox v1.19.4)
* curl (tested against 7.32.0)

## Optional requirements

* jq <http://stedolan.github.io/jq/> (tested against 1.3)
  If jq is not installed commands will output raw JSON; if jq is installed
  the output will be formatted and filtered for use with other shell tools.

## Setup

Authentication credentials are read from a `~/.netrc` file.
Generate the token on GitHub under "Account Settings -> Applications".
Restrict permissions on that file with `chmod 600 ~/.netrc`!

    machine api.github.com
        login <username>
        password <token>

## Configuration

The following environment variables may be set to customize ok.sh.

* OK_SH_URL=https://api.github.com
  Base URL for GitHub or GitHub Enterprise.
* OK_SH_ACCEPT=application/vnd.github.v3+json
  The 'Accept' header to send with each request.
* OK_SH_JQ_BIN=jq
  The name of the jq binary, if installed.
* OK_SH_VERBOSE=0
  The debug logging verbosity level. Same as the verbose flag.
* OK_SH_RATE_LIMIT=0
  Output current GitHub rate limit information to stderr.
* OK_SH_DESTRUCTIVE=0
  Allow destructive operations without prompting for confirmation.

### _main()

## Usage

Usage: `ok.sh [<flags>] (command [<arg>, <name=value>...])`

      ok.sh -h              # Short, usage help text.
      ok.sh help            # All help text. Warning: long!
      ok.sh help command    # Command-specific help text.
      ok.sh command         # Run a command with and without args.
      ok.sh command foo bar baz=Baz qux='Qux arg here'

See the full list of commands below.

Flags _must_ be the first argument to `ok.sh`, before `command`.

Flag | Description
---- | -----------
-V   | Show version.
-h   | Show this screen.
-j   | Output raw JSON; don't process with jq.
-q   | Quiet; don't print to stdout.
-r   | Print current GitHub API rate limit to stderr.
-v   | Logging output; specify multiple times: info, debug, trace.
-x   | Enable xtrace debug logging.
-y   | Answer 'yes' to any prompts.

## Utility and request/response commands

_all_funcs, _main, _log, _helptext, _format_json, _format_urlencode,
_filter_json, _get_mime_type, _get_confirm, _opts_filter, _opts_pagination,
_opts_qs, _request, _response, _get, _post, _delete

## GitHub commands

help, show_scopes, org_repos, org_teams, list_repos, create_repo, delete_repo,
list_releases, release, create_release, delete_release, release_assets,
upload_asset, list_milestones, list_issues, user_issues, org_issues

## Table of Contents
* [help](#help)
* [_all_funcs](#_all_funcs)
* [_log](#_log)
* [_helptext](#_helptext)
* [_format_json](#_format_json)
* [_format_urlencode](#_format_urlencode)
* [_filter_json](#_filter_json)
* [_get_mime_type](#_get_mime_type)
* [_get_confirm](#_get_confirm)
* [_opts_filter](#_opts_filter)
* [_opts_pagination](#_opts_pagination)
* [_opts_qs](#_opts_qs)
* [_request](#_request)
* [_response](#_response)
* [_get](#_get)
* [_post](#_post)
* [_delete](#_delete)
* [show_scopes](#show_scopes)
* [org_repos](#org_repos)
* [org_teams](#org_teams)
* [list_repos](#list_repos)
* [create_repo](#create_repo)
* [delete_repo](#delete_repo)
* [list_releases](#list_releases)
* [release](#release)
* [create_release](#create_release)
* [delete_release](#delete_release)
* [release_assets](#release_assets)
* [upload_asset](#upload_asset)
* [list_milestones](#list_milestones)
* [list_issues](#list_issues)
* [user_issues](#user_issues)
* [org_issues](#org_issues)

### help()

Output the help text for a command

Usage:

    help commandname

Positional arguments

* fname : `$1`
  Function name to search for; if omitted searches whole file.

### _all_funcs()

List all functions found in the current file in the order they appear

Keyword arguments

* pretty : `1`
  `0` output one function per line; `1` output a formatted paragraph.
* public : `1`
  `0` do not output public functions.
* private : `1`
  `0` do not output private functions.

### _log()

A lightweight logging system based on file descriptors

Usage:

    _log debug 'Starting the combobulator!'

Positional arguments

* level : `$1`
  The level for a given log message. (info or debug)
* message : `$2`
  The log message.

### _helptext()

Extract contiguous lines of comments and function params as help text

Indentation will be ignored. She-bangs will be ignored. The _main()
function will be ignored. Local variable declarations and their default
values can also be pulled in as documentation. Exits upon encountering
the first blank line.

Exported environment variables can be used for string interpolation in
the extracted commented text.

Input

* (stdin)
  The text of a function body to parse.

Positional arguments

* name : `$1`
  A file name to parse.

### _format_json()

Create formatted JSON from name=value pairs

Usage:
```
_format_json foo=Foo bar=123 baz=true qux=Qux=Qux quux='Multi-line
string'
```

Return:
```
{"bar":123,"qux":"Qux=Qux","foo":"Foo","quux":"Multi-line\nstring","baz":true}
```

Tries not to quote numbers and booleans. If jq is installed it will also
validate the output.

Positional arguments

* $1 - $9
  Each positional arg must be in the format of `name=value` which will be
  added to a single, flat JSON object.

### _format_urlencode()

URL encode and join name=value pairs

Usage:
```
_format_urlencode foo='Foo Foo' bar='<Bar>&/Bar/'
```

Return:
```
foo=Foo%20Foo&bar=%3CBar%3E%26%2FBar%2F
```

Ignores pairs if the value begins with an underscore.

### _filter_json()

Filter JSON input using jq; outputs raw JSON if jq is not installed

Usage:

    _filter_json '.[] | "\(.foo)"' < something.json

* (stdin)
  JSON input.
* _filter : `$1`
  A string of jq filters to apply to the input stream.

### _get_mime_type()

Guess the mime type for a file based on the file extension

Usage:

    local mime_type
    _get_mime_type "foo.tar"; printf 'mime is: %s' "$mime_type"

Sets the global variable `mime_type` with the result. (If this function
is called from within a function that has declared a local variable of
that name it will update the local copy and not set a global.)

Positional arguments

* filename : `$1`
  The full name of the file, with exension.

### _get_confirm()

Prompt the user for confirmation

Usage:

    local confirm; _get_confirm
    [ "$confirm" -eq 1 ] && printf 'Good to go!\n'

If global confirmation is set via `$OK_SH_DESTRUCTIVE` then the user
is not prompted. Assigns the user's confirmation to the `confirm` global
variable. (If this function is called within a function that has a local
variable of that name, the local variable will be updated instead.)

Positional arguments

* message : `$1`
  The message to prompt the user with.

### _opts_filter()

Extract common jq filter keyword options and assign to vars

Usage:

      local filter
      _opts_filter "$@"

### _opts_pagination()

Extract common pagination keyword options and assign to vars

Usage:

      local _follow_next
      _opts_pagination "$@"

### _opts_qs()

Format a querystring to append to an URL or a blank string

Usage:

      local qs
      _opts_qs "$@"
      _get "/some/path"

### _request()

A wrapper around making HTTP requests with curl

Usage:
```
_request /repos/:owner/:repo/issues
printf '{"title": "%s", "body": "%s"}\n' "Stuff" "Things" \
  | _request /repos/:owner/:repo/issues | jq -r '.[url]'
printf '{"title": "%s", "body": "%s"}\n' "Stuff" "Things" \
  | _request /repos/:owner/:repo/issues method=PUT | jq -r '.[url]'
```

Input

* (stdin)
  Data that will be used as the request body.

Positional arguments

* path : `$1`
  The URL path for the HTTP request.
  Must be an absolute path that starts with a `/` or a full URL that
  starts with http(s). Absolute paths will be append to the value in
  `$OK_SH_URL`.

Keyword arguments

* method : `'GET'`
  The method to use for the HTTP request.
* content_type : `'application/json'`
  The value of the Content-Type header to use for the request.

### _response()

Process an HTTP response from curl

Output only headers of interest followed by the response body. Additional
processing is performed on select headers to make them easier to work
with in sh. See below.

Usage:
```
_request /some/path | _response status_code ETag Link_next
curl -isS example.com/some/path | _response status_code status_text | {
  local status_code status_text
  read -r status_code
  read -r status_text
}
```

Header reformatting

* HTTP Status
  The HTTP line is split into `http_version`, `status_code`, and
  `status_text` variables.
* ETag
  The surrounding quotes are removed.
* Link
  Each URL in the Link header is expanded with the URL type appended to
  the name. E.g., `Link_first`, `Link_last`, `Link_next`.

Positional arguments

* $1 - $9
  Each positional arg is the name of an HTTP header. Each header value is
  output in the same order as each argument; each on a single line. A
  blank line is output for headers that cannot be found.

### _get_mime_type()

Guess the mime type for a file based on the file extension

Usage:

    local mime_type
    _get_mime_type "foo.tar"; printf 'mime is: %s' "$mime_type"

Sets the global variable `mime_type` with the result. (If this function
is called from within a function that has declared a local variable of
that name it will update the local copy and not set a global.)

Positional arguments

* filename : `$1`
  The full name of the file, with exension.

### _post()

A wrapper around _request() for commoon POST / PUT patterns

Usage:

    _format_json foo=Foo bar=Bar | _post /some/path
    _format_json foo=Foo bar=Bar | _post /some/path method='PUT'
    _post /some/path filename=somearchive.tar
    _post /some/path filename=somearchive.tar mime_type=application/x-tar
    _post /some/path filename=somearchive.tar \
      mime_type=$(file -b --mime-type somearchive.tar)

Input

* (stdin)
  Optional. See the `filename` argument also.
  Data that will be used as the request body.

Positional arguments

* path : `$1`
  The HTTP path or URL to pass to _request().

Keyword arguments

* method : `'POST'`
  The method to use for the HTTP request.
*  : `filename`
  Optional. See the `stdin` option above also.
  Takes precedence over any data passed as stdin and loads a file off the
  file system to serve as the request body.
*  : `mime_type`
  The value of the Content-Type header to use for the request.
  If the `filename` argument is given this value will be guessed from the
  file extension. If the `filename` argument is not given (i.e., using
  stdin) this value defaults to `application/json`. Specifying this
  argument overrides all other defaults or guesses.

### _delete()

A wrapper around _request() for common DELETE patterns

Usage:

    _delete '/some/url'

Return: 0 for success; 1 for failure.

Positional arguments

* url : `$1`
  The URL to send the DELETE request to.

### show_scopes()

Show the permission scopes for the currently authenticated user

Usage:

    show_scopes

### org_repos()

List organization repositories

Usage:

    org_repos myorg
    org_repos myorg type=private per_page=10
    org_repos myorg _filter='.[] | "\(.name)\t\(.owner.login)"'

Positional arguments

* org : `$1`
  Organization GitHub login or id for which to list repos.

Keyword arguments

* _filter : `'.[] | "\(.name)\t\(.ssh_url)"'`
  A jq filter to apply to the return data.

Querystring arguments may also be passed as keyword arguments:
per_page, type

### org_teams()

List teams

Usage:

    org_teams org

Positional arguments

* org : `$1`
  Organization GitHub login or id.

Keyword arguments

* _filter : `'.[] | "\(.name)\t\(.id)\t\(.permission)"'`
  A jq filter to apply to the return data.

### list_repos()

List user repositories

Usage:

    list_repos
    list_repos user

Positional arguments

* user : `$1`
  Optional GitHub user login or id for which to list repos.

Keyword arguments

* _filter : `'.[] | "\(.name)\t\(.html_url)"'`
  A jq filter to apply to the return data.

Querystring arguments may also be passed as keyword arguments:
per_page, type, sort, direction

### create_repo()

Create a repository for a user or organization

Usage:

    create_repo foo
    create_repo bar description='Stuff and things' homepage='example.com'
    create_repo baz organization=myorg

Positional arguments

* name : `$1`
  Name of the new repo

Keyword arguments

* _filter : `'.[] | "\(.name)\t\(.html_url)"'`
  A jq filter to apply to the return data.

POST data may also be passed as keyword arguments:
description, homepage, private, has_issues, has_wiki, has_downloads,
organization, team_id, auto_init, gitignore_template

### delete_repo()

Create a repository for a user or organization

Usage:

    delete_repo owner repo

The currently authenticated user must have the `delete_repo` scope. View
current scopes with the `show_scopes()` function.

Positional arguments

* owner : `$1`
  Name of the new repo
* repo : `$2`
  Name of the new repo

### list_releases()

List releases for a repository

Usage:

    list_releases org repo '\(.assets[0].name)\t\(.name.id)'

Positional arguments

* owner : `$1`
  A GitHub user or organization.
* repo : `$2`
  A GitHub repository.

Keyword arguments

* _filter : `'.[] | "\(.name)\t\(.id)\t\(.html_url)"'`
  A jq filter to apply to the return data.

### release()

Get a release

Usage:

    release user repo 1087855

Positional arguments

* owner : `$1`
  A GitHub user or organization.
* repo : `$2`
  A GitHub repository.
* release_id : `$3`
  The unique ID of the release; see list_releases.

Keyword arguments

* _filter : `'"\(.author.login)\t\(.published_at)"'`
  A jq filter to apply to the return data.

### create_release()

Create a release

Usage:

    create_release org repo v1.2.3
    create_release user repo v3.2.1 draft=true

Positional arguments

* owner : `$1`
  A GitHub user or organization.
* repo : `$2`
  A GitHub repository.
* tag_name : `$3`
  Git tag from which to create release.

Keyword arguments

* _filter : `'"\(.name)\t\(.id)\t\(.html_url)"'`
  A jq filter to apply to the return data.

POST data may also be passed as keyword arguments:
body, draft, name, prerelease, target_commitish

### delete_release()

Delete a release

Usage:

    delete_release org repo 1087855

Return: 0 for success; 1 for failure.

Positional arguments

* owner : `$1`
  A GitHub user or organization.
* repo : `$2`
  A GitHub repository.
* release_id : `$3`
  The unique ID of the release; see list_releases.

### release_assets()

List release assets

Usage:

    release_assets user repo 1087855

Positional arguments

* owner : `$1`
  A GitHub user or organization.
* repo : `$2`
  A GitHub repository.
* release_id : `$3`
  The unique ID of the release; see list_releases.

Keyword arguments

* _filter : `'.[] | "\(.id)\t\(.name)\t\(.updated_at)"'`
  A jq filter to apply to the return data.

### upload_asset()

Upload a release asset

Note, this command requires `jq` to find the release `upload_url`.

Usage:

    upload_asset username reponame 1087938 \
        foo.tar application/x-tar < foo.tar

* (stdin)
  The contents of the file to upload.

Positional arguments

* owner : `$1`
  A GitHub user or organization.
* repo : `$2`
  A GitHub repository.
* release_id : `$3`
  The unique ID of the release; see list_releases.
* name : `$4`
  The file name of the asset.

Keyword arguments

* _filter : `'"\(.state)\t\(.browser_download_url)"'`
  A jq filter to apply to the return data.

### list_milestones()

List milestones for a repository

Usage:

      list_milestones someuser/somerepo
      list_milestones someuser/somerepo state=closed

Positional arguments

* repository : `$1`
  A GitHub repository.

Keyword arguments

*  : `_follow_next`
  Automatically look for a 'Links' header and follow any 'next' URLs.
*  : `_follow_next_limit`
  Maximum number of 'next' URLs to follow before stopping.
* _filter : `'.[] | "\(.number)\t\(.open_issues)/\(.closed_issues)\t\(.title)"'`
  A jq filter to apply to the return data.

GitHub querystring arguments may also be passed as keyword arguments:
per_page, state, sort, direction

### list_issues()

List issues for the authenticated user or repository

Usage:

      list_issues
      list_issues someuser/somerepo
      list_issues someuser/somerepo state=closed labels=foo,bar

Positional arguments

* repository : `$1`
  A GitHub repository.

Keyword arguments

*  : `_follow_next`
  Automatically look for a 'Links' header and follow any 'next' URLs.
*  : `_follow_next_limit`
  Maximum number of 'next' URLs to follow before stopping.
* _filter : `'.[] | "\(.number)\t\(.title)"'`
  A jq filter to apply to the return data.

GitHub querystring arguments may also be passed as keyword arguments:
per_page, milestone, state, assignee, creator, mentioned, labels, sort,
direction, since

### user_issues()

List all issues across owned and member repositories for the authenticated user

Usage:

      user_issues
      user_issues since=2015-60-11T00:09:00Z

Positional arguments

* repository : `$1`
  A GitHub repository.

Keyword arguments

*  : `_follow_next`
  Automatically look for a 'Links' header and follow any 'next' URLs.
*  : `_follow_next_limit`
  Maximum number of 'next' URLs to follow before stopping.
* _filter : `'.[] | "\(.number)\t\(.title)"'`
  A jq filter to apply to the return data.

GitHub querystring arguments may also be passed as keyword arguments:
per_page, filter, state, labels, sort, direction, since

### org_issues()

List all issues for a given organization for the authenticated user

Usage:

      org_issues someorg

Positional arguments

* org : `$1`
  Organization GitHub login or id.

Keyword arguments

*  : `_follow_next`
  Automatically look for a 'Links' header and follow any 'next' URLs.
*  : `_follow_next_limit`
  Maximum number of 'next' URLs to follow before stopping.
* _filter : `'.[] | "\(.number)\t\(.title)"'`
  A jq filter to apply to the return data.

GitHub querystring arguments may also be passed as keyword arguments:
per_page, filter, state, labels, sort, direction, since


text:
'''
    fedex.ship_services

    Process and submit various shipping requests to FedEx,
    such as express and ground U.S. and international shipments
    as well as Return shipments.
'''
import string
from datetime import datetime

from .api import APIBase
from .structures import VersionInformation

class ProcessShipmentRequest(APIBase):
    """
    Process a shipment
    """
    __slots__ = (
        'RequestedShipment',
        )

    version_info = VersionInformation('ship', 15, 0, 0)
    service_name = 'processShipment'

    def __init__(self, account_info):
        """
        :param account_info: Instance of `structures.AccountInformation`
                             with all the details of accounts
        """
        self.account_info = account_info
        self.set_wsdl_client('ShipService_v15.wsdl')
        self.RequestedShipment = self.get_element_from_type(
            'RequestedShipment'
        )
        super(ProcessShipmentRequest, self).__init__()

    def send_request(self, transaction_id=None):
        """
        Inherit and implement send_request
        :param transaction_id: ID of the transaction
        """
        if transaction_id is not None:
            self.set_transaction_details(transaction_id)

        # The date format must be YYYY-MM-DDTHH:MM:SS- xx:xx.
        # The time must be in the format: HH:MM:SS using a 24-hour clock.
        # The date and time are separated by the letter T
        # (e.g., 2009-06-26T17:00:00).
        # The UTC offset indicates the number of hours/minutes
        # (e.g. xx:xx) from UTC (e.g. 2009-06-26T17:00:00-04:00
        # is defined as June 26, 2009 5:00 p.m. Eastern Time).
        self.RequestedShipment.ShipTimestamp = datetime.utcnow().replace(
            microsecond=0).isoformat()

        fields = self.__slots__ + super(
            ProcessShipmentRequest,
            self).__slots__
        fields = [x for x in fields if x[0] in string.uppercase]
        return self._send_request(fields)


text:
CREATE TABLE files (
  name varchar,
  size int,
  hash varchar,
  payload text);

CREATE TABLE transfer_meter (
  uploaded BIGINT,
  downloaded BIGINT);

INSERT INTO transfer_meter
  SELECT 0, 0
  WHERE NOT EXISTS (SELECT * FROM transfer_meter);

-- Migration: Add synchronization fields
ALTER TABLE files ADD COLUMN blockchain_hash    VARCHAR;
ALTER TABLE files ADD COLUMN exported_timestamp TIMESTAMP;

-- Migration: Meters transferred bytes per month
ALTER TABLE transfer_meter ADD COLUMN month VARCHAR;
CREATE UNIQUE INDEX transfer_meter_month_idx ON transfer_meter(month);

-- Migration 2014-04-24: add blockchain synchronization table
CREATE TABLE blockchain_state (
  last_known_block integer);

INSERT INTO blockchain_state
  SELECT 0
  WHERE NOT EXISTS (SELECT * FROM blockchain_state);


text:
package edu.wpi.first.wpilibj.templates;

/**
 *
 * @author David
 */
public class Wiring {
    public static boolean lights = false;
    /*
     * ### Drive ###
     */
    // motors
    public static final int leftDrive = 3;
    public static final int leftDrive2 = 4;
    public static final int rightDrive = 8;
    public static final int rightDrive2 = 9;
    // encoders
    public static final int lEncoderAChannel = 6;
    public static final int lEncoderBChannel = 7;
    public static final int rEncoderAChannel = 8;
    public static final int rEncoderBChannel = 9;
    // shifters
    public static final int highShifter=3;
    public static final int lowShifter=2;

    /*
     * ### Rollers ###
     */
    public static final int rollerJag = 7;

    /*
     * ### Kicker ###
     */
    // motor
    public static final int kickerJag = 5;
    // encoder???
    // light sensor
    public static final int lightSensor = 14;
    public static final double kickerPower = 1.0;

    /*
     * ### Arms ###
     */
    //wrong values
    public static final int lArm1 = 7;
    public static final int lArm2 = 8;
    public static final int rArm1 = 4;
    public static final int rArm2 = 5;

    /*
     * ### Compressor ###
     */
    public static final int pressorSwitchChannel = 5;
    public static final int compressorSwitchChannel = 5;

    /*
     * Lights
     */
    public static final int lightDigitalOutPin1 = 4;
    public static final int lightDigitalOutPin2 = 5;
    public static final int lightDigitalOutPin3 = 6;
    public static final int lightDigitalOutPin4 = 7;
    public static final int lightDigitalOutPinSecret = 8;
    public static final int lightPwmOutPin1 = 3;
    public static final int lightPwmOutPin2 = 4;
    public static final int lightPwmOutPin3 = 5;

}


text:
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/ads/googleads/v11/common/user_lists.proto

package com.google.ads.googleads.v11.common;

public interface UserListActionInfoOrBuilder extends
    // @@protoc_insertion_point(interface_extends:google.ads.googleads.v11.common.UserListActionInfo)
    com.google.protobuf.MessageOrBuilder {

  /**
   *

   * A conversion action that's not generated from remarketing.
   *

   *
   * string conversion_action = 3;
   * @return Whether the conversionAction field is set.
   */
  boolean hasConversionAction();
  /**
   *

   * A conversion action that's not generated from remarketing.
   *

   *
   * string conversion_action = 3;
   * @return The conversionAction.
   */
  java.lang.String getConversionAction();
  /**
   *

   * A conversion action that's not generated from remarketing.
   *

   *
   * string conversion_action = 3;
   * @return The bytes for conversionAction.
   */
  com.google.protobuf.ByteString
      getConversionActionBytes();

  /**
   *

   * A remarketing action.
   *

   *
   * string remarketing_action = 4;
   * @return Whether the remarketingAction field is set.
   */
  boolean hasRemarketingAction();
  /**
   *

   * A remarketing action.
   *

   *
   * string remarketing_action = 4;
   * @return The remarketingAction.
   */
  java.lang.String getRemarketingAction();
  /**
   *

   * A remarketing action.
   *

   *
   * string remarketing_action = 4;
   * @return The bytes for remarketingAction.
   */
  com.google.protobuf.ByteString
      getRemarketingActionBytes();

  public com.google.ads.googleads.v11.common.UserListActionInfo.UserListActionCase getUserListActionCase();
}


text:
require File.expand_path('../../../spec_helper', __FILE__)
require 'tempfile'
require File.expand_path('../shared/length', __FILE__)

describe "Tempfile#size" do
  it_behaves_like :tempfile_length, :size
end


text:
<?php

class ReadersController extends Controller
{
	/**
	 * @var string the default layout for the views. Defaults to '//layouts/column2', meaning
	 * using two-column layout. See 'protected/views/layouts/column2.php'.
	 */
	public $layout='//layouts/column2';

	/**
	 * @return array action filters
	 */
	public function filters()
	{
		return array(
			'accessControl', // perform access control for CRUD operations
			'postOnly + delete', // we only allow deletion via POST request
		);
	}

	/**
	 * Specifies the access control rules.
	 * This method is used by the 'accessControl' filter.
	 * @return array access control rules
	 */
	public function accessRules()
	{
		return array(
			array('allow',  // allow all users to perform 'index' and 'view' actions
				'actions'=>array('index','view'),
				'users'=>array('*'),
			),
			array('allow', // allow authenticated user to perform 'create' and 'update' actions
				'actions'=>array('create','update'),
				'users'=>array('@'),
			),
			array('allow', // allow admin user to perform 'admin' and 'delete' actions
				'actions'=>array('admin','delete'),
				'users'=>array('admin'),
			),
			array('deny',  // deny all users
				'users'=>array('*'),
			),
		);
	}

	/**
	 * Displays a particular model.
	 * @param integer $id the ID of the model to be displayed
	 */
	public function actionView($id)
	{
		$this->render('view',array(
			'model'=>$this->loadModel($id),
		));
	}

	/**
	 * Creates a new model.
	 * If creation is successful, the browser will be redirected to the 'view' page.
	 */
	public function actionCreate()
	{
		$model=new Readers;

		// Uncomment the following line if AJAX validation is needed
		// $this->performAjaxValidation($model);

		if(isset($_POST['Readers']))
		{
			$model->attributes=$_POST['Readers'];
			if($model->save())
				$this->redirect(array('view','id'=>$model->id));
		}

		$this->render('create',array(
			'model'=>$model,
		));
	}

	/**
	 * Updates a particular model.
	 * If update is successful, the browser will be redirected to the 'view' page.
	 * @param integer $id the ID of the model to be updated
	 */
	public function actionUpdate($id)
	{
		$model=$this->loadModel($id);

		// Uncomment the following line if AJAX validation is needed
		// $this->performAjaxValidation($model);

		if(isset($_POST['Readers']))
		{
			$model->attributes=$_POST['Readers'];
			if($model->save())
				$this->redirect(array('view','id'=>$model->id));
		}

		$this->render('update',array(
			'model'=>$model,
		));
	}

	/**
	 * Deletes a particular model.
	 * If deletion is successful, the browser will be redirected to the 'admin' page.
	 * @param integer $id the ID of the model to be deleted
	 */
	public function actionDelete($id)
	{
		$this->loadModel($id)->delete();

		// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser
		if(!isset($_GET['ajax']))
			$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));
	}

	/**
	 * Lists all models.
	 */
	public function actionIndex()
	{
		$dataProvider=new CActiveDataProvider('Readers');
		$this->render('index',array(
			'dataProvider'=>$dataProvider,
		));
	}

	/**
	 * Manages all models.
	 */
	public function actionAdmin()
	{
		$model=new Readers('search');
		$model->unsetAttributes();  // clear any default values
		if(isset($_GET['Readers']))
			$model->attributes=$_GET['Readers'];

		$this->render('admin',array(
			'model'=>$model,
		));
	}

	/**
	 * Returns the data model based on the primary key given in the GET variable.
	 * If the data model is not found, an HTTP exception will be raised.
	 * @param integer $id the ID of the model to be loaded
	 * @return Readers the loaded model
	 * @throws CHttpException
	 */
	public function loadModel($id)
	{
		$model=Readers::model()->findByPk($id);
		if($model===null)
			throw new CHttpException(404,'The requested page does not exist.');
		return $model;
	}

	/**
	 * Performs the AJAX validation.
	 * @param Readers $model the model to be validated
	 */
	protected function performAjaxValidation($model)
	{
		if(isset($_POST['ajax']) && $_POST['ajax']==='readers-form')
		{
			echo CActiveForm::validate($model);
			Yii::app()->end();
		}
	}
}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>org.lightsleep.database Class Hierarchy (Lightsleep)</title>
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Hierarchy For Package org.lightsleep.database

Package Hierarchies:

All Packages

Class Hierarchy

java.lang.Object

org.lightsleep.database.Standard (implements org.lightsleep.database.Database)

org.lightsleep.database.Db2

org.lightsleep.database.MariaDB

org.lightsleep.database.MySQL

org.lightsleep.database.Oracle

org.lightsleep.database.PostgreSQL

org.lightsleep.database.SQLite

org.lightsleep.database.SQLServer

Interface Hierarchy

org.lightsleep.database.Database

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

© 2016 Masato Kokubo


text:
#ifndef TANGO_GL_BOUNDING_BOX_H_
#define TANGO_GL_BOUNDING_BOX_H_

#include <vector>

#include "tango-gl/segment.h"
#include "tango-gl/util.h"

namespace tango_gl {
class BoundingBox {
 public:
  BoundingBox()
      : bounding_min_(glm::vec3(0, 0, 0)), bounding_max_(glm::vec3(0, 0, 0)) {}
  BoundingBox(const std::vector<float>& vertices);
  BoundingBox(const glm::vec3& min, const glm::vec3& max)
      : bounding_min_(min), bounding_max_(max) {}
  bool IsIntersecting(const Segment& segment, const glm::quat& rotation,
                      const glm::mat4& transformation);

 private:
  // Axis-aligned bounding box minimum and maximum point.
  glm::vec3 bounding_min_;
  glm::vec3 bounding_max_;
};
}  // namespace tango_gl
#endif  // TANGO_GL_BOUNDING_BOX_H_


text:
'use strict';

var rules = require('./render_rules');

/**
 * Object used to render a list of tokens
 */
function Renderer (options) {
    this.options = options || {};
}

/**
 * Renders a list of tokens into an html string
 *
 * @param {Array<Token>} tokens
 * @return {String} an html string
 */
Renderer.prototype.render = function (tokens) {
    var output = ''
      , opts   = this.options;

    tokens.forEach(function (token) {
        token.pushAttr('class', opts[token.type] || token.type)
        output += rules.render(token, opts);
    });

    return rules.htag('pre', [ [ 'class',  'vim-help' ] ], output, true);
};

module.exports.Renderer = Renderer;


text:
<!doctype html>

  <meta charset="utf-8">
  <title>Baxter Robots are Learning to Think, See, and Cook – Benjamin Bengfort</title>
  <meta name="description" content="">
  <meta name="keywords" content="news, research, baxter">

  <meta name="twitter:card" content="summary">
  <meta name="twitter:image" content="http://cs.umd.edu/~bengfort/images/">
  <meta name="twitter:title" content="Baxter Robots are Learning to Think, See, and Cook">
  <meta name="twitter:description" content="My graduate research at the University of Maryland">
  <meta name="twitter:creator" content="@bbengfort">

  <meta property="og:locale" content="en_US">
  <meta property="og:type" content="article">
  <meta property="og:title" content="Baxter Robots are Learning to Think, See, and Cook">
  <meta property="og:description" content="My graduate research at the University of Maryland">
  <meta property="og:url" content="http://cs.umd.edu/~bengfort/thoughts/baxter-robots-are-learning-to-think-see-and-read/">
  <meta property="og:site_name" content="Benjamin Bengfort">

  <link rel="canonical" href="http://cs.umd.edu/~bengfort/thoughts/baxter-robots-are-learning-to-think-see-and-read/">
  <link href="http://cs.umd.edu/~bengfort/feed.xml" type="application/atom+xml" rel="alternate" title="Benjamin Bengfort Feed">
  <link rel="author" href="https://plus.google.com/+BenjaminBengfort-DataNerd/?rel=author">

  <meta name="HandheldFriendly" content="True">
  <meta name="MobileOptimized" content="320">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">

  <link href='http://fonts.googleapis.com/css?family=PT+Sans+Narrow:400,700|PT+Serif:400,700,400italic' rel='stylesheet' type='text/css'>

  <link rel="stylesheet" href="http://cs.umd.edu/~bengfort/assets/css/main.min.css">

  <meta http-equiv="cleartype" content="on">

  <link rel="shortcut icon" href="http://cs.umd.edu/~bengfort/favicon.ico">

		Benjamin Bengfort

About

Publications

Posts

Benjamin Bengfort

Studying distributed storage systems and hoping for a PhD.

 Twitter

 Google+
 LinkedIn
 Instagram
 Github

Baxter Robots are Learning to Think, See, and Cook

    Researchers at the University of Maryland explore practical AI with Baxter Robots

In April 2014, researchers at the University of Maryland acquired two Baxter Intera 3 humanoid robots manufactured by Rethink Robotics.  Baxter robots are well known for their use in micro-manufacturing as they are specially designed for repeated grasping and moving tasks in a stationary position.  While a Baxter's multi-dimensional range of motion is important, What makes them especially interesting is their adaptability. Baxter robots are "trained" – not programmed – on work sites.  Human workers move the Baxter's incredibly flexible robotic arms to "show" Baxter how to do a particular task. This ability, combined with Baxter's powerful onboard processing, a suite of sensors, and smooth operating mechanisms makes Baxter ideal for research.

In Computer Science, research groups have already begun to explore computer vision, machine learning, and artificial intelligence within a robotic context. Three research groups — the Computer Vision Labratory (CFAR), the Metacognitive Lab (MCL), and the Maryland Robotics Center — have been cooperating to produce practical results from their individual theoretical fields.  Simple tasks like picking up utensils and stirring bowls, pouring water in a moving container, and building structures from blocks have been quickly achieved thanks to this collaboration.  By studying the difficulties involved in teaching Baxter to perform these tasks, the research groups hope to solve larger theoretical challenges.

…

Read the full article: Baxter Robots are Learning to Think, See, and Cook

Benjamin Bengfort

Studying distributed storage systems and hoping for a PhD.

 Twitter

 Google+
 LinkedIn
 Instagram
 Github

Baxter Robots are Learning to Think, See, and Cook was published on <time datetime="2015-02-26T00:00:00-05:00">February 26, 2015</time> by Benjamin Bengfort.

Available in PDF

You might also enjoy (View all posts)

    © 2017 Benjamin Bengfort. Powered by Jekyll using the Minimal Mistakes theme.


text:
\documentclass[manual-fr.tex]{subfiles}
\begin{document}

Les \textit{token features} \textit{regexp} évaluent des expressions régulières. Les actions suivantes, illustrées sur les figures \ref{fig:feature-matcher-check}, \ref{fig:feature-matcher-subsequence} et \ref{fig:feature-matcher-token} sont possibles :
\begin{itemize}
    \item action="check" (\textit{boolean feature}) : vérifie qu'une regexp est reconnue sur l'élément en entrée.
    \item action="subsequence" (\textit{string feature}) : vérifie qu'une regexp est reconnue sur l'élément en entrée et renvoie la sous-chaine reconnue.
    \item action="token" (\textit{string feature}) : vérifie qu'une regexp est reconnue sur l'élément en entrée et renvoie l'élément s'il est reconnu.
\end{itemize}

\begin{figure}[ht!]
\footnotesize
\begin{xml}
\xmarker{regexp}{ \xfield{name}{only-first-upper} \xfield{action}{check}}{\^{}[A-Z][\^{}A-Z]*\$}
\end{xml}
\caption{exemple de la feature \textit{matcher} "check".}
\label{fig:feature-matcher-check}
\end{figure}

\begin{figure}[ht!]
\footnotesize
\begin{xml}
\xmarker{regexp}{ \xfield{name}{after-hyphen} \xfield{action}{subsequence}}{-.+\$}
\end{xml}
\caption{exemple de la feature \textit{matcher} "subsequence".}
\label{fig:feature-matcher-subsequence}
\end{figure}

\begin{figure}[ht!]
\footnotesize
\begin{xml}
\xmarker{regexp}{ \xfield{name}{ends-with-isme} \xfield{action}{token}}{isme\$}
\end{xml}
\caption{exemple de la feature \textit{matcher} "token".}
\label{fig:feature-matcher-token}
\end{figure}
\end{document}


text:
layout: post
date: '2015-07-12'
title: "QUINCEANERA DRESSES Bonny Bloom 5310 Quinceanera Dress"
category: QUINCEANERA DRESSES
tags: [QUINCEANERA DRESSES]
---
### QUINCEANERA DRESSES Bonny Bloom 5310 Quinceanera Dress
Just **$538.99**
###

A fun strapless ball gown with a corseted lace up bodice filled with scrolling embroidered vines with organza rosette blooms. The skirt is full with layers and layers of rolling ruffles down to the hem.

NOT AVAILABLE IN STORE. Available in sizes 0-32.

Buy it: [https://www.eudances.com/en/quinceanera-dresses/1690-bonny-bloom-5310-quinceanera-dress.html](https://www.eudances.com/en/quinceanera-dresses/1690-bonny-bloom-5310-quinceanera-dress.html)


text:
package cloud.strategies;

import cloud.CloudService;
import com.google.inject.Inject;
import com.google.inject.Singleton;
import de.uniulm.omi.cloudiator.sword.api.extensions.KeyPairService;
import models.KeyPair;
import models.VirtualMachine;
import models.service.KeyPairModelService;

import java.util.Optional;

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

/**
 * Created by daniel on 17.12.15.
 */
@Singleton public class KeyPairPerCredentialStrategy extends AbstractKeyPairStrategy {

    private final KeyPairModelService keyPairModelService;

    @Inject public KeyPairPerCredentialStrategy(CloudService cloudService,
        KeyPairModelService keyPairModelService) {
        super(cloudService);
        this.keyPairModelService = keyPairModelService;
    }

    @Override protected Optional<KeyPair> existsFor(VirtualMachine virtualMachine) {
        return keyPairModelService.getKeyPair(virtualMachine);
    }

    @Override protected KeyPair createKeyPairFor(VirtualMachine virtualMachine,
        KeyPairService keyPairService) {

        synchronized (KeyPairPerCredentialStrategy.class) {

            checkState(virtualMachine.owner().isPresent());
            checkState(virtualMachine.location().isPresent());

            de.uniulm.omi.cloudiator.sword.api.domain.KeyPair remoteKeyPair = keyPairService
                .create(virtualMachine.owner().get().getUuid(),
                    virtualMachine.location().get().swordId().get());

            checkState(remoteKeyPair.privateKey().isPresent(),
                "Expected remote keypair to have a private key, but it has none.");

            KeyPair keyPair =
                new KeyPair(remoteKeyPair.id(), remoteKeyPair.providerId(), remoteKeyPair.id(),
                    virtualMachine.cloud(), virtualMachine.owner().get(),
                    remoteKeyPair.privateKey().get(), remoteKeyPair.publicKey(), null);
            this.keyPairModelService.save(keyPair);
            return keyPair;
        }
    }
}


text:
layout: sidebar-right
title: "Moonrise by Sarah Crossan"
date: 2017-11-16
author: emily-mitchell
category: young-adult
excerpt: 'Moonrise is a powerful, poignant story that will stay with you long after the final page.'
featured-image: /images/featured/featured-moonrise.jpg
featured-alt: Moonrise
featured-link-text: "Read library volunteer Emily's review of Moonrise, by Sarah Crossan."
breadcrumb: young-adult
genre: literary-fiction
genre-image: /images/featured/featured-moonrise-genre.jpg
genre-alt: Moonrise
---

![Moonrise](/images/featured/featured-moonrise.jpg)

**[See Moonrise in our catalogue](https://suffolk.spydus.co.uk/cgi-bin/spydus.exe/ENQ/OPAC/BIBENQ?BRN=2183901)**

> "Joe hasn't seen his brother for ten years, and it's for the most brutal of reasons. Ed is on death row. But now Ed's execution date has been set, and Joe is determined to spend those last weeks with him, no matter what other people think. What value do you place on life? What can you forgive? And just how do you say goodbye?"

This was a very powerful and moving book, told in Sarah Crossan's usual beautiful lyrical poetry that intertwines with the story. I loved how strong the characterisation was, despite it being told in short, sharp bursts.

This was a very challenging topic that Crossan dealt with well, leaving the details open to interpretation, adding to the poignant atmosphere. The way that the past and present was woven together was done very well; it really stuck with me.

Moonrise is a powerful, poignant story that will stay with you long after the final page.


text:
name: "🐞 Bug report"
about: Report an issue with this software
title: ''
labels: ''
assignees: ''

---

<!-- THIS IS NOT A SUPPORT FORUM. USE THIS FORM TO FILE BUGS. -->

**What version of this package are you using?**

**What operating system, Node.js, and npm version?**

**What happened?**

<!-- Please provide a minimal reproducible example that demonstrates your issue. -->

**What did you expect to happen?**

**Are you willing to submit a pull request to fix this bug?**


text:
package de.proteinms.omxparser.util;

import java.util.LinkedList;
import java.util.List;
import java.io.Serializable;

/**
 * The search results.
 *

 * Please see "OMSSA.mod.xsd" for further information:
 *

 * See http://www.ncbi.nlm.nih.gov/data_specs/schema/OMSSA.mod.xsd
 *
 * @author Steffen Huber
 * @author Harald Barsnes
 */
public class MSSearch_response implements Serializable {

    /**
     * List of all the search results.
     */
    public List<MSResponse> MSResponse = new LinkedList<MSResponse>();

    /**
     * Adds an element to the MSResponse list.
     *
     * @param s the MSResponse element to add
     */
    public void setMSResponse(MSResponse s) {
        MSResponse.add(s);
    }
}


text:
#include "iothub.h"
#include "payload.h"

typedef struct IoTHub IoTHub;

typedef struct WeatherStation
{
    char id[256];
    IoTHub iothub;
    bool isOnAir;
    Payload payload;
} WeatherStation;

void InitializeWeatherStation(WeatherStation *station, char *connectionstring);

void EnableBroadcast(WeatherStation *station, bool transmit);

void SenseWeatherPeriodically(WeatherStation *station);

#endif // __WEATHERSTATION_H__


text:
<?php
namespace Jmondi\Auth\Providers;

use Illuminate\Support\ServiceProvider;
use Jmondi\Gut\Infrastructure\Lib\ApplicationCore;

class AppServiceProvider extends ServiceProvider
{
    public function register()
    {
        $this->app->singleton(ApplicationCore::class, function ($app) {
            return ApplicationCore::createMysqlConnection();
        });
    }
}


text:
jquery-scroll-low
======================

JQuery Infinite Scroll Plugin. Super Simple and easy to use.

```javascript
$(window).scrollLow({
    callback: function(pageNum){}, //handle scroll evenets
    throttleWait: 2000,            //trigger at most one callback per 2s
    scrollCheckInterval: 200       //check scroll position every 200ms
});
```

Demo:
http://jsfiddle.net/shaw3257/2ZQRV


text:
<Document doc_name="wsj_0106">
  <Markables>
    <TIMEX3 RELATED_TO="" TAG_DESCRIPTOR="Empty_Mark" beginPoint="" comment="" endPoint="" freq="" functionInDocument="CREATION_TIME" id="0" quant="" type="DATE" value="1989-11-02" />
    <EVENT aspect="NONE" certainty="" class="REPORTING" comment="" factuality="" id="1" modality="NONE" polarity="POS" pos="VERB" tense="PAST">
      <token_anchor id="4" />
    </EVENT>
    <EVENT aspect="NONE" certainty="" class="I_STATE" comment="" factuality="" id="2" modality="NONE" polarity="POS" pos="VERB" tense="PRESENT">
      <token_anchor id="6" />
    </EVENT>
    <EVENT aspect="NONE" certainty="" class="OCCURRENCE" comment="" factuality="" id="3" modality="NONE" polarity="POS" pos="VERB" tense="INFINITIVE">
      <token_anchor id="8" />
    </EVENT>
    <EVENT aspect="NONE" certainty="" class="OCCURRENCE" comment="" factuality="" id="4" modality="NONE" polarity="POS" pos="NOUN" tense="NONE">
      <token_anchor id="29" />
    </EVENT>
    <EVENT aspect="NONE" certainty="" class="REPORTING" comment="" factuality="" id="5" modality="NONE" polarity="POS" pos="VERB" tense="PAST">
      <token_anchor id="47" />
    </EVENT>
    <EVENT aspect="NONE" certainty="" class="REPORTING" comment="" factuality="" id="6" modality="NONE" polarity="POS" pos="VERB" tense="PAST">
      <token_anchor id="50" />
    </EVENT>
    <EVENT aspect="NONE" certainty="" class="OCCURRENCE" comment="" factuality="" id="7" modality="NONE" polarity="POS" pos="ADJECTIVE" tense="FUTURE">
      <token_anchor id="55" />
    </EVENT>
    <EVENT aspect="NONE" certainty="" class="STATE" comment="" factuality="" id="8" modality="NONE" polarity="POS" pos="VERB" tense="PRESENT">
      <token_anchor id="65" />
    </EVENT>
    <EVENT aspect="NONE" certainty="" class="OCCURRENCE" comment="" factuality="" id="9" modality="NONE" polarity="POS" pos="VERB" tense="INFINITIVE">
      <token_anchor id="69" />
    </EVENT>
    <EVENT aspect="NONE" certainty="" class="OCCURRENCE" comment="" factuality="" id="10" modality="NONE" polarity="POS" pos="NOUN" tense="NONE">
      <token_anchor id="74" />
    </EVENT>
    <EVENT aspect="NONE" certainty="" class="OCCURRENCE" comment="" factuality="" id="11" modality="NONE" polarity="POS" pos="VERB" tense="PRESENT">
      <token_anchor id="75" />
    </EVENT>
    <EVENT aspect="NONE" certainty="" class="REPORTING" comment="" factuality="" id="12" modality="NONE" polarity="POS" pos="VERB" tense="PAST">
      <token_anchor id="88" />
    </EVENT>
    <EVENT aspect="PERFECTIVE" certainty="" class="OCCURRENCE" comment="" factuality="" id="13" modality="NONE" polarity="NEG" pos="VERB" tense="PRESENT">
      <token_anchor id="96" />
    </EVENT>
    <EVENT aspect="NONE" certainty="" class="OCCURRENCE" comment="" factuality="" id="14" modality="NONE" polarity="POS" pos="VERB" tense="FUTURE">
      <token_anchor id="102" />
    </EVENT>
    <EVENT aspect="NONE" certainty="" class="I_ACTION" comment="" factuality="" id="15" modality="NONE" polarity="POS" pos="VERB" tense="PAST">
      <token_anchor id="109" />
    </EVENT>
    <EVENT aspect="NONE" certainty="" class="OCCURRENCE" comment="" factuality="" id="16" modality="NONE" polarity="POS" pos="VERB" tense="INFINITIVE">
      <token_anchor id="111" />
    </EVENT>
  </Markables>
  <Relations>
    <TLINK comment="" id="1" relType="BEFORE">
      <source id="1" />
      <target id="0" />
    </TLINK>
    <TLINK comment="" id="2" relType="SIMULTANEOUS">
      <source id="4" />
      <target id="3" />
    </TLINK>
    <TLINK comment="" id="3" relType="BEFORE">
      <source id="5" />
      <target id="0" />
    </TLINK>
    <TLINK comment="" id="4" relType="SIMULTANEOUS">
      <source id="5" />
      <target id="1" />
    </TLINK>
    <TLINK comment="" id="5" relType="SIMULTANEOUS">
      <source id="6" />
      <target id="1" />
    </TLINK>
    <TLINK comment="" id="6" relType="INCLUDES">
      <source id="8" />
      <target id="0" />
    </TLINK>
    <TLINK comment="" id="7" relType="BEFORE">
      <source id="9" />
      <target id="10" />
    </TLINK>
    <TLINK comment="" id="8" relType="IDENTITY">
      <source id="10" />
      <target id="11" />
    </TLINK>
    <TLINK comment="" id="9" relType="SIMULTANEOUS">
      <source id="12" />
      <target id="1" />
    </TLINK>
    <TLINK comment="" id="10" relType="AFTER">
      <source id="14" />
      <target id="0" />
    </TLINK>
    <TLINK comment="" id="11" relType="BEFORE">
      <source id="15" />
      <target id="0" />
    </TLINK>
  </Relations>
  <token id="1" number="0" sentence="0">ROGERS</token>
  <token id="2" number="1" sentence="0">COMMUNICATIONS</token>
  <token id="3" number="2" sentence="0">Inc.</token>
  <token id="4" number="3" sentence="0">said</token>
  <token id="5" number="4" sentence="0">it</token>
  <token id="6" number="5" sentence="0">plans</token>
  <token id="7" number="6" sentence="0">to</token>
  <token id="8" number="7" sentence="0">raise</token>
  <token id="9" number="8" sentence="0">175</token>
  <token id="10" number="9" sentence="0">million</token>
  <token id="11" number="10" sentence="0">to</token>
  <token id="12" number="11" sentence="0">180</token>
  <token id="13" number="12" sentence="0">million</token>
  <token id="14" number="13" sentence="0">Canadian</token>
  <token id="15" number="14" sentence="0">dollars</token>
  <token id="16" number="15" sentence="0">(</token>
  <token id="17" number="16" sentence="0">US</token>
  <token id="18" number="17" sentence="0">$</token>
  <token id="19" number="18" sentence="0">148.9</token>
  <token id="20" number="19" sentence="0">million</token>
  <token id="21" number="20" sentence="0">to</token>
  <token id="22" number="21" sentence="0">$</token>
  <token id="23" number="22" sentence="0">153.3</token>
  <token id="24" number="23" sentence="0">million</token>
  <token id="25" number="24" sentence="0">)</token>
  <token id="26" number="25" sentence="0">through</token>
  <token id="27" number="26" sentence="0">a</token>
  <token id="28" number="27" sentence="0">private</token>
  <token id="29" number="28" sentence="0">placement</token>
  <token id="30" number="29" sentence="0">of</token>
  <token id="31" number="30" sentence="0">perpetual</token>
  <token id="32" number="31" sentence="0">preferred</token>
  <token id="33" number="32" sentence="0">shares</token>
  <token id="34" number="33" sentence="0">.</token>
  <token id="35" number="34" sentence="1">Perpetual</token>
  <token id="36" number="35" sentence="1">preferred</token>
  <token id="37" number="36" sentence="1">shares</token>
  <token id="38" number="37" sentence="1">are</token>
  <token id="39" number="38" sentence="1">n't</token>
  <token id="40" number="39" sentence="1">retractable</token>
  <token id="41" number="40" sentence="1">by</token>
  <token id="42" number="41" sentence="1">the</token>
  <token id="43" number="42" sentence="1">holders</token>
  <token id="44" number="43" sentence="1">,</token>
  <token id="45" number="44" sentence="1">the</token>
  <token id="46" number="45" sentence="1">company</token>
  <token id="47" number="46" sentence="1">said</token>
  <token id="48" number="47" sentence="1">.</token>
  <token id="49" number="48" sentence="2">Rogers</token>
  <token id="50" number="49" sentence="2">said</token>
  <token id="51" number="50" sentence="2">the</token>
  <token id="52" number="51" sentence="2">shares</token>
  <token id="53" number="52" sentence="2">will</token>
  <token id="54" number="53" sentence="2">be</token>
  <token id="55" number="54" sentence="2">convertible</token>
  <token id="56" number="55" sentence="2">into</token>
  <token id="57" number="56" sentence="2">Class</token>
  <token id="58" number="57" sentence="2">B</token>
  <token id="59" number="58" sentence="2">shares</token>
  <token id="60" number="59" sentence="2">,</token>
  <token id="61" number="60" sentence="2">but</token>
  <token id="62" number="61" sentence="2">that</token>
  <token id="63" number="62" sentence="2">the</token>
  <token id="64" number="63" sentence="2">company</token>
  <token id="65" number="64" sentence="2">has</token>
  <token id="66" number="65" sentence="2">the</token>
  <token id="67" number="66" sentence="2">option</token>
  <token id="68" number="67" sentence="2">to</token>
  <token id="69" number="68" sentence="2">redeem</token>
  <token id="70" number="69" sentence="2">the</token>
  <token id="71" number="70" sentence="2">shares</token>
  <token id="72" number="71" sentence="2">before</token>
  <token id="73" number="72" sentence="2">a</token>
  <token id="74" number="73" sentence="2">conversion</token>
  <token id="75" number="74" sentence="2">takes</token>
  <token id="76" number="75" sentence="2">place</token>
  <token id="77" number="76" sentence="2">.</token>
  <token id="78" number="77" sentence="3">A</token>
  <token id="79" number="78" sentence="3">spokesman</token>
  <token id="80" number="79" sentence="3">for</token>
  <token id="81" number="80" sentence="3">the</token>
  <token id="82" number="81" sentence="3">Toronto</token>
  <token id="83" number="82" sentence="3">cable</token>
  <token id="84" number="83" sentence="3">television</token>
  <token id="85" number="84" sentence="3">and</token>
  <token id="86" number="85" sentence="3">telecommunications</token>
  <token id="87" number="86" sentence="3">concern</token>
  <token id="88" number="87" sentence="3">said</token>
  <token id="89" number="88" sentence="3">the</token>
  <token id="90" number="89" sentence="3">coupon</token>
  <token id="91" number="90" sentence="3">rate</token>
  <token id="92" number="91" sentence="3">has</token>
  <token id="93" number="92" sentence="3">n't</token>
  <token id="94" number="93" sentence="3">yet</token>
  <token id="95" number="94" sentence="3">been</token>
  <token id="96" number="95" sentence="3">fixed</token>
  <token id="97" number="96" sentence="3">,</token>
  <token id="98" number="97" sentence="3">but</token>
  <token id="99" number="98" sentence="3">will</token>
  <token id="100" number="99" sentence="3">probably</token>
  <token id="101" number="100" sentence="3">be</token>
  <token id="102" number="101" sentence="3">set</token>
  <token id="103" number="102" sentence="3">at</token>
  <token id="104" number="103" sentence="3">around</token>
  <token id="105" number="104" sentence="3">8</token>
  <token id="106" number="105" sentence="3">%</token>
  <token id="107" number="106" sentence="3">.</token>
  <token id="108" number="107" sentence="4">He</token>
  <token id="109" number="108" sentence="4">declined</token>
  <token id="110" number="109" sentence="4">to</token>
  <token id="111" number="110" sentence="4">discuss</token>
  <token id="112" number="111" sentence="4">other</token>
  <token id="113" number="112" sentence="4">terms</token>
  <token id="114" number="113" sentence="4">of</token>
  <token id="115" number="114" sentence="4">the</token>
  <token id="116" number="115" sentence="4">issue</token>
  <token id="117" number="116" sentence="4">.</token>
</Document>


text:
title: Intro to HTML
module: 3
---
# HTML
This week we are going to start using HTML or the HyperText Markup Language.

HTML is the standard markup language for creating web pages and web applications. HTML is a markup language that web browsers use to interpret and compose text, images, and other material into visual or audible web pages. HTML was first proposed in 1990 by Tim Berners-Lee, then a contract physicist at CERN.

To learn a little more about the history of HTML, you should read the ["History" section from the associated Wikipedia page](https://en.wikipedia.org/wiki/HTML#History) & [Amy Hisson's "History of HTML and CSS"](http://amyhissom.com/HTML5-CSS3/history.html).


text:
for more details.

Some rights reserved.

Redistribution and use in source and binary forms of the software as well
as documentation, with or without modification, are permitted provided
that the following conditions are met:

* Redistributions of source code must retain the above copyright
  notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above
  copyright notice, this list of conditions and the following
  disclaimer in the documentation and/or other materials provided
  with the distribution.

* The names of the contributors may not be used to endorse or
  promote products derived from this software without specific
  prior written permission.

THIS SOFTWARE AND DOCUMENTATION IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE AND DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.

Description: Events
        ~~~~~~
        *Bringing the elegance of C# EventHanlder to Python*

        .. image:: https://secure.travis-ci.org/nicolaiarocci/events.png?branch=master
                :target: https://secure.travis-ci.org/nicolaiarocci/events

        The C# language provides a handy way to declare, subscribe to and fire events.
        Technically, an event is a "slot" where callback functions (event handlers) can
        be attached to - a process referred to as subscribing to an event. Here is
        a handy package that encapsulates the core to event subscription and event
        firing and feels like a "natural" part of the language.

        .. code-block:: pycon

            >>> def something_changed(reason):
            ...     print "something changed because %s" % reason
            ...

            >>> from events import Events
            >>> events = Events()
            >>> events.on_change += something_changed

        Multiple callback functions can subscribe to the same event. When the event is
        fired, all attached event handlers are invoked in sequence. To fire the event,
        perform a call on the slot:

        .. code-block:: pycon

            >>> events.on_change('it had to happen')
            'something changed because it had to happen'

        Documentation
        -------------
        Complete documentation is available at http://events.readthedocs.org

        Installing
        ----------
        Events is on PyPI so all you need to do is: ::

            pip install events

        Testing
        -------
        Just run: ::

            python setup.py test

        The package has been tested under Python 2.6, Python 2.7 and Python 3.3.

        License
        -------
        Events is BSD licensed. See the LICENSE_ for details.

        Contributing
        ------------
        Please see the `Contribution Guidelines`_.

        Attribution
        -----------
        Based on the excellent recipe by `Zoran Isailovski`_, Copyright (c) 2005.

        .. _LICENSE: https://github.com/nicolaiarocci/events/blob/master/LICENSE
        .. _`Zoran Isailovski`: http://code.activestate.com/recipes/410686/
        .. _`Contribution Guidelines`: https://github.com/nicolaiarocci/events/blob/master/CONTRIBUTING.rst

Platform: any
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Topic :: Software Development


text:
<form  action="twi.php" method="POST" class="form-horizontal">

تغريدة جديدة

    <textarea rows="4" id="tw" name="txtwi" placeholder="غرد هنا" ></textarea>

    <button id="login" type="submit" class="btn">غرد للكل</button>

    </form>